pouët.net

Synth Articles

category: code [glöplog]
Hello again,

I would like to ask for some synthetizer programming articles. Where I can find it? Sorry for the small and quick request.

Thanks in advance
added on the 2011-02-06 03:45:24 by Danguafer Danguafer
How about making "micro-chords"?
like the three wires with ever so slightly different tunings struck by a single acoustic piano key
tldr
added on the 2011-02-06 06:46:52 by QUINTIX QUINTIX
Oh, I forgot about this article here
"It struck me that, at least in theory, organ pipes should generate quite primitive sound waves. If so, how come a church organ doesn't sound like a chip tune, which is also built up from simple waveforms? Well, actually it will, if you remove the church. And if you connect a Commodore 64 home computer to a loudspeaker in a large hall, it will sound like an organ."
added on the 2011-02-06 06:49:08 by QUINTIX QUINTIX
Nice quote. :)

Thanks for the responses.

What about the guitar synthesys implemented here?
It isn't simply the Karplus-Strong algorithm. It really sounds realistic. My DSP knowledge isn't enough to model something like this by myself.
added on the 2011-02-06 07:49:54 by Danguafer Danguafer
This is not what you asked for, but it could be helpful either way:
http://www.soundonsound.com/sos/allsynthsecrets.htm
added on the 2011-02-06 11:05:51 by lug00ber lug00ber
Danguafer:
Actually that is a karplus strong implementation with some tweaks and some filters - a while ago I disassembled the complete swf-thingy and reimplemented it in C.
added on the 2011-02-06 11:28:55 by las las
This is what it sounds like - not 100% like the flash thingy... but close enough http://research.mercury-labs.org/record.ogg
added on the 2011-02-06 11:49:27 by las las
(And I guess I screwed some parameters up... :))
added on the 2011-02-06 11:50:44 by las las
The only article published in Hugi which has the substring "synth" in its headline is Recursive sound wave synthesis in Hugi 22... If somebody likes to write an article on the topic, we are ready to publish it.
added on the 2011-02-06 11:57:34 by Adok Adok
I still want to know where kb has dig out his oscillator algorithms ... I know how they work, but I really wanna know where he got those from :D
added on the 2011-02-06 12:23:48 by neet neet
Which ones? The basic oscillators were straight floating point implementations of simple DCOs, and the box filter "antialasing" was actually something I thought of myself. Figured calculating the integral of piecewise defined linear functions couldn't be _that_ hard (and it worked pretty well, especially because in the final asm implementation I was able to shift together a 3-bit value from various status bits that then identified which of the 6 possible per-sample piece configurations had to be calculated. Enter a jump table, a few float instructions, and voila :)

Regarding the string synthesis above - the trick is not to have a schmancy-fancy string algorithm (ok, correct multitap FIR interpolation for the delay line feedback won't hurt a bit) but to model the excitation waveform and the body correctly. Strings are simple waveguides and in fact exactly as simple as they sound. The way a guitarist's finger strikes the chords isn't tho.

In fact that applies to most of synth programming - the algorithms are really simple; it's completely about how you use them. I can't stress that enough: Never develop a synth without an at least somewhat experienced musician nearby (be it yourself or a close friend), and after you nailed down the code, spend some time to write an interface that's actually fun to use and invites people to mess around. That's where good sound comes from, not from strict buzzword compliance.
added on the 2011-02-06 14:12:56 by kb_ kb_
BB Image
added on the 2011-02-06 14:35:37 by ponce ponce
Thanks kb, that's what I always wanted to know ;)
So I will think about your 'antialising' stuff a bit, because I really wanna get rid of my bandlimited wavetables^^
added on the 2011-02-06 15:00:00 by neet neet
I'm going to thump down #ponce's book suggestion. It's frustratingly superficial, you wont be able to implement anything after reading it. I guess it's ok as a list of things to research somewhere else.
added on the 2011-02-06 15:47:17 by revival revival
C64 in a church... sounds familiar... :D
added on the 2011-02-06 19:23:04 by Photon Photon
I have dafx too and must admit that i learned more from musicdsp.org
Regardless of how much practical details there are in DAFX I have to say that I was quite inspired by the book. I think it's a very interesting read.
added on the 2011-02-06 20:59:16 by elfan elfan
You need to know a bit about signal processing, z-transforms etc, for DaFX to be maximally useful. It contains some nice info, though, even if you don't know your poles from your zeros.
added on the 2011-02-06 21:47:04 by trc_wm trc_wm
Quote:
You need to know a bit about signal processing, z-transforms etc, for DaFX to be maximally useful. It contains some nice info, though, even if you don't know your poles from your zeros.


Absolutely! It's by no means a beginner's text or a practical guide. But if you have that groundwork covered it can be useful and interesting :).
added on the 2011-02-07 08:35:41 by elfan elfan
Let me ask a question about filters.
If I'm not wrong, it's implemented using FFT, right? I'm kinda lazy these days to take some time to understand the math behind FFT. I cannot even get an easy-to-understand text about it.
added on the 2011-02-07 19:14:16 by Danguafer Danguafer
Some filters are implemented with FFT, but most are not. Converting between the time and frequency domains tends to introduce some inaccuracies.
added on the 2011-02-07 19:29:32 by kusma kusma
Danguafer:

There are FIR (finite impulse response) filters, where the output is a weighted sum of the present and past input values.
Code: y(n) = b0*x(n) + b1*x(n-1) + b2*x(n-2) + .. + bm*x(n-m)

These are always stable but they need to be quite long, e.g. m > 20. They're only used in special circumstances (almost never in synths).

Then there are IIR (infinte impulse response) filters, where the output is a function of the previous outputs and inputs
Code: y(n) = b0*x(n) + b1*x(n-1) + b2*x(n-2) + .. + bm*x(n-m) - a1*y(n-1) - a1*y(n-2) - .. - ak*y(n-k)

A regular second order resonant lowpass filter, i.e. 12dB per octave, as you might know from synthesizers, can be implemented as an IIR filter with m=2,k=2.

Larger filters (higher order) are generally built by putting these second order sections in series.

The 'a' and 'b' coefficients can determined by the formulas in Robert Bristow Johnson's EQ cookbook.

It is common to write the above IIR formula in its z-transformed version:

Code: Y(z) b0 + b1*z^-1 + b2*z^-2 H(z) = ---- = ------------------------ X(z) a0 + a1*z^-1 + a2*z^-2


The z^-1 denotes a delay by one sample, z^-2 is two samples.

If you're familiar with complex numbers, calculating the frequency response is straightforward using the z-transformed version. Simply substitute exp(j*2*pi*f/fs) for 'z' in H(z) and calculate the magnitude of the resulting complex number, where fs is the sampling rate, f is the frequency 0..0.5*fs.

If you're using C++, check out std::complex<float>().
added on the 2011-02-07 20:19:46 by trc_wm trc_wm
No snappy comebacks, eh..?
added on the 2011-02-08 16:24:04 by trc_wm trc_wm
I was thinking to reply after analyzing and implementing your reply. But I'm somewhat busy, sorry. Anyway, thanks for the explanation, it was very clarifying.
added on the 2011-02-08 19:42:44 by Danguafer Danguafer

login