Several small fixes:

- "#pragma once" introduced to header files and wav2c.sh script
- fix for drumset.h
dev
Holger Wirtz 2 years ago
parent 5f530b0ea8
commit 5c630f9242
  1. 2
      README.md
  2. 7
      UI.hpp
  3. 4
      UI_FX_T3_6.h
  4. 4
      UI_FX_T4.h
  5. 6
      UI_NO_FX.h
  6. 477748
      addon/tools/drumset.h
  7. 5
      addon/tools/wav2c.sh
  8. 4
      control_sgtl5000plus.h
  9. 8
      dexed_sd.h
  10. 5
      disp_plus.h
  11. 7
      drums.h
  12. 238879
      drumset.h
  13. 7
      midi_devices.hpp
  14. 31
      midinotes.h
  15. 83
      sampler.h

@ -12,7 +12,7 @@ MicroDexed is licensed on the GPL v3. The msfa component (acronym for music synt
* PPPlay : Great OPL3 implementation, with documented code :D
* Thierry Pottier: for extreme testing, discussing about different options, images and many good suggestions for UI handling
* Lars Pelz: Testing and documentation
* Nils Feldkämper: LCDMenuLib2 and his patience with my sometimes strange desires
* Nils Feldk<EFBFBD>mper: LCDMenuLib2 and his patience with my sometimes strange desires
* @positionhigh (Mark) for sequencer and several other additions
## Manuals:

@ -23,8 +23,7 @@
*/
#ifdef ENABLE_LCD_UI
#ifndef _UI_HPP_
#define _UI_HPP_
#pragma once
#include <LCDMenuLib2.h>
#include <MD_REncoder.h>
@ -7450,5 +7449,5 @@ char* basename(const char* filename)
char* p = strrchr (filename, '/');
return p ? p + 1 : (char *) filename;
}
#endif
#endif
#endif //ENABLE_LCD_UI

@ -23,8 +23,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
#pragma once
boolean COND_hide() // hide a menu element
{
@ -123,4 +122,3 @@ LCDML_add(88, LCDML_0_5, 4, "Startup", UI_func_startup);
LCDML_add(89, LCDML_0, 6, "Info", UI_func_information);
LCDML_addAdvanced(90, LCDML_0, 7, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 90
#endif

@ -23,8 +23,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
#pragma once
boolean COND_hide() // hide a menu element
{
@ -159,4 +158,3 @@ LCDML_add(124, LCDML_0_6, 4, "Startup", UI_func_startup);
LCDML_add(125, LCDML_0, 7, "Info", UI_func_information);
LCDML_addAdvanced(126, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 126
#endif

@ -23,8 +23,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
#pragma once
boolean COND_hide() // hide a menu element
{
@ -95,5 +94,4 @@ LCDML_add(60, LCDML_0_4, 3, "Favorites", UI_func_favorites);
LCDML_add(61, LCDML_0_4, 4, "Startup", UI_func_startup);
LCDML_add(62, LCDML_0, 5, "Info", UI_func_information);
LCDML_addAdvanced(63, LCDML_0, 6, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 63
#endif
#define _LCDML_DISP_cnt 63

File diff suppressed because it is too large Load Diff

@ -88,8 +88,7 @@ fi
mkdir -p "${TMP}"
cat >> "${DRUMSET_H}" << EOF
#ifndef _DRUMSET_H
#define _DRUMSET_H
#pragma once
#include "drums.h"
@ -233,8 +232,6 @@ cat >> "${DRUMS_H}" << EOF
0.0
}
};
#endif
EOF
echo "" >> "${DRUMSET_H}"

@ -23,8 +23,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _SGTL5000PLUS_H_
#define _SGTL5000PLUS_H_
#pragma once
#include <Arduino.h>
#include <Audio.h>
@ -81,4 +80,3 @@ class AudioControlSGTL5000Plus : public AudioControlSGTL5000
float* Q;
float* peakGainDB;
};
#endif

@ -24,12 +24,11 @@
*/
#pragma once
#include "config.h"
#include "synth_dexed.h"
#ifndef DEXED_SYSEX_H_INCLUDED
#define DEXED_SYSEX_H_INCLUDED
extern uint8_t sd_card;
extern AudioSynthDexed* MicroDexed[NUM_DEXED];
extern void show_patch(uint8_t instance_id);
@ -80,5 +79,4 @@ bool get_bank_name(uint8_t b, char* name, uint8_t len);
bool get_voice_name(uint8_t b, uint8_t v, char* name, uint8_t len);
bool get_voice_by_bank_name(uint8_t b, const char* bank_name, uint8_t v, char* voice_name, uint8_t len);
void string_toupper(char* s);
#endif
void string_toupper(char* s);

@ -24,8 +24,7 @@
*/
#ifndef DISP_PLUS_H_INCLUDED
#define DISP_PLUS_H_INCLUDED
#pragma once
#include "config.h"
@ -87,5 +86,3 @@ class Disp_Plus : public T
}
}
};
#endif

@ -24,10 +24,9 @@
THE SOFTWARE.
*/
#include <Arduino.h>
#pragma once
#ifndef _DRUMS_H
#define _DRUMS_H
#include <Arduino.h>
typedef struct drum_config_s {
uint8_t drum_class; // Type of drum
@ -46,5 +45,3 @@ typedef struct drum_config_s {
} drum_config_t;
enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM, DRUM_PERCUSSION, DRUM_POLY};
#endif

238879
drumset.h

File diff suppressed because it is too large Load Diff

@ -21,8 +21,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MIDI_DEVICES_H
#define MIDI_DEVICES_H
#pragma once
#include "config.h"
@ -1761,6 +1760,4 @@ void send_sysex_param(uint8_t midi_channel, uint8_t var, uint8_t val, uint8_t pa
#ifdef MIDI_DEVICE_USB_HOST
usbMIDI.sendSysEx(5, s); // Send to USB-HOST MIDI
#endif
}
#endif // MIDI_DEVICES_H
}

@ -1,9 +1,34 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6/4.x/4.x with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018-2022 H. Wirtz <wirtz@parasitstudio.de>
(c)2021-2022 H. Wirtz <wirtz@parasitstudio.de>, M. Koslowski <positionhigh@gmx.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*************************************************
MIDI note values
*************************************************/
#ifndef _MIDINOTES_H
#define _MIDINOTES_H
#pragma once
#define MIDI_C0 12
#define MIDI_CIS0 13
@ -102,5 +127,3 @@
#define MIDI_AIS7 106
#define MIDI_B7 107
#define MIDI_C8 108
#endif

@ -1,83 +0,0 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018-2022 H. Wirtz <wirtz@parasitstudio.de>
(c)2021-2022 H. Wirtz <wirtz@parasitstudio.de>, M. Koslowski <positionhigh@gmx.de>
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.
*/
#include <Arduino.h>
#include "config.h"
#include "sampleset.h"
#ifndef _SAMPLER_H
#define _SAMPLER_H
typedef struct sampler_config_s {
uint8_t sampler_class; // Type of sample
uint8_t midinote; // Triggered by note
char name[SAMPLER_NAME_LEN];
const unsigned int* sample_data;
char shortname[2]; // 1 char name for sequencer
float32_t pitch; // play pitch
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)
float32_t reverb_send; // how much signal to send to the reverb (0.0 - 1.0)
} sampler_config_t;
enum {SAMPLER_NONE, SAMPLER_BASS, SAMPLER_SNARE, SAMPLER_HIHAT, SAMPLER_HANDCLAP, SAMPLER_RIDE, SAMPLER_CHRASH, SAMPLER_LOWTOM, SAMPLER_MIDTOM, SAMPLER_HIGHTOM, SAMPLER_PERCUSSION, SAMPLER_MONOPHONE, SAMPLER_POLYPHONE};
// DEFAULT MIDI CHANNEL FOR SAMPLER
uint8_t sampler_midi_channel = 10;
sampler_config_t sampler_config[NUM_SAMPLESET_CONFIG] =
{
{
SAMPLER_BASS,
MIDI_C3,
"bd01",
AudioSampleBd01,
"B",
0.0,
0.0,
0.8,
0.0,
0.0
},
{
SAMPLER_NONE,
0,
"EMPTY",
NULL,
"-",
0.0,
0.0,
0.0,
0.0,
0.0
}
};
#endif
Loading…
Cancel
Save