Exit BeagleBone Black, hello Cubieboard2!

Put up my BeagleBone Black for sale. It was gathering dust, somehow this board doesn’t appeal to me. Biggest drawback is that it seems to be very picky with power adapters. If you don’t use a linear power adapter USB devices might not work properly. And that was exactly the issue I was facing, I just couldn’t get my USB audio interfaces to work on the BBB. So I lost interest because well, that’s what I bought the device for, to get sound out of it with the help of an USB audio interface. Add to this that there is no realtime kernel or RT patchset available for the BBB and that the BBB is quite a complex little device (it’s actually a REAL dev board). It would’ve cost me too much time to completely fathom it. No bad feelings though, the BBB is a very nice product and it sure has the slickest looks of all ARM SoC dev boards around.

Also I got a Cubieboard2 in recently. And that board has absorbed me for the last week and a half. It’s quite easy to set up (not as easy as the RPi though), has a lot of IO (yes, it has audio in and out!) and it blows both the RPi and BBB away when it comes to performance with its dual core A20 Allwinner SoC that can easily be overclocked to 1.2 GHz. Alas, no realtime kernel or RT patchset either but hey, I managed to get a RT kernel running on a Rockchip RK3066 based device so I could at least give it a try. And it worked out well. I’m now running a 3.4.61-rt77 kernel on it with a custom Debian Wheezy installation. This time I used git to keep track of the modifications I made so it was a lot easier to create a usable diff. I also patched the driver for the onboard audio codec because the hardcoded defaults were just unusable for realtime audio. Minimum number of periods was 4 and minimum buffer size was 1024. Don’t ask me why. So I’ve changed these to 2 and 16 respectively and managed to get JACK running at a respectable -p64 -n2 -r44100. Fired up some JACK clients and this little monster keeps up very well. USB audio interfaces are no problem either, I can run my Edirol UA25 in Advanced mode with -p64 -n3 -r48000 without any hitch. This is probably because the Cubieboard2 doesn’t use a Synopsys DesignWare OTG controller with out-of-tree dwc_otg drivers like the RPi but a better supported USB controller. At the moment the Cubieboard2 is the nicest ARM dev board I have laid my hands on so far.

text-align: center;


RT patchset 3.4.61-rt77 for linux-sunxi, sunxi-3.4 branch

Low latency defaults patch for sunxi-codec driver

Exit BeagleBone Black, hello Cubieboard2!

First Dutch Raspberry Jam

The first Dutch Raspberry Jam will take place on Thursday September 26 at the Ordina HQ in Nieuwegein. I’ve offered to do a presentation about doing real-time audio with the Raspberry Pi which has been accepted. Internet visibility of this event is minimal at the moment though, let’s hope it caches on.

So expect a presentation/demo about using your Raspberry Pi as a sequencer, synthesizer, sampler or virtual guitar amp. I will show how to configure, tweak and tune your RPi for real-time, low-latency audio and what the possibilities of such a set-up are. I’ll probably do a live demo too of some tracks generated by one or more RPi’s

Ordina Raspberry Jam

Raspberry Pi Playlist @ AutoStatic’s YouTube channel

First Dutch Raspberry Jam

Carla on the Raspberry Pi

Last week I managed to get Carla running on my RPi. Carla is a really nice plugin host that supports the most important plugin frameworks available for Linux (LV2, DSSI, LADSPA and VST) with some awesome extra features like a built-in ZynAddSubFX synth and support for SF2, SFZ and GIG files. The latter didn’t work until yesterday but I managed to compile LinuxSampler (which is needed by Carla in order to be able to load SFZ and GIG files) for the RPi with the help of Paul Brossier aka piem from the Aubio project.

I just wrote him a mail:

Hello Paul,

I’m trying to package LinuxSampler for Raspberry Pi but I’m running into an issue when compiling which fails with a message related to RTMath.h. After some googling I ended up here:
So I started scouring the interwebs and found this:
Where there is a reference to a possible fix. But the diff.gz that contains the patch is untraceable. I know this announcement is almost 8 years old but do you think you still have the diff or maybe an idea what changes you made to the code?

Thanks in advance and keep up the good work with Aubio!

Best regards,

Jeremy Jongepier

And guess what, he replied almost instantly! He gave me some pointers where to add some extra code and even though I’m not a coder I started trying things out. But then I stumbled upon actual patches to resolve this issue. I needed both the ARM and atomic patch and after applying those LinuxSampler compiled flawlessly in my Raspbian ARM chroot. The few lines of code I cooked up myself were almost identical so I got quite far actually. I should really pick up learning how to code, I think I’d learn fast.

So after compiling LinuxSampler I could rebuild Carla against the freshly created LinuxSampler libs. Installed the deb on my RPi and loaded some SFZ’s. It all worked like a charm. Carla is like a Swiss Army Knife, I’m really starting to appreciate this piece of software. Kudos to falkTX! And thanks to Paul Brossier for responding so quickly and helping me to get on the right track.

text-align: center;

Carla running on the Raspberry Pi

Carla on the Raspberry Pi

More ARM goodies II

Received the BeagleBone Black (BBB) and the MK808 with a RK3066 SoC. My first impressions are really positive. Especially the BBB is quite an awesome device that I’m probably going to use a lot in favor of the Raspberry Pi. At first glance I had something like, the BBB blows the RPi away, but as soon as I started looking for documentation on how to put Debian on it for instance it became clear that the RPi is still the device to beat. The RPi community is huge, documentation for it is well laid out and working with the RPi is just so easy. The BBB on the other hand lacks a vivid community, is $10 more expensive and a lot more difficult to work with. Take the Debian install for example, seems quite some work to get that going.

The MK808 is surely an improvement over the UG80X I already own. It comes with a HDMI port instead of a HDMI plug, has an extra USB OTG port, a heatsink, hardware serial console access, a reset button and a power indicator LED. The pre-installed Android version looks better too. I flashed my RT kernel recovery image on it, inserted the Micro SD from my UG80X and it booted without any issues. So I’m going to pursue my goal to get a real-time, low-latency environment running on a RK3066 based device on the MK808 and find another purpose for the UG80X.

Edit: Getting Debian to work on the BBB is actually quite easy: http://elinux.org/BeagleBoardDebian#Demo_Image
Next time I’ll promise to make better use of my Google skills.

More ARM goodies II

Hacking an Android TV stick, the sequel

jeremy@rk3066:~$ uname -a
Linux rk3066 3.0.36-rt58 #1 SMP PREEMPT RT Thu Jul 4 13:18:23 CEST
2013 armv7l GNU/Linux

Managed to compile and run a real-time kernel on the Android TV stick with the RK3066 SoC. Packaged the latest version of amSynth (1.4.0 which has been released recently), installed it, fired up JACK and amSynth and so far no xruns, nothing. And this is with -p64!

jackd -P84 -p32 -t2000 -dalsa -dhw:Device -n3 -p64 -r44100 -s -P

I should measure the latency of the $2 USB audio interface I’m using to find out what the total latency of this set-up is. Well, at least I got the system latency for usage with softsynths like amSynth down to 64/44100*2=3ms. Now that’s a usable situation.

jeremy@rk3066:~$ lsusb | grep -i c-media
Bus 002 Device 006: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet
UP-100, Genius G-Talk)
jeremy@rk3066:~$ cat /proc/asound/cards 0 [RK29RK1000 ]: RK29_RK1000 - RK29_RK1000 RK29_RK1000 1 [HDMI ]: ROCKCHIP_HDMI - ROCKCHIP HDMI ROCKCHIP HDMI 2 [Device ]: USB-Audio - Generic USB Audio Device Generic USB Audio Device at usb-usb20_host-1.1, full speed

A big pro of this stick is that it suffers less from SD card corruption than my RPi. Yesterday evening I wrecked up yet another SD card when testing my RPi with a real-time kernel, it’s getting a bit cumbersome. Speaking of real-time kernels, it was quite some work to apply the RT patchset to the RockChip kernel source. Had to add stuff by hand and when I finally got everything in place it wouldn’t compile. But I managed to solve all the build errors. After flashing the kernel image the TV stick wouldn’t boot of course, it hung at some point. But I quickly saw that the issue was with the SD card reader and that it was similar to the SD card reader issue on the RPi for which I found a workaround. So I added an #ifdef clause to the RockChip SD card reader driver, recompiled, reflashed and wham, it continued booting. Now I have to clean up my build directory and get a usable diff of it against the pristine RK3066 kernel sources.

Hacking an Android TV stick, the sequel

More ARM goodies

Bought another Android TV stick based on the RK3066 SoC, the MK808 which is as far as I’ve understood kind of the default board to hack on.

MK808 Android TV stick

Also bought a BeagleBone Black development board. Why? Because apparently JACK runs well on it, also with USB interfaces (no need for the ALSA softmode option!) so I assume the USB implementation is better than those of the Raspberry Pi and the RK3066 based board I currently own. And I could get it cheaper over here in The Netherlands than other viable alternatives like the pcDuino or Cubieboard, also because of a coupon code I found on tweakers.net so I got a price reduction of a few Euros. Another reason why I bought it are the so-called capes that are available for this board. These capes are basically add-on boards and the cape that has my most attention is the audio cape. I’m thinking about buying that specific cape, solder two Neutriks on the audio in and out and turn it into the easiest DIY guitar effect box ever. Of course with guitarix loaded on it, the devs have done an incredible amount of work recently to get guitarix running flawlessly and painlessly on ARM dev boards like the BeagleBone Black.

BeagleBone Black

BeagleBone Audio Cape

More ARM goodies

Workshops Music Production with Open Source Software

Starting September 7th I’m going to conduct a series of 6 workshops on music production with open source software at De Bakkerij in Castricum. With software I also mean the operating system so the OS I’m going to use will be an open source based one (probably Ubuntu or Debian). So basically it’s a series of workshops on music production with Linux Audio.

Last week I had something like, what the heck, I’m just going to mail De Bakkerij to ask if they’re interested since they host more DIY initiatives like the workshops inititiative I proposed. I didn’t expect much of it but I immediately got an enthusiastic e-mail back from the promotor of De Bakkerij. So after a few mails back and forth it was a done deal.

Rough outline of the workshops:

  1. Introduction and base principles of open source software and using it for music production. What is open source, why use it, how does the open source audio ecosystem look like and will my hardware work?
  2. Recording with open source software. What software is available (DAW), how to use it during the recording process, base principles of recording instruments and vocals (I’ll be focusing on home recording and not recording complete bands).
  3. Making music with open source software. Softsynths, samplers, drum machines, amp/cabinet modeling, sequencers, trackers, DAWs, MIDI/OSC, plugin frameworks etc.
  4. Mixing and mastering with open source software. What software is available, what kind of hardware do I need, base principles of mixing and mastering.
  5. Showcasing the possibilities of the usage of open source software with the focus on low-cost solutions like the Raspberry Pi and RockChip based devices.
  6. Concluding workshop: listen to and discuss the musical projects made by the attendees, discussion on music production with open source software.

There’s no fee for attending the workshops but you do need a notebook or netbook and an empty USB memory stick of at least 4GB.

Workshops Music Production with Open Source Software

Bricking the UG802 Android TV stick

Pulled out my soldering iron, soldered a reset button and a switch to boot into recovery on the PCB and connected my UG802 clone/revision to my TV. Nothing. lsusb. Crap, it boots in flash mode. Let’s try reflashing the whole bloody thing. Well that works so the NAND is not defective or anything. Reboot. Nothing, lsusb still reports the device is in flash mode. So I removed all my soldering efforts which I really regretted because it was quite nicely done given my poor soldering skills and tried again. Still nothing. Arrrggghhhh. Enjoyed a cold Warsteiner and let it rest.

Today I brought the device with me to the office. Hooked it up to a Windows machine, ran the ROM flash tool from Finless’ custom ROM package for this device and powered it up. I was greeted with the most ugly Android boot animation I had ever seen. But at least the device works again so thanks Finless!

So now I can move on again. I had Jack1 running on it so it should be possible to turn this device into a very cheap, yet powerful alternative to do real-time, low-latency audio. Compared to the Raspberry Pi JACK already consumed way less CPU (12% on the RPi compared to 2% on the RK3066 device with the same JACK settings) and I noticed the device has some more IRQ’s so if I could get all of those threaded that should give me some more flexibility to get everything working in a more stable way. I did have to disable WiFi otherwise the whole USB stack crashed after starting JACK. Also tried with an external WiFi dongle, same issue. I can even generate xruns when pressing keys on an attached keyboard. So it’d be really nice if I had serial console access to this thing. But I’ll figure that out too. And maybe the USB part of the kernel can be tweaked to improve things on the USB level.

Bricking the UG802 Android TV stick

LAC2013: Saturday 11th of May

Somehow I managed to arrive just in time to set everything up for my workshop, like always. I’m very good at stumbling in at the very last moment. The Nvidia binary blob didn’t like a beamer attached to it so I couldn’t properly display my slides. The well-filled room didn’t seem to care, they were more interested in what I had to say and the equipment I brought with me. I talked and talked and only briefly demonstrated the Raspberry Pi I brought with me. Guess I could’ve done a whole workshop about the RPi because apparently that little device caught most of the attention.

Right after my workshop I rushed to Rui’s intercalated workshop about the software he develops. I missed his first workshop which took place on Thursday. But since Rui had so much more to show after that initial workshop the LAC2013 organization decided to allot him more time for an extra workshop. But I also didn’t want to miss Jörn’s workshop so I decided I also wanted to see part of that workshop too. Even though I’ve been using Rui’s software for years (I’m a QA, Qtractor Afficionado) he showed things I had never seen before. And I probably attended one of the best parts of Jörn’s workshop where he showed and made us listen to what he did with a live recording. An ear opener, really, amazing what you can do with a good pair of ears, years of experience and the right tools.

Then it was lunchtime already. Missed out on the warm lunch but when that was all cleared the alternative food stand was set up again which had probably even better food. They had great salads, fruit juice, bread and other tasty things, all for free. Many, many thanks to the organization for setting this up, it really added up to the overall positive vibe of the conference.

Now I had a bit of a problem. I needed to go to the Forum Stadtpark to do a sound check for the Linux Sound Night. But walking was not an option with all my stuff and public transport would take too long as there was no direct connection. Luckily I could tag along with the guys from SuperDirt² so I hopped into their car and off we went. SuperDirt² had to play last so they did their sound check first. I watched their sound check in awe, these guys were good! I was up next. Everything went smooth, monitors were good, the sound guy was a really cool guy and so was the stage manager for the event. All omens were very positive!

We got back right on time for Albert Graef’s talk on creating LV2 plugins with Faust. We witnessed a glimpse of the future. If I got it right it will be extremely easy to create your own LV2 plugins in the near future. Just throw some Faust code against it and upload it with your browser and within moments you can download your own LV2 plugin! Time to learn some Faust I guess. One lightning talk later we witnessed another glimpse of the future. No, not my acrylic guitar in the hands of Bruno Gola but the world premiere of the MOD Quadra digital pedal board. The excitement was tangible. But the MOD guys quite easily redeemed the high expectations. The MOD Quadra is simply an amazing device, the web GUI looks stunning and it’s all so easy. And it runs on Linux people, using the LV2 framework. If this doesn’t propel LV2 into mass adoption then what?

For dinner we ended up in a nice Italian restaurant. The Gösser tasted good, same for the dish I ordered (Calamari alla griglia). After dinner we walked to the Forum Stadtpark where we were welcomed by the pleasant chaos of Android drummers. I installed the app and joined the concert. It was fun. Then the beamer got switched on showing us two terminal windows with vim on the right side and something compile-ish on the left. On stage a person in front of a notebook, coding live. The result? Really cool stuff if you ask me, just watch for yourself.

Algorave to the max all y’all!

Then it was time for something remotely dance related, namely me. Really enjoyed the gig even though my voice let me down after the third song. The guy that came after me unfortunately was a bit the odd one out so the contrast with the last act, SuperDirt², couldn’t have been bigger. As soon as Käpt’n Dirt hit the strings of his cello we knew this was going to be a blast. And when Ras Tilo kicked in the party was complete. What a great show!

After the encore of SuperDirt² it was time for the Open Jack Session. Not Jack as in JACK but Jack as in 3.5″ mini-jack. It was lying there on the table on stage and after ClaudiusMaximus Marije Baalman plugged in. Live coding in SuperCollider with every once in a while Marije stretching her arms because of the anti-RSI alarms that kept popping up. Great stuff, very enjoyable to listen to and the added humorous note of the anti-RSI alarms perfectly summed up what this conference was all about: having a great time. Despite the submerging inebriation I was enthralled.

We stayed until we got kicked out. That’s how it should be. Sole minor blemish: the beer. That Murauer stuff was close to undrinkable.

LAC2013: Saturday 11th of May

Raspberry Pi als virtuele gitaarversterker: MIDI en effecten

Live demo van m’n Raspberry Pi, guitarix en een MIDI floorboard.

Raspberry Pi als virtuele gitaarversterker: MIDI en effecten