Skip to content

Commit

Permalink
add note-off RELEASE for ASR-LOOP
Browse files Browse the repository at this point in the history
  • Loading branch information
marchingband committed Dec 26, 2023
1 parent 1bea81b commit 171a601
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bundle.h

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ enum retrigger_mode {

enum note_off_meaning {
HALT,
IGNORE
IGNORE,
RELEASE
};

enum edge {
Expand Down
6 changes: 5 additions & 1 deletion src/wav_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,10 @@ void IRAM_ATTR wav_player_task(void* pvParameters)
bufs[b].wav_player_event.voice == wav_player_event.voice &&
bufs[b].wav_player_event.note == wav_player_event.note &&
bufs[b].free == 0 &&
bufs[b].wav_data.note_off_meaning == HALT
(
bufs[b].wav_data.note_off_meaning == HALT ||
bufs[b].wav_data.note_off_meaning == RELEASE
)
// (
// bufs[b].wav_data.note_off_meaning == HALT ||
// bufs[b].wav_data.play_back_mode == ASR_LOOP || // ASR gets stopped either way
Expand Down Expand Up @@ -984,6 +987,7 @@ void IRAM_ATTR wav_player_task(void* pvParameters)
if(
(bufs[buf].fade == FADE_OUT) &&
(bufs[buf].wav_data.note_off_meaning == HALT) &&
// (bufs[buf].wav_data.note_off_meaning == RELEASE) &&
(i % fade_factor < 2) // were fading and its time to decrement volumes
)
{
Expand Down

0 comments on commit 171a601

Please sign in to comment.