Author |
Message |
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Mon Feb 26, 2007 11:46 pm Post subject:
Designing simple CPU-Efficient harp/perc sound with LPF Subject description: And I can't believe last night i slept with a chuck shred -_- |
|
|
Yes.. it's true.. last night i slept with one chuck shred by this new experiment hahah -_-
and it feels good.
- - -
anyway.. this is just the prototype for the system..
the 'strings' (created by single LPFs)
and 'body' (i created one from a filter also..
now i still can't do much with it, but now it can make great reverbing sound around all strings)
each string is plucked by an Impulse
i was working on this mainly to produce an easy-to-use & CPU-Efficient poly synth
it's still not very exciting, but i'll try to develop it more
mainly to create different kinds of timbre out of it easily.
Code: | // i'll call it 'Enigmatic Triads' for now - kijjaz@yahoo.com
Impulse pick[8];
LPF string[8];
HPF body;
body => Gain feedback;
Gain master => dac;
master.gain(0.5);
for(int i; i < 8; i++) {
pick[i] => string[i] => body;
feedback => string[i] => master;
}
body.set(200,0.5);
feedback.gain(0.6);
while(true)
for(int i; i < 8; i++) {
pick[i].next(0.9);
string[Std.rand2(0, 7)].set(Std.mtof(Std.rand2(0,1)+ i*4 + 50), 600);
500::ms => now;
} |
changing the feedback.gain(xxx)
and string[...].set(..., xxx)
will definitely change the sustain of the instrument..
sometimes can create electric-guitar-like feedback.. (no overdrive yet)
i'll come back to update it later
|
|
Back to top
|
|
|
ge
Joined: Aug 13, 2006 Posts: 108 Location: Palo Alto, CA
|
Posted: Thu Mar 01, 2007 12:47 am Post subject:
|
|
|
Pretty!!!
Rock and pluck on... |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Tue Oct 16, 2007 11:03 am Post subject:
|
|
|
wow, i just tried your code and it sounds beautiful. I have seen plots of impulse response in textbooks, but had never thought of making music that way - very nice. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Tue Oct 16, 2007 1:24 pm Post subject:
|
|
|
One more note (so to speak): I added a JCRev at the end of the patch just before the dac and the sound improved significantly. So easy, so cool, so fun... |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Oct 16, 2007 5:41 pm Post subject:
|
|
|
Inventor wrote: | wow, i just tried your code and it sounds beautiful. I have seen plots of impulse response in textbooks, but had never thought of making music that way - very nice. |
lots of very early electronic music (the days of "signal generators" and tape-cutting before voltage controlled commercial synths) was heavily based on impulse-trains and filtering. I think it's still a very evocative technique.
Also try "Blit" and "Shakers", Blit is a train of anti-aliased impulses, shakers is ready-made systems of a exciter and a resonator that can be re-filtered. I like the water-drop pre-set a lot (see "two line chuck crazy" a few topics down). _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Oct 17, 2007 1:11 am Post subject:
|
|
|
Kassen wrote: | lots of very early electronic music (the days of "signal generators" and tape-cutting before voltage controlled commercial synths) was heavily based on impulse-trains and filtering. I think it's still a very evocative technique. |
Ahhh, rediscovering history - I can imagine engineers patching filters and switches together with banana jacks to create these songs, kind of like the early days when analog computing was popular. I also listened to the waterdrop effect you used in two-line-ChucK, very similar!
I played my song at my birthday dinner yesterday and all the old hippies liked it. Now they want me to make them a keyboard-piano player with a randomly generated filter on each key so they can type in Hemmingway or other text and see what it sounds like. These folks could never get into my rock songs, but add in a little ChucK-magic and they're all into it! Should be fun. Any tips on reading from the keyboard? I think I read about it in an earlier post, I'll go look. Fun, fun, fun! |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Oct 17, 2007 3:10 am Post subject:
|
|
|
Never mind about the keyboard HID stuff, I found S.M.E.L.T. in the prior posts, went there and downloaded the three kbd code samples. I modified kbd-ascii.ck to play similar notes to our programs, and the kb-fret.ck is just too cool! I hardly had to do anything, thanks to these excellent examples, though I do not fully understand how the whole kbd events and classes work and such, I will have to study this code some more.
Oh, by the way, since these examples are released under the GNU GPL, I just put my own copyright on top of theirs, of course keeping the GNU text intact. Is that the kosher way to do things when modifying and redistributing GNU code (I release all my code as GNU GPL code BTW). Having fun... |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Wed Oct 17, 2007 4:10 am Post subject:
|
|
|
Yes, I think that as long as you GPL your own code that's fine.
I don't know where the limits to that are... Any ChucK program that uses the keyboard will include most of kb.ck (likely re-written but still), for example, and I don't think that will force you into the GPL if you're not happy with that.
BTW, one technique I like for casual live-coding "chamber music" is starting by writing something that makes keyboard inputs make sounds, then leaving that running while making more stuff or modifying that itself.
Tips for early electronic music; White noise "an electric storm" (or other stuff involving Delia Derbyshire, famous for the DR. Who theme), Raymond Scott, Tom Dissevelt & Kid Baltan
http://www.youtube.com/watch?v=LF2x5IKxmAQ&NR=1 _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Oct 17, 2007 10:01 am Post subject:
|
|
|
kijjaz, I played some Chuck stuff for my mom, including your "Enigmatic Triads". She's a 60's hippie child with a modern new-age flair, and she liked your Triads best of all the stuff I showed her! So compliments to you.
Kassen, I really enjoyed the "Dr. Who" theme video, very nice work indeed. I can't wait to be able to make "riffs" and do "sequencing" like that, if those are the right terms, but for now I'm working with basic sounds and random or PC keyboard techniques.
Another tool I've used is POV-Ray, a freeware 3D graphics programming language environment with animation capabilities. Someone just did a music video with POV-Ray, so maybe that's something to do later once I have enough ChucK tools in my toolbox.
Now what to do next? Hmmmm.... |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Wed Oct 17, 2007 11:29 pm Post subject:
|
|
|
Oh thanks you! And I want to say hi to your mom also.
We all should have tea. |
|
Back to top
|
|
|
chuckles
Joined: Apr 02, 2007 Posts: 72 Location: San Diego, California
|
Posted: Fri Oct 19, 2007 2:33 pm Post subject:
More fun with harp sounds... |
|
|
This is so simple and elegant it blows me away.
I added a pan function, then sporked two otherwise identical shreds with a left and right pan. I don't have them synchronized. Instant Eno!
Many other approaches beckon...changing the time base, constraining the notes to scales, synchronizing them, etc., etc., etc.
Thanks kijjaz again, Inventor and all other contributors... |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Oct 20, 2007 7:44 am Post subject:
|
|
|
Hello chuckles and thanks for the compliment. I would like to get into using the left and right channels but do not know how to do this yet. Would you or someone else mind posting a simple example of how to do this? Or am I being too lazy to look it up in the docs? Thanks in advance. |
|
Back to top
|
|
|
|