Import multiple takes

But this shouldn’t even come into play then if the user has said to create a new track for each channel, or each file correct?

  Seablade

Waoh, thanks for the prompt reactions and the lively discussion, just great!

As I encountered several, possibly unrelated problems (bugs??): Should I create several issues, one for each problem (bold in my first 2 posts)? Or should we discuss all the issues first here in order to discriminate real bugs from missing knowledge on my side (e.g. how to move regions between tracks in Ardour 6)?

The import-ordering issue seems to already be identified, so I’ll start with that one in the tracker. But what about native support for polyphonic wav-file-import? Should this be a separate issue? I could imagine that it would be rather simple, once the file-ordering is fixed: Just chain the splitting-step (of import to region list) with the import to single/selected tracks and iterate over this for every selected file (if as sequence is selected).

What would be amazing is a fully-featured import for any type of wav so that you can either route channels to existing tracks or create as needed. I guess a little bit like part extraction in Musescore :wink: So, for a specific example: a polywav containing a stereo pair and two mono spot mikes. Let’s say I already have a stereo track and one mono track created. Selecting the polywav in the import dialog would allow me to import channels 1 & 2 to the existing stereo track. Channel 3 could be imported to the existing mono track and channel 4 to a new mono track. I’m not sure of the most intuitive way to do a GUI for that (Catia-style wiring, import grid, assigning channels to import groups and automatic track creation based on number of channels) but it would definitely cut out the need for Wave Agent, SoX etc.

Ideally, this would also allow for simultaneous import of multiple polywav sequentially applying the same mapping for all takes/recordings.

1 Like

I did some further testing and came to the conclusion that there must be a veritable bug specific to importing files to selected tracks. Therefore, it probably is best to separate this one from the (maybe, as @anon60445789 suggestions suggest, more complex than thought) new feature request. Do you agree?

So here is my little “experiment”:


I copied the same 4 mono-files created by Ardour during the import of a 4-channel poly-file (the ones on the left) to files named “Test1.wav”, “Test2.wav” etc. (using zsh cp, if that should matter, and in the respective time-sequence, i.e. it is not sorting by creation date). Importing both, the “original” and the “Test…” files to selected tracks resulted in the same (strange) order, irrespective of file-naming (fist 2 columns). Next, I copied them another time to files “TestTest…”, but this time naming Track 2 as 3 and Track 3 as 2 (i.e. as they are inserted). This indeed imported the audio-content in the right order, because it was again inserting “TestTest2” to the 3rd track and v.v. (3rd column). But when I repeated this with 8 tracks selected and importing all 8 “Test…” respectively “TestTest…” files, the order was totally screwed up (4th column).
However, when importing as new tracks, the order is exactly as expected, both for the “Test…” files and for the original ones (the 2 columns right of the red play head in the screen shot.) Also note that, as humans would do but e.g. bash ls doesn’t , …%100.wav comes after %99.wav, so this heuristic is already correctly implemented in principle. It’s just in importing to selected tracks, that things get screwed up.

(So, this would already be the bug report, I guess ;))

1 Like

That explains it: You probably never used “import to selected tracks”?

Bug-report for file-track-mapping during import to selected tracks here: https://tracker.ardour.org/view.php?id=8271


Below is supposed to be a new post, but I appear to already have reached my allowance of posts :wink:

(from post below)

How far does importing a polyphonic wav file to existing tracks differ in this respect from importing it to new tracks or to polyphonic single tracks? The latter two things work flawlessly, at least for the files created by the MixPre. In my understanding, Ardour just has to figure the number of channels in a wav-file before importing it, in order to decide if the number of selected tracks matches the number of channels in the file, and if, it just has to show the option to add to selected tracks. But probably it isn’t that simple :wink:

Importing several polyphonic/stereo files in a sequence to separate tracks (one per channel) would probably be an additional option, as in the moment it only imports to a single polyphonic track.

So, in my understanding, the “feature” could be split into two (three) separate issues:

  1. Fix filename-channel mapping in import to selected tracks
  2. Make this option also available for polyphonic tracks, if the number of channels in the file matches the number of selected tracks.
  3. Add an option to add several files in a sequence with one track per channel (to selected or to new tracks).

Should we handle it like this, i.e. should I go on and create issues for 2. and 3. above?

That would be the basic support for me. It certainly could be refined later on as suggested by @anon60445789, e.g. by automagically combining stereo with mono-tracks etc.
Also, the option to add files stacked instead of in a sequence would be nice, but again, that would be more a bounty than a core feature.

2 Likes

Yes but severity on that one should be set to ‘Feature Request’.

Polyphonic WAV support could be a bit more tricky, as it will depend on other things outside Ardour as well, first of which being support in libsndfile for it, which I don’t remember off hand if it supports more than stereo files or not.

But my standpoint is get what is already there working correctly first;) Then work on new features.

    Seablade
2 Likes

We already support arbitrary channel counts in any file format supported by libsndfile (which is more or less any file format except mp3).

The commandline gives you the ability to automate things with scripts. Sox is able to split and combine files / channels any way you like. If sox refuses to process the BWF created by a SoundDevices recorder, then you can first convert it to standard wav or flac with ffmpeg. This might be unnecessary though.

ffmpeg -i 6_channel_file.wav -acodec pcm_s24le 6_channel_output_file.wav
ffmpeg -i 6_channel_file.wav -acodec flac 6_channel_output_file.flac

Splitting a multichannel file
Export channel 1 to another file:
sox 6_channel_file.wav channel_1.wav remix 1

Export channels 1 and 2 to a file:
sox 6_channel_file.wav channels_1_and_2.wav remix 1 2

Export channels 1 - 3 to a file:
sox 6_channel_file.wav channels_1_2_3.wav remix 1 2 3

Combine 6 mono files to a 6 channel file
sox -M channel_1.wav channel_2.wav channel_3.wav channel_4.wav channel_5.wav channel_6.wav 6_channel_output_file.wav

2 Likes

+1 for fixing the column widths. Thus is really the only thing that is stopping me recommend Ardour for what I teach where organisation of files & regions is crucial.

1 Like

I made an important observation today concerning the file-track mapping on import to selected tracks. I have reported it in the bug report, but also wanted to share it here, because it might allow to work around the problem in the meantime, especially for @BartVaes (?) (maybe also interesting for paul, @seablade and bachstudies? [sorry, only 2 mentions allowed ;)])

Apparently, Ardour respects the order in which the tracks are selected, so that file1 is put into the track selected first, file2 into the track selected 2nd etc. (This is irrespective of the order in which the files were selected, i.e. the order of file-names is (correctly) determined by intelligent/humanized alpha-numeric sorting. I.e. there is nothing wrong with this step.). This works perfectly when using ctrl+click and selecting one track after the other, and therefore is certainly a (useful) feature and not a bug.
The bug is just that apparently, when selecting several tracks at once, the resulting internal “order” of selection is undefined/random. This happens when selecting a group of tracks by clicking on one track in a group, as well as when selecting a range of tracks using click and then shift+click on the last track in the range. I.e. currently one has to select one track after the other using ctrl+click.

Hope that helps.

PS: Thanks mhartzel for the detailed info, very useful.

1 Like

Yes, I was discussing this with Paul on IRC the other day. I am personally not convinced this is the correct way to approach this. I personally believe it should always drop the files in order (Based off file name) into the tracks top to bottom. If you want to import specific files to specific tracks you need to reorder the tracks temporarily yes, but it gives easier visual feedback provided everything is working correctly, and is much easier to predict/understand what is happening in my opinion.

I would love to hear from those that think the current way is the best option though as I just am not seeing it myself yet.

BUT my major issue I think centers around visual feedback to the user. I don’t think there is enough of it personally, and I would like to focus a bit on drag and drop import instead of dialog based import. I need to do a bit more thinking on this topic before I propose something though.

   Seablade
2 Likes

If I may add my thoughts:

  1. I would be fine with either way, always top to bottom or as it is now, but with top to bottom behavior when selecting several tracks at once (shift click or group). I would opt for what requires less complex code changes (and inform the user of the respective behavior in e.g. a tool-tip).
  2. Drag and drop would be certainly convenient if it works on multiple files/sources at once. Currently, drag and drop from the sources list only works one source at a time, which is not usable for multi-track recordings.
  3. Drag and drop from a general file browser would also be convenient, but certainly cannot replace the current import window, which provides very many important info/features.
  4. Judging on the gain in convenience, drag-and-drop import would have a low priority for me compared to:
  • Importing several multi-channel files in a sequence, one track per channel
  • Importing multi-channel files (optionally as sequence) to existing tracks (both could, of course, be solved also by drag-and-drop, which would be nice, but the basic function is more important to me.)
  • Leave the option to import to selected tracks selected or make it the default option as soon as there are a matching number of tracks selected.
  • (As an alternative/work-around) Converting multi-channel tracks/regions to several mono-tracks; currently (v. 6.0.178), only mono-sources are created (in the list view), but without the possibility to add them to tracks time-locked (e.g. drag and drop together, see above), this feature is not very convenient. (At least I can align the regions easily after dragging, so that could be another current workaround for multi-track import, but a rather tedious one.)

Yes, and it’s the same behaviour in plugin manager as well. You can resize the view but the columns are fixed. Sometimes part of the texts are unreadable this way.

I’ve now created issues for all bugs and feature requests that came up in this thread:

  • Bug: File-channel mapping on import to (batch) selected tracks (as posted above): #8271
  • Feature: Polyphonic import part I: #8281
  • Feature: Polyphonic import part II: #8283
  • Feature: Converting polyphonic tracks to mono and v.v.: #8284
  • Bug: Make column widths adjustable: #8286
3 Likes

Spam filter: new user tried to create multiple posts with links. I’ll unblock them, one sec…

Edit: Thanks for filing the issue reports, links in the post are now updated and live.

1 Like

Lots of great suggestions (from jeythekey). If I record 2 stereo pairs at the same time (field recording on my Zoom F6), ideally I’d like to import the resulting poly wave into 2 stereo tracks (maybe eq separately, mix between them…). Or I might have one stereo plus some mono tracks. It seems that I can only either import the file as a single 4 channel file or as 4 mono files. One way round would be to allow dragging from 2 mono tracks into an empty stereo track after having imported as mono tracks.

Also, as it is at the moment, dragging a 4 channel file onto the timeline onto a stereo track just puts the first 2 of the 4 tracks on the timeline and ignores the others, but for me I’d rather Ardour just refused to drop (maybe some folks have a use for this or I’m missing something), or maybe better, allow me to drop the 4 tracks on to 2 stereo tracks next to each other.

1 Like

Our general model is that DnD will remain a simple, dialog-free, option-free process. If you’re doing something where you want more control … Ctrl-I/Cmd-I to bring up the import dialog, and then you have as much control as you want.

Hi Paul, I must be missing something. I don’t see the control you describe.
If at the Input dialog I select a 6 channel file:
I can ‘Add files…’ either to ‘source list’ or ‘as new tracks’
…but in both cases all I can do in Mapping is either ‘one region per file’ or ‘one region per channel’ (and no options for stereo etc.). Some control there to assign channels to something other than single files or channels would be great.

If I import ‘one region per file’ I can’t then see how to split that into 3 stereo tracks or a combination of stereo/mono/ambisonic or whatever.

If I import ‘one region per channel’ I can’t then add pairs or other groups of recorded tracks to stereo or other multichannel tracks on the timeline as I can only DnD one source at a time onto a track. I presume the workaround is to make new grouped mono tracks and drag in the components, but then if I consolidate/bounce a stereo chunk I get 2 identically named new regions in the source list. So then I’m back to Export and re-import.

Ardour does not offer the ability to split an even-numbered multichannel file into several smaller-number-of-channel multichannel files.

The only option provided there is to split to mono.

There seems to be some language confusion here too … There are no options that I am aware of that connect “regions” with “channels”. It seems you may be confusing “track” and “region” (they are not even remotely the same thing) ?

This is an area where you’re better off using external tools to get the files into the shape you need. Frankly, taking a 6 channel file and importing it as 3 stereo tracks is a bit of a corner case.