Author |
Message |
kruhft
Joined: Oct 20, 2006 Posts: 50 Location: Canada
Audio files: 5
|
Posted: Fri Oct 20, 2006 5:59 pm Post subject:
abondon - song Subject description: a song I wrote using chuck |
|
|
I put this up on the wiki under the samples selection, but since I found this forum, I thought I would post it here just for kicks. It's my first actual song rendered totally with chuck; you can hear it of on my myspace page (see my sig), or just run it from chuck (obviously . It's just kinda of ambient and relaxing, nothing too crazy. Here's the source:
begin: kruhft__abandon.ck
Code: |
fun void percussion() {
Shakers perc => JCRev r1 => Pan2 p1 => dac;
perc => dac;
0.7 + Std.randf() => perc.gain;
while(done > 0) {
-1 + Std.randf()*2 => p1.pan;
if(Std.rand()%8) {
Std.rand()%22 => perc.preset;
30 + Std.rand()%100 => perc.freq;
}
Std.randf()+0.5 => perc.noteOn;
128::ms => now;
}
}
JCRev r;
Echo e;
96::ms => e.delay;
[ 110.0, 146.83, 220.0, 130.81, 164.81 ] @=> float notes[];
5 => int numnotes;
fun float getnote(float octave) {
return octave * notes[Std.rand2(0,numnotes-1)] + Std.randf();
}
fun void voice1 (float octave, float pan) {
24 => int count;
BandedWG bb => Pan2 p => r => dac;
5 => bb.gain;
while(--count) {
pan + Std.randf()*0.1 => p.pan;
getnote(2.0) => bb.freq;
0.6 + Std.randf()*0.4 => bb.noteOn;
(Std.rand()%3*1024 + 1024)::ms => now;
1.0 => bb.noteOff;
}
}
function void voice2 (float octave, float pan) {
24 => int count;
TubeBell tb => Pan2 p => dac;
while(--count) {
Std.randf()*0.3 => p.pan;
getnote(2.0) => tb.freq;
0.6 + Std.randf()*0.2 => tb.noteOn;
(Std.rand()%4*1024 + 1024)::ms => now;
1.0 => tb.noteOff;
}
}
1 => int done;
spork ~ percussion();
4::ms => now;
spork ~ percussion();
(4096*4)::ms => now;
for(0 => int i; i < 8; i++) {
spork ~ voice1(1+Std.rand()%2, -1+Std.rand()*2);
(4096*2)::ms => now;
spork ~ voice2(1+Std.rand()%2, -1+Std.rand()*2);
(4096*3+512)::ms => now;
}
(4096*16)::ms => now;
0 => done;
|
end: kruhft__abaondon.ck
Hope you like it. _________________ http://www.myspace.com/kruhft
http://kruhft.info Last edited by kruhft on Sat Oct 21, 2006 12:27 pm; edited 1 time in total |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Sat Oct 21, 2006 9:45 am Post subject:
|
|
|
I really like this. This inspires me to download ChucK and give it a try.
You can post tracks here, BTW. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Sat Oct 21, 2006 9:55 am Post subject:
|
|
|
Hmmm....
I loaded miniAudicle, pasted in your code and then hit Add Shred. I got this:
Code: | [unnamed1]:line(59).char(52): syntax error |
_________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
spencer
Joined: Aug 16, 2006 Posts: 53 Location: northern california
|
Posted: Sat Oct 21, 2006 12:05 pm Post subject:
|
|
|
Hmm, i can't get it to run either.
kruhft, could you try reposting your song with HTML disabled (click "Disable HTML in this post")? I think some constructions in ChucK get mangled when phpBB tries to interpret them as HTML. Specifically, I think there's a problem with the following part:
Code: |
(4096*4)::ms => now;
for(0 => int i; i <8> now; // this part seems to be mangled
spork ~ voice2(1+Std.rand()%2, -1+Std.rand()*2);
(4096*3+512)::ms => now;
}
(4096*16)::ms => now;
0 => done;
|
This would explain why mosc and myself were not able to get your code to run. |
|
Back to top
|
|
|
kruhft
Joined: Oct 20, 2006 Posts: 50 Location: Canada
Audio files: 5
|
Posted: Sat Oct 21, 2006 12:29 pm Post subject:
|
|
|
I'm a bit new to the whole BB forum thing so I forgot about the disabling of HTML. I edited the original post, so the code should be fine now.
Sorry about that; I'll remember in the future. _________________ http://www.myspace.com/kruhft
http://kruhft.info |
|
Back to top
|
|
|
kruhft
Joined: Oct 20, 2006 Posts: 50 Location: Canada
Audio files: 5
|
Posted: Sat Oct 21, 2006 12:32 pm Post subject:
|
|
|
mosc wrote: | I really like this. This inspires me to download ChucK and give it a try.
You can post tracks here, BTW. |
Cool, glad you like it. It'll be good to share tips and such using real songs and code, and remixes based on just code could be kinda fun (not having to worry about downloading samples and other annoyances). _________________ http://www.myspace.com/kruhft
http://kruhft.info |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Sat Oct 21, 2006 1:04 pm Post subject:
|
|
|
Great, thanks for reloading it. It works now and sounds outstanding. MUCH better than the mp3. Of course, I knew it would, but it always amazes me. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
|
Back to top
|
|
|
ge
Joined: Aug 13, 2006 Posts: 108 Location: Palo Alto, CA
|
|
Back to top
|
|
|
kruhft
Joined: Oct 20, 2006 Posts: 50 Location: Canada
Audio files: 5
|
Posted: Sat Oct 21, 2006 8:47 pm Post subject:
|
|
|
ge wrote: | Really beautiful track... Bravo.
Looking through the code reminded me of several potential chuck disaster areas that could use some patching. I made some minor adjustments in the code to better get around the chuck shortcomings, which we plan to definitely address. Hope you don't mind us mucking with your excellent program.
|
No worries at all and muck as you wish. I just started with ChucK and I'm sure there's some subtleties and such that I'll be learning as time goes on...maybe then we'll hit "excellent", but for now they're just hacks ;-D
ge wrote: |
changes
---
1. made global verb for left and right (though I love the zipping of the tails between L and R before).
|
Ah, that might be interesting. i just found out about the dac.left/right members and was wondering about stereo reverb when I was writing it.
ge wrote: |
2. moved declaraction of int done to above - chuck bug sometimes causes incorrect behavior from percussion() if done declared below.
|
Ok, I'll keep that in mind. I noticed no problems with it below so I wasn't sure if it was due to chuck doing a full source scan prior to compilation or...well...lack of warnings I did notice some crashes when I chucked together some ugens prior to their declerations so I should have known about this bug.
ge wrote: |
3. added disconnect before end of function to alleviate unfinished garbage collector. this will at least prevent the old ugen's from taking up cpu cycles still connected to the dac.
|
Another good thing to know; disconnect when not in use. I'm used to doing manual de/allocation so this shouldn't be a problem to get used to.
ge wrote: |
4. added few seconds of tail to the end.
I hope I didn't make anything worse. Sorry for all the chuck bugs (we'll get them!). Great work, kruhft.
|
I just gave the new one a listen, and it sounds different to my ear, probably due to the stereo reverb and the sweeping that you mentioned. The percussion seems a bit too busy now; an easy fix would be to cut the number of notes in half just to open it up a bit. I obviously wouldn't say it was worse in any way, but it does sound different than what I would have finished.
Funny how some tiny changes can do that
I'll take these trick and move on to my next and see how it works out. After writing some noisy slow-breakcore in yesterday with ChucK, maybe I'll move back to some pretty and ambient (nothing like switching it up sometimes).
Even with the bugs, ChucK is awesome; I almost like them...perfection (in audio software at least) is a bit overratted (as long as it doesn't crash). The bugs give character to the sound...
Anyways, back to making noise. _________________ http://www.myspace.com/kruhft
http://kruhft.info |
|
Back to top
|
|
|
ge
Joined: Aug 13, 2006 Posts: 108 Location: Palo Alto, CA
|
Posted: Sat Oct 21, 2006 9:18 pm Post subject:
|
|
|
Quote: | I just gave the new one a listen, and it sounds different to my ear, probably due to the stereo reverb and the sweeping that you mentioned. The percussion seems a bit too busy now; an easy fix would be to cut the number of notes in half just to open it up a bit. I obviously wouldn't say it was worse in any way, but it does sound different than what I would have finished.
Funny how some tiny changes can do that |
Yeah, it really is very different. This is probably just abusing the newly configured .ck uploading (thanks Howard!), but here is kind of a hybrid between the original and the (not-so) slightly modified version. I dig the tail panning, I reverted the reverb situation back in percussion() and try left/right for the voices. For now, I cease my mucking.
Quote: | Even with the bugs, ChucK is awesome; I almost like them... |
Haha, thanks (we love this attitude ). We'll do our best to keep bugs to a minimum, but there won't be a shortage anytime soon!
Quote: | perfection (in audio software at least) is a bit overratted (as long as it doesn't crash). The bugs give character to the sound... |
Yeah, there is something cool about serrendipitous bugs. Like many other systems, we may have to keep some bugs around for backwards compatibility, huh huh.
Description: |
back to original cool percussion verb |
|
Download |
Filename: |
kruhft__abondon__mod__ge2.ck |
Filesize: |
2.01 KB |
Downloaded: |
355 Time(s) |
|
|
Back to top
|
|
|
majutsu
Joined: Jun 18, 2006 Posts: 151 Location: New York
Audio files: 1
|
Posted: Sun Oct 22, 2006 11:32 am Post subject:
|
|
|
really nice job!
i love this kind of post. i have no ability to make anything with these programs. i really appreciate seeing people use these programs musically. i think it's very cool. nice piece. relaxing and interesting, and all from a short little snippet of code. bravo! _________________ All phenomena are atoms in association and dissociation. |
|
Back to top
|
|
|
|