Looking for interesting sound synthesis algorithms

- ask away
Shepherd_of_Anu
mnml maxi
mnml maxi
Posts: 624
Joined: Fri Jul 25, 2008 4:14 am
Location: The space between space

Looking for interesting sound synthesis algorithms

Post by Shepherd_of_Anu »

Last night I found a java tutorial to synthesize sound and then save it to a file. I was up till till the wee hours of the morning messing around with different algorithms, seeing what kind of sounds I could create.

Anyone have any good algorithms or even just interesting math functions that produce unique waves?
Dektro
mnml newbie
mnml newbie
Posts: 76
Joined: Sat Aug 23, 2008 8:03 pm

Post by Dektro »

Link to the tutorial?
Shepherd_of_Anu
mnml maxi
mnml maxi
Posts: 624
Joined: Fri Jul 25, 2008 4:14 am
Location: The space between space

Post by Shepherd_of_Anu »

http://www.developer.com/java/other/art ... Sounds.htm

I reformatted the code to make it more readable but I can't post it here because the text looses all its indentations which makes it even harder to read so just grab it from the website. You can compile and run it right away. If you want to jump right into it you can go down to some of the premade sound generators and start messing with them.

I would suggest actually reading the tutorial though, at least the parts where he talks about just how he goes about making the sounds.

Last night I was thinking... I wonder what it is about analog hardware that make people feel like it has a sound unique from digital signals. Maybe it is caused subtle irregularities in the electronic components, like the capacitors and resistors and such. I would like to record a long sine wave on an analog synth with a reputation for having a real "analog sound." I would then do a statistical analysis of the signal to determine the standard deviation from a mathematically generated sine wave. I would like to do the same thing for a whole bunch of different signal types and then try to come up with an algorithm for "analogizing" a sound signal.

Anyone have any thoughts on the subject?

BTW, if anyone has a synth they consider to have a superb "analog sound" it would be cool if you could post a long sample of sign, square, triangle and saw waves. Like a minute long at 24bit 96000k wave.
oblioblioblio
mnml maxi
mnml maxi
Posts: 2556
Joined: Wed Apr 19, 2006 1:38 am
Contact:

Post by oblioblioblio »

It's a really interesting topic... I don't know what the science is behind it.

Analogue oscillators are often extremely precise... the temperature can be cause instabilities but I don't really believe that is the reason for the difference in the sound... I've heard digital plugins with destabilization algorithms and they still sound like digital.

The most common analogue oscillator design is based around a capactitor that slowly fills up and discharges, which is controlled by a transistor. This creates a saw wave, and the other waveforms are derived by applying shaping to this basic saw. (Pulse and square are determind using a comparator.. which looks for a value and either outputs 'hi' or 'low' depending... i.e. if it's looking for a middle value you will get a classic square with 50/50 width)

Another version of this same circuit is the so-called 'triangle core', which uses a similar version of this capactor charging discharging design as the core waveshape from which the others are derived.

I honestly can't say why these cimple circuits sound so much "better" to me subjectively than a digitally derived waveform. There is a difference, that much I can gaurantee.

The ear is a fantastically sensitive device, and can easily discriminate the difference between things which scientists would say are "the same"

I can record samples for you. unfortunately can only use inbuilt PC soundcard which will have crappy converters and low bit rate / sample depth.

IMO. If you want to create interesting digital algorithms... forget everything you know about analogue... start from scratch.
oblioblioblio
mnml maxi
mnml maxi
Posts: 2556
Joined: Wed Apr 19, 2006 1:38 am
Contact:

Post by oblioblioblio »

i also would say that you want to spend a while in person with an analogue synth... and soak it up musically.

Scientifically, both digital and anlogue sound generation are not dissimilar, but in practise as a musical tool, the differences, to me are really noticeable.

Try to go round a friends house and spend some time with a good analogue synth.

Hopefully you know someone with this fucker here (unlikely)

http://www.youtube.com/watch?v=fBVqsNJh2vg


Might as well also mention, that digital and analogue have different strengths and weaknesses, and it can be down the the musician whther they appreciate one or another (or like a mixture). Wendy Carlos complained that Moog oscillators were too fat for her compostions, and of course many generations of musicians afterwards are searching for that special Moog fatness.
Shepherd_of_Anu
mnml maxi
mnml maxi
Posts: 624
Joined: Fri Jul 25, 2008 4:14 am
Location: The space between space

Post by Shepherd_of_Anu »

I think aged electronic components may colour the sound. Sometimes components don't fulfill their functions as well as time goes by. Seems to me from anecdotal stories that capacitors seem to be particularly affected by the passage of time. My friend just had to replace all the capacitors in his monitor because the screen wouldn't start up for a long time and there was colour issues. That was more because of defective components rather than time though. I imagine that old analog gear probably sounds a little different than the day it was made.

Don't worry about recording the samples. The project would require high quality samples on a system with a low signal to noise ratio. It wouldn't take much to throw off the numbers I think. Integrated cards usually have a lot of noise from neighbouring components. Even my external card picks up noise that is noticeable when I crank up the volume with silence.

How do you record all your gear? Seems a shame to have all that cool gear and no good way to record it.

I want to learn more about signal processing, there is so much to know. I found a textbook that looked good... turns out it is $500 and that is just for volume 1. Crazy.

Trying to learn more about the riff/wav format too. All those chunks, sub-chunks, and stuff. Its pretty dull but if I could get to know it inside and out then I think there is some pretty cool stuff that could be done. Trying to get into the nitty gritty details.

That guy's synth is pretty slick. I used to have an analog synth when I was a kid. Don't know what happened to it over the years. probably lost or sold in some move.

I the biggest difference between analog and soft synths is when you start tweaking knobs because with soft synths users are limited to midi with doesn't offer the acuity and smoothness of a dial with a direct line to a potentiometer, or whatever it is people are turning in there.
oblioblioblio
mnml maxi
mnml maxi
Posts: 2556
Joined: Wed Apr 19, 2006 1:38 am
Contact:

Post by oblioblioblio »

yeah components change somemwhat with age, although one of the filters I have uses capacitors built in the 50s and it sounds incredible. Although I believe some types of capacitors (electrolytic), and some built with degradeable components are much more sensitive to decay.

It's a myth though that analogue is imprecise and that you can replicate analogue with digital, by making digital less precise.

Signal to noise ratio is a tradeoff in analogue though, a lot of the best components I have, have some flaws in terms of signal to noise ratios. But it's worth it. I wouldn't consider the noise part of the charm though.

I'm not 100% sure about long term recording solution yet... for the past few months I've just been playing/practising and not really recording. I'm aiming towards playing live quite a bit.... I'd quite like to distribute my music in analogue form, but it requires quite high investment, maybe uncessarily so. Might just get a good sound card with 2 stereo in and record at 192 khz if possible.

I'm not 1 to write off digital, but for me I've been there and done that... explored it as deeply as I could, and I much prefer discrete voltage machines in a network.

Yeah for sure a potentiometer is a wonderful way to interact with a machine. It's a human controlled variable resistor with infinite resolution. I don't think that's the only thing, however.
Last edited by oblioblioblio on Thu Mar 31, 2011 1:39 am, edited 1 time in total.
oblioblioblio
mnml maxi
mnml maxi
Posts: 2556
Joined: Wed Apr 19, 2006 1:38 am
Contact:

Post by oblioblioblio »

a bit OT, but this is a damn fine sound synthesis algorithm: (although not digital)

http://www.youtube.com/watch?v=T_-1yLSWOno
Post Reply