Chipdisco on Raspberry Pi - Amiga MOD playback in Java (by bdse)
Long story short: PortaMod is my Amiga MOD (and PC FastTracker XM and ScreamTracker S3M) replayer library for Processing. Chipdisco is a dual-deck DJ app built with PortaMod. Processing is Java made simple and fun (if you can believe that Java could be made fun) and it’s great for interactive digital art. Its focus is very much on visuals, however, and there’s no way of getting it to run without wasting a lot of CPU cycles on graphics - even if you don’t want graphics.
I just got a Raspberry Pi. Woohoo, etc. Cute little thing, and I’d love to be able to use it as a headless Chipdisco DJ box that can be run without a monitor, and just with a MIDI controller for controlling Chipdisco’s myriad interactive functions (crossfader, tempo, pitch, sync, channel-faders, channel-mutes, etc.)
Problem is, asking a wee 700Mhz machine to run a Java virtual machine at any decent lick is a bit much. openJDK, the default open source JVM implementation, is really slow - much slower than Oracle’s embedded VMs (apparently) and it doesn’t use RasPi’s floating point hardware, instead doing it in software. That’s quite a big deal, but it seems like people are interested in getting Java up to some kind of usable speed on RasPi - not least because, although everyone claims to hate Java (me included), there’s a lot to be said for having code that’ll run on x86 Windows, OSX and Linux *and* ARM platforms without it needing to be tweaked.
So. This video shows a proof of concept: a command-line mod player in Java using a version of PortaMod that I made last night - basically removed all the Processing so it’s pure Java and doesn’t require that inefficient graphics loop to be run. Anyway, for reasons that are probably quite good, Processing just *will not* run headless and there are no plans to change that. This PortaMod version is still quite inefficient as it does a load of note-processing stuff on each row of playback (great for interactive stuff like syncing visual effects to individual drum hits, or whatever) so I’ll try commenting out those bits to see how smooth I can get this on RasPi.
- echolevel posted this