API#
Synthesizer#
- class midistream.synthesizer.Synthesizer[source]#
MIDI Synthesizer.
- property config: dict#
Synthesizer configuration dictionary.
- property reverb: ReverbPreset#
Reverb effect preset.
- Getter
Returns curently used
ReverbPreset.- Setter
Set
ReverbPresetto use.
- property volume: int#
Master volume in dB, 100 is max.
- Getter
Returns the volume for the mix engine.
- Setter
Set the master volume for the mix engine.
Helpers#
- class midistream.helpers.Note[source]#
Note number.
>>> Note.A0 21 >>> Note.As0 22 >>> Note.Ab0 20 >>> Note.G9 127
- class midistream.helpers.Control(value)[source]#
Control function number for Control Change messages.
See: https://midi.org/midi-1-0-control-change-messages
- all_sound_off = 120#
All Sound Off
- modulation = 1#
Modulation Wheel
- pan = 10#
Pan
- volume = 7#
Channel Volume
- midistream.helpers.midi_note_on(note: int, channel: int = 0, velocity: int = 64) List[int][source]#
MIDI 9nH message - note on.
>>> midi_note_on(70) [144, 70, 64] >>> midi_note_on(70, velocity=127, channel=15) [159, 70, 127]
- midistream.helpers.midi_note_off(note: int, channel: int = 0, velocity: int = 0) List[int][source]#
MIDI 8nH message - note off.
>>> midi_note_off(70) [128, 70, 0] >>> midi_note_off(70, channel=15) [143, 70, 0]
- midistream.helpers.midi_program_change(program: int, channel: int = 0) List[int][source]#
MIDI CnH message - program change.
>>> midi_program_change(80, 1) [193, 80]
- midistream.helpers.midi_control_change(controller: int, value: int = 0, channel: int = 0) List[int][source]#
MIDI BnH message - control change.
>>> midi_control_change(7, value=127, channel=1) [177, 7, 127]
- midistream.helpers.midi_command_increase_channel(command: List[int], inc: int) List[int][source]#
Increase channel number of a given command.
>>> command = [177, 7, 127] >>> midi_command_increase_channel(command, -7) [170, 7, 127] >>> command [177, 7, 127]
- midistream.helpers.midi_channels() Generator[int, None, None][source]#
Generator of MIDI channels numbers, with percussion (9) channel omited.
>>> list(midi_channels()) [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]