Skip to content

Commit

Permalink
feat(DmPerformance): log more info about playing pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Apr 29, 2024
1 parent e644513 commit d0dbd49
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,6 @@ static void DmPerformance_playPattern(DmPerformance* slf, DmPattern* pttn) {
DmMessageQueue_clear(&slf->music_queue);
DmSynth_sendNoteOffEverything(&slf->synth);

Dm_report(DmLogLevel_DEBUG, "DmPerformance: Playing pattern '%s'", pttn->info.unam);

int variation_lock[256];
for (size_t i = 0; i < 256; ++i) {
variation_lock[i] = -1;
Expand Down Expand Up @@ -636,6 +634,12 @@ static void DmPerformance_playPattern(DmPerformance* slf, DmPattern* pttn) {
uint32_t pattern_length = Dm_getMeasureLength(slf->time_signature) * pttn->length_measures;
DmMessageQueue_add(&slf->music_queue, &msg, slf->time + pattern_length, DmQueueConflict_KEEP);

Dm_report(DmLogLevel_INFO,
"DmPerformance: Playing pattern '%s' (measure %d, length %d)",
pttn->info.unam,
slf->time / Dm_getMeasureLength(slf->time_signature) + 1,
pttn->length_measures);

slf->variation += 1;
}

Expand Down

0 comments on commit d0dbd49

Please sign in to comment.