turn multiple clips to multiple tracks

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Steve Bender
Posts: 152
Joined: Wed Feb 11, 2015 5:59 pm
Operating System: Please select

turn multiple clips to multiple tracks

Post by Steve Bender » Thu Feb 12, 2015 7:15 pm

I’ve been trying to read the manual to figure out how to do this, but I’m finding it confusing. Let me tell you what I’m trying to accomplish, and hopefully someone can tell me the most elegant way to go about it.

I can use a softsynth plugin to output different notes of a synthesizer. I’ll often use this to generate the notes of a chord which I’ll then arrange in Audacity into complex arpeggiations. The output file is a single wav file, and if I put the notes far enough apart, there will be absolute silence between notes. So I think I should be able to use the “Detach at Silences” tool to bust up this long wav into individual notes (C, D#, G etc). Ultimately, I would like to be able to have each of these notes/clips have a label added to it. What is the best way to do that automatically?

Once I have labels added to each individual note, I would go into “Edit all labels” and add the note names. From there (and this is where I’m getting stuck) I would like to take all of those clips and turn them into individual tracks. From there I would want to “Export Multiple” all of these individual tracks/notes (all of them accurately named) to a subfolder.

Related question – what is the naming convention when you use “Export Multiple?” Will all the tracks keep their individual track names? Or does it append added date/time info to the file names? If it does, is there a way to turn that off so that I can keep JUST the original track name?

Much thanks in advance for any guidance you can give me. If I can figure out a nice, smooth, fast process to accomplish this task, it will be a HUGE boon to my overall productivity in music-making.

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: turn multiple clips to multiple tracks

Post by Robert J. H. » Fri Feb 13, 2015 7:21 am

Unfortunately, your request is a bit to early...
It can't be done yet.
However, if you use a current alpha build (or wait three weeks for 2.1.0), then the task is fairly easy.

The following code snippet will label the clips in the track, starting with the track name and a unique number.

Code: Select all

(setf *integer-format* "000%ld")
(psetq label-text (get '*track* 'name)
       counter -1) 
(mapcar 
  #'(lambda (clip) 
     (append clip (list (format nil "~a ~a" label-text (incf counter))))) 
  (get '*track* 'clips))
Again, it works only with 2.1.0 (alpha) and if the (new) check box in the nyquist prompt is not set.

Export multiple works with labels alone, the audio has not to be re-arranged in separate tracks.

Steve Bender
Posts: 152
Joined: Wed Feb 11, 2015 5:59 pm
Operating System: Please select

Re: turn multiple clips to multiple tracks

Post by Steve Bender » Fri Feb 13, 2015 3:18 pm

Robert J. H. wrote: Unfortunately, your request is a bit to early
That’s fine, waiting a few weeks is no big deal.
Robert J. H. wrote: The following code snippet will label the clips in the track
When you say “the track” do you mean a single track that is separated into clips, with silence between? Is that how it works?

Alternatively, I just realized that Audacity already has an option to import labels. That’s even better! If I use this feature to “tell” Audacity where to create track breaks, and how to label them, will it them output them as individual tracks, labeled how I want, if I do “Export Multiple?” That would actually be ideal!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: turn multiple clips to multiple tracks

Post by Gale Andrews » Fri Feb 13, 2015 4:20 pm

Steve Bender wrote:I can use a softsynth plugin to output different notes of a synthesizer. I’ll often use this to generate the notes of a chord which I’ll then arrange in Audacity into complex arpeggiations. The output file is a single wav file, and if I put the notes far enough apart, there will be absolute silence between notes. So I think I should be able to use the “Detach at Silences” tool to bust up this long wav into individual notes (C, D#, G etc). Ultimately, I would like to be able to have each of these notes/clips have a label added to it. What is the best way to do that automatically?
Are these clips in one Audacity track? If so I'm not sure why you can't use Analyze > Sound Finder... now. You'll get region labels 1, 2, 3... instead of region labels <name of the Audacity track> 0000, <name of the Audacity track> 0001, <name of the Audacity track> 0002 ... with Robert's Nyquist Prompt code.
Steve Bender wrote:Once I have labels added to each individual note, I would go into “Edit all labels” and add the note names. From there (and this is where I’m getting stuck) I would like to take all of those clips and turn them into individual tracks. From there I would want to “Export Multiple” all of these individual tracks/notes (all of them accurately named) to a subfolder.

Related question – what is the naming convention when you use “Export Multiple?” Will all the tracks keep their individual track names? Or does it append added date/time info to the file names? If it does, is there a way to turn that off so that I can keep JUST the original track name?
See Export Multiple in the Manual. It does not append date/time, it uses the label names "as is" by default if you tell it to export by labels. Don't you want to export using the note name you added to the label as the file name?
Robert J.H wrote:Export multiple works with labels alone, the audio has not to be re-arranged in separate tracks.
Just to clarify, Export Multiple can be set to export based on Audacity tracks stacked one above the other, where the exported files take the names of the Audacity tracks.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Steve Bender
Posts: 152
Joined: Wed Feb 11, 2015 5:59 pm
Operating System: Please select

Re: turn multiple clips to multiple tracks

Post by Steve Bender » Fri Feb 13, 2015 5:02 pm

Gale Andrews wrote: Are these clips in one Audacity track? If so I'm not sure why you can't use Analyze > Sound Finder
Yes.

But one thing I realized is that the spaces between notes is not actually absolute silence (it just looks like it is). And I think your Sound Finder suggestion might workj pretty well if I was dealing with a recording. In this case, I think “Import Labels” is my best bet for naming the different clips/notes. I’ll just match up the times in the import labels txt doc with the note onsets using Excel to autocalculate it all. That will be very doable since the synth plugin output wav file will be VERY precisely timed, as it’s being generated by a sequencer that I know has very precise timing.

So I think this is actually the solution to my problem. I just wasn’t aware of these other things when I asked the question. I’ll test it tonight and let you all know how it goes.

Thanks for the help!

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: turn multiple clips to multiple tracks

Post by Robert J. H. » Fri Feb 13, 2015 5:30 pm

Steve Bender wrote:
Robert J. H. wrote: Unfortunately, your request is a bit to early
That’s fine, waiting a few weeks is no big deal.
Robert J. H. wrote: The following code snippet will label the clips in the track
When you say “the track” do you mean a single track that is separated into clips, with silence between? Is that how it works?
Yes, there's ideally one track only.
The code does not rely on silences but the split lines of the clips.
Thus, the clip boundaries can as well be in the middle of a tone.
Detach at silences is certainly a good preliminary step.
If you have more than one track, they have to be arranged in time (i.e. align end to end).

Alternatively, I just realized that Audacity already has an option to import labels. That’s even better! If I use this feature to “tell” Audacity where to create track breaks, and how to label them, will it them output them as individual tracks, labeled how I want, if I do “Export Multiple?” That would actually be ideal!
Where do you'll get those times from?
This seems to me rather cumbersome.

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: turn multiple clips to multiple tracks

Post by Robert J. H. » Fri Feb 13, 2015 5:36 pm

Steve Bender wrote:
Gale Andrews wrote: Are these clips in one Audacity track? If so I'm not sure why you can't use Analyze > Sound Finder
Yes.

But one thing I realized is that the spaces between notes is not actually absolute silence (it just looks like it is). And I think your Sound Finder suggestion might workj pretty well if I was dealing with a recording. In this case, I think “Import Labels” is my best bet for naming the different clips/notes. I’ll just match up the times in the import labels txt doc with the note onsets using Excel to autocalculate it all. That will be very doable since the synth plugin output wav file will be VERY precisely timed, as it’s being generated by a sequencer that I know has very precise timing.

So I think this is actually the solution to my problem. I just wasn’t aware of these other things when I asked the question. I’ll test it tonight and let you all know how it goes.

Thanks for the help!
You can also use the regular interval labels, especially if you're dealing with exactly timed notes.

Steve Bender
Posts: 152
Joined: Wed Feb 11, 2015 5:59 pm
Operating System: Please select

Re: turn multiple clips to multiple tracks

Post by Steve Bender » Fri Feb 13, 2015 7:01 pm

Robert J. H. wrote:You can also use the regular interval labels, especially if you're dealing with exactly timed notes.
That could work in a lot of cases, too. I think it depends on my plans for how I'm going to use the notes/samples. If it's going to be very ad hoc, just a one time affair, I don't really need them to be labeled at all. I just would want a way to get them all busted up into separate tracks at the note onsets - huge time saver. So regular interval labels woudl work well. But if I plan to use them down the line, having them accurately named with the notes would be good, so in those cases I think importing labels(generated in Excel, converted to txt) would be the way to go. Importing labels would also work really well if I was going to make sample sets that would be named to be compatible with sample players like Kontakt.

Thanks for the input.

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: turn multiple clips to multiple tracks

Post by Robert J. H. » Fri Feb 13, 2015 8:05 pm

Steve Bender wrote:
Robert J. H. wrote:You can also use the regular interval labels, especially if you're dealing with exactly timed notes.
That could work in a lot of cases, too. I think it depends on my plans for how I'm going to use the notes/samples. If it's going to be very ad hoc, just a one time affair, I don't really need them to be labeled at all. I just would want a way to get them all busted up into separate tracks at the note onsets - huge time saver. So regular interval labels woudl work well. But if I plan to use them down the line, having them accurately named with the notes would be good, so in those cases I think importing labels(generated in Excel, converted to txt) would be the way to go. Importing labels would also work really well if I was going to make sample sets that would be named to be compatible with sample players like Kontakt.

Thanks for the input.
It's probably easiest to just copy the columns from the excel sheet, without exporting/importing.

You could do the following:

Supposedly, the start time is in column A, the end time (optional) in Column B and the text in column C:
formula d1 could be ="("&A1&" "&B1&" "&ZEICHEN(34)&C1&ZEICHEN(34)&")"
(zeichen would probably be char for English versions)

- Copy the formula down in D.
- copy the column (up to the last entry) and paste it into the nyquist prompt.
You'll now have to add

Code: Select all

'(
at the very beginning and

Code: Select all

)
at the very end
pressing Ok inserts the new label track.

Steve Bender
Posts: 152
Joined: Wed Feb 11, 2015 5:59 pm
Operating System: Please select

Re: turn multiple clips to multiple tracks

Post by Steve Bender » Fri Feb 13, 2015 8:23 pm

Ok, I'll try it!

But are you saying I should paste all that into a blank Nyquist prompt? Or is there a Nyquist prompt that is accessed through the import labels interface?

Post Reply