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 
 Forum index » DIY Hardware and Software » ChucK programming language
Beautiful Patches for a whole good New Year 2009
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [17 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
kijjaz



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

PostPosted: Fri Jan 09, 2009 3:27 am    Post subject: Beautiful Patches for a whole good New Year 2009 Reply with quote  Mark this post and the followings unread

I just wanted to code a little patch that's nice to listen to,
so i'd like to share & maybe we'll celebrate our good times in this nice community also.

Code:
// Thank You, ChucK community, by Kijjasak Triyanond (kijjaz@yahoo.com)
// This software is protected by GNU License.
// Feel free to use, modify, distribute.

[2, 3, 4, 5, 6] @=> int Intervals[];
440 => float BaseFreq;

Clarinet s[3];
NRev rev => dac;
s[1] => Delay d => dac;
d => Gain d_g => d;
.2 => rev.gain;
.4 => rev.mix;
.4 => d.gain;
second => d.max;
750::ms => d.delay;
1 => d_g.gain;

for(int i; i < 3; i++)
{
    s[i] => rev;
}

int melody[16 + 3];

while(true)
{
   
    for(int i; i < melody.cap(); i++)
    {
        Intervals[Std.rand2(0, Intervals.cap()-1)] => melody[i];
    }
   
    for(int t; t < 16; t++)
    {
        BaseFreq * melody[t] / melody[t+1] => s[0].freq;
        s[0].freq() * melody[t+1] / melody[t+2] => s[1].freq;
        s[1].freq() * melody[t+2] / melody[t+3] => s[2].freq;
       
        s[0].noteOn(.5); s[1].noteOn(.5); s[2].noteOn(.5);
       
        50::ms => now;
       
        s[0].noteOff(.5); s[1].noteOff(.5); s[2].noteOff(.5);
       
        450::ms => now;
    }
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
telstarmagikistferrari



Joined: Jun 16, 2008
Posts: 280
Location: Indianapolis, Indiana
Audio files: 43

PostPosted: Fri Jan 09, 2009 3:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Listening right now.. very nice.

Tasteful gesture. If you don't mind maybe I'll add to this thread in a couple hours.

Thanks..
Mark
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Fri Jan 09, 2009 7:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice work, kijjaz! Did you ever meet Andy of Ultimarc and get your accelerometer?
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
rogan



Joined: Dec 16, 2007
Posts: 83
Location: Urbana, IL
Audio files: 5

PostPosted: Fri Jan 09, 2009 8:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice! I'm enjoying listening to this on an endless loop.

Happy New Year!!!
Back to top
View user's profile Send private message
Rinko



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

PostPosted: Sat Jan 10, 2009 5:50 am    Post subject: Reply with quote  Mark this post and the followings unread

yeah, cheers kijjaz!

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



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

PostPosted: Sun Jan 11, 2009 2:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks. Let's add more beautiful songs heeheh.

Inventor: hmmm i haven't re-contacted Andy.
i must hurry -_-".
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Jan 11, 2009 3:31 am    Post subject: Reply with quote  Mark this post and the followings unread

I'll tell you what kijjz, I was saving this one for myself, but since you requested cool patches, I'll post it. It's my KNoW wave song generator! Stretch your command window really tall like the whole screen height for this one. Here is an example of the screen output:

Code:
KNoW:  Kijjaz No Wave 
Let's make noise for peace. - kijjaz 
 
---Logic Table 
  0  1  0  0  1  0  0  1  1  0  1 
  0  0  0  1  1  0  0  0  0  1  1 
  1  0  1  0  0  0  0  0  0  1  1 
  0  1  0  1  0  1  0  1  1  0  1 
  0  0  1  0  0  1  1  0  0  1  1 
  1  0  1  0  0  1  1  0  0  1  1 
  0  0  0  0  0  1  0  1  1  0  1 
  0  0  0  0  0  0  0  1  1  0  0 
  0  0  0  0  0  1  0  0  1  1  1 
  0  0  0  1  0  0  0  0  1  1  1 
 
---Timing Parameters 
fbase:  64
guitar base note = 20
sax base note = 20
octaves = 3
scale = blues 1 
tempo:  7
 
---Guitar Parameters 
strength = 0.886774
numStrings = 1
stringDamping = 0.806833
bodySize = 0.316999
stringDetune = 0.490838
gain = 0.744906
 
---Drum Parameters 
bass drum gain = 0.344377
snare drum gain = 0.947691
 
---Sax Parameters 
stiffness: 0.484193
aperture: 0.502644
noiseGain: 0.887893
blowPosition: 0.688699
vibratoFreq: 5.123594
vibratoGain: 0.383364
pressure: 0.200150
gain = 0.922827
 
"return:  restart song" : (string)
"l:  generate new logic table" : (string)
"f:  generate new frequency" : (string)
"t:  generate new timing" : (string)
"g:  generate new guitar" : (string)
"s:  generate new sax" : (string)
"n:  generate new note scale" : (string)
"d:  generate new drums" : (string)
Output File:  KNoW.wav
 
song recorded 


When you run KNoW wave it starts playing a randomly generated song. You will not like some of the instruments as they may be quiet or inharmonious, so that's where the menu options come into play. Press keys of the menu selection (at the bottom of the screen) to randomly generate new song parameters, then press return to begin the song again. When the song ends, the program ends and writes the output to your directory.

The program has kijjaz's guitar and drums in it, so it is only fitting to honor kijjaz by posting the source code in his new year's thread.

Let's make noise for peace!


Know_Wave6.ck
 Description:
The KNoW wave source code

Download
 Filename:  Know_Wave6.ck
 Filesize:  15.78 KB
 Downloaded:  778 Time(s)


KNoW_Octaves.mp3
 Description:
An example KNoW song

Download
 Filename:  KNoW_Octaves.mp3
 Filesize:  2.56 MB
 Downloaded:  1304 Time(s)


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



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Sun Jan 11, 2009 6:57 am    Post subject: Reply with quote  Mark this post and the followings unread

This turned out a bit long. Anyway, allt the best wishes for you all in 2009!

Code:
// Thank you too, here's for a pleasant-sounding 2009!
// by Stefan Blixt

[
[4,7,-1],
[3,7,-1],
[5,7,-1],
[4,5,-1],
[4,7,11],
[3,7,11],
[5,7,11],
[4,5,11],
[4,7,10],
[3,7,10],
[5,7,10],
[4,5,10]
] @=> int choffsets[][];

Echo echoLeft => Chorus chorusLeft => dac.left;
Echo echoRight => Chorus chorusRight => dac.right;
echoLeft => Gain feedbackLeft => echoRight;
echoRight => Gain feedbackRight => echoLeft;
0.5 => feedbackLeft.gain;
0.5 => feedbackRight.gain;
550::ms => echoLeft.max;
560::ms => echoRight.max;
500::ms => echoLeft.delay;
510::ms => echoRight.delay;
1.0 => echoLeft.mix;
1.0 => echoRight.mix;
5.0 => chorusLeft.modFreq;
0.002 => chorusLeft.modDepth;
5.3 => chorusRight.modFreq;
0.002 => chorusRight.modDepth;

0 => int choffsetIndex;
0 => int choffset;
50 => int currentTone;
50 => int baseTone;

fun int getNewTone() {
   choffsets[choffset][choffsetIndex++] => int newToneOffset;
   if (choffsetIndex > 2 || choffsets[choffset][choffsetIndex++] == -1) {
      0 => choffsetIndex;
      if (Std.rand2(0,3) == 0) {
         Std.rand2(0,11) => choffset;
      }
   }
   -1 => int direction;
   if (currentTone < 36) {
      1 => direction;
   } else if (currentTone < 75) {
      if (Std.randf() > 0) {
         1 => direction;
      }
   }
   newToneOffset * direction + baseTone => currentTone;
   if (Std.rand2(0,10) == 0) {
      currentTone => baseTone;
   }
   return currentTone;
}

Event toneSignal;
fun void soundMaker() {
  BlitSaw saw => Envelope env => Gain left => echoLeft;
  env => Gain right => echoRight;
  5 => saw.harmonics;
  0.25 => env.gain;
  while (true) {
     toneSignal => now;
     getNewTone() => int tone;
     Std.randf() => left.gain;
     Std.randf() => right.gain;
     Std.mtof(tone) => saw.freq;
     Std.rand2(1,4) * 300::ms => dur envTime;
     envTime => env.duration;
     env.keyOn();
     envTime + 300::ms => now;
     toneSignal.signal();
     env.keyOff();
     envTime => now;
  }
}

for (0 => int i; i < 8; i++) {
   spork ~ soundMaker();
}

for (0 => int i; i < 4; i++) {
   toneSignal.signal();
   300::ms => now;
}

while(1::day => now) {
}


/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
telstarmagikistferrari



Joined: Jun 16, 2008
Posts: 280
Location: Indianapolis, Indiana
Audio files: 43

PostPosted: Wed Jan 14, 2009 12:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Love the patch Stefan! awesome sounds. Just the sort of shred(s) I like to leave on for a half-hour or so til it starts sounding more and more different per 'pass.' Exclamation
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Wed Jan 14, 2009 2:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow, this one sounds really cool, Stefan! Listening to it now. It has a really electro-music.com feel to it. Very trippy and... kind of Haloweenish. What I would do is save it for next October and then put it on the loudspeakers and krank it up to give your home that super-ghoulish sound. Or am I missing the point? That would not be unusual. It makes me think of spider webs and ghouls and ghosts! Haha, cheers!
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Wed Jan 14, 2009 3:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks! Very Happy

Typical though - I try to make something pretty and all it makes folks think about is ghouls and ghosts. Wink

/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
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Wed Jan 14, 2009 3:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, Stefan, that was just the impression of a disturbed individual, myself. If it's any consolation, how shall I say this discretely... you're leading the pack in another thread (hint hint).
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Wed Jan 14, 2009 4:30 am    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
Well, Stefan, that was just the impression of a disturbed individual, myself.


Possibly, but its just as much the result of my hacking - I often start out wanting to do something and end up doing something else. 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
kijjaz



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

PostPosted: Fri Jan 30, 2009 4:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

today i've got this sound and would like to share with you all again.
this is so hypnotizing hahah..

Code:
// Seq Drone no. 01 31/01/2009 by Kijjasak Triyanond (kijjaz@yahoo.com)
// This software is protected by GNU License.
// Feel free to use, modify, distribute.

55.0 => float BaseFreq;
3.0 => float FilterMod;
12.0 => float SoundVariation;
.1 => float SweepingLFOFreq;

SinOsc lfo1 => blackhole;
SweepingLFOFreq => lfo1.freq;

Step freq => Phasor s1 => Gain s1_g;
3 => s1_g.op;

freq => s1_g;
freq => SinOsc s2 => NRev rev1 => LPF s2_f => PRCRev rev2 => dac;
s1_g => s2;

.8 => rev1.mix;
2 => s2_f.Q;
.05 => rev2.mix;
.5 => rev2.gain;

.1 => s2.gain;

int i;
while(true)
{
    ((i * 5) % 8 * BaseFreq + BaseFreq => freq.next) * FilterMod => s2_f.freq;
    100::ms => now;
    i++;
    Math.floor(lfo1.last() * SoundVariation) => s1_g.gain;
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Fri Feb 13, 2009 6:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just installed the mini .. that is a recent version of it ... then listened here, some fine noodles these, all of 'm really.
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
telstarmagikistferrari



Joined: Jun 16, 2008
Posts: 280
Location: Indianapolis, Indiana
Audio files: 43

PostPosted: Fri Feb 13, 2009 7:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

speaking of
Quote:
Math.floor(lfo1.last() * SoundVariation) => s1_g.gain;

I'm floored Kijaz.. awesome work.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
kijjaz



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

PostPosted: Fri Feb 13, 2009 9:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

ohh... hmm. floored.
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 1 [17 Posts]
View unread posts
View new posts in the last week
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