Dateien hochladen nach „“

pull/104/head
positionhigh 4 years ago
parent fc0cf9501c
commit d02a19b03f
  1. 10
      UI_FX_T4.h
  2. 34
      dexed_sd.cpp
  3. 62
      sequencer.h

@ -121,11 +121,11 @@ LCDML_add(87, LCDML_0, 4, "Drums", NULL);
LCDML_add(88, LCDML_0_4, 1, "Drums Main Vol", UI_func_drums_main_volume);
LCDML_add(89, LCDML_0_4, 2, "Drum Volumes", UI_func_drum_volume);
LCDML_add(90, LCDML_0_4, 3, "Drum Pan", UI_func_drum_pan);
LCDML_add(91, LCDML_0_4, 4, "Drum Pitch", UI_func_drum_pitch);
LCDML_add(92, LCDML_0_4, 5, "Drum Rev.Send", UI_func_drum_reverb_send);
LCDML_add(93, LCDML_0_4, 6, "MIDI Channel", UI_func_drum_midi_channel);
LCDML_add(94, LCDML_0_4, 7, "Smart Filter", UI_func_smart_filter);
LCDML_add(95, LCDML_0_4, 8, "Drum Monitor", UI_func_drum_monitor);
LCDML_add(91, LCDML_0_4, 4, "Drum Rev.Send", UI_func_drum_reverb_send);
LCDML_add(92, LCDML_0_4, 5, "Drum Pitch", UI_func_drum_pitch);
LCDML_add(93, LCDML_0_4, 6, "Drum Tune", UI_func_drum_tune_offset);
LCDML_add(94, LCDML_0_4, 7, "MIDI Channel", UI_func_drum_midi_channel);
LCDML_add(95, LCDML_0_4, 8, "Smart Filter", UI_func_smart_filter);
LCDML_add(96, LCDML_0, 5, "Sequencer", NULL);
LCDML_add(97, LCDML_0_5, 1, "Pattern Editor", UI_func_seq_pattern_editor);
LCDML_add(98, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor);

@ -34,6 +34,7 @@ using namespace TeensyTimerTool;
#include "synth_dexed.h"
#if NUM_DRUMS > 0
#include "drums.h"
extern set_drums_volume(float vol);
extern drum_config_t drum_config[NUM_DRUMSET_CONFIG];
#endif
@ -47,7 +48,7 @@ extern float drums_volume;
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 +484,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 +1090,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 +1100,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 +1395,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];
}
}

@ -3,7 +3,7 @@ float drums_volume;
uint8_t seq_active_track = 0;
uint8_t seq_menu;
bool seq_button_r = false;
bool seq_noteoffsent[4] = {false, false, false, false};
bool seq_noteoffsent[NUM_SEQ_TRACKS] = {false, false, false, false,false, false};
uint8_t seq_step = 0;
bool seq_running = false;
bool seq_recording = false;
@ -14,7 +14,7 @@ char seq_name_temp[FILENAME_LEN];
uint8_t seq_note_in;
uint8_t seq_note_in_velocity;
int seq_transpose;
uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 };
uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 ,1,1 };
uint8_t seq_chord_dexed_inst = 0;
uint8_t seq_chord_velocity = 60;
uint8_t seq_chord_key_ammount = 4;
@ -45,7 +45,7 @@ char arp_style_names[4][3] = { 'u', 'p', ' ',
'u', '&', 'd',
'R', 'N', 'D',
};
int seq_tempo_ms = 147;
int seq_tempo_ms = 180000;
int seq_bpm = 102;
uint8_t seq_temp_select_menu;
uint8_t seq_temp_active_menu = 99;
@ -66,27 +66,27 @@ uint8_t arp_counter = 0;
uint8_t arp_lenght = 8;
uint8_t seq_data_buffer[16] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
uint8_t seq_data[NUM_SEQ_PATTERN][16] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 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, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
//uint8_t seq_data[10][16] = {69 , 69 , 0 , 69 , 69 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
// 67 , 67 , 0 , 67 , 67 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
// 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
@ -133,10 +133,12 @@ uint8_t seq_vel[NUM_SEQ_PATTERN][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
// 123, 120, 0, 110, 120, 0, 90, 120, 0, 0, 0, 0, 0, 0, 0, 0
// };
uint8_t seq_patternchain[NUM_SEQ_TRACKS][4] = { 0 , 2 , 6 , 9 ,
1 , 2 , 5 , 8 ,
0 , 2 , 6 , 9 ,
1 , 2 , 5 , 7
};
uint8_t seq_content_type[NUM_SEQ_PATTERN] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio
uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0, 0, 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
uint8_t seq_patternchain[4][NUM_SEQ_TRACKS] = { 0 , 2 , 6 , 9 , 99,99,
1 , 2 , 5 , 8 , 99,99,
0 , 2 , 6 , 9 , 99,99,
1 , 2 , 5 , 7 ,99,99
};
uint8_t seq_content_type[NUM_SEQ_PATTERN] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio
uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0, 1, 1, 1,1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp

Loading…
Cancel
Save