I needed some fixes in src/strauss/generator.py to get it to run for me - I wonder if this was a scipy version issue?
Testing this also demonstrated that we could have a mismatch between the Generator and overall Sonification sample rates - I've added a fix to this that makes the Sonification object use the Generator sample rate in the case of mismatch (complete with warning for user)
I also noticed I was getting warnings from scipy.io.wavfile on reading the samples, this seems to be to do with metadata that is irrelevant anyway. I've supressed this warning.
I've put a notebook in new test/pre-merge directory. This shows how in the new branch two examples with differing sample rates sound the same. If you run this on current main, these sound different due to lack of correction implemented by @SamYoules:
test/pre-merge/sampler_samprate_test.ipynb
I'm planning to use this test/pre-merge directory to put tests for merges in general, that we can clear away when merged. I'm looking into automated ways of doing this using either GitHub actions or git hooks.
Suggestions on the
sample-rate
branchFixed functionality looks good! π
I needed some fixes in
src/strauss/generator.py
to get it to run for me - I wonder if this was a scipy version issue?Testing this also demonstrated that we could have a mismatch between the
Generator
and overallSonification
sample rates - I've added a fix to this that makes theSonification
object use theGenerator
sample rate in the case of mismatch (complete with warning for user)I also noticed I was getting warnings from
scipy.io.wavfile
on reading the samples, this seems to be to do with metadata that is irrelevant anyway. I've supressed this warning.I've put a notebook in new
test/pre-merge
directory. This shows how in the new branch two examples with differing sample rates sound the same. If you run this on currentmain
, these sound different due to lack of correction implemented by @SamYoules:test/pre-merge/sampler_samprate_test.ipynb
I'm planning to use this
test/pre-merge
directory to put tests for merges in general, that we can clear away when merged. I'm looking into automated ways of doing this using either GitHub actions or git hooks.