electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks GalleryGallery 
 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 2 of 2 [42 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
Author Message
Kassen
Janitor
Janitor


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

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

Chuckles; nearly everything can read .txt files, not just Windows. Plain text is by far the safest format to use if you have no idea what the other guy is using (but can't rule out Atari's, Amigas, etc). ChucK can run .txt files just fine too, no need to rename.

Kijjaz; I realy love what you are doing and I'd like to join in but one line is so very short. I tried but wasn't able to come up with anything post-worthy.

_________________
Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Wed Jun 27, 2007 9:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// Space trip to 3n+1 planet
SinOsc s=>dac; for(int i;1;<<<i>>>) for(i=>int j;(j=>s.freq)>1;ms=>now) if(j%2==0) 4/=>j; else 3*j+1=>j;


Changing 3*j + 1 to 5*j + 1 yeilds very great sounding result. Embarassed
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: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Fri Jun 29, 2007 3:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Play this (not too soft!), sit back, and relax..

Code:
// 15-minute nervous system massage session
Noise a => LPF b => ZeroX c => dac; b.set(4, 1); 15::minute => now;


err.. is this unhealthy for large speakers?
Let's use a headphone ^_^

hmm maybe also not healthy for ear -_-"
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
skwrKing



Joined: Jul 24, 2007
Posts: 14
Location: MI

PostPosted: Mon Aug 20, 2007 8:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

The code is probably not too interesting as I'm still very new to ChucK, but I thought it sounded interesting enough to share.

Code:
SinOsc s => dac; 1 => int i; while(30::ms => now){(i%100)*9*(i%99) => s.freq;i--;}


Now I'm rather addicted to this one-line game, so I might be back with more.
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Thu Nov 08, 2007 10:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm back with more noises.
this feedback loop sounds good but different at different sample rates.
it generates some sequences of evolving sound apttern cycles all the time.

i'm listening to it at 44100 sample rate.
it kinda produces some silent gaps also. it sounds more complex then.

Code:
// kijjaz:I thought my jack was not well-connected
dac => Phasor a => SinOsc b => dac; a.phase(.5); a.gain(3000); 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: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Mon Jun 30, 2008 5:03 am    Post subject: Reply with quote  Mark this post and the followings unread

I've decided to collect some more ideas,
maybe very simple, but fun to do, for the one-line chuck.
so here it goes:

feel free to join and make more cute noodles (patches).

Code:
// ZeroX Hi Hats
Noise a => ZeroX b => dac; Phasor c => b; 4 => c.freq; second => now;


Code:
// ZeroX PWM impulse synth
SawOsc a => ZeroX b => dac; TriOsc c => b; 110.1 => c.freq; hour => now;


Code:
// ZeroX PWM squarewave synth
SawOsc a => ZeroX b => Gain c => c => dac; TriOsc d => b; 110.1 => d.freq; hour => now;


Code:
// ZeroX frog (tried at 44.1khz, 48.0khz sample rate)
SinOsc a => ZeroX b => dac; while(4.51::samp => now) b.last()*b.last() - a.freq() => a.freq;


Code:
// modified from above, this can sing quite beautifull
SinOsc a => ZeroX b => dac; while(400.1::samp => now) b.last()*b.last()*311 - a.freq() => a.freq;


Code:
// Bossanova ZeroX
SinOsc a => ZeroX b => dac; while(20.1::samp => now) b.last()*b.last()*10000 - a.freq() => a.freq;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Mon Jun 30, 2008 7:18 am    Post subject: Reply with quote  Mark this post and the followings unread

This one sounds like a motorcycle and varies its revving pattern over time:

Code:
Noise n => SinOsc a => SinOsc b => SinOsc c => dac; c => a; c => b; b => a;
a.gain(1.1); b.gain(125); c.gain(3); day => now;


Vroom! Vroom! Very Happy

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Mon Jun 30, 2008 8:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
// someone dropped something?
Impulse a => Chorus b => b => Chorus c => c => dac; a.next(1); minute => now;


Code:
// Racing Car's Vibrato
SqrOsc a => SinOsc b => TriOsc c => a => dac; a.sync(2); b.gain(20); hour => now;


Code:
// Sorry... wrong number -_-
SinOsc a => dac; while(70::ms => now) now%second/ms * a.phase() - a.freq() => a.freq;


Code:
// PRESS SELECT
SawOsc a => dac; while(100::ms => now) now%second/ms * a.phase() - a.freq() => a.freq;


Code:
// how long is the reverb? (try with other kinds of reverb also)
Impulse a => NRev b => ZeroX c => dac; a.next(1); hour => now;


Code:
// Take Cover! ChucK fights back!!
Impulse a => LPF b => dac; a.next(1); b.set(-100000, 1000); hour => now;
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Kassen
Janitor
Janitor


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

PostPosted: Mon Jun 30, 2008 4:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

I love how "press select" does something slightly different every time yet it all fits the name.

Last one is best for me, really old-school video game boss-explosion; Be attitude for gains!

Go Kijjaz!

_________________
Modern technology offers an endless field day to any deviant strains in our personalities. --J.G.Ballard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Mon Jun 30, 2008 6:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here is a fun one, it's a musical instrument that goes "Boing" when you touch the microphone:

Code:
// touch the microphone to play the instrument (adjust volume to prevent feedback)
adc => BPF f => dac; f.freq (85); f.Q (50); f.gain (100); day => now;


Kijjaz is the master of one-liners, but I have some creativity also! haha!

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Mon Jun 30, 2008 6:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here is a very simple one, it is just a SinOsc in a feedback loop with the speakers and mic. Very interactive.

Code:
// feedback, play with volume, touch microphone, whistle into microphone
adc => SinOsc s => dac; adc.gain(85); day => now;


Adjust microphone to medium and it will sing a sad song of woe.

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Mon Jun 30, 2008 6:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

This one will sound like you are playing an arcade game from the 80's and will also vocode your voice (once you get the volume adjusted properly)

Code:
// ChucKtastic Vocoder inside of arcade game
adc => PitShift p => dac; adc.gain(10); p.mix (1); p.shift (1.2); day => now;


Try whistling or talking or just typing on the keyboard. Neato! I like this microphone feedback stuff!

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Mon Jun 30, 2008 7:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

This one is just a change of the previous one, but it produces a very good demonic vocoder effect. Sounds like you're a demon or something. Spooky, I may use it in a song.

Code:
// Demonic Vocoder
adc => PitShift p => dac; adc.gain(10); 1 => p.mix; p.shift (0.8); day => now;

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kijjaz



Joined: Sep 20, 2004
Posts: 463
Location: bangkok, thailand
Audio files: 2

PostPosted: Mon Jun 30, 2008 8:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kassen: Thanks! ^_^ I'm loving it hahaha..

Inventor: wow.. yes these ones you did is cool for dealing with acoustic feedback of its own patch ^_^..

i'd like to play more with this simple one:

Code:
// Big Boss and his Eyeballs
Impulse a => LPF b => dac; a.next(1); b.set(-10001, 1000); hour => now;


now i'm gonna change the b.set freq and Q value.
The sample rate used is 44100
b.set(-696969, 869); // a lone motorcycle with no owner
b.set(-15000, 1000); // charging.. (for final blow)
b.set(-5999, 9999); // final blow!!! ahh.. missed -_-"
b.set(-2000, 9999); // warping back to base station
b.set(-1100, 6000); // summoning the Legendary Sword
b.set(-999999, 99999); // using the Legendary Sword to chop an onion
b.set(-21000, 99999); // head-chopping
b.set(-12700, 100); // STOP COOKING! we've got company
b.set(-12900, 100); // running...
b.set(-11400, 200); // They've got a Tank!!
b.set(-11800, 200); // Planet's polyrhythmic military marching band
b.set(-11800, 200); // The Marching Band run for their lives (always)
b.set(-10200, 120); // the tank fires..
b.set(8000, -1); // i'm invincible!!
b.set(-12000, -1); // The Legendary sword is powerful!!
b.set(-6969, -1); // kill!
b.set(-1000000, -1); // a drop of blood
b.set(-100500, -1); // keep punching
b.set(-101400, -1); // Kung-fu punching
b.set(-5555, 3000); // enough for today -_-
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Rinko



Joined: Jun 03, 2008
Posts: 13
Location: UK

PostPosted: Tue Jul 01, 2008 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

this is really fun!

great idea and has intrduced me to some fundamentally different ways of using ChucK.

thank you!

p.s. hopefully will post something soon but my efforts so far have been poor
Back to top
View user's profile Send private message
Inventor



Joined: Oct 13, 2007
Posts: 1310
Location: Florida, USA
Audio files: 50

PostPosted: Tue Jul 01, 2008 6:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Rinko, I have had some success with the following one-liner approach:

Code:
adc => some_ChucK_thing => dac; adc.gain(10); day => now;


It works with an audio feedback loop and produces interesting effects. Just change some_ChucK_thing into something creative and give it a try. Good luck!

_________________
@(ºoº)@ ><}}}º> ~(^.^) <:3 )~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rinko



Joined: Jun 03, 2008
Posts: 13
Location: UK

PostPosted: Thu Jul 03, 2008 1:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

cheers Inventor, just having a play with that now!

if only I could ChucK all day instead of work...hmmm

still aiming for something postworthy!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 2 of 2 [42 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
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

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, 2004, 2005, 2006 and 2007 by electro-music.com