pytakt.constants module¶
- TICKS_PER_QUARTER = 480¶
Constant defining the length of one tick in the pytakt package.
- L1 = 1920¶
- L1DOT = 2880¶
- L1DOTDOT = 3360¶
- L2 = 960¶
- L2DOT = 1440¶
- L2DOTDOT = 1680¶
- L4 = 480¶
- L4DOT = 720¶
- L4DOTDOT = 840¶
- L8 = 240¶
- L8DOT = 360¶
- L8DOTDOT = 420¶
- L16 = 120¶
- L16DOT = 180¶
- L16DOTDOT = 210¶
- L32 = 60¶
- L32DOT = 90¶
- L32DOTDOT = 105¶
- L64 = 30¶
- L64DOT = 45¶
- L64DOTDOT = 52.5¶
- L128 = 15¶
- L128DOT = 22.5¶
- L128DOTDOT = 26.25¶
Constants that represent the number of ticks for each note value. L\(n\) means \(n\)-th notes/rests. DOT means dotted, DOTDOT means double dotted note/rests.
- MAX_DELTA_TIME = 1920¶
Represents the maximum range of time that can be modified by the dt attribute of an event. The absolute value of the dt attribute must be less than or equal to this value.
- CONTROLLERS = {0: 'C_BANK', 1: 'C_MOD', 2: 'C_BREATH', 4: 'C_FOOT', 5: 'C_PORTA', 6: 'C_DATA', 7: 'C_VOL', 8: 'C_BALANCE', 10: 'C_PAN', 11: 'C_EXPR', 32: 'C_BANK_L', 33: 'C_MOD_L', 34: 'C_BREATH_L', 36: 'C_FOOT_L', 37: 'C_PORTA_L', 38: 'C_DATA_L', 39: 'C_VOL_L', 40: 'C_BALANCE_L', 42: 'C_PAN_L', 43: 'C_EXPR_L', 64: 'C_SUSTAIN', 65: 'C_PORTAON', 66: 'C_SOSTENUTO', 67: 'C_SOFTPED', 68: 'C_LEGATO', 69: 'C_HOLD2', 70: 'C_SOUND_VARIATION', 71: 'C_TIMBRE_INTENSITY', 72: 'C_RELEASE_TIME', 73: 'C_ATTACK_TIME', 74: 'C_BRIGHTNESS', 75: 'C_DECAY_TIME', 76: 'C_VIBRATO_RATE', 77: 'C_VIBRATO_DEPTH', 78: 'C_VIBRATO_DELAY', 84: 'C_PORTA_CTRL', 91: 'C_REVERB', 92: 'C_TREMOLO', 93: 'C_CHORUS', 94: 'C_CELESTE_DEPTH', 95: 'C_PHASER_DEPTH', 96: 'C_DATA_INC', 97: 'C_DATA_DEC', 98: 'C_NRPCL', 99: 'C_NRPCH', 100: 'C_RPCL', 101: 'C_RPCH', 120: 'C_ALL_SOUND_OFF', 121: 'C_RESET_ALL_CTRLS', 122: 'C_LOCAL_CONTROL', 123: 'C_ALL_NOTES_OFF', 128: 'C_BEND', 129: 'C_KPR', 130: 'C_CPR', 131: 'C_PROG', 192: 'C_TEMPO'}¶
A dict object defining the controller numbers. Each string that is a value of the dict can also be used as an independent constant, such as
ctrl(C_BANK, 1)
.
- META_EVENT_TYPES = {0: 'M_SEQNO', 1: 'M_TEXT', 2: 'M_COPYRIGHT', 3: 'M_TRACKNAME', 4: 'M_INSTNAME', 5: 'M_LYRIC', 6: 'M_MARK', 7: 'M_CUE', 32: 'M_CHPREFIX', 33: 'M_DEVNO', 47: 'M_EOT', 81: 'M_TEMPO', 84: 'M_SMPTE', 88: 'M_TIMESIG', 89: 'M_KEYSIG'}¶
A dict object that defines numbers representing the types of meta-events. Each string value can also be used as an independent constant.