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
80 stars 11 forks source link

Improved Lattice Visualization #38

Closed frostburn closed 3 months ago

frostburn commented 2 years ago

Visualize the lattice of just intonation so that similar intervals have similar angles and lengths in the visualization. Use comma vectors to make the visualization periodic.

frostburn commented 2 years ago

I think an <svg> element is a good fit for this. I wouldn't go as far as using Vue for the child elements because lattices can have hundreds of elements that we want to interact with. I suspect that isometric orthogonal projection is enough to make a useful tool for displaying JI relationships and even for adding new notes to the scale. While a bit clumsy, an all-positive Clifford algebra might suffice and those are available through temperaments.getAlgebra(n, 'float64'). Sharing a cache with tempering saves memory too.

frostburn commented 1 year ago

An interactive lattice is more work. We can start with a plain visualization in the Analysis tab with draggable prime vectors and no need to worry about orthonormality and algebras. To make dragging less compute-intensive we can drop periodicity while dragging the mapping vectors.

frostburn commented 11 months ago

So we're finally moving ahead with a lattice in #453, features still missing:

frostburn commented 10 months ago

richieToday at 6:19 PM

I spent a couple hours using this device last night for a project I'm working on! Thanks so much! These ideas are probably all well considered so I don't mean for'm to be boring/bother. Two things that come to mind: I'd love to have an option/way to change the size of the text, even potentially hide it altogether if desired. on several of the lattices I was making, text was quickly overlapping/cluttered feeling; tried to use the "zoom" function in my brower to no avail. When removing altogether I could see it as an inviting way for people to demonstrate their scales in videos too, given the interactive "light" up vertices. (nice touch!)

frostburn commented 10 months ago

sintel 🎏Today at 7:04 PM

if you have some kind of svg export it would be easy for people to download and change labeling or whatever they desire

frostburn commented 10 months ago

It would be nice to somehow see the lattice while editing the scale too.

frostburn commented 9 months ago

AbnormalityToday at 9:12 PM

why does this [[5-limit scale]] make a pretty square but then when i do the same thing with 9/7 intstead of 5/4 it makes one of the lines 7/4 and no longer makes a pretty square. could there be an option to manually set this.

zastari commented 8 months ago

+1 for user defined prime vectors. An example scale to test it on:

https://scaleworkshop.plainsound.org/lattice?l=3e2F3cf_hFf_9eF81_hFd_9eF73_81F5f_qFh_81F4p_qFf_3shF1yf_2F1&version=2.3.3

This scale should be able to be drawn as a connected lattice based on providing 17/15 and 17/13 as inputs.

frostburn commented 8 months ago

+1 for user defined prime vectors. An example scale to test it on:

https://scaleworkshop.plainsound.org/lattice?l=3e2F3cf_hFf_9eF81_hFd_9eF73_81F5f_qFh_81F4p_qFf_3shF1yf_2F1&version=2.3.3

This scale should be able to be drawn as a connected lattice based on providing 17/15 and 17/13 as inputs.

Just to make sure we're on the same page. I'm suggesting that we connect those using jagged lines where each segment goes along a prime direction.

Are you suggesting a straight line between two points here and thus a user-defined basis in addition to user-defined prime directions?

zastari commented 8 months ago

Are you suggesting a straight line between two points here and thus a user-defined basis in addition to user-defined prime directions?

Yes, sorry I misunderstood the scope of the issue. I think user-defined bases are the important thing to add so that users can arbitrarily connect the lattice.

frostburn commented 7 months ago

Scott DakotaToday at 9:23 PM

Would it be possible to add a user option to set custom x, y positions for the primes?

(I have preferred lattice x, y that use horagram logic).

frostburn commented 3 months ago

Promoted remaining sub-issues to individual issues.