libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
MusicalNote Class Reference

Represents a single musical note with timing and expression data. More...

#include <musicalnote.h>

Public Types

using List = promeki::List< MusicalNote >
 

Public Member Functions

 MusicalNote ()=default
 Default-constructs an invalid (rest) note.
 
float midiNote () const
 MIDI note number (fractional). Negative values indicate a rest.
 
void setMidiNote (float v)
 Sets the MIDI note number.
 
double startTime () const
 Start time of the note in seconds.
 
void setStartTime (double v)
 Sets the start time of the note in seconds.
 
double duration () const
 Sounding duration in seconds (after legato scaling).
 
void setDuration (double v)
 Sets the sounding duration in seconds.
 
double fullDuration () const
 Full rhythmic duration in seconds (before legato scaling).
 
void setFullDuration (double v)
 Sets the full rhythmic duration in seconds.
 
float amplitude () const
 Note amplitude in the range 0.0 to 1.0.
 
void setAmplitude (float v)
 Sets the note amplitude.
 
float legato () const
 Legato factor in the range 0.0 to 1.0.
 
void setLegato (float v)
 Sets the legato factor.
 
float vibrato () const
 Vibrato depth in semitones.
 
void setVibrato (float v)
 Sets the vibrato depth in semitones.
 
float vibratoRate () const
 Vibrato rate in Hz.
 
void setVibratoRate (float v)
 Sets the vibrato rate in Hz.
 
float tremolo () const
 Tremolo depth in the range 0.0 to 1.0.
 
void setTremolo (float v)
 Sets the tremolo depth.
 
float tremoloRate () const
 Tremolo rate in Hz.
 
void setTremoloRate (float v)
 Sets the tremolo rate in Hz.
 
bool isRest () const
 Returns true if this note is a rest (silence).
 
void setRest (bool v)
 Sets whether this note is a rest.
 

Detailed Description

Represents a single musical note with timing and expression data.

MusicalNote is a lightweight value type that describes a note (or rest) with its MIDI pitch, timing, dynamics, and expression parameters such

Example
note.setMidiNote(60); // Middle C
note.setDuration(1.0); // quarter note
note.setVelocity(0.8); // mezzo-forte
Represents a single musical note with timing and expression data.
Definition musicalnote.h:31
void setMidiNote(float v)
Sets the MIDI note number.
Definition musicalnote.h:41
as vibrato and tremolo. Fractional MIDI note numbers are supported for microtonal or pitch-bent notes.

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