GWBasic / index_signal

Allows looking up interpolated points within a signal, allows indexing a signal by floating point
Apache License 2.0
0 stars 0 forks source link

Support interpolation when the playback speed is faster than the source speed #14

Open GWBasic opened 1 week ago

GWBasic commented 1 week ago

A current limitation of index_signal is aliasing when the playback speed is faster than the source speed.

For example, if the source is sampled at 44100, but the playback speed is 2x and the playback sampling rate is still 44100, all frequencies above 11050hz will create aliasing.

In this ticket: Introduce a new variant of Interpolator.get_interpolated_sample that includes the playback sampling rate ratio as an argument. It should be smart enough to filter out frequencies that will cause aliasing.

GWBasic commented 1 day ago

Wrote the first pass at the filter. Now this needs unit tests. Not sure if the filter works correctly.