digital signal processing

facets of what i deem important knowledge on this topic


related topics

digital sound representation


  • pulse-code modulation / magnitude
  • spectrum: for example frequency in time range or multiple stacked lines of analysis results with colors used to indicate intensity

sample formats

  • float, fixed point, integer
  • floating-point representations are slower and less accurate than fixed-point representations, but they can handle a larger range of numbers easily
  • float can have many values added and then be scaled back into the desired range
  • the larger the underlying bit size of float values, the lower are rounding errors
  • calculation with floats is not trivial, for example summing of floats can lead to quickly accumulating large errors if no error compensation is used for the summing
  • integers might still have to be divided and become fractions
  • in digital to analog converters somewhere conversion to exact integer is done
  • if care is taken that all samples are created as integers and not divided, it would not be for general purpose signal processing but most precise
  • the larger the size, the more different values a sample can have, and the more different values can be in the signal

sampling rate

  • how many samples represent one second of sound
  • the higher the sampling rate, the more frequencies can be represented in the signal
  • the maximum representable frequency is half the sampling_rate, as any higher frequency would be spaced in smaller duration than the sample values represent


multiple separate sound channels like stereo channels are typically stored in one of two ways:

  • non-interleaved: each channel is stored in a separate sample array. for example for three channels 1 1 1, 2 2 2, 3 3 3
  • interleaved: the samples for one index in all channels are stored together in packets. for example for three channels: 1 2 3 1 2 3 ...
  • non-interleaved can be easier to process and interleaved can be more robust to playback interruptions as for example a lag tends to affect all channels at the same time


radians and hertz

two pi radians are one full sine cycle. one hertz is one full cycle per second. one hertz equals sampling-rate number of samples. the maximum representable frequency in hertz is (sampling-rate / 2), an integer if sampling-rate is even.

samples or seconds

sample count is an exact integer measure for a progressing time value, durations or signal widths for example. the use of seconds can be problematic because the length of one sample might be represented with inexact numbers. for example 1 / 44100 = 0.000022675736961451248 and 1 / 48000 = 0.000020833333333333333 seconds do not depend on the sampling rate.


  • stateless: need only parameter values that need not be kept
  • stateful: for example with carryover values that fall outside the currently processed range
  • sample to sample: can affect multiple samples only with state and delay after accumulating samples
  • segment to segment: processors might depend on preceding or following values
  • one to many: output creates a longer signal
  • many to one: a longer signal becomes a shorter one

digital music making tools

  • vst, lv2 plugins or recording environment tools as effects and synthesisers
  • analog hardware devices for synthesizers with keyboards or sequencing
  • software sequencers like fruity loops where instruments, synthesiser sounds, recordings and effects can be layed out and played back
  • taking sound samples and prepare their ordered playback in a program like ardour or cubase
  • using puredata to generate sounds and connect hardware devices via note and trigger values that midi transmits and with graphical interfaces that puredata can create

basic toolset for digital signal processing

  • fft to extract frequency information
  • a way to plot samples
  • creation and modification of sample arrays
  • file input/output
  • interpolation functions for paths. linear, bezier, catmul-rom, b-spline
  • sine amplitude generator
  • phase generator
  • windowed sinc and moving average filters
  • filter bank
  • uniformly distributed random number generator


  • frequency: number of occurrences of a repeating event per unit time
  • amplitude: the amplitude of a periodic variable is a measure of its change over a single period
  • phase: relative shift or progression of a repeating event
  • envelope: for example a path of loudness transition
  • sequencer: specifies the starting points and durations of sounds
  • fundamental dimensions of sound: pressure, time, direction
  • physically sound is air pressure changes in longitudinal waves. physical sound is often created by energy dissipation over molecular bonds. excited solids that oscillate as energy is distributed. the resulting sound is influenced by the mixture of materials, shape, surface tension and more
  • a sound program is a potential for sounds to occur. elements can appear and disappear like entering and exiting a dimension
  • there is always some kind of seed, for example the literal arguments in program code
  • playback equipment is limited in what it can produce. for example a square wave can not be perfectly reproduced for example because there are inertial effects in playback equipment
  • when sequencing of sounds, starting points can be specified relative to a shared starting point like the beginning of a song or relative to the previous note
  • incidence intervals and durations are one way to look at sequencing
  • quantisation: with a many-to-few mapping of values, for example when converting analog signals to digital, multiple input values map to the same values and have to be rounded which reduces imprecision and can lead to aliasing where multiple values converge into one
  • clipping: limiting values to a maximum
  • wave < instrument < composition
  • low frequency: less change between samples
  • "a real discrete-time signal is defined as any time-ordered sequence of real numbers. similarly, a complex discrete-time signal is any time-ordered sequence of complex numbers"
  • a vocoder splits into frequency bands and removes bands
  • every linear time-invariant system can be represented by a convolution
  • "a time series on wikipedia is a series of data points indexed (or listed or graphed) in time order. most commonly, a time series is a sequence taken at successive equally spaced points in time."
  • harmonic: a harmonic is a wave with a frequency that is a positive integer multiple of the frequency of the original wave