MIDI¶
lib_xua supports MIDI input/output over USB as per Universal Serial Bus Device Class Definition for MIDI Devices.
MIDI functionality is enabled with the define in Table 22.
Define |
Description |
Default |
|---|---|---|
|
Enable MIDI functionality |
|
lib_xua supports MIDI receive on a 4-bit or 1-bit port, defaulting to using a 1-bit port.
MIDI transmit is supported over a port of any bit-width. By default lib_xua assumes the transmit
and receive I/O is connected to bit[0] of the port. This is configurable for the transmit port.
Table 23 provides information on configuring these parameters.
Define |
Description |
Default |
|---|---|---|
|
Port width of the MIDI rx port (1 or 4bit) |
|
|
MIDI tx bit |
|
The MIDI code expects that the ports for receive and transmit are defined in the application XN file
on the relevant Tile.
The expected names for the ports are PORT_MIDI_IN and PORT_MIDI_OUT, for example:
<Tile Number="0" Reference="tile[0]">
<!-- MIDI -->
<Port Location="XS1_PORT_1F" Name="PORT_MIDI_IN"/>
<Port Location="XS1_PORT_4C" Name="PORT_MIDI_OUT"/>
</Tile>