Struct Vst3MusicalContext
A per-block snapshot of musical/transport state for a hosted instrument's ProcessContext —
tempo, time signature, musical position and whether the transport is playing. Pushed to a
Vst3Plugin via SetMusicalContext(in Vst3MusicalContext) before each
Process(ReadOnlySpan<float>, Span<float>, int) call so tempo-following plug-ins (arpeggiators, tempo-synced
delays, LFOs) lock to the host timeline. Vst3MidiInstrument builds one of these from
the sequencer's Transport / ITempoMap / TimeSignatureMap; advanced callers
driving Vst3Plugin directly can populate it themselves.
public readonly record struct Vst3MusicalContext : IEquatable<Vst3MusicalContext>
- Implements
- Inherited Members
Constructors
Vst3MusicalContext(bool, long, double, double, double, int, int)
A per-block snapshot of musical/transport state for a hosted instrument's ProcessContext —
tempo, time signature, musical position and whether the transport is playing. Pushed to a
Vst3Plugin via SetMusicalContext(in Vst3MusicalContext) before each
Process(ReadOnlySpan<float>, Span<float>, int) call so tempo-following plug-ins (arpeggiators, tempo-synced
delays, LFOs) lock to the host timeline. Vst3MidiInstrument builds one of these from
the sequencer's Transport / ITempoMap / TimeSignatureMap; advanced callers
driving Vst3Plugin directly can populate it themselves.
public Vst3MusicalContext(bool IsPlaying, long ProjectTimeSamples, double ProjectTimeMusic, double BarPositionMusic, double Tempo, int TimeSigNumerator, int TimeSigDenominator)
Parameters
IsPlayingboolWhether the transport is running (sets the VST 3
kPlayingstate flag).ProjectTimeSampleslongPlayhead position in samples (project + continuous time).
ProjectTimeMusicdoublePlayhead position in quarter notes.
BarPositionMusicdoubleThe current bar's start position in quarter notes.
TempodoubleTempo in BPM at the playhead.
TimeSigNumeratorintTime-signature numerator (beats per bar).
TimeSigDenominatorintTime-signature denominator (note value of a beat).
Properties
BarPositionMusic
The current bar's start position in quarter notes.
public double BarPositionMusic { get; init; }
Property Value
IsPlaying
Whether the transport is running (sets the VST 3 kPlaying state flag).
public bool IsPlaying { get; init; }
Property Value
ProjectTimeMusic
Playhead position in quarter notes.
public double ProjectTimeMusic { get; init; }
Property Value
ProjectTimeSamples
Playhead position in samples (project + continuous time).
public long ProjectTimeSamples { get; init; }
Property Value
Tempo
Tempo in BPM at the playhead.
public double Tempo { get; init; }
Property Value
TimeSigDenominator
Time-signature denominator (note value of a beat).
public int TimeSigDenominator { get; init; }
Property Value
TimeSigNumerator
Time-signature numerator (beats per bar).
public int TimeSigNumerator { get; init; }