SeanArchibald / scale-workshop

Design microtonal scales and play them in your web browser. Export your scales for use with VST instruments. Convert Scala files to various tuning formats.
https://sevish.com/scaleworkshop/
146 stars 23 forks source link

Support AnaMark TUN v0/v1 import #65

Open SeanArchibald opened 4 years ago

SeanArchibald commented 4 years ago

Much of the work has already been done but is unfinished and commented out.

If anybody has v0/v1 files for testing, please reply here with files attached

Ch4rli3G0rd0n commented 4 years ago

hi, i'm the one who contacted you about this on your site, here are some files (don't know if v0 or v1), from Omnisphere and from other sources: Microtonal.zip 00-c.zip. In the meantime, do you know if there's a archive somewhere of more recent tun files? All the ones i have seem to be either v0 or v1. Thanks a lot!

SeanArchibald commented 3 years ago

Here's why v0/v1 import is tricky... The tun file contains no scale (intervals) data, just 128 tuned pitches.

The simplest way of importing that data is to set the base note to 0, base frequency to the first pitch, then add all the next 127 pitches as intervals in the scale. This will look like a mess but it's better than nothing.

What's better is to introduce some logic which tries to find a pattern/repeat in those 128 pitches and intelligently use that to work out the original intervals in the scale. But as we know, some tunings don't have any easily discoverable pattern, so the logic should fall back to the above method of importing all 128 pitches if it needs to.

This is quite low on my own list of priorities but I welcome a PR if anybody is really desperate for v0/v1 tun import