Send a MIDI Note Message to any MIDI device

The MidiOutNote widget sends MIDI Note On messages via OSC, typically used to control MIDI software such as Live or MAX/MSP. Messages are sent every time a new received value is greater or equal to than the threshold, where the MIDI channel, note number and velocity are set in the widget. A Note Off message is sent when a new received value is less than the threshold.

In addition, the widget can listen to a second input (as named by the inputNoteNum parameter) which will change the widget’s Note number. If inputNotePlay is true, then each time a new value is received, a Note On will be generated.

The widget supports the noteOn() and noteOff() functions in ActionScript to send any note message.

MidiOutCtrl works with the NETLab MediaControl application, and MediaControl must be running.

On Screen Features

  • CONNECT: Connects to MediaControl to output midi notes.
  • IN:Shows the values coming from the inputSource as well as the instance name of the inputSource
  • CH: Sets the MIDI channel for the message.
  • NOTE: Sets the MIDI Note for the message.
  • VEL: Sets the velocity value for the Note On.
  • SEND TEST NOTE: This button indicates when a Note On is sent. If clicked manually, it sends a test Note On message with the set values. Typically used to make sure MIDI is being received by an application and to trigger a sound as a test.


  • INPUT NOTE NUM: The instance name of the source used to set the widgets NOTE pitch value. If inputNotePlay is true, then the widget will generate MIDI NOTE ON messages for each new value received from the named widget. The input value must be between 0-127 and will set the pitch of the note based on this value. This allows a sensor to set the note value.
  • INPUT NOTE PLAY: If set to TRUE, values from the inputNoteNum widget generate a MIDI NOTE ON when a new value is received. If set to FALSE, values from inputNoteNum will only set the widgets note number, which can then be send as a NOTE ON via the inputSource or a call to the noteOn() function of the widget.
  • INPUT SOURCE: The instance name of the source the widget listens to, e.g AnalogIn or DigitalIn for making a NOTE ON when the input value rises above the THRESHOLD parameter setting.
  • INVISIBLE: If set to “yes”, the widget will disappear when the Flash movie is run
  • MEDIACONTROL IP: Sets the IP address for the MediaControl application being communicated with. Typically set to to communicate with other applications running on the same computer
  • MEDIACONTROL PORT: Sets the communication port for the MediaControl application being communicated with. If communicating with MediaControl, the default port is 51010.
  • THRESHOLD: Sets the threshold value where a MIDI NOTE ON will be generated if the value from inputSource is equal to or greater than this number.

Code Examples

noteOn(midiNote, midiVelocity, midiChannel)

   // assuming the MidiOutNote widget has an instance name of "myNoteOut"
   // send a midi Note On message on channel 2, note 64, velocity 120
   // note: note and velocity values must be between 0 and 127
   // noteOn(midiNote, midiVelocity, midiChannel)

   myNoteOut.noteOn(120, 64, 2);

   // alternatively, send only the velocity value,
   // using the channel and note numbers set in the widget
   // this version uses the existing values for channel num and note num


noteOff(midiNote, midiChannel)

   // to send a note off, use a similar call
   // noteOff(midiNote, midiChannel)

   myNoteOut.noteOff(64, 2);

   // or, send a note off for whatever the last note was

   myNoteOut.noteOff(null, null);


Causes the widget to connect to the controller, the same result as using the connect button.



Causes the widget to disconnect from the controller.


Last modified September 7th, 2013