]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/feature_audio.md
break up keymaps and quantum keycodes into files by feature
[qmk_firmware.git] / docs / feature_audio.md
1 # Audio
2
3 <!-- FIXME: this formatting needs work
4
5 ## Audio
6
7 ```c
8 #ifdef AUDIO_ENABLE
9     AU_ON,
10     AU_OFF,
11     AU_TOG,
12
13     #ifdef FAUXCLICKY_ENABLE
14         FC_ON,
15         FC_OFF,
16         FC_TOG,
17     #endif
18
19     // Music mode on/off/toggle
20     MU_ON,
21     MU_OFF,
22     MU_TOG,
23
24     // Music voice iterate
25     MUV_IN,
26     MUV_DE,
27 #endif
28 ```
29
30 ### Midi
31
32 #if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
33     MI_ON,  // send midi notes when music mode is enabled
34     MI_OFF, // don't send midi notes when music mode is enabled
35 #endif
36
37 MIDI_TONE_MIN,
38 MIDI_TONE_MAX
39
40 MI_C = MIDI_TONE_MIN,
41 MI_Cs,
42 MI_Db = MI_Cs,
43 MI_D,
44 MI_Ds,
45 MI_Eb = MI_Ds,
46 MI_E,
47 MI_F,
48 MI_Fs,
49 MI_Gb = MI_Fs,
50 MI_G,
51 MI_Gs,
52 MI_Ab = MI_Gs,
53 MI_A,
54 MI_As,
55 MI_Bb = MI_As,
56 MI_B,
57
58 MIDI_TONE_KEYCODE_OCTAVES > 1
59
60 where x = 1-5:
61 MI_C_x,
62 MI_Cs_x,
63 MI_Db_x = MI_Cs_x,
64 MI_D_x,
65 MI_Ds_x,
66 MI_Eb_x = MI_Ds_x,
67 MI_E_x,
68 MI_F_x,
69 MI_Fs_x,
70 MI_Gb_x = MI_Fs_x,
71 MI_G_x,
72 MI_Gs_x,
73 MI_Ab_x = MI_Gs_x,
74 MI_A_x,
75 MI_As_x,
76 MI_Bb_x = MI_As_x,
77 MI_B_x,
78
79 MI_OCT_Nx 1-2
80 MI_OCT_x 0-7
81 MIDI_OCTAVE_MIN = MI_OCT_N2,
82 MIDI_OCTAVE_MAX = MI_OCT_7,
83 MI_OCTD, // octave down
84 MI_OCTU, // octave up
85
86 MI_TRNS_Nx 1-6
87 MI_TRNS_x 0-6
88 MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
89 MIDI_TRANSPOSE_MAX = MI_TRNS_6,
90 MI_TRNSD, // transpose down
91 MI_TRNSU, // transpose up
92
93 MI_VEL_x 1-10
94 MIDI_VELOCITY_MIN = MI_VEL_1,
95 MIDI_VELOCITY_MAX = MI_VEL_9,
96 MI_VELD, // velocity down
97 MI_VELU, // velocity up
98
99 MI_CHx 1-16
100 MIDI_CHANNEL_MIN = MI_CH1
101 MIDI_CHANNEL_MAX = MI_CH16,
102 MI_CHD, // previous channel
103 MI_CHU, // next channel
104
105 MI_ALLOFF, // all notes off
106
107 MI_SUS, // sustain
108 MI_PORT, // portamento
109 MI_SOST, // sostenuto
110 MI_SOFT, // soft pedal
111 MI_LEG,  // legato
112
113 MI_MOD, // modulation
114 MI_MODSD, // decrease modulation speed
115 MI_MODSU, // increase modulation speed
116 #endif // MIDI_ADVANCED
117
118 -->