MIDI Glue LUA script (MIDI join)

MIDI_Glue_icon MIDI Glue (Only for Ardour 7) (Not for Adour 6.9)

Hello everybody!

Let me introduce my first LUA script “MIDI Glue”, that “glues” midi regions in “G”-mode.

Here you can download the script and read installation information:

In outline this script expands Ardour’s possibilities (increases speed) to Consolidate MIDI regions.

Standard workflow requires switching from mode “G” to mode “R” or to run a command Set Range to Selected Regions, then from context menu run the command Consolidate.

The script - if you’ll make some assignments (described in the Installation in GitHub) - lets you just select the desired region/regions and simply press Alt+G & Enter combination - and you’ll get the “glued” MIDI:
MIDI_Glue_Use

PS: This is my first attempt to make a usable thing in GitHub - any advises&notes from skilled devs are welcome!! Good luck!
Thanks to:
@BenLoftis
@x42
@johndev

EDIT: Few conditionals for correct gluing ALL the midi notes:

  1. All the layers must be transparent (not opaque) (Alt+0):

  2. For default transparent new region drawing - Session Properties>MIDI Options>Draw tool creates opaque MIDI regions - must be unchecked:

  1. For default transparent new region recording - the “Rec:” drop-down (just right of the transport controls) - must be Snd on Snd:
    Snd on Snd
9 Likes

Thank you, very much needed script.

1 Like

Such a small thing and so much needed. Thank you

1 Like

If it is possible to remember, change and restore the value of preferences, it could be glued automatically

Hello, first, congratulations! Since you asked for tips about distributing a project from a repository (in this case, Github), here is one: even if the script specifies a license in its header (MIT) and that’s already fine for most purposes, generally it’s good practice to include a LICENSE file in the repo containing the body of the (MIT, in this case) license.

1 Like

Do you mean this dialog:
consolidate_dialog
I’d like to include the acceptance of this dialog somehow into the script, but not enough knowledge at this time. May be @x42 @paul @BenLoftis or somebody could help?
This could be so comfortable to “glue” without any dialog, especially since in most cases it is enough to accept the default conditions. :heavy_check_mark:

Thanks! Not so distributing, but just help to users like me to use the script. If I will not mention any license - does that mean - everybody can freely using the script?
PS/ If every homeless punk could use this without any asking - I’ll be happy! :))

On the contrary, not mentioning the license in any way means the opposite - that the code is to be considered proprietary, all rights reserved and that homeless punks cannot legally use it.

In this case, there is a reference to the MIT license in the script header which is sufficient, but in general, to avoid any misunderstandings, it’s always better to include an explicit LICENSE file containing the full text of the license (it would be even better to add in the README something along these lines: “All files in this repository are released under the terms of the MIT license.”). This is a general suggestion for all free/libre and open source software, not just for your specific case :slight_smile:

2 Likes

OK. What law makes this rule?

Hard to say without a reference to specific country laws so let’s tackle it from an international law perspective. From my understanding (as someone who has studied a bit of law but is not a lawyer, corrections accepted!), the Berne convention makes this rule. Allow me to quote the official WIPO website

(b) Protection must not be conditional upon compliance with any formality (principle of “automatic” protection) [2].

Basically, when you create a work, it is automatically protected by traditional copyright. To give users some additional freedoms, you have to specifically state them. This, in the world of free and open source software, means explicitly adopting a license approved by the FSF or OSI (like the MIT license). If you don’t, the strictest possible copyright (all rights reserved) automatically applies to it.

Edit: this, of course, not for your specific case (as saying “MIT” in the license header IMHO is unambiguous) but in general.

@fretboard
Could you bring a link to any yours GitHub page?

Well, you can check any repository (including Ardour’s which has a COPYING file that is the same as a LICENSE file) but here you go.

If @paul has no objection I’ve copied the file COPYING in to GitHub - cooltehno/ardour-cooltehno-lua as you suggest.

1 Like

Wow, awesome, thanks a lot :slight_smile:

1 Like

I mean not by changing preferences but by LUA ARDOUR:Session

Sorry my stupids, I can’t understand what you mean? :))

What preferences, could you explain more detailed?

I think I’ve stirred up a hive of bugs with this script and its issue:
range_consilidate_bug

https://tracker.ardour.org/view.php?id=9177
https://tracker.ardour.org/view.php?id=9096

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