xenharmonic-devs / scale-workshop

Design and visualize microtonal scales and play them in your web browser. Export your scales for use with VST instruments. Convert Scala files to various tuning formats.
MIT License
72 stars 10 forks source link

scale-workshop

Scale Workshop screenshot

Beta Warning!

This release is in beta. Not everything has been implemented and documentation has not been synchronized with the new features.

Some of the new features are documented over at sonic-weave.

Description

Scale Workshop allows you to 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.

Frequently Asked Questions

What kinds of microtonal scales are possible with Scale Workshop?

Scale Workshop can play any kind of microtonal scale, such as equal temperaments, just intonation, historical and traditional scales, non-octave scales, and any arbitrary tunings. The application offers a few methods to generate scales automatically based on parameters you set, or otherwise you can enter your scale data manually.

Can I play and hear my scale?

Yes, the built-in synth allows you to play your scales within the web browser. If your browser supports web MIDI then you can use a connected MIDI device to play notes. Otherwise you can use your computer keyboard (e.g. a QWERTY keyboard) as an isomorphic keyboard controller to hear your scales. You can also play on a touch device using the 'Touch Keyboard' feature.

Can I use my computer keyboard as a piano

Yes, go to the Synth tab and select Piano-style layers as the Keyboard mode. There are two options: ASDF for white keys and QWERTY for black keys or QWERTY for white keys and digits for black keys with another set of keys an octave lower starting from ZXCV with ASDF as the black keys. There's also a third option for keyboards that have an extra key between the left shift and Z. When using Piano-style layers make sure that the number of key colors matches the size of your scale. Some scale generators such as Moment of Symmetry allow you to auto-generate the key colors.

Can I use Scale Workshop to tune up other synths?

Scale Workshop supports any synth that uses Scala (.scl/.kbm) files or AnaMark TUN (.tun) files. It can also export Native Instruments Kontakt tuning scripts, Max/MSP coll tuning tables and Pure Data text tuning tables.

The Xen Wiki has a list of microtonal software plugins that support Scala and AnaMark files.

How do I enter scale/tuning data manually?

Scale data should be entered in to the large text field labeled ‘Scale data’. Add each note on its own new line. Cents and ratios are both supported.

No need to enter 0. or 1/1 on the first line as your scale is automatically assumed to contain this interval.

The interval on the final line is assumed to be your interval of equivalence (i.e. your octave or pseudo-octave a.k.a. equave).

Don't add any other weird data to a line. Don't try to mix decimals with ratios (e.g. 2/1.5). Scale Workshop will try to gracefully ignore any rubbish that you put in, but it's very possible that weird stuff will happen.

Can I copy and paste the contents of a Scala file (.scl) directly into the 'Scale data' field?

Scala files contain non-tuning related comments at the top of the file, so Scale Workshop will throw an error if you try to paste them in directly. Instead you can use the ‘Import .scl’ function, which automatically removes those comments for you. Or you can paste the Scala file but remove the comments manually.

Can I convert a TUN file to another format?

Yes, start by clicking New > Import .tun and then load your TUN file into Scale Workshop. Then click Export and select your desired output format. Note that Scale Workshop is not a fully compliant AnaMark TUN v2 parser, however it should be able to read TUN files exported by Scala and Scale Workshop.

How do I make my own keyboard mapping?

Keyboard mappings are not currently supported. You can still export a Scala keyboard mapping file (.kbm) but it will assume a linear mapping. However you can always use duplicate lines in your tuning in order to skip any keys that you don't want to include, or write your .kbm file manually.

Can I undo/redo?

Use your browser's Back/Forward navigation buttons to undo/redo changes to your tuning.

How can I share my tunings with a collaborator?

Use Export current settings > Share scale found on the third column of the Build Scale tab. The given URL can be copied and pasted to another person. When they open the link they will see a Scale Workshop page with your scale already tuned in.

How can I save my work for later?

You can bookmark the current page to save your work for later. This works because your tuning data is stored within the bookmarked URL.

When I export a tuning, I get a weird filename, why?

Exporting a file with the correct filename is not supported in Safari (iOS and macOS). You can try to use Firefox, Chrome or Opera instead.

Can I run this software offline?

Yes, but you need to have npm installed and you need to build the project manually. Just follow the instructions for developers at the bottom of this README.

Can you add a new feature to Scale Workshop?

Probably! Just add your feature request to the issue tracker on GitHub.

I found a bug

Please create a bug report detailing the steps to reproduce the issue. You should also include which web browser and OS you are using.

Where is the project hosted

Archived versions

Documentation

User documentation is hosted on Github in the project wiki.

Contributing

Please base any work on main branch, and make pull requests against main as well. There is no separate development branch. Releases will be denoted using git tags.

Changelog

See CHANGELOG.md.

Contributors

Development

The app is built using Vue. This information should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar) + Vitest.

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension 1) Run Extensions: Show Built-in Extensions from VSCode's command palette 2) Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

Install project.

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run test:e2e:dev

This runs the end-to-end tests against the Vite development server. It is much faster than the production build.

But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):

npm run build
npm run test:e2e

Lint with ESLint

npm run lint

Run the backend server

See sw-server for the backend component for storing and retrieving scales.

License

MIT, see LICENCE for details.

Related projects