Play Scale Degree

The music language can sometimes be overly confusing with the use of multiple letter names for each pitch (i.e. C#/Db). If the musical structures of scale and chords are defined as formulas instead of specific letter names one layer of complexity is reduced. One dialect of the music language uses scale degree numbers to describe melodic patterns. The number sequence 1 2 3 4 5 6 7 8 is used to define a major scale. Chromatic alterations to that pattern can be created by adding a flat or a sharp to any scale degree. An altered note is always in comparison to the major scale pattern for that scale degree number. There can be some misunderstanding with this system. Since some keys use several flats or sharps with their letter names, in many cases when a note in a scale degree pattern is flatted (b) or sharped (#) it won't result in a corresponding flat or sharp letter name. The term 'flat' should be interpreted as 'lower a half step' and the term 'sharp' should be interpreted as 'raise a half step'. For example if you are using a pattern of 1 b3 5 (minor triad) and the key is E, you'll be comparing against the '1 3 5' of E major (E G# B) and the '1 b3 5' pattern will result in E minor (E G B) (the G is the result of 'flatting' G#) No literal flats are in the chord in this case, however if the key was F it will result in a flat note for a 1 b3 5 pattern (F Ab C).

This system can be used in a flexible manner, for example consider two different ways to express the natural minor scale. One method uses the number sequence

to represent a natural minor scale. These scale patterns are transformed into notes by applying a root to the pattern. For example a pattern of '1 2 b3 4 5 b6 b7 8' with a root of "D4" would create a D natural minor scale. (D4 E4 F4 G4 A4 Bb4 C5 D5)

Another method for creating a natural minor scale is to treat it as the relative minor of a major scale. The relative minor of the major scale starts on the sixth scale degree and uses the same notes as its relative major scale. In the scale degree notation it would be as follows:

This pattern with a root of "F4" (the root of the relative major) would result in the same as the above pattern. (D4 E4 F4 G4 A4 Bb4 C5 D5)

These are examples of (1) parallel minor and (2) relative minor relationship. In the first case (parallel minor) we created a number formula that described how this scale (natural minor) differed from a major scale starting on the same note (parallel relationship). Natural minor is like a major scale with three modifications: b3, b6 and b7. The second method uses a relative minor relationship to a major scale. A natural minor scale is the scale that starts on the 6th scale degree of any major scale and uses the same notes as that major scale. In other words the natural minor is the 6th mode of a major scale (and often referred to as 'aeolian mode'). So using this system we can use the 1 2 3 4 5 6 7 8 numbers but start it at the number 6 ('6 7 1 2 3 4 5 6') and the add the ',' to indicate the first two notes should be an octave lower. (',6 ,7 1 2 3 4 5 6') But if we want D natural minor we need to set the root to letter F. This will result in the notes D4 E4 F4 G4 A4 Bb4 C5 D5. NOTE: If we set the root to D with this 'relative' pattern we'll get the relative minor of D major (B minor).

The scale degree number system is commonly used in jazz education. It allows melodic patterns and chord voicings to be expressed as a formula not tied to any specific key. A system like this allow flexibillity in the way to express scales and chords.

When a rhythm is also applied to the notes a melody can be created. On this page we'll explore this method of creating melodies.

Creating a scaleDegree.js module

We need a module that we can easily create a melody with our custom patterns we write. The module should have a function that we can call with several parameters

  1. scale degree pattern
  2. root/octave
  3. rhythm
  4. optionalStartTime
  5. optionalVelocity)

The optionalStartTime allows us assemble small sections of melodies into long melodies [using concat()] (optionalStartTime default is '0'). The optionalVelocity parameter allows us to specify a velocity array the same length as the scale degree pattern to add dynamics to the individual notes (optionalVelocity default is 0.7). The module will translate the scale degree formulas paired with the root values into the appropriate note names for Tone.js to play. Also the rhythm is integrated with the notes so that Tone.js has the information it needs to play the notes and rhythm.

The useage of the module is shown below. This will play the D natural minor twice with a one measure rest in between them. The two method described above are used to create the two identical scales.


// D natural minor scale
var myScale = '1 2 b3 4 5 b6 b7 8';
var myKey = 'D4';
// same scale using relative minor of a F major scale
var myScale2 = ',6 ,7 1 2 3 4 5 6';
var myKey2 = 'F4';

var rhythm = ['4n','4n','4n','4n','4n','4n','4n','4n']
var melody1 = scaleDegree.makeMelody(myScale, myKey, rhythm);
var melody2 = scaleDegree.makeMelody(myScale2, myKey2, rhythm, '3m');
var myMelody = melody1.slice();
myMelody = myMelody.concat(melody2); // they play back-to-back

var synth2 = new Tone.PolySynth().toMaster();  // default four voices
var melody = new Tone.Part(function(time, value){
		synth2.triggerAttackRelease(value.note, value.duration, time, value.velocity);
	}, myMelody ).start();
synth2.volume.value = -10;

var tempo = document.myForm.tempo.value;
Tone.Transport.bpm.value = tempo;   
Tone.Transport.start('+0.1');

tempo: | volume:

II V I melodic patterns

This next example contains some examples of melodic patterns for II-V-I chord progressions in both major and minor (two patterns for each). The patterns are an example of 'running the changes' where the melodic pattern outlines the chords with arpeggio patterns. These are a couple of the many patterns a jazz player might practice as an exercise to get familiar with the chord tones of the II V I progression. In the first pattern the notes of the IIm7 chord are played in ascending order (2 4 6 8), then the V7 chord is arpeggiated in a descending direction (7 5 4 2) then the Ima7 chord is arpeggiated in an up and down pattern (1 3 5 7 5 3 1). The second example reverses the melodic contour of the first. This scale degree pattern is rooted in the key of the I chord.

The minor key versions are slightly different. The first uses the harmonic minor scale for the II and V chord and the Dorian scale for the I chord. The use of the minor6 chord for the I chord is common in minor keys within the jazz style. The second pattern uses the harmonic minor scale for the entire phrase.

The optionalStartTime parameter is used so that we can join the four patterns together and they can play one after another (using a 2m offset for each new part). The first major and minor patterns use the keys of G major and E minor. The second major and minor patterns are in the keys of Eb major and C minor. They all use the same rhythm:

The code looks like this:

var II_V_I_Major1 = '2 4 6 8 7 5 4 2 1 3 5 7 5 3 1';
var II_V_I_Major2 = '4 2 1 ,6 ,5 ,7 2 4 3 1 ,7 ,5 ,7 1 3';
var II_V_I_Minor1 = '2 4 b6 8 7 5 4 2 1 b3 5 6 5 b3 1';
var II_V_I_Minor2 = '4 2 1 ,b6 ,5 ,7 2 4 b3 1 ,7 ,5 ,7 1 b3';
var rhythmII_V_I = ['8n','8n','8n','8n','8n','8n','8n','8n','8n','8n','8n','4n','8n','8n','8n'];
var II_V_I = scaleDegree.makeMelody(II_V_I_Major1, "G3", rhythmII_V_I);
II_V_I = II_V_I.concat(scaleDegree.makeMelody(II_V_I_Minor1, "E3", rhythmII_V_I, '2m'));
II_V_I = II_V_I.concat(scaleDegree.makeMelody(II_V_I_Major2, "Eb4", rhythmII_V_I, '4m'));
II_V_I = II_V_I.concat(scaleDegree.makeMelody(II_V_I_Minor2, "C4", rhythmII_V_I, '6m'));

The II_V_I var contains the notes and rhythms that can be used with Tone.Part() using code like this:

melody = new Tone.Part(function(time, value){
		synth2.triggerAttackRelease(value.note, value.duration, time, value.velocity);
	}, II_V_I ).start();
synth2.volume.value = -10;
melody.loopStart = '0';
melody.loopEnd = '8m';
melody.loop = true;

Tone.Transport.bpm.value = 120;   
Tone.Transport.swing = 0.25;
Tone.Transport.start('+0.1');

Back to the Tone.js Setup page.