Esempio n. 1
0
def ValidatePtr2(p0, p1, p2):
    a = _RPR._ft['ValidatePtr2']
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_uint64, ct.c_char_p)(a)
    project = _RPR.rpr_packp('ReaProject*', p0)
    pointer = ct.c_uint64(p1)
    name = _RPR.rpr_packsc(p2)
    return f(project, pointer, name)
Esempio n. 2
0
def MIDI_GetTrackHash(p0, p1, p2, p3):
    a = _RPR._ft['MIDI_GetTrackHash']
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_byte, ct.c_char_p,
                     ct.c_int)(a)
    t = (_RPR.rpr_packp('MediaTrack*',
                        p0), ct.c_byte(p1), packs_l(p2), ct.c_int(p3))
    r = f(t[0], t[1], t[2], t[3])
    return (r, p0, p1, unpacks_l(t[2]), p3)
Esempio n. 3
0
def MIDI_SetAllEvts(take, buf, buf_sz):
    a = _RPR._ft["MIDI_SetAllEvts"]
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_char_p, ct.c_int)(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        packs_l(buf, size=buf_sz),
        ct.c_int(buf_sz)
    )
Esempio n. 4
0
def MIDI_GetEvt(take, evtidx, selectedOut, mutedOut, ppqposOut, msg, msg_sz):
    a = _RPR._ft['MIDI_GetEvt']
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p,
                     ct.c_void_p, ct.c_void_p, ct.c_char_p, ct.c_void_p)(a)
    t = (_RPR.rpr_packp('MediaItem_Take*', take), ct.c_int(evtidx),
         ct.c_byte(selectedOut), ct.c_byte(mutedOut), ct.c_double(ppqposOut),
         packs_l(msg), ct.c_int(msg_sz))
    r = f(t[0], t[1], ct.byref(t[2]), ct.byref(t[3]), ct.byref(t[4]), t[5],
          ct.byref(t[6]))
    return (r, take, evtidx, int(t[2].value), int(t[3].value),
            float(t[4].value), unpacks_l(t[5]), int(t[6].value))
Esempio n. 5
0
def MIDI_GetHash(p0, p1, p2, p3):
    a = _RPR._ft["MIDI_GetHash"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_byte,  ct.c_char_p, ct.c_int
    )(a)
    t = (
        _RPR.rpr_packp("MediaItem_Take*", p0), ct.c_byte(p1), packs_l(p2),
        ct.c_int(p3)
    )
    r = f(*t)
    return r, p0, p1, unpacks_l(t[2]), p3
Esempio n. 6
0
def MIDI_GetAllEvts(take, bufNeedBig, bufNeedBig_sz):
    address = _RPR._ft["MIDI_GetAllEvts"]
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_char_p, ct.c_void_p)(address)
    c_msg = packs_l(bufNeedBig, size=bufNeedBig_sz)
    c_msg_length = ct.c_int(bufNeedBig_sz)
    success = f(
        _RPR.rpr_packp("MediaItem_Take*", take), c_msg, ct.byref(c_msg_length)
    )
    msg_length = c_msg_length.value
    msg = unpacks_l(c_msg, want_raw=True)[:msg_length]
    return success, take, msg, msg_length
Esempio n. 7
0
def MIDI_SetEvt(p0, p1, p2, p3, p4, p5, p6, p7):
    a = _RPR._ft['MIDI_SetEvt']
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p,
                     ct.c_void_p, ct.c_void_p, ct.c_char_p, ct.c_int,
                     ct.c_void_p)(a)
    t = (_RPR.rpr_packp('MediaItem_Take*',
                        p0), ct.c_int(p1), ct.c_byte(p2), ct.c_byte(p3),
         ct.c_double(p4), packs_l(p5), ct.c_int(p6), ct.c_byte(p7))
    r = f(t[0], t[1], ct.byref(t[2]), ct.byref(t[3]), ct.byref(t[4]), t[5],
          t[6], ct.byref(t[7]))
    return (r, p0, p1, int(t[2].value), int(t[3].value), float(t[4].value), p5,
            p6, int(t[7].value))
Esempio n. 8
0
def MIDI_SetCCShape(take, ccidx, shape, beiz_tens, no_sort):
    a = _RPR._ft["MIDI_SetCCShape"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_int, ct.c_double, ct.c_void_p
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_int(ccidx),
        ct.c_int(shape),
        ct.c_double(beiz_tens),
        None if no_sort is None else ct.byref(ct.c_byte(no_sort))
    )
Esempio n. 9
0
def MIDI_InsertEvt(take, selected, muted, ppqpos, bytestr, bytestr_sz):
    a = _RPR._ft["MIDI_InsertEvt"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_byte, ct.c_byte, ct.c_double, ct.c_char_p,
        ct.c_int
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_byte(selected),
        ct.c_byte(muted),
        ct.c_double(ppqpos),
        packs_l(bytestr),
        ct.c_int(bytestr_sz)
    )
Esempio n. 10
0
def MIDI_InsertEvt(take, selected, muted, ppqpos, bytestr, bytestr_sz):
    a = _RPR._ft['MIDI_InsertEvt']
    f = ct.CFUNCTYPE(ct.c_byte, ct.c_uint64, ct.c_byte, ct.c_byte, ct.c_double,
                     ct.c_char_p, ct.c_int)(a)
    t = (
        _RPR.rpr_packp(
            'MediaItem_Take*',  # 0
            take),
        ct.c_byte(selected),  # 1
        ct.c_byte(muted),  # 2
        ct.c_double(ppqpos),  # 3
        packs_l(bytestr),  # 4
        ct.c_int(bytestr_sz)  # 5
    )
    r = f(t[0], t[1], t[2], t[3], t[4], t[5])
    return r
Esempio n. 11
0
def MIDI_SetEvt(take, evt_idx, selected, muted, ppqpos, msg, msg_sz, no_sort):
    a = _RPR._ft["MIDI_SetEvt"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_char_p, ct.c_int, ct.c_void_p
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_int(evt_idx),
        None if selected is None else ct.byref(ct.c_byte(selected)),
        None if muted is None else ct.byref(ct.c_byte(muted)),
        None if ppqpos is None else ct.byref(ct.c_double(ppqpos)),
        None if msg is None else packs_l(msg),
        ct.c_int(msg_sz if msg_sz is not None else 0),
        None if no_sort is None else ct.byref(ct.c_byte(no_sort))
    )
Esempio n. 12
0
def MIDI_SetTextSysexEvt(
    take, idx, selected, muted, ppqpos, type_, msg, msg_sz, noSort
):
    a = _RPR._ft["MIDI_SetTextSysexEvt"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_void_p, ct.c_char_p, ct.c_int, ct.c_void_p
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_int(idx),
        None if selected is None else ct.byref(ct.c_byte(selected)),
        None if muted is None else ct.byref(ct.c_byte(muted)),
        None if ppqpos is None else ct.byref(ct.c_double(ppqpos)),
        None if type_ is None else ct.byref(ct.c_int(type_)),
        None if msg is None else packs_l(msg, size=msg_sz),
        ct.c_int(0) if msg_sz is None else ct.c_int(msg_sz),
        None if noSort is None else ct.byref(ct.c_byte(noSort))
    )
Esempio n. 13
0
def MIDI_SetCC(
    take, ccidx, selected, muted, ppqpos, chan_msg, channel, msg2, msg3, sort
):
    a = _RPR._ft["MIDI_SetCC"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p,
        ct.c_void_p
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_int(ccidx),
        None if selected is None else ct.byref(ct.c_byte(selected)),
        None if muted is None else ct.byref(ct.c_byte(muted)),
        None if ppqpos is None else ct.byref(ct.c_double(ppqpos)),
        None if chan_msg is None else ct.byref(ct.c_int(chan_msg)),
        None if channel is None else ct.byref(ct.c_int(channel)),
        None if msg2 is None else ct.byref(ct.c_int(msg2)),
        None if msg3 is None else ct.byref(ct.c_int(msg3)),
        None if sort is None else ct.c_byte(sort)
    )
Esempio n. 14
0
def MIDI_GetEvt(take, evtidx, selectedOut, mutedOut, ppqposOut, msg, msg_sz):
    address = _RPR._ft["MIDI_GetEvt"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_char_p, ct.c_void_p
    )(address)
    c_selected = ct.c_byte(selectedOut)
    c_muted = ct.c_byte(mutedOut)
    c_ppq_position = ct.c_double(ppqposOut)
    c_msg = packs_l(msg, size=msg_sz)
    c_msg_length = ct.c_int(msg_sz)
    success = f(
        _RPR.rpr_packp("MediaItem_Take*", take), ct.c_int(evtidx),
        ct.byref(c_selected), ct.byref(c_muted), ct.byref(c_ppq_position),
        c_msg, ct.byref(c_msg_length)
    )
    msg_length = c_msg_length.value
    msg = unpacks_l(c_msg, want_raw=True)[:msg_length]
    return (
        success, take, evtidx, c_selected.value, c_muted.value,
        c_ppq_position.value, msg, msg_length
    )
Esempio n. 15
0
def MIDI_SetNote(
    take, idx, selected, muted, startppqpos, endppqpos, chan, pitch, vel,
    noSort
):
    a = _RPR._ft["MIDI_SetNote"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p,
        ct.c_void_p
    )(a)
    return f(
        _RPR.rpr_packp("MediaItem_Take*", take),
        ct.c_int(idx),
        None if selected is None else ct.byref(ct.c_byte(selected)),
        None if muted is None else ct.byref(ct.c_byte(muted)),
        None if startppqpos is None else ct.byref(ct.c_double(startppqpos)),
        None if endppqpos is None else ct.byref(ct.c_double(endppqpos)),
        None if chan is None else ct.byref(ct.c_int(chan)),
        None if pitch is None else ct.byref(ct.c_int(pitch)),
        None if vel is None else ct.byref(ct.c_int(vel)),
        None if noSort is None else ct.byref(ct.c_byte(noSort))
    )
Esempio n. 16
0
def MIDI_GetTextSysexEvt(p0, p1, p2, p3, p4, p5, p6, p7):
    address = _RPR._ft["MIDI_GetTextSysexEvt"]
    f = ct.CFUNCTYPE(
        ct.c_byte, ct.c_uint64, ct.c_int, ct.c_void_p, ct.c_void_p,
        ct.c_void_p, ct.c_void_p, ct.c_char_p, ct.c_void_p
    )(address)
    c_selected = ct.c_byte(p2)
    c_muted = ct.c_byte(p3)
    c_ppq_position = ct.c_double(p4)
    c_type = ct.c_int(p5)
    c_msg = packs_l(p6, size=p7)
    c_msg_length = ct.c_int(p7)
    success = f(
        _RPR.rpr_packp("MediaItem_Take*", p0), ct.c_int(p1),
        ct.byref(c_selected), ct.byref(c_muted), ct.byref(c_ppq_position),
        ct.byref(c_type), c_msg, ct.byref(c_msg_length)
    )
    msg_length = c_msg_length.value
    msg = unpacks_l(c_msg, want_raw=True)[:msg_length]
    return (
        success, p0, p1, c_selected.value, c_muted.value, c_ppq_position.value,
        c_type.value, msg, msg_length
    )