|
|
@ -114,7 +114,7 @@ namespace Heck { |
|
|
|
void next_step() |
|
|
|
{ |
|
|
|
step_current++; |
|
|
|
if(step_current >= STEP_COUNT) { |
|
|
|
if (step_current >= STEP_COUNT) { |
|
|
|
step_current = 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -198,7 +198,7 @@ namespace Heck { |
|
|
|
{ |
|
|
|
hw.Configure(); |
|
|
|
hw.Init(); |
|
|
|
hw.StartLog(Constants::Developer::BOOT_WAIT_FOR_LOG); |
|
|
|
hw.StartLog(Constants::Developer::LOG_BLOCKS_BOOT); |
|
|
|
|
|
|
|
but_rec.Init(hw.GetPin(Constants::Hardware::PIN_BUTTON_RECORD), 0); |
|
|
|
|
|
|
@ -312,7 +312,7 @@ namespace Heck { |
|
|
|
tracks[cc.channel].instrument->ctl(2, val_normalized); |
|
|
|
break; |
|
|
|
case Constants::MIDI_Mapping::TRACK_PARAM2: |
|
|
|
tracks[cc.channel].instrument->ctl(3,val_normalized); |
|
|
|
tracks[cc.channel].instrument->ctl(3, val_normalized); |
|
|
|
break; |
|
|
|
case Constants::MIDI_Mapping::TRACK_FILTER: |
|
|
|
tracks[cc.channel].filter(val_normalized); |
|
|
@ -392,21 +392,22 @@ namespace Heck { |
|
|
|
clock_time_new = clock.tick_infinite(); |
|
|
|
if (clock_time_current != clock_time_new) { |
|
|
|
clock_time_current = clock_time_new; |
|
|
|
if (0) { |
|
|
|
hw.PrintLine("CLOCK:%i", clock_time_current); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
clock_bar_new = clock.count_bar(); |
|
|
|
if (clock_bar_new != clock_bar_current) { |
|
|
|
clock_bar_current = clock_bar_new; |
|
|
|
// hw.PrintLine("Bar: %i", clock_bar_current);
|
|
|
|
if (Constants::Developer::LOG_CLOCK_BAR) { |
|
|
|
hw.PrintLine("Bar: %i", clock_bar_current); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
clock_16n_new = clock.count_16n(); |
|
|
|
if (clock_16n_new != clock_16n_current) { |
|
|
|
clock_16n_current = clock_16n_new; |
|
|
|
// hw.PrintLine("16n: %i", clock_16n_current);
|
|
|
|
if (Constants::Developer::LOG_CLOCK_16N) { |
|
|
|
hw.PrintLine("16n: %i", clock_16n_current); |
|
|
|
} |
|
|
|
sequencer.next_step(); |
|
|
|
} |
|
|
|
|
|
|
@ -430,10 +431,9 @@ namespace Heck { |
|
|
|
midi_log_systick_last = systick_now; |
|
|
|
if (!event_log.IsEmpty()) { |
|
|
|
auto msg = event_log.PopFront(); |
|
|
|
// hw.PrintLine("fsfs");
|
|
|
|
switch (msg.type) { |
|
|
|
case ld::MidiMessageType::SystemRealTime: { |
|
|
|
if (0) { |
|
|
|
if (Constants::Developer::LOG_MIDI_REALTIME) { |
|
|
|
char outstr[256]; |
|
|
|
char rttype_str[32]; |
|
|
|
GetMidiRTTypeAsString(msg, rttype_str); |
|
|
@ -446,7 +446,7 @@ namespace Heck { |
|
|
|
case ld::NoteOn: |
|
|
|
case ld::NoteOff: |
|
|
|
case ld::MidiMessageType::ControlChange: { |
|
|
|
if (0) { |
|
|
|
if (Constants::Developer::LOG_MIDI_NOTESANDCC) { |
|
|
|
char outstr[256]; |
|
|
|
char type_str[32]; |
|
|
|
GetMidiTypeAsString(msg, type_str); |
|
|
|