My Sampler Box2 Issue

Salim Kara posted Jun 16, 23:38:

hi there...

Finally I finished it.

Let me first to explain the process steps

1) I use raspberrypi3 & USB DAC PCM2704 Module.
2) I installed the samplebox image.
3) I added the source address. Source.list 'deb jessie main '
4) I installed files. (Apt-get install python-decorator, apt-get install python-SciPy)
5) file I modified as follows.

LINE 17 : SAMPLES_DIR = "/media/" #for usb root samples
LINE 20 : USE_BUTTONS = True # i want use buttons
LINE 26 : CHANNELS = 2 #(FOR PCM2704 Module)
LINE 193 : def init(self, pin_rs=7, pin_e=8, pins_db=[27, 17, 18, 4]): #for my circuit
LINE 1070: GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP)
LINE 1071: GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_UP)
LINE 1075: if not GPIO.input(13) and (now - lastbuttontime) > 0.2:
LINE 1082: elif not GPIO.input(5) and (now - lastbuttontime) > 0.2:

6) And finish...

But I have some problems.

1) it works only once after the initial installation. and close / open when no sound. Meanwhile, 16x2 LCD display is operating normally. (Sounds like the name of the show ...)
2) Button (+) and Button (-) works, but the function button does not work. I could not find the Function Button feature file.
3) That's why I can not enter settings such as reverb.

I'm sorry my english is a little bad.

My circuit :

few pictures:

Test Video :

HansEhv posted Jun 18, 12:00:

Hello Salim,
Extra button functions are not included in this implementation, these belong to Alternative/extended implementation.
So they are not needed for entering settings such as reverb here.
But you are free to use the button idea in your own box. FYI: In near future I will publish a next version for the above with (amongst others) a changed approach to volume control.
As for freeverb, I cannot help you further as I did not implement that on my box and thus have very limited knowledge on that.

salim posted Jun 21, 12:45:

thank you mr. Hans

Erik posted Jun 21, 12:59:

Nice that you use my!
Don't use ctrl-C to stop the process. This doen't work for some reason (probably because I use some threads).

run as:

Python &
to stop use:
kill <process number of python>

This keeps the audio-interface working.

I never tested the button function. I control my freeverb via Midi CC

salim posted Jun 25, 11:29:

Thank you for your help.
I solved the problem.

My problem: MIDI_CHANNEL = 16 (16 midi input :)) MIDI_CHANNEL = 1
As you change the problem is solved.

salim posted Jun 25, 11:32:

What can I do to use the pitch bend control?


  (not published)
  I want to post as guest