Some things I learned and my take to modifications (from my head, perhaps I miss some capitals):
First of all: the login is
Open read/write access:
Mount -o remount,rw /
Change the startup Script:
Add some delay and startup from USB disk for development and testing and perhaps for always
Make the file look like:
On the USB stick add your samples and the samplerbox files (samplerbox_audio.so)
After this, you can login as root from ssh or local and modify the setting in samplerbox.py
After logging in, you have to kill the python process first for testing:
wait 3 seconds
notify the process number from python (the top one most probably)
kill the python process
Now you can test/debug your modifications:
And start again with Nano
Now you can just back-up your USB stick, even make modifications from another computer without ever changing the file system to read/write.
A hard-boot will start the samplerbox from the USB stick.
Works great in my situation. Hope this helps some-one else.
I'll make a release of my modifications soon, they include:
RPI3 support (done)
Accurate velocity (done)
in the original python script the sample is always played a the default velocity (if a sample is played in a velocity range it is always played that the maximum level, now the level is according the actual played velocity). I assume all samples are nomalized.
Shift samples. (done)
Added a parameter that can be used to shift the played samples in the multiple velocities, while maintaining the velocity level. Suppose there are 4 levels of velocity in a piano, adding this value to 64 (50%), the top 2 samples are played over the full velocity of 127 levels. As the top samples are typically more bright, this make the sound much brighter. For a piano this works great to make it more brighter but keeping it dynamic. Lowering will make it more authentic (ballads, solo) while increasing will make it more suitible for a band context.
Added Freeverb (done)
Full implementation of freeverb is working, All parameters can be freely assigned to midi CC. I'm pretty critical to reverb, but I'm astound by the quality of the verb. Very useful!!! Full floating implementation, hardly any grain in the tail. nice one!
Only adds a few percent of extra CPU load.
Added 2x2 channel playback of backing tracks (done)
Using a 4 channel Audio interface, I can play a stereo backingtrack and a stereo clicktrack together with the sample. In the python code it is easy to use any midi parameter for selecting the backingtrack and any midi parameter to start/stop the backing track.
I use a Maya 44 USB+ fro this now and for some reason the 44.1 KHz frequency is not stable (some clicks), after changing all samples to 48KHz it is super stable
- Limited the polyphony for sustain pedal actions.
In the original code the notes where added for every note press of the same key when the sustain pedal is pressed, this creates too many notes.
I'm finalizing now and make the option for selecting 2 channel playback and 4 channel a configuration item, I want to optimize the audio code to full C++ instead of cython and move some other stuff from python to C++. Freeverb is done in C++, so i got the interface working. Also want to disable Freeverb when the wetlevel is 0.
On very dense actions, I now need to limit the polyphony to 40, otherwise I get some ticks.
Hope those optimizations will help to increase it.
Even with the 40 notes of polyphony, my piano sounds great. The best piano I ever heard from a module.
I sampled my Yamaha CVP609 CFX piano on 6 levels every 3th key at 48KHz. Really nice result.
Once I have everything cleaned up I'll release my version.