User Tools

Site Tools


macros:example:midinotes

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 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.
This 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.

functions

Code

sendmidi.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
 
  <!-- MIDI Note On -->
  <macro name="MIDI Note 1 On" id="Avolites.Macros.MidiNote1On">
    <sequence>
      <step>Panel.Midi.NoteOn(0,1,127)</step>
    </sequence>
  </macro>
 
  <macro name="MIDI Note 2 On" id="Avolites.Macros.MidiNote2On">
    <sequence>
      <step>Panel.Midi.NoteOn(0,2,127)</step>
    </sequence>
  </macro>
 
  <!-- MIDI Note Off -->
  <macro name="MIDI Note 1 Off" id="Avolites.Macros.MidiNote1Off">
    <sequence>
      <step>Panel.Midi.NoteOff(0,1,127)</step>
    </sequence>
  </macro>
 
  <macro name="MIDI Note 2 Off" id="Avolites.Macros.MidiNote2Off">
    <sequence>
      <step>Panel.Midi.NoteOff(0,2,127)</step>
    </sequence>
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to 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

  • fire the macros as you require. This might be useful for external applications which cannot be controlled by DMX/Art-Net/sACN.

Discussion

icke_siegen, 2017/10/15 11:19, 2017/11/20 16:15

As stated in the original post, I suspect some difficulties as all the macros have the same ID. Testing needed.

However, testing requires an external MIDI device - hence I cannot test it myself.

You could leave a comment if you were logged in.
macros/example/midinotes.txt · Last modified: 2018/04/02 11:13 by icke_siegen