toolset for music creation

principles and tools employed by sph for music creation


  • avoid post-processing

    • every modification is lossy
    • control as much as possible by initial arguments
    • prefer additive to subtractive processes
  • all times and offsets are specified in number of samples because hertz and seconds dont map exactly to sample counts, only sample counts are exact
  • sample rate is 96000 fixed. a sine of 12000 hz could then still be approximated with 8 samples
  • use wavelengths whose extremes fall exactly on samples
  • use a high resolution for modulation processing. ideally sample resolution
  • processing is done for multiple channels with one array per channel
  • the internal sample format is 64 bit float or larger. integer might be preferred but lacks compatibility
  • give up realtime processing for higher precision and more content. render to file as common in 3d modeling software
  • when using random number generators, use random seeds to make the output repeatable


  • filtered noise generator whose amplitudes and filter values can be controlled by paths. customisable noise generator
  • wave generator that keeps a continuous phase when frequency modulated and whose amplitudes and wavelength can be controlled by paths. customisable wave generator
  • file output with creation of au or wave files. au is an extremely simple and capable file format but unfortunately not as well supported
  • random number generator with customisable probabilities
  • additive fm synthesizer with partials that have start and end times and can frequency modulate others
  • paths

    • points and interpolation methods are specified to create paths
    • the path can be sampled for a time offset to get a point
    • points between given points are interpolated
    • linear or rounded (cubic, catmull-rom, bezier) interpolation methods
    • paths can be of any dimension
    • custom functions possible as segments
    • paths can be segments
    • multiple paths can be combined by a custom function. for example values can be summed
    • other operations: stretch, scale, reverse
    • event times are specified path-relative
    • spline-paths are implemented as an object that can be used to get points with a function (path time -> point)
  • sequencer

    • for partials and whole songs
    • calls functions that write to sample buffers at specified times
    • called with a time offset, output buffers and an event list
    • sequencer calls can be nested to build composite sounds, patterns and riffs
    • processing can be done in parallel (top-level use) or serial (nested use)
    • event

      • have the properties (state start end function)
      • multiple events can be grouped into one event
      • output can be post-processed
      • output can be cached
  • filters

    • windowed-sinc band-pass that optimises to low-pass and high-pass at the edges

    • state-variable filter with low/high/band pass output for cheaper filter operation

    • all filters must be able to filter a series of sample arrays seamlessly


  • sph-sp minimal sound synthesis toolkit