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

Provides a customizable name overlay for MIDI notes. More...

#include <midinotenames.h>

Public Member Functions

 MidiNoteNames ()=default
 Constructs an empty name set (all notes fall back to MidiNote::name()).
 
String name (MidiNote note) const
 Returns the name for a MIDI note.
 
void setName (MidiNote note, const String &name)
 Sets a custom name for a MIDI note.
 
void clearName (MidiNote note)
 Clears the custom name for a MIDI note (reverts to default).
 
bool hasName (MidiNote note) const
 Returns true if a custom name is set for the given note.
 

Static Public Member Functions

static MidiNoteNames gmPercussion ()
 Creates a name set with General MIDI percussion names.
 

Static Public Attributes

static constexpr int NumNotes = 128
 

Detailed Description

Provides a customizable name overlay for MIDI notes.

MidiNoteNames holds an optional name for each of the 128 MIDI note values. When a name is set for a note, name() returns it; otherwise it falls back to MidiNote::name() (e.g. "C4").

Use the static factory methods to load well-known name sets such as General MIDI percussion.

Member Function Documentation

◆ name()

String MidiNoteNames::name ( MidiNote  note) const
inline

Returns the name for a MIDI note.

If a custom name has been set for this note, it is returned. Otherwise, the default MidiNote::name() is returned.


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