Created
February 23, 2026 18:12
-
-
Save x42/49c49cf211f32f21fdbba640694f51f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/home/rgareus/src/ardour/gtk2_ardour/arlua | |
| --set_debug_options ("Pool") | |
| --set_debug_options ("SessionEvents") | |
| -- setup audio-engine (global) | |
| AudioEngine:set_backend("None (Dummy)", "", "") | |
| --AudioEngine:set_backend("JACK", "", "") -- connect to JACK | |
| -- create a test session, or load it, if it exists | |
| s = create_session ("/tmp/luatest", "luatest", 48000) | |
| if s == nil then s = load_session ("/tmp/luatest", "luatest") end | |
| -- look up master-bus (channel count) | |
| inputs = 1; | |
| outputs = inputs | |
| mst = s:master_out(); | |
| if not mst:isnil() then outputs = mst:n_inputs():n_audio() end | |
| mst = nil -- drop reference | |
| assert (outputs > 0) | |
| -- create 16 new audio tracks | |
| s:new_audio_track (inputs, outputs, ARDOUR.RouteGroup(), 16, "", ARDOUR.PresentationInfo.max_order, ARDOUR.TrackMode.Normal, true, true) | |
| s:save_state("") | |
| close_session() | |
| quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment