Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Notio not dependent on a database #142

Open
MartinBruun opened this issue Mar 11, 2022 · 0 comments
Open

Make Notio not dependent on a database #142

MartinBruun opened this issue Mar 11, 2022 · 0 comments
Labels

Comments

@MartinBruun
Copy link
Collaborator

MartinBruun commented Mar 11, 2022

By changing the format of the URLs generated, we can make notio completely independent on a database.

BEFORE BEGINNING on this issue, it has to be evaluated:

  1. Does the current database cost anything? Or will it cost something if we use it more? If so, when?
  2. Will the new URL be seen as a good thing (one can clearly see what is what), or a bad thing (it will be significantly longer)
  3. Do Mats and Cecilia agree with this?

The change would be, concretely, that:
"/shared/FDa5RdtPlGfMHekkIdtd"
would be this
"shared/?show_key=1&ext_key=1&sound=piano&notation=11&root=C&octave=3&scale=ionian&clefs=treble&colour_key=1"

Concretely:
Notation and Scales (using custom scales) will have a number that uniquely identifies a specific pattern, to further shorten it, ie. each notation can be seen as a bit being either 1 or 0, giving each notation a unique number

A Custom scale would then get a unique number similar to the Notation number. The it will "build" the custom scale from the number. Of course, to make it clearer, if one uses a scale, the name should of course be in the URL to make it easier to see (ie. scale=ionian and scale=2773 is the same scale as shown below, but scale=ionian chooses the "normal" scale, while scale=2773 builds an ionian scale in the custom menu)

The specific mathematics is explained here, for future reference:

If i have a Notation A, B and C and i can choose 0 to all of them, that means that
2 corresponds to 010, therefore meaning B is chosen and the rest is not.
5 corresponds to 101, meaning A and C are chosen, B is not

If i have a scale of all 12 tones, i can describe a ionian scale by saying:
101011010101
C' D'EF ' G'A 'H
Which means the number is:
2048*1+1024*0+512*1+256*0+128*1+64*1+32*0+16*1+8*0+4*1+2*0+1*1 = 2773
Meaning that if the scale=2773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant