Author |
Message |
steveJ0
Joined: Oct 28, 2006 Posts: 5 Location: University Park
|
Posted: Sat Oct 28, 2006 3:39 pm Post subject:
Hello from Penn State Subject description: new user introduction, and a little program |
 |
|
Hey everyone. I'm Steve, a sophomore, from PSU in Pennsylvania. I saw Ge's presentation when he came to visit last year (spring, fall, who knows?). Anyway, ever since then I've been playing with ChucK off and on. I recently got interested in it again because I bought a N64 controller to usb adapter, which i'm hoping has some interesting opportunities. I didn't write anything for it yet, but here's an old midi program i wrote to thank Ge for his visit and contribution of ChucK.
Code: |
//Steve's version of Hail to the Lion
//as performed by Old Main on weekends
// patch
TubeBell s => JCRev r => dac;
.9 => s.gain;
.8 => r.gain;
.2 => r.mix;
// MIDI notes
67 => int g;
69 => int a;
71 => int b;
72 => int C;
74 => int D;
76 => int E;
77 => int F;
// Melody
[[E,4],[E,6],[D,16],[C,8],[g,3],[a,4],[C,8],[F,8],[E,2],[E,4],[b,6],[C,16],[D,8],[C,3],[b,8],[a,8],[b,8],[E,8],[C,2]] @=> int tune[][];
-6 => int transport;
40 => int tempo;
// Play
for( 0 => int i; i <tune> s.freq;
1.0 => s.noteOn;
240000::ms / ( tune[i][1] * tempo ) => now;
}
|
Hopefully he had time to listen to the sounds of Old Main at some point during his visit. Now, all of you get to hear it. Thanks! |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Sun Oct 29, 2006 10:01 am Post subject:
|
 |
|
wow.. welcome to this wonderful community.
i'm a newbie around here.. been chucking for a few months.
let's chat soon.
anyway i'm checking out your patch now..
but i can't get the last part to run.
i tried this:
Code: | //Steve's version of Hail to the Lion
//as performed by Old Main on weekends
// patch
TubeBell s => JCRev r => dac;
.9 => s.gain;
.8 => r.gain;
.2 => r.mix;
// MIDI notes
67 => int g;
69 => int a;
71 => int b;
72 => int C;
74 => int D;
76 => int E;
77 => int F;
// Melody
[[E,4],[E,6],[D,16],[C,8],[g,3],[a,4],[C,8],[F,8],[E,2],[E,4],[b,6],[C,16],[D,8],[C,3],[b,8],[a,8],[b,8],[E,8],[C,2]] @=> int tune[][];
-6 => int transport;
40 => int tempo;
// Play
for( 0 => int i; i < 19; i++) {
Std.mtof(tune[i][0]) => s.freq;
1.0 => s.noteOn;
240000::ms / ( tune[i][1] * tempo ) => now;
} |
is this what i've gotta hear? heheh
the bell sounds charming.. hmm.
ok.. i'll pm you later. let's share our ideas on chuck soon. |
|
Back to top
|
|
 |
spencer

Joined: Aug 16, 2006 Posts: 53 Location: northern california
|
Posted: Sun Oct 29, 2006 11:03 am Post subject:
|
 |
|
Hi steveJ0, welcome to the crazy world of ChucK.
I think the bulletin board software tried to interpret part of your ChucK code as HTML (happens sometimes with the angle brackets < >), and in the process it mangled the end of your program. Could you try reposting it with HTML disabled (click the appropriate checkbox when you post)? Its generally a good idea to disable HTML when posting chuck code, as this mangling seems to happen regularly. You could also consider posting your program as an attachment, avoiding the issue entirely.
spencer |
|
Back to top
|
|
 |
steveJ0
Joined: Oct 28, 2006 Posts: 5 Location: University Park
|
Posted: Sun Oct 29, 2006 11:54 am Post subject:
Ahh so that's the trick |
 |
|
Yeah, so I guess you did have some trouble running that script... anyway, thanks Spencer for letting me know how to fix that. As I've already said, its not that exciting, but here it is:
Code: |
//Steve Barnwell's version of Hail to the Lion
//as performed by Old Main on weekends
// patch
TubeBell s => JCRev r => dac;
.9 => s.gain;
.8 => r.gain;
.2 => r.mix;
// MIDI notes
67 => int g;
69 => int a;
71 => int b;
72 => int C;
74 => int D;
76 => int E;
77 => int F;
// Melody
[[E,4],[E,6],[D,16],[C,8],[g,3],[a,4],[C,8],[F,8],[E,2],[E,4],[b,6],[C,16],[D,8],[C,3],[b,8],[a,8],[b,8],[E,8],[C,2]] @=> int tune[][];
-6 => int transport;
40 => int tempo;
// Play
for( 0 => int i; i < tune.cap(); i++) {
std.mtof( tune[i][0] + transport ) => s.freq;
1.0 => s.noteOn;
240000::ms / ( tune[i][1] * tempo ) => now;
}
|
Thanks again. |
|
Back to top
|
|
 |
|