Related to https://community.ardour.org/node/15631
I’m investigating several solutions to “import” edits from the Lightworks video editor into Ardour.
I thought first about creating a new Ardour XML session file from scratch–but this seems a rather fragile solution. I am now considering generating a Lua script from Lightworks that could be used to re-create the same edit into Ardour.
As a typical use case, I would like:
- create a new track
- import the media /tmp/test.wav
- Put the segment from 00:00:05 to 00:00:15 from the media at position 00:01:00 in the newly created track
I searched through the examples and the doc, but I have a hard time fitting the pieces together.
I found how to create a track:
t = Session:new_audio_track (${inPorts}, ${outPorts}, nil, 1, [[${track.name}]], ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal)
And how to import a media into the region list
m = Editor:do_import (files, Editing.ImportDistinctFiles, Editing.ImportAsRegion, ARDOUR.SrcQuality.SrcBest, ARDOUR.MidiTrackNameSource.SMFTrackName, ARDOUR.MidiTempoMapDisposition.SMFTempoIgnore, pos, ARDOUR.PluginInfo())
But I can find how to put the region at a given position on the track.
Any suggestion or example would be more than welcome!
- Sylvain