Akai MPC program editor in Java

I juste wanted to automate the creation of programs for my Akai MPC500 sampler/groove machine, for my personal needs, and I ended up releasing a piece of software to sourceforge. It is called MPC Maid, read “assistant of the MPC”, here is a screenshot of the program editor:

MPC Maid program editor view
MPC Maid program editor view

The MPC file format was freely available on the website of Stephen Norum, very well documented. However my day job is to design and code big financial server-side systems, hence coding at the byte-level was refreshing…

Chop loop into slices

I had been playing around with audio/Music Information Retrieval (MIR) recently for fun, so I took the opportunity to integrate some of that, in the form of a really simple loop slicer.

Audio Slice Editor view
Audio Slice Editor view

You just drag and drop a WAV file from the file explorer into its waveform editor, then it analyzes the audio samples to detects the beats. There is a slider to adjust the sensitivity of the detection, which means this is not a totally automatic algorithm.

The idea for the detection comes from the article “Beat Detection Algorithms” from Frédéric Patin, with some personal modifications. In particular I have added a toggle to prevent a detection immediately after another, and a zero-cross detection to cut the slices on a zero-crossing, in order to reduce the glitches (but of course this is not enough to be perfect, fortunately the MPC has a convenient small decay at the very end of every sample, which solves the problem).

The idea is to compute the energy in sliding time-domain windows,then compare the energy of each window against the average in the surrounding; when it exceeds it enough, there is a beat.

Since many loops available are commercial quality, their length gives the tempo with an extreme accuracy. I used that to generate a MIDI file of the groove of the loop. Coupled with the program edition this allows for exporting the slices, the MPC program that uses them, and the MIDI sequence of their placements, in other words this is roughly equivalent to the REX file idea.

Native-looking but fully portable

Making sure that the software is fully portable and looks native in Mac OS X and in Windows requires careful attention, especially on the Mac side, where the menu is on top of the screen, not the window, the shortcuts are different, and even worst, the menu do not follow the same conventions! For instance the “About” menu is in the Application special menu, not in the Help menu as on Windows. To achieve that in Java requires the Apple OSXAdapter to call by reflection an API that will not be available on non Mac platforms!

Again I hardly do any user interface usually at work, so this little project was overal a good experience to me, and now the users have begun to play with it it is soon to become even more interesting!

Update: here is a video of how to chop a loop almost automatically into slices, then how to play it back at a different tempo on the MPC:


Software development, Domain-Driven Design, patterns and agile principles enthusiast

8 thoughts on “Akai MPC program editor in Java

  1. I love using this, but would there be a way in slice to add a marker by hitting something like forward or back slash??? I’m not getting all the slice points i’d like to have for a loop and this would be awsome to have.

  2. Thanks for your feedback and proposal. That’s a good idea that should not be very difficult to add. I have no plan yet for a new version but this is the kind of enhancement that could call for a new release indeed… Cheers

  3. The BPM detection seem to be off when importing non commercial loops, could this be due to the toggle used to prevent a detection immediately after another or am I doing something wrong?

    I have a couple other questions can you email me?

    Thank you

  4. Actually there is no BPM detection, the indicative BPM (required to export the MIDI file to trigger each slice) is only deduced from the length of the loop, which is usually perfect for commercial loops (you got it right).

  5. I get it now, Thank you :) I look forward to any enhancements, as this is the best thing ever for the MPC… Cheers!

  6. How’s it going, have you had the opportunity to fiddle with the program to allow for manual slices to be made? I really enjoy using this, and look forward to the day when you have the time to update.
    Thank you for a creating a wonderful tool.

  7. I’ve just added the feature to allow for manual slice: the ENTER key inserts a new slice close to the currently selected slice, which you can then move as usual. The jar is not yet available for download but will be soon. Stay tuned and thanks for the support and feedback!

Comments are closed.