Drum machine

Alex posted Mar 12, 14:11:

I'd like to trigger files and let them play till end of file. Can I just edit the samplerbox.py and delete the NoteOff cycle, save it and reboot or i have to complile it on the machine? (I'm new to linux / python / pi).

adeser posted Mar 13, 19:28:

Now I'm not so new to all this matter as I was yesterday.
Now I have the PI and 0.1 % of knowledge in python and linux.
I wrote the SamplerBox image file to a SD card and powered up the Raspberry with an USB midi keyboard, an USB containing 0 GrandPiano folder only and an USB PC keyboard. Also a HDM monitor.
in the command line type (at some point you're asked the password and user (root root):
cd SamplerBox
-now you should see the samplerbox.py file listed among others in the SamplerBox folder (case sensitive)
nano samplerbox.py

  • nanp is an command line text editor
    -modify the # AUDIO AND MIDI CALLBACKS # Note off section as follows:
    if sustain:
    -save the file using F3

You can also edit the frames_per_buffer from the huge 512 to 64 (for lower latency) but also you have to lower the polyphony to 24 or lower. This is normal for drum samples.
I don't know if it matters, but first of all I followed the #13 step in FAQ (<code>mount -o remount,rw /</code>)

I want to thank this wonderful man, Joseph for creating this wonderful box witch got me into Raspberry and python. Not to mention a great instrument to use in a sunday "no laptop" jam !


  (not published)
  I want to post as guest