electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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
One-Line ChucK Crazy
Post new topic   Reply to topic Moderators: Kassen
Page 5 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: Previous 1, 2, 3, 4, 5
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Fri Jul 17, 2009 1:05 am    Post subject: Reply with quote  Mark this post and the followings unread

I modified Kassen's one-liner that makes the phasor noise so that it only fires one time. That way you can mouse-click on the Add Shred button to make sounds like a 1980's style arcade game. Here it is:

Code:
SubNoise s=>dac;int n;while(n<300>s.rate;10::ms=>now;}

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
DrunkenMonk



Joined: Aug 18, 2009
Posts: 4
Location: Athens, Greece

PostPosted: Tue Aug 18, 2009 9:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

And the Oscar goes to...
Kijjaz! thumright
With the exception of some reaaallly noizy stuff, the other are great examples of one liners.
I want to try Inventor's input-dependent tho, cause no working mic at the moment.

I am new as you see to ChucK (by the way glad to be here) and after playing with it since yesterday those one-liners gave me some nice tricks I would like to experiment with..
As I was listening to all these, I collected them to a single file. I think it has it all, or anyway almost all.

After all these my brain is like
SinOsc v =>SawOsc s =>dac;while(1){Std.rand2f(900,1440) =>v.freq;125::ms=>now;}

;-p

cheers all
Di


OneLineBitches.ck
 Description:
Almost all the one-line-crazy codes. (well some are more than one but they re worth the spare lines.. ;))

Download
 Filename:  OneLineBitches.ck
 Filesize:  9.21 KB
 Downloaded:  320 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: Wed Aug 19, 2009 1:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

long time no chuck. hi all. got a simple idea, but sounds nice & harsh.
Code:
// Scary PRCRev
Impulse i => PRCRev r => Gain f => r => dac; f.gain(.25); i.next(.1); 10::second => now;


use this with microphone.. nice as a feedback tool:
Code:
adc => Gain g => SinOsc s => dac; second/samp/16 => g.gain; day => now;
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: Mon Oct 26, 2009 9:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'd like to invite you all to visit the SuperCollider's sc140 (less than 140 characters of code) page here:

http://supercollider.sourceforge.net/sc140

These one-line codes sounds really nice.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
MrJiveBoJingles



Joined: Oct 25, 2009
Posts: 9
Location: U.S.

PostPosted: Tue Oct 27, 2009 6:54 am    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
I'd like to invite you all to visit the SuperCollider's sc140 (less than 140 characters of code) page here:

http://supercollider.sourceforge.net/sc140

These one-line codes sounds really nice.

Those are quite nice indeed. Makes me want to give SC another try in addition to learning ChucK.
Back to top
View user's profile Send private message
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Wed Oct 28, 2009 12:32 pm    Post subject: one-line craze revival? Reply with quote  Mark this post and the followings unread

so we'll revive one-liners (twit-chuckles) Smile ?

here comes one, this mimics the sound of a traditional Hungarian instrument, the doromb

Code:
Phasor m=>Gain g;Blit b=>g=>BPF f=>dac;b.gain(9);m.freq(-2);b.freq(99);g.op(3);f.Q(5);while(1){f.freq(Std.rand2(300,999));second=>now;}

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
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 Oct 28, 2009 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yay! My first celebrations for ChucK 1.2.1.3:
Code:
// evolving simple SqrOscs
SqrOsc a => SqrOsc b => dac; -55.05 => a.freq => b.freq => a.gain; day => now;

// a TriOsc can produce this sound??
TriOsc s => dac; while(Std.rand2f(0, 1)::ms => now) if (maybe) -s.freq() => s.freq;

// a TriOsc video-game bomb
TriOsc s => dac; while(Std.rand2f(0, 5)::ms => now) if (maybe) s.freq() * -.995 => s.freq;


This does not work in older ChucK because it requires this basic oscillators to be able to operate with negative freq. I'm so glad it's possible now!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Wed Oct 28, 2009 3:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Bumblebee in the lounge

Code:
VoicForm t=>NRev n=>dac;n.mix(.1);t.freq(200);while(1){Std.rand2(0,128)=>t.phonemeNum;99::ms=>now;}


Dance of chickens being fried

Code:
Phasor m=>Gain g;Noise b=>BPF f=>g=>NRev n=>dac;n.mix(.15);f.Q(9);g.op(3);m.freq(-3.9);while(1){f.freq(Std.rand2(4000,9000));20::ms=>now;}


Pluck machine

Code:
SinOsc s=>blackhole;Mandolin m=>dac;m.stringDamping(0);s.freq(3);while(1){if(maybe)m.pluck(1);s.last()+1.5=>m.bodySize;100::ms=>now;}

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
Back to top
View user's profile Send private message Visit poster's website
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Wed Oct 28, 2009 3:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mortulated

Code:
SinOsc m=>Gain g;TriOsc b=>g=>NRev n=>HPF f=>dac;f.freq(600);b.freq(99);g.op(3);while(1){m.freq(Std.rand2(99,300));second=>now;}


Husky wee wee

Code:
Blit b=>BPF f=>dac;b.freq(100);f.Q(5);while(1){f.freq(Std.rand2(300,9999));ms=>now;}

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
Back to top
View user's profile Send private message Visit poster's website
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Wed Oct 28, 2009 4:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Based on Kijjaz' electronic drum kit...

Code:
Impulse t=>LPF o=>SinOsc d=>SinOsc e=>SinOsc f=>dac;o.set(28,99);1=>d.sync=>e.sync=>f.sync;while(Std.rand2(10,80)=>t.next)second=>now;

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
Back to top
View user's profile Send private message Visit poster's website
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Wed Oct 28, 2009 4:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Balls are falling

Code:
Phasor p=>SinOsc s=>ZeroX x=>LPF o=>dac;o.set(500,29);p.gain(10);p.freq(.2);while(ms=>now){if(p.last()>1)10-p.last()=>o.gain;}

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
Back to top
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 3618
Location: Sweden
Audio files: 254
G2 patch files: 95

PostPosted: Wed Oct 28, 2009 11:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

welcome Hillaby!

Cool one-liners. Smile

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Hillaby



Joined: Oct 28, 2009
Posts: 11
Location: Hungary

PostPosted: Fri Oct 30, 2009 2:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Antimon wrote:
welcome Hillaby!

Cool one-liners. Smile

/Stefan


Thanks, Stefan! thanks

_________________
Hillaby
(Szilveszter)
More music at ReverbNation
... at MySpace
A humble blog
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: Tue Nov 03, 2009 12:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// 3-bit seashore
Noise s => LPF f => ZeroX x => dac; while(ms => now) (Math.sin(now/second)+1)*100 => f.freq;


Code:
// Helicopter Drone
TriOsc s => PRCRev r => dac; r => Gain g => s; 2 => s.sync; 330 => g.gain; .2 => dac.gain; day => now;


Code:
// Self-Destruction
Phasor s => PRCRev r => dac; r => Gain g => s; 2 => s.sync; 220 => g.gain; .2 => dac.gain; day => now;


Code:
// retro bomb
SinOsc s => NRev r => TriOsc t => dac; 1000 => s.gain; while(ms => now) s.freq() * .99 => s.freq;
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: Tue Nov 03, 2009 12:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// some Final Fantasy cave
SinOsc s => NRev r => TriOsc t => dac; 1000 => s.gain; while(ms => now) s.freq() * .99 => s.freq;


Code:
// Some Major13(#11) chord progressions
SinOsc s => NRev r => dac; .2 => s.gain; int x; while(250::ms => now) x * 7 % 121 * 4 % 49 % 24 + 60 => Std.mtof => s.freq, x++;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
mattb



Joined: Jul 08, 2009
Posts: 34
Location: Australia
Audio files: 24

PostPosted: Thu Mar 04, 2010 4:04 am    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz wrote:
Code:
// Some Major13(#11) chord progressions
SinOsc s => NRev r => dac; .2 => s.gain; int x; while(250::ms => now) x * 7 % 121 * 4 % 49 % 24 + 60 => Std.mtof => s.freq, x++;


Beautiful.

Inspired by yours, one that takes its melody from an LFO...

Code:
SinOsc s=>blackhole;TriOsc t=>NRev r=>dac;t.gain(0.3);s.freq(1.25);while(1){Std.mtof(((s.last()*5+30)$int)*2)=>t.freq;250::ms=>now;}


Code:
// Piano piece...
[0,2,3,5,7,8,10]@=>int n[];Phasor s=>blackhole;TriOsc t=>NRev r=>dac;t.gain(0.3);s.freq(2.75);while(1){Std.mtof(n[(s.last()*7)$int]+50+(maybe*12))=>t.freq;250::ms=>now;}

Last edited by mattb on Wed Mar 10, 2010 4:59 am; edited 1 time in total
Back to top
View user's profile Send private message
mattb



Joined: Jul 08, 2009
Posts: 34
Location: Australia
Audio files: 24

PostPosted: Tue Mar 09, 2010 2:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// Four on the floor
SinOsc s=>dac;Phasor p=>blackhole;p.freq(2);while(1){Math.sqrt(1/(p.last()+0.001))*50=>s.freq;10::ms=>now;};


Code:
// Gabber version
SqrOsc s=>dac;Phasor p=>blackhole;s.gain(0.5);p.freq(3);while(1){Math.sqrt(1/(p.last()+0.001))*40=>s.freq;3::ms=>now;};


Code:
// Level boss music generator
TriOsc s=>dac;int a[8];0=>int x;while(1){if(x%32<8){Std.rand2(-4,4)=>a[x%8];};a[x%8]*((x%64/16)$int+1)+60=>Std.mtof=>s.freq;100::ms=>now;x++;};
Back to top
View user's profile Send private message
mattb



Joined: Jul 08, 2009
Posts: 34
Location: Australia
Audio files: 24

PostPosted: Thu Mar 11, 2010 4:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// Crunchy beat
Step s=>Gain g=>dac;Phasor p=>g;PulseOsc q=>blackhole;q.freq(1);p.freq(-4);g.op(3);q.width(0.75);q.phase(0.25);while(1){Std.rand2(-1, 1)=>s.next;((q.last()+2)*10)::samp=>now;};
Back to top
View user's profile Send private message
spencer



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

PostPosted: Thu Jan 06, 2011 5:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hello everyone! I have long been a fan of this forum discussion and the one-line chuck crazy aesthetic. Inspired by this thread, a Stanford CCRMA homework assignment[1], and something similar I heard about in the SuperCollider world, I have created a community-driven Twitter account for the express purpose of broadcasting meaningful, self-contained ChucK programs that fit into a single tweet.

The programs tweeted from this account will be based on submissions from folks like yourselves. I will be acting in a limited curatorial role due to the nature of this sort of thing, but the goal is really to get as many interesting programs from as many people as possible.

Without further ado:
http://twitter.com/TweecKs

To submit your program, simply tweet it to @TweecKs. You can also send me a private message through this forum, or send me an email: spencer at ccrma.stanford.edu. If you send me a PM or email, please make sure your program is 140 characters or less, including a block comment with a credit (if desired).

There aren't any guidelines as far as quality; as long as it runs, makes sound, and doesn't do anything apparently malicious to people's computers, its good.

And, if you are a Twitter user, do consider following @TweecKs, to stay up-to-date on the latest in concise audio programming!

Finally, I'm happy to tweet any of the programs that have already appeared in this thread, if you want -- just let me know.

[1] https://ccrma.stanford.edu/wiki/220b-winter-2011/hw0#Specification_.28part_2_of_2.29:_ChucKu.27s
Back to top
View user's profile Send private message
jkant



Joined: Dec 14, 2013
Posts: 7
Location: Milan, Italy

PostPosted: Sun Dec 15, 2013 10:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi,
I found this thread by accident, WOW...
Love this 'minimal aesthetic' and every single bit here!
Up for the newcomers (like me).

Btw, I wanted to try it myself, sorry if maybe it is too trivial.


Code:

// Mr. Coleman by jkant
SawOsc s=>Pan2 p=>dac;while(1){Math.random2f(0,1)=>float r;(r>.5?-1:1)=>p.pan;r*500=>s.freq;99::ms=>now;}

_________________
Random Bitz
Back to top
View user's profile Send private message Visit poster's website
Mr Theremin



Joined: Mar 22, 2008
Posts: 21
Location: Ohio

PostPosted: Fri Mar 07, 2014 3:18 pm    Post subject:  
Subject description: OK, I know that I should be working. But I couldn’t resist.
Reply with quote  Mark this post and the followings unread

OK, I know that I should be working. But I couldn’t resist.

Code:


//Haunted Thumb Piano

BandedWG s=>dac;[0,2,7,9,11]@=>int hi[];while(1){Std.mtof(33+Math.random2(0,3)*12+hi[Math.random2(0,4)])=>s.freq;s.noteOn(Math.random2(1,4));140::ms=>now;}

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 5 of 5 [121 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3, 4, 5
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
AmbiphonicDSP

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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