GuitarPrometheus::Midi::MidiEvent
GuitarPrometheus::Midi::MidiEvent
Internal tick-space MIDI event produced by KeyswitchInjector and consumed by OctaveTransposer, Humanizer, and MidiWriter. More…
#include <MidiEvent.h>
Public Attributes
| Name | |
|---|---|
| int | tick Absolute tick position (part-relative, matching Engraving::getStartTick()). |
| int | channel MIDI channel, 0-15. |
| MidiEventType | type Event category. |
| int | data1 First data byte: note number for Note*; CC# for ControlChange; program for ProgramChange. |
| int | data2 Second data byte: velocity for Note*; CC value for ControlChange. |
| std::optional< juce::Uuid > | sourceNoteId Identity of the source Engraving that produced this event, if any. |
Detailed Description
struct GuitarPrometheus::Midi::MidiEvent;Internal tick-space MIDI event produced by KeyswitchInjector and consumed by OctaveTransposer, Humanizer, and MidiWriter.
Independent of juce::MidiMessage so the pipeline stages can reason about source provenance (via sourceNoteId) without fighting JUCE’s encoding.
Ordering at equal ticks is a writer-side concern: ProgramChange/BankSelect < keyswitch NoteOn < note NoteOn < note NoteOff < keyswitch NoteOff. See MidiWriter for the stable sort.
Public Attributes Documentation
variable tick
int tick = 0;Absolute tick position (part-relative, matching Engraving::getStartTick()).
variable channel
int channel = 0;MIDI channel, 0-15.
variable type
MidiEventType type = MidiEventType::NoteOn;Event category.
variable data1
int data1 = 0;First data byte: note number for Note*; CC# for ControlChange; program for ProgramChange.
variable data2
int data2 = 0;Second data byte: velocity for Note*; CC value for ControlChange.
variable sourceNoteId
std::optional< juce::Uuid > sourceNoteId;Identity of the source Engraving that produced this event, if any.
Present on note-NoteOn / NoteOff pairs that represent a played note; absent (std::nullopt) for keyswitches, program changes, bank selects, and meta events. Used by OctaveTransposer and Humanizer to distinguish music from control data.
Updated on 2026-05-29 at 07:39:52 +0000