Component: USB MIDI (Comms: USB)
Author | Matrix Ltd. |
Version | 1.3 (Release) |
Category | Comms: USB |
Contents
USB MIDI component
Component to create and communicate using a standard MIDI connection. Compatible with simulation and USB enabled microcontroller devices. Currently only compatible with the 16-bit PIC range of devices.
Examples
No additional examples
Downloadable macro reference
SendMIDI
Sends a MIDI packet consisting of up to three bytes of information,
Parameters
- BYTE Status
- MIDI Status Byte - Used for commands such as NoteOn, NoteOff etc.
- BYTE Data1
- MIDI Data Byte - Used as a parameter specific to the specified command
- BYTE Data2
- MIDI Data Byte - Used as a parameter specific to the specified command
Return value
- This call does not return a value
SendPitchChange
Sends out a pitch change command on the specified channel.
Parameters
- BYTE Channel
- Channel to send the pitch change to
- UINT Pitch_Change
- New pitch value to use, Default 0x2000
Return value
- This call does not return a value
SendNoteOff
Sends a note off command using the channel, note and velocity specified.
Parameters
- BYTE Channel
- BYTE Note
- BYTE Velocity
Return value
- This call does not return a value
SendControl
Sends a control command using the channel, controller and value specified.
Parameters
- BYTE Channel
- BYTE Controller
- BYTE Value
Return value
- This call does not return a value
SendNoteOn
Sends a note on command using the channel, note and velocity specified.
Parameters
- BYTE Channel
- BYTE Note
- BYTE Velocity
Return value
- This call does not return a value
ReceiveMIDI
Waits for the time specified in the timeout parameter for an incoming MIDI message.
Returns 0 to indicate a timeout, otherwise returns the first value from the MIDI message.
Parameters
- BYTE Timeout
Return value
SendPolyPressure
Sends a note press with an associated polyphonic pressure value.
Parameters
- BYTE Channel
- BYTE Note
- BYTE Pressure
Return value
- This call does not return a value
ReadData
Reads a byte from the last received MIDI message
Parameters
- BYTE Idx
- Byte to read 0-3
Return value
SendPatch
No additional information
Parameters
- BYTE Channel
- BYTE Instrument
Return value
- This call does not return a value
SendChannelPressure
No additional information
Parameters
- BYTE Channel
- BYTE Pressure
Return value
- This call does not return a value
Initialise
Starts up the USB communications and attempts to enumerate.
Returns 0 for a successful startup or 255 for a enumeration timeout.
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Vendor ID
This property is of type Signed integer and can be referenced with the variable name vendor_ID.
USB VID
Product ID
This property is of type Signed integer and can be referenced with the variable name product_ID.
USB PID
Device Name
This property is of type Line of text and can be referenced with the variable name dev_name.
USB Device Name
Manufacturer
This property is of type Line of text and can be referenced with the variable name dev_manufacturer.
USB Manufacturer
Major Version
This property is of type Signed integer and can be referenced with the variable name major_version.
USB Major Version Number
Minor Version
This property is of type Signed integer and can be referenced with the variable name minor_version.
USB Minor Version Number
Enumeration Timeout
This property is of type True or false and can be referenced with the variable name enumeration_tout.
Specifies if the enumeration (Initialise function) can timeout if taking too long.
Label
This property is of type Line of text and can be referenced with the variable name label.
Text displayed on the I/O flasher comms component.
Data Source
This property is of type Fixed list of ints and can be referenced with the variable name DataSource.
Simulation data source used to allow the component to connect to specific MIDI hardware or the the data injector components.
MIDI Port
This property is of type Fixed list of ints and can be referenced with the variable name Midi_Port.
No additional information