예제 #1
0
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
    ))
예제 #2
0
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)
    ))
예제 #3
0
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
    ))
예제 #4
0
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
    ))
예제 #5
0
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
    ))
예제 #6
0
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
    ))
예제 #7
0
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
    ))
예제 #8
0
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,
    ))
예제 #9
0
def SubSceneSwitch(number=_constants.EVENT_PROGRAM):
    return _Unit(_mididings.SubSceneSwitch(_util.actual_ref(number), 0, False))
예제 #10
0
파일: engine.py 프로젝트: Darko8/mididings
def SubSceneSwitch(number=_constants.EVENT_PROGRAM):
    return _Unit(_mididings.SubSceneSwitch(_util.actual_ref(number), 0, False))