Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe a rounding error? #137

Open
StuartIanNaylor opened this issue Mar 26, 2021 · 0 comments
Open

Maybe a rounding error? #137

StuartIanNaylor opened this issue Mar 26, 2021 · 0 comments

Comments

@StuartIanNaylor
Copy link

The main transformer snippet of my code is

  t  pad = (1 - duration)
  startpad = abs(pad * pad_offset) / 2
  endpad = 1 
  tfm1.pitch(pitch_offset)     
  tfm1.tempo(tempo_offset, 's')
  tfm1.pad(startpad, endpad)
  tfm1.trim(0, 1)
  tfm1.build_file('temp.wav', filename + '-av-' + str(x) + '.wav')

The main thing is the last tfm1.trim(0, 1) as the output from soxi -D

0.999938
pangram1029-av-17.wav
0.999938
pangram1029-av-18.wav
1.000000
pangram1029-av-19.wav
0.999938
pangram1029-av-1.wav
0.999938
pangram1029-av-20.wav
0.999938
pangram1029-av-2.wav
1.000000

Why does that final trim sometimes (not always) and how does soxi -D get a fraction of the sample rate 15999.008 samples = 0.999938 sec @ 16kSR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant