Fixes for schowing the sample filenames.

pull/61/head
Holger Wirtz 3 years ago
parent ee10414a03
commit b6e8006b6a
  1. 67
      MicroDexed.ino
  2. 14
      UI.hpp
  3. 2
      config.h
  4. 2
      drums.cpp
  5. 2
      drums.h

@ -109,9 +109,66 @@ AudioMixer8 drum_reverb_send_mixer_l;
#endif #endif
#endif #endif
/*
//AudioConnection patchCord[] = { AudioConnection patchCord[] = {
// {wavetable[0], 0, mixer[0], 0}, {wavetable[1], 0, mixer[0], 1}, {wavetable[2], 0, mixer[0], 2}, {wavetable[3], 0, mixer[0], 3}, {mixer[0], 0, mixer[TOTAL_MIXERS - 2], 0}, // Audio chain tail
#if defined(USE_FX)
#ifdef USE_PLATEREVERB
{reverb_mixer_r, 0, reverb, 0},
{reverb_mixer_l, 0, reverb, 1},
{reverb, 0, master_mixer_r, 3},
{reverb, 1, master_mixer_l, 3},
#else
{reverb_mixer_r, 0, freeverb, 0},
{reverb_mixer_l, 0, freeverb, 1},
{freeverb, 0, master_mixer_r, 3},
{freeverb, 1, master_mixer_l, 3},
#endif
#endif
{master_mixer_r,0, volume_r,0},
{master_mixer_l,0, volume_l,0},
{volume_r, 0, stereo2mono, 0},
{volume_l, 0, stereo2mono, 1},
{stereo2mono, 0, master_peak_r, 0},
{stereo2mono, 0, master_peak_l, 0},
// Outputs
#if defined(TEENSY_AUDIO_BOARD)
#ifndef SGTL5000_AUDIO_THRU
{stereo2mono, 0, i2s1, 0},
{stereo2mono, 1, i2s1, 1},
#endif
#elif defined (I2S_AUDIO_ONLY)
AudioOutputI2S i2s1;
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0);
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1);
#elif defined(TGA_AUDIO_BOARD)
AudioOutputI2S i2s1;
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0);
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1);
AudioControlWM8731master wm8731_1;
#elif defined(PT8211_AUDIO)
AudioOutputPT8211 pt8211_1;
AudioConnection patchCord10(stereo2mono, 0, pt8211_1, 0);
AudioConnection patchCord11(stereo2mono, 1, pt8211_1, 1);
#elif defined(TEENSY_DAC_SYMMETRIC)
AudioOutputAnalogStereo dacOut;
AudioMixer4 invMixer;
AudioConnection patchCord10(stereo2mono, 0, dacOut , 0);
AudioConnection patchCord11(stereo2mono, 1, invMixer, 0);
AudioConnection patchCord12(invMixer, 0, dacOut , 1);
#elif defined(TEENSY_DAC)
AudioOutputAnalogStereo dacOut;
AudioConnection patchCord10(stereo2mono, 0, dacOut, 0);
AudioConnection patchCord11(stereo2mono, 1, dacOut, 1);
#endif
#ifdef AUDIO_DEVICE_USB
AudioOutputUSB usb1;
AudioConnection patchCord13(stereo2mono, 0, usb1, 0);
AudioConnection patchCord14(stereo2mono, 1, usb1, 1);
#endif
*/
// Audio chain tail // Audio chain tail
#if defined(USE_FX) #if defined(USE_FX)
@ -137,11 +194,11 @@ AudioConnection patchCord9(stereo2mono, 0, master_peak_l, 0);
// Outputs // Outputs
#if defined(TEENSY_AUDIO_BOARD) #if defined(TEENSY_AUDIO_BOARD)
AudioOutputI2S i2s1; AudioOutputI2S i2s1;
AudioControlSGTL5000 sgtl5000_1;
#ifndef SGTL5000_AUDIO_THRU #ifndef SGTL5000_AUDIO_THRU
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); AudioConnection patchCord10(stereo2mono, 0, i2s1, 0);
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1); AudioConnection patchCord11(stereo2mono, 1, i2s1, 1);
#endif #endif
AudioControlSGTL5000 sgtl5000_1;
#elif defined (I2S_AUDIO_ONLY) #elif defined (I2S_AUDIO_ONLY)
AudioOutputI2S i2s1; AudioOutputI2S i2s1;
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); AudioConnection patchCord10(stereo2mono, 0, i2s1, 0);
@ -777,7 +834,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
drum_reverb_send_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(drum_config[d].reverb_send)); drum_reverb_send_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(drum_config[d].reverb_send));
drum_reverb_send_mixer_l.gain(slot, fsin * pseudo_log_curve(drum_config[d].reverb_send)); drum_reverb_send_mixer_l.gain(slot, fsin * pseudo_log_curve(drum_config[d].reverb_send));
char f[DRUM_CFG_GILENAME_LEN]; char f[DRUM_CFG_FILENAME_LEN];
strcpy(f, drum_config[d].filename); strcpy(f, drum_config[d].filename);
strcat(f, ".wav"); strcat(f, ".wav");

@ -3614,8 +3614,7 @@ void UI_func_drum_reverb_send(uint8_t param)
lcd.setCursor(1, 1); lcd.setCursor(1, 1);
sprintf(displayname, "%02d", activesample); sprintf(displayname, "%02d", activesample);
lcd.print(displayname); lcd.print(displayname);
lcd.setCursor(4, 1); lcd.show(4, 1, 6, basename(drum_config[activesample].filename));
lcd.print(basename(drum_config[activesample].filename));
sprintf(displayname, "%03d", (int)(drum_config[activesample].reverb_send * 100) ); sprintf(displayname, "%03d", (int)(drum_config[activesample].reverb_send * 100) );
lcd.setCursor(12, 1); lcd.setCursor(12, 1);
lcd.print(displayname); lcd.print(displayname);
@ -3702,8 +3701,7 @@ void UI_func_drum_volume(uint8_t param)
lcd.setCursor(1, 1); lcd.setCursor(1, 1);
sprintf(displayname, "%02d", activesample); sprintf(displayname, "%02d", activesample);
lcd.print(displayname); lcd.print(displayname);
lcd.setCursor(4, 1); lcd.show(1, 4, 6, basename(drum_config[activesample].filename));
lcd.print(basename(drum_config[activesample].filename));
sprintf(displayname, "%03d", (int)(drum_config[activesample].vol_max * 100) ); sprintf(displayname, "%03d", (int)(drum_config[activesample].vol_max * 100) );
lcd.setCursor(12, 1); lcd.setCursor(12, 1);
lcd.print(displayname); lcd.print(displayname);
@ -3790,8 +3788,7 @@ void UI_func_drum_pan(uint8_t param)
lcd.setCursor(1, 1); lcd.setCursor(1, 1);
sprintf(displayname, "%02d", activesample); sprintf(displayname, "%02d", activesample);
lcd.print(displayname); lcd.print(displayname);
lcd.setCursor(4, 1); lcd.show(1, 4, 6, basename(drum_config[activesample].filename));
lcd.print(basename(drum_config[activesample].filename));
sprintf(displayname, "%+f", drum_config[activesample].pan); sprintf(displayname, "%+f", drum_config[activesample].pan);
lcd.setCursor(12, 1); lcd.setCursor(12, 1);
lcd.print(displayname); lcd.print(displayname);
@ -3940,7 +3937,7 @@ void UI_func_sequencer(uint8_t param)
seq_note_in = 0; seq_note_in = 0;
// setup function // setup function
lcd.setCursor(1, 0); lcd.setCursor(1, 0);
lcd.print(basename(drum_config[activesample].filename)); lcd.show(0, 1, 6, basename(drum_config[activesample].filename));
lcd.setCursor(9, 0); lcd.setCursor(9, 0);
if (seq_running == false && seq_recording == false) if (seq_running == false && seq_recording == false)
{ {
@ -4061,8 +4058,7 @@ void UI_func_sequencer(uint8_t param)
lcd.print("["); lcd.print("[");
if (activesample < num_drums) { if (activesample < num_drums) {
lcd.setCursor(1, 0); lcd.show(0, 1, 6, basename(drum_config[activesample].filename));
lcd.print(basename(drum_config[activesample].filename));
} else if (activesample == num_drums) { } else if (activesample == num_drums) {
lcd.setCursor(1, 0); lcd.setCursor(1, 0);
lcd.print("EMPTY "); lcd.print("EMPTY ");

@ -281,7 +281,7 @@
#define BANK_NAME_LEN 11 // 10 (plus '\0') #define BANK_NAME_LEN 11 // 10 (plus '\0')
#define VOICE_NAME_LEN 12 // 11 (plus '\0') #define VOICE_NAME_LEN 12 // 11 (plus '\0')
#define FILENAME_LEN BANK_NAME_LEN + VOICE_NAME_LEN #define FILENAME_LEN BANK_NAME_LEN + VOICE_NAME_LEN
#define DRUM_CFG_GILENAME_LEN 42 #define DRUM_CFG_FILENAME_LEN 42
#define FX_CONFIG_PATH "FXCFG" #define FX_CONFIG_PATH "FXCFG"
#define FX_CONFIG_NAME "FXCFG" #define FX_CONFIG_NAME "FXCFG"

@ -91,7 +91,7 @@ uint8_t read_drum_config(const char* drumset)
{ {
sprintf(drum_config[drum].filename, "%s/%s", ds, kv.key().c_str()); sprintf(drum_config[drum].filename, "%s/%s", ds, kv.key().c_str());
char f[DRUM_CFG_GILENAME_LEN]; char f[DRUM_CFG_FILENAME_LEN];
strcpy(f, drum_config[drum].filename); strcpy(f, drum_config[drum].filename);
strcat(f, ".wav"); strcat(f, ".wav");

@ -36,7 +36,7 @@ uint8_t read_drum_config(const char* drumset);
typedef struct drum_config_s { typedef struct drum_config_s {
uint8_t drum_class; // Type of drum uint8_t drum_class; // Type of drum
uint8_t midinote; // Triggered by note uint8_t midinote; // Triggered by note
char filename[28]; // 44.1kHz mono LSB wav-sample char filename[DRUM_CFG_FILENAME_LEN]; // 44.1kHz mono LSB wav-sample
char shortname[2]; // 1 char name for sequencer char shortname[2]; // 1 char name for sequencer
float32_t pan; // Panorama (-1.0 - +1.0) float32_t pan; // Panorama (-1.0 - +1.0)
float32_t vol_max; // max. Volume (0.0 - 1.0) float32_t vol_max; // max. Volume (0.0 - 1.0)

Loading…
Cancel
Save