Realtime Pwm Synthesis With Xrni

BAM!!! Here comes the next one: Realtime PWM Synthesis with native Renoise XRNI.

Okay, first a short introduction to PWM, so you can understand what we’re doing.

PWM stands for Pulse Width Modulation. In PWM a signal is modulated by comparing two signals with each other continuously. The demodulated result is the arithmetic average.

Let’s say somewhere on our timeline (the sample position within a looped waveform) we have Signal A with a value of +100 and Signal B with a value of -100, then the result is 0. 0 means right on the signal axis, so this would be silence.

We have a signal A with a value of +100 and a signal B with a value of -50. The resulting value is +50, which creates a signal beyond the sample axis.

Now, that’s the basics to understand what’s going on.

What you need now is (as an example) a ramped, looped sample, usually a plain saw and layer it within your Renoise instrument with a phase inverted clone. The result is… silence. WTF? :unsure: Well, to create our modulation now, we have to fintune one of both samples, so there appear differences in the comparison. Do some finetuning and theeere is your SIDish PWM sound. The higher the difference in finetuning of both signals, the faster the modulation. Modulation depth can be set via volume difference, equal volume = max. depth.

Variations in sound can be done by moving the loop position/sample phase (do NOT change the loop length! - unless you know what you do). You can also try to transpose one of both, modulate more than only two samples with each other and so on. When you know what you’re doing, you’re able to create some really phatt synths this way and of course the typical SID sound. :walkman:

I’ve created some examples, so you get an idea of what I’m talking about. After 7 I’ve lost motivation, but you will see, it is pretty easy to create your own. :)

Download (7 Instruments, 12kb only B))

Wow, that’s really clever! Wouldn’t have thought of this on my own, and it’s a pretty simple way to get some fun sounds.

Okay what is going on here???! This is pretty f***ing cool!

See ya, I’m off to make some chip tunes…

I’d really like to hear that afterwards. :)

Sure, here is what it sounds like so far… fun stuff:

Thanks! Nice 1. Sounds indeed like fun. :) I dig the lead.

Setting up more instruments atm. ;)

Very cool! These instruments should be included into the Renoise main package, so people can see what’s already possible with internal instruments.

If you want a bit more control over a native pwm in renoise then I have sometimes used the invert trick with native devices.


  • Add senddevice to track 01
  • change send to keep source
  • Then add a gainer in same track 01
  • Change gainer to inverting both channels
  • Add a chorus in the same track 01
  • Set chorus to “vibrato settings” which means: Phase: 0°, Wet: 100%, Feedback: 0%
  • Now start adjusting the Rate and Depth parameter in the chorus, and there you have a PWM

You should probably set Chorus rate lowest as possible.
Now add lfo to chorus Depth, adjust lfo amp, freq and offset. Have fun :)

Very cool instruments, and one of the few examples you’ve posted in your illustrious career I’ve understood. Well Done

again, awesome stuff !!!

very inspiring indeed, it would be very cool if all your .xrns examples were collected into one place (such as links in your signature or user profile page) :)

thanks for the information on the invert trick, i didn’t know that

EDIT: Doh, nevermind Bit_Arts, noticed that you have the links in the “About me” page in your user page here in the forums

I hope you’ll share them as well ;)

You know, your name Bit Arts is beginning to make a lot of sense, I’m pretty sure you also make some Byte Arts! :D

It’s stuff like this that makes me ask myself why I even both with VSTi’s.

Wut? :huh: Come on, doing your own instruments of that kind is easy. :rolleyes: I’m willing to share some knowledge and ideas, but I’m not going to support pure lazyness. :D

And thanks for the comments so far to you guys. :)

That’s true, it’s actually quite fun to make some new sounds. And it’s just excellent that we can finally use the good old pitch glide and vibrato commands easily… Great work, thanks a lot for sharing this tip! I just created a bass that is going to be perfect for my future music. I’m literally amazed how well this works.

Then charge creditz… eazy bucks bro B)

Yeah, this is the dream of how life could be. :) Reality is, most people don’t care in a minimal way, when they get something for free. I don’t think, it would become any better, when they’d even have to pay for it.

In fact I have often thought about releasing commercial producer packs for Renoise, with ready to go setups and fresh instruments for all kinds of EDM-genres. But investing a single minute of work in anything like that, would be a pure waste of time atm.

Maybe Renoise some day offers the chance to release protected stuff, like (en-)closed, encrypted DSP chains and instruments, in best case dependent on the personal Renoise license. This would also be a chance for Taktik to make some more money, by charging for a content developer license. But till then, no commercial work from me.

You would have to write that your own i guess. You can pack a pre-compiled Lua binary and if required, obfuscate the code before packing, but it is not a really well protection scheme indeed.
Personally, people usually don’t bother the hassle if they have to shell out a buck or less so easily pay that than wasting their time and try to freeload the warez somehow.

Well, that would be learning LUA, coding LUA and of course setting up the content. For maybe a few bucks? Not really. :)

I’d like to setup some high quality stuff, ready to produce tracks in a row. And I’d for sure not give this away for a buck. ;)

Anyway, time for a break now. It seems there isn’t even much interest in the free stuff.

Well, if you want to earn some bucks then send me a link to where I can buy your music. All your old amiga music was fantastic and I’ve only heard Lost Paradise from you since then and it’s also awesome, so, where is all your music?? ;)

That’s simply a matter of advertising and perhaps waiting for more users to spend time on this board sunday evening or in the evenings during the week.