Open SeanArchibald opened 2 years ago
Hi Sean, I am the author of the Super MIDI Pak web app. This email was a request to create an export to my format but there is also the option for me to import one of your file exports. I think that might be a better experience for my users. Question for you, what do you think would be the best format to support for importing? I would implement SCL/KBM but it seems like it needs two files instead of one, is there a better standard single-file format for setting a specific frequency on each MIDI key?
rianhunter commented 4 minutes ago
...there is also the option for me to import one of your file exports.
I think SCL/KBM and TUN are the most popular ones. TUN lists all individual pitches in cents for each MIDI key as measured from standard MIDI note 0.
Here are references to our TUN exporter and importer: https://github.com/xenharmonic-devs/scale-workshop/blob/457de46bee535661c9922ab0061b714b48bf41aa/src/exporters/anamark.ts https://github.com/xenharmonic-devs/scale-workshop/blob/457de46bee535661c9922ab0061b714b48bf41aa/src/importers/anamark.ts
We also have a bespoke export format planned #34, but not implemented yet.
@frostburn Thank you for the suggestion, TUN seems like it should be good. I'll try to get that working.
It's worth mentioning that the TUN format has different versions, V1, V1.5, V2. V2 contains all the same info as previous versions but adds programmatic ways of generating the tuning from the file, which makes implementation much more difficult. As a result, most synths don't support V2 but only the earlier V1.5. You might consider doing the same - ignore the V2 data and just read from the list of individual pitches.
While digging into this today I noticed that the tun v1 files that Scale Workshop exports are not supported on import. Was that intentional?
rianhunter commented 11 minutes ago
While digging into this today I noticed that the tun v1 files that Scale Workshop exports are not supported on import. Was that intentional?
It's partly intentional so that we can display a nicely formatted finite scale which is only available in v2, but you are right to point this out. There's no reason why we shouldn't load a full 128 note scale in the app. I'll make a separate issue for this.
I've implemented basic TUN v1 importing into my application so there is little need to add an export option to my session file format. From my perspective you may close this issue.
rianhunter commented 5 hours ago
I've implemented basic TUN v1 importing into my application so there is little need to add an export option to my session file format. From my perspective you may close this issue.
Thank You! I'm marking this as out of scope. Might be a fun exercise for a new developer one day, but not that important.
Hi Sean and Rian. Thank you both for supporting this. Sean, I tried exporting AnaMark v1 tuning (.tun) and I could not import it into SMP. However, I found the contents of a tun file in a form, copied that text into a text file and tried upload that, it works. That contained note numbers like: note 1=4827, their value in hertz. Scale Workshop's AnaMark v1 tuning (.tun) values looks like this: 1=-25800unixnote.
Also, what do you recommend to convert an scl+kbm into a tun?
OK, I found the issue. When I download a tuning from Scale Workshop on a Mac it places unix markes in it. On Windows it is fine. Sean, I think this is could be a matter of setting the right MIME type on the server.
nsputnik commented 5 hours ago
OK, I found the issue. When I download a tuning from Scale Workshop on a Mac it places unix markes in it. On Windows it is fine.
Can you test if going to Preferences and setting Line endings format to Microsoft (Windows/MS-DOS) fixes the issue on a Mac?
nsputnik commented 5 hours ago
OK, I found the issue. When I download a tuning from Scale Workshop on a Mac it places unix markes in it. On Windows it is fine.
Can you test if going to Preferences and setting Line endings format to Microsoft (Windows/MS-DOS) fixes the issue on a Mac?
Now it seems to be output the files properly correctly regardless of the endings format.
Request received via email:
Contents of attached super midi pak.json: