Expanded struct for drums: added id (which represents the line number in the config file) for internal unique usage. So midinote can be dropped as identifier later.

pull/112/head
Holger Wirtz 3 years ago
parent e59ea3636f
commit beacfadbc7
  1. 5
      addon/tools/wav2c.sh
  2. 1
      drums.h
  3. 16500
      drumset.h

@ -124,9 +124,7 @@ do
if [ "${?}" == 0 ]
then
# Generate drumset.h
echo "'${WAV_DIR}/${sample['filename']}' -> '${sample['c_name']}'"
NUM_DRUMSET_CONFIG=`expr "${NUM_DRUMSET_CONFIG}" + 1`
if [ -z "${converted_files[${sample['filename']}]}" ]
then
@ -172,6 +170,7 @@ do
cat >> "${DRUMS_H}" << EOF
{
${sample[class]},
${NUM_DRUMSET_CONFIG},
${sample[midinote]},
"${sample[name]}",
${sample[c_name]},
@ -185,6 +184,7 @@ do
${sample[reverb_send]}
},
EOF
NUM_DRUMSET_CONFIG=`expr "${NUM_DRUMSET_CONFIG}" + 1`
fi
else
echo "File \'${WAV_DIR}/${sample['filename']}\' does not exits." >&2
@ -195,6 +195,7 @@ cat >> "${DRUMS_H}" << EOF
{
DRUM_NONE,
0,
0,
"EMPTY",
NULL,
"-",

@ -32,6 +32,7 @@
typedef struct drum_config_s {
uint8_t drum_class; // Type of drum
uint8_t id; // ID for reference in sequencer
uint8_t midinote; // Triggered by note
char name[DRUM_NAME_LEN];
const uint8_t* drum_data;

16500
drumset.h

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save