pinobatch / pently

Scalable music engine for NES games
zlib License
72 stars 4 forks source link

Fix transpose of pattern fallthrough #1

Closed pinobatch closed 5 years ago

pinobatch commented 8 years ago

As of 0.05wip3, pentlyas supports an undocumented fallthrough command, allowing a pattern to continue into the next pattern. But this is defective because it doesn't take into account differences in the transposition base between patterns. @jroatch has provided a test case, with the following explanation:

# fallthrough patterns are quite useful to save space in
# the conductor data, but the 0.05 assembler transposes
# them weird.  Uncomment the '//' lines to hear what they
# are supposed to be.

2016-02-03_fallthrough-tests.pently.zip

pinobatch commented 5 years ago

The score could play a fallthrough group starting at any pattern boundary, and PATEND needs to return to the same transposition at the end. This means the assumed transposition base for all patterns in the group must be the same. Here's a plan:

pinobatch commented 5 years ago

There was a minor problem with the test case that jroatch provided. When I added bar check about two years after the test case (#26), the pickup command became usable within patterns. So I had to move the pickup command in the test case above the pattern definitions and document this parser quirk.