Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 77: Line 77:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 83: Line 85:
==Macro reference==
==Macro reference==


===SendMIDI===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 111: Line 114:




===SendPitchChange===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 134: Line 138:




===SendNoteOff===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 162: Line 167:




===SendControl===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 190: Line 196:




===SendNoteOn===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 218: Line 225:




===ReceiveMIDI===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 236: Line 244:




===SendPolyPressure===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 264: Line 273:




===ReadData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 282: Line 292:




===SendPatch===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 305: Line 316:




===SendChannelPressure===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 328: Line 340:




===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-

Revision as of 11:52, 3 February 2023

Author Matrix Ltd.
Version 1.3
Category Comms: USB


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.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples




Macro reference

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


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


SendNoteOff

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


SendControl

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


SendNoteOn

SendNoteOn
Sends a note on command using the channel, note and velocity specified. 
- BYTE Channel
 
- BYTE Note
 
- BYTE Velocity
 
- VOID 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


SendPolyPressure

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


ReadData

ReadData
Reads a byte from the last received MIDI message 
- BYTE Idx
Byte to read 0-3 
- BYTE Return


SendPatch

SendPatch
 
- BYTE Channel
 
- BYTE Instrument
 
- VOID Return


SendChannelPressure

SendChannelPressure
 
- BYTE Channel
 
- BYTE Pressure
 
- VOID Return


Initialise

Initialise
Starts up the USB communications and attempts to enumerate. Returns 0 for a successful startup or 255 for a enumeration timeout. 
- BYTE Return



Property reference

Properties
USB Properties
Vendor ID
USB VID 
Product ID
USB PID 
Device Name
USB Device Name 
Manufacturer
USB Manufacturer 
Major Version
USB Major Version Number 
Minor Version
USB Minor Version Number 
Enumeration Timeout
Specifies if the enumeration (Initialise function) can timeout if taking too long. 
Simulation
Label
Text displayed on the I/O flasher comms component. 
Data Source
Simulation data source used to allow the component to connect to specific MIDI hardware or the the data injector components. 
MIDI Port