Follow yanone on Twitter


Processing-based software sampler

Here’s my first little Processing application.
I was abroad in Amman, Jordan, and getting ready for a DJ gig in a small club. I had loved to have my little Yamaha SU-10 Sampler unit with me where I would just press buttons to play back certain sound effects like laser guns during the DJ set. But since I had left all my equipment at home, and seriously couldn’t find any other Mac application that could do that simple job, I cooked up this plain and simple solution within two hours the other night, that I could use with my notebook on stage.
There’s no user interface, only a small 100 by 100 pixel window. And as far as I’m concerned, there’s no need for one. The interface are the buttons on your computer’s keyboard. You press them to play back sounds.

I implemented the three different playback modes that I remembered:

Trigger plays back the whole sample on every pressing of a key, starting over immediately if the key is released and pressed again.
Hold plays back the sample over and over as long as you press a key, stopping when you release it.
Holdonce plays back the sample only once, if you press the key for longer, or stops when you release it.

There’s also no UI for assigning samples to keys. It’s all done in the code.
That is all.


  • Get Processing. It’s a very cool, free scriptable multimedia engine, available for all platforms.
  • Yanona SU-10 uses the Sonia Sound Library for audio playback. Get it here and put it into your user’s Processing folder.
  • Download Yanona SU-10 here, extract the folder and put it whereever you want. There’s an example AIFF file in the data folder and the code contains three assigned keys (a, s and d) with the three playback modes, respectively. Run it without changes to hear what it does.

Using it

  • Put your sample files as AIFF or WAV into the data-subfolder of the Yanona SU-10 folder. Or elsewhere, but then point to the full path in the code.
  • Assign the files to the keys on your keyboard in the setup() function and choose a playback mode and volume (in percent, maximum is 700%). Be careful with too high volume to avoid ugly clipping when multiple samples are played at once.
  • Run the app. Menu »Sketch«/»Run« for window mode or »Present« for full screen mode.
  • Press keys, listen.
Copyright 2015 by Yanone. Impressum