Example
====== MIDI Note On/Off ======
^ by: | Oliver Waits, Feb. 2016 |
^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=4342 |
^ description: | Here are macros to send Note On and Off commands from the MIDI out port on the console. |
^ remarks: | Code below is shortened for better overview. For the long version - MIDI Notes 1~20 - refer to [[http://forum.avolites.com/viewtopic.php?f=20&t=4342|the original post]]. However, as of October 2017 there is an error in that posted file: since all macros have the same ID, only one macro is displayed in Titan. |
^ | Until Titan v12 his works only with real consoles as Titan doesn't support MIDI over USB. Only the real 5pin MIDI ports on Avo hardware are supported. Furthermore, a MIDI **output** is required - only Tiger Touch and above, no Titan Mobile or Quartz. (Titan v12 allows USB MIDI for T2 and above but MIDI output via USB works only from v13 on) |
{{tag>send midi note}}
==== functions ====
* [[macros:function:panel.midi.noteon]]
* [[macros:function:panel.midi.noteoff]]
===== Code =====
There is another file available which sends note on when the macro is pressed and note off when the macro is release, for notes 1~12, here: {{ :macros:example:midinotes.xml |}}
**Please note that these macros only work when they are MOVED onto another handle, i.e. a button or key, in another window. They do not work in the Show Library where they appear as unassigned, and they do not work when they are copied. You need to MOVE them.**
**Also this does not work when called from within a cuelist - it seems that macro calls from cuelist cues do not support the start/end syntax (Titan 16).**
Panel.Midi.NoteOn(0,1,127)
Panel.Midi.NoteOn(0,2,127)
Panel.Midi.NoteOff(0,1,127)
Panel.Midi.NoteOff(0,2,127)
===== Explanation =====
This explains the functional steps within the sequence. For all the other XML details please refer to [[macros:formats_and_syntax#xml_format|Formats and syntax]]
As macros currently don't support parameters, you need to use individual macros (which call the appropriate function with the respective parameters) per note you want to send:
* ''Panel.Midi.NoteOn(0,1,127)'' sends a NoteOn, channel 0, note 1, velocity 127
* ''Panel.Midi.NoteOn(0,2,127)'' sends a NoteOn, channel 0, note 2, velocity 127
* ''Panel.Midi.NoteOff(0,1,127)'' sends a NoteOff, channel 0, note 1, velocity 127
* ''Panel.Midi.NoteOff(0,2,127)'' sends a NoteOff, channel 0, note 2, velocity 127
===== How to use it =====
* [[macros:deploying|make this macro available]]
* fire the macros as you require. This might be useful for external applications which cannot be controlled by DMX/Art-Net/sACN.
~~DISCUSSION~~