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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » ChucK programming language
One-Line ChucK Crazy
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 5 [121 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2, 3, 4, 5 Next
Author Message
kijjaz



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

PostPosted: Sun Sep 24, 2006 2:43 pm    Post subject:  One-Line ChucK Crazy
Subject description: let's share some crazy 1-line chuck code
Reply with quote  Mark this post and the followings unread

i've come up with an idea for all chuckers.
and i was talking with tasmo on ##chuck in freenode irc
(irc.freenode.net)
and we agreed to post this idea up on the forum so that we can invite more people to join in this activity.

it'd be great to share our synthesis and programming technics
(or some chuck-hacks?)
but what if we can show them off in a very short code?

let's make up some rules for this game:
* the code must be on only 1 line
* no more than 80 characters
* crazy

i'll share some of mine first.. i'll look forward to some more from the members:


this one sounds like a Turntablist DJ showing off his fast scratching technics
Code:
SawOsc s1=>dac=>SinOsc s2=>s1; while((maybe*20+20)::ms=>now) maybe => s2.gain;


Blit March
Code:
Blit s => dac; while(10::ms=>now) Math.tan(now/samp) => s.freq;


ps. i'll come back to share some new codes soon!
and i'm excited to hear from all of you my gurus also.. ^^"​
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Tue Sep 26, 2006 2:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

your examples don't make sound on my comp.

i tried the examples in the examples folder and everything works fine.

i just can't get your first line to work. am i missing something? ...

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Tue Sep 26, 2006 8:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

majutsu wrote:
your examples don't make sound on my comp.


same here. slightly modified:

Code:
Blit s => dac; while(10::ms=>now) Math.fabs(Math.tan(now/samp))*10 => s.freq;
Back to top
View user's profile Send private message Visit poster's website
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Tue Sep 26, 2006 9:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

ge wrote:
Code:
Blit s => dac; while(10::ms=>now) Math.fabs(Math.tan(now/samp))*10 => s.freq;

change that second 10 to 100 or 1000. pretty knarly...
Back to top
View user's profile Send private message Visit poster's website
kijjaz



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

PostPosted: Wed Sep 27, 2006 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread


majutsu, eh? that first line didn't make any sound on your system?
hmm.. i've tried that on debian linux, and now on windows.. it still works the same..

oh and what version of chuck are you using?
because that first line needed the new oscillator sync option that's implemented in chuck 1.2.0.7

hmm we're dealing with chaos again heheheheh.

thanks, Ge, for the absolute.. wow.. it's much more funky now.


warning! clippy & crispy:
Code:
Noise n => LPF f => NRev r => dac => f; 7 => f.freq; while(second=>now);


huh? TV?
Code:
Noise n => HPF f => NRev r => dac => f; 15000 => f.freq; while(second=>now);
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Wed Sep 27, 2006 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

i'm using the new one

sounds like ge said he didn't get the first one to work either

i didn't try the second one though (just gave up at the first one), i will try it now. maybe first one just with problem.

fun game. i would contribute if i coded. but post up more, i like to see what kind of things people do with chuck.

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
spencer



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

PostPosted: Sun Oct 01, 2006 9:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

crazy robot dance!

Code:
SndBuf s=>dac;"special:ahh"=>s.read;for(;;)Math.tan((5::ms=>now)/4::ms)=>s.rate;


Try messing around with the 5 and 4 values, my favorites are (8,5), (5,8), (2,2), (2,1), and (4,2.5).

spencer
Back to top
View user's profile Send private message
jbum



Joined: Oct 24, 2006
Posts: 26
Location: Los Angeles

PostPosted: Fri Nov 03, 2006 11:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

This one-liner performs a famous piece by John Cage.

Code:


(4*60+33)::second => now;



Smile

_________________
<a href="http://www.krazydad.com/">krazydad.com</a>
Back to top
View user's profile Send private message Visit poster's website
kijjaz



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

PostPosted: Wed Nov 08, 2006 8:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

and here is a scientific issue: Shocked
Code:
// That's why blackhole is black
// by kijjaz (kijjaz@yahoo.com)
Noise s => blackhole => dac; 10::second => now;


Code:
// Intergalactic Sound Check
// by kijjaz (kijjaz@yahoo.com)
TriOsc s => PitShift p => p => dac; p.shift(1.0003); s.freq(30); while(ms=>now);


Code:
// I can't hear you.. Say it again.
// by kijjaz (kijjaz@yahoo.com)
Noise s => PitShift p => p => dac; p.shift(0.2); s.gain(0.5); while(ms=>now);
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
cebec



Joined: Apr 19, 2004
Posts: 1098
Location: Virginia
Audio files: 3
G2 patch files: 31

PostPosted: Thu Nov 09, 2006 8:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Good job!
Back to top
View user's profile Send private message
laserbeak



Joined: Nov 12, 2006
Posts: 15
Location: East Coast U.S.Ass

PostPosted: Mon Nov 13, 2006 3:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
and here is a scientific issue: Shocked
Code:
// That's why blackhole is black
// by kijjaz (kijjaz@yahoo.com)
Noise s => blackhole => dac; 10::second => now;


Code:
// Intergalactic Sound Check
// by kijjaz (kijjaz@yahoo.com)
TriOsc s => PitShift p => p => dac; p.shift(1.0003); s.freq(30); while(ms=>now);


Code:
// I can't hear you.. Say it again.
// by kijjaz (kijjaz@yahoo.com)
Noise s => PitShift p => p => dac; p.shift(0.2); s.gain(0.5); while(ms=>now);


nice!! TriOsc was my favorite!!! the blackhole one didnt make sound
Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Tue Nov 14, 2006 3:01 am    Post subject: Reply with quote  Mark this post and the followings unread

laserbeak wrote:
nice!! TriOsc was my favorite!!! the blackhole one didnt make sound


exactly! blackhole just sucks everything in and doesn't let anything out ! scary huh?
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
laserbeak



Joined: Nov 12, 2006
Posts: 15
Location: East Coast U.S.Ass

PostPosted: Tue Nov 14, 2006 3:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
laserbeak wrote:
nice!! TriOsc was my favorite!!! the blackhole one didnt make sound


exactly! blackhole just sucks everything in and doesn't let anything out ! scary huh?


lol i was wondering about that!! no wonder i saw an LFO and Blackhole tutorial in the pdf Laughing
Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Sat Dec 16, 2006 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread


(this patch is dangerous for my machine's performance. i dunno why.

you can modify the 300::ms and the * 10 part to get some other effects.
changing * 10 to * 2 really gives that nice VDO-game style sound.


Code:
// Digital Vinyl! by kijjaz
Step a => LPF b => dac; while(300::ms=>now) b.freq(a.next(Std.randf()) * 10);

// Shoot'em Up.. by kijjaz
Step a => HPF b => dac; while(300::ms=>now) b.freq(a.next(Std.randf()) * 200);

// Boo! by kijjaz
Step a => LPF b => dac; while(500::ms=>now) b.freq(a.next(Std.randf()) * 1000 + 900);
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
kijjaz



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

PostPosted: Sat Dec 16, 2006 2:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

hahah.. more special effects from this 'negative filter freq value' thing..

Code:
// i love my pet bug.. by kijjaz
Noise a => LPF b => HPF c => dac; while(ms => now) c.freq(b.freq(a.last() * 4) * 4);

// sometimes, we've got a colony of pet bugs.. by kijjaz
Noise a => LPF b => HPF c => dac; while(samp => now) c.freq(b.freq(a.last() * 10) * 10);

// first attempt to tame a pet bug: failed.. by kijjaz
Noise a => LPF b => LPF c => dac; dac.gain(0.2); while(samp => now) c.freq(b.freq(a.last() * 10) * -20);

// just caught a new pet bug! by kijjaz
Noise a => LPF b => LPF c => dac;  dac.gain(0.1); while(samp => now) b.freq(c.freq(a.last()*50) + b.last()*100);

// pet bug and his grandmom.. by kijjaz
Noise a => LPF b => LPF c => dac;  dac.gain(0.1); while(samp => now) c.freq(50*(b.freq(a.last()) + b.last()));
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
laserbeak



Joined: Nov 12, 2006
Posts: 15
Location: East Coast U.S.Ass

PostPosted: Sun Dec 17, 2006 1:43 am    Post subject: Reply with quote  Mark this post and the followings unread

you're a madman Very Happy
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Dec 17, 2006 12:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

I love this concept, it's like the most logical result of ChucK being a experiment in syntax as well as ck code being so compact.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



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

PostPosted: Fri Feb 09, 2007 4:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

More from my bedroom again:

Code:
// Sine Wave is my Favourite Toy.
SinOsc s => dac; int i; while(samp => now) s.last() + (i++ * 0.49) => s.phase;


Code:
// Sine Wave Gunfight.
SinOsc s => dac; int i; while(10::samp => now) s.last() + (i++ * 0.999) => s.phase;


Code:
// Low Signal in Emergency Room.
SinOsc a => SinOsc b => dac; b.sync(1); while(ms => now) b.last() * 119 => a.freq;


Code:
// Power-Off-Button Makes Cool Bassdrum Sound
SinOsc a => SinOsc b => dac; b.sync(1); while(ms => now) b.last() * 61 => a.freq;


hmm.. and this one's code is quite long, but developed from the above technic.

Code:
// Dizzy Chuck Gillespie
SinOsc a => SinOsc b => dac; b.sync(1); while(120::ms => now) (b.last() => a.phase) * 100 => a.freq;


Code:
// Miles Chuck Davis
SinOsc a => SinOsc b => dac; b.sync(1); while(120::ms => now) a.freq((b.last() * 0.05 => a.phase) * 220);
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
kijjaz



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

PostPosted: Thu Jun 14, 2007 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

some ideas from today's Gain g => g idea.

Code:
// crazy wind through a window
Noise s1 => Gain g1 => g1 => SinOsc s2 => dac; 2 => s2.sync; while(second => now);


this one produces some interesting digital jitters when time passed..
Code:
// stupidly rising
SinOsc s1 => Gain g => g => s1 => dac; 2 => s1.sync; while(second => now);


Code:
// not sure if it should rise or not
SawOsc s1 => Gain g => g => s1 => dac; 2 => s1.sync; while(second => now);
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Fri Jun 15, 2007 8:18 am    Post subject: Reply with quote  Mark this post and the followings unread

My brain, it is melting!

Thanks for all these ideas, kijjaz, Dr. Spank, and everyone.

Even though ChucK is young, and a lot more work needs to be done, what is so cool is that even in its current incarnation you can spend a lifetime experimenting with it and getting awesome and bizarre things to happen...

...c...
Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Fri Jun 15, 2007 12:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Now the LPF, HPF, BPF is so exploitable ^_^"
I'll produce some more choatic pets.

Oh! this one sounds like a pet to me! good!

Code:
// Alien Pseudo Random
Impulse i => DelayA d => d => dac; second => d.max; while(Std.rand2f(.01 => i.next, 10)::ms => d.delay => now);


Code:
// Squarewars
SqrOsc s[20]; for(int i; i <19> s[i+1]).sync(2), s[i].gain(220); s[19] => dac; day => now;


Code:
// Try with sample rate 44100, 48000
// Please move your yellow submarine, it's in the way.
SinOsc s => dac; while(320::samp => now) s.last() + s.phase() => s.phase;


Code:
// Try with sample rate 44100, 48000
SqrOsc s => dac; while(100::samp => now) s.last() + s.phase() => s.phase;


Code:
// Sorry Professor, I didn't know this'd shut the machine down. (at 44100)
// Sorry Mom, I didn't know this'd shut down your playstation. (at 48000)
//
SinOsc s => dac; while(50::ms => now) s.freq()*(1 + s.phase()) => s.freq;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Mon Jun 18, 2007 9:01 am    Post subject: Reply with quote  Mark this post and the followings unread

This thread was so awesome I saved it as text and then created a file with all the "chuck one line greatest hits in it" to experiment with.

Thanks a lot kijjaz and everyone else. Some constructs I just would have never even thought of, like " ... => Delay d => d => ... " Cool man!

...c...
Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Mon Jun 18, 2007 11:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks very much Chuckles!
Now i've got more power to go crazy with more one-line codes!

So today I'm gonna mess up more with SinOsc's phase.

Code:
// SinOsc practicing a scale (His technics improve when Sampling Rate is increased)
SinOsc s => dac; while(samp => now) if(s.last() > Math.sin(now/second)) s.phase() + .1 => s.phase;


Code:
// He's practice some exotic dorian scale
SinOsc s => dac; while(samp => now) if(s.last() > Math.sin(now/second)) s.phase() + 1.0/16 => s.phase;


Code:
// Running around after practicing music
SinOsc s => dac; while(samp => now) if (s.last() > Math.sin(now/second)) s.phase() * 1.5 => s.phase;


Code:
// Thanks to Perry Cook drone!
SinOsc s => PRCRev r => dac; .3 => r.gain => r.mix; while(samp => now) s.phase() + r.last()/6 => s.phase;


Code:
// Thanks to Ge Wang drone!
SqrOsc s => NRev r => dac; .2 => r.gain => r.mix; while(samp => now) s.phase() + r.last()/50 => s.phase;


Code:
// Voices of users waiting for new ChucK features.
SinOsc s => dac => PRCRev r => blackhole; while(samp => now) s.phase() + r.last() * .004 => s.phase;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Mon Jun 18, 2007 3:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz posts so much good stuff it's hard to keep up

to make those 1-liners easier to play with I created the attached text (wordpad, sorry non windows users) file


One-Line ChucK Crazy.txt
 Description:

Download
 Filename:  One-Line ChucK Crazy.txt
 Filesize:  6.81 KB
 Downloaded:  1065 Time(s)

Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Tue Jun 19, 2007 3:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

ahhhh! thanks ..
I hope more people can share their 1-line ideas here soon.
chuckles, you too, okay? ^_^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 5 [121 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2, 3, 4, 5 Next
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