badnumbersmusic added code 'Moth drums'

I like the discoey feel. The snare's probably much too noisy but what the hell.

badnumbersmusic commented on 'electro drum kit'

Don't be shy about posting one of your more recent ones then! ;)

I'll fling one up in a bit.

snappizz commented on 'electro drum kit'

heh, this was one of my first attempts at drum sound design and i've gotten much better since, but if it's instructive then i won't stop you :)

badnumbersmusic commented on 'heavy snare'

Nice sounding snare, surprisingly simple too! :)

badnumbersmusic commented on 'LFO blues'

:D The only thing missing is a Booker T organ solo.

badnumbersmusic commented on 'heavy breathing'

Nice! The slight resonance makes it sound like someone breathing through a mask to me.

grirgz added code 'LFO blues'

56228375 added code 'heavy breathing'

An attempt at emulating a breathing sound. Originally made using sonic-visualizer, based on the spectrogram of the first breath in this recording:, and then edited to make it sound longer. Note: needs supercollider 3.9dev.

badnumbersmusic added code 'Xiongnu bells'

Makes a sort of melody out of detuned bell sounds.

jamshark70 added code 'FFT additive oversampling (graphical demo of the sampling theorem)'

I originally wrote this to demonstrate what sampled audio really represents -- that is, if a series of samples represents the one and only band-limited function that passes through the sampled values, we could obtain the band-limited function by adding up the cosines given by a Fourier transform. Further, doing it additively, we could select ranges of frequencies and see, interactively, each frequency band's influence on the final waveform.

  • The Gibbs effect is obviously visible for any sequences of samples that have discontinuities in the value or slope (e.g. non-bandlimited sawtooth or pulse waves).

x = Env([0, 0.75, -1, 1, 0], [0.1, 0.01, 0.4, 0.2]).discretize(128);

  • Inter-sample distortion is clearly visible for 0 dBFS pulse waves.

( var stream = Pstutter(Pseq([24, 8], inf), Pseq([1, -1], inf)).asStream; x = Signal.fill(128, stream); x.plot; )

  • If you use a rectangular window and the window can't play continuously as a cycle, there will be a discontinuity from the end of the window to the beginning. The Gibbs effect is obvious here, too. This is good to demonstrate to students why phase vocoders should pretty much always use a windowing function (e.g. Hanning).

x = Signal.fill(128, { |i| sin(i / 128 * 2pi * 1.1) });

  • Try lots of input signals. It's quite dramatic how the partials reinforce each other in the right places, and cancel in the right places, and always add up.

BTW this example has a lot of UserView tricks. Note, for example, that to do the animation, I had to set a state variable outside the scope of the drawFunc, and 'refresh' the UserView to update the frame.


  1. Set 'x' to a Signal containing 128 or 256 values.

  2. Run the long code block.

  3. The range slider chooses a band of frequencies to include -- the audio equivalent is a pair of PV_BrickWall filters.

  4. The left-hand button will add partials at timed intervals.

  5. The right-hand button will add one partial, and animate the way that the new partial "bends" the waveform. This is really instructive!