[Audacity-nyquist] One problem with the attached plug-in
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: David R. S. <dav...@sh...> - 2005-12-10 10:15:59
|
Hi, I have one problem with the attached plug-in I've been working on for some time, Audio Chunker. it breaks an audio selection into user-defined number of equal duration chunks, and moves those chunks in time. Think of the beginning of each of those chunks as being on a virtual spring, which can be extended so the chunks are separated from each other by a duration of 1 chunk (shift time is 100%); lined up one after the other like the original selection (0%); all starting at the same time, overlapping (-100%), and so on down to -300%, at which point the last chunk from the original selection is now the first chunk, with all chunks separated from each other by 1 chunk duration of silence. Integer values from -300 to +100%, inclusive. The problem is that when shift values become negative, there is silence appended to the end of chunk audio. for instance, with a 4- second sound broken into 4 chunks and a -200% shift, the resulting audio is not only 4 seconds of audio, but 7 seconds: four chunks of 1 second duration, with 3 seconds unwanted silence appended after that. I've tried several things, including applying an extract-abs function to the result (which I have commented out), but that doesn't work either (with several equations to calculate the resulting end or cutoff time). Besides which, I think if I need to do that, I've done something inaccurate inside the make-chunk function. apart from the appended silence problem with negative shift values, the audio chunks results are fine. The code may look messy: while I'm writing code, I mark closing parentheses so it's much easier for me to fix code, after which I clean it up. Thanks David |