josephernest / SamplerBox

SamplerBox is a sampler musical instrument based on RaspberryPi.
https://www.samplerbox.org
430 stars 97 forks source link

Is velocity information ignored? #65

Closed dosas closed 6 months ago

dosas commented 6 months ago

I am sending midi messages with different velocity information to the SamplerBox but the volume is always the same.

Looking at this initialized but unused var self.velocity: Is the velocity information ignored or is this a bug?

josephernest commented 6 months ago

Hi, Velocity information in the MIDI message is used to launch different samples (see for example the Salamander piano sample set's definition.txt) rather than modulating the volume, so this is not a bug.

https://github.com/josephernest/SamplerBox/blob/master/samplerbox.py#L110 to L112 is for keeping all variables from init in the object itself, no matter if it is used or not - it may be useful later.