-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing and exporting with custom text formats #82
Conversation
Abount integrating this in the editor, I an not completely sure how I lay it out the best way. Another thing is that there exists already ctrl-c/ctrl-v as copy & paste, which currently copies instrument's binary data. |
What is implemented and working:
|
Next, I allowed to parse varying forms of PMD found... Also, writing name seems optional is the case of PMD. For me, the current state if fine to merge. |
Also @Wohlstand, the travis shows failure at the ftp upload step. |
That because your branch state lacks the script I have added in some moment, so, merging... |
Oh that's right, I didn't pay attention about this. Thanks |
context: Wohlstand#81 / Wohlstand#82 In FMP distribution from 199x, there was a default template bank definition file (`88NEIRO.TPI`) whose format was like this: ``` "Harpsichord '@ 0 AR DR SR RR SL TL KS ML DT '@ 31,12, 4,10, 1,32, 0,12, 0 '@ 31, 2, 4, 6,15,57, 3,15, 1 '@ 31,12, 4, 6, 0,30, 0, 1, 0 '@ 31, 5, 7, 7, 2, 0, 2, 3, 4 '@ 2,7 ``` On the other hand, this is what we see from "Copy to FMP": ``` '@ FA 0 '@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 '@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 '@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 '@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 '@ 0, 0 ``` There are some notable differences, but so far what I find annoying is that the last parameter (AM/DT2) was optional in the original format, while it was mandatory without this fix.
#81
Hi, this shows a concept of using custom text formats for reading and writing.
It's not implemented yet in the editor, and only has VOPM as a format now.
In
createVopmFormat
, it can be seen how to build a grammar for a format.The
Val
s are to replace with the actual values of the instrument. To associate with values, it relies on MetaParameter, which has been given a setter function.The
Int
s are just number fields which are ignored, and have defaults used for writing.While writing, the whitespace tokens are used for human-readable formatting.
During parsing, the whitespace tokens are always ignored.