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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » ChucK programming language
Designing simple CPU-Efficient harp/perc sound with LPF
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [13 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: 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 -_-
Reply with quote  Mark this post and the followings unread

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
Embarassed Idea
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Thu Mar 01, 2007 12:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Pretty!!!

Rock and pluck on...
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: Tue Oct 16, 2007 11:03 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Inventor
Stream Operator


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

PostPosted: Tue Oct 16, 2007 11:59 am    Post subject: Reply with quote  Mark this post and the followings unread

More kudos to the creators of my new favorite toy, ChucK! ChucK made it easy for me to make something similar to your triads, kijjaz, only in a different way. This one works by plucking a high-Q band pass filter with a high-amplitude impulse. I'm not sure why the amplitude of the impulse needed to be so high, but that was necessary to make it work. Possibly because the energy of the impulse is spread out over so much time. I followed your example of using a random number generator, in this case one for frequency and one for duration. I find it to be a relaxing thing to hear.


impulse.ck
 Description:
Soothing notes of random frequency at random intervals, created from the impulse response of a band pass filter.

Download
 Filename:  impulse.ck
 Filesize:  408 Bytes
 Downloaded:  287 Time(s)

Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


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

PostPosted: Tue Oct 16, 2007 1:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


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

PostPosted: Tue Oct 16, 2007 5:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


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

PostPosted: Wed Oct 17, 2007 1:11 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Inventor
Stream Operator


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

PostPosted: Wed Oct 17, 2007 3:10 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


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

PostPosted: Wed Oct 17, 2007 4:10 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


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

PostPosted: Wed Oct 17, 2007 10:01 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
kijjaz



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

PostPosted: Wed Oct 17, 2007 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh thanks you! And I want to say hi to your mom also.
We all should have tea.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
chuckles



Joined: Apr 02, 2007
Posts: 72
Location: San Diego, California

PostPosted: Fri Oct 19, 2007 2:33 pm    Post subject: More fun with harp sounds... Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor
Stream Operator


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

PostPosted: Sat Oct 20, 2007 7:44 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [13 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