Fitting Audio Item to Tempo Map

You could do that via OSC (enable Preferences > Control Surfaces > Open Sound Control) e.g.

oscsend osc.udp://localhost:3819 /access_action s Editor/script-action-1

for Ardour 6 and later this will be

oscsend osc.udp://localhost:3819 /access_action s LuaAction/script-action-1

Ardour 6 has 32 numerically indexed bindable script-action and 12 assignable buttons (Ardour 5.x offers 8).

Can I use

dofile("another script.lua")

any way to get a new line in the prompt for radios ?

No. Scripts are supposed to be self-contained and portable with a session to any other machine. Relying on external files or libs would break that.

How about using a dropdown instead?

I don’t think there’s too much hope as this is not working on the main menu

WinMenuSelectItem, ahk_class gdkWindowToplevel , , Session, Open...

Sorry I did’nt realize you can only have 9 scripts in Edit > Lua Scripts because you only have 8 buttons unless you run it from the scripting window (unless I have missed something ?) . It’s all looking a bit difficult to implement things, tho the potential is there. In REAPER I can have 1000+ scripts and call on any of them from within other scripts.
Maybe I’m missing something, will have another look tomorrow.

How did you determine the key frame map?

You can have unlimited scripts (Window > Scripting), but you can only assign a limited amount of them to keyboard-shortcuts or to dedicated Actions.

(Session scripts, callbacks or DSP scripts are only limited by CPU power, but that’s not relevant here)

If you have a tempo map you get the samples in the TempoMap section in the project xml.
Depending on what sample rate you are using you can calculate the samples/frames at a bar or beat, in the map you have the current sample > 441000‬ and target > 420646 will change 120bpm to 130bpm

0 0 (120 bpm)
176400 176400 (130 bpm)
441000‬ 420646 (100 bpm) 
617400‬ 632326 (120 bpm)
3131100‬ 3146026‬ (110 bpm)
3351600 3386572

Sample calculator

In Ardour/git (upcoming Ardour 6) you can get this information with

The harder part is to map the beat-position of the file to ardour’s map. It’s mostly rule of three with incremental offsets to the previous sync point (except Ardour also supports temp-ramps so this can get complicated).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.