Sonic Shredder v0.2

This summer, I had the privilege of working on a software project with a client who trusted my aesthetics implicitly. He understood what I was about, and asked me to make him a software instrument in SuperCollider that could eat other software instruments for breakfast. In return, I gave him the Sonic Shredder.

Clearly, I was not out to win any beauty contests. 😛 The GUI is fully functional, however, with progress bars that track the position in the files they represent, which can be manually scrubbed with a mouse click. Every parameter can also be assigned to MIDI input, and presets (both of GUI values and MIDI connections) may be saved and loaded. It runs on both Swing (Linux / Windoze) and Cocoa (MacOS) gui schemes, and has been tested on recent as well as slightly-less recent builds of SC 3.4. It is extremely playable.

You may view / download the source here.

SONIC SHREDDER consists of 3 main components:

  • SHRED (4x) - granular instruments capable of chopping, looping, and scrubbing soundfiles.
  • SHATTER - a filterbank (with 8 bandpass filters) each of which feeds a separate granulator and separate delay line, useful for shattering a sound into prickly particles or dense streams.
  • SPIT - a 3-layer waveshaping distortion unit which uses low-frequency sinusoids as its transfer functions.
  • Together with comprehensive MIDI support and preset management, the SONIC SHREDDER is capable of a nauseating universe of extreme sonic oblivion.

    Master Levels:

    these default to 0, which is muted. there is one fader for each module, and one fader (SUM) for the total output of the SONIC SHREDDER. these may be assigned to midi controllers and their values stored in presets.

    SHRED (grains):

  • amp - amplitude of the granular instrument. this gets scaled by the SHRED master level fader at the bottom left of the panel.
  • rate - the speed at which the cursor tracks through the soundfile. in tracking mode, press either the ">" or "<" button to determine the direction the cursor will go.
  • pitch - the pitch of the grains. this gets modulated by the "jpitch" parameter.
  • trate - the rate of new grains. new grains may be muted randomly by the "prob" parameter.
  • dens - the duration of each grain in seconds.
  • prob - the probability that a new grain will occur at trigger time.
  • pan - the pan position of the grains. -1 is left, 1 is right.
  • width - randomness applied to pan position.
  • jpos - randomness applied to the position of the cursor in the soundfile.
  • jpitch - randomness applied to pitch.
  • send_a - a pre-fader send to the SHATTER module.
  • send_b - a pre-fader send to the SPIT module.
  • scrb / trk - toggle scrubbing versus tracking mode. in tracking mode, the cursor moves according to the "rate" parameter, in the direction indicated by the "<" and ">" buttons. it will loop over the area defined by the blue range slider beneath the cursor. in scrubbing mode, you may manually move the cursor over interesting parts of the soundfile. to enable midi control over this parameter, you must be in scrubbing mode.
  • ON - turns the granular unit on. you must have selected a valid soundfile to granulate *and* a valid grain envelope file (located beneath presets on the top right of the panel).

  • SHATTER (filterbank):

  • freq - frequency of the bandpass filter, relative to a fundamental. this value gets multiplied by the "fund" parameter at the bottom of the filterbank.
  • rq - reciprocal of Q of the bandpass filter. Q is defined as the frequency over the bandwidth, so rQ is the bandwidth over the frequency. Q = (fℴ / Δf) , so rQ = (Δf / fℴ) . as rQ approaches zero, the resonance increases. since filterbank this uses constant-Q filters, the bandwidth will stay proportional to the frequency.
  • del - delay time in seconds of the comb filter (delay). this gets saled by the master "del" fader at the bottom.
  • dec - 60 dB decay time in seconds of the comb filter.
  • there are 8 of these filters, arranged in parallel. after each filtering stage, there is a granulation stage, where the probability of a grain passing through is determined by the "prob" parameter. SHATTER uses a hanning window for its grains. w(n) = 0.5 ( 1-cos(2πn / N-1)) . the master control of "del" scales all of the individual delay times in the filterbank.

  • send_b - a pre-fader send to the SPIT module.
  • SPIT (waveshaper):

    a waveshaper produces distortion by indexing into the phase of a transfer function. the SPIT module uses three independently tuneable sinusoids as its transfer functions. these are applied in parallel, and then summed together. NB - in v0.2 these outputs are spatialized in the stereo field. see the commented out portion of the SPIT synthdef below for more details.

  • f0, f1, f2 - the frequencies of each sinusoid. 0 Hz is permitted (and is more or less the simplest case to model with mathematics).
  • o0, o1, o2 - the phase offset of each sinusoid. assuming frequency = 0 Hz, an offset of 0 will provide odd harmonic distortion, because you are indexing into a sine wave. an offset of π/2 will provide even harmonic distortion, because you are indexing into a cosine wave. all phases are permitted.
  • pre0, pre1, pre2 - the pre-gain of each distortion layer. think of this as the index of modulation in Frequency Modulation synthesis.
    post0, post1, post2 - the post-gain of each distortion layer. think of this as the volume of the layer.
  • these layers are summed, and their output is scaled by the "SPIT" master level at the bottom left of the panel.

    Presets & Midi:

    the SONIC SHREDDER is capable of storing preset scenes which contain all fader values, all file paths, and all midi routing data. these are stored as legal supercollider code, to allow for easy manual editing and debugging.

    saving & loading:

    to save a preset, simply click the "save" button, locate a directory, and name the file in the dialog. to load a preset, click the "load" button, locate a previously saved preset, and open it. to make your changes apply to the panel, hit the "load" button again, which will now read "apply".

    no paths / load paths:

    sometimes, during playback, changing the path of the soundfiles or the envelope file will cause stress to the synthesis server, and could cause a crash. this phenomenon usually occurs only during important performances. to prevent the preset from loading these paths, click the "no paths" button. it will toggle into a "load paths" button. to safely load a new soundfile or envelope, turn off the SHRED module you wish to modify before making changes. if you would like to make changes to the envelope file path, you must turn off all SHRED modules. the SPIT and SHATTER modules will not be affected.

    midi learn mode:

    to control a fader with a midi controller, simply select the desired fader (not the number box or label!) and hit the "L" key on your keyboard (shift is not necessary.) then wiggle the desired controller. the fader should move with the controller now. you must hit the "L" key once more before moving any other controller or selecting any other fader.
    the controller you use must send midi cc messages and cannot be a key or button. panel buttons cannot be linked to midi devices at this time. you may assign multiple faders to one controller, but assigning multiple controllers to one fader may cause errors. to be safe, i would not recommend doing either, but whatever... 🙂

    really the best way to learn how this stuff works is by playing with it. make sure your speakers or headphones are loud enough for you to enjoy it for reals. don't be a wuss.

    if you have questions, bug reports, or comments, please contact me @ joe (dot) mariglio (at) gmail (dot) com
    if you have feature requests, be prepared to give me some kind of compensation. :$ feel free to distribute this software. i only ask that you include my pithy comments and documentation contained in this header. also, if you haven't yet, you should check out my website for more software, circuit schematics, free music, and other oddities.

    I have already recorded a lot with this instrument, and cannot wait to take it on tour. I'm using a korg nanokontrol usb fader box on it, and it runs amazingly smoothly on the new linux machine I just built, as well as on my older mbp. As of this writing I am working on a new album which almost solely uses this instrument to repurpose sounds from the MOLTEN LAVA EYEBALL FIEND archives.

    Happy shredding! ^_^

    2 thoughts on “Sonic Shredder v0.2

    Leave a Reply

    Your email address will not be published. Required fields are marked *