Author |
Message |
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Feb 28, 2008 8:44 pm Post subject:
Request: Funky Effects Subject description: Make my instruments go wowawowaowa |
|
|
OK, so now I have a number of instruments in Guitar Lab including Guitar, Mandolin, Snare, Drum, Saxophone and Flute. It all works fairly well but each instrument only makes a sample of what it's capable of doing. I'd like to add effects, such as the reverb and the echo in the Guitar, that do funky wild stuff to the sound. The result would be a much more dynamic program. What are your favorite tricks to accomplish this? |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Thu Feb 28, 2008 9:36 pm Post subject:
|
|
|
hmm,,
compressor hahah...
wah wah (i might use LPF) -> overdrive // this one should sounds 70'ish
or
wah wah -> overdrive -> compressor
I think making the instrument able to do a "slap" sound is interesting.
adjusting some StkInstrument parameters might produce something more like a slap..
but a real slap.. i think not. it won't sound that similar to a real slap.
I'll try to program something with a slap ability.. -_- |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Feb 28, 2008 9:53 pm Post subject:
|
|
|
So add a master overdrive, sort of like the SinOsc waveshaping you did in the guitar? What about that Dyno thingie? In the ugen reference it says:
[ugen]: Dyno
* dynamics processor
* includes limiter, compressor, expander, noise gate, and ducker (presets)
Is it possible to ChucK up a Dyno and set it for various effects with buttons and sliders? Maybe that is what is needed. What is your opinion of Dyno, kijjaz?
OK, slap sounds good. I just added thunder to the percussion page, I guess slap will go there too. |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Thu Feb 28, 2008 10:13 pm Post subject:
|
|
|
Dyno: hmm prepare a Dyno for use as a compressor is great.
The attack, release time, ratio, and threshold are easy to access.
preparing one (and maybe if there a button to turn it on/off (bypassing)) would be nice.. just like on a stompbox.
so.. compressor --> another gain (for make up) --> overdrive..
that'd be fun for crafting an electric guitar sound.
maybe we'll get a more realistic sound out of mandolin with that also (because many guitar sounds nowadays are so compressed.. especially funky strumming / solo) |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Thu Feb 28, 2008 10:40 pm Post subject:
|
|
|
This one is what I tried to create to try out something for funky feelin'..
ahhhh but that autowah still isn't finished hahaha..
it's note vibrating like an LFO but it's cool anyway.. so i'll leave it there.
There're still nothing like a slap that can be done easily here.
And this example makes the Mandolin sounds more like a 70's clavinet -_-"
Ok. funky enough!
Code: | Mandolin s => LPF f => Dyno compressor => SinOsc overdrive => dac;
s => Gain s_square;
s => Gain s_dummy1 => s_square;
s_square.op(3);
s_square => Gain s_power => s_power => blackhole;
s_power.gain(.9);
f.Q(4);
compressor.compress();
compressor.thresh(.05);
compressor.attackTime(20::ms);
compressor.gain(.7);
overdrive.sync(1);
fun void AutoWah() // ahh.. still not fully funktional -_-"
{
while(ms => now)
{
s_power.last() * 1000 + 900 => f.freq;
}
}
spork ~ AutoWah();
s.bodySize(.9);
int i;
while(true)
{
((i % 4 == 0) + (i % 6 == 0)*2 + (i % 5 < 2)*6 + ((i * 5) % 16 < 1)*8 + 1) * 55 => s.freq;
if (i % 4 == 0) s.noteOn(1.0); else s.noteOn(.5);
25::ms => now;
if (maybe) s.noteOff(1.0);
100::ms => now;
s.noteOff(1.0);
i++;
}
|
update: more funktional Wah!
Code: | Mandolin s => LPF f => Dyno compressor => SinOsc overdrive => dac;
s => Gain s_square;
s => Gain s_dummy1 => s_square;
s_square.op(3);
s_square => Gain s_power => s_power => LPF s_power_f => blackhole;
s_power.gain(.999);
s_power_f.set(7, .5);
f.Q(4);
compressor.compress();
compressor.thresh(.05);
compressor.attackTime(20::ms);
compressor.gain(.7);
overdrive.sync(1);
fun void AutoWah() // ahh.. still not fully funktional -_-"
{
while(ms => now)
{
s_power_f.last() * 500 + 300 => f.freq;
}
}
spork ~ AutoWah();
s.bodySize(.9);
int i;
while(true)
{
((i % 4 == 0) + (i % 6 == 0)*2 + (i % 5 < 2)*6 + ((i * 5) % 16 < 1)*8 + 1) * 55 => s.freq;
if (i % 4 == 0) s.noteOn(1.0); else s.noteOn(.5);
25::ms => now;
if (maybe) s.noteOff(1.0);
100::ms => now;
s.noteOff(1.0);
i++;
} |
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Feb 29, 2008 3:59 am Post subject:
|
|
|
Very Funky sounds there kijjaz! That must be the funkiest thing I've heard out of ChucK so far! I am having less spectacular results. I hook up a mandolin to a gain block to a Dyno to a gain block to a Dyno set on limit. I should get some funky sound from the setup, but instead I get basically the same sound. Not sure what the problem is. I don't have your feedback stuff in there, since I don't quite understand it. What do you think? |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Feb 29, 2008 4:25 am Post subject:
|
|
|
Well now I'm getting something different, I put a feedback of -2 from the second gain stage back to the first. Now it's loud and full of bass on expander. I'm beginning to think this is a game of funky feedback paths, hmmm... maybe putting a delay in the feedback path? |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Feb 29, 2008 4:32 am Post subject:
|
|
|
Inventor wrote: | Very Funky sounds there kijjaz! That must be the funkiest thing I've heard out of ChucK so far! |
That last one is utterly brilliant! _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Frostburn
Joined: Dec 12, 2007 Posts: 255 Location: Finland
Audio files: 9
|
Posted: Fri Feb 29, 2008 12:07 pm Post subject:
|
|
|
Just out of curiosity; Why are you guys using the Mandolin so much? StifKarp is more of a guitar. _________________ To boldly go where no man has bothered to go before. |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Fri Feb 29, 2008 1:06 pm Post subject:
|
|
|
Hmm.. for me, a Mandolin is more 'hollow body' heheheh..
I like StifKarp also, but... When overdriving, i like the result created with Mandolin as the source.
Hm.. It's just my taste ^_^
Sitar if fine too hahhahh (Sitar is nice with this wah wah -_-" but a bit thin) |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Fri Feb 29, 2008 2:36 pm Post subject:
|
|
|
I'll explain what I did in there that cause it to auto-wah.
First, I have a Mandolin (actually, can be anything..
Something like Flute or Clarinet is ok, i've tried)
(But it'd be more powerful for the autowah effect if the amplitude of it decays)
The sound is firstly passed through a wah, I chose LPF for ease of use.
Then do the comression (with a Dyno)
Then pass through an overdrive (i used SinOsc, but can be anything and clips or distort a signal)
The schematic is similar to Guitar (or other instrument) -> WahWah -> Compressor -> Overdrive/Preamp
now, to accomplish autowah easily, I decided to accumulate the Mandolin's energy and use the sum to modulate the LPF filter.
It means: The louder the sound, the higher cutoff frequency.
but I should have decay for the accumulated energy to create wah release.
so we're gonna do: (soundsource ^ 2) => Gain accumulator => Gain accumulator_feedback => accumulator;
and set accumulator_feedback.gain to something a little lower than 1.0 so that it'd release in a selectable speed.
But i've noticed that the result can be quite oscillating (like in LFO)
so I LPF it one time by setting the freq and Q quite low, just to smooth the value out.
to create soundsource ^ 2, I use soundsource => Gain squareOfSoundsource;
and soundsource => Gain soundsource_dummy => squareOfSoundsource;
and squareOfSoundsource.op(3);
so that the two same signal will multiply with other, thus result in soundsource^2, just like we wanted.
I created a function that would set the cutoff filter depending on value of accumulator,
that one is sporked and keeps on modulating the cutoff frequency.
This is the mechanic behind the sound,
but for that distinct sound, it also depends on trial-and-error.
I'll try to implement this in an auto-wah class within 15 days.
I'll make it easy to use and try to find some standards on the calculations.
more about playing:
I choose to make it randomly plays two kinds of notes: legato and staccato (long and short, jumpy)
with the compressor's threshold that low, it should give an attack sound from every note played (how long the attack be? it depends on the attackTime parameter).
but with the autowah working now, when it plays a short staccato, the "power accumulator" in the autowah is gonna release, so that makes the cutoff frequency drop and will be ready to wwaaahh up again when the mandolin sound gets louder/higher/longer.
- - -
personal note: I really like the sound of filtered soundsource with quite high LPF Q passing through a SinOsc overdrive unit.
I think it reminds me of the analog warmth and overdrive styles in the 60's 70's.
- - -
more note on wah-wahing: I think direct wah-wahing by controlling the LPF cutoff frequency is also very useful in this situation,
but to simulate the gliding value of the cutoff frequency,
i recommend using my usual easy method here:
Step CutoffFreq => LPF CutoffFreq_smooth => blackhole;
(use a filter to smooth the value that can be set at the step.)
and create a function that runs forever but updating CutoffFreq_smooth.last() to multiply an index, add with an offset, and set that to the main sound source's LPF frequency.
That'd be an easiest but functional wahwah I can think of now. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Feb 29, 2008 2:56 pm Post subject:
|
|
|
Frostburn wrote: | Just out of curiosity; Why are you guys using the Mandolin so much? StifKarp is more of a guitar. |
I'm just using it because kijjaz did so in his guitar model. Maybe I should be using StifKarp? |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Feb 29, 2008 3:00 pm Post subject:
|
|
|
I see, kijjaz, so you're constantly varying the low pass filter to create a wah-wah effect. Also you vary it based on the sound itself, rather than an external LFO. You do this by squaring the signal low pass filtering it, then setting the first filter's cutoff frequency according to the result with a function that runs always. Let me have a try at that. |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Fri Feb 29, 2008 3:33 pm Post subject:
|
|
|
Inventor: "You do this by squaring the signal low pass filtering it, then setting the first filter's cutoff frequency according to the result with a function that runs always..."
kijjaz: "At the , there's one more thing I do, I 'accumulate' (sum) each sample of the value.
(That is made by using a gain that's fed back into itself: Gain accumulator => Gain accumulator_feedback => accumulator)
so it don't just squaring the signal, it also sum up the squared signal every sample.
(the summed value can grow larger as the same rate increase also, i have to fix this)
but if summed up forever, we've got an forever-increasing value,
so setting the gain feedback of the accumulator a little lower than 1.0 will actually leaks it a little bit every sample. ^_^" |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Sun Mar 02, 2008 10:29 am Post subject:
|
|
|
oh yeah.. that's a wow wow for me already ^_^
the thing I did that makes it sounds different to your above mp3 is the length of each note.
i got quite a strong wah release from the noteOff. |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Mar 06, 2008 3:09 pm Post subject:
|
|
|
Nice tune, kijjaz. I like how it starts out slow, gets more complex, and then winds down with a simple rhythm. Very funkadellic. I need to get into the StifKarp, as suggested by Frostburn, as well. So much to do... |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Mar 08, 2008 7:09 pm Post subject:
|
|
|
Kool kijjaz, that's a good one.
I have decided to make a series of recordings for easing anxiety. For this I would like to have some nature sounds, like rain or ocean waves. I have started using your thunder from before, which is OK, but had to put a limiter on it cause it was clipping.
Do you have any thoughts about how to go about making nature sounds in ChucK? Just looking for ideas, since you are the percussion master, lol! Rock on kijjaz. |
|
Back to top
|
|
|
Frostburn
Joined: Dec 12, 2007 Posts: 255 Location: Finland
Audio files: 9
|
Posted: Sun Mar 09, 2008 2:13 am Post subject:
|
|
|
Inventor wrote: | Do you have any thoughts about how to go about making nature sounds in ChucK? |
Dynamically filtering white noise can create lot's of natural sounds from the howling wind to the gently flowing ocean. With some attack-decay enveloping filtered noise can also sound like a distant explosion.
Here's a stereo patch that sounds like someone blowtorching the ocean.
Code: | //Two noise sources for left and right
Noise n[2];
Gain nin[2];
Gain nout[2];
//Two FIR filters of order 32
Delay d[32][2];
for(0 => int i; i < d.cap(); i++){
nin[0] => d[i][0] => nout[0];
nin[1] => d[i][1] => nout[1];
i::samp => d[i][0].delay => d[i][1].delay;
}
float dg[d.cap()][2];
n[0] => nin[0];
n[1] => nin[1];
//Darken the sound a bit and chuck to dac
nout[0] => OnePole il => dac.left;
nout[1] => OnePole ir => dac.right;
//Simple exponential averaging
-0.9 => il.a1 => ir.a1;
1.0 + il.a1() => il.b0 => ir.b0;
5.0 => il.gain => ir.gain;
float w[2];
float sum[2];
1.0 => sum[0] => sum[1];
while(true){
sum[0] => w[0];
sum[1] => w[1];
0.0 => sum[0] => sum[1];
for(0 => int i; i < d.cap(); i++){
//Randomly walk filter coefficients
0.0005*Math.max(w[0],0.1)*Std.randf() +=> dg[i][0] => Std.fabs +=> sum[0];
//0.005*Math.max(w[1],0.1)*Std.randf() +=> dg[i][1] => Std.fabs +=> sum[1];
//Keep the second channel near the first one
0.0005*Math.max(w[1],0.1)*Std.randf() + dg[i][1]*0.95 + dg[i][0]*0.05 => dg[i][1] => Std.fabs +=> sum[1];
}
for(0 => int i; i < d.cap(); i++){
//Normalize the overall gain
dg[i][0]/sum[0] => d[i][0].gain;
dg[i][1]/sum[1] => d[i][1].gain;
}
ms => now;
} |
_________________ To boldly go where no man has bothered to go before. |
|
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: Sun Mar 09, 2008 4:05 am Post subject:
|
|
|
Perhaps a WahWah on white noise driven by a slow sinusoid would be a first attempt at ocean waves.
And a random stream of impulses into a filter might make a good rain. Rain goes "plunk", not "plink", so probably a low-pass filter impulse response will work.
I dunno, gotta work with it some more... Just typing out loud... |
|
Back to top
|
|
|
|