The event type of HISE. More...
Public Types | |
enum | Type : uint8 { Empty = 0, NoteOn, NoteOff, Controller, PitchBend, Aftertouch, AllNotesOff, SongPosition, MidiStart, MidiStop, VolumeFade, PitchFade, TimerEvent, ProgramChange } |
The type of the event. More... | |
Public Member Functions | |
void | addToTimeStamp (int16 delta) noexcept |
Adds the delta value to the timestamp. More... | |
int | getAfterTouchValue () const noexcept |
Copied from MidiMessage. More... | |
int | getChannel () const noexcept |
Returns the MIDI channel. More... | |
int | getChannelPressureValue () const noexcept |
Copied from MidiMessage. More... | |
int | getCoarseDetune () const noexcept |
Returns the coarse detune amount in semitones. More... | |
int | getControllerNumber () const noexcept |
Copied from MidiMessage. More... | |
int | getControllerValue () const noexcept |
Copied from MidiMessage. More... | |
uint16 | getEventId () const noexcept |
Returns the event ID of the message. More... | |
int | getFadeTime () const noexcept |
Returns the fade time for both pitch and volume fades. More... | |
int | getFineDetune () const noexcept |
Returns the fine detune amount int cents. More... | |
float | getFloatVelocity () const noexcept |
Copied from MidiMessage. More... | |
int | getGain () const noexcept |
returns the gain in decibels. More... | |
float | getGainFactor () const noexcept |
Returns the gain factor (from 0...1) for the given event. More... | |
int | getNoteNumber () const noexcept |
Copied from MidiMessage. More... | |
double | getPitchFactorForEvent () const |
Returns a ready to use pitch factor (from 0.5 ... More... | |
int | getPitchWheelValue () const noexcept |
Copied from MidiMessage. More... | |
int | getProgramChangeNumber () const noexcept |
Copied from MidiMessage. More... | |
int | getSongPositionPointerMidiBeat () const noexcept |
Copied from MidiMessage. More... | |
uint16 | getStartOffset () const noexcept |
Returns the start offset of the event. More... | |
int | getTimerIndex () const noexcept |
Returns the index of the timer slot. More... | |
uint16 | getTimeStamp () const noexcept |
Returns the timestamp of the message. More... | |
int | getTransposeAmount () const noexcept |
Returns the transpose amount. More... | |
Type | getType () const noexcept |
Returns the Type of the HiseEvent. More... | |
String | getTypeAsString () const noexcept |
Returns a String representation of the type. More... | |
uint8 | getVelocity () const noexcept |
Copied from MidiMessage. More... | |
HiseEvent () | |
Creates an empty HiseEvent. More... | |
HiseEvent (const MidiMessage &message) | |
Creates a HiseEvent from a MIDI message. More... | |
HiseEvent (Type type_, uint8 number_, uint8 value_, uint8 channel_=1) | |
Creates a HiseEvent with the given data. More... | |
HiseEvent (const HiseEvent &other) noexcept | |
Creates a bit-wise copy of another event. More... | |
void | ignoreEvent (bool shouldBeIgnored) noexcept |
Ignores the event. More... | |
bool | isAftertouch () const noexcept |
Copied from MidiMessage. More... | |
bool | isAllNotesOff () const noexcept |
Copied from MidiMessage. More... | |
bool | isArtificial () const noexcept |
Returns true if this method was created artificially. More... | |
bool | isChannelPressure () const noexcept |
Copied from MidiMessage. More... | |
bool | isController () const noexcept |
Copied from MidiMessage. More... | |
bool | isControllerOfType (int controllerType) const noexcept |
Copied from MidiMessage. More... | |
bool | isEmpty () const noexcept |
Returns true if the HiseEvent is empty. More... | |
bool | isIgnored () const noexcept |
Checks if the message was marked as ignored (by a script). More... | |
bool | isMidiStart () const noexcept |
Copied from MidiMessage. More... | |
bool | isMidiStop () const noexcept |
Copied from MidiMessage. More... | |
bool | isNoteOff () const noexcept |
Copied from MidiMessage. More... | |
bool | isNoteOn (bool returnTrueForVelocity0=false) const noexcept |
Copied from MidiMessage. More... | |
bool | isNoteOnOrOff () const noexcept |
Copied from MidiMessage. More... | |
bool | isPitchFade () const noexcept |
Returns true if the event is a pitch fade. More... | |
bool | isPitchWheel () const noexcept |
Copied from MidiMessage. More... | |
bool | isProgramChange () const noexcept |
Copied from MidiMessage. More... | |
bool | isSongPositionPointer () const noexcept |
Copied from MidiMessage. More... | |
bool | isTimerEvent () const noexcept |
Returns true if the event is a timer event. More... | |
bool | isVolumeFade () const noexcept |
Returns true if the event is a volume fade. More... | |
bool | operator== (const HiseEvent &other) const |
checks whether the event is equal to another. More... | |
void | setAfterTouchValue (int noteNumber, int aftertouchAmount) noexcept |
Copied from MidiMessage. More... | |
void | setArtificial () noexcept |
If the event was created artificially by a MIDI Processor, it will call this method. More... | |
void | setChannel (int newChannelNumber) noexcept |
Sets the MIDI channel. More... | |
void | setChannelPressureValue (int pressure) noexcept |
Copied from MidiMessage. More... | |
void | setCoarseDetune (int semiToneDetune) noexcept |
Sets the coarse detune amount in semitones. More... | |
void | setControllerNumber (int controllerNumber) noexcept |
Copied from MidiMessage. More... | |
void | setControllerValue (int controllerValue) noexcept |
Copied from MidiMessage. More... | |
void | setEventId (uint16 newEventId) noexcept |
Sets the event ID of the HiseEvent. More... | |
void | setFadeTime (int fadeTime) noexcept |
Sets the fade time for the event type. More... | |
void | setFineDetune (int newCents) noexcept |
Sets the fine detune amount in cents. More... | |
void | setGain (int decibels) noexcept |
Sets the gain in decibels for this note. More... | |
void | setNoteNumber (int newNoteNumber) noexcept |
Copied from MidiMessage. More... | |
void | setPitchWheelValue (int position) noexcept |
Copied from MidiMessage. More... | |
void | setSongPositionValue (int positionInMidiBeats) |
Copied from MidiMessage. More... | |
void | setStartOffset (uint16 startOffset) noexcept |
Adds a offset to the event. More... | |
void | setTimeStamp (int newTimestamp) noexcept |
Sets the timestamp to a sample offset in the future. More... | |
void | setTransposeAmount (int newTransposeValue) noexcept |
Sets the transpose amount of the given event ID. More... | |
void | setType (Type t) noexcept |
Changes the type. More... | |
void | setVelocity (uint8 newVelocity) noexcept |
Copied from MidiMessage. More... | |
void | swapWith (HiseEvent &other) |
Swaps the event with another. More... | |
Static Public Member Functions | |
static void | clear (HiseEvent *eventToClear, int numEvents=1) |
This clears the events using the fast memset operation. More... | |
static HiseEvent | createPitchFade (uint16 eventId, int fadeTimeMilliseconds, int8 coarseTune, int8 fineTune) |
Creates a pitch fade. More... | |
static HiseEvent | createTimerEvent (uint8 timerIndex, uint16 offset) |
Creates a timer event. More... | |
static HiseEvent | createVolumeFade (uint16 eventId, int fadeTimeMilliseconds, int8 targetValue) |
Creates a volume fade. More... | |
The event type of HISE.
This is an enhancement of the MIDI Standard and is used for all internal events in the audio path of HISE.
The MIDI standard (and its implementation of JUCE) have a few limitations and misses some convenient data. Therefore, a new event type was introduced, with the following additions:
Most of its methods aim to be fully compatible to the juce::MidiMessage class, so if you're used to this class, you will find your way around this class pretty quickly.
|
strong |
The type of the event.
The most important MIDI types are there, but there are a few more interesting types for internal HISE stuff.
Creates a HiseEvent with the given data.
|
noexcept |
Adds the delta value to the timestamp.
|
inlinestatic |
This clears the events using the fast memset operation.
|
static |
Creates a pitch fade.
eventID | the ID of the event that will be changed. |
fadeTimeMilliseconds | the length of the fade. |
coarseTune | the target pitch in semitones |
fineTune | the target pitch detune in cent. |
|
static |
Creates a timer event.
timerIndex | There are 4 timer slots per sound generator and this will contain the index (0-3). |
offset | the sample offset within the current buffer [0 - buffer size). |
|
static |
Creates a volume fade.
eventId | the event ID that this fade should be applied to. |
fadeTimeMilliseconds | the fade time (it will be a linear fade). the target gain in decibels. |
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns the MIDI channel.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns the coarse detune amount in semitones.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns the event ID of the message.
The event IDs will be automatically created by HISE when it is processing the incoming MIDI messages and associates sequentially increasing IDS for each note-on and its corresponding note-off event.
Be aware the the event ID is stored as unsigned 16 bit integer, so it will wrap around
|
inlinenoexcept |
Returns the fade time for both pitch and volume fades.
|
inlinenoexcept |
Returns the fine detune amount int cents.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
returns the gain in decibels.
|
inlinenoexcept |
Returns the gain factor (from 0...1) for the given event.
|
inlinenoexcept |
Copied from MidiMessage.
double getPitchFactorForEvent | ( | ) | const |
Returns a ready to use pitch factor (from 0.5 ...
2.0)
|
noexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
noexcept |
Returns the start offset of the event.
|
inlinenoexcept |
Returns the index of the timer slot.
|
inlinenoexcept |
Returns the timestamp of the message.
The timestamp is the offset from the current buffer start. If the timestamp is bigger than the current buffer size, the message will be delayed until the buffer range contains the time stamp.
|
inlinenoexcept |
Returns the transpose amount.
Be aware that you need to take this into account when you need the actual note-number of an HiseEvent.
|
noexcept |
Returns a String representation of the type.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Ignores the event.
Ignored events will not be processed, but remain in the buffer (they are not cleared).
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns true if this method was created artificially.
Events that come in as MIDI message (no matter if their origin is in an actual key press or if there was a previous MIDI processor (like an arpeggiator) that created it, will be flagged as "non-artificial". Events that are created within HISE are flagged as "artificial".
This information can be useful sometimes in order to prevent endless recursive loops. Also, the HiseEventBuffer::Iterator class can be told to skip artificial events.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns true if the HiseEvent is empty.
|
inlinenoexcept |
Checks if the message was marked as ignored (by a script).
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
noexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns true if the event is a pitch fade.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Returns true if the event is a timer event.
|
inlinenoexcept |
Returns true if the event is a volume fade.
bool operator== | ( | const HiseEvent & | other | ) | const |
checks whether the event is equal to another.
This checks for bit-equality.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
If the event was created artificially by a MIDI Processor, it will call this method.
You don't need to use this yourself.
|
inlinenoexcept |
Sets the MIDI channel.
Note that in HISE you have 256 MIDI channels.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Sets the coarse detune amount in semitones.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Copied from MidiMessage.
|
inlinenoexcept |
Sets the event ID of the HiseEvent.
Normally you don't need to do this because HISE will automatically assign this to note-on / note-off messages, but for all the types that alter an existing event (like volume-fades), this can be used for setting the target event.
|
inlinenoexcept |
Sets the fade time for the event type.
Only valid for VolumeFade and PitchFade types.
|
inlinenoexcept |
Sets the fine detune amount in cents.
|
inlinenoexcept |
Sets the gain in decibels for this note.
|
noexcept |
Copied from MidiMessage.
|
noexcept |
Copied from MidiMessage.
void setSongPositionValue | ( | int | positionInMidiBeats | ) |
Copied from MidiMessage.
|
noexcept |
Adds a offset to the event.
Unlike the timestamp, this will not delay the event to the future, but tell the sound generator to skip the given amount when the voice starts. This can be used for eg. skipping the attack phase of samples.
|
noexcept |
Sets the timestamp to a sample offset in the future.
|
inlinenoexcept |
Sets the transpose amount of the given event ID.
Unlike changing the note-number directly, this method will keep the original note number so that you don't have to process the note-off number to match the note-on.
This is the recommended way of handling all note-number processing in HISE.
|
inlinenoexcept |
Changes the type.
Don't use this unless you know why.
|
inlinenoexcept |
Copied from MidiMessage.
void swapWith | ( | HiseEvent & | other | ) |
Swaps the event with another.