2022-11-25

toolset for music creation

principles and tools employed by sph for music creation

principles

  • avoid post-processing

    • modification of float values can be lossy
    • control as much as possible by initial arguments
    • prefer additive to subtractive processes
  • times and offsets are specified in number of samples in cases where hertz and seconds do not map exactly to sample counts
  • use wavelengths whose extremes fall exactly on samples
  • use a high resolution for processing of modulation. ideally sample resolution
  • processing is done for multiple channels with one array per channel
  • sample format is variable (32 or 64 bit float, ideally more)
  • sample rate is variable (low for fast processing). target sample rate is 96000. a sine of 12000 hz could then still be approximated with 8 samples
  • tend to give up realtime processing for higher precision and more content. render to file, which is common in 3d modeling software
  • when using random number generators, specify random seeds to keep the output repeatable

toolset

  • filtered noise generator whose amplitudes and filter values can be controlled by paths. customisable noise generator
  • sine generator that keeps a continuous phase when frequency modulated and whose amplitudes and wavelength can be controlled by paths. sine(amp, frq, phs)
  • file output with creation of wave files (ideally au, an extremely simple and capable file format)
  • random number generator with customisable probabilities
  • paths

    • interpolation between points
    • linear and rounded (bezier) interpolation methods
    • segment types are linear, bezier, sub-path or constant
  • 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

implementations

  • sph-sp minimal sound synthesis toolkit