Smaller fixes and additions.

pull/4/head
Holger Wirtz 6 years ago
parent beae42e8ff
commit f1f406fdb9
  1. 12
      MicroDexed.ino
  2. 15
      config.h

@ -43,7 +43,7 @@ AudioConnection patchCord3(queue1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=507,403
// GUItool: end automatically generated code
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
MIDI_CREATE_INSTANCE(HardwareSerial, MIDI_DEVICE, MIDI);
Dexed* dexed = new Dexed(SAMPLE_RATE);
bool sd_card_available = false;
uint8_t bank = EEPROM.read(EEPROM_BANK_ADDR);
@ -76,7 +76,7 @@ void setup()
delay(200);
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed"));
Serial.println(F("(c)2018 H. Wirtz <wirtz@parasitstudio.de>"));
Serial.println(F("setup start"));
Serial.println(F("<setup start>"));
// start up USB host
#ifdef USE_ONBOARD_USB_HOST
@ -127,7 +127,7 @@ void setup()
sched_note_off.begin(note_off, 6333333);
#endif
Serial.println(F("setup end"));
Serial.println(F("<setup end>"));
show_cpu_and_mem_usage();
#ifdef TEST_NOTE
@ -180,6 +180,9 @@ void handle_midi_input(void)
usb_host.Task();
while (midi_usb.read())
{
#ifdef DEBUG
Serial.println(F("MIDI-USB"));
#endif
if (MIDI.getType() == 0xF0) // SysEX
{
handle_sysex_parameter(MIDI.getSysExArray(), MIDI.getSysExArrayLength());
@ -191,6 +194,9 @@ void handle_midi_input(void)
while (MIDI.read())
{
#ifdef DEBUG
Serial.println(F("MIDI-Serial"));
#endif
if (MIDI.getType() == 0xF0) // SYSEX
{
handle_sysex_parameter(MIDI.getSysExArray(), MIDI.getSysExArrayLength());

@ -25,22 +25,27 @@
#include "midinotes.h"
// Initial values
#define MIDI_DEVICE Serial1
#define VOLUME 0.1
#define SAMPLE_RATE 44100
//#define DEXED_ENGINE DEXED_ENGINE_MODERN
#define USE_ONBOARD_USB_HOST 1
#define MAX_NOTES 16
//#define USE_ONBOARD_USB_HOST 1
#if !defined(__MK66FX1M0__) // check for Teensy-3.6
#define MAX_NOTES 11 // No?
#else
#define MAX_NOTES 16 // Yes
#endif
#define AUDIO_MEM 2
#define DEFAULT_SYSEXBANK 0
#define DEFAULT_SYSEXSOUND 0
// Master key handling (comment out for disabling)
// Master key handling (comment for disabling)
#define MASTER_KEY_MIDI MIDI_C6
#define MASTER_NUM1 MIDI_C1
// Debug output
#define SERIAL_SPEED 38400
//#define SHOW_DEXED_TIMING 1
#define SHOW_DEXED_TIMING 1
#define DEBUG 1
#define SHOW_MIDI_EVENT 1
#define SHOW_XRUN 1
@ -52,7 +57,7 @@
#define REDUCE_LOUDNESS 2
// Enable TEST_NOTE for adding code to drop some midi notes for testing without keyboard
//#define TEST_NOTE MIDI_E2
#define TEST_NOTE MIDI_E2
#define TEST_VEL_MIN 60
#define TEST_VEL_MAX 110

Loading…
Cancel
Save