I came up with the idea of collecting more example of drum sound design in ChucK
especially one that's ready to use by other users.
I hope this can be one place to talk more about different methods for drum sound design
and implementation in ChucK, especially for live use (CPU-efficient enough)
I've got three working codes around here I'd like to share with you all
(below the drum class, there is also an example on how to trigger and set some example parameters)
Code:
// easy white noise snare
class kjzSnare101 {
// note: connect output to external sources to connect
Noise s => Gain s_env => LPF s_f => Gain output; // white noise source
Impulse i => Gain g => Gain g_fb => g => LPF g_f => s_env;
3 => s_env.op; // make s envelope a multiplier
s_f.set(3000, 4); // set default drum filter
g_fb.gain(1.0 - 1.0/3000); // set default drum decay
g_f.set(200, 1); // set default drum attack
// with some approvements from 101: snare ringing in the body
class kjzSnare102 {
// note: connect output to external sources to connect
Noise s => Gain s_env => LPF s_f => Gain output; // white noise source
Impulse i => Gain g => Gain g_fb => g => LPF g_f => s_env;
and this one is another model i just developed.
i use this method many times, but it's good to see it incapsulated into a class:
Code:
// simple analog-sounding bass drum with pitch and amp decay and sine overdrive
class kjzBD101
{
Impulse i; // the attack
i => Gain g1 => Gain g1_fb => g1 => LPF g1_f => Gain BDFreq; // BD pitch envelope
i => Gain g2 => Gain g2_fb => g2 => LPF g2_f; // BD amp envelope
// drum sound oscillator to amp envelope to overdrive to LPF to output
BDFreq => SinOsc s => Gain ampenv => SinOsc s_ws => LPF s_f => Gain output;
g2_f => ampenv; // amp envelope of the drum sound
3 => ampenv.op; // set ampenv a multiplier
1 => s_ws.sync; // prepare the SinOsc to be used as a waveshaper for overdrive
fun void hit(float v)
{
v => i.next;
}
fun void setFreq(float f)
{
f => BDFreq.gain;
}
fun void setPitchDecay(float f)
{
f => g1_fb.gain;
}
fun void setPitchAttack(float f)
{
f => g1_f.freq;
}
fun void setDecay(float f)
{
f => g2_fb.gain;
}
fun void setAttack(float f)
{
f => g2_f.freq;
}
fun void setDriveGain(float g)
{
g => ampenv.gain;
}
fun void setFilter(float f)
{
f => s_f.freq;
}
}
kjzBD101 A;
A.output => dac;
for(int i; i < 8; i++)
{ A.hit(.5 + i * .1); .5::second => now; }
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Sat Oct 27, 2007 12:56 am Post subject:
Here is a first song using kijjaz's instruments and my composition. I call it "East Meet West" because the lead guitar has that West to East sound that I described before, plus it is a collaboration between myself from USA and kijjaz from Thailand. Hope you like it!
EastMeetsWest1.mp3
Description:
East Meet West, my composition using kijjaz's instruments, one minute long.
Here's the tom-tom modified from the BD101
This can also be used well as a bass drum because we can set "base frequency" of the drum.
Code:
// simple analog-sounding tom-tom with pitch and amp decay and sine overdrive
class kjzTT101
{
Impulse i; // the attack
i => Gain g1 => Gain g1_fb => g1 => LPF g1_f => Gain TomFallFreq; // tom decay pitch envelope
i => Gain g2 => Gain g2_fb => g2 => LPF g2_f; // tom amp envelope
// drum sound oscillator to amp envelope to overdrive to LPF to output
TomFallFreq => SinOsc s => Gain ampenv => SinOsc s_ws => LPF s_f => Gain output;
Step BaseFreq => s; // base Tom pitch
g2_f => ampenv; // amp envelope of the drum sound
3 => ampenv.op; // set ampenv a multiplier
1 => s_ws.sync; // prepare the SinOsc to be used as a waveshaper for overdrive
// set default
100.0 => BaseFreq.next;
50.0 => TomFallFreq.gain; // tom initial pitch: 80 hz
1.0 - 1.0 / 4000 => g1_fb.gain; // tom pitch decay
g1_f.set(100, 1); // set tom pitch attack
1.0 - 1.0 / 4000 => g2_fb.gain; // tom amp decay
g2_f.set(50, 1); // set tomD amp attack
.5 => ampenv.gain; // overdrive gain
s_f.set(1000, 1); // set tom lowpass filter
fun void hit(float v)
{
v => i.next;
}
fun void setBaseFreq(float f)
{
f => BaseFreq.next;
}
fun void setFreq(float f)
{
f => TomFallFreq.gain;
}
fun void setPitchDecay(float f)
{
f => g1_fb.gain;
}
fun void setPitchAttack(float f)
{
f => g1_f.freq;
}
fun void setDecay(float f)
{
f => g2_fb.gain;
}
fun void setAttack(float f)
{
f => g2_f.freq;
}
fun void setDriveGain(float g)
{
g => ampenv.gain;
}
fun void setFilter(float f)
{
f => s_f.freq;
}
}
kjzTT101 A;
A.output => dac;
for(int i; i < 8; i++)
{ A.setBaseFreq(60 + i*20); A.hit(.5 + i * .1); .8::second => now; }
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Sun Oct 28, 2007 5:19 am Post subject:
Here is drum_lab3.ck, complete with all four of kijjaz's instruments plus Boolean sequencing. I put the bass drum and snare on a very simple beat, then gave the tom-tom a more complex rhythm: XORed pairs of overlapping ANDed bits. The tom-tom's frequency and "hit" variable are both from added bits. There are also some other sequences for snare and bass drum in there to try out. Thanks for the instruments, kijjaz!
drum_lab3.ck
Description:
A "laboratory" for testing out drum beats and making songs. Set up to play snare, bass drum, and tom-tom.
I'm testing this prototype "RimShot 101"
please give me some comment on the sound character.
i'll add more features very soon after i'm satisfied with the result.
this one uses quite many UGens, but it surely sounds more complex.
Code:
// easy rim shot: (Testing)
class kjzRim101_testing
{
Impulse i => LPF f1 => DelayA body => Gain ampenv => SinOsc drive => Gain output;
body => Gain body_fb => body;
i => Gain g1 => Gain g1_fb => g1 => ampenv;
Noise n => LPF n_f => Gain n_ampenv => output;
i => Gain g2 => Gain g2_fb => g2 => LPF g2_f => n_ampenv;
3 => ampenv.op => n_ampenv.op;
1 => drive.sync;
f1.set(1000, 1);
second => body.max;
second / 600 => body.delay;
.9 => body_fb.gain;
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Mon Oct 29, 2007 4:48 am Post subject:
kijjaz wrote:
I'm testing this prototype "RimShot 101"
please give me some comment on the sound character.
i'll add more features very soon after i'm satisfied with the result.
this one uses quite many UGens, but it surely sounds more complex.
I tried it out, and it sounds a bit short in duration, can we make it sustain a little more?
I still haven't slept (and it's 7 A.M. now hahahhha)..
before I go out of town for 10 days..
i planned this for a very long time but never started the project:
I want to make a very very simple delayline implementation of a snare drum.
I try to connect things as directly as possible..
and with filtered white noise ringmodulating the bottom of the snare drum to simulate the buzz in the snare.
i wasn't expected to hear something exactly like a real snare..
just a good electric snare drum sound is enough..
but this time, I was shocked. !! ..
(its parameter is still in testing stage..
but they're quite easy to understand and we can hear some different after tuning them right away)
so hear it out yourself, brothers and sisters!
This time i'm proud of this, for real. ... and proud that it's much simple than I planned to. it's a happy prototype! ..
Code:
// Simple Delayline Snare 01 version 0.1 testing
// by kijjaz
// simple delaylines snare drum design: still a testing prototype
// licence: Attribution-Share Alike 3.0
// You are free:
// * to Share — to copy, distribute and transmit the work
// * to Remix — to adapt the work
// Under the following conditions:
// * Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
// * Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Fri Feb 29, 2008 7:14 pm Post subject:
Excellent sound, brother! The example sounds like a military cadence drumming, close to the real thing. Don't you just love it when your explorations yield fruit? Once you tidy that thing up and put it in a class and all that stuff, I'm thinking it belongs in Guitar Lab for sure! Great work kijjaz.
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Fri Feb 29, 2008 7:17 pm Post subject:
p.s. I added your nick to the copyright button on the front panel of Guitar Lab, kijjaz, since you had so much stuff in it. When you click on it you get an arcade shooting sound made with your earlier drum class.
announcement - here's the next release of the Delayline Snare 01
this one provide a test code
and also a way to easily select presets.
but the presets are not that complete and still haven't showed off all the features..
so.. i hope you guys try out, i'll collect as much feedback as possible.
the main problem of the drum is that it sounds very digital-metallic..
which is just because it's made from delaylines hahhahhah..
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Wed Mar 05, 2008 2:28 am Post subject:
Sounds just like the real thing to me. I like how you documented the class so well. I'm plugging it into Guitar Lab right now, let you know when I am done.
kijjaz to Kassen: oh yes. that's one of my favourites hahahah ^_^
i also love putting that result to an overdrive.
Sometimes i force the phase to start at 0 everytime we do the 'note on'
- - -
I'll try to improve the snare drum sound.
maybe i'll try to add a filter or something as an option to shape the delayed sound.
now it really depends on the comb filtering and some overdrive to shape its actual sound.
I might try to make one with a different model also..
but right now i'm so satisfied with this cutie ^_^
especially its ease-of-use.
Sometimes i force the phase to start at 0 everytime we do the 'note on'
- - -
Yeah, but then it's the same every time and you might as well use a sample, I like the slight liveliness, makes it a bit more organic and if anything needs that it's techno kicks.
:¬) _________________ Kassen
Yeah, and morphing. I like to morph sounds over the course of a loop and samples won't quite do that, in that way.
Cymbals are just very hard to synthesise and except for jazz brushed hits I don't even like them that much. Plenty of stuff left; cowbell, rim-shot, clap.... BTW, the Shakers has some good tuned percussion hidden in between the coins and pebbles. Bamboo chimes can be cool for percussion, both for "mysterious moods" and Tom Waits style freaked drums.... and those are basically free thanks to Perry. Ermmm.... Woodblock? Steel-drum (for dub?).... _________________ Kassen
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Wed Mar 05, 2008 4:49 pm Post subject:
Here is a 7-second song that plays kijjaz's snare class, just to show that it's in Guitar Lab now. I have a question for kijjaz: what would you say are the main parameters that affect the sound? I want to add sliders, but there seem to be a whole lot to add, are they all effective? Usually some are not.
Kassen, good point there must be plenty of percussive stuff do discover among the existing instruments, we should look at that sometime soon.
Enjoy your 7-second song (keeping them short to save disk space).
Guitar_Lab8.mp3
Description:
7 seconds of drumming on kijjajz's latest snare class.
Hahaha okay .. today I tried on this idea I had for many months but have not tried yet. I would like to try combining as simple UGens as possible into a patch that can sound like analog drum, but can produce quite a wide variety of classic analog drum sound.
This is a prototype showing the same patch but tweaking a few values to produce different pieces of drums in the drum set. I haven't converted it into a class yet, so let's just hear it out as ideas. The bass drum sound is quite deep so you might not hear it well on small speakers. The snare still doesn't have that snappy feel, but when combine, i think it's a ok sound for now.
kjz_BDSDHH-0.1proto.ck
Description:
Kijjaz's Noise+Sine Bass Drum, Snare Drum, Hi Hat machine ver. 0.1 prototype
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Tue Feb 17, 2009 4:26 am Post subject:
Sweet, kijjaz! These drums are super-simple so they won't overburden the cpu at all. I've been having trouble with too much cpu usage in my KNoW Wave generator so I can make use of them for sure. Plus the variability makes them excellent candidates.
It sounds though that you are going to put them in classes so I'll wait for that, no need to do extra work. Kijjaz: you make the instruments and I'll make the applications. Then we'll all make noise for peace! _________________ "Let's make noise for peace." - Kijjaz
I used the first iteration of Kijaz's delay snare for this little song-chunk.. I used 2 shreds running at different speeds (maybe 3 at one point but I don't think that made the quick and dirty edit that this song IS). I really liked the sound so I wanted to make a little song in response using those nice snare rolls.. Thanks again, Kijaz. I named the song in honor of your first initial. Please don't be offended by its' lack of polish, it was just something I wanted to do before turning in for the night.
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