Cabbage Logo
Back to Cabbage Site

Cabbage on Android!

I’ve upload a beta version of Cabbage for Android here:

https://copy.com/j2rF21esgctiogIh

This version will play any desktop Cabbage instrument, depending on how powerful your Android phone is. It ships with a few basic examples(3 by Iain, and one of my own), but you can try out any instrument you wish by placing the .csd file into the Cabbage folder in your home directory. I plan to put a bit of time into developing this further but for now it’s more a proof of concept. Let me know how you get on.

p.s. tested with Android v4.3 and higher. I’ve no idea if it will run on an older version of Android.

I really needed yet another way to drain my phone battery at ridiculous rates, this is seriously awesome! I was quickly able to get an instrument or two of my own running on my phone. Keep up the awesome work Rory!

That’s good to hear. I’m working on getting a better interface for loading the instruments. I’m going to have to go native on that. It’s just a pain to mix the native java stuff with the C++ stuff but I’ll figure out it. Btw, have you tested any effects yet? I’ve only tested synths.

Hi,
I tested on 4.3 too and it seems to work for me too except every .csd is rendered in mono. For instance sonic_lava_lamp play fine on my desktop but right channel seems discarded as left channel seems to be copied to it on Android.

I hadn’t noticed. I should really test this with a set of headphones in the future! I’m sure there’s an easy fix for it. I’ll take a look. Right now I’m migrating from an ANT based build to a Gradle one so that I can use Android Studio. Once I have that going it should be far easier to work on new features and improvements.

I finally got a chance to plug in headphones and test an effect (Flanged).

Stereo output is working fine, it’s “inch 2” input that produces no audio on android, whereas on other systems it duplicates the mono mic channel for both inch 1 and inch 2. If I enable the mono collapse I typically have on my effects, it sounds as it should normally from a mono mic source.

The popup window I use in a few instruments for waveform customization crashes cabbage on android.

I’m getting about a half second delay, and semi-frequent dropouts… so not the best performance, but still really cool to play with!

Ok, that makes sense. I’ll put that in the notes about using Cabbage on Android. Popup windows will crash Cabbage. That’s for sure. It would take quite a while to ifdef all the various parts of the code base that’ll cause problems on Cabbage. I think I’ll just provide some detailed notes in the manual about things to watch out for. I sitll need to provide way for the end user to select audio settings. I’m not sure how easy this will be on Android, but it would be nice to be able to set buffer sizes and even sample rate. These could be tweaked to help performance.

I’ve uploaded an improved version for people to try out. I’ve
switched to an OpenGL renderer and it performs much better now. It’s
very responsive in comparison to the first version. I’ve also made it
easier to launch your instruments and have included a way to tweak your
buffer settings. I’ve included two instruments with this one that I
think work well for handsets. One is Iain McCurdy’s outrageous bassline
instrument, and the other is a little instrument I wrote with a 303
style pattern editor.

MIDI may be working now, but I don’t have an Android6 phone to try it out. I’m using the latest version of JUCE which adds MIDI support on Android, only I can’t test it. If anyone has any way of checking this it would be great. Here’s the link:

https://copy.com/6Kkd6vI6HzFmpJ13

Hi Rory, crashes sometimes on Android 5.0 but more fluid indeed (and stereo!) Thanks

Do both synths crash? And how are the screen sizes for you? I need to sort out the resizing problems.

Not the synths in themselves, rather the whole system when loading a new synth, switching from one synth to another, or quitting the app with the back button. Once fully loaded, each synth seems quite stable though.

As for the screen size, I haven’t tried on my phone but here is what it looks like on my asus transformer tablet

Still working on a few issues. I’ve noticed those erratic crashes from time to time too. I’ll be working on this more over Christmas, so watch this space.

I’ve added some resizing methods that ‘should’ dynamically resize your instruments to the match the screen of your handset. It works Ok so long as the screen ratio is not too far off that of your instrument. I’ve uploaded the latest version here
https://copy.com/aZHgO20hAusZB4xY

Hi Rory, autoresize works but stereo is gone here.

That’s odd. I’m getting stereo here in the examples that work for me. I just noticed that reverse and ping-pong delay don’t seem to make any sound. But stereo chorus and GridSynth are working fine in stereo for me?

[edit] I’ll take a look at those other examples and see if I can figure out what’s going on with them.

I’ve only tested sonic lava lamp which worked in stereo in the previous version, but I can try some other examples as well to report if you want.

I just tried it there myself and it runs in stereo. What’s odd is that nothing has changed in terms of how audio is played back, so I can’t image why you are not getting anything in stereo? Can you try the GridSynth example. After adding some notes to the grid press the delays button to open the delays tab. The stereo effect in the delays should be quite obvious. I wonder does your handset default to mono under certain conditions? I don’t know. I’m clutching at straws here!

Actually sonic lava lamp doesn’t always work in mono with this version, more or less randomly (maybe this was also the case -I mean in stereo!- with the previous version but I’ve just figured that out). As of GridSynth, I never hear a stereo version yet. I’ve tried to uninstall/install, cleared cache several times.
Maybe this is a tablet feature as you mention but

I’ve never noticed that with, say, the csound app.

edit : first stereo GridSynth now. Maybe I should wait a while before launching a machine?

edit2 : All is fine with another headphone (the previous one is working fine with csound app though …)

As for resizing, the outer frame is ok but not the inner grid

That doesn’t look great :frowning: It’s hard to get this stuff right when I only have access to one phone! I will try some things and post an update. It might not be till tomorrow though. Thanks again for taking a look.