james-trayford / strauss

Sonification Tools and Resources for Analysis Using Sound Synthesis
Apache License 2.0
33 stars 4 forks source link

Check and correct for sample-rate mismatches when loading the `Sampler` #7

Closed james-trayford closed 1 year ago

james-trayford commented 1 year ago

https://github.com/james-trayford/strauss/blob/82620a57723121233830f079dcc76ee43349fa00/src/strauss/generator.py#L560-L583

Should update to:

This will avoid spurious playback speed changes.

Could also consider migrating to scipy WAV reading for consistency with default write routine.

SamYoules commented 1 year ago

Set up sample-rate branch to address this.

SamYoules commented 1 year ago

I've made these changes to generator.py and utilities.py, but they are not fully tested yet. When you are back next week, it would be really useful to talk about the best way to handle testing.