/* Copyright (c) 2019-2021 H. Wirtz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #if NUM_DRUMS >1 uint8_t drum_counter; uint8_t drum_type[NUM_DRUMS]; enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CHRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM}; typedef struct drum_config_s { uint8_t type; // Type of drum uint8_t midinote; // Triggered by note char filename[18]; // 44.1kHz mono LSB raw-sample to play char shortname[2]; // 1 char name for sequencer float32_t pan; // Panorama (-1.0 - +1.0) float32_t vol_max; // max. Volume (0.0 - 1.0) float32_t vol_min; // min. Volume (0.0 - 1.0, should be <= vol_max) } drum_config_t; #define NUM_DRUMCONFIG 15 drum_config_t drum_config[NUM_DRUMCONFIG] = { { DRUM_BASS, MIDI_C3, "/drm/bd01.raw", "B", 0.0, 0.8, 0.0 }, { DRUM_HANDCLAP, MIDI_CIS3, "/drm/cp02.raw", "C", -0.4, 0.6, 0.0 }, { DRUM_SNARE, MIDI_D3, "/drm/sd15.raw", "S", 0.2, 0.6, 0.2 }, { DRUM_HIHAT, MIDI_FIS3, "/drm/hh01.raw", "h", 0.8, 0.2, 0.0 }, { DRUM_HIHAT, MIDI_GIS3, "/drm/hh02.raw", "h", 0.8, 0.2, 0.0 }, { DRUM_HIHAT, MIDI_AIS3, "/drm/oh02.raw", "H", 0.8, 0.2, 0.0 }, { DRUM_LOWTOM, MIDI_G3, "/drm/lt01.raw", "T", -0.7, 0.8, 0.0 }, { DRUM_HIGHTOM, MIDI_A3, "/drm/ht01.raw", "T", -0.5, 0.8, 0.0 }, { DRUM_RIDE, MIDI_CIS4, "/drm/rd01.raw", "R", -0.6, 0.3, 0.0 }, { DRUM_RIDE, MIDI_DIS4, "/drm/rd02.raw", "R", -0.6, 0.3, 0.0 }, { DRUM_BASS, MIDI_C5, "/drm/PHKick1.raw", "B", 0.0, 0.9, 0.0 }, { DRUM_HANDCLAP, MIDI_DIS5, "/drm/808Clap1.raw", "C", 0.0, 0.9, 0.0 }, { DRUM_SNARE, MIDI_CIS5, "/drm/808RimS1.raw", "R", -0.3, 0.5, 0.0 }, { DRUM_HIHAT, MIDI_FIS5, "/drm/808HHCL1.raw", "H", 0.4, 0.6, 0.0 }, { DRUM_NONE, 0, "/drm/EMPTY ", "-", 0.0, 0.0, 0.0 } }; #endif