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

Rank-2 temperament line types #127

Closed vsicurella closed 3 years ago

vsicurella commented 3 years ago

Here's a reimplementation of the generate rank-2 temperament feature to preserve line types when possible. I also added an output type if a user still wants to see the scale in cents (or even decimals).

You can easily end up with some crazy ratios this way, which isn't necessarily bad, but it could be useful if there was a 'Modify' option to convert intervals to cents or decimals, if for some reason you made some edits and didn't want to use the generate module again.

SeanArchibald commented 3 years ago

This is a great improvement - I will go through all your PRs some time this week. I'm looking to merge them all into develop and deploy to https://sevish.com/scaleworkshop-dev/ for testing and likely inclusion in the next release

Good point about adding a new Modify option to convert all lines to cents/commadecimal. This would be a really simple addition. I added an issue for it #128 and assigned to myself

SeanArchibald commented 3 years ago

Good stuff, this is all merged in and deployed on the dev instance: https://sevish.com/scaleworkshop-dev/ So this PR will make it into the next release! Thanks for sending it through.

I did make a change to simplifyRatio. Instead of x * gcdScalar I made it Math.round(x * gcdScalar) to prevent an issue I saw where simplifyRatioString("72409/31209") returned 702.9999999999999/303. Seems to have fixed it so hope it was the right approach