1 /* ----------------------------------------------------------------------------- 2 * 3 * Giada - Your Hardcore Loopmachine 4 * 5 * ----------------------------------------------------------------------------- 6 * 7 * Copyright (C) 2010-2020 Giovanni A. Zuliani | Monocasual 8 * 9 * This file is part of Giada - Your Hardcore Loopmachine. 10 * 11 * Giada - Your Hardcore Loopmachine is free software: you can 12 * redistribute it and/or modify it under the terms of the GNU General 13 * Public License as published by the Free Software Foundation, either 14 * version 3 of the License, or (at your option) any later version. 15 * 16 * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 * will be useful, but WITHOUT ANY WARRANTY without even the implied 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 * See the GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with Giada - Your Hardcore Loopmachine. If not, see 23 * <http://www.gnu.org/licenses/>. 24 * 25 * -------------------------------------------------------------------------- */ 26 27 28 #ifndef G_CONST_H 29 #define G_CONST_H 30 31 32 #include <cstdint> 33 34 35 /* -- debug ----------------------------------------------------------------- */ 36 #ifndef NDEBUG 37 #define G_DEBUG_MODE 38 #define G_DEBUG(x) std::cerr << __FILE__ << "::" << __func__ << "() - " << x << "\n"; 39 #else 40 #define G_DEBUG(x) do {} while (0) 41 #endif 42 43 44 /* -- environment ----------------------------------------------------------- */ 45 #if defined(_WIN32) 46 #define G_OS_WINDOWS 47 #elif defined(__APPLE__) 48 #define G_OS_MAC 49 #elif defined(__linux__) 50 #define G_OS_LINUX 51 #elif defined(__FreeBSD__) 52 #define G_OS_FREEBSD 53 #endif 54 55 #ifndef BUILD_DATE 56 #define BUILD_DATE __DATE__ 57 #endif 58 59 60 61 /* -- version --------------------------------------------------------------- */ 62 constexpr auto G_APP_NAME = "Giada"; 63 constexpr auto G_VERSION_STR = "0.17.1"; 64 constexpr int G_VERSION_MAJOR = 0; 65 constexpr int G_VERSION_MINOR = 17; 66 constexpr int G_VERSION_PATCH = 1; 67 68 constexpr auto CONF_FILENAME = "giada.conf"; 69 70 #ifdef G_OS_WINDOWS 71 #define G_SLASH '\\' 72 #define G_SLASH_STR "\\" 73 #else 74 #define G_SLASH '/' 75 #define G_SLASH_STR "/" 76 #endif 77 78 79 /* -- GUI ------------------------------------------------------------------- */ 80 constexpr float G_GUI_REFRESH_RATE = 1 / 30.0f; // 30 fps 81 constexpr float G_GUI_PLUGIN_RATE = 1 / 30.0f; // 30 fps 82 constexpr int G_GUI_FONT_SIZE_BASE = 12; 83 constexpr int G_GUI_INNER_MARGIN = 4; 84 constexpr int G_GUI_OUTER_MARGIN = 8; 85 constexpr int G_GUI_UNIT = 20; // base unit for elements 86 constexpr int G_GUI_ZOOM_FACTOR = 2; 87 88 #define G_COLOR_RED fl_rgb_color(28, 32, 80) 89 #define G_COLOR_BLUE fl_rgb_color(113, 31, 31) 90 #define G_COLOR_RED_ALERT fl_rgb_color(239, 75, 53) 91 #define G_COLOR_LIGHT_2 fl_rgb_color(200, 200, 200) 92 #define G_COLOR_LIGHT_1 fl_rgb_color(170, 170, 170) 93 #define G_COLOR_GREY_4 fl_rgb_color(78, 78, 78) 94 #define G_COLOR_GREY_3 fl_rgb_color(54, 54, 54) 95 #define G_COLOR_GREY_2 fl_rgb_color(37, 37, 37) 96 #define G_COLOR_GREY_1_5 fl_rgb_color(28, 28, 28) 97 #define G_COLOR_GREY_1 fl_rgb_color(25, 25, 25) 98 #define G_COLOR_BLACK fl_rgb_color(0, 0, 0) 99 100 101 102 /* -- MIN/MAX values -------------------------------------------------------- */ 103 constexpr float G_MIN_BPM = 20.0f; 104 constexpr auto G_MIN_BPM_STR = "20.0"; 105 constexpr float G_MAX_BPM = 999.0f; 106 constexpr auto G_MAX_BPM_STR = "999.0"; 107 constexpr int G_MAX_BEATS = 32; 108 constexpr int G_MAX_BARS = 32; 109 constexpr int G_MAX_QUANTIZE = 8; 110 constexpr float G_MIN_DB_SCALE = 60.0f; 111 constexpr int G_MIN_COLUMN_WIDTH = 140; 112 constexpr float G_MAX_BOOST_DB = 20.0f; 113 constexpr float G_MIN_PITCH = 0.1f; 114 constexpr float G_MAX_PITCH = 4.0f; 115 constexpr float G_MAX_PAN = 1.0f; 116 constexpr float G_MAX_VOLUME = 1.0f; 117 constexpr int G_MAX_GRID_VAL = 64; 118 constexpr int G_MIN_BUF_SIZE = 8; 119 constexpr int G_MAX_BUF_SIZE = 4096; 120 constexpr int G_MIN_GUI_WIDTH = 816; 121 constexpr int G_MIN_GUI_HEIGHT = 510; 122 constexpr int G_MAX_IO_CHANS = 2; 123 constexpr int G_MAX_VELOCITY = 0x7F; 124 constexpr int G_MAX_MIDI_CHANS = 16; 125 constexpr int G_MAX_POLYPHONY = 32; 126 constexpr int G_MAX_QUEUE_EVENTS = 32; 127 constexpr int G_MAX_QUANTIZER_SIZE = 8; 128 129 130 131 /* -- kernel audio ---------------------------------------------------------- */ 132 constexpr int G_SYS_API_NONE = 0x00; // 0000 0000 133 constexpr int G_SYS_API_JACK = 0x01; // 0000 0001 134 constexpr int G_SYS_API_ALSA = 0x02; // 0000 0010 135 constexpr int G_SYS_API_DS = 0x04; // 0000 0100 136 constexpr int G_SYS_API_ASIO = 0x08; // 0000 1000 137 constexpr int G_SYS_API_CORE = 0x10; // 0001 0000 138 constexpr int G_SYS_API_PULSE = 0x20; // 0010 0000 139 constexpr int G_SYS_API_WASAPI = 0x40; // 0100 0000 140 constexpr int G_SYS_API_ANY = 0x7F; // 0111 1111 141 142 143 144 /* -- kernel midi ----------------------------------------------------------- */ 145 constexpr int G_MIDI_API_JACK = 0x01; // 0000 0001 146 constexpr int G_MIDI_API_ALSA = 0x02; // 0000 0010 147 148 149 150 /* -- default system -------------------------------------------------------- */ 151 #if defined(G_OS_LINUX) 152 #define G_DEFAULT_SOUNDSYS G_SYS_API_NONE 153 #elif defined(G_OS_FREEBSD) 154 #define G_DEFAULT_SOUNDSYS G_SYS_API_PULSE 155 #elif defined(G_OS_WINDOWS) 156 #define G_DEFAULT_SOUNDSYS G_SYS_API_DS 157 #elif defined(G_OS_MAC) 158 #define G_DEFAULT_SOUNDSYS G_SYS_API_CORE 159 #endif 160 161 constexpr int G_DEFAULT_SOUNDDEV_OUT = 0; // FIXME - please override with rtAudio::getDefaultDevice (or similar) 162 constexpr int G_DEFAULT_SOUNDDEV_IN = -1; // no recording by default: input disabled 163 constexpr int G_DEFAULT_MIDI_SYSTEM = 0; 164 constexpr int G_DEFAULT_MIDI_PORT_IN = -1; 165 constexpr int G_DEFAULT_MIDI_PORT_OUT = -1; 166 constexpr int G_DEFAULT_SAMPLERATE = 44100; 167 constexpr int G_DEFAULT_BUFSIZE = 1024; 168 constexpr int G_DEFAULT_BIT_DEPTH = 32; // float 169 constexpr float G_DEFAULT_VOL = 1.0f; 170 constexpr float G_DEFAULT_PAN = 0.5f; 171 constexpr float G_DEFAULT_PITCH = 1.0f; 172 constexpr float G_DEFAULT_BPM = 120.0f; 173 constexpr int G_DEFAULT_BEATS = 4; 174 constexpr int G_DEFAULT_BARS = 1; 175 constexpr int G_DEFAULT_QUANTIZE = 0; // quantizer off 176 constexpr float G_DEFAULT_FADEOUT_STEP = 0.01f; // micro-fadeout speed 177 constexpr int G_DEFAULT_COLUMN_WIDTH = 380; 178 constexpr auto G_DEFAULT_PATCH_NAME = "(default patch)"; 179 constexpr int G_DEFAULT_ACTION_SIZE = 8192; // frames 180 constexpr int G_DEFAULT_ZOOM_RATIO = 128; 181 constexpr float G_DEFAULT_REC_TRIGGER_LEVEL = -10.0f; 182 constexpr int G_DEFAULT_SUBWINDOW_W = 640; 183 constexpr int G_DEFAULT_SUBWINDOW_H = 480; 184 constexpr int G_DEFAULT_VST_MIDIBUFFER_SIZE = 1024; // TODO - not 100% sure about this size 185 186 187 188 /* -- responses and return codes -------------------------------------------- */ 189 constexpr int G_RES_ERR_PROCESSING = -6; 190 constexpr int G_RES_ERR_WRONG_DATA = -5; 191 constexpr int G_RES_ERR_NO_DATA = -4; 192 constexpr int G_RES_ERR_PATH_TOO_LONG = -3; 193 constexpr int G_RES_ERR_IO = -2; 194 constexpr int G_RES_ERR_MEMORY = -1; 195 constexpr int G_RES_ERR = 0; 196 constexpr int G_RES_OK = 1; 197 198 199 200 /* -- log modes ------------------------------------------------------------- */ 201 constexpr int LOG_MODE_STDOUT = 0x01; 202 constexpr int LOG_MODE_FILE = 0x02; 203 constexpr int LOG_MODE_MUTE = 0x04; 204 205 206 207 /* -- unique IDs of mainWin's subwindows ------------------------------------ */ 208 /* -- wid > 0 are reserved by gg_keyboard ----------------------------------- */ 209 constexpr int WID_BEATS = -1; 210 constexpr int WID_BPM = -2; 211 constexpr int WID_ABOUT = -3; 212 constexpr int WID_FILE_BROWSER = -4; 213 constexpr int WID_CONFIG = -5; 214 constexpr int WID_FX_LIST = -6; 215 constexpr int WID_ACTION_EDITOR = -7; 216 constexpr int WID_SAMPLE_EDITOR = -8; 217 constexpr int WID_FX = -9; 218 constexpr int WID_KEY_GRABBER = -10; 219 constexpr int WID_SAMPLE_NAME = -11; 220 constexpr int WID_FX_CHOOSER = -12; 221 constexpr int WID_MIDI_INPUT = -13; 222 constexpr int WID_MIDI_OUTPUT = -14; 223 224 225 226 /* -- patch signals --------------------------------------------------------- */ 227 constexpr int G_PATCH_UNSUPPORTED = -2; 228 constexpr int G_PATCH_UNREADABLE = -1; 229 constexpr int G_PATCH_INVALID = 0; 230 constexpr int G_PATCH_OK = 1; 231 232 233 234 /* -- midimap signals ------------------------------------------------------- */ 235 constexpr int MIDIMAP_NOT_SPECIFIED = 0x00; 236 constexpr int MIDIMAP_UNREADABLE = 0x01; 237 constexpr int MIDIMAP_INVALID = 0x02; 238 constexpr int MIDIMAP_READ_OK = 0x04; 239 240 241 242 /* -- MIDI in parameters (for MIDI learning) -------------------------------- */ 243 constexpr int G_MIDI_IN_ENABLED = 1; 244 constexpr int G_MIDI_IN_FILTER = 2; 245 constexpr int G_MIDI_IN_REWIND = 3; 246 constexpr int G_MIDI_IN_START_STOP = 4; 247 constexpr int G_MIDI_IN_ACTION_REC = 5; 248 constexpr int G_MIDI_IN_INPUT_REC = 6; 249 constexpr int G_MIDI_IN_METRONOME = 7; 250 constexpr int G_MIDI_IN_VOLUME_IN = 8; 251 constexpr int G_MIDI_IN_VOLUME_OUT = 9; 252 constexpr int G_MIDI_IN_BEAT_DOUBLE = 10; 253 constexpr int G_MIDI_IN_BEAT_HALF = 11; 254 constexpr int G_MIDI_IN_KEYPRESS = 12; 255 constexpr int G_MIDI_IN_KEYREL = 13; 256 constexpr int G_MIDI_IN_KILL = 14; 257 constexpr int G_MIDI_IN_ARM = 15; 258 constexpr int G_MIDI_IN_MUTE = 16; 259 constexpr int G_MIDI_IN_SOLO = 17; 260 constexpr int G_MIDI_IN_VOLUME = 18; 261 constexpr int G_MIDI_IN_PITCH = 19; 262 constexpr int G_MIDI_IN_READ_ACTIONS = 20; 263 264 265 266 /* -- MIDI out parameters (for MIDI output and lightning) ------------------- */ 267 constexpr int G_MIDI_OUT_ENABLED = 1; 268 constexpr int G_MIDI_OUT_L_ENABLED = 2; 269 constexpr int G_MIDI_OUT_L_PLAYING = 3; 270 constexpr int G_MIDI_OUT_L_MUTE = 4; 271 constexpr int G_MIDI_OUT_L_SOLO = 5; 272 273 274 275 /* -- MIDI signals ------------------------------------------------------------- 276 Channel voices messages - controller (0xB0) is a special subset of this family: 277 it drives knobs, volume, faders and such. */ 278 279 constexpr uint32_t G_MIDI_CONTROLLER = static_cast<uint32_t>(0xB0 << 24); 280 constexpr uint32_t G_MIDI_ALL_NOTES_OFF = (G_MIDI_CONTROLLER) | (0x7B << 16); 281 282 /* system common / real-time messages. Single bytes */ 283 284 constexpr int MIDI_SYSEX = 0xF0; 285 constexpr int MIDI_MTC_QUARTER = 0xF1; 286 constexpr int MIDI_POSITION_PTR = 0xF2; 287 constexpr int MIDI_CLOCK = 0xF8; 288 constexpr int MIDI_START = 0xFA; 289 constexpr int MIDI_CONTINUE = 0xFB; 290 constexpr int MIDI_STOP = 0xFC; 291 constexpr int MIDI_EOX = 0xF7; // end of sysex 292 293 /* midi sync constants */ 294 295 constexpr int MIDI_SYNC_NONE = 0x00; 296 constexpr int MIDI_SYNC_CLOCK_M = 0x01; // master 297 constexpr int MIDI_SYNC_CLOCK_S = 0x02; // slave 298 constexpr int MIDI_SYNC_MTC_M = 0x04; // master 299 constexpr int MIDI_SYNC_MTC_S = 0x08; // slave 300 301 /* JSON patch keys */ 302 303 constexpr auto PATCH_KEY_HEADER = "header"; 304 constexpr auto PATCH_KEY_VERSION_MAJOR = "version_major"; 305 constexpr auto PATCH_KEY_VERSION_MINOR = "version_minor"; 306 constexpr auto PATCH_KEY_VERSION_PATCH = "version_patch"; 307 constexpr auto PATCH_KEY_NAME = "name"; 308 constexpr auto PATCH_KEY_BPM = "bpm"; 309 constexpr auto PATCH_KEY_BARS = "bars"; 310 constexpr auto PATCH_KEY_BEATS = "beats"; 311 constexpr auto PATCH_KEY_QUANTIZE = "quantize"; 312 constexpr auto PATCH_KEY_MASTER_VOL_IN = "master_vol_in"; 313 constexpr auto PATCH_KEY_MASTER_VOL_OUT = "master_vol_out"; 314 constexpr auto PATCH_KEY_METRONOME = "metronome"; 315 constexpr auto PATCH_KEY_LAST_TAKE_ID = "last_take_id"; 316 constexpr auto PATCH_KEY_SAMPLERATE = "samplerate"; 317 constexpr auto PATCH_KEY_COLUMNS = "columns"; 318 constexpr auto PATCH_KEY_PLUGINS = "plugins"; 319 constexpr auto PATCH_KEY_MASTER_OUT_PLUGINS = "master_out_plugins"; 320 constexpr auto PATCH_KEY_MASTER_IN_PLUGINS = "master_in_plugins"; 321 constexpr auto PATCH_KEY_CHANNELS = "channels"; 322 constexpr auto PATCH_KEY_CHANNEL_TYPE = "type"; 323 constexpr auto PATCH_KEY_CHANNEL_ID = "id"; 324 constexpr auto PATCH_KEY_CHANNEL_SIZE = "size"; 325 constexpr auto PATCH_KEY_CHANNEL_NAME = "name"; 326 constexpr auto PATCH_KEY_CHANNEL_COLUMN = "column"; 327 constexpr auto PATCH_KEY_CHANNEL_MUTE = "mute"; 328 constexpr auto PATCH_KEY_CHANNEL_SOLO = "solo"; 329 constexpr auto PATCH_KEY_CHANNEL_VOLUME = "volume"; 330 constexpr auto PATCH_KEY_CHANNEL_PAN = "pan"; 331 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN = "midi_in"; 332 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_VELO_AS_VOL = "midi_in_velo_as_vol"; 333 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_KEYPRESS = "midi_in_keypress"; 334 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_KEYREL = "midi_in_keyrel"; 335 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_KILL = "midi_in_kill"; 336 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_ARM = "midi_in_arm"; 337 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_VOLUME = "midi_in_volume"; 338 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_MUTE = "midi_in_mute"; 339 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_FILTER = "midi_in_filter"; 340 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_SOLO = "midi_in_solo"; 341 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT_L = "midi_out_l"; 342 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT_L_PLAYING = "midi_out_l_playing"; 343 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT_L_MUTE = "midi_out_l_mute"; 344 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT_L_SOLO = "midi_out_l_solo"; 345 constexpr auto PATCH_KEY_CHANNEL_WAVE_ID = "wave_id"; 346 constexpr auto PATCH_KEY_CHANNEL_KEY = "key"; 347 constexpr auto PATCH_KEY_CHANNEL_MODE = "mode"; 348 constexpr auto PATCH_KEY_CHANNEL_BEGIN = "begin"; 349 constexpr auto PATCH_KEY_CHANNEL_END = "end"; 350 constexpr auto PATCH_KEY_CHANNEL_SHIFT = "shift"; 351 constexpr auto PATCH_KEY_CHANNEL_HAS_ACTIONS = "has_actions"; 352 constexpr auto PATCH_KEY_CHANNEL_READ_ACTIONS = "read_actions"; 353 constexpr auto PATCH_KEY_CHANNEL_PITCH = "pitch"; 354 constexpr auto PATCH_KEY_CHANNEL_INPUT_MONITOR = "input_monitor"; 355 constexpr auto PATCH_KEY_CHANNEL_OVERDUB_PROTECTION = "overdub_protection"; 356 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_READ_ACTIONS = "midi_in_read_actions"; 357 constexpr auto PATCH_KEY_CHANNEL_MIDI_IN_PITCH = "midi_in_pitch"; 358 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT = "midi_out"; 359 constexpr auto PATCH_KEY_CHANNEL_MIDI_OUT_CHAN = "midi_out_chan"; 360 constexpr auto PATCH_KEY_CHANNEL_PLUGINS = "plugins"; 361 constexpr auto PATCH_KEY_CHANNEL_PLUGIN_ID = "plugin_id"; 362 constexpr auto PATCH_KEY_CHANNEL_ARMED = "armed"; 363 constexpr auto PATCH_KEY_WAVES = "waves"; 364 constexpr auto PATCH_KEY_WAVE_ID = "id"; 365 constexpr auto PATCH_KEY_WAVE_PATH = "path"; 366 constexpr auto PATCH_KEY_ACTIONS = "actions"; 367 constexpr auto PATCH_KEY_ACTION_TYPE = "type"; 368 constexpr auto PATCH_KEY_ACTION_FRAME = "frame"; 369 constexpr auto PATCH_KEY_ACTION_F_VALUE = "f_value"; 370 constexpr auto PATCH_KEY_ACTION_I_VALUE = "i_value"; 371 constexpr auto PATCH_KEY_PLUGIN_ID = "id"; 372 constexpr auto PATCH_KEY_PLUGIN_PATH = "path"; 373 constexpr auto PATCH_KEY_PLUGIN_BYPASS = "bypass"; 374 constexpr auto PATCH_KEY_PLUGIN_PARAMS = "params"; 375 constexpr auto PATCH_KEY_PLUGIN_STATE = "state"; 376 constexpr auto PATCH_KEY_PLUGIN_MIDI_IN_PARAMS = "midi_in_params"; 377 constexpr auto PATCH_KEY_COLUMN_ID = "id"; 378 constexpr auto PATCH_KEY_COLUMN_WIDTH = "width"; 379 constexpr auto PATCH_KEY_COLUMN_CHANNELS = "channels"; 380 constexpr auto G_PATCH_KEY_ACTION_ID = "id"; 381 constexpr auto G_PATCH_KEY_ACTION_CHANNEL = "channel"; 382 constexpr auto G_PATCH_KEY_ACTION_FRAME = "frame"; 383 constexpr auto G_PATCH_KEY_ACTION_EVENT = "event"; 384 constexpr auto G_PATCH_KEY_ACTION_PREV = "prev"; 385 constexpr auto G_PATCH_KEY_ACTION_NEXT = "next"; 386 387 /* JSON config keys */ 388 389 constexpr auto CONF_KEY_HEADER = "header"; 390 constexpr auto CONF_KEY_LOG_MODE = "log_mode"; 391 constexpr auto CONF_KEY_SOUND_SYSTEM = "sound_system"; 392 constexpr auto CONF_KEY_SOUND_DEVICE_IN = "sound_device_in"; 393 constexpr auto CONF_KEY_SOUND_DEVICE_OUT = "sound_device_out"; 394 constexpr auto CONF_KEY_CHANNELS_OUT = "channels_out"; 395 constexpr auto CONF_KEY_CHANNELS_IN_COUNT = "channels_in_count"; 396 constexpr auto CONF_KEY_CHANNELS_IN_START = "channels_in_start"; 397 constexpr auto CONF_KEY_SAMPLERATE = "samplerate"; 398 constexpr auto CONF_KEY_BUFFER_SIZE = "buffer_size"; 399 constexpr auto CONF_KEY_DELAY_COMPENSATION = "delay_compensation"; 400 constexpr auto CONF_KEY_LIMIT_OUTPUT = "limit_output"; 401 constexpr auto CONF_KEY_RESAMPLE_QUALITY = "resample_quality"; 402 constexpr auto CONF_KEY_MIDI_SYSTEM = "midi_system"; 403 constexpr auto CONF_KEY_MIDI_PORT_OUT = "midi_port_out"; 404 constexpr auto CONF_KEY_MIDI_PORT_IN = "midi_port_in"; 405 constexpr auto CONF_KEY_MIDIMAP_PATH = "midimap_path"; 406 constexpr auto CONF_KEY_LAST_MIDIMAP = "last_midimap"; 407 constexpr auto CONF_KEY_MIDI_SYNC = "midi_sync"; 408 constexpr auto CONF_KEY_MIDI_TC_FPS = "midi_tc_fps"; 409 constexpr auto CONF_KEY_MIDI_IN = "midi_in"; 410 constexpr auto CONF_KEY_MIDI_IN_FILTER = "midi_in_filter"; 411 constexpr auto CONF_KEY_MIDI_IN_REWIND = "midi_in_rewind"; 412 constexpr auto CONF_KEY_MIDI_IN_START_STOP = "midi_in_start_stop"; 413 constexpr auto CONF_KEY_MIDI_IN_ACTION_REC = "midi_in_action_rec"; 414 constexpr auto CONF_KEY_MIDI_IN_INPUT_REC = "midi_in_input_rec"; 415 constexpr auto CONF_KEY_MIDI_IN_METRONOME = "midi_in_metronome"; 416 constexpr auto CONF_KEY_MIDI_IN_VOLUME_IN = "midi_in_volume_in"; 417 constexpr auto CONF_KEY_MIDI_IN_VOLUME_OUT = "midi_in_volume_out"; 418 constexpr auto CONF_KEY_MIDI_IN_BEAT_DOUBLE = "midi_in_beat_doble"; 419 constexpr auto CONF_KEY_MIDI_IN_BEAT_HALF = "midi_in_beat_half"; 420 constexpr auto CONF_KEY_CHANS_STOP_ON_SEQ_HALT = "chans_stop_on_seq_halt"; 421 constexpr auto CONF_KEY_TREAT_RECS_AS_LOOPS = "treat_recs_as_loops"; 422 constexpr auto CONF_KEY_INPUT_MONITOR_DEFAULT_ON = "input_monitor_default_on"; 423 constexpr auto CONF_KEY_OVERDUB_PROTECTION_DEFAULT_ON = "overdub_protection_default_on"; 424 constexpr auto CONF_KEY_PLUGINS_PATH = "plugins_path"; 425 constexpr auto CONF_KEY_PATCHES_PATH = "patches_path"; 426 constexpr auto CONF_KEY_SAMPLES_PATH = "samples_path"; 427 constexpr auto CONF_KEY_MAIN_WINDOW_X = "main_window_x"; 428 constexpr auto CONF_KEY_MAIN_WINDOW_Y = "main_window_y"; 429 constexpr auto CONF_KEY_MAIN_WINDOW_W = "main_window_w"; 430 constexpr auto CONF_KEY_MAIN_WINDOW_H = "main_window_h"; 431 constexpr auto CONF_KEY_BROWSER_X = "browser_x"; 432 constexpr auto CONF_KEY_BROWSER_Y = "browser_y"; 433 constexpr auto CONF_KEY_BROWSER_W = "browser_w"; 434 constexpr auto CONF_KEY_BROWSER_H = "browser_h"; 435 constexpr auto CONF_KEY_BROWSER_POSITION = "browser_position"; 436 constexpr auto CONF_KEY_BROWSER_LAST_PATH = "browser_last_path"; 437 constexpr auto CONF_KEY_BROWSER_LAST_VALUE = "browser_last_value"; 438 constexpr auto CONF_KEY_ACTION_EDITOR_X = "action_editor_x"; 439 constexpr auto CONF_KEY_ACTION_EDITOR_Y = "action_editor_y"; 440 constexpr auto CONF_KEY_ACTION_EDITOR_W = "action_editor_w"; 441 constexpr auto CONF_KEY_ACTION_EDITOR_H = "action_editor_h"; 442 constexpr auto CONF_KEY_ACTION_EDITOR_ZOOM = "action_editor_zoom"; 443 constexpr auto CONF_KEY_ACTION_EDITOR_GRID_VAL = "action_editor_grid_val"; 444 constexpr auto CONF_KEY_ACTION_EDITOR_GRID_ON = "action_editor_grid_on"; 445 constexpr auto CONF_KEY_SAMPLE_EDITOR_X = "sample_editor_x"; 446 constexpr auto CONF_KEY_SAMPLE_EDITOR_Y = "sample_editor_y"; 447 constexpr auto CONF_KEY_SAMPLE_EDITOR_W = "sample_editor_w"; 448 constexpr auto CONF_KEY_SAMPLE_EDITOR_H = "sample_editor_h"; 449 constexpr auto CONF_KEY_SAMPLE_EDITOR_GRID_VAL = "sample_editor_grid_val"; 450 constexpr auto CONF_KEY_SAMPLE_EDITOR_GRID_ON = "sample_editor_grid_on"; 451 constexpr auto CONF_KEY_PIANO_ROLL_Y = "piano_roll_y"; 452 constexpr auto CONF_KEY_PIANO_ROLL_H = "piano_roll_h"; 453 constexpr auto CONF_KEY_SAMPLE_ACTION_EDITOR_H = "sample_action_editor_h"; 454 constexpr auto CONF_KEY_VELOCITY_EDITOR_H = "velocity_editor_h"; 455 constexpr auto CONF_KEY_ENVELOPE_EDITOR_H = "envelope_editor_h"; 456 constexpr auto CONF_KEY_PLUGIN_LIST_X = "plugin_list_x"; 457 constexpr auto CONF_KEY_PLUGIN_LIST_Y = "plugin_list_y"; 458 constexpr auto CONF_KEY_PLUGIN_CHOOSER_X = "plugin_chooser_x"; 459 constexpr auto CONF_KEY_PLUGIN_CHOOSER_Y = "plugin_chooser_y"; 460 constexpr auto CONF_KEY_PLUGIN_CHOOSER_W = "plugin_chooser_w"; 461 constexpr auto CONF_KEY_PLUGIN_CHOOSER_H = "plugin_chooser_h"; 462 constexpr auto CONF_KEY_MIDI_INPUT_X = "midi_input_x"; 463 constexpr auto CONF_KEY_MIDI_INPUT_Y = "midi_input_y"; 464 constexpr auto CONF_KEY_MIDI_INPUT_W = "midi_input_w"; 465 constexpr auto CONF_KEY_MIDI_INPUT_H = "midi_input_h"; 466 constexpr auto CONF_KEY_PLUGIN_SORT_METHOD = "plugin_sort_method"; 467 constexpr auto CONF_KEY_REC_TRIGGER_MODE = "rec_trigger_mode"; 468 constexpr auto CONF_KEY_REC_TRIGGER_LEVEL = "rec_trigger_level"; 469 470 /* JSON midimaps keys */ 471 472 constexpr auto MIDIMAP_KEY_BRAND = "brand"; 473 constexpr auto MIDIMAP_KEY_DEVICE = "device"; 474 constexpr auto MIDIMAP_KEY_INIT_COMMANDS = "init_commands"; 475 constexpr auto MIDIMAP_KEY_MUTE_ON = "mute_on"; 476 constexpr auto MIDIMAP_KEY_MUTE_OFF = "mute_off"; 477 constexpr auto MIDIMAP_KEY_SOLO_ON = "solo_on"; 478 constexpr auto MIDIMAP_KEY_SOLO_OFF = "solo_off"; 479 constexpr auto MIDIMAP_KEY_WAITING = "waiting"; 480 constexpr auto MIDIMAP_KEY_PLAYING = "playing"; 481 constexpr auto MIDIMAP_KEY_PLAYING_INAUDIBLE = "playing_inaudible"; 482 constexpr auto MIDIMAP_KEY_STOPPING = "stopping"; 483 constexpr auto MIDIMAP_KEY_STOPPED = "stopped"; 484 constexpr auto MIDIMAP_KEY_CHANNEL = "channel"; 485 constexpr auto MIDIMAP_KEY_MESSAGE = "message"; 486 487 #endif 488