Interval matrix: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Ganaram inukshuk (talk | contribs)
m Using step sizes: Wasn't sure if "rotate to the right" was the same as "shift right" (I think it's supposed to be shift left); edited just in case.
Ganaram inukshuk (talk | contribs)
Using step sizes: More succinct description on finding a step sequence's next mode
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
An ''interval matrix'' is a tabular representation of all possible [[interval]]s in a [[scale|scale]].
An '''interval matrix''' is a tabular representation of all possible [[interval]]s in a [[scale]].


To create an interval matrix, start with a table with (at least) as many rows and columns are there are pitches in your scale.
To create an interval matrix, start with a table with (at least) as many rows and columns are there are pitches in your scale.
Line 5: Line 5:
Let's call the pitches of the scale "a" (1/1), "b" (second pitch), "c" (third), etc.
Let's call the pitches of the scale "a" (1/1), "b" (second pitch), "c" (third), etc.


<ul><li>In the first row, list the pitches of the scale as-is: a, b, c, ...</li><li>In the second row, list the intervals: (b-b), (c-b), (d-b), ..., (a-b), (b-b).  (Reduce (a-b) by an octave, or whatever the period of the scale is.)</li><li>In the third row, list the intervals: (c-c), (d-c), ..., (a-c), (b-c), (c-c).  (Reduce (a-c) and (b-c).)</li><li>etc.</li></ul>
* In the first row, list the pitches of the scale as-is: a, b, c, ...
* In the second row, list the intervals: (b-b), (c-b), (d-b), ..., (a-b), (b-b).  (Reduce (a-b) by an octave, or whatever the period of the scale is.)
* In the third row, list the intervals: (c-c), (d-c), ..., (a-c), (b-c), (c-c).  (Reduce (a-c) and (b-c).)
* etc.


Optionally (as in the examples below), you may have a "header row" of degrees (1, 2, ...) and a "header column" of the original scale pitches.
Optionally (as in the examples below), you may have a "header row" of degrees (1, 2, ...) and a "header column" of the original scale pitches.


=Examples=
== Examples ==
 
=== JI ===
==JI==
Take this common JI pentatonic scale: 1/1 - 9/8 - 5/4 - 3/2 - 5/3 - 2/1
Take this common JI pentatonic scale: 1/1 - 9/8 - 5/4 - 3/2 - 5/3 - 2/1


Line 74: Line 76:
''Note that the distance between (for example) 3/2 and 5/4 is written above as 3/2 - 5/4, as is common for JI intervals, but actually calculated as 3/2 ÷ 5/4 .''
''Note that the distance between (for example) 3/2 and 5/4 is written above as 3/2 - 5/4, as is common for JI intervals, but actually calculated as 3/2 ÷ 5/4 .''


==Cents==
=== Cents ===
Here is an example with a tempered scale: 0.0 - 226.3 - 486.8 - 713.2 - 939.5 - 1200.0 cents
Here is an example with a tempered scale: 0.0 - 226.3 - 486.8 - 713.2 - 939.5 - 1200.0 cents


Line 128: Line 130:
|}
|}


== Using step sizes ==
=== Using step sizes ===
Working with a [[mos]] in a [[TAMNAMS|temperament-agnostic]] sense means that the cent values or JI ratios may not be known beforehand. However, it's still possible to generate an interval matrix as follows.
Working with a scale described as a sequence of steps, such as a [[MOS scale|mos]], means that the cent values or JI ratios may not be known beforehand. However, it's still possible to generate an interval matrix as follows.


Consider the diatonic mos [[5L 2s]], represented as the string LLsLLLs, for example. The intervals between the scale's root and any other scale degree can be considered as being a substring of "LLsLLLs" that starts at the first character (or step) and ends at any other character, including itself; for example, a 2nd is "L", a 3rd is "LL", a 4th is "LLs", and s on. The order of L's and s's is not important, rather the number of L's and s's.
Consider the familiar diatonic scale (or [[5L 2s]]), represented as the string LLsLLLs, for example. (WWHWWWH also works, but to be general, L and s are used instead.) The intervals between the scale's root and any other scale degree can be considered as being the number of L's and s's from a substring of "LLsLLLs" that starts at the first character (or step) and ends at any other character, including itself; for example, a 2nd is "L", a 3rd is "LL" (or 2L), a 4th is "LLs" (or 2L + s), and s on. The order of L's and s's is not important, rather the number of L's and s's. In other words, what makes a perfect 5th a perfect 5th is that it's reached by going up from the root by 3 large steps and 1 small step (or 3L + 1s), no matter what the order of steps are. Note that a unison, or 1st, corresponds to a substring consisting of zero characters, or an empty string, and thus its sum of L's and s's is zero.


The first row of the matrix can then be populated as such:
The first row of the matrix can then be populated as such:
Line 137: Line 139:
|+
|+
! rowspan="2" |
! rowspan="2" |
! colspan="2" |1st
! colspan="2" |2nd
! colspan="2" |2nd
! colspan="2" |3rd
! colspan="2" |3rd
Line 144: Line 147:
! colspan="2" |7th
! colspan="2" |7th
|-
|-
!Substr.
!Sum
!Substr.
!Substr.
!Sum
!Sum
Line 158: Line 163:
|-
|-
!LLsLLLs
!LLsLLLs
|empty-string
|0
|L
|L
|L
|L
Line 170: Line 177:
|LLsLLL
|LLsLLL
|5L + s
|5L + s
|}
|}To find the next row, we need to rotate the the scale (by moving the first step to the end of the sequence) and find the substrings that start at the first step of that rotated scale. Repeating this process finds the intervals sizes for each of the scale's modes. Since LLsLLLs represents the ionian mode, shifting this way produces the dorian mode (LsLLLsL), then the phrygian mode (sLLLsLL), and so on. The completed matrix is shown below:
To find the next row means finding the substrings starting at the second L and ending at any other step after it. However, this is equivalent to rotating the the scale (specifically moving the first L to the end) and finding the substrings that start at the first step of that rotated scale. Since LLsLLLs represents the ionian mode, shifting this way produces the dorian mode (LsLLLsL), and the mode after that is the phrygian mode (sLLLsLL), so populating the rest of the interval matrix means finding the quantities of L's and s's for every substring for every mode. The completed matrix is shown below:
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 262: Line 268:
|5L + 2s
|5L + 2s
|}
|}
The column of firsts consists of only the unison, which is zero units above the root, hence the entire column is zero. The column of eights consists of the entire string, hence the entire column is 5L + 2s. Note that this matrix is for any arbitrary L and s and does not reveal any information with regards to tuning or other properties.
The column of firsts consists of only the unison, which is zero units above the root, hence the entire column is zero. The column of eights consists of the entire string, hence the entire column is 5L + 2s. Note that this matrix is for any arbitrary L and s; any other properties, such as the size of each interval in cents or whether the scale forms a [[constant structure]], cannot be known unless L and s are known.


==Scala==
=== Scala ===
To show the interval matrix of the current scale using [[Scala|Scala]]:
To show the interval matrix of the current scale using [[Scala|Scala]]:


<ul><li>command line: "show/line intervals"</li><li>graphical interface: View &gt; Interval matrix</li><li>keyboard shortcut: Shift+Alt+I</li></ul>
* command line: "show/line intervals"
* graphical interface: View & Interval matrix
* keyboard shortcut: Shift+Alt+I


For example, Scala will display for this scale:
For example, Scala will display for this scale:
Line 289: Line 297:


(Note that Scala omits the "1/1" column, and the column numbers are offset by 1 relative to the other examples above.)
(Note that Scala omits the "1/1" column, and the column numbers are offset by 1 relative to the other examples above.)
[[Category:Scale]]

Latest revision as of 00:26, 3 December 2022

An interval matrix is a tabular representation of all possible intervals in a scale.

To create an interval matrix, start with a table with (at least) as many rows and columns are there are pitches in your scale.

Let's call the pitches of the scale "a" (1/1), "b" (second pitch), "c" (third), etc.

  • In the first row, list the pitches of the scale as-is: a, b, c, ...
  • In the second row, list the intervals: (b-b), (c-b), (d-b), ..., (a-b), (b-b). (Reduce (a-b) by an octave, or whatever the period of the scale is.)
  • In the third row, list the intervals: (c-c), (d-c), ..., (a-c), (b-c), (c-c). (Reduce (a-c) and (b-c).)
  • etc.

Optionally (as in the examples below), you may have a "header row" of degrees (1, 2, ...) and a "header column" of the original scale pitches.

Examples

JI

Take this common JI pentatonic scale: 1/1 - 9/8 - 5/4 - 3/2 - 5/3 - 2/1

Here is the interval matrix of this scale:

1 2 3 4 5 (6) comments
1/1 1/1 9/8 5/4 3/2 5/3 2/1 original scale
9/8 1/1 10/9 4/3 40/27 16/9 2/1 10/9 is the interval between 5/4 and 9/8; 4/3 = 3/2 - 9/8; etc.
5/4 1/1 6/5 4/3 8/5 9/5 2/1 6/5 = 3/2 - 5/4; etc.; 9/5 = (2/1 + 9/8) - 5/4
3/2 1/1 10/9 4/3 3/2 5/3 2/1
5/3 1/1 6/5 27/20 3/2 9/5 2/1

Note that the distance between (for example) 3/2 and 5/4 is written above as 3/2 - 5/4, as is common for JI intervals, but actually calculated as 3/2 ÷ 5/4 .

Cents

Here is an example with a tempered scale: 0.0 - 226.3 - 486.8 - 713.2 - 939.5 - 1200.0 cents

1 2 3 4 5 (6)
0.0 0.0 226.4 486.8 713.2 939.5 1200.0
226.4 0.0 260.5 486.8 713.2 973.6 1200.0
486.8 0.0 226.4 452.7 713.2 939.5 1200.0
713.2 0.0 226.4 486.8 713.2 973.6 1200.0
939.5 0.0 260.5 486.8 747.3 973.6 1200.0

Using step sizes

Working with a scale described as a sequence of steps, such as a mos, means that the cent values or JI ratios may not be known beforehand. However, it's still possible to generate an interval matrix as follows.

Consider the familiar diatonic scale (or 5L 2s), represented as the string LLsLLLs, for example. (WWHWWWH also works, but to be general, L and s are used instead.) The intervals between the scale's root and any other scale degree can be considered as being the number of L's and s's from a substring of "LLsLLLs" that starts at the first character (or step) and ends at any other character, including itself; for example, a 2nd is "L", a 3rd is "LL" (or 2L), a 4th is "LLs" (or 2L + s), and s on. The order of L's and s's is not important, rather the number of L's and s's. In other words, what makes a perfect 5th a perfect 5th is that it's reached by going up from the root by 3 large steps and 1 small step (or 3L + 1s), no matter what the order of steps are. Note that a unison, or 1st, corresponds to a substring consisting of zero characters, or an empty string, and thus its sum of L's and s's is zero.

The first row of the matrix can then be populated as such:

1st 2nd 3rd 4th 5th 6th 7th
Substr. Sum Substr. Sum Substr. Sum Substr. Sum Substr. Sum Substr. Sum Substr. Sum
LLsLLLs empty-string 0 L L LL 2L LLs 2L + s LLsL 3L + s LLsL 4L + s LLsLLL 5L + s

To find the next row, we need to rotate the the scale (by moving the first step to the end of the sequence) and find the substrings that start at the first step of that rotated scale. Repeating this process finds the intervals sizes for each of the scale's modes. Since LLsLLLs represents the ionian mode, shifting this way produces the dorian mode (LsLLLsL), then the phrygian mode (sLLLsLL), and so on. The completed matrix is shown below:

String Mode 1st 2nd 3rd 4th 5th 6th 7th 8th
LLsLLLs Ionian 0 L 2L 2L + s 3L + s 4L + s 5L + s 5L + 2s
LsLLLsL Dorian 0 L L + s 2L + s 3L + s 4L + s 4L + 2s 5L + 2s
sLLLsLL Phrygian 0 s L + s 2L + s 3L + s 3L + 2s 4L + 2s 5L + 2s
LLLsLLs Lydian 0 L 2L 3L 3L + s 4L + s 5L + s 5L + 2s
LLsLLsL Mixolydian 0 L 2L 2L + s 3L + s 4L + s 4L + 2s 5L + 2s
LsLLsLL Aeolian 0 L L + s 2L + s 3L + s 3L + 2s 4L + 2s 5L + 2s
sLLsLLL Locrian 0 s L + s 2L + s 2L + 2s 3L + 2s 3L + 4s 5L + 2s

The column of firsts consists of only the unison, which is zero units above the root, hence the entire column is zero. The column of eights consists of the entire string, hence the entire column is 5L + 2s. Note that this matrix is for any arbitrary L and s; any other properties, such as the size of each interval in cents or whether the scale forms a constant structure, cannot be known unless L and s are known.

Scala

To show the interval matrix of the current scale using Scala:

  • command line: "show/line intervals"
  • graphical interface: View & Interval matrix
  • keyboard shortcut: Shift+Alt+I

For example, Scala will display for this scale:

  0:          1/1               0.000000 unison, perfect prime
  1:          9/8             203.910002 major whole tone
  2:          5/4             386.313714 major third
  3:          3/2             701.955001 perfect fifth
  4:          5/3             884.358713 major sixth, BP sixth
  5:          2/1            1200.000000 octave

this interval matrix:

      1    2     3     4    5  
 1/1: 9/8  5/4   3/2   5/3  2/1
 9/8: 10/9 4/3   40/27 16/9 2/1
 5/4: 6/5  4/3   8/5   9/5  2/1
 3/2: 10/9 4/3   3/2   5/3  2/1
 5/3: 6/5  27/20 3/2   9/5  2/1
 2/1

(Note that Scala omits the "1/1" column, and the column numbers are offset by 1 relative to the other examples above.)