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

From Flowcode Help
Jump to navigationJump to search
Line 15: Line 15:
 
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 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 Pack==
+
==Component Source Code==
  
COMMSC
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_USBMIDI.fcfx FC_Comp_Source_USBMIDI.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 34: Line 36:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 317: Line 321:
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 +
|-
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | USB Properties
 
|-
 
|-
 
|-
 
|-
Line 354: Line 362:
 
| colspan="2" | Specifies if the enumeration (Initialise function) can timeout if taking too long. 
 
| colspan="2" | Specifies if the enumeration (Initialise function) can timeout if taking too long. 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
 
|-
 
|-
 
|-
 
|-

Revision as of 17:52, 9 November 2022

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 for the component source code: FC_Comp_Source_USBMIDI.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


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


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


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


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


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


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


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


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


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


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



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