Old Motifator threads are available in the Archive.
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
You’re welcome - I wouldn’t want to disappoint. Â :-) Of course, Michael Trigoboff has been doing the important work! |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
But the Marketing Department really likes that new icon. They say it’s really going to help sales… |
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
Well, in that case I’m happy to be a part of what undeniably will be the project’s ultimate success. |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
I just looked into the problem with your X0A file. The problem is that the X0A file format is significantly different from the X3A file format. For instance, the length of a Master record in an X3A file is 560 bytes. In an X0A file, it’s 368 bytes. That difference is what’s causing the crash you observed. Given that, it doesn’t surprise me that there are other errors such as losing the first characters of item names. If there’s someone around here with programming skills who owns an XS, I’ll be happy to help get them up to speed with how to adapt my Python code to read an X0A file. It could be relatively simple, but then again it might not be. If someone does that, I’ll be happy to integrate the resulting code into motif2text. But adapting the code to read an X0A file is beyond the scope of what I want to do with this project. EDIT I just looked through cdw’s notes on the file formats. It may be easier to adapt the code to read X0A files than I thought. Stay tuned… |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
I saved myself a lot of programming effort by using the default text app instead of writing my own text window. One consequence of this is that once I tell the default app to open the text file, it’s completely out of my hands. The user can choose to edit the file, save it under another name, etc. I could keep a list of the .txt files I created, and delete them when the user closed the app. But then if the user left the text window(s) open, I’d be yanking the file(s) out from under the text app, with unknown and potentially annoying-to-dangerous consequences. I looked at the Python docs, and there is another possibility. I could have the app wait until the text window was closed. But that would jam the app’s GUI until you did that. You wouldn’t be able to do anything with the app until you closed the first text window. I’d have more flexibility if I went ahead and created my own text window. The text files are relatively small. Do you think leaving them around on the disk is a problem that needs to be corrected?
I’ll see what I can do to fix that. I know that at least I can catch the exception and keep it from crashing the app and displaying the error screen.
You’re most welcome. Given the amount of help I’ve gotten around here for the past couple of years, I’m delighted to be able to give something back. |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
Here’s the latest version, v1.02. This one fixes the problem 5pinDIN mentioned, where a problem reading a file gives you an error screen. Now the GUI will tell you there’s a problem, the error screen will not appear, and a .txt file will not be created in that situation. Also, you can now bring up the help file by hitting F1. Keep up the good work finding and reporting bugs! Download new version from first message in thread. |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
A fellow programmer/musician! I might have known… |
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
Although programming isn’t a major endeavor of mine, I’ve done it in the past to create some MIDI software (editor/librarians, file converters, etc.). However, my experience with computer languages isn’t recent - early on it was with Fortran, and later with various flavors of BASIC. “C” and “C+” were just mediocre grades in school, and they didn’t give “C++” as a grade (probably “B-"). Â :-) |
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
Thanks for the most recent version. It does resolve the problem with invalid files, and I noticed that you “locked out” XS “All” (X0A) files. The program seems to work correctly with XS “All Voice” (X0V) files. While motif2text accepts XS “All Pattern” (X0P), “All Song” (X0S), and “All Arpeggio” (X0G) files as input without crashing, the text output has the problem I mentioned previously of names having the first character missing. Hopefully that isn’t too difficult to resolve (I suspect it might not be, but I’d never assume that). If you need an X0P, etc., file to test with, please let me know. Thanks again for your (continuing) work. |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
You’re welcome. I didn’t lock out X0A files. What I did instead was code the GUI to catch the exception when the file reading code crashes, which it still does with X0A files in version 1.02. Good news! I just got the app to read an X0A file without crashing. Motif files have an internal set of file version numbers (good work, Yamaha!), and all I had to do was check those and suitably adjust the expected length of a Master data block. Some of the names are still showing up missing the first character, but that’s going to be trivial to fix. I have to go teach my CS class now, so I won’t be able to release a new version until later today. |
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
I wasn’t sure how you handled the X0A problem in v1.02, which is why I put “locked out” in quotes.
Â
Great! I’ve already got a slightly modified icon ready in anticipation of a version of motif2text that works fully with XS files. It retains the white-on-black lettering of the XF logo, but the color scheme of the keyboard part is close to that of the XS. See attachment. File Attachments
MOTIF2TEXT_32-XSicon.zip (File Size: 1KB - Downloads: 297) |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
And yet another programmer/musician. A few more, and we could have a “club” or something. My first high-level language was Fortran, back in the days of punch cards, which reminds me of my first experience with computer music. At my first programming job, this guy wrote some code with loops in it that ran at different frequencies. He put an AM radio tuned between stations on top of the computer and ran the code. It played a song in different tones of AM static. For 1970, it was pretty cool. C++ as a grade. I love it! My fellow CS instructors at PCC are going to get a real kick out of that… |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
Would ++C be a better grade? (In-joke for programmers.) |
Michael Trigoboff
Total Posts: 647
Joined 09-05-2011 status: Guru |
Here’s v1.03 of the motif2text app. This one can read X0A files, and presumably any other file type that an XS can produce. As always, your testing and bug reporting is a crucial part of getting the app to be working and available. Download new version from first message in thread. |
5pinDIN
Total Posts: 11891
Joined 09-16-2010 status: Legend |
It’s looking pretty good, I found just two minor things… 1) User Waveforms aren’t being numbered correctly.
XS example:
XF example from Inspiration in a Flash, which has a single User Waveform:
I didn’t look at the Motif files, so I don’t know for sure what the “-” is preceding the User Waveform numbers, although it appears to be a “minus” sign. As things are right now, the “-” differentiates the User and Flash Waveforms. It seems that perhaps 128 will play a part in resolving the numbering issue  :-) . 2) This is really minor, possibly not at all important, or might be intentional. Where duplicate Waveforms are called out, the number given for the duplicate has leading zeros “missing” in comparison to the main part of the list.
Example from IiaF:
Otherwise, v1.03 seems to be fine. Thanks. |