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

From Flowcode Help
Jump to navigationJump to search
Line 77: Line 77:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
  
  
Line 354: Line 356:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Revision as of 12:22, 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_temp/USBMIDI.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/USBMIDI.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

Initialise

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


ReadData

Fc9-comp-macro.png ReadData
Reads a byte from the last received MIDI message 
Fc9-u8-icon.png - BYTE Idx
Byte to read 0-3 
Fc9-u8-icon.png - BYTE Return


ReceiveMIDI

Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE Return


SendChannelPressure

Fc9-comp-macro.png SendChannelPressure
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Pressure
 
Fc9-void-icon.png - VOID Return


SendControl

Fc9-comp-macro.png SendControl
Sends a control command using the channel, controller and value specified. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Controller
 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


SendMIDI

Fc9-comp-macro.png SendMIDI
Sends a MIDI packet consisting of up to three bytes of information, 
Fc9-u8-icon.png - BYTE Status
MIDI Status Byte - Used for commands such as NoteOn, NoteOff etc. 
Fc9-u8-icon.png - BYTE Data1
MIDI Data Byte - Used as a parameter specific to the specified command 
Fc9-u8-icon.png - BYTE Data2
MIDI Data Byte - Used as a parameter specific to the specified command 
Fc9-void-icon.png - VOID Return


SendNoteOff

Fc9-comp-macro.png SendNoteOff
Sends a note off command using the channel, note and velocity specified. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Note
 
Fc9-u8-icon.png - BYTE Velocity
 
Fc9-void-icon.png - VOID Return


SendNoteOn

Fc9-comp-macro.png SendNoteOn
Sends a note on command using the channel, note and velocity specified. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Note
 
Fc9-u8-icon.png - BYTE Velocity
 
Fc9-void-icon.png - VOID Return


SendPatch

Fc9-comp-macro.png SendPatch
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Instrument
 
Fc9-void-icon.png - VOID Return


SendPitchChange

Fc9-comp-macro.png SendPitchChange
Sends out a pitch change command on the specified channel. 
Fc9-u8-icon.png - BYTE Channel
Channel to send the pitch change to 
Fc9-u16-icon.png - UINT Pitch_Change
New pitch value to use, Default 0x2000 
Fc9-void-icon.png - VOID Return


SendPolyPressure

Fc9-comp-macro.png SendPolyPressure
Sends a note press with an associated polyphonic pressure value. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Note
 
Fc9-u8-icon.png - BYTE Pressure
 
Fc9-void-icon.png - VOID Return


Property reference

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