TracktionEngine
Static Public Member Functions | List of all members
tracktion::engine::MPEStartTrimmer Struct Reference

If you need to play back MPE data from a point after the data starts, it's important to reconstruct the expression values immediately preceding the last note-on, then the note on, then the last expression values before the trim point. More...

Static Public Member Functions

static void reconstructExpression (juce::Array< juce::MidiMessage > &mpeMessagesToAddAtStart, const juce::MidiMessageSequence &data, int trimIndex, int channel)
 Reconstruct note expression for a particular channel. More...
 
static void reconstructExpression (juce::Array< juce::MidiMessage > &mpeMessagesToAddAtStart, const choc::midi::Sequence &data, size_t trimIndex, int channel1to16)
 Reconstruct note expression for a particular channel. More...
 

Detailed Description

If you need to play back MPE data from a point after the data starts, it's important to reconstruct the expression values immediately preceding the last note-on, then the note on, then the last expression values before the trim point.

If you don't, many instruments that rely on relative starting points (particularly common with CC74, 'timbre') or resetting voices to a start value before the note on, will sound wrong when played back.

Member Function Documentation

◆ reconstructExpression() [1/2]

static void tracktion::engine::MPEStartTrimmer::reconstructExpression ( juce::Array< juce::MidiMessage > &  mpeMessagesToAddAtStart,
const juce::MidiMessageSequence &  data,
int  trimIndex,
int  channel 
)
static

Reconstruct note expression for a particular channel.

Reconstructed messages will be added to the mpeMessagesToAddAtStart array. These messages should be played back (in order) to properly restore the MPE 'state' at the trimIndex.

Referenced by tracktion::engine::MidiNodeHelpers::createMessagesForTime().

◆ reconstructExpression() [2/2]

static void tracktion::engine::MPEStartTrimmer::reconstructExpression ( juce::Array< juce::MidiMessage > &  mpeMessagesToAddAtStart,
const choc::midi::Sequence &  data,
size_t  trimIndex,
int  channel1to16 
)
static

Reconstruct note expression for a particular channel.

Reconstructed messages will be added to the mpeMessagesToAddAtStart array. These messages should be played back (in order) to properly restore the MPE 'state' at the trimIndex.


The documentation for this struct was generated from the following file: