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
Collecting Nature Sounds
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 2 [36 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
kijjaz



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

PostPosted: Sun Mar 09, 2008 12:22 pm    Post subject: Collecting Nature Sounds
Subject description: This time we'll environmentally chuck.
Reply with quote  Mark this post and the followings unread

out of this thread: http://electro-music.com/forum/topic-24436.html
we're starting to talk more about generating nature sounds.
there was thunder, and there'll be water and rain soon.

so I decided to work on quite a hard thing to generate..
Birds! Birdies! .. because bird songs are so different, it's kinda hard to replicate the diversities with minimal UGens..

but okay now i'm gonna post the first take.
it's driven by SinOsc and frequency modulation.
It sounds quite convincing to me.
(although many times it's kinda alien.)


20080310kijjaz-Birdies-0.1.ck
 Description:
kijjaz's Birdies 0.1

Download
 Filename:  20080310kijjaz-Birdies-0.1.ck
 Filesize:  1.43 KB
 Downloaded:  815 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Sun Mar 09, 2008 12:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow, birdielicious!
There's a minor oversight in your code though. You're setting the SinOscs frequency in the loop but they're on sync mode 0 so they ignore their own frequency. Changing the sync to 2 creates a more electronic jungle.

_________________
To boldly go where no man has bothered to go before.
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 Mar 09, 2008 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ahh yes i forget that -_-" thank you ..


20080310kijjaz-Birdies-0.2.ck
 Description:
kijjaz's Birdies 0.2 : now more chorusie

Download
 Filename:  20080310kijjaz-Birdies-0.2.ck
 Filesize:  1.45 KB
 Downloaded:  788 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Sun Mar 09, 2008 2:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I tried to make something like a random human voice babbling but all I came up with was a retard with some serious mouth problems.


babble.ck
 Description:
An experiment in voice gone wrong.

Download
 Filename:  babble.ck
 Filesize:  1.62 KB
 Downloaded:  796 Time(s)


_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Sun Mar 09, 2008 3:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Isn't there a raindrop in Shakers? We could have lots of those and use the stochastic techniques from the other topic! This could be linked as well so more rain means less birds, like in nature!
_________________
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: Sun Mar 09, 2008 6:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

HaHa, now the gang is working together: nature sounds, ok. I saw the "water drops" under shakers, so perhaps to get rain the next logical thing to do is plug a shakers model into Guitar Lab and add some sliders to it. I see you can set up to 127 drops, which should be enough.

And the birds! How do you create these sounds so easily, kijjaz? Those sound like real birds and are very varied.

Although I'm kind of ho-hum on Frostburn's babbler, it is a good sign that we have at least something of voice synthesis on the table. Maybe the concept will go somewhere.

This is already shaping up to a nice recording for fighting the dreaded anxiety!
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: Sun Mar 09, 2008 7:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK, I plugged Shakers into Guitar Lab and made the attached seven-second song of raindrops. There seems to be some difficulty in getting much of a "sheeting" rain effect, or full rain, but the drippy sounds of a storm just beginning or ending are possible. Plus there are lots of other shakers sounds.


Guitar_Lab_Rain.mp3
 Description:
7 seconds of raindrops.

Download
 Filename:  Guitar_Lab_Rain.mp3
 Filesize:  108.98 KB
 Downloaded:  1368 Time(s)

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: Sun Mar 09, 2008 7:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

No time to seriously ChucK now because I'm also setting up a computer but one of THE big things in rain is not just the amount of drops (though) that's a big one but also their spatial placement.
_________________
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: Sun Mar 09, 2008 8:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

This one sounds like a windy rainstorm - well, sort of. I put Impulses into a BPF "tank" to get a plunking ring, then a LPF to take the edges off, finally I send Noise inot the BPF to simulate the wind. Lots of numbers to play with that make different sounds.


Code:
// Attempt at rain sounds
// copyright 2008 Les Hall
// This software is protected by the GNU General Public License

Impulse i => BPF bpf => LPF lpf => dac;
Noise n => bpf;
bpf.Q (10);

while (true) {
    lpf.freq (100*(5+maybe+maybe+maybe+maybe));
    bpf.freq (100*(5+maybe+maybe+maybe+maybe));
    i.next (10*(maybe+maybe+maybe+maybe));
    (1+maybe+maybe+maybe+maybe) * 10::ms => now;
}
Back to top
View user's profile Send private message Send e-mail
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Mon Mar 10, 2008 12:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
No time to seriously ChucK now because I'm also setting up a computer but one of THE big things in rain is not just the amount of drops (though) that's a big one but also their spatial placement.

I was working on an FFT patch that could do surround sound with raw impulse data downloaded from the internet but I couldn't get the fft.transform( float[] ) to work without sucking samples. It's pretty cumbersome to use SndBufs to play the impulses to a FFT in a blackhole so I dropped that approach.
I already made a class that can simulate the time delay between ears (PointSoundSource in the library I posted in the other thread) but maybe if I added a lowpass that depends on the angle it would be more convincing...
I'll have my go with the rain when I have time.

_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
kijjaz



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

PostPosted: Mon Mar 10, 2008 1:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Here comes a test version of Drippy01 the class..


20080310kijjaz-Drippy01-0.1.ck
 Description:
Drippy01 version 0.1 testing

Download
 Filename:  20080310kijjaz-Drippy01-0.1.ck
 Filesize:  1.47 KB
 Downloaded:  645 Time(s)

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: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Mon Mar 10, 2008 2:12 am    Post subject: Reply with quote  Mark this post and the followings unread

That was single drips.. but this sounds like one row of drips.
It can also be combined to simulate near - far - very far layers of rain.
(warning: it clips sometimes)

.. ah ... it sounds like a fried egg sometimes -_-"

or try this test code too, it generates quite a nice gentle rain with 3 layers of this Rain Drippers.

Code:
kjzRainDrippers01 A, B, C;
A.output => Dyno limiter => dac;
B.output => limiter;
C.output => NRev Crev => limiter;
4000 => B.highFreq;
C.overallDensity(-.4);
10000 => C.highFreq;
limiter.limit();
Crev.gain(.1);
Crev.mix(.1);

limiter.gain(.8);
limiter.thresh(1000);

spork ~ A.run();
spork ~ B.run();
spork ~ C.run();
hour => now;



20080310kijjaz-RainDrippers01-0.1.ck
 Description:
kijjaz's Rain Drippers 01 - version 0.1 testing

Download
 Filename:  20080310kijjaz-RainDrippers01-0.1.ck
 Filesize:  1.56 KB
 Downloaded:  614 Time(s)

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: Mon Mar 10, 2008 6:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice rain, kijjaz, better than mine. I just ChucKed up three copies to make a good constant rain sound. Plus I really enjoy the birds. I will put them into Guitar Lab as soon as you feel they are ready for prime time (after you are done experimenting with them). For now I still have not gotten around to programming up a StifKarp for a third guitar as Frostburn suggests, so I think I'll do that next. Just let me know when you feel that your classes are ready.
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 Mar 11, 2008 6:29 am    Post subject: Reply with quote  Mark this post and the followings unread

The attached ChucK file generates the sound of ocean waves, or something like that. It's the same theme - just a noise source with varying filter parameters. In this case I use two filters and sum them at the dac, driving one as sine and the other as cosine. That way the sound is of two overlapping waves. Waves reappear every ten seconds.

Also I made a quick audio file of the birds with a very much quieted ocean, attached for your listening pleasure. Enjoy!


OceanWaves1.ck
 Description:
Some passable ocean waves, not bad really.

Download
 Filename:  OceanWaves1.ck
 Filesize:  709 Bytes
 Downloaded:  452 Time(s)


OceanBirds.mp3
 Description:
birds + ocean waves, so soothing... 16 seconds long.

Download
 Filename:  OceanBirds.mp3
 Filesize:  239.59 KB
 Downloaded:  1215 Time(s)

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: Tue Mar 11, 2008 9:48 am    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz to Inventor: "Hey! That was a powerful spacy ocean there! I like it...
after seeing your work on the noise source, I decided to try the ocean also..
after playing around, i've got a not-so-big ocean.. okay it sounds more a like a sea..
coz usually I go to the sea.. Pattaya Beach. -_-"


kijjaz-GentleOcean01-0.1-testing.ck
 Description:
kijjaz's Gentle Ocean 01 version 0.1 testing

Download
 Filename:  kijjaz-GentleOcean01-0.1-testing.ck
 Filesize:  1.46 KB
 Downloaded:  442 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Tue Mar 11, 2008 11:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Here's my take on the rain. I don't know of a simple way to place sound sources bellow or above the listener so it sounds like you're floating just above the surface of a rain puddle.
Remember to use headphones with this one.


surrounddrops.ck
 Description:
Shakers surround you...

Download
 Filename:  surrounddrops.ck
 Filesize:  4.47 KB
 Downloaded:  513 Time(s)


_________________
To boldly go where no man has bothered to go before.
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: Tue Mar 11, 2008 12:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well done, guys! I tried them both together and they sounded great! Frostburn, your coding style is very advanced - my stuff is way more basic than that. You're passing ugens as function parameters and ChucKing / unChucKing with method calls - fancy stuff. I did notice some CPU burden from one or the other, but not sure which one (I'm on a 3 year old Mac, so I'm slow by today's standards). kijjaz, take your time, whenever you've done your experimenting and neatened it up into a reusable class, I'll plug it into Guitar Lab. In fact, I'm thinking of having multiple rain effects, multiple ocean sounds, etc. since there seems to be an abundance of them. Now I'm off to plug in Frostburn's Shakers rain. Shall I put your nick on the credits button now Frostburn?
Back to top
View user's profile Send private message Send e-mail
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Tue Mar 11, 2008 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
Well done, guys! I tried them both together and they sounded great! Frostburn, your coding style is very advanced - my stuff is way more basic than that. You're passing ugens as function parameters and ChucKing / unChucKing with method calls - fancy stuff. I did notice some CPU burden from one or the other, but not sure which one (I'm on a 3 year old Mac, so I'm slow by today's standards). kijjaz, take your time, whenever you've done your experimenting and neatened it up into a reusable class, I'll plug it into Guitar Lab. In fact, I'm thinking of having multiple rain effects, multiple ocean sounds, etc. since there seems to be an abundance of them. Now I'm off to plug in Frostburn's Shakers rain. Shall I put your nick on the credits button now Frostburn?

The CPU load would be me. :)
I have a tendency to go for quality over lightness. StaticPSS's cousin PointSoundSource uses two interpolating doppler buffers to account for movements and it does a lot of calculation on a sample-by-sample basis. I have hard time running even one of those at a time.

If you want add the surround effect to your project, go ahead! It's released to be used by anyone.
And yes it's nice to be credited.

_________________
To boldly go where no man has bothered to go before.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Tue Mar 11, 2008 1:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I tried a approach that was just lots&lots of Shakers set to "waterdrop" with pan but it turned out to be too much for my poor 900MHz internet desktop so I abandoned it.

tricky problem, I wonder if we could get by with a top-down approach by generating a specific kind of noise directly. Heavy steady rain is quite like filtered noise, after all.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blue hell
Site Admin


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

PostPosted: Tue Mar 11, 2008 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

There is a trick with a vocoder ... the same noise on both inputs -> rain.

Rain is a bit tricky, it's a lot like applause, or fire; it almost needs a context to be able to determine what it is.

Edit : the other day a ran into another little trick that I found useful for this type of sounds, I'll attach a dump of the G2 patch. Please note that the envelope is upside down, it turns the output off when it gets triggered.


rain-etc.jpg
 Description:
 Filesize:  28.16 KB
 Viewed:  22014 Time(s)

rain-etc.jpg



_________________
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
Frostburn



Joined: Dec 12, 2007
Posts: 255
Location: Finland
Audio files: 9

PostPosted: Tue Mar 11, 2008 2:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
tricky problem, I wonder if we could get by with a top-down approach by generating a specific kind of noise directly. Heavy steady rain is quite like filtered noise, after all.

It's more of a filtered random impulse train I'd say. Of course on the heavy steady limit noise and impulse trains coincide.

And it turns out that when there is more rain than just a few drops exact localisation for every blib is not required to give a spacious feel to the whole coat of rain.

This one sounds to me like rain hitting a cloth tent in the woods. Luckily it also feels I'm on the dry side.

Code:
//Rain on the left, center and right == rain everywhere
PRCRev revl => dac.left;
0.1 => revl.mix;

NRev revc => dac; //Different reverb for the center gives a more spacious feel to it
0.3 => revc.mix;

PRCRev revr => dac.right;
0.1 => revr.mix;

//And the forecast for today is: steady rain
spork~rain(revl);
spork~rain(revc);
spork~rain(revr);
day => now; //See you tomorrow!

fun void rain(UGen out){
        BPF b => LPF l => out;

        3.5 => b.Q;

        10.0 => l.gain;
        200.0 => l.freq;
        0.1 => l.Q;
        Impulse i => OnePole expEnvelope => b;
        -Math.pow(0.1,samp/(5::ms) ) => expEnvelope.a1;
        1.0 => expEnvelope.b0;

        while(true){
                Std.randf() => i.next; //fire at will!
                Std.rand2f(500.0,600.0) => b.freq; //Set the size of the rain drop
                Std.rand2f(30.0,60.0)::ms => now; //Steady but not pouring rain
        }
}

_________________
To boldly go where no man has bothered to go before.
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: Tue Mar 11, 2008 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

ARGH!!! Sorry Frostburn, when I plugged in your rain class it slowed Guitar Lab down to a crawl. I think I have made a monster. It now has 238 shreds - ulp! most of them watching for button pushes. I guess that's what happens when you put a bunch of controls in an application!
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: Tue Mar 11, 2008 11:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

kijjaz to Inventor: "hahahha.. all that in GuitarLab? -_- I guess you might wanna make (another) Lab for some other tasks such as the atmosphere.
But most of our works around here are not that easy to implement as classes.
I'll spare my free time to do the classes and presets. ^_^"
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: Wed Mar 12, 2008 1:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, kijjaz, it is a monster! But still quite manageable by CPU. I found the key to that was unchucking unused instruments. I have put together the third of my anti-anxiety series from our sounds, it is here:

http://www.freedomodds.com/music/songs/Guitar_Lab_Anxiety3.mp3

I played it for some anxiety sufferers online and got lots of positive responses, plus one guy who's facing a scary cardiac test this week. He downloaded the recording and thanked me for making it.

I suppose it is musically uninteresting as the only instrument, the flute, is simply playing random notes! But i think that's relaxing to people, it drifts them off to a land of gentle tones that don't stimulate the brain.

I also have a rain class now. Based on what Kassen posted, I looked up the spectrum of rain and found it to be between 10 and 20 kHz, with little content in lower or upper frequencies, so I used a BPF centered at 15 kHz to filter some noise and a random impulse train. it works well. Here is the code:

Code:

// Attempt at rain sounds
// copyright 2008 Les Hall
// This software is protected by the GNU General Public License
class Rain1 {
    Impulse i => LPF lpf => BPF bpf => Gain output;
    Noise n => bpf;
    lpf.freq (6000);
    bpf.freq (15000);
    bpf.Q (4);
    n.gain (0.3);
}

Rain1 K;
K.output => dac;


function void rain1_adj () {
    while (true) {
        K.i.next (5*(maybe+maybe+maybe+maybe));
        (maybe+maybe+maybe+maybe) * 10::ms => now;
    }
}

spork ~ rain1_adj ();

day => now;


I took a look at your birds to see if I could put them in a class, but due to the complexity of it I'd rather leave that to you. Thanks for the effort!
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 Mar 12, 2008 3:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a nice heavy downpour inspired by another post:

Code:

Noise n => Gain g => SinOsc osc1 => SinOsc osc2 => dac;
osc2 => g;
g.gain (15000);
osc1.sync (0);
osc1.gain (15000);
osc2.sync (0);
day => now;
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 2 [36 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
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