Jump to content

Component: MIDI (Comms: System): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix Ltd.
| Matrix Ltd.
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.3 (Release)
| 2.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| Comms: System
| Comms: System
|}
|}




 
==MIDI component==
==[[File:Component Icon a9b43242_9ccc_4f1c_b2d1_acdfbe420fc1.png|Image]] MIDI component==
Low level routines for controlling or interacting with a standard MIDI interface.
Low level routines for controlling or interacting with a standard MIDI interface.


==Examples==
==Component Source Code==
Basic example to play a series of notes getting higher in pitch and then going down in pitch. This repeats in a loop and each time the loop repeats the instrument is changed. The current note and instrument are displayed on the LCD.
{{Fcfile|Midi.fcfx|MIDI Test File}}
[[File:MidiDemoRun.jpg]]


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_MIDI.fcfx FC_Comp_Source_MIDI.fcfx]


The MIDI component during simulation has functionality to allow it to work with MIDI synthesizers installed on your PC.  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MIDI.fcfx FC_Comp_Source_MIDI.fcfx]


To select your software or hardware synthesizer select from the property selector.
==Detailed description==


[[File:MidiSim.jpg]]




If you don't have a MIDI interface installed then [http://www.nerds.de/en/ipmidi.html IP MIDI] seems to be a good option that works well.


Once installed the MIDI output should play through your computer speakers.




The console window can be used to view the MIDI data as it is sent out and received.


[[File:MIDI1.jpg]]




The MIDI component during embedded operation will communicate using a UART serial channel. An EB021 MIDI E-block is available to allow standard MIDI cables to be connected up to a system.




==Downloadable macro reference==


===<span style="font-weight: normal;"><u><tt>SendMIDI</tt></u></span>===
Sends a MIDI packet consisting of up to three bytes of information,


'''Parameters'''


:[[Variable Types|BYTE]] ''Status''
::MIDI Status Byte - Used for commands such as NoteOn, NoteOff etc.


:[[Variable Types|BYTE]] ''Data1''
::MIDI Data Byte - Used as a parameter specific to the specified command


:[[Variable Types|BYTE]] ''Data2''
::MIDI Data Byte - Used as a parameter specific to the specified command




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>SendPitchChange</tt></u></span>===
Sends out a pitch change command on the specified channel.


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''
''No detailed description exists yet for this component''
::Channel to send the pitch change to


:[[Variable Types|UINT]] ''Pitch_Change''
==Examples==
::New pitch value to use, Default 0x2000




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>SendNoteOff</tt></u></span>===
Sends a note off command using the channel, note and velocity specified.


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''


:[[Variable Types|BYTE]] ''Note''


:[[Variable Types|BYTE]] ''Velocity''




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>SendControl</tt></u></span>===
Sends a control command using the channel, controller and value specified.


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''


:[[Variable Types|BYTE]] ''Controller''


:[[Variable Types|BYTE]] ''Value''




'''Return value'''


:''This call does not return a value''




===<span style="font-weight: normal;"><u><tt>SendNoteOn</tt></u></span>===
Sends a note on command using the channel, note and velocity specified.


'''Parameters'''
Basic example to play a series of notes getting higher in pitch and then going down in pitch. This repeats in a loop and each time the loop repeats the instrument is changed. The current note and instrument are displayed on the LCD.
{{Fcfile|Midi.fcfx|MIDI Test File}}
[[File:MidiDemoRun.jpg]]


:[[Variable Types|BYTE]] ''Channel''


:[[Variable Types|BYTE]] ''Note''
The MIDI component during simulation has functionality to allow it to work with MIDI synthesizers installed on your PC.


:[[Variable Types|BYTE]] ''Velocity''
To select your software or hardware synthesizer select from the property selector.


[[File:MidiSim.jpg]]


'''Return value'''


:''This call does not return a value''
If you don't have a MIDI interface installed then [http://www.nerds.de/en/ipmidi.html IP MIDI] seems to be a good option that works well.


Once installed the MIDI output should play through your computer speakers.


===<span style="font-weight: normal;"><u><tt>ReceiveMIDI</tt></u></span>===
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.
The console window can be used to view the MIDI data as it is sent out and received.


'''Parameters'''
[[File:MIDI1.jpg]]


:[[Variable Types|BYTE]] ''Timeout''


The MIDI component during embedded operation will communicate using a UART serial channel. An EB021 MIDI E-block is available to allow standard MIDI cables to be connected up to a system.


'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>SendPolyPressure</tt></u></span>===
Sends a note press with an associated polyphonic pressure value.


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''


:[[Variable Types|BYTE]] ''Note''


:[[Variable Types|BYTE]] ''Pressure''




'''Return value'''


:''This call does not return a value''
==Macro reference==


===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
| colspan="2" | Initialises the MIDI component and sets up the UART.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===<span style="font-weight: normal;"><u><tt>ReadData</tt></u></span>===
''<span style="color:red;">No additional information</span>''


===ReadData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Idx
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Parameters'''
===ReceiveMIDI===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReceiveMIDI'''
|-
| colspan="2" | 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. &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]] ''Idx''


===SendChannelPressure===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendChannelPressure'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Pressure
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:[[Variable Types|BYTE]]
===SendControl===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendControl'''
|-
| colspan="2" | Sends a control command using the channel, controller and value specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Controller
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>SendPatch</tt></u></span>===
===SendMIDI===
''<span style="color:red;">No additional information</span>''
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendMIDI'''
|-
| colspan="2" | Sends a MIDI packet consisting of up to three bytes of information,&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Status
|-
| colspan="2" | MIDI Status Byte - Used for commands such as NoteOn, NoteOff etc.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data1
|-
| colspan="2" | MIDI Data Byte - Used as a parameter specific to the specified command&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data2
|-
| colspan="2" | MIDI Data Byte - Used as a parameter specific to the specified command&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===SendNoteOff===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendNoteOff'''
|-
| colspan="2" | Sends a note off command using the channel, note and velocity specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Note
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Velocity
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''
===SendNoteOn===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendNoteOn'''
|-
| colspan="2" | Sends a note on command using the channel, note and velocity specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Note
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Velocity
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]] ''Instrument''


===SendPatch===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendPatch'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Instrument
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:''This call does not return a value''
===SendPitchChange===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SendPitchChange'''
|-
| colspan="2" | Sends out a pitch change command on the specified channel.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Channel to send the pitch change to&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Pitch_Change
|-
| colspan="2" | New pitch value to use, Default 0x2000&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>SendChannelPressure</tt></u></span>===
===SendPolyPressure===
''<span style="color:red;">No additional information</span>''
{| class="mtx-class-macrotable wikitable"
 
|-
 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
 
| width="90%" class="mtx-class-macrohead" | '''SendPolyPressure'''
'''Parameters'''
|-
 
| colspan="2" | Sends a note press with an associated polyphonic pressure value.&nbsp;
:[[Variable Types|BYTE]] ''Channel''
|-
 
|-
:[[Variable Types|BYTE]] ''Pressure''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
'''Return value'''
| colspan="2" | &nbsp;
 
|-
:''This call does not return a value''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Note
 
|-
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
| colspan="2" | &nbsp;
Initialises the MIDI component and sets up the UART.
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
'''Parameters'''
| width="90%" | Pressure
 
|-
:''This macro has no parameters''
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
'''Return value'''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
:''This call does not return a value''
 
 
 
==Simulation macro reference==
 
''This component does not contain any simulation macros''




==Property reference==
==Property reference==
<span style="font-weight: normal;"><u>Channel</u></span>


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''.
{| class="mtx-class-macrotable wikitable"
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
 
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
 
|-
 
|-
<span style="font-weight: normal;"><u>TX</u></span>
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Connections
This property is of type ''Single digital pin'' and can be referenced with the variable name ''TX''.
|-
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Channel
 
|-
 
| colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller.&nbsp;
<span style="font-weight: normal;"><u>RX</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RX''.
| width="90%" | Baud Options
 
|-
''<span style="color:red;">No additional information</span>''
| colspan="2" | Baud rate option selector&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Baud Rate
<span style="font-weight: normal;"><u>Label</u></span>
|-
 
| colspan="2" | &nbsp;
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
''<span style="color:red;">No additional information</span>''
| width="90%" | Use TX
 
|-
 
| colspan="2" | Selects if the Transmit pin is used by the component.  Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Data Source</u></span>
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | TX
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''DataSource''.
|-
 
| colspan="2" | Pin to be used for Transmit data&nbsp;
Simulation data source used to allow the component to connect to specific MIDI hardware or the the data injector components.
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
<span style="font-weight: normal;"><u>Injector</u></span>
| width="90%" | Use RX
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Injector''.
| colspan="2" | Selects if the Receive pin is used by the component.  Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O.&nbsp;
 
|-
Lists all the current injector components available on the user's panel
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | RX
|-
| colspan="2" | Pin to be used for Receive data&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Use Flow Control
|-
| colspan="2" | Flow Control (Handshake) enable or disable.    On: Two I/O pins are used to control the flow of data in and out of the device.    Off: Flow control is disabled.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | RTS
|-
| colspan="2" | Pin to be used for Request To Send handshake function Output from target micro to inform remote device we are ready to receive data. Low = Ready to receive data High = Not ready to receive data&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CTS
|-
| colspan="2" | Pin to be used for Clear To Send handshake function. Input to target micro to inform when the remote device is ready to transmit data. Low = Ready to transmit data High = Not ready to transmit data&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| width="90%" | Label
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | MIDI Output
|-
| colspan="2" | Decides if we are using special MIDI output or standard Serial/API Output. Yes: We send the simulation data via a MIDI interface. No: We send the simulation data via the standard COM/API interface.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | MIDI Port
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Scope Traces
|-
| colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.    Simulation - draws an approximation of the UART data onto the scope trace.    ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
|-
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Console Columns
|-
| colspan="2" | Number of characters that can be displayed on a single line of the console.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Data Source
|-
| colspan="2" | Simulation data source used to allow the component to connect to various remote devices    Nothing - Simulation data is ignored    COM port - Routes the communication data to and from a physical or virtual COM port      Injector - Routes the communication data via a data injector component on the Panel.&nbsp;
|}

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd.
Version 2.0
Category Comms: System


MIDI component

Low level routines for controlling or interacting with a standard MIDI interface.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_MIDI.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_MIDI.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Basic example to play a series of notes getting higher in pitch and then going down in pitch. This repeats in a loop and each time the loop repeats the instrument is changed. The current note and instrument are displayed on the LCD. MIDI Test File


The MIDI component during simulation has functionality to allow it to work with MIDI synthesizers installed on your PC.

To select your software or hardware synthesizer select from the property selector.


If you don't have a MIDI interface installed then IP MIDI seems to be a good option that works well.

Once installed the MIDI output should play through your computer speakers.


The console window can be used to view the MIDI data as it is sent out and received.


The MIDI component during embedded operation will communicate using a UART serial channel. An EB021 MIDI E-block is available to allow standard MIDI cables to be connected up to a system.






Macro reference

Initialise

Initialise
Initialises the MIDI component and sets up the UART. 
- VOID Return


ReadData

ReadData
 
- BYTE Idx
 
- BYTE Return


ReceiveMIDI

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.  
- BYTE Timeout
 
- BYTE Return


SendChannelPressure

SendChannelPressure
 
- BYTE Channel
 
- BYTE Pressure
 
- VOID Return


SendControl

SendControl
Sends a control command using the channel, controller and value specified. 
- BYTE Channel
 
- BYTE Controller
 
- BYTE Value
 
- VOID Return


SendMIDI

SendMIDI
Sends a MIDI packet consisting of up to three bytes of information, 
- 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 
- VOID Return


SendNoteOff

SendNoteOff
Sends a note off command using the channel, note and velocity specified. 
- BYTE Channel
 
- BYTE Note
 
- BYTE Velocity
 
- VOID Return


SendNoteOn

SendNoteOn
Sends a note on command using the channel, note and velocity specified. 
- BYTE Channel
 
- BYTE Note
 
- BYTE Velocity
 
- VOID Return


SendPatch

SendPatch
 
- BYTE Channel
 
- BYTE Instrument
 
- VOID Return


SendPitchChange

SendPitchChange
Sends out a pitch change command on the specified channel. 
- BYTE Channel
Channel to send the pitch change to 
- UINT Pitch_Change
New pitch value to use, Default 0x2000 
- VOID Return


SendPolyPressure

SendPolyPressure
Sends a note press with an associated polyphonic pressure value. 
- BYTE Channel
 
- BYTE Note
 
- BYTE Pressure
 
- VOID Return


Property reference

Properties
Connections
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Baud Options
Baud rate option selector 
Baud Rate
 
Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
TX
Pin to be used for Transmit data 
Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
RX
Pin to be used for Receive data 
Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
RTS
Pin to be used for Request To Send handshake function Output from target micro to inform remote device we are ready to receive data. Low = Ready to receive data High = Not ready to receive data 
CTS
Pin to be used for Clear To Send handshake function. Input to target micro to inform when the remote device is ready to transmit data. Low = Ready to transmit data High = Not ready to transmit data 
Simulation
Label
 
MIDI Output
Decides if we are using special MIDI output or standard Serial/API Output. Yes: We send the simulation data via a MIDI interface. No: We send the simulation data via the standard COM/API interface. 
MIDI Port
 
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Console Data
Selects if the console data is automatically generated or not 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port Injector - Routes the communication data via a data injector component on the Panel.