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

Scale Degree Design Path Proposal #2058

Closed
pikurasa opened this issue Jan 20, 2020 · 23 comments · Fixed by #2314
Closed

Scale Degree Design Path Proposal #2058

pikurasa opened this issue Jan 20, 2020 · 23 comments · Fixed by #2314

Comments

@pikurasa
Copy link
Collaborator

pikurasa commented Jan 20, 2020

There is an underlying issue with "scale degree" as we have it now. It took me a while to figure it what the issue is, but I think I identified it and have an easy design solution.

Root of the issue: The block that we now call "scale degree" does not do what musicians think of when they think of "scale degree". Instead, the block we have is more like "n^th modal pitch".

"Scale Degree"

Music education uses scale degree in large part for ear training. The idea is simple, each tone in a scale has a number associated with it, starting from tonic, which is "1". Also, "scale degree" is a movable system.

Hot cross buns would be sung as:
3 - , 2 - , 1 --, 3 - , 2 - , 1 --, 1, 1, 1, 1, 2, 2, 2, 2, 3 - , 2- , 1 --

Mary Had a Little Lamb is:
3, 2, 1, 2, 3, 3, 3 -- , 2, 2, 2 -- , 3, 5, 5 --, 3, 2, 1, 2, 3, 3, 3, 3, 2, 2, 3, 2, 1 ----
(notice there is no "4")

A C major chord is:
1, 3, 5 --
(no "2" or "4")

A minor pentatonic scale is:
1, 3, 4, 5, 7
(no "2" or "6")

"Sakura, Sakura" discussed as case study in #2050 could be:

1-, 1 -, 2 --, 1 -, 1 -, 2 --, 1 -, 2 -, 3 -, 2 -, 1 - , 2, 1, 6 -- (... and end on 5)
(we skip 7 in this snippet, we also skip 4 later)

...or interpreted as:

4 -, 4 -, 5 --, 4 -, 4 -, 5--, 4 -, 5-, 6 -, 5 -, 4 -, 5, 4, 2 -- (... and end on 1)
(we skip 3 in this snippet, we also skip 7 later)

Of all these examples, the expectation of "scale degree" is to skip numbers of notes that exist for a seven note system -- regardless of how many notes are used in the scale, whether it is a major triad, a pentatonic scale, or a seven note scale.

The reason comes down to (tonal) ear training. Musicians are training in a seven note system -- a system of seven possible pitches of which anything with fewer notes is a subset.

"n^th modal pitch" (the tool we have now)

What we are calling "scale degree" now has utility, especially for programming. We can specify a key/mode of any pitch length, input any number, and result in a pitch in the chosen key/mode. This can be very useful and we should keep it.

Proposal

First, I propose we keep the tool as is, but give it a different name (such as "n^th modal pitch"). I am open to suggestions for the specific name. When musicians talk about the pitches in a scale this way they refer to it as the "1st, 2nd, 3rd, etc" note of the scale/mode, so I suggest "n^th modal pitch". (I am leaning toward "mode" instead of scale as "mode" is more suggestive of a non-seven pitch system).

Second, we can have another block which functions more like what we expect for "scale degree". The specs are as follows:

  1. (For 7 pitches or fewer) It assumes a tonal space of 7 pitches, even when the chosen mode has fewer pitches. If the user specifies scale degrees outside their given key/mode, that is totally fine. It will play a pitch based on an underlying 7 pitch system, and that pitch can be considered a "non-scalar tone" or "non-chord tone" (which we may design to have its own utility). Note: Which 7 note system is specified and how it is specified is still under discussion at Scale/Mode Meta #2020. We could even have associated (assumed) seven note systems for each scale in the interim.

Example:

  • My code is Sakura:
    Mode = E In, Scale Degrees = 4 -, 4 -, 5 --, 4 -, 4 -, 5--, 4 -, 5-, 6 -, 5 -, 4 -, 5, 4, 2 --
  • But then I decide to add some non-scalar tones such as:
    Mode = E In, Scale Degrees = 4, 3 , 4 -, 5 --, 4, 3, 4 -, 5--, 4 -, 5-, 6 -, 5 -, 4, 3, 5, 4, 2 --
    (3 would be the "non-scalar tone" and interpreted as g natural under the assumption that the underlying seven-note system is E Phrygian or E, F, G, A, B, C, D. Also, if the user really wants G#, they could specify 3#, I suppose.)
  1. (For 8 pitches or more) "Scale Degree" is not typically used for systems with more than seven pitches. It is fine for a major scale that might use a chromatic passing tone such as 1, 2, 3, 4, 4#, 5, 6, 7. However, it is not very useful for scales such as the diminished scales (ie "octotonic" scales), which have no bearing in tonality. For these cases, we might give a warning and have the result be the same as "n^th scale degree". (EDIT: I no longer think this suggestion makes sense. Essentially this system should work as movable la ("do minor") does. If a user wants to work outside of tonality, and they deem that "n^th scale degree" works better for that purpose, then they can do it, we do not do it for them.)
@sum2it
Copy link
Collaborator

sum2it commented Mar 12, 2020

This is an exciting issue. Looking forward to see how this develops.

@aviral243
Copy link
Member

@sum2it What can be a starting point for working on this? And also the prerequisites.
Please guide me a bit.

@sum2it
Copy link
Collaborator

sum2it commented Mar 12, 2020

@aviral243 One of the many different approaches for this idea would be to:

  1. Tell us, in your own words, what were you able to understand about this idea. An understanding about scale degree would be helpful, Devin has explained it pretty well, but you might want to use Google a bit.

  2. Make rough suggestions + discuss on how you think this idea could be implemented.

  3. Keep contributing meaningfully to music blocks, I see that you've made quite a few PRs already

Regarding prerequisites: I don't think that there would be any hard prerequisites apart from knowing how to code, because the music part can be learnt pretty quickly. Devin and I (Sumit) both have a musical background so that shouldn't be a problem. Knowing about musical scales is a plus, but not a necessity if you're ready to learn.

@walterbender @pikurasa Would you like to add something?

@aviral243
Copy link
Member

@sum2it I was more or less concerned about the musical knowledge required. Thanks for clearing that out. I'll try to learn more about scale degree through other resources and get back to this.

@aviral243
Copy link
Member

aviral243 commented Mar 29, 2020

@sum2it @pikurasa I've tried reading more about scale degree (also music theory in general) and I've got a rough idea of it.

This is a simple image showing the names of different notes wrt tonic note.

Screenshot from 2020-03-29 16-12-15

Of all these examples, the expectation of "scale degree" is to skip numbers of notes that exist for a seven note system -- regardless of how many notes are used in the scale, whether it is a major triad, a pentatonic scale, or a seven note scale.

I'm not able to understand this part.

Also can we discuss implementation of this block, like what arguments will it take and which 7 note system to use?

@sum2it
Copy link
Collaborator

sum2it commented Apr 8, 2020

@aviral243 pentatonic means five notes per scale
Major scale has seven notes, minor scale has seven notes, and these are heptatonic (irrelevant, but to make you understand)
Pentatonic scale has 5 notes.

The first note in a major scale is referred to DO, second is called RE, and subsequently MI, FA, SOL, LA, TI

In Indian terms, they're basically western equivalents of Sa, Re, Ga, Ma, Pa, Dha, Ni respectively.

Do/Re/Mi/etc can be used used to represent different notes. These are relative notes. The absolute pitch for Do isn't defined.

However there are absolute notes too, like A2, or D5. These can be defined by exact pitch in Hertz.

Notes (Do/Re/etc) can be bound to pitches.

Now that was some backstory to answer your question.

Coming back to your question, the tonic represents that relative pitch "Do", supertonic represents "Re" and subsequent words represent Mi, Fa, Sol, La, Ti respectively.

Music sometimes has complex representative words for simple concepts, happy to sort that out for you anytime, even if that means jumping on a call with you.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Apr 8, 2020

@aviral243 feel free to ping me on IRC and we can talk about it. I read your proposal and I think that you have a good start, but I can help you complete your understanding.

Two things, real quick:

  1. Let's stick to numbers for scale degrees. "Tonic, supertonic, etc." may come in handy, but is secondary.
  2. The reason this issue is so important is that (most) musicians train themselves to be fluent in a seven note framework (i.e. scale degrees 1-7). Even when they work in a framework with fewer notes (e.g. five notes--"pentatonic"), they keep the labelling system of the seven note framework. At the very least this helps them with ear training because it means that they can sing something that does not use all seven notes without shifting their underlying system.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Apr 8, 2020

(most) musicians

I guess that some musicians may not use this system. For those that really need a different system, our temperament tool provides a powerful way to generate systems outside the box, which also affect how scale degree works.

...so I am not too worried about be more conservative here.

@aviral243
Copy link
Member

aviral243 commented Apr 9, 2020

@sum2it @pikurasa Thanks for your responses. I can see the dots connecting now.

Let's stick to numbers for scale degrees. "Tonic, supertonic, etc." may come in handy, but is secondary.

Yes, that makes complete sense.

At the very least this helps them with ear training because it means that they can sing something that does not use all seven notes without shifting their underlying system.

And the notes missing in that framework as compared to a 7 note system can be skipped?

Combining what both of you said above:

1.) For heptatonic frameworks, numbers (1-7) in scale-degree implementation represent Do, Re, Mi... respectively.

Of all these examples, the expectation of "scale degree" is to skip numbers of notes that exist for a seven note system -- regardless of how many notes are used in the scale, whether it is a major triad, a pentatonic scale, or a seven note scale.

2.) And the above case will be for frameworks having notes less than 7.

Am I correct here?

I'll try to jot down more information and use the existing info to think something through and get back to you in a day or two.

@aviral243 feel free to ping me on IRC and we can talk about it.

@pikurasa It would be really helpful. Is your IRC username the same as here?

happy to sort that out for you anytime, even if that means jumping on a call with you.

@sum2it Thanks for the support. It'll be really helpful. I'll write to you on your mail and fix a call if needed.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Apr 9, 2020

@pikurasa It would be really helpful. Is your IRC username the same as here?

yes, find me in the #sugar channel on freenode

@pikurasa
Copy link
Collaborator Author

pikurasa commented May 7, 2020

I made a first draft of a test file that we can use.

I sketched out the same drawing I made for you this morning, but in Music Blocks.

Scale Degree Tester.html.zip

I broke down the representations into four layers

  1. Chromatic -- This is our universe (let's ignore anything other than 12 for now)
  2. Superset 7 note system -- This helps us arbitrate which pitches to choose if our subset does not have those notes (i.e. remember how "Fibonacci" does not have f or g -- having this set, helps MB know whether to choose f natural, f sharp, g natural, g sharp, etc)
  3. Subset -- We may choose a note system is not one of the major/minor 7 note systems. This is what subset is for. (This is what "set key/mode" is intended to do). Notice that the numbers for this set should be the same as the superset.

(We will come back to sets with more than 7 later)

  1. n^th modal pitch -- this behaves the way our "set key/mode" with scale degree works now.

Hope the test file helps!

@aviral243
Copy link
Member

@pikurasa Thanks for the project. Nice to have it for reference.

@pikurasa pikurasa added this to the GSOC2020 milestone May 8, 2020
@aviral243
Copy link
Member

@pikurasa I've moved somewhat forward with this, now using the fallback modes from that E-mail.

One thing I'm stuck on is that these fallback modes do not exactly superimpose over our chose mode for scale degree [ only those that have less than 7 notes ].

So the issue concerning me is that how do I know what scale degrees would be played from the scale of our chosen mode, and for which of them I need to use the fallback mode.

I'll give an example to be more clear:
For major blues we've established a fallback of Ionian/major.
Now below are the notes of Major Blues:

Screenshot from 2020-06-01 17-06-21

And the fallback scale is:

Screenshot from 2020-06-01 17-06-52

Now, for our chosen mode 6 out of 7 scale degrees are defined [It is a 6 note scale], and for one we'll need the fallback scale. How do I calculate that? Is there a pattern with that.

@aviral243
Copy link
Member

Now that I've made a comment, I wonder why major blues is showing 7 notes.

@aviral243
Copy link
Member

aviral243 commented Jun 1, 2020

@pikurasa

I've attached an image below which shows (my understanding) of scale degrees that are defined for scales having less than 7 notes. There are a few which I was unable to understand, (Fibonacci, minor blues and little confusion in whole tone) which I've marked in the image.

IMG_20200601_213840853

I DO NOT aim to hard code these but just to assure that my understanding is complete.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jun 1, 2020

  1. Minor Blues:
    "minor blues": [3, 2, 1, 1, 3, 2],

1, 3, 4, 4+/5o, 5, 7

We skip scale degrees 2 and 6. The note between 4 and 5 can function either as an augmented 4th or a diminished 5th. Typically, for example, when going up we have an augmented 4th moving us from 4-5, and when going down we have a diminished 5th moving us down from 5-4. Either way, it's function is a passing tone.

  1. Whole Tone
    "whole tone": [2, 2, 2, 2, 2, 2],

Whole Tone is one of those scales that purposely escapes tonality. Some music may be tonal and have brief escapes to the whole tone scale, others may be more centered around the whole tone "sound world".

If it is the former, we could default to the overarching tonality of the piece.

If it is the latter, like the beginning of Debussy's Voiles (until about 2:15 minutes in), then one might say that it is atonal and trying to attach tonal scale degrees is not particularly helpful. In such a case, the user may benefit more from using n^th modal pitch tools.

If I absolutely had to come up with some tonal framework, I might say:
1, 2, 3, 4+, 5+ m7 (m7 is "minor 7th")

One could just as easily say 1, 2, 3, 5o, m6, m7

  1. Fibonacci

fibonacci: [1, 1, 2, 3, 5],

You have Walter to thank for the Fibonacci scale. :)

I would be surprised if it is mentioned anywhere else other than our MB.

IF I were given these notes as my "mode" and asked to make sense of it, I would say the following:

1, 1+/2o, 2, 3, 5 (We have a passing tone from 1-2. Again it's direction would help arbitrate between the two options of augmented unison and minor 2nd. The scale seems incomplete and unbalanced and it is hard to figure out what major-type scale (e.g. ionian, mixolydian). It lacks a 4th, 6th, and 7th.

Of the aforementioned scale degrees, assume perfect intervals for 1, 4 and 5 if not otherwise stated. Assume major intervals for 2, 3, 6, and 7 if not otherwise stated.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jun 1, 2020

(I made some mistakes on my comment for Fib that are now corrected.)

Also, we need to check Bebop scale. I think it is flipped (inverted).

Bebop scale usually has a passing motion down from the octave to major 7th to minor seventh, down to 6. It does not, as I recall, have any passing tones around 1-2 and I do not remember a minor 3rd, rather a major 3rd.

@aviral243
Copy link
Member

You have Walter to thank for the Fibonacci scale. :)

I would be surprised if it is mentioned anywhere else other than our MB.

Programmers/Mathematicians do have a special love for the Fibonacci series. :D

Well, enough to start for now. All scales are defined, for now, I'll post if I encounter something.

Thanks for taking the trouble of going through all these scales.

@aviral243
Copy link
Member

1, 3, 4, 4+/5o, 5, 7

@pikurasa As I was looking to extend functionality for non-trivial scales, I am in a doubt that what does something like a 4+ or 5o mean for our scale degree block. How would we provide an input that conveys this meaning of an augmented or diminished tone?

The scale degrees I'm currently generating for minor blues scale are 1 3 4 4 5 7, so basically I'm repeating 4 twice in absence of any other option and the same is happening for other scales, for example, Fibonacci, where I'm generating 1 2 2 3 5.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jun 4, 2020

@pikurasa As I was looking to extend functionality for non-trivial scales, I am in a doubt that what does something like a 4+ or 5o mean for our scale degree block. How would we provide an input that conveys this meaning of an augmented or diminished tone?

I am not sure I understand your question.

The scale degrees I'm currently generating for minor blues scale are 1 3 4 4 5 7, so basically I'm repeating 4 twice in absence of any other option and the same is happening for other scales, for example, Fibonacci, where I'm generating 1 2 2 3 5.

Do you mean "if the scale does not have a 4+ or 5o, what do we do with those notes?"

Because those are passing tones, they do not need to be pushed into any default notes. Does that make sense?

@aviral243
Copy link
Member

Do you mean "if the scale does not have a 4+ or 5o, what do we do with those notes?"

Let's take this example:

I meant that both 4 and 4+ are defined for minor blues, now we know the significance of 4 i.e what note to play when the user selects 4 and also there is a defined way for the user to give the input 4.

What is the significance of 4+ as how will the user ever provide an input of 4+? (Will it be same as 4#?)

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jun 4, 2020

What is the significance of 4+ as how will the user ever provide an input of 4+? (Will it be same as 4#?)

Yes, the same.

IF a user puts 4#, then they are being congruent with their stated scale (good for them), so no hocus pocus needed on our end.

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jun 4, 2020

I think we only need to account for inconsistencies...

Or, we let the user choose a chosen fallback, so that they can specify themselves.

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

Successfully merging a pull request may close this issue.

4 participants