Importing external values into an automation

Hi all,
is there a way to import automation values ​​from an external file?
Thanks,
a.

What kind of external file?

csv, txt…a file containing the values ​​discretized over time.

I see. Well I’m not sure of any existing tool that might do this for you.
But it almost certainly would be feasible to author a custom Lua script that could do this, if you have any coding know-how that is.

I’ve never used Lua, I’m starting to do some tests.
In Ardour Window/Scripting:

print("Test new_midi_source:")
local source = Session:new_midi_source("in-memory")
print("Source:", source)

Output:

Test new_midi_source:
Error: [string "print("Test new_midi_source:")..."]:2: attempt to call a nil value (method 'new_midi_source')

What are these errors like “attemp to call a nil value…” due to?
Doing some tests, they appear continuously.

[Ardour 8.1.0 on Linux]
a.

:point_up: That is telling you that that binding (i.e. “new_midi_source”) does not exist in Lua for Ardour in particular. (-Perhaps you are looking for “new_midi_route”?)

You can search here for bindings/methods/etc. that are available to use.

Can you copy/paste an example of the csv and/or txt file lines “containing the values ​​discretized over time.” that you want to use? I might be able to help make a small script to do this for you, if I have some extra time. But this leads to another question… What “automation” is this anyway? -Fader? -Some specific automation lane for a plugin? -Pan? -Midi velocity? -etc., etc…?

Also, why are you in a situation where you have your automation listed in an external file(s) anyway? Did you type them out yourself? Is this csv/txt automation info. from some other program? How did you end up in this situation? haha

1 Like

If you mean parameter automation, you could also just edit the .ardour session file in a text editor, if this is for MIDI CC, then edit the MIDI file as text (eg. with GitHub - markc/midicomp: A MIDI Compiler - convert SMF MIDI files to and from plain text).

As for doing with inside Ardour with Lua, please have a look at the examples in addition to the reference that @GhostsonAcid mentioned:

or to add/remove MIDI events

and to read data from a file:

1 Like

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