Your question (as written) is ambiguous. If you mean "can your algorithm be used to generate natural scales?" (those that contain all natural notes, that is, notes that are neither sharp nor flat), then yes, but only one (if you do not take into account different rounding methods, in which case you get one natural scale for the rounding method ) and only the choice of cherry tonic. If you mean βdoes your algorithm in itself produce a result on a natural scale?β, Then the answer is no, because it does not generate scale by itself; It generates a mode.
Note: in this answer, all named modes (e.g. Ionian) refer to modern definitions.
In terms of halftones, your algorithm gives intervals (from tonic ) of 0,2,3,5,7, 9,10,12, which corresponds to a halftone sequence (i.e. steps of the scale) 2-1-2-2-2-1 -2 or Dorian mode . Note that the algorithm does not define tonic (the first note in scale), so it does not give you a specific scale , which is a sequence of steps, such as C-major or Dorian mode in D.
In terms of these tonic intervals , the Dorian regime contains the basic 2nd, minor 3rd, perfect 4th, perfect 5th, major 6th, minor 7th and perfect 8th. C major M2, M3, P4, P5, M6, M7, P8 (all basic or perfect intervals).
Creating Other Modes
Your choice of rounding function is arbitrary. If you always round ( βi*12/7β ), you get the intervals 0,2,4,6,7,9,11,12 and the halftone sequence 2-2-2-1-2-2-2-1, which makes up Lydian mode . Rounding down ( βi*12/7β ) gives you the intervals 0,1,3,5,6,8,10,12 and steps 1-2-2-1-2-2-2-2, which are Locrian mode . None of them is the interval or grayscale sequence for the natural scale in C (i.e., the Ionian regime in C or C), which is 0.2,4,5,7,9,11,12 and 2-2- 1 -2-2-2-2-1, respectively.
If you parse the algorithm to use a different rounding function for each term, and not for the same rounding function for everyone, you can generate other named modes (e.g. (_, ceil, ceil, floor, ceil, ceil, ceil, _) , where _ means "do not care"), ion will be generated), but you will also create many other modes that cannot lead to a natural scale. So you can generate a total of 2 n-1 where n is the number of tones (I cover n=7 or heptatonic ). The number of heptatonic modes is equal to the number of compositions 12 of length 7, which is 11 C 6 = 462, so this method will not generate all modes. If we define round r (x) = floor(x+r) , we can only generate diatonic modes (7 named modes or Heptatonia Prima that maximize the semitone steps) using this rounding function, limiting r to i/7 , where i β [0, 7) β β. For example, Ionian roundTo 5/7 (i*12/7) for i β [0, 7) (note: from circular to the nearest - roundTo 0.5 (x) ). With this last approach, we can generate modes that can generate all 7 natural scales.
Diatonic(n) = <roundTo n/7 (x*12/7) for x in β [0, 7)>
where <...> indicates the tuple (i.e., the final sequence).
Generating Scales
Your algorithm generates only modes, but they can be used to generate scales. Depending on which note you choose to start (tonic), you will get different scales for the given mode. Dorian leads to an insignificant scale because it includes a minor third (the first two halftone steps in Dorian are 2-1, the sum of which is 3, secondary) and a perfect fifth (the sequence starts from 2-1-2-2, which gives 7 halftones over the tonic). Lydian gives you a big scale because it includes the main third (its halftone sequence starts with 2-2, which is 4,) and the perfect fifth (2-1-2-2). Locrian does not include the perfect fifth, so he is neither major nor junior.
Natural weight generation
To find out what natural scales your algorithm can generate, let ADLO(n, round, tonic) denote the scale obtained as a result of the generalized version of your algorithm, where n is the number of steps per octave, round is the rounding function, and tonic is the tonic for the scale . If none is specified, the result is a collection of all possible values ββ(thus, ADLO(7, nearest) - all scales in Dorian mode). The named mode and tonic will be used for the scale in this mode with this tonic (for example, Ionian('C') is C-major); a named mode without a tonic (for example, Ionian() ) will indicate a set of all scales in this mode. {} denotes a set and <> sequence.
ADLO (7, nearest) = Dorian () = Diatonic (3)
{
<C, D, D #, F, G, A, A #, C>,
<D, E, F, G, A, B, C, D>,
<E, F #, G, A, B, C #, D, E>,
<F, G, G #, A #, C, D, D #, F>,
<G, A, A #, C, D, E, F, G>,
<A, B, C, D, E, F #, G, A>,
<B, C #, D, E, F #, G #, A, B>
}
ADLO (7, ceil) = Lydian () = Diatonic (6)
{
<C, D, E, F #, G, A, B, C>,
<D, E, F #, G #, A, B, C #, D>,
<E, F #, G #, A #, B, C #, D #, E>,
<F, G, A, B, C, D, E, F>,
<G, A, B, C #, D, E, F #, G>,
<A, B, C #, D #, E, F #, G #, A>,
<B, C #, D #, F, F #, G #, A #, B>
}
ADLO (7, floor) = Locrian () = Diatonic (0)
{
<C, C #, D #, F, F #, G #, A #, C>,
<D, D #, F, G, G #, A #, C, D>,
<E, F, G, A, A #, C, D, E>,
<F, F #, G #, A #, B, C #, D #, F>,
<G, G #, A #, C, C #, D #, F, G>,
<A, A #, C, D, D #, F, G, A>,
<B, C, D, E, F, G, A, B>
}
Thus, we see that
if you and pick
* round to nearest D
* round down B
* round up F
* ...
as the tonic, you get a natural scale.
Besides,
ADLO (7, roundTo 5/7 (x)) = Ionian () = Diatonic (5)
ADLO (7, roundTo 3/7 (x)) = Dorian () = Diatonic (3)
ADLO (7, roundTo 1/7 (x)) = Phrygian () = Diatonic (1)
ADLO (7, roundTo 6/7 (x)) = Lydian () = Diatonic (6)
ADLO (7, roundTo 4/7 (x)) = Mixolydian () = Diatonic (4)
ADLO (7, roundTo 2/7 (x)) = Aeolian () = Diatonic (2)
ADLO (7, roundTo 0/7 (x)) = Locrian () = Diatonic (0)
What note to choose as a tonic can also be called a βwhite noteβ in the Wikipedia article on the modes in modern music .
Computational Correctness
The reason the code works to generate the mode is because the notes in the diatonic scale are as distributed among the halftones as possible, i*n/m , for i β [0, m), is an even distribution of m things among n things. Round these values ββand you will get the distribution that is the maximum possible among integers from 0 to n. Thus, your algorithm leads to diatonic mode. This is not a very important result; this is a fairly simple consequence of rounding.