| Author |
Message |
alphacore
Joined: Aug 10, 2006 Posts: 12 Location: Washington
|
Posted: Thu Dec 06, 2007 8:29 pm Post subject:
A List of Scale Arrays Subject description: A List of Scale Arrays & Question about Algorhythms |
 |
|
Hello everyone Ive been reading about scales and using scale arrays for chuck so ive been creating scale arrays and thought i share my list with everyone here
| Code: |
// This is a list of Scale Arrays
// Scale ( Major; in Semitones )
[ 0,2,4,5,7,9,11,12 ] @=> int scale [];
// Scale ( Minor; in Semitones )
[ 9,11,12,14,16,17,19,21 ] @=> int scale [];
// Scale ( Chromatic; in Semitones )
[0,1,2,3,4,5,6,7,8,9,10,11,12 ] @=> int scale [];
// Scale ( Whole; in Semitones )
[0,2,4,6,8,10,12 ] @=> int scale [];
// Scale ( Dorian; in Semitones )
[ 2,4,5,7,9,11,12,14 ] @=> int scale [];
// Scale ( Phrygian; in Semitones )
[ 4,5,7,9,11,12,14,16 ] @=> int scale [];
// Scale ( lydian; in Semitones )
[ 5,7,9,11,12,14,16,17 ] @=> int scale [];
// Scale ( Mixolydian; in Semitones )
[ 7,9,11,12,14,16,17,19 ] @=> int scale [];
// Scale ( Aeolian; in Semitones )
[ 0,2,3,7,8,10,12 ] @=> int scale [];
// Scale ( Algerian; in Semitones )
[ 0,2,4,5,6,7,8,11,12 ] @=> int scale [];
// Scale ( Arabian; in Semitones )
[ 0,2,4,5,6,8,10,12 ] @=> int scale [];
// Scale ( Byzantine; in Semitones )
[ 0,1,3,4,5,7,8,11,12 ] @=> int scale [];
// Scale ( Balinese; in Semitones )
[ 0,1,4,5,7,8,11,12 ] @=> int scale [];
// Scale ( Doublepentatonic; in Semitones )
[ 0,1,4,5,7,8,11,12 ] @=> int scale [];
// Scale ( Egyptian; in Semitones )
[0,2,5,7,10,12 ] @=> int scale [];
// Scale ( Enigmatic; in Semitones )
[ 0,1,4,6,8,10,11,12 ] @=> int scale [];
// Scale ( Ethiopian; in Semitones )
[ 0,2,3,5,7,9,10,12 ] @=> int scale [];
// Scale ( Gypsy; in Semitones )
[ 0,1,4,5,7,8,11,12 ] @=> int scale [];
// Scale ( Hawaiian; in Semitones )
[ 0,2,3,7,9,11,12 ] @=> int scale [];
// Scale ( Hirajoshi; in Semitones )
[ 0,2,3,7,8,10,12 ] @=> int scale [];
// Scale ( Hindu; in Semitones )
[ 0,2,4,5,7,8,10,12 ] @=> int scale [];
|
I'm working on a second set that i'll add here when i have it done I hope this help people out here.
I also a a quick question about algorythms Can I use them to control a scale say i wanted to use 3n+1 would I write it like this 3*n+1 and then just set the value on n to what I wanted ?
or can i do a complex math to control the scale say ( 3+g*t%e )
and then set each of the letters to numbers?
thanks again for everything chat with you later..
Alphacore/Gabriel |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6363 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Dec 07, 2007 5:24 am Post subject:
|
 |
|
What a nice and time-saving contribution! Thanks!
Could you help me for a second? Scales aren't my best side.... but why do some start with non-0 values? Is there a music theory reason for that? _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
alphacore
Joined: Aug 10, 2006 Posts: 12 Location: Washington
|
Posted: Fri Dec 07, 2007 9:55 am Post subject:
Subject description: why 0 |
 |
|
I started with 0 cause 0= C so they are all written in C major but can be easily converted to any key choose.
the patterns can be extended to cover several octave's I just haven't done that yet I should have another set of scale up by tomorrow |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6363 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Dec 07, 2007 11:03 am Post subject:
|
 |
|
You could also write some code to do that for you. (set note to be your notenumber, root is the scale's root note as a MIDI note number)
| Code: | int note; //this is our note number
int root; //rootnote
scale.cap() -1 => int numberofnotes; //number of notes in a octave, not inclusive of the octave
( note - ( note % numberofnotes ) ) / numberofnotes => int octaves; //quite tricky, but for a change integer divisions will work, this should always be a integer
Std.mtof( root + scale[ note % numberofnotes ] + ( 12 * octaves) ) => float frequency; |
This assumes scale[] is a scale that repeats once per octave and that the octave is included in the array (like with yours) but that we don't know how many notes are actually in it. This code simply pretends the scale is repeated at infinity.
I think this works, didn't test it very extensively. _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
alphacore
Joined: Aug 10, 2006 Posts: 12 Location: Washington
|
Posted: Sat Dec 08, 2007 12:58 pm Post subject:
Subject description: Second installment of Scales |
 |
|
This is Second installment of Scales
| Code: |
// Scale ( Iwato; in Semitones )
[ 0,4,5,9,11,12 ] @=> int scale [];
// Scale ( Javanese; in Semitones )
[ 0,1,3,5,7,9,10,12 ] @=> int scale [];
// Scale ( Japanese; in Semitones )
[ 0,1,5,7,8,12 ] @=> int scale [];
// Scale ( Jewish; in Semitones )
[ 0,2,4,5,8,9,11,12 ] @=> int scale [];
// Scale ( Kumoi; in Semitones )
[ 0,4,5,8,9,11,12 ] @=> int scale [];
// Scale ( Mohammedan; in Semitones )
[ 0,2,3,5,7,8,11,12 ] @=> int scale [];
// Scale ( Mongolian; in Semitones )
[ 0,2,4,7,9,12 ] @=> int scale [];
// Scale ( Oriental; in Semitones )
[ 0,1,4,5,6,9,10,12 ] @=> int scale [];
// Scale ( Overtone; in Semitones )
[ 0,2,4,6,9,10,12 ] @=> int scale [];
// Scale ( Pelong; in Semitones )
[ 0,1,3,7,10,12 ] @=> int scale [];
// Scale ( Persian; in Semitones )
[ 0,1,4,5,6,8,11,12 ] @=> int scale [];
// Scale ( Spanish; in Semitones )
[ 0,1,4,5,7,8,10,12 ] @=> int scale [];
// Scale ( Todi; in Semitones )
[ 1,3,5,6,7,10,11,12 ] @=> int scale [];
// Scale ( Blues1; in Semitones )
[ 0,2,3,5,6,7,10,12 ] @=> int scale [];
// Scale ( Blues2; in Semitones )
[ 0,3,4,5,6,7,9,10,12 ] @=> int scale [];
// Scale ( Blues3; in Semitones )
[ 0,2,3,4,6,7,8,10,12 ] @=> int scale [];
// Scale ( Blues4; in Semitones )
[ 0,2,3,4,5,6,7,9,10,12 ] @=> int scale [];
// Scale ( Rock1; in Semitones )
[ 0,3,4,7,9,10,12 ] @=> int scale [];
// Scale ( Rock2; in Semitones )
[ 0,3,5,6,7,9,10,12 ] @=> int scale [];
|
I read your post about setting it up that way I might start doing that over winter break..
Thanks Gabriel |
|
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 10929 Location: Netherlands, Enschede
Audio files: 22
G2 patch files: 290
|
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6363 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Dec 08, 2007 1:37 pm Post subject:
|
 |
|
Yeah, it would seem like a good idea to have the mtof (Midi TO Frequency) function be able to load Scala files. One small issue might be that mtof also supports floats for note values and that interpolation is easy for equaltempered tunings but not so obvious for others.
As long as integer note values would do we could simply create a library of arrays of floats that take a note value, use it as a lookup and return the frequency as a float.
edit; I added Scala for mtof as a feature suggestion to the WiKi. _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
alphacore
Joined: Aug 10, 2006 Posts: 12 Location: Washington
|
Posted: Sat Dec 08, 2007 2:55 pm Post subject:
|
 |
|
I went and downloaded the program Scala I'll play around with thanks for the info I really new to this I in school studying C++ and Ruby just fineished with introduction to programming so I know that i still have to learn but music is my real passion And comming across chuck seem like a language i really like to master some day and write useful program apps for and help it expand in the future.
thanks again Gabriel |
|
|
Back to top
|
|
 |
Frostburn

Joined: Dec 12, 2007 Posts: 229 Location: Finland
Audio files: 7
|
Posted: Mon Feb 11, 2008 7:07 am Post subject:
|
 |
|
I think the following piece of code may have something to do with the topic even if it's not an array. I wasn't sure what to call b sharp minus one so it's just bs.
| Code: | 0 => int c0 => int bs; 1 => int cs0 => int df0; 2 => int d0;3 => int ds0 => int ef0; 4 => int e0 => int ff0; 5 => int f0 => int es0;
6 => int fs0 => int gf0; 7 => int g0;8 => int gs0 => int af0; 9 => int a0;10 => int as0 => int bf0; 11 => int b0 => int cf1;
12 => int c1 => int bs0; 13 => int cs1 => int df1; 14 => int d1;15 => int ds1 => int ef1; 16 => int e1 => int ff1; 17 => int f1 => int es1;
18 => int fs1 => int gf1; 19 => int g1;20 => int gs1 => int af1; 21 => int a1;22 => int as1 => int bf1; 23 => int b1 => int cf2;
24 => int c2 => int bs1; 25 => int cs2 => int df2; 26 => int d2;27 => int ds2 => int ef2; 28 => int e2 => int ff2; 29 => int f2 => int es2;
30 => int fs2 => int gf2; 31 => int g2;32 => int gs2 => int af2; 33 => int a2;34 => int as2 => int bf2; 35 => int b2 => int cf3;
36 => int c3 => int bs2; 37 => int cs3 => int df3; 38 => int d3;39 => int ds3 => int ef3; 40 => int e3 => int ff3; 41 => int f3 => int es3;
42 => int fs3 => int gf3; 43 => int g3;44 => int gs3 => int af3; 45 => int a3;46 => int as3 => int bf3; 47 => int b3 => int cf4;
48 => int c4 => int bs3; 49 => int cs4 => int df4; 50 => int d4;51 => int ds4 => int ef4; 52 => int e4 => int ff4; 53 => int f4 => int es4;
54 => int fs4 => int gf4; 55 => int g4;56 => int gs4 => int af4; 57 => int a4;58 => int as4 => int bf4; 59 => int b4 => int cf5;
60 => int c5 => int bs4; 61 => int cs5 => int df5; 62 => int d5;63 => int ds5 => int ef5; 64 => int e5 => int ff5; 65 => int f5 => int es5;
66 => int fs5 => int gf5; 67 => int g5;68 => int gs5 => int af5; 69 => int a5;70 => int as5 => int bf5; 71 => int b5 => int cf6;
72 => int c6 => int bs5; 73 => int cs6 => int df6; 74 => int d6;75 => int ds6 => int ef6; 76 => int e6 => int ff6; 77 => int f6 => int es6;
78 => int fs6 => int gf6; 79 => int g6;80 => int gs6 => int af6; 81 => int a6;82 => int as6 => int bf6; 83 => int b6 => int cf7;
84 => int c7 => int bs6; 85 => int cs7 => int df7; 86 => int d7;87 => int ds7 => int ef7; 88 => int e7 => int ff7; 89 => int f7 => int es7;
90 => int fs7 => int gf7; 91 => int g7;92 => int gs7 => int af7; 93 => int a7;94 => int as7 => int bf7; 95 => int b7 => int cf8;
96 => int c8 => int bs7; 97 => int cs8 => int df8; 98 => int d8;99 => int ds8 => int ef8; 100 => int e8 => int ff8; 101 => int f8 => int es8;
102 => int fs8 => int gf8; 103 => int g8;104 => int gs8 => int af8; 105 => int a8;106 => int as8 => int bf8; 107 => int b8 => int cf9;
108 => int c9 => int bs8; 109 => int cs9 => int df9; 110 => int d9;111 => int ds9 => int ef9; 112 => int e9 => int ff9; 113 => int f9 => int es9;
114 => int fs9 => int gf9; 115 => int g9;116 => int gs9 => int af9; 117 => int a9;118 => int as9 => int bf9; 119 => int b9 => int cf10;
120 => int c10 => int bs9; 121 => int cs10 => int df10; 122 => int d10;123 => int ds10 => int ef10; 124 => int e10 => int ff10; 125 => int f10 => int es10;
126 => int fs10 => int gf10; 127 => int g10;128 => int gs10 => int af10; 129 => int a10;130 => int as10 => int bf10; 131 => int b10 => int cf11; |
Generated by:
| Code: | fun string pitch_name(int pitch){
if (pitch%12 == 0) return Std.itoa(pitch)+" => int c"+Std.itoa(pitch/12)+" => int bs"+Std.itoa(pitch/12-1)+"; ";
else if(pitch%12 == 1) return Std.itoa(pitch)+" => int cs"+Std.itoa(pitch/12)+" => int df"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 2) return Std.itoa(pitch)+" => int d"+Std.itoa(pitch/12)+";";
else if(pitch%12 == 3) return Std.itoa(pitch)+" => int ds"+Std.itoa(pitch/12)+" => int ef"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 4) return Std.itoa(pitch)+" => int e"+Std.itoa(pitch/12)+" => int ff"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 5) return Std.itoa(pitch)+" => int f"+Std.itoa(pitch/12)+" => int es"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 6) return Std.itoa(pitch)+" => int fs"+Std.itoa(pitch/12)+" => int gf"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 7) return Std.itoa(pitch)+" => int g"+Std.itoa(pitch/12)+";";
else if(pitch%12 == 8) return Std.itoa(pitch)+" => int gs"+Std.itoa(pitch/12)+" => int af"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 9) return Std.itoa(pitch)+" => int a"+Std.itoa(pitch/12)+";";
else if(pitch%12 == 10) return Std.itoa(pitch)+" => int as"+Std.itoa(pitch/12)+" => int bf"+Std.itoa(pitch/12)+"; ";
else if(pitch%12 == 11) return Std.itoa(pitch)+" => int b"+Std.itoa(pitch/12)+" => int cf"+Std.itoa(pitch/12+1)+"; ";
}
string line;
for(0 => int j; j < 22; j++){
"" => line;
for(0 => int i; i < 6; i++){
line + pitch_name(i+6*j) => line;
}
<<<line,"">>>;
} |
_________________ To boldly go where no man has bothered to go before. |
|
|
Back to top
|
|
 |
seraph
Editor


Joined: Jun 21, 2003 Posts: 9685 Location: Firenze, Italy
Audio files: 11
G2 patch files: 2
|
Posted: Mon Feb 11, 2008 8:04 am Post subject:
|
 |
|
I'm under the impression that all those scales above repeat at the octave and that each octave is divided by 12 equal steps. Am I right  _________________ homepage - forum - myspace - virb - berkleemusic
| Quote: | | I . . . begin, hoping to cease not till death - Walt Whitman |
Last edited by seraph on Mon Feb 11, 2008 9:03 am; edited 2 times in total |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 6363 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Feb 11, 2008 8:50 am Post subject:
|
 |
|
If you mean the ones by Alphacore above then yes, I think so. However, there is nothing that says you *need* to sue them with 12 *equal* steps, it wouldn't be that hard to write a alternative for the function that translates note-number to a frequency based on non-equal tempered tuning. _________________ Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard |
|
|
Back to top
|
|
 |
|