-
-
Notifications
You must be signed in to change notification settings - Fork 309
Open
Labels
Description
🐞 Bug report 🐞
Description
@litan on Alda Slack observed that if you run the following command twice in succession:
alda repl \
--client \
--port 43009 \
--message '{"op": "eval-and-play", "code": "percussion: o2 (tempo 240) c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 d4 r4"}'It appends the two together as expected, however, the r4 at the end gets stripped off, so the c4 at the beginning of the second command ends up happening a quarter note too soon.
I was also able to reproduce this in an interactive Alda REPL session.
Steps to Reproduce
- Run
alda replto start a REPL session. - Enter
percussion: o2 (tempo 240) c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 d4 r4and press Enter. - Before that line finishes playing, press Up arrow, Enter to enter the same line again.
Expected Behavior
The notes you hear are all spaced apart by quarter note rests.
Actual Behavior
It sounds like the r4 quarter note rest at the end of the first line is omitted, and there is a "hiccup" where the second line starts a quarter note too early.
Environment
Operating system and version: Ubuntu 20.04
Alda version: 2.2.3
schneiderfelipe