Dateien hochladen nach „“

pull/105/head
positionhigh 3 years ago
parent 4da592a878
commit 8af83fec0a
  1. 20
      MicroDexed.ino
  2. 9
      config.h
  3. 35
      dexed_sd.cpp
  4. 20530
      drumset.h

@ -648,7 +648,7 @@ void setup()
#endif
LCDML.OTHER_jumpToFunc(UI_func_voice_select);
timer1.begin(sequencer, 90000, false);
timer1.begin(sequencer, seq_tempo_ms / 2, false);
}
void loop()
@ -693,19 +693,6 @@ void loop()
lcd.print( seq_chord_names[arp_chord][2]);
lcd.print( seq_chord_names[arp_chord][3]);
}
else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_drum_monitor)) // UI is in Drum Status Monitor
{
for (uint8_t i = 0; i < NUM_DRUMS; i++)
{
lcd.setCursor( i * 2, 1);
if (Drum[i]->isPlaying() ) {
lcd.write(49 + i);
} else
{
lcd.write(32);
}
}
}
}
}
// CONTROL-RATE-EVENT-HANDLING
@ -1777,6 +1764,11 @@ void init_MIDI_send_CC(void)
VOLUME HELPER
******************************************************************************/
void set_drums_volume(float vol)
{
master_mixer_r.gain(2, vol);
master_mixer_l.gain(2, vol);
}
void set_volume(uint8_t v, uint8_t m)
{
float tmp_v;

@ -116,11 +116,12 @@
#define DRUM_MIDI_CHANNEL 10
// NUMBER OF SAMPLES IN DRUMSET
#define NUM_DRUMSET_CONFIG 69
#define NUM_DRUMSET_CONFIG 71
// SEQUENCER
#define NUM_SEQ_PATTERN 10
#define NUM_SEQ_TRACKS 4
#define NUM_SEQ_PATTERN 24
#define NUM_SEQ_TRACKS 6
// CHORUS parameters
#define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(20.0)) // 20.0 ms delay buffer.
@ -196,7 +197,7 @@
#define ENABLE_LCD_UI 1
#define STANDARD_LCD_I2C
//#define OLED_SPI
//#define TESTDISPLAY20x4 //Currently for testing I2C Display 20x4
//#define TESTDISPLAY20x4 //Currently for testing I2C Display 20x4 aka type "2004"
// LCD Display
//I2C_DISPLAY only

@ -34,6 +34,7 @@ using namespace TeensyTimerTool;
#include "synth_dexed.h"
#if NUM_DRUMS > 0
#include "drums.h"
extern void set_drums_volume(float vol);
extern drum_config_t drum_config[];
#endif
@ -43,11 +44,10 @@ extern void check_configuration_performance(void);
extern void check_configuration_fx(void);
extern void sequencer();
extern float drums_volume;
//extern StaticJsonDocument<JSON_BUFFER> data_json;
extern uint8_t seq_chain_lenght;
extern uint8_t seq_data[NUM_SEQ_PATTERN][16];
extern uint8_t seq_vel[NUM_SEQ_PATTERN][16];
extern uint8_t seq_patternchain[NUM_SEQ_TRACKS][4];
extern uint8_t seq_patternchain[4][NUM_SEQ_TRACKS];
extern uint8_t seq_content_type[NUM_SEQ_PATTERN];
extern uint8_t seq_track_type[NUM_SEQ_TRACKS];
extern uint8_t seq_chord_key_ammount;
@ -483,7 +483,7 @@ bool load_sd_drumsettings_json(uint8_t number, uint8_t target)
Serial.println();
#endif
drums_volume = data_json["drums_volume"];
set_drums_volume(drums_volume);
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG; i++)
{
set_sample_pitch( i, data_json["pitch"][i] );
@ -1089,13 +1089,9 @@ bool save_sd_seq_json(uint8_t seq_number)
Serial.print(F(" to "));
Serial.println(filename);
#endif
int total = sizeof(seq_data);
int columns = sizeof(seq_data[0]);
int total = sizeof(seq_patternchain);
int columns = sizeof(seq_patternchain[0]);
int rows = total / columns;
Serial.print(F("Rows: "));
Serial.print(rows);
Serial.print(" Columns: ");
Serial.print(columns);
Serial.print(F(" "));
AudioNoInterrupts();
SD.begin();
@ -1103,9 +1099,6 @@ bool save_sd_seq_json(uint8_t seq_number)
json = SD.open(filename, FILE_WRITE);
if (json)
{
total = sizeof(seq_patternchain);
columns = sizeof(seq_patternchain[0]);
rows = total / columns;
Serial.print(F("Chain Rows: "));
Serial.print(rows);
Serial.print(" Chain Columns: ");
@ -1401,23 +1394,29 @@ bool load_sd_seq_json(uint8_t seq_number)
int count = 0;
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
for (uint8_t j = 0; j < columns; j++)
{
seq_patternchain[i][j] = data_json["seq_patternchain"][count];
count++;
}
}
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) {
for (uint8_t i = 0; i < sizeof(seq_track_type); i++)
{
seq_track_type[i] = data_json["track_type"][i];
}
for (uint8_t i = 0; i < sizeof(seq_content_type); i++) {
for (uint8_t i = 0; i < sizeof(seq_content_type); i++)
{
seq_content_type[i] = data_json["content_type"][i];
}
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) {
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++)
{
seq_inst_dexed[i] = data_json["seq_inst_dexed"][i];
}
if (data_json["seq_name"][0] != 0) {
for (uint8_t i = 0; i < FILENAME_LEN; i++) {
if (data_json["seq_name"][0] != 0)
{
for (uint8_t i = 0; i < FILENAME_LEN; i++)
{
seq_name[i] = data_json["seq_name"][i];
}
}

20530
drumset.h

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