// "Notes" by Hugh R Frazer
// ugen info at
// http://chuck.cs.princeton.edu/doc/program/ugen.html
//mtof values
// C C# D D# E F F# G G# A A# B
// /Db /Eb /Gb /Ab /Bb
// 0 1 2 3 4 5 6 7 8 9 10 11
// 12 13 14 15 16 17 18 19 20 21 22 23
// 24 25 26 27 28 29 30 31 32 33 34 35
// 36 37 38 39 40 41 42 43 44 45 46 47
// 48 49 50 51 52 53 54 55 56 57 58 59
// 60 61 62 63 64 65 66 67 68 69 70 71
// 72 73 74 75 76 77 78 79 80 81 82 83
// 84 85 86 87 88 89 90 91 92 93 94 95
// 96 97 98 99 100 101 102 103 104 105 106 107
//
// C C# D D# E F F# G G# A A# B
// C Db D Eb E F Gb G Ab A Bb B
[100, 1, //Comment - Verse
69,4, 64,4, 64,4, 61,8, 61,4, 61,4, 61,4, 61,4,
62,4, 62,4, 62,4, 62,2,62,2, 62,4, 62,4, 62,4, 61,4, 71,2,62,2, 61,4,
69,2,64,2, 64,4, 61,8, 61,4, 61,4, 61,4, 61,4,
62,4, 62,4, 62,4, 62,2,62,2, 62,4, 62,4, 62,4, 61,4, 71,2,62,2, 61,4
] @=> int verse_notedur[]; //sequence data
[100, 2, //Comment - Bridge
60,4, 68,4, 68,4, 65,4,
60,4, 63,4, 63,4, 60,4,
61,4, 61,2,61,2, 61,4, 61,4, 61,4, 61,4, 61,2,60,2, 70,4, 60,2,61,2,60,2,
60,4, 68,4, 68,4, 65,4,
60,4, 60,2,60,2, 63,4, 63,4, 60,4,
61,4, 61,2,61,2, 61,4, 61,4, 61,4, 61,4, 61,2,60,2, 70,4, 60,2,61,2,60,2
] @=> int bridge_notedur[]; //sequence data
[100, 3, //Comment - Chorus
70,4, 70,4, 69,2,69,2,67,2, 62,2,60,2, 62,4, 65,2,62,2, 60,4,
70,4, 69,2,69,2,67,2, 62,2,60,2, 62,4, 65,2,62,2,60,2,
70,4, 69,2,69,2,67,2, 62,4, 60,4, 62,2,65,2,62,2,60,2,
62,4, 60,4, 65,2,62,2, 60,4,
62,4, 60,4, 65,2,62,2, 60,4,
62,2,60,2, 62,4, 65,2,60,2,70,2
] @=> int chorus_notedur[]; //sequence data
SqrOsc inst => JCRev r => dac;
.9 => inst.width;
.1 => r.gain;
.5 => r.mix;
now/ms => float mystart;
now/ms => float runtime;
while(true){//infinite loop
<<< "Begin" >>>;
play ( verse_notedur );
play ( bridge_notedur );
play ( verse_notedur );
play ( bridge_notedur );
play ( chorus_notedur );
play ( bridge_notedur );
play ( chorus_notedur );
//Order of the song
//1. verse #1
//2. bridge
//3. verse #2
//4. bridge
//5. chorus
//6. bridge
//7. chorus
}//While True infinate loop
fun void play(int part[])
{
<<<"part=", part >>>;
for (1 => int i;i < part.cap(); i+2 => i)
{ //for as long as we have notes in the array
if (part[i-1] == 100) //if comment statement
{
if (part[i] == 1){
<<< "--intro--" >>>;
}
if (part[i] == 2){
<<< "--bridge--" >>>;
}
if (part[i] == 3){
<<< "--chorus--" >>>;
}
} else
{
<<< "i=",i-1,"+",i, " runtime in s=", runtime/1000, " notedur[i-1]=", part[i-1], " notedur[i]=", part[i] >>>;
Std.mtof(0 + part[i-1] ) => inst.freq; //set the note
} //end if comment statement
now/ms - mystart => runtime;
(part[i]*85)::ms => now; //getdur from array and play
}// end for loop
}//end of function play
// C C# D D# E F F# G G# A A# B
// /Db /Eb /Gb /Ab /Bb
// 48 49 50 51 52 53 54 55 56 57 58 59
// 60 61 62 63 64 65 66 67 68 69 70 71
//Verse:
//A E E C# C# C# C# C#
//1. I walked across an empty land
//2. I came across a fallen tree
//
//D D D DD D D D C# B D C#
//1. I knew the pathway like the back of my hand
//2. I felt the branches of it looking at me
//
//A E E C# C# C# C# C#
//1. I felt the earth beneath my feet
//2. Is this the place we used to love
//
//D D D DD D D D C# B D C#
//1. sat by the river and it made me complete
//2. is this the place that i've been dreaming of
//
//Bridge:
//C Ab Ab F
//oh simple thing
//C Eb Eb C
//where have you gone
//C# C#C# C# C# C# C# C#C Bb CC#C
//I'm getting old and i neeed something to rely on
//C Ab Ab F
//so tell me when
//C CC Eb Eb C
//you're gonna let me in
//C# C#C# C# C# C# C# C#C Bb CC#C
//i'm getting tired and i need somewhere to begin
//
//Chorus:
//Bb Bb^ A A G DC D F D C
//and if you have a minute why don't we go
//Bb AA G DC D F DC
//talk about it somewhere only we know
//Bb A A G D C DFDC
//this could be the end of everything
//D C F D C ]2x
//so why dont we go]
//DC D F CBb
//somewhere only we know
//
//
//Order of the song
//1. verse #1
//2. bridge
//3. verse #2
//4. bridge
//5. chorus
//6. bridge
//7. chorus
No comments:
Post a Comment