DrumGizmo - Ardour/Mixbus scripts and patchfiles

Moderators: MattKingUSA, khz, muldjord, deva

luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

Hi

The attachment contains custom versions of the "create_drum_tracks" lua script and midinam/patchfiles for the Drumgizmo Kits.

The ".lua" files goes to /home/[username]/.config/[ardourx/mixbusx]/scripts. It will be available in Edit>Lua Scripts>Script Manager. Select one of the "Actions" > "Add/Set" to setup. The "Call" button runs the script. It will create audio tracks for the channels of each kit.

The ".midnam" ones goes to /home/[username]/.config/[ardourx/mixbusx]/patchfiles. This will create a "Drumgizmo" item on the combo "External Midi Device" (default = Generic") in a MIDI track.

Bye
Attachments
DrumGizmo Patchfiles & Scripts.tar.gz
(2.99 KiB) Downloaded 146 times
Last edited by luciorgomes on Mon Sep 24, 2018 3:20 am, edited 1 time in total.
User avatar
deva
Established Member
Posts: 281
Joined: Sun Oct 23, 2016 10:15 am
Has thanked: 3 times
Been thanked: 30 times
Contact:

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by deva »

Cool.

Could you explain in a bit more detail what it does? Tehcnically I mean.

Does the midnam work for all drumkits, ie. read the names from the xml?
And does the channel creation likewise use the drumkit xml for the names?
User avatar
deva
Established Member
Posts: 281
Joined: Sun Oct 23, 2016 10:15 am
Has thanked: 3 times
Been thanked: 30 times
Contact:

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by deva »

deva wrote:Does the midnam work for all drumkits, ie. read the names from the xml?
And does the channel creation likewise use the drumkit xml for the names?
Aah, I could of course just have looked in the source code to find that out :-)

Each drumkit has a separate script for channel creation and a separate midnam file for the note naming.

We have been working on some ideas for using lv2 extensions to automatically send these information to the host when a new drumkit is loaded but so far we haven't managed to get something going.
Your scripts and midnam files are therefore at the moment the optimal solution to the two problems :-)

Cheers // Deva
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

deva wrote:Cool.

Could you explain in a bit more detail what it does? Tehcnically I mean.

Does the midnam work for all drumkits, ie. read the names from the xml?
And does the channel creation likewise use the drumkit xml for the names?
The midnam stuff I've got from here:
http://libremusicproduction.com/tutoria ... nth-ardour

On the scripts, I've just altered the names here (and the description):

function factory () return function ()
local names = {
"Overhead left",
"Overhead right",
"Snare top",
"Snare bottom",
"Snare trigger",
"Alesis DM5",
"Kick right",
"Kick left",
"Hihat",
"Ride cymbal",
"Tom 1",
"Tom 2",
"Tom 3",
"Tom 4 - floor tom",
"Ambience left",
"Ambience right"
}

Ps: for Sommerhack, that uses stereo tracks (if I'm not wrong), I've changed the loop while/do too:
....Session:new_audio_track (2, 2, nil, 1, names,
ARDOUR.PresentationInfo.max_order,
ARDOUR.TrackMode.Normal)....
User avatar
funkmuscle
Established Member
Posts: 2795
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 127 times
Been thanked: 29 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by funkmuscle »

Wow this is awesome, thanx man!!
Quick question, how would I edit this (lua) scripts so I can have the AMB and OVH stereo instead of mono and 1 buss to combine the the kick and another to combine the snare?
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

funkmuscle wrote:Wow this is awesome, thanx man!!
Quick question, how would I edit this (lua) scripts so I can have the AMB and OVH stereo instead of mono and 1 buss to combine the the kick and another to combine the snare?
To make stereo tracks you'll need to include a "if/else" rule in the loop (I don't know the lua language, will be something like this) :

Code: Select all

while names[i] do
          if i == x or i == y then
			local tl = Session:new_audio_track (2, 2, nil, 1, names[i],
			                                    ARDOUR.PresentationInfo.max_order,
			                                    ARDOUR.TrackMode.Normal)
          else
			local tl = Session:new_audio_track (1, 2, nil, 1, names[i],
			                                    ARDOUR.PresentationInfo.max_order,
			                                    ARDOUR.TrackMode.Normal)
         end
			for track in tl:iter () do
				track:presentation_info_ptr ():set_color (color)
			end

			i = i + 1
		end --foreach track
For a bus, I believe you'll need a "new_audio_route" instead of a "new_audio_track"

Code: Select all

new_audio_route (int, int, RouteGroup, unsigned int, std::string, Flag, unsigned int)
http://manual.ardour.org/lua-scripting/class_reference/
User avatar
funkmuscle
Established Member
Posts: 2795
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 127 times
Been thanked: 29 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by funkmuscle »

luciorgomes wrote:
funkmuscle wrote:Wow this is awesome, thanx man!!
Quick question, how would I edit this (lua) scripts so I can have the AMB and OVH stereo instead of mono and 1 buss to combine the the kick and another to combine the snare?
To make stereo tracks you'll need to include a "if/else" rule in the loop (I don't know the lua language, will be something like this) :

Code: Select all

while names[i] do
          if i == x or i == y then
			local tl = Session:new_audio_track (2, 2, nil, 1, names[i],
			                                    ARDOUR.PresentationInfo.max_order,
			                                    ARDOUR.TrackMode.Normal)
          else
			local tl = Session:new_audio_track (1, 2, nil, 1, names[i],
			                                    ARDOUR.PresentationInfo.max_order,
			                                    ARDOUR.TrackMode.Normal)
         end
			for track in tl:iter () do
				track:presentation_info_ptr ():set_color (color)
			end

			i = i + 1
		end --foreach track
For a bus, I believe you'll need a "new_audio_route" instead of a "new_audio_track"

Code: Select all

new_audio_route (int, int, RouteGroup, unsigned int, std::string, Flag, unsigned int)
http://manual.ardour.org/lua-scripting/class_reference/
thanks luciorgomes. Hmm, I'll try to figure it out.
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

Hi

New script.

This one opens a dialog with a combo to select the kit and a checkbox to create stereo tracks for Ambience and OH as sugested by funkmuscle.

Edit:... added a checkbox to create a Drum Group :)

Bye
Attachments
create_drum_tracks_Drumgizmo.lua.tar.gz
(1.24 KiB) Downloaded 104 times
User avatar
funkmuscle
Established Member
Posts: 2795
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 127 times
Been thanked: 29 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by funkmuscle »

luciorgomes wrote:Hi

New script.

This one opens a dialog with a combo to select the kit and a checkbox to create stereo tracks for Ambience and OH as sugested by funkmuscle.

Edit:... added a checkbox to create a Drum Group :)

Bye
sweet man!! thanks!!
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

... and finally, a chebox to send snare and kick tracks to buses... 8)

Ps.: if you run the script once, remove the created tracks, and run it again, the DAW will crash :oops: (don't ask me why)
Last edited by luciorgomes on Mon Sep 24, 2018 4:02 am, edited 1 time in total.
User avatar
funkmuscle
Established Member
Posts: 2795
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 127 times
Been thanked: 29 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by funkmuscle »

luciorgomes wrote:... and finally, a chebox to send snare and kick tracks to buses... 8)

Ps.: if you run the script once, remove the created tracks, and run it again, the DAW will crash :oops: (don't ask me why)
Thanks again for the awesome job. On the DRS kit, you only have the snare top but not the bottom. I found that out in the first lua scripts that you made.
This is actually awesome because it saves me so much time. Thanks a lot man. I'll let you know if I find any other issues or anything like that.
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

New one... text corrections...
Last edited by luciorgomes on Mon Sep 24, 2018 4:31 am, edited 1 time in total.
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

funkmuscle wrote:
luciorgomes wrote:... and finally, a chebox to send snare and kick tracks to buses... 8)

Ps.: if you run the script once, remove the created tracks, and run it again, the DAW will crash :oops: (don't ask me why)
Thanks again for the awesome job. On the DRS kit, you only have the snare top but not the bottom. I found that out in the first lua scripts that you made.
This is actually awesome because it saves me so much time. Thanks a lot man. I'll let you know if I find any other issues or anything like that.
Fixed.
Attachments
create_drum_tracks_Drumgizmo.lua.tar.gz
(1.49 KiB) Downloaded 105 times
User avatar
funkmuscle
Established Member
Posts: 2795
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 127 times
Been thanked: 29 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by funkmuscle »

luciorgomes wrote:New one... text corrections...
dude this is awesome. This is exactly it but I'm gonna be a pain in the ass one last time :mrgreen: . The buss for the snare and kick, since they're mone signals, I usually route to a mono buss.
I can edit it myself if you tell me where in the script.
luciorgomes
Established Member
Posts: 120
Joined: Wed Feb 04, 2015 11:29 pm
Has thanked: 38 times
Been thanked: 7 times

Re: DrumGizmo - Ardour/Mixbus scripts and patchfiles

Post by luciorgomes »

funkmuscle wrote:
luciorgomes wrote:New one... text corrections...
dude this is awesome. This is exactly it but I'm gonna be a pain in the ass one last time :mrgreen: . The buss for the snare and kick, since they're mone signals, I usually route to a mono buss.
I can edit it myself if you tell me where in the script.
Now you can set the type of the buses.... and the group name :P
Attachments
create_Drumgizmo_tracks.lua.tar.gz
(1.6 KiB) Downloaded 129 times
Post Reply