I agree with @bachstudies that I think the first step would be simple alphanumeric ordering in the same way most file browsers do. That means that yes 05 - SomeTrack.wav would come before AnotherTrack01.wav, but I think that would be fine and expected given that 99.9% of software would work the exact same. No need to overthink in this case I believe.
Is it perfect? Nope. Is it better than currently? I would argue yes.
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 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.
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 @bachstudies suggestions suggest, more complex than thought) new feature request. Do you agree?
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 ;))
Below is supposed to be a new post, but I appear to already have reached my allowance of posts
(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
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:
Fix filename-channel mapping in import to selected tracks
Make this option also available for polyphonic tracks, if the number of channels in the file matches the number of selected tracks.
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 @bachstudies, 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.
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.
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.
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.
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.
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).
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.
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.
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.)
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.
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.