Open kylewilk567 opened 1 year ago
Thanks for the PR, Kyle! It looks good overall, apart from the thing I mentioned above.
I'll do some manual testing soon when I have time, and merge it if everything looks and sounds good.
This doesn't appear to fix the issue in #421, unfortunately :(
Here's what I did to test:
alda repl -s -p 12345
to start a REPL server on port 12345.client/bin/run repl \
--client \
--port 12345 \
--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"}'
The "hiccup" is still there where the final rest is skipped.
I tested the code using the following commands in Windows Powershell and it works:
The r4 that occurs at the end of the first line is correctly handled. I wasn't able to replicate it using the procedure above since my Alda executable in my PCs PATH is the old version. Do you have any suggestions as to why our testing may have given different results?
@kylewilk567 Sorry for the late reply - I've been on vacation the last couple weeks.
This is interesting! I tried it the way you described, and I also heard the last rest being handled correctly. But I tried it again the way I described (running a REPL server in another terminal and using the CLI to send it messages), and the rest is still getting left out when I do it that way.
I wonder if there is some important difference in the way the messages are being sent to the REPL server when you do it via the CLI vs. doing it interactively in a REPL client session?
Patch to fix issue #421 . Checks the ending duration of what is sent to the client matches the PartOffset in the Score object. If there is a mismatch (as in the case with a trailing rest), extra duration is appended to the last note.