The midi command allows you to directly interface with the Musical Instrument Digital Interface to play single notes or drum sounds. It should not be confused with the sound or noise commands, which can be used to play entire MIDI files. It is possible for a single object to trigger several notes or even chords at once.
midi [reset OR drumkit] instr=instr note=note vol=vol time=time [global] [omni] [reverb=reverb] [chorus=chorus] [mod=mod]
The optional argument reset will reset the midi note player and passes execution to the midi file player.
The argument drumkit will switch to the drumkit, so that different "notes" will make differing drum sounds. The arguments 'instr' and 'time' are not used with the drumkit.
The argument instr defines the instrument to use. Possible numbers for instruments are in the range from 1 to 128. If no instrument, or an instrument out of range is defined, it will default to instrument 1. For a list of instruments and notes used by the drumkit look at .
The argument note defines the note to play. Possible numbers for instruments are in the range from 0 to 127. Be aware that depending on the selected instrument, the note could be out of range or not audible.
The note for Middle C, or the central note on a standard piano, is 60.
The argument vol defines the volume for this note. The range from 0 to 100. If no volume is defined, it will default to the highest volume 100.
The argument time defines the duration the note is played in milliseconds. Possible values are in the range from 0 to 10000 (10 seconds). If no time is defined, it will default to 2000 milliseconds (2 seconds).
The argument global allows you to send the command to all users in visible range to the object, if the world has global commands enabled.
The argument omni allows you to play the specified note exclusive. All other notes of the same instrument will be stopped before the given note is played.
mod, reverb, chorus
The arguments reverb, chorus and mod (modulation) are boolean values to toggle effects for the chosen instrument.
If no midi note is played for more than a minute, the midi note player will pass the midi functionality back to the midi file player and will issue an implicit midi reset.
The midi note player can be switched off by un-checking the 'Play effects' item on the Menu/Options/Settings/General property page.
activate midi note=51 instr=1
Commands: Addforce • Addtorque • Alpharef • Animate • Astart • Astop • Camera • Collider • Colltag • Color • Corona • Envi • Examine • Frame • Group • Light • Link • Lock • Matfx • Media • Midi • Move • Name • Noise • Opacity • Picture • Rotate • Say • Scale • Seq • Shadow • Shear • Sign • Skew • Solid • Sound • Tag • Teleport / Teleportx • Texture • Timer • URL • Velocity • Visible • Warp • Webnl:Commando:Midi