electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Hello from Penn State
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
steveJ0



Joined: Oct 28, 2006
Posts: 5
Location: University Park

PostPosted: Sat Oct 28, 2006 3:39 pm    Post subject: Hello from Penn State
Subject description: new user introduction, and a little program
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Sun Oct 29, 2006 10:01 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
spencer



Joined: Aug 16, 2006
Posts: 53
Location: northern california

PostPosted: Sun Oct 29, 2006 11:03 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
steveJ0



Joined: Oct 28, 2006
Posts: 5
Location: University Park

PostPosted: Sun Oct 29, 2006 11:54 am    Post subject: Ahh so that's the trick Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use