fix: note pan min/max can be up to 128#9
fix: note pan min/max can be up to 128#9demberto merged 5 commits intodemberto:masterfrom zautumnz:fix/pan-min-max
Conversation
|
Thanks for your contributions :) I am actually doing an entire rewrite rn, none of those commits are pushed but, I am going for a more standard property based approach. I will merge this PR and make a patch release but in the near future everything is gonna get rewritten, so if you are making any changes to how the property handling or event parsing works, please don't. Does FL Studio on Mac use UTF16 strings as well? |
|
Is the rewrite going to cause issues with already written contributions @demberto |
|
Good catch, I never really use Notebook2 or project info, so didn't notice that. Tested this commit with a Notebook2. Please let me know if that change is idiomatic; I'm kind of new to Python so not sure if it conforms to the style or not. If that's going to be overwritten by your rewrite I can revert that commit. I look forward to the rewrite! |
|
@zacanger
They will be idiomatic as well, since now I am better at Python myself. But most importantly, the property values will not be generated by all the Along with this, after the events are all collected into a list by Or, I have been thinking of other way where the model classes (Channel, Track etc.) could be just simple dataclasses and serialization/deserialization would fall in the hands of collectors. Also, I need to be very careful about validators in the future, probably discard their use completely. FLP is a very broken format at its core. The fact that they get invoked while parsing (its a bug) is the source of many problems. |
|
Thanks. I reverted the TextEvent change, left the one in Notebook2, but didn't touch DataEvent itself. I definitely look forward to your changes. I'm not surprised the FLP format is messy, since they've kept it mostly backwards-compatible for the last 24 years. It must be quite a chore keeping up with whatever Image Line are doing without good documentation on the format, so really, huge thanks for doing the work in this project :) |
|
Hang on @zacanger, note pan is stored in a single byte internally and the range of a signed byte is -128 to 127. It can't be +128 |
Codecov Report
@@ Coverage Diff @@
## master #9 +/- ##
==========================================
- Coverage 84.18% 84.17% -0.02%
==========================================
Files 56 56
Lines 3857 3860 +3
Branches 641 641
==========================================
+ Hits 3247 3249 +2
- Misses 505 506 +1
Partials 105 105
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Note pan can be -128—128. Tested simply by adding one note on the piano roll and using the piano roll pan editor all the way up/down. On FL v 20.9.2 (build 2459), Producer/All Plugins edition, on Apple Silicon mac 12. Test FLP attached.
test-flp.zip