Ardour  9.0-pre0-582-g084a23a80d
PianoKeyBindings Class Reference

#include <piano_key_bindings.h>

Public Types

enum  Layout {
  NO_KEYS , QWERTY , QWERTZ , AZERTY ,
  DVORAK , S_QWERTY , S_QWERTZ
}
 

Public Member Functions

 PianoKeyBindings ()
 
 ~PianoKeyBindings ()
 
void set_layout (Layout layout)
 
int key_binding (const char *key) const
 
const char * note_binding (int note) const
 

Static Public Member Functions

static Layout layout (std::string const &l)
 
static const char * get_keycode (GdkEventKey *event)
 

Private Member Functions

void bind_key (const char *key, int note)
 
void clear_notes ()
 
void bind_keys_qwerty ()
 
void bind_keys_qwertz ()
 
void bind_keys_azerty ()
 
void bind_keys_dvorak ()
 
void bind_keys_basic_qwerty ()
 
void bind_keys_basic_qwertz ()
 

Private Attributes

std::map< std::string, int > _key_bindings
 
std::map< int, std::string > _note_bindings
 

Detailed Description

Definition at line 32 of file piano_key_bindings.h.

Member Enumeration Documentation

◆ Layout

Enumerator
NO_KEYS 
QWERTY 
QWERTZ 
AZERTY 
DVORAK 
S_QWERTY 
S_QWERTZ 

Definition at line 38 of file piano_key_bindings.h.

Constructor & Destructor Documentation

◆ PianoKeyBindings()

PianoKeyBindings::PianoKeyBindings ( )

◆ ~PianoKeyBindings()

PianoKeyBindings::~PianoKeyBindings ( )

Member Function Documentation

◆ bind_key()

void PianoKeyBindings::bind_key ( const char *  key,
int  note 
)
private

◆ bind_keys_azerty()

void PianoKeyBindings::bind_keys_azerty ( )
private

◆ bind_keys_basic_qwerty()

void PianoKeyBindings::bind_keys_basic_qwerty ( )
private

◆ bind_keys_basic_qwertz()

void PianoKeyBindings::bind_keys_basic_qwertz ( )
private

◆ bind_keys_dvorak()

void PianoKeyBindings::bind_keys_dvorak ( )
private

◆ bind_keys_qwerty()

void PianoKeyBindings::bind_keys_qwerty ( )
private

◆ bind_keys_qwertz()

void PianoKeyBindings::bind_keys_qwertz ( )
private

◆ clear_notes()

void PianoKeyBindings::clear_notes ( )
private

◆ get_keycode()

static const char* PianoKeyBindings::get_keycode ( GdkEventKey event)
static

◆ key_binding()

int PianoKeyBindings::key_binding ( const char *  key) const

◆ layout()

static Layout PianoKeyBindings::layout ( std::string const &  l)
static

◆ note_binding()

const char* PianoKeyBindings::note_binding ( int  note) const

◆ set_layout()

void PianoKeyBindings::set_layout ( Layout  layout)

Member Data Documentation

◆ _key_bindings

std::map<std::string, int> PianoKeyBindings::_key_bindings
private

Table used to translate from PC keyboard character to MIDI note number.

Definition at line 67 of file piano_key_bindings.h.

◆ _note_bindings

std::map<int, std::string> PianoKeyBindings::_note_bindings
private

Table to translate from MIDI note number to PC keyboard character.

Definition at line 68 of file piano_key_bindings.h.


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