def Ctrl(port, channel, ctrl, value): """ Ctrl(ctrl, value) Ctrl(port, channel, ctrl, value) Create a control change event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.CTRL, _util.actual_ref(port), _util.actual_ref(channel), ctrl, value ))
def Program(port, channel, program): """ Program(program) Program(port, channel, program) Create a program change event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.PROGRAM, _util.actual_ref(port), _util.actual_ref(channel), 0, _util.actual_ref(program) ))
def NoteOff(port, channel, note, velocity=0): """ NoteOff(note, velocity=0) NoteOff(port, channel, note, velocity=0) Create a note-off event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.NOTEOFF, _util.actual_ref(port), _util.actual_ref(channel), note, velocity ))
def PolyAftertouch(port, channel, note, value): """ PolyAftertouch(note, value) PolyAftertouch(port, channel, note, value) Create a polyphonic aftertouch event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.POLY_AFTERTOUCH, _util.actual_ref(port), _util.actual_ref(channel), note, value ))
def Aftertouch(port, channel, value): """ Aftertouch(value) Aftertouch(port, channel, value) Create an aftertouch event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.AFTERTOUCH, _util.actual_ref(port), _util.actual_ref(channel), 0, value ))
def Pitchbend(port, channel, value): """ Pitchbend(value) Pitchbend(port, channel, value) Create a pitch-bend event, replacing the incoming event. """ return _Unit(_mididings.Generator( _constants.PITCHBEND, _util.actual_ref(port), _util.actual_ref(channel), 0, value ))
def Generator(type, port=_constants.EVENT_PORT, channel=_constants.EVENT_CHANNEL, data1=0, data2=0): """ Generator(type, port, channel, data1=0, data2=0) Generic generator to change the incoming event's type and data. System common and system realtime events can only be created this way. """ return _Unit(_mididings.Generator( type, _util.actual_ref(port), _util.actual_ref(channel), data1, data2 ))
def SysEx(port, sysex): """ SysEx(sysex) SysEx(port, sysex) Create a system exclusive event, replacing the incoming event. *sysex* can be a string (binary or ASCII) or a sequence of integers, and must include the leading ``F0`` and trailing ``F7`` bytes. """ return _Unit(_mididings.SysExGenerator( _util.actual_ref(port), sysex, ))
def SubSceneSwitch(number=_constants.EVENT_PROGRAM): return _Unit(_mididings.SubSceneSwitch(_util.actual_ref(number), 0, False))