I’m interested in developing a feature in Audacity to help me accomplish a certain goal, but am unsure which approach would be best.
I have a series of input audio files. The goal is to develop the software to speed up or slow down certain parts of the audio file to very specific guidelines, i.e. to match the length of each beat of the input wav file to the length of each beat provided by a template track (for instance a series of spikes, each one corresponding to the downbeat). The goal is to allow me to “reconduct” a piece of music by providing a series of taps corresponding to downbeats different from the original timing of the downbeats. I know there are good time scaling plugins available for Audacity, and I don’t want to redo any work, but when I think about getting the software to perform this goal, I think that I’ll end up using time scaling on each beat of each measure…and doing that manually for each individual beat would take much too long. I would like to automate the process somewhat but am unsure which approach is best…whether I’d have to make changes to the Audacity source code itself or whether trying to develop a plugin would be sufficient.
My thought about the easiest way to do this (not necessarily the most automated) would be to go through each original input audio track…listening to it and recording alongside it a track that just has a series of “blips,” one wherever there’s a downbeat. This could be done just by listening to the audio track externally and wherever there’s a downbeat, hit some key on the keyboard which makes a sound on the desktop and records via “stereo mix” as a blip in Audacity. From this additional input track to Audacity, there is a map provided corresponding to wherever there’s a beat in the original sound file.
To rescale the original audio sound file to a new series of “conducting” beats, provided by another audio track with the same format of blips, it seems only necessary to use some peak finder function for each audio file, then use time scaling (via plugin like “Sliding Time Scale/Pitch Shift”) on each segment between blips in order to make the distance between peaks on the original file match the distance between peaks on the template with the new series of blips corresponding to desired beats. I imagine there will be some “for loop” somewhere to accomplish this task, which is the main one that saves me a bunch of time in processing a bunch of audio files…manually going through and rescaling each beat precisely to a template would take forever.
So essentially the input and output I want as a result of this would be
Input: 3 audio tracks in Audacity
- Original wav file imported as track 1
- Track 2 - series of blips corresponding to the downbeats of track 1
- Track 3 - series of blips corresponding to the desired downbeats (new conducting pattern)
A new track 1 representing a “reconducted,” rescaled version of the original Track 1 with time scaling such that the downbeats of track1 have been scaled to go from the pattern in track 2 to the pattern in track 3. This involves speeding up some parts and slowing down others.
Does anyone have any advice? I haven’t developed for Audacity before and would like to accomplish this project in the most efficient way I can…if modifying the source code is necessary or is faster I will do that, but if a plugin approach is better/faster I will do that. If anybody has more specific advice as to what I would need to change or where to implement certain things, that would also be helpful.