Fourier Toy
toxicdump.org
toxicdump.org
0.01, 0.01, 0.02, 0.03, 0.05, 0.08, 0.13, 0.21
It generates a beautiful wave [1].
There's also this interesting property that you can use any part of the sequence, and it will be the same wave [2].
[1] https://www.dropbox.com/s/89fg14dvsi3wuox/Captura%20de%20tel...
[2] https://www.dropbox.com/s/yu05xs10tauumgu/Captura%20de%20tel...
By the way, try the reverse sequence (0.21 .. 0.01). I find it much more calmed and the LHS graph looks quite beautiful
http://nautil.us/blog/the-math-trick-behind-mp3s-jpegs-and-h...
https://news.ycombinator.com/item?id=6683866
In fact, it looks like Lucas Viera may have used that blog post as inspiration.
Lots of HN readers are self-thaught hackers or come from non-theoretic backgrounds... so they likely won't have had a good explanation of it. (Speaking of which, the circle analogy is truly awesome - but how does it work in code?!)
A lot of the math-related articles on Wikipedia are terrible. When you look at the page for the Math project the FAQ basically says 'it's an encyclopaedia, not a textbook, go write on the talk page of individual articles.' The project managers seem hyper-defensive about it, in constrast to the comprehensive and inclusive approach of many other fields. The Wikibooks project is not much better (so far).
I find the Wolfram Mathematica pages more accessible for dealing with new concepts.
Check this out too: http://www.youtube.com/watch?v=QVuU2YCwHjw
Edit: Didn't realize that this was also linked to in another thread on the front page as well.
You could easily make one with (or download a premade one for) Reaktor or Synthmaker (now called Flowstone DSP) or Max/MSP. Kyma is another system for doing so, but very expensive as it's hardware based. Pd/Puredata is free, albeit ugly. Various plugins exist, from VSTi's to rack extensions for Propellerheads' Reason. If you're feeling brave/patient and you want to do it in a hardware instrument, then you can get hold of a Kawai K5000 for only a few hundred $. If you're code-inclined (ugh* ) then try Supercollider or Csound. A related but slightly orthogonal techniques is spectral manipulation using tools such as Metasynth (Mac, $$$) or Coagula (Win, free). Neither of these latter two have seen an update for a long, time, reflecting the general lack of popularity of this technique.
(All these Italicized words are well-known product names, BTW that should come at or near the top in any search engine)
Also, check out http://amaranthaudio.com/ for Cycle which is new and impressive, though a bit clunky last time I checked. I'm hardware based but this is the first instrument I've seen in a while that could draw me back to the PC. I'm sure there's a bunch of iPad apps too, but not having an iPad I only check that platform occasionally.
Additive synthesis is a lot of fun but because there are so many harmonics to play with it's very easy to go astray and end up making clangorous noises that are not particularly musical or natural sounding; of course this makes them an automatic go-to for sci-fi noises, but the problem is that everything sounds unnatural in much the same way, if you see what I mean - the brain says 'ah, that's a very unnatural arrangement of harmonics' and gives up for all but the simpllest cases, much as it decides that poorly-designed FM sounds are quite noisy or that distorted sounds certainly involve a lot of clipping. It's still interesting territory for any sound nerd to explore, but don't expect m/any of your friends/loved ones to share your enthusiasm for such esoteric timbres.
* writing code is a rather masochistic approach to producing sounds IME.
If you just want to do it by numbers without interface, and get as mathematically crazy as you like, R has some simple "turn a timeseries to a wav file" libraries.
Also to add: quite a few ipad apps that let you sketch in either a wave form or a spectrum, then turn knobs on it like a synth. Addictive Synth is one that lets you draw spectra freehand; WaveGenerator lets you put in various surfaces or even pictures and "listen" to them. This specific method is called "Wavetable Synthesis".
I should also have mentioned that Mathematica makes this sort of thing quite accessible as well, and if you can't afford it or are just a hobbyist they are pretty liberal with their student licensing. http://reference.wolfram.com/mathematica/guide/SoundAndSonif...
Wavetable synthesis involves a table of single-cycle waveforms that you then sweep through, either manually or preferably with some sort of modulation source. The PPG Wave is the most famous case, and Ensoniq's Transwave technology was basically the same thing. Typically you'll start with 2 waves of completely different harmonic spectra and interpolate between them. IIRC there's a quite affordable PPG wave for iPad now from Wolfgang Palm (who is the authority on this method of synthesis).
To mimic an existing sound, such as an organ, I once used audio software to plot the FFT of the original sound, then manually entered the amplitudes of the fundamental and harmonics in a ZynAddSubFX XML instrument definition. I'd like something that automates that process.
Edit: regarding spectral manipulation, there is also SpectraLayers.
If you really want to create an arbitrary waveform (and I caution you that much of the timbre is in the attack and decay and harmonic filtering effects) the simplest way for non-engineers to do that is to use something like an Arduino with a Adafruit Waveshield and a scripted tool to generate .WAV files. The production path then is 'gen file, copy to SD card, stick in WaveShield and hit reset'.
As for copying a file to an Arduino... you know you can play wav files on your computer right?
Unless there is some more fundamental way in which they are equivalent, in which case I would be eager to learn more.
I did get a chance though to re-read chapter Chapter 3 "What is FM" and marvel at the relatively simple way it composes into very complex waveforms.
Here's a link to the library: https://bitbucket.org/cmcfarla/waveout
It's stupidly simple C code -- you just need to use three functions: One to open a file for writing audio, one to write a stereo sample, and one to close the file performing cleanup and bookkeeping. I included two examples -- a really basic example to just create a sine wave, and a slightly more complicated one that creates a sine wave with a panning effect.
While I've written a lot of code before, it's rare for me to put code up as open source. So, if I've missed something important, please let me know.
(A rare piece of software not getting older with time; and in general, other Falstad's simulations are great, especially Ripple Tank for optical interference and electric circuits.)
Nicely done.
I'm a bit rusty but going up by 2n (1n,2n,4n,6n...) gives you the even harmonics, the opposite (1n,3n,5n,7n...) gives you the odd harmonics. Old tube-amps are known for keeping the odd harmonics around, it's a "warmer" sound.
edit: fixed the series