octareenroon91 / analog-box

Automatically exported from code.google.com/p/analog-box
0 stars 0 forks source link

How about multiple sample rates and interpolation? #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently the whole thing is set for 44100hz sampling. I'd like to be able to 
change this to other values such as 8000, 11025, 48000, 192000, etc. Otherwise 
I find when processing a 11025 WAV file in ABOX that it upsamples the wav file 
by data-point duplication. This for example, makes a sawtooth wave look like a 
staircase instead, and it also sounds horrible.

This could be fixed by the suggested alternate sampling rates. It could also be 
fixed by using linear interpolation instead of data-point duplication. Also 
there should be 2 sample rates used and 2 uses of interpolation.

For wave loading
WAVfile ---> interpolated into program's working sample rate

For wave output
Internal sound data ---> interpolated into output WAV file

Now obviously if the sample rates all matched that's good, and allowing for 
setting for separates sample rates would aleaviate this. But in the event that 
your inputfile, internal processing, and outputfile sample rates don't match, 
linear interpolation should be used. Of course one should be allowed to select 
interpolation method, whether the program will use data duplication or linear 
interpolation. Also since there will likely be one interpolation upon WAV file 
input, and once again upon WAV file output. Thus there should be 2 menu 
selections for interpolation "which interpolation should be used for input?" 
and "which interpolation should be used for output?".

Also the internal processing sample rate should be one menu item, and the 
output-to-wavfile sample rate should be a separate menu item.

Original issue reported on code.google.com by Benh...@gmail.com on 26 Jul 2011 at 3:25