Event Primitives¶
Notes¶
- class NoteTick(time: int, duration: int, pitch: int, velocity: int = 0)¶
Bases:
objectPitched event anchored to a tick timestamp with editable duration and velocity.
Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
Durations use the same tick units
- copy(self, deep: bool = True, /) NoteTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_pitch(self, offset: int, inplace: bool = False) symusic.core.NoteTick¶
Shift the MIDI pitch by offset. Returns a new note unless inplace is True.
- shift_time(self, offset: int, inplace: bool = False) NoteTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- shift_velocity(self, offset: int, inplace: bool = False) symusic.core.NoteTick¶
Offset the MIDI velocity by offset. Returns a new note unless inplace is True.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class NoteQuarter(time: float, duration: float, pitch: int, velocity: int = 0)¶
Bases:
objectPitched event anchored to a quarter note timestamp with editable duration and velocity.
Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
Durations use the same quarter note units
- copy(self, deep: bool = True, /) NoteQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_pitch(self, offset: int, inplace: bool = False) symusic.core.NoteQuarter¶
Shift the MIDI pitch by offset. Returns a new note unless inplace is True.
- shift_time(self, offset: float, inplace: bool = False) NoteQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- shift_velocity(self, offset: int, inplace: bool = False) symusic.core.NoteQuarter¶
Offset the MIDI velocity by offset. Returns a new note unless inplace is True.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class NoteSecond(time: float, duration: float, pitch: int, velocity: int = 0)¶
Bases:
objectPitched event anchored to a second timestamp with editable duration and velocity.
Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
Durations use the same second units
- copy(self, deep: bool = True, /) NoteSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_pitch(self, offset: int, inplace: bool = False) symusic.core.NoteSecond¶
Shift the MIDI pitch by offset. Returns a new note unless inplace is True.
- shift_time(self, offset: float, inplace: bool = False) NoteSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- shift_velocity(self, offset: int, inplace: bool = False) symusic.core.NoteSecond¶
Offset the MIDI velocity by offset. Returns a new note unless inplace is True.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Control Changes¶
- class ControlChangeTick(time: int, number: int, value: int)¶
Bases:
objectStandard MIDI controller event carrying a controller number/value pair on the tick timeline.
Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) ControlChangeTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) ControlChangeTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class ControlChangeQuarter(time: float, number: int, value: int)¶
Bases:
objectStandard MIDI controller event carrying a controller number/value pair on the quarter note timeline.
Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) ControlChangeQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) ControlChangeQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class ControlChangeSecond(time: float, number: int, value: int)¶
Bases:
objectStandard MIDI controller event carrying a controller number/value pair on the second timeline.
Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) ControlChangeSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) ControlChangeSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Tempo¶
- class TempoTick(time: int, mspq: int)¶
Bases:
objectTempo change stored as microseconds-per-quarter note at a tick timestamp. The
qpmproperty mirrors beats-per-minute and mutating it updatesmspqaccordingly.Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) TempoTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) TempoTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property qpm: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property tempo: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class TempoQuarter(time: float, mspq: int)¶
Bases:
objectTempo change stored as microseconds-per-quarter note at a quarter note timestamp. The
qpmproperty mirrors beats-per-minute and mutating it updatesmspqaccordingly.Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) TempoQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TempoQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property qpm: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property tempo: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class TempoSecond(time: float, mspq: int)¶
Bases:
objectTempo change stored as microseconds-per-quarter note at a second timestamp. The
qpmproperty mirrors beats-per-minute and mutating it updatesmspqaccordingly.Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) TempoSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TempoSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property qpm: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property tempo: float¶
Read or set the tempo in quarter-notes per minute. Setting recalculates the stored MSPQ value.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Pedals¶
- class PedalTick(time: int, duration: int)¶
Bases:
objectSustain or soft pedal gesture represented as a timed range on the tick timeline.
Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
Durations use the same tick units
- copy(self, deep: bool = True, /) PedalTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) PedalTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class PedalQuarter(time: float, duration: float)¶
Bases:
objectSustain or soft pedal gesture represented as a timed range on the quarter note timeline.
Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
Durations use the same quarter note units
- copy(self, deep: bool = True, /) PedalQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) PedalQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class PedalSecond(time: float, duration: float)¶
Bases:
objectSustain or soft pedal gesture represented as a timed range on the second timeline.
Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
Durations use the same second units
- copy(self, deep: bool = True, /) PedalSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) PedalSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Pitch Bend¶
- class PitchBendTick(time: int, value: int)¶
Bases:
objectPitch-bend wheel value applied on the tick timeline. The raw 14-bit value matches the MIDI encoding.
Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) PitchBendTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) PitchBendTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class PitchBendQuarter(time: float, value: int)¶
Bases:
objectPitch-bend wheel value applied on the quarter note timeline. The raw 14-bit value matches the MIDI encoding.
Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) PitchBendQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) PitchBendQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class PitchBendSecond(time: float, value: int)¶
Bases:
objectPitch-bend wheel value applied on the second timeline. The raw 14-bit value matches the MIDI encoding.
Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) PitchBendSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) PitchBendSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Key Signatures¶
- class KeySignatureTick(time: int, key: int, tonality: int)¶
Bases:
objectKey signature change scheduled on the tick timeline.
keyis the number of sharps/flats relative to C andtonalityis0for major,1for minor.Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) KeySignatureTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) KeySignatureTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class KeySignatureQuarter(time: float, key: int, tonality: int)¶
Bases:
objectKey signature change scheduled on the quarter note timeline.
keyis the number of sharps/flats relative to C andtonalityis0for major,1for minor.Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) KeySignatureQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) KeySignatureQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class KeySignatureSecond(time: float, key: int, tonality: int)¶
Bases:
objectKey signature change scheduled on the second timeline.
keyis the number of sharps/flats relative to C andtonalityis0for major,1for minor.Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) KeySignatureSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) KeySignatureSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Time Signatures¶
- class TimeSignatureTick(time: int, numerator: int, denominator: int)¶
Bases:
objectMeter change storing beats-per-bar and subdivision (e.g.,
3/4) on the tick timeline. The denominator must be a power of two because it represents note lengths.Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) TimeSignatureTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) TimeSignatureTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class TimeSignatureQuarter(time: float, numerator: int, denominator: int)¶
Bases:
objectMeter change storing beats-per-bar and subdivision (e.g.,
3/4) on the quarter note timeline. The denominator must be a power of two because it represents note lengths.Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) TimeSignatureQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TimeSignatureQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class TimeSignatureSecond(time: float, numerator: int, denominator: int)¶
Bases:
objectMeter change storing beats-per-bar and subdivision (e.g.,
3/4) on the second timeline. The denominator must be a power of two because it represents note lengths.Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) TimeSignatureSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TimeSignatureSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second
Text Meta¶
- class TextMetaTick(time: int, text: str)¶
Bases:
objectFree-form metadata event used for lyrics, markers, or comments on the tick timeline.
Time values are signed 32-bit tick offsets based on the score’s ticks-per-quarter.
Optimized for lossless MIDI editing or workflows that must match the original resolution
- copy(self, deep: bool = True, /) TextMetaTick¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: int, inplace: bool = False) TextMetaTick¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Tick¶
Time unit type — Tick/Quarter/Second
- class TextMetaQuarter(time: float, text: str)¶
Bases:
objectFree-form metadata event used for lyrics, markers, or comments on the quarter note timeline.
Time values are 32-bit floats measured in musical quarter notes.
Optimized for beat-aware editing, tuplets, swing adjustments, or tempo-relative transforms
- copy(self, deep: bool = True, /) TextMetaQuarter¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TextMetaQuarter¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Quarter¶
Time unit type — Tick/Quarter/Second
- class TextMetaSecond(time: float, text: str)¶
Bases:
objectFree-form metadata event used for lyrics, markers, or comments on the second timeline.
Time values are 32-bit floats measured in seconds.
Optimized for audio alignment, wall-clock automation, or duration-based editing
- copy(self, deep: bool = True, /) TextMetaSecond¶
Return a shallow or deep copy depending on deep. Deep copies duplicate underlying storage.
- shift_time(self, offset: float, inplace: bool = False) TextMetaSecond¶
Shift the event’s timestamp by offset. When inplace is False a cloned event is returned.
- property ttype: symusic.core.Second¶
Time unit type — Tick/Quarter/Second