| Author | Message | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Wed Sep 24, 2008 5:29 am    Post subject: |    |   
| 
 |  
| OK, that worked, thanks kijjaz.  Here is the test code to try out the drum set: 
 
  	  | Code: |  	  | // Kijjaz's drum set Impulse trigL => LPF toneL => SinOsc driveL => dac; toneL.set(50, 30); 1 => driveL.sync;
 Impulse trigL2 => LPF toneL2 => SinOsc driveL2 => dac; toneL2.set(160, 30); 1 => driveL2.sync;
 Impulse trigB => BPF toneB => SinOsc driveB => dac; toneB.set(2000, 100); 1 => driveB.sync;
 Impulse trigH => HPF toneH => SinOsc driveH => dac; toneH.set(2000, 100); 1 => driveH.sync;
 while (true) {
 50 => trigL.next;
 second => now;
 50 => trigL2.next;
 second => now;
 50 => trigB.next;
 second => now;
 50 => trigH.next;
 second => now;
 }
 
 | 
 _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| Rinko 
 
 
 Joined: Jun 03, 2008
 Posts: 38
 Location: UK
 
 | 
|  Posted: Wed Sep 24, 2008 3:14 pm    Post subject: |    |   
| 
 |  
| hehe that's a wicked idea - tried to come up with a contribution to the kit. instead i got this. its not drum like at all but does start to sound like a merzbow track after a short while   
 
  	  | Code: |  	  | Impulse i => Noise n => SawOsc s => HPF f => dac; f.set (500, 200); s.sync (); | 
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Wed Sep 24, 2008 4:16 pm    Post subject: |    |   
| 
 |  
| Rinko: i tried to simplify your patch above. it should build the same sound. 
 
  	  | Code: |  	  | Noise n => SawOsc s => HPF f => dac; f.set (500, 200); day => now; | 
 i made some modification just for fun:
 
  	  | Code: |  	  | Noise n => SawOsc s => s => HPF f => dac; f.set (400, 300); day => now; | 
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Wed Sep 24, 2008 4:25 pm    Post subject: |    |   
| 
 |  
|  	  | Code: |  	  | // still afraid of the dentist? Step a => Phasor b => b => SinOsc c => b => dac; -200 => a.next; 250 => b.gain; day => now;
 | 
 |  | 
| Back to top |  | 
 
|  | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Sat Mar 28, 2009 5:40 pm    Post subject: |    |   
| 
 |  
| Just dug up this cool thread for my ChucK internet radio show.  Gonna go through it and collect the best ones.  Any suggestions?  Any favorites? _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Mon Apr 06, 2009 9:35 am    Post subject: |    |   
| 
 |  
|  	  | Code: |  	  | //Crackling, no randomization! Step s => dac; .5 => s.gain; float x; while(samp => now) Math.sin(x * 5.414369 + 1) => x => s.next;
 | 
 
 
  	  | Code: |  	  | // Crackling, more grounded. Step s => dac; .5 => s.gain; float x; while((maybe*40+6)::samp => now) Math.sin(x * 5.414369 + 1.19972) => x => s.next;
 | 
 
 
  	  | Code: |  	  | // Crackling, sandy. Step s => dac; .001 => s.gain; float x; while(samp => now) Math.tan(x * .09 + 1) => x => s.next;
 | 
 |  | 
| Back to top |  | 
 
|  | 
 
| sarigama 
 
 
 Joined: Mar 01, 2009
 Posts: 3
 Location: tokyo, japan
 
 | 
|  Posted: Tue Apr 07, 2009 6:57 am    Post subject:
is there a way to play this one-line without any file Subject description: | chuck or > chuck? something like that?
 |    |   
| 
 |  
| some supercollider users are now twitting one-line and others can copy it from twitter and paste it his editor ... and listen ... will chuck user always have to create a file first?
 if it's one line
 maybe there's a way to avoid creating a file?
 _________________
 podcasting:
 http://sarigama.namaste.jp/podcast/rss.xml
 |  | 
| Back to top |  | 
 
|  | 
 
| BobTheDog 
 
  
 Joined: Feb 28, 2005
 Posts: 4044
 Location: England
 Audio files: 32
 G2 patch files: 15
 
 | 
|  Posted: Tue Apr 07, 2009 7:32 am    Post subject: |    |   
| 
 |  
|   
 Well I am not a chuck expert but you can do the same thing using Audicle.
 |  | 
| Back to top |  | 
 
|  | 
 
| Kassen Janitor
 
  
  
 Joined: Jul 06, 2004
 Posts: 7678
 Location: The Hague, NL
 G2 patch files: 3
 
 | 
|  Posted: Tue Apr 07, 2009 10:09 am    Post subject:
Re: is there a way to play this one-line without any file Subject description: | chuck or > chuck? something like that?
 |    |   
| 
 |  
|  	  | sarigama wrote: |  	  | some supercollider users are now twitting one-line and others can copy it from twitter and paste it his editor ... and listen ... will chuck user always have to create a file first?
 if it's one line
 maybe there's a way to avoid creating a file?
 | 
 
 Welcome on board.
 
 As the previous poster pointed out; we do have a editor with integrated VM that can run code from editor buffers.
 
 Another option would be to type "chuck --shell" at your terminal. The idea of --shell is to be able to enter into a direct dialogue with the VM, this is still in a rather "alpha" stage but there you can enter simple code without the need for any external programs and indeed without a graphics server. I wouldn't recommend that as a very practical thing right now but you can if you really want to.
 _________________
 Kassen
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Tue Apr 07, 2009 11:45 pm    Post subject: |    |   
| 
 |  
| Yes.. running a ChucK code especially a one-line in command line is quite comfortable. Just like Kassen said, just go into ChucK shell, then on ChucK prompt, open with a { then just code the thing in, then close with } and enter. You'll hear it running. Normally it'd be shred (thread) number 1. Use this command "- 1" to remove shred number 1 in case you want to stop the running program.
 |  | 
| Back to top |  | 
 
|  | 
 
| sarigama 
 
 
 Joined: Mar 01, 2009
 Posts: 3
 Location: tokyo, japan
 
 | 
|  Posted: Thu Apr 09, 2009 3:57 am    Post subject:
yes Subject description: just will report that
 |    |   
| 
 |  
| chuck %> {Noise a => BPF f => dac; for(1 => int x; x <360> now; }} chuck %> [chuck](VM): sporking incoming shred: 1 (chuck_file.yodt1g)...
 
 worked!! great! thax
 i think i will dig this style
 i once thought that this is good when you are doing things on x-less cui (vt) ..
 but yes then .. no handy copy'n'paste
 so most of the things has to be in your brain for sure ..
 
 hmm .. maybe there's a way to | a line from vim to chuck --shell
 directly from its editing mode .. ?
 mean something like scvim ..
 _________________
 podcasting:
 http://sarigama.namaste.jp/podcast/rss.xml
 |  | 
| Back to top |  | 
 
|  | 
 
| sarigama 
 
 
 Joined: Mar 01, 2009
 Posts: 3
 Location: tokyo, japan
 
 | 
|  Posted: Thu Apr 09, 2009 5:15 am    Post subject:
yes Subject description: reporting that
 |    |   
| 
 |  
| it worked on my intrepid 
 chuck %> {Noise a => BPF f => dac; for(1 => int x; x <360> now; }}
 chuck %> [chuck](VM): sporking incoming shred: 1 (chuck_file.2hQP4S)...
 ^C[chuck]: cleaning up...
 
 then there might be a way to | a line directly from vim's edit mode .. just like scvim?
 _________________
 podcasting:
 http://sarigama.namaste.jp/podcast/rss.xml
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Thu Apr 09, 2009 5:53 am    Post subject: |    |   
| 
 |  
| hmm.. that'd be interesting, so you can make other program generate chuck code also. i never tried that before.   
 oh, by the way, i'd like to post some one-line codes on Twitter sometimes. what tag should I use? #chuck seems too common. how about #chucklang ?
 
 if you all are on twitter, follow me at @kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Sun Apr 12, 2009 1:28 pm    Post subject: |    |   
| 
 |  
| This is one is quite long.. too long actually, but it sounds so nice for me i wanted to post it here.
 
 
  	  | Code: |  	  | // Digital Major Thingy Step s => dac; float x; while(samp => now) { ((x * 7 + (now / 125::ms) $ int % 64) % 30000 => x) / 15000 - 1 => s.next; }
 | 
 
 
  	  | Code: |  	  | // Glistering Thingy Step s => dac; float x; while(samp => now) { ((x * 99 + (now / 125::ms) $ int % 64) % 30000 => x) / 15000 - 1 => s.next; }
 | 
 
 
  	  | Code: |  	  | // Rotating Robotic Thingy Step s => dac; float x; while(samp => now) { ((x * 501 + (now / 125::ms) $ int % 64) % 30000 => x) / 15000 - 1 => s.next; }
 | 
 
 
  	  | Code: |  	  | // Another Must-post Thingy Step s => dac; int x; while(samp => now) { ((x * 49 + (now / 50::ms) $ int % 64) % 30000 => x) / 15000 - 1 => s.next; }
 | 
 
 Chaotic Duo!
 
 
  	  | Code: |  	  | // Chaotic Duo! Step s => dac; float x, y; while(samp => now) { (((x * pi => Math.cos) + y => y => Math.cos) + x => x) * y => s.next; }
 | 
 
 
  	  | Code: |  	  | // Visualizing the Chaotic Duo. SinOsc s => dac; float x, y; while(samp => now) { (((x * pi => Math.cos) + y => y => Math.cos) + x => x) * y => s.freq; }
 | 
 
 Another duo..
 
  	  | Code: |  	  | // Modulo together.. SinOsc s => dac; float x, y; while(20::ms => now) { (x * 19 + y) % 256 => x; (y * 7 + 1) % 64 => y; x * y => s.freq; }
 | 
 |  | 
| Back to top |  | 
 
|  | 
 
| cebec 
 
  
 Joined: Apr 19, 2004
 Posts: 1100
 Location: Virginia
 Audio files: 3
 G2 patch files: 31
 
 | 
|  Posted: Sun Apr 12, 2009 4:38 pm    Post subject: |    |   
| 
 |  
| Brutal kijjaz, I like it! |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Mon Apr 13, 2009 10:42 am    Post subject: |    |   
| 
 |  
| Ahhh!! Thanks a lot cebec. I've got another chick to post tonight:
 
 
  	  | Code: |  	  | // Egg Factory Step a => dac; int x; while(samp => now) (a.last() * 40000 / (x % 7500/1000 + 1) + x++) % 20000 / 10000 - 1 => a.next;
 | 
 
 
  	  | Code: |  	  | // Accidentally Hatched Step a => dac; int x; while(samp => now) (a.last() * 8001 / (x % 3750/1000 + 1) + x++) % 20000 / 10000 - 1 => a.next;
 | 
 
 
  	  | Code: |  	  | // Phone Ring Step a => dac; int x; while(samp => now) (a.last() * 80000 / (x % 3000/1000 + 1) + x++) % 20000 / 10000 - 1 => a.next;
 | 
 
 
  	  | Code: |  	  | // Egg Factory Error Step a => dac; int x; while(samp => now) (a.last() * 80000 / (x % 11000/4000 + 1) + x++) % 20000 / 10000 - 1 => a.next;
 | 
 Last edited by kijjaz on Mon Apr 13, 2009 12:11 pm; edited 1 time in total
 |  | 
| Back to top |  | 
 
|  | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Mon Apr 13, 2009 11:29 am    Post subject: |    |   
| 
 |  
| I'm going to play a few of these one-liners on The ChucK Show this Friday at 23:00 - 00:00 GMT. _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| cebec 
 
  
 Joined: Apr 19, 2004
 Posts: 1100
 Location: Virginia
 Audio files: 3
 G2 patch files: 31
 
 |  | 
| Back to top |  | 
 
|  | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Sun May 24, 2009 6:05 am    Post subject: |    |   
| 
 |  
| At Jan's suggestion, we decided to make the theme of next week's ChucK Show be one-liners.  I went through and tried basically all of them.  Some didn't work because of html tags and some were too harsh sounding for my taste, however I did get 41 one liners to use in the show.  That should pretty much do the job!  Cheers! 
 Les
 
 p.s. thanks for the thread kijjaz and all!
 _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| kijjaz 
 
  
 Joined: Sep 20, 2004
 Posts: 765
 Location: bangkok, thailand
 Audio files: 4
 
 | 
|  Posted: Sun May 31, 2009 5:29 pm    Post subject: |    |   
| 
 |  
| Another of my favourite. Very simple, and cute. 
 
  	  | Code: |  	  | // what a bird .. (successfully at sample rate = 44100) SqrOsc s1 => Gain g => g => SinOsc s2 => g; s2 => dac; 20 => s1.freq; day => now;
 | 
 
 
  	  | Code: |  	  | // super 8-bit bouncing ball SinOsc s1 => Gain g => g => SqrOsc s2 => g; s2 => dac; -.01 => s1.freq; day => now;
 | 
 |  | 
| Back to top |  | 
 
|  | 
 
| Kassen Janitor
 
  
  
 Joined: Jul 06, 2004
 Posts: 7678
 Location: The Hague, NL
 G2 patch files: 3
 
 | 
|  Posted: Tue Jul 14, 2009 10:20 am    Post subject: |    |   
| 
 |  
| Not such a interesting sound but the technique is quite cool, I think, and stereo signals can be squeezed into 80 characters (barely). 
 
  	  | Code: |  	  | Noise n=>dac.left;Noise m=>dac.right;int i;while(++i){0=>Std.srand;i*samp=>now;} | 
 _________________
 Kassen
 |  | 
| Back to top |  | 
 
|  | 
 
| Kassen Janitor
 
  
  
 Joined: Jul 06, 2004
 Posts: 7678
 Location: The Hague, NL
 G2 patch files: 3
 
 | 
|  Posted: Tue Jul 14, 2009 10:59 am    Post subject: |    |   
| 
 |  
| Purring waves. 
 
  	  | Code: |  	  | SubNoise s=>dac;int n;while(++n%241+1=>s.rate){(n%83)*ms+ms=>now;5=>Std.srand;} | 
 
 I like Std.srand()
 _________________
 Kassen
 |  | 
| Back to top |  | 
 
|  | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Tue Jul 14, 2009 11:04 am    Post subject: |    |   
| 
 |  
| Kas, that one gets my vote for One-Liner-of-the-Year!  Wow!  It's like a Star Trek Phasor or something.  Most excellent.  Will appear on the next ChucK Show for sure. _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
| Kassen Janitor
 
  
  
 Joined: Jul 06, 2004
 Posts: 7678
 Location: The Hague, NL
 G2 patch files: 3
 
 | 
|  Posted: Tue Jul 14, 2009 11:10 am    Post subject: |    |   
| 
 |  
| I'm loving this one as well, and I really like this technique now. Do you get how it works? It's funny, I'm not spoiling the game while some people might still be trying to figure it out. 
 Edit; this is what that last one looked like before I cut it down to line-size. It's a bit more "musical". Warning; severe syntax abuse ahead....
 
  	  | Code: |  	  | SubNoise n => dac;
 
 while(1)
 {
 ((now/2::second)$int)%8 + 2 => n.rate;
 now%250::ms+ms=>now;
 5 => Std.srand;
 }
 | 
 _________________
 Kassen
 |  | 
| Back to top |  | 
 
|  | 
 
| Inventor Stream Operator
 
  
 Joined: Oct 13, 2007
 Posts: 6221
 Location: near Austin, Tx, USA
 Audio files: 267
 
 | 
|  Posted: Tue Jul 14, 2009 11:42 am    Post subject: |    |   
| 
 |  
| Now you're getting too crazy for me - I like the first one better.  I don't get the technique, but let's let someone else figure it out, a little game shall we say?  I mean, you posted your code openly so the secret is out yet I cannot fathom it.  Well done Kas! 
 Les
 _________________
 "Let's make noise for peace." - Kijjaz
 |  | 
| Back to top |  | 
 
|  | 
 
|  |