Synthesising drums

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
http://weizenkeim.org/_users/seb/heininoise/130206_overtest.xrns

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

Misc:

  • 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.
otstuff-1502.xrns
© 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.
otstuff-1502-3.xrns
© 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

rocknroll!

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 ,

Yes, this is a known, but annoying bug; I’ve posted multiple topics about it, thanks that you also mention it. At this moment the only thing I can really do is split the name in multiple sample slot names, but that is a really ugly solution and just doesn’t do right to why I’ve used this way of saving settings in the first place. IMO it’s a unnecessary bug in the xml structure of XRNIs (example: the file inside the zip could just be called
Sample00.flac
instead of
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
, and still be recognizable as being the sample on the 00th position in instrument).
Another way to improve the situation is if we could just have tools save extra XML info together with an instruments samples.

Anyway let’s just keep this topic positive and post drum/synth stuff! :D

Ah, hadn’t read those threads. Well then it’s ok. I thought there was something in the wavecode, that caused this… But at least it is saved as text, so nothing is lost.

I have by now made use of all the functions and the fascination still grows. Latest I have been splicing recorded samples into little frequency chunks with a bandselect filter and tried to rebuild it with overtune :D/> :D/> … welll I am still working on it… but at least I got some decent drumsamples out of it. (back to topic)

spaghettisnare
asskickdrm

(I had to add a little punch and schmutz via the instrument filter and pitch env, but the dry sound is OK I think)

as there are a lot of things, I already miss in overtune, (smoothing function would be cool, user defined sample amount, presets, larger input field, AI, pianoroll, nibbles…) maybe I will start kicking my LUA learning ambitions by tuning your tool a little.

seriously, man. I am really learning something here.

That’s the good part indeed :D

This is very ontopic actually (Y)
It’s what I do some days too, just get a drum sample from anywhere, try to rebuild it somewhat and then make a loop/song from there.

By user defined sample amount, do you mean like sample rate? As for length, I am thinking of implementing ‘make a sample of one beat, x.y lines, etc’
And on smoothing, I agree. I think it’s doable, I might look into it right now. Although I do have homework assignments.
Of course you’re free to fork the git repo.
The idea I got overnight is that OT should be even more about repetitions, like it’s for overtones now, it should be easy to program a formula like

  
sin(X + sin(X) + .5*sin(X)*sin(X*3) + .25*sin(X)*sin(X*3)*sin(X*5) + .125*sin(X)*sin(X*3)*sin(X*5)*sin(X*7))  
  

up to X*19 or whatever. Like in Excel you can type in Monday, Tuesday, then it knows when you ‘extend’ it, it needs to go to Wednesday Thursday etc. And then of course it needs more GUI/reusable formula fields so we can define envelope amounts for these pitchmods…

PS. You might have noticed already, there’s also an builtin edit function (in beta now), that can modify the ‘Y’ (signal) values with a formula too.
PPS. these drum instruments are the shit :D really cool how you also use the envelopes, especially the EQ -15dB I wouldn’t have thought of that.

One more comment to your drums: not sure if you know this, but I use this a lot; since V2.2 or so all OT info is saved into the sample name (as opposed to multiple samples taking the various properties as names), this makes it really easy to make a instrument out of multiple OTs that you can independently set level, transpose, etc for. I say this because I think either your snaredrum or kickdrum example had meticulously crafted sin(…)…+squ(…)…+tri(…)*… in it. It’s also a good method, for snares I definitely always use at least two different layers, one for pitchbent, clipped sine and one for noisehit.

@weizenkeim, and others;
Newest version of Overtune @ dropbox has an update which kind of fixes the ‘longname’ bug… if you have a “too difficult” formula that doesn’t load back into renoise from .xrns or .xrni, you just have to rerender from Overtune again. It shouldn’t fire errors anymore. I’m convinced that volume/panning/tuning information of the samples stays intact.

Some more stuff that I didn’t yet tell…

  • rnd() gives random values between 0 and 1 - so bi(rnd()) gives noise signal in newest version, rnd() is AC, use urnd for DC noise
  • lowrnd(t,n) gives rnd() value that only changes every n samples… that means you can control kind of the ‘frequency’ of the noise signal

lowrnd can be used like this for a hihat (HPF+Distort to taste):
bi(lowrnd(T, 1+flr(7*ru(T,1.7)) ))*recd(T,6)

first: a future version will of course replace rnd() with a signal [-1…1] range always <random values between 0 and 1 can then still be accessed by using math.random() or un(rnd())>
second: the n in lowrnd argument list really needs to be a nonnegative, nonzero integer. that’s why flr is used. I’m looking, right now, for a trustworthy method of fixing it implicitly.

  • quant(x,n) - like lowrnd but on a signal. implements ‘sample&hold’, or ‘bitcrushing’ to a certain samplerate. the fun is in the fact you can use it with varying values through the sample

check out this kick for instance:
0703-lpfthis.xrni (it goes well with this one: 0703-cabsimthis.xrni; figure a nice low key for both)
so also in the case of quant (and semiquant) it assumes a integer value of 1 or higher for the n arg. behaviour is even less guaranteed than normally, if you use it with negative or float numbers.

a very good argument can times be made for the sin(…)+saw(…) etc approach, try e.g. this synth: fatnoisysynth.xrni (again with detunings by AwesomeSawce tool, similar to my howto in the Bells topic)

  • abs(x) - returns absolute value, i.e. -x if x<0
  • mod(x,m) - modulo

for much used tx function there is now also these ‘waveforms’ (handy for modulation)

  • sin1(t) - gives sin(t2pi)

  • squ1(t) - dito for squ

  • tri1(t) - dito for tri

  • saw1(t) - dito for saw

  • sinsin(x,n) - e.g. if n=7, gives sin(sin(sin(sin(sin(sin(sin(x)))))))

  • muffle(x,l,m,a) - weird compressor type function that will remain undocumented for now except for this: I occasionally use it with e.g. muffle(signal,.8,.2,1.6)

I’ve already said some things about supermin/supermax, they can be used to make funny looking signals e.g.
supermin(sin(X),2.5shape(saw(X),2))
supermax(sin(X),2.5
shape(saw(X),2))
You can even combine these into a left/right combo by using the ite function:
ite(C==0,supermax(sin(X),2.5shape(saw(X),2)),supermin(sin(X),2.5shape(saw(X),2)))

Have fun

check this out
1106-a-otdrumdemo-2.xrns