Source Code | Tickets | Trello | Twitter | Patreon | © Michael DeHaan, 2020

Instruments


About

Instruments take a Device name and combine it with MIDI channel data and capability information. Tracks reference Instruments to figure out how to route MIDI information.



Creating An Instrument 


api.instruments.add(
   name='lead_inst',
   device=DEVICE,
   channel=1,
   min_octave=0,
   base_octave=5,
   max_octave=10
)

An instrument has the following properties:

Property Type Description
name string a name to identify this object
device int the name of a MIDI Device in your system
min_octave int the lowest octave that the instrument can play. Notes below this value will not be transmitted
base_octave int this value will be added to the octave value of any MIDI events before they are played.
max octave int the highest octave that the instrument can play. Notes above this value will not be transmitted
default_velocity int the default velocity to use if not specified on a Slot. If not set here, the default is 120.

Suggestions & Tips 


Next Up 

See Tracks