Wav's running a bit too slow / out of tune

H
HansEhv posted Nov 19, 00:13:

Hello Joseph and others,
Thanks for these mighty inspiring ideas !

I’m currently working on an implementation to trigger special samples for use in our own band (trigger simple and short fills prepared in advance by ourselves).

However: the samples are running a few notes low (and slow) compared to the original wav’s.
I can get it somewhat right by sending notes about 4 or 5 above the midi number in the filename, but that seems a clumsy workaround to me.

In the samplerbox.py I see “SPEED = numpy.power(2, numpy.arange(0.0, 84.0)/12).astype(numpy.float32)”.
Is that the basis of the speed I need and if so: what is this based on / how should I adapt this to get a proper mapping of the timing towards the hardware.

I’m testing on a B+ model via the internal audio with "standard" 2 channnel 44100 Hz WAV's.
Does the hardware indeed have a relation the parameters above?

Thanks in advance!

H
HansEhv posted Dec 17, 23:36:

Changing to Pi-2 gave same result.
The problem disappeared when using an external soundcard on this Pi-2.
Since that was the objective anyway I've stopped investigation.

...

  (not published)
  I want to post as guest
 

Post