Synthesising drums

(this thread has become more about Overtune tips&tricks - good thing - so to just download some of my resulting drum samples: go here)

Since my laptop died, and I have limited computer time and stuff, I created this demo song here that shows a little about synthesising drum sounds/samples. Enjoy!

scroll down for another (link) (dl)

please note it was composed on parents computer with logitech 2.1 consumer speakers

needless to say this stuff is all rights reserved though. But it’s completely legal to learn from it even without paying me. :)/>

Hey. Now I’ve also posted the most documentation about Overtune workings since… a long time! Right below. click

Simple demo #3


Thanks for this. Any chance you can explain exactly what you did, and what is going on with the formulae etc.

Sounds good, but I can’t see the merit in this over something like just layering up effects and rendering.


[edit] sorry for anyone who read the previous, was so stupid on linux to think that what I last ctrl-Cd was the same as what was to be ctrl-Vd

Anyway… if you cannot see the merit, if there is one, I’m unsure if I could explain it so that you can. The thing is I didn’t just collect some kicks n snares from a sample library but I generated them with a tool called Overtune - so that’s what it is, like the topic says, drum synthesis. Maybe in some time I can really dig deep into this .xrns analyzing / explaining every step… Doing a forum post for kick, snare, hat, tom, etc


I was just genuinely interested if there was something clever going on that I missed, that is all.

If you synthed the drums yourself, and then imported those to Renoise for effecting, that is cool.

actually, I synthed the drums in renoise
(if you install Overtune tool in renoise and then open the file, you can see what formulas the samples are made of)

I didn’t mean this as a “general tips&tricks” but more of an example, one can learn from it how to synth drums and/or use overtune (I actually made a loop or a song out of it on my other pc so plenty of moves to document)
Story is coming up, thx for the tip

Ah OK. That is very interesting then. I have always loved to generate my own drums in the sampler, but having some mathematical control over everything would be great.

I will give Overtune a go and let you know how I get on.


So, I’ve tried to make another one and type a sort of description in the song comments, here you go:
dropbox link to overtune-errthing.xrns


More about what actually goes into the drum formulas later.

So, the basics that I use at this point for kicks in overtune are mostly:

Filter: Moog HS, .36KHz, 0 Reso, Gain -6dB

add Reverb, Compressor, sends etc.

And in the newest Overtune versions you can also easily layer multiple kickdrum formulas, e.g. try to layer one like in the last example with this:

  1. sin(XX*morph(1,rd(T,1.4),1/3))*ard(T,1.8)
    then adjust the finetune of both a little bit either with Renoise GUI or InstrMix tool, if you use InstrMix it’s also really easy to duplicate a sample and pitch it down/up an octave etc (e.g. Shift-G to invoke InstrMix, D, Shift-K)

You can also have a tone pitchbent much more (and more different curves) than the 1200 cents you get from renoise pitch env. Bass drop? Try

  1. sin(XX*morph(1,rd(T,4),.25))*rd(T,2)
    and a length of 64 or more. Cabinet Simulate that shit and you can have your listeners go as deaf as their speakers allow :P

PS the newest version that’s in git also allows for stereo phasing different parts of a Overtune sample, useful for synth/single cycle samples.

Overtune! It is so uberawesome. Cannot say when I had so much fun using a tool the last time… maybe when I stumbled upon Renoise some years ago :D It’s like playing with Legos only louder… I haven’t completely grasped it yet, merely tampering around with sinewaves and changing multiplicators and stuff so far. But I am starting to get a grip. I brushed up my puny mathskills a little and it really helped me improving my general understanding about sounds. Ok, so much for the praise ;)
I have several questions though. Some things I am not right certain about.
Let me recapitulate what I think I understood:

  1. -base note- sets the amount of samples/T in the final sample
  2. (X) goes from 0 to 2*pi (T) times
  3. (T) goes from zero to 1, thus if I set Time to 10, (T) will be (0-0.099) in the first chunk (0.1-0.199) in the second and so on

but what is N? and what is the order of processing? lets say I enter “sin(X)”, sin(N*X), steps=4, time= whatever
will the tool first calculate the sinewave over time, then start the overtone process or is the overtonestep calculated for each Timechunk?
and N? is it just the Step number?
and what does XX mean?

I hope I will understand that so I can move on to the advanced stuff.
anyway. great tool. I barely use recorded samples or vsts at the moment :)

this is as far as I got right now :P

Thanks so much. To answer your questions:

Correct; it basically sets the resolution of the rendering, because it will also set the basenote property of the sample layer in the Keyzones tab. So apart from determining what resolution OT renders, everything should sound about the same. It’s on A-0 by default because I like to visualize what sounds I program.

Yep. And to answer another question from your post, the only difference between X and XX is, X always stays in the range of 0 and 2pi, and XX keeps on counting, so if you have Time# = 2 then XX goes from 0 to 4pi instead of 0 to 2pi, 0 to 2pi again. I do think that X could be replaced by XX, but that’s for a future version perhaps. You always need XX if you want to do some frequency modulation/pitch bending.

Yes, that’s exactly correct again. You get 10 points :D . So T is not really the same as the Time# variable in the GUI, T is a variable to easily make transitions possible like you have done a lot in the experiment .xrns that you uploaded. Time# determines actually the duration of the sample - especially if you set the sample to non-looping. It’s awesome to see someone experiment with it btw! There are a great many functions already built into Overtune that are made for this. I will pull some from the source code now and explain them;

  • ru/rd - my most used… short for ramp up/down, return a exponential ramp. argument 1 (‘t’) can be T, argument 2 (‘p’ for power) stands for the slope.
  • aru/ard - same as above, with the difference that they return “anti ramp up/downs”, just render ard(T,2) and aru(T,2) and you see what I mean.
  • cosu/cosd - cosine from 0…pi based ramps, also with 2nd argument to raise it to a power p
  • there’s also a env function which kind of works but is too difficult to explain and is pretty annoying to program

You can also use the min and max functions (very common in programming, returning the lowest resp. the highest of two values) to mix these envelopes together. Another great helper can be the 3 functions

  • upft(t,l,h) - returns 1 when t is between l and h, 0 otherwise “unary pulse from till”
  • upf(t,l) - returns 1 when t is above/after l, 0 otherwise “unary pulse from”
  • upt(t,h) - returns 1 when t is under/before h, 0 otherwise “unary pulse till”

For signals, as they are in the -1…1 range, we have supermin and supermax functions. They take the min/max from two signals respectively, but measured from the 0 line.
The distortion functions clip, fold, shape, crush, noise that I’ve talked about before are easiest understood by trying them. Just give different parameters on a sinewave.

  • clip(x,l) - limits signal x (so it’s actually a y value but so what) to stay between l and -l.
  • fold(x,d) - ‘drives’ signal x up to the horizontal lines 1-d and d-1, and where it crosses these, inverts signal in the line in question.
  • shape(x,p) - takes x to the power p (and makes sure it stays on the same side of 0) - can be used with fractions too.
  • crush(x,n) - “bitcrushes” signal x to have only n amount of steps… just try it.
  • noise(x,a,p) - adds noise to signal x, where a is the dry/wet amount (between 0 and 1) of the noise signal, and how much noise is modulated by taking x to the power p.

The functions semiclip, semifold, semishape, semicrush are the same except for they take an extra argument a which is the “dry/wet” amount.
Modulation functions:

  • am(c,m,a) - amplitude modulation (carrier, modulator, amount)
  • rm(c,m,a) - ring modulation (carrier, modulator, amount)

Logic functions:

  • ite(i,t,e) - if i, returns t, else returns e.
  • btoi/itob - converts true/false to 1/0 and vice versa ( actually itob returns false if integer <=0 )

Other conversions:

  • un(x) - converts signal x in -1…1 range to 0…1 range (signal range to modulation range)
  • bi(x) - vice versa
  • tt(x) - converts cycle x in 0…2pi range to 0…1 range
  • tx(t) - vice versa


  • nf(transpose) - gives (approximation of) pitch factor for an amount of transposition
  • pls(x) - returns a “pulsified” version of signal x; i.e. only -1 or 1. ( pls(sin(X)) == pls(saw(X)) == squ(X) )

A good question. So the process for rendering is like this: the formula from “Step 1” is taken, and the formula from “Step N” is then added to it as a string, “Step #” number of times, everytime replacing the N var with the step number. So the formula is first expanded with the amount of overtones, then after that the full formula is rendered. Using the Step # formula field you can build a “Virtual Analog” Square wave out of sinewaves by using these arguments:

  • Step 1: sin(X)
  • Step N: sin(X*(N2-1))/(N2-1)
  • Step #: variable
  • Time #: 1
  • Power: yes, Stereo: no
  • BaseNt: keep default

This is where the name Overtune comes from. I myself at this point in time hardly ever use the Steps no more, but it is fun sometimes. See if you can figure the same kinds of formulas for approximations of square wave and sawtooth wave :)

A cool thing to try out as well, which I’m toying with a lot right now, is frequency modulating synth sounds. You can make awesome electric piano style sounds with sines modulating other sinewaves’ frequency… Just try this one:

  • Step 1: sin(X+.8sin(X)+.1shape(sin(X*3)))
  • Step N: keep default (0)
  • Step #: 01
  • Time #: 1
  • Power: yes, Stereo: no
  • BaseNt: keep default (A-0)

Try making it something else by using stereo:

  • Step 1: sin(X+.8sin(X)+bi(C).1shape(sin(X3)))
  • Step N: keep default (0)
  • Step #: 01
  • Time #: 1
  • Power: yes, Stereo: yes
  • BaseNt: keep default (A-0)

The stereo stuff is only usable in the latest version though, you can download it straight from github (linked below)
If I didn’t say this before, the ‘Power’ switch is used to automatically use the full signal range from -1…1, i.e. Normalize. I only turn it off sometimes if I need to determine exactly at what level to do a clip or fold.

I hope you understand a bit better now how everything works behind the curtains. Also, just know that you can always browse the source code (or ask me!) if you want to be sure about how something works in Overtune on the inside - check the github page. As of now, lines #45-154 are the functions you can use inside the OT formulas.

Great! Pretty much answered all my questions. Thanks a lot.
Going to try out the functions now. That’s a lot of new bricks to play with :)

just one thing: in my previous post, where it says: © of course I meant paren, capital C, paren close. ( C ) without the spaces

I read somewhere that nine inch nails and Marilyn Manson will use computers to synthesize various drum tracks. I’m pretty sure it can be done.

What’s your reason for posting, anyway?? :P

we all love fun stuff.
© 2013 Cas Marrav The Wizz Kid

Newer demo with more bells and whistles, and bass of course. not really tuned the ‘mastering’, maybe just should’ve left it off I can’t know for sure cause I’m not near my monitors. I’m next to a lovely 20 bucks Logitech 2.1 set with big hole in the sub. So enjoy :D
Please click the plus 1 sign bottom right of this post if you wanna vote this for next Renoise version demo song.
© 2013 Cas Marrav The Wizz Kid

now that I have played around with more functions it becomes even better. is there a general overtunes thread? or should I post this in the tools section? yesterday I thought, it would be cool to have something like this, but in realtime, where one could play around with all the values… then I realized: hey, that’s pretty much what all my vsti synthesizers do :P/> :D/> … but really, overtunes in realtime, with multiple variables to set and to connect to external input while still looking at this syntax. that would be sooo good. should be integrated into renoise…

and then i have this problem - sometimes, when I save an instrument made with overtune, it creates an error message after reloading it into another song.

this one for example:
(if i copy the formula into another slot, it will do just fine…)

Loading of sample ‘SampleData\Sample00 (Overtuned !! {step1=‘shape(fold(squ(X)-sin(sin(sin(X)))-.8-tri(X)+.02-sin(16-X),0.32),2)+max(rd(T,3)-04-tri(X-1024),ru(T,3)-.04-tri(X-1024))’,stepn=‘0’,steps=1,times=1,power=true,stereo=false,base_note=9}).flac’ failed with the error:
Failed to open the destination file for writing:
'C:\Users\hel9000\AppData\Local\Temp\Renoise-3040\Sample00 (Overtuned !! {step1=‘step1=‘shape(fold(squ(X)-sin(sin(sin(X)))-.8-tri(X)+.02-sin(16-X),0.32),2)+max(rd(T,3)-04-tri(X-1024),ru(T,3)-.04-tri(X-1024))’,stepn=‘0’,steps=1,times=1,power=true,stereo=false,base_note=9}).flac’.

instruments I made


Original Overtune thread: New Tool (2.8): Overtune

Or more recent thread with a later version along with Mashup: New Tool (2.8): Mashup & New Version Of Overtune

There really isn’t any difference between synthesizing regular synth sounds and drum sounds ,be it hardware or software .
The biggest difference is that dedicated drumsynthesizingmaking machines have didicated envelopes to do the job .exp.attack and decay curves are a must .
I synthesize almost al my drumsounds within reaktor heavily using the sinebank ( 10 000 partials anyone ???)
Anyway ,