MIDI API Datatypes


MidiStatus

Include File:  imidieffect.h

enum MidiStatus
{
	kNoteOff = 0x80,
	kNoteOn = 0x90,
	kPolyPressure = 0xA0,
	kController = 0xB0,
	kProgramChange = 0xC0,
	kAfterTouch = 0xD0,
	kPitchBend = 0xE0,

	kSysexStart = 0xF0,
	kQuarterFrame = 0xF1,
	kSongPointer = 0xF2,
	kSongSelect = 0xF3,
	kCableSelect = 0xF5,
	kSysexEnd = 0xF7,
	kMidiClock = 0xF8,
	kMidiClockStart = 0xFA,
	kMidiClockContinue = 0xFB,
	kMidiClockStop = 0xFC,
	kActiveSensing = 0xFE,
	kMidiReset = 0xFF
};

Declaration of supported MIDI status types according to the MIDI Standard Specification.


MidiEffectCaps

Include File:  imidieffect.h

This structure specifies the capabilities of a MIDI effect when the host calls IMidiEffect::getCaps.


MidiContextInfo

Include File:  imidieffect.h

struct MidiContextInfo
{
	long tempo;
	long ppqPosition;
	long stopPosition;

	long performedCyclesPpq;
	long performedCyclesImmediatePpq;
	long numberOfPerformedCycles;

	long barPos;
	long barCount;
	long beatCount;
	long remainder;

	short numerator;
	short denominator;
};

Structure with metrical information at a certain PPQ position in the current host arrangement. To fill this structure, you have to call IMEAccessor::getContextInfo.

Member Description
tempo Tempo in BPM times 1000 (e.g. 120000 equals 120.000 BPM)
ppqPosition Current PPQ-based play position of the Plug-In. As the Plug-In normally plays ahead of time, it is not the current play position in a project!
stopPosition In case of playback in Stop Mode this is the anchor start position.
All following calls to IMidiEffect::playAction with "immediate" set to true will be based on this position as the starting point.
performedCyclesPpq (see performedCyclesImmediatePpq)
performedCyclesImmediatePpq Convenience counter for sum of ellapsed cycles in PPQ-base.
(As Cubase SX is currently not able to change cycle-ranges "on the fly" it is less important at the moment.)
numberOfPerformedCycles Convenience - if swapAction method is not overwritten to perform this count.
barPos PPQ-based start position of current bar.
(Example: ppq of 961 will result in a barPos value of 0 for a 4/4 time signature, but in a value of 960 for 2/4 time signature).
barCount zero-based bar number at PPQ-position
beatCount zero-based beat number at PPQ-position
remainder remaining ticks (bar.beat.ticks)
numerator numerator of time signature at PPQ-position
denominator denominator of time signature at PPQ-position



Copyright ©2004 Steinberg Media Technologies GmbH. All Rights Reserved.
Last Modified: