pantherb / setBfree

DSP tonewheel organ
http://setbfree.org
GNU General Public License v2.0
194 stars 35 forks source link

assert on sample rates higher than 48k(66953.846784 to be precise) #22

Closed a13 closed 11 years ago

a13 commented 11 years ago

Step to reproduce:

$ setBfree

init.. Audio : Scanner : Oscillators : setBfree: tonegen.c:1791: fitWave: Assertion `minWaves <= maxWaves' failed

that's because Hz * maxSamples(hardcoded to 2048), which is 66954hz for a lowest note, less than jackd samplerate.

I tried to increase maxSamples value to 4096 (tonegen.c:2031) and it seems to work well, but i think it's not the best solution, maybe we should calculate it according to current sample rate?

pantherb commented 11 years ago

Yeah you're right; this is the most important thing I'm looking at for changing some of the code in the internals of the tonewheel code. As many of the internal calculations were hardcoded from the code we got from Beatrix, it's a big part of the re-write I'm trying to figure out, as it involves many factors/decisions that we need to make before leaping.

I'll document this in the docs I'm about to release, and leave a note here when that's up.