Does anyone here use a Linux-based OS for music (such as Ubuntu)?
I've never really used Linux based OS's for anything other than the command line, but I thought I'd try installing Ubuntu on an old laptop to see what all the fuss is about (well some fuss anyway).
I was surprised to find that the low level audio situation is a bit fragmented. The main contenders are OSS4, ALSA, Jack and pulseaudio. From what I can gather OSS4 isn't officially supported in Ubuntu. That leaves ALSA which is OK but may only allow one app to play audio at a time, pulseaudio which seems the most versatile out of the lot but seems to be targetted at general multimedia applications (and hence may have dubious latency) and Jack, which seems to be the pro audio low latency system but won't allow apps using any of the other audio systems to play if it's active. What a mess. How can it be so difficult?
I'd be interested to learn about the experiences of anyone who's doing audio mixing/synthesis on Linux.
There is an ulterior motive - I've sort of got NanoStudio working on Android and thought I might have a go at Linux too since it's not a million miles away. But don't hold your breath on either of these being released at the moment, it's more of an academic pursuit!
sheeeeeeeeeit. That's great, how'd you deal with the infamous latency limitations?
I would LOVE a Linux client for Nanosync. Even more than Dropbox support. Hmmm, I'd love both; but to be able to transfer files from my desktop to NanoStudio would be exquisite.
As for NanoStudio in Linux or Android; I'd love you to be able to tap that revenue stream so that you'll stay motivated to keep improving our favourite app! Lol.
I didn't - that's why it's academic and won't be released!
I really wanted to spend a week or two on it to try and get to grips with the technical aspects of porting all my code over, and get a feel for how big a job it would be. Aside from Android's utterly atrocious tools and my equally utter failure to get the stupid debugger working, it took about a week to get it running. There are still a lot of loose ends but it's worked as a proof of concept at least.
It's yer classic 'good news/bad news' scenario!
NanoSync won't port very easily I'm afraid, even though it could well be the more important one for users.
Well you've got Jack1 and Jack2 both running in parallel because the developers couldn't agree. It doesn't seem easy developing for Linux though as you choose which distributions to build for and support (Ubuntu, Red Hat, openSUSE etc) unless you want to give the source for the users to compile themselves.
Yes I'm just getting to grips with the various distributions, it's a proper minefield. I'm having a play around with Ubuntu since that's the one I chose to install and it has quite a nice app store equivalent. I like the visual look of it, but it feels less responsive than Windows XP (which is also a dual boot on the same laptop) and I'm amazed at how frequently you need to trawl forums and cut 'n' paste esoteric crap into the command line to do the most basic of things. I thought I knew the command line OK for development purposes, but here's a classic example:
https://help.ubuntu.com/community/SoundTroubleshootingProcedure
My feeling is that it's got a long way to go to be a Windows or OS X killer!
Lol...that's a classic example of why my Ubuntu partition is just sitting there wasting disk space. I found I was spending more time messing about like that trying to get it to work properly rather than using it for anything useful.
@blip Personally I'd be interested in using the sequencer even if the latency wasn't great...
I haven't tried the most recent versions of ubuntu, but this isn't too surprising. Being kindof a technical guy, people are often surprised that my latest computer is a macbook pro. I'm not an apple fan, but the way I see it, it's basically a unix operating system that usually works and is well supported by devs (in terms of apps being ported to it). I don't liked being locked into the software/hardware, but everything has a cost, and at the present stage in my life, my time is more valuable than that freedom/flexibility. That being said, I've been toying with the idea of setting up my own linux computing cluster at some point.
It's a little sad that ubuntu has gotten to the point where it's less responsive than windows. I remember when one of the main arguments in favor was that the rate of bloat of linux distributions was not as bad as the commercial ones. Maybe Debian's doing a better job?
I've also thought about tuning one of my older laptops for a distribution that works well for low-latency audio, but never got around to deciding which distribution that would be. I know of a couple (dyne bolic, pure dyne, ...) and they all seem to have strong proponents, but haven't found a reliable, up-to-date comparison of the pros and cons of each distribution for audio.
> @blip Personally I'd be interested in using the sequencer even if the latency wasn't great...
The trouble is that if I did release NanoStudio in its current form on Android then I think it would get too much negative feedback about its responsiveness. I feel that a lot of people would feel conned into paying good money for something that's not fit for purpose. One possibility would be a new app using the guts of NanoStudio but with more of an emphasis on step sequencing. I don't really have the resource to develop, support and test two different apps and the iOS version would definitely suffer. For now, it's at least good to know that I've got stuff which will run on Android - keeps options open at least!
I know what you mean about being a technical guy, I'm the same but don't have the time or patience to fiddle with all this stuff anymore. An OS should be turnkey and enable you to do the real things you want to be getting on with!
Logcat: android, why must your tools suck!
Congrats on getting it to go Matt.
Have you used it then? Logcat's my new best mate compared to NDK debugging!
Yes. I hated logcat and the entire dev environment with the white hot passion of a thousand burning suns. Why am I shelling into a VM to get things working? Kill me now.
Did you get it working on an actual phone or the emulator? Which version? Honestly, hello world seems like an achievement to me so getting nanostudio to run at all seems like a Smiths reunion.
For the record, Morrisey wins best line ever with his reply to this question: "What are the chances of a Smiths reunion?" Moz: "I'd rather eat my own balls."
Has someone succeeded in running a music-making app on an Android tablet VM ?
I've already spent 2 hours to get 1 1/2 instances running (1 on Parallels, 1/2 on Virtualbox) and was wondering if it was worth trying.
@syrupcore, Moz added : "and that's saying something for a vegetarian"
"I'm amazed at how frequently you need to trawl forums and cut 'n' paste esoteric crap into the command line to do the most basic of things."
I know, I have an old EEEPC netbook, the first one with a 2 gig SSD hard drive...LOL, and I put eeexubuntu onto it. I was also amazed at how complicated everything was. I even had to use the command line to delete stuff from the SD card!! The permissions are a nightmare...
In comparrison XP is a breeze!!
I have tried to run Nanostudio (Windows) on it before with wine, but it did not work...
Hi Matt, I've been lurking on these forums for a while but this thread has drawn me in :-)
I've written a lot of code for Linux systems over the years, some of it real-time and some of that for audio. One can build a Linux system that works very well for audio (production) purposes with low latency and good real-time performance but it's not always easy and mainstream distros don't cater to it very well yet.
Coming from an Apple background you won't find a single set of APIs in Linux, instead as you've discovered you'll find several. I think to understand the philosophical differences between BSD and Linux based systems, a good place to starts is Eric S Raymond's paper "The Cathedral and the Bazaar". The Linux world is huge and it's not a tidy place a real-time developer (nor is Android from what I've seen) but it can be done. I presume you've had a look at Alexander Zolotov's SunVox? He uses a tracker approach to composition which mitigates the latency issue on his (very recent) Android port and while his UI is radically different to yours the SunVox UI experience is almost identical on my iPad, iPod, Nexus One, Acer (Android) tablet, several Debian boxs and a MacBook Air. He's apparently taken the SDL approach for cross-platform compatibility and I'm guessing you've done something similar. OpenGL?
I suspect your biggest problem with Linux is going to be fragmentation. While you may be able to get NS to run brilliantly in a custom Linux setup you may find that getting it to work on a stock mainstream distro problematic (from a customer support perspective). On the other hand the Linux crowd are in my experience quite accommodating.
PS: @Johnser, Matt evidently followed the Windows API rules when writing NanoSync because it works just fine in WINE on my Debian system. I've not tried NS but might be worth a go too :-) That he chose to use OGG as well was a great move.
PPS: @Blip I'd be very interested in an Android and Linux port of NS even if it was a "different app" using step sequencing instead of the real-time keyboard and piano roll.
For my Android experiments I got it running in the emulator. Obviously this isn't the same thing as the device (as anyone who's used it will know!) but it does successfully prove out most the building/API issues. As you say, the emulator's a VM which actually runs arm code and translates it to x86 so it runs like a sloth on ketamine. There are some hacks around to get it to run x86 code but I was more interested in proving the concept than making it useable. I started by targetting Android 4.0 but it seems that the 4.0 image does software rendering (making it even slower) so I dropped back to 2.3 Gingerbread which still has the OpenSL audio API I needed. This meant that I couldn't build for ARMv7 (the one with the parallel NEON instructions) but still it still seems to run faster overall, and I suspect that emulating NEON could be even slower than emulating non-parallel instructions. I was half thinking about buying a proper device to try it on but I've already got an iPad (so my personal tablet needs are met), there are probably going to be loads more devices coming out in 2012 (so it'll be quickly obsolescent) and of course there's the latency (making it crap).
Porting NanoStudio to different platforms isn't as bad as it could be because it's really a big blob of C++ using OpenGL 1.1, which is pretty well a common denominator on nearly every common system out there (you could even say it's more cross-platform than Java in this respect). The main work is in figuring out a new environment/build system - after that it's a case of writing the code to open up a window, get mouse input, send audio output and obtain access to a file system (the latter often having similar standard C or Linux functions on a lot of the platforms). On Android I took the shortcut of using the sd card for the file system, because it does some funny things with packaging the app's standard assets that I didn't want to get into.
There are still loads of loose ends to make it production ready, such as in-app help, handling orientation changes, MIDI (where applicable etc.)
With regards to Linux, I managed to get a test app to output a filthy sawtooth using Jack last night. The Jack API is the nicest audio API I've used so far I reckon, the real problem was figuring out what I was meant to be doing!
Whoa, C++/OpenGL from the ground up relying on low level mouse, audio and file I/O only. That must have taken a while to code up but I guess now you've got a very portable source package. Sweet. Apropos Jack, yes it's the best of breed in the world of Linux (in fact, probably anywhere) but as with many things in Linux, the challenge is working out how it's meant to be used :-)
@Iasuac: Wow! It took 5 minutes at the most. Install wine, reboot, install Nanosync, reboot; voila! Never would have guessed it could be so easy. Thank you.
Yes, NanoStudio seems to work well under Wine. It's proper Voodoo magic!
NanoSync has a couple of problems - the 'Connect' button doesn't have a label, and drags from the app to an Explorer window (Nautilus, whatever) don't work (not suprising, this uses a Windows shell extension). You can use the 'Get from Device' button to do the same operation though, it's just a bit more clunky.
There you go then, no need to port to Linux ;-)
Indeed. I think my cross platform curiosity cravings are satified now anyway so time to get on with some real work. There's always Windows 8 for tablets this year, and there's a rumour that Microsoft have finally seen the light of reason and will be allowing native code on the phones too ...
regarding music apps on linux - until now no real competitor for big profi DAWs on Win/OSX was not available on linux ..
but now, one is comming... from frormer ableton developers, BITWIG studio will run on linux !
http://www.bitwig.com/bitwig_studio.php
Looks nice. An app like that would use Jack for audio I assume?
most probably yes... no linux speciffic info on their site... well' see when it will be released...

^ NanoStudio Android subtly mentioned above (for those who stopped reading at the word Linux!)