• Alesis DM10, Ableton, Addictive Drums + an additional audio source from laptop

    Alesis DM10, Ableton, Addictive Drums + an additional audio source from laptop

    Hopefully this post will help you if you’re looking to setup your eDrums with Ableton and Addictive Drums 2 (or any another virtual drum kit with a VST for Ableton). I don’t know that much about music equipment so it took me a while to figure out where all the pieces fall into place.

    My initial issue with Ableton and AD2 was that MS Windows OS has very bad audio support (drivers) for anything more advanced than the simplest form of audio reproduction through speakers or headphones. What I wanted was to connect the Alesis DM10 to my laptop to get better quality drum samples with AD2 than what I had with the DM10 module and to be able to turn on a YouTube video and to play alongside with it. It didn’t take long for me to realize this wouldn’t work. Even with ASIO4ALL drivers, I could either get Ableton or the browser to output the sound into the headphones, not both at the same time.

    So, after a bit of research and some advice from a few fellow musicians, I decided that what I needed was a USB audio interface that would also act as a mixer. After doing a bit more research, I found out that Komplete Audio 6 was quite popular amongst drummers who wanted a low latency audio interface for triggering VST’s. I’m sure any other USB enabled interface with balanced input could easily do the job as well.

    Amazon.

    The next few steps included removing the ASIO4ALL drivers, installing official Komplete Audio 6 drivers, setting up Ableton with AD2 VST (make sure to check the “install as VST” checkbox during AD2 installation) and wiring up the hardware together.

    dm10-komplete6-laptop-setup

    This is how the Komplete 6 is supposed to light up when everything is connected and setup properly (both inputs are set to INST, headphones are set to 1/2, 48V on the back side is ON and the monitor “ON button” needs to be pressed once every time you turn this whole setup on):

    komplete-audio-6

    This is how the channels IN/OUT setup in Ableton looks like (click to view the full resolution screenshot):

    ableton-channels

    Input:

    ableton-input-config

    Output:

    ableton-output-config

    Ableton audio preferences:

    ableton-preferences-audio

    Ableton link/MIDI preferences:

    ableton-preferences-link-midi

    Komplete Audio 6 control panel:

    komplete-audio-6-driver

    And this is the screen where you can map the DM10 MIDI triggers to AD2 sounds (this AD2 keymap might help you with that):

    addictive-drums-2

    To map the triggers easier, press the “Learn” button and then hit the element that you wish to map with a stick. This will utilize AD’s “smart learning” and will automatically map the input from a trigger with an AD2 element (snare, hi-hat, kick, whatever..). Sometimes it’s a bit hard to use this (for example the ride bell which can be somewhat hard to trigger on DM10) but I found that for all the other elements it does the job really well.

    You might also want to slightly adjust triggers sensitivity on the DM10 module itself to make the AD2 respond more to your liking and expectations (you can make it require more or less force to produce trigger sound). Use that in conjunction with the curve on the righthand side of the hi-hat image from the last screenshot.

    All in all, I’m really happy with how this works. The latency is very minimal and 99% of the time it’s not in the way of playing. I do have an SSD in the laptop and there was a noticeable difference in how Ableton/AD2 performed while the crappy 5400 was inside and after I installed the SSD. The CPU in the laptop is the i7-4510U (not sure if that makes any difference or not).

    Hope this helps. If you have any questions or a different setup that you’d like to share, leave a comment. Cheers!

  • KatKiss >> Cyanogenmod (Asus TF300T)

    KatKiss >> Cyanogenmod (Asus TF300T)

    Ever since my little TF300T rooting/flashing adventure I have had nothing but trouble with Cyanogenmod on my TF300T. I flashed 3 new versions throughout 3 months, but none of them were stable or fast enough. I have been a long time Cyanogenmod user and I like it a lot so that was my obvious choice. But the tablet would often become very, very slow, couldn’t connect to Wi-Fi or wouldn’t even be able to run certain apps. There are also other issues people reported and it seemed that things wouldn’t change in future.. I guess the device is simply not popular enough to have enough people care about and it maintain it’s CM version. Lately I started thinking I would either have to flash an older version of Android (perhaps even Asus stock crap) or retire the device to a dark corner of a drawer..

    Hopefully, I remembered seeing everyone giving praise to the KatKiss ROM so I decided to give it one last try and try KatKiss out. Man was this a pleasant surprise. The device is now bursting with speed! It’s really responsive, I haven’t noticed any bugs so far, it looks nice and I have the latest Android 5.1 features. It’s even faster than what it was with the old 4.x stock Android, it can now run anything (including Hearthstone! :D). I’m really happy as this means I will now be able to use the device with joy again.

    If you’re looking for a fresh rom for your TF300T – avoid CM and give KatKiss a try, it will save you time.

    Mad props to timduru! :)

  • Mapping Japanese kana characters (hiragana/katakana) for use in programming

    Mapping Japanese kana characters (hiragana/katakana) for use in programming

    When I started working on Zanzou, I had to find a way to somehow map the whole kana so I could later use it in my webapp. I simply used 2D array to accomplish this. It’s no nuclear science but to save you the trouble of copying and pasting all the symbols into a single file yourself (I think it actually took me around an hour to do it :D), here is my kana.js file (note that if if you open the file itself in the browser, it will most probably display some strange characters instead of proper UTF-8 encoded kana symbols but when you open the file in your text editor, it should be usable and displayed just fine).

    I divided it into 4 major groups (arrays): monographs, digraphs, monographs with diacritics and digraphs with diacritics. Each array element (representing sound) consists of 3 subelements (roumaji record, and hiragana and katakana symbols).

    With some minor modifications, this could easily be used in any other programming language. Just make sure if you edit the file to save it in UTF-8.

    Hope it helps, がんばって!

  • TP-Link WR703N OpenWrt post installation tips

    TP-Link WR703N OpenWrt post installation tips

    In this post I’ll write down a few thigs I think are worth doing right after flashing your WR703N. The flashing itself is not covered in this post. For that, check out my How to flash TP-Link WR703N with OpenWrt post.

     Setting up a static IP address

    The first thing you should do is to assign a static IP address of your choice to your WR703N. There are three main reasons for doing this:

    1. Since your home router probably already uses 192.168.1.1, you will avoid having problems caused by conflicting IP addresses
    2. You will always know what the IP of your WR703N is and you will be able to connect to it from inside your network very fast
    3. Lastly, you will be able to make it work with DynDNS and port forwarding to connect to it from anywhere on the Internet

    Connect your WR703N directly to your PC using ethernet cable, telnet to it (telnet 192.168.1.1) and then edit /etc/config/network (Vi editor comes installed with OpenWrt, so you can use that). For example, to set the IP to 192.168.1.100 (assuming your network uses 192.168.1.X range and your home router is at 192.168.1.1), your lan interface section should look like this (do not change/remove the loopback interface part):

    1
    2
    3
    4
    5
    6
    7
    8
    config interface 'lan'
       option ifname 'eth0'
       option type 'bridge'
       option proto 'static'
       option ipaddr '192.168.1.100'
       option netmask '255.255.255.0'
       option gateway '192.168.1.1'
       option dns '192.168.1.1'

    Now run this command:

    1
    /etc/init.d/network restart

    And after that, feel free to disconnect the WR703N from your computer and connect it to your router/switch (you will be able to access it on the IP address that you just set up).

    Enabling SSH / disabling telnet (setting up password)

    Setting up the account password (using “passwd” command) will automatically disable telnet and enable Dropbear SSH daemon on port 22. Dropbear is an OpenSSH replacement designed for environments with low memory and processor resources (such as WR703N) and on OpenWrt it is installed by default instead of OpenSSH. You can easily replace Dropbear with OpenSSH if you want, but don’t do it before setting up extroot (see the next subsection) or else you will run out of free space.

    Extroot – extending your memory with an external USB device

    Extroot will allow you to use an external USB device to extend your internal memory which will enable you to install more packages onto your device (WR703N only has 4MB of flash memory which really isn’t much). Since this is a bit more tricky and it depends on which version of OpenWrt you have installed as well as on what kind of USB stick you have, I believe it is bettter for you to go to extroot wiki page and follow the steps provided there than for me to just copy all that stuff here.

    Installing GNU Screen and Vim

    GNU Screen will allow you to have multiple screens (you can view them as tabs or virtual terminals) so you won’t have to log in multiple times to have several terminals at once which is really, really handy. Vim is simply Vi improved. If you prefer another terminal editor (nano, joe..), go ahead and install that one.

    1
    2
    opkg update
    opkg install vim screen

    If you’re not familiar with screen, here are some basics.

    Installing the web interface

    You might want to install the OpenWrt web interface – LuCI (you need to have extroot set up for this or you will run out of free space):

    1
    2
    opkg update
    opkg install luci

    You will have to enable and start uhttpd daemon afterwards:

    1
    2
    /etc/init.d/uhttpd enable
    /etc/init.d/uhttpd start

    Then you will be able to access the web interface by typing your WR703N’s IP into your browser’s URL bar.

    Switching to Bash / setting up .bashrc

    OpenWrt comes with Ash shell. If you would like to use Bash instead, here is how you can switch and add some nice colouring to it. Install Bash by issuing the following:

    1
    2
    opkg update
    opkg install bash

    Then edit /etc/passwd and change the root user line to this:

    1
    root:x:0:0:root:/root:/bin/bash

    After that, run this command (which will create /root/.bash_profile and put “. $HOME/.bashrc” in it):

    1
    echo ". $HOME/.bashrc" > /root/.bash_profile

    Then you can either use your own .bashrc or download the one that I use (I got it from Arch wiki a few years ago) and put it in your root directory like this (if you would like to use your own .bashrc, make sure to put it in /root as well):

    1
    wget -P /root/ http://cmikavac.net/download/.bashrc

    Now log out, and log in again and you should have a brand new prompt.

     SSH public key authentication

    To enable SSH public key authentication on Dropbear you will first have to copy your public key to your WR703N’s tmp directory by issuing the following command from your Linux machine (change YOUR_KEY with your actual public key file name, and WR703N_IP with the IP address of your device):

    1
    scp ~/.ssh/YOUR_KEY.pub [email protected]_IP:/tmp

    Then log in to your WR703N and copy your public key to authorized_keys file:

    1
    2
    cat /tmp/YOUR_KEY.pub >> /etc/dropbear/authorized_keys
    chmod 0600 authorized_keys

    I couldn’t make make OpenSSH work with SSH public key authentication because apparently there is a bug in OpenWrt’s OpenSSH package (I read that somewhere on OpenWrt forums while I was trying to make it work some time ago, but I can’t find that post now… if I find it, I’ll put the link here).

    If you don’t use SSH public key authentication already, go here and read why you should and how to use it.

    For MS Windows users.

     Using DynDNS / setting up port forwarding on your router

    If your router supports DynDNS, or a similar service, you can make your WR703N accessible from anywhere on the internet (this is useful because you will be able to use your WR703N to tunnel your traffic to protect yourself while you are connected to an unsecured network somewhere). The explanation will be a bit more generic, but it will give you a rough idea on what you have to do to make it work:

    1. Register an account on DynDNS webpage
    2. Enter your DynDNS credentials into your router (find them somewhere in your router’s options)
    3. Forward a high TCP port (something above port 1024) to your WR703N (for example – if your WR703N is on 192.168.1.100, and Dropbear is running on port 22, then forward 8822 TCP to 192.168.1.100 port 22)

    Now you should be able to SSH into your WR703N by issuing the following command inside your terminal:

    1
    ssh -p 8822 [email protected]

    This might help you set up port forwarding on your router.

     Reflashing

    If you for any reason ever want/need to reflash your WR703N with a fresh instance of OpenWrt do the following (wget will download the latest snapshot of OpenWrt for WR703N, and mtd command will flash it to your device):

    1
    2
    3
    cd /tmp
    wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin
    mtd -r write openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin firmware

     

     Other

    OPKG Wiki 
    OpenWrt WR703N Wiki
    MiniPwner
    PirateBox

     

    Hope this helps. If you find out that something I wrote is wrong and is not working, please drop a comment bellow and I’ll fix it. Thanks. =)

  • How to flash TP-Link WR703N with OpenWrt?

    How to flash TP-Link WR703N with OpenWrt?

    1. Go to OpenWrt WR703N wiki page and download the latest squashfs-factory.bin firmware (keep in mind that although this is what most people use – this is not the latest stable version, but the bleeding edge OpenWrt firmware snapshot from the trunk which work just fine in most cases (if you want the latest stable version get the latest stable version))
      edit: I have only been using the trunk version myself, and I’ve been told that there is no stable version for WR703N (yet) since it got supported some time after the latest stable release (Backfire 10.03.1)
    2. Connect the WR703N directly to your PC using ethernet cable (WR703N will use 192.168.1.1 by default so if you try to connect it to your router/switch instead, it will probably start causing problems since most home routers have the default IP of 192.168.1.1 and you will have two devices on your network with conflicting IP addresses)
    3. Set a static IP address on your PC (it must be in 192.168.1.X range, different from WR703n’s 192.168.1.1 and with 255.255.255.0 subnet mask)
    4. Go to http://192.168.1.1/ and log in using admin/admin credentials
    5. Now go to http://192.168.1.1/userRpm/SoftwareUpgradeRpm.htm (according to Gene Wood’s comment, after the 1.6 update you will not be able go to this link directly any more but instead you will have to navigate through the menu manually, he wrote down the correct menu navigation sequence on his wiki page so feel free to check it out).
    6. Click on the grey button on the right side of the empty box and upload the firmware *.bin file that you download earlier
    7. Flashing might take up to a few minutes so be patient and DO NOT turn the power off (that will probably brick your device). When it’s all done, the device will reboot automatically, the blue LED will be lit solid (no blinking) and you will be able to telnet to the device
    8. For further configuration, feel free to check my TP-Link WR703N OpenWrt post installation tips post =)
  • How to fix Ctrl-Tab behavior in Kate?

    Kate has tabs turned off by default (at least that’s what you get with vanilla Kate package from Arch Linux repositories) and even when you turn them on, they act kinda funky because Kate switches between tabs by name order, rather than by opening order so what happens is that Ctrl-Tab starts jumping between your tabs instead of going from one to another, from left to right. That was quite confusing to me, and I wanted to change that behavior to what I’m already used to in browsers, GEdit, Pidgin, whatever… Finding a solution (a very well camouflaged one for that matter, thank you) to this situation was rather… unexpected.

    To turn tabs on (if they’re not turned on by default in your distro) you will first have to go to Settings -> Configure Kate -> Plugins and turn on either “Tab Bar” or “Multiline Tab Bar”. Try both and then decide which one suits you better. After that you will have to set up the shortcut for switching between tabs. To do that, go to Settings -> Configure Shortcuts and set the shortcut for Forward to Ctrl-Tab. You could as well set up alternate shortcuts: Alt+1 for Back and Alt+2 for Forward. You will be able to toggle tabs in both directions then easily.

    To fix the tab switching behavior (ordering), open the Documents column from the File System Browser (if you have it turned off, turn it on under plugins), right-click on it and choose Opening Order from Sort By in the drop-down menu.

    That’s it, enjoy!

Back to top