MATLAB Transient Additive Synthesis Project with CODE!

If you want to run the program, email me for files at . Last updated OCT 2018.

Additive Synthesis is a method for creating sound timbres. At its simplest, it is adding (or multiplying) simple sin waves and other contours together, which works because
  1. the simplest mathematical solution to vibration (sound) is a simple sin wave, and
  2. sound obeys an "additive property" such that two separate soundwaves played simutaneously are equivalent to a single soundwave with the components added.
  3. sound is transient, and multiplicative properties can dilate and contract sound qualities over time (volume envelopes are always transient, could also refer to transient power spectrum,FM/AM,etc...) making sound more realistic
What I do is I input 10 dimensions of timbre data into a user-friendly and colorful EXCEL Timbre Building Workshop, then MATLAB compiles and computes the data according to my MASTER sound equation. It plots and plays the sound.

*******************This program contributes only ONE piece to the entire music production puzzle. Go to 'RealTime Instruments' for the next piece of the music production puzzle.


Play Crazy Snare - demonstration of enveloped white noise
Play a beautiful sound (AM/FM at stable intervals with melody, cluster of 2 off-pitch tonals,simple transient power spectrum)
Play Grandfather Clock - demonstration of a cluster of 4 off-pitch tonals with further tonal/overtonal destabilization


Play Sonatina (first attempt at assigning full instruments to a song... sounds so much more real)
Play A Dance in 2 (demonstration of high FM resonating at 1/2 each notes frequency)
Play Bells Trio (High Bells, Low Bells, Synthesized Bass)

  • user-created fully transient harmonic/nonharmonic timbres
  • dedicated EXCEL GUI for timbre control panel and transient envelope calls
  • easy reediting of instrument effects (pitched/semipitched/unpitched instruments)
  • any discrete transient power spectrum with envelope calls
  • destabilization of custom tonal/overtonal groups (using rand function)
  • clustered off-pitch overlay (chorus)
  • any ADSR volume envelope
  • staccato/legato with any ADSR volume envelope
  • transient vibrato and tremolo (low frequency FM and AM) with envelope calls
  • transient high frequency FM/AM with envelope calls, set baseline to resonate at (user-picked) stable intervals with melody
  • Flood Normalization... (If you change the time length of the parent envelope, all child envelopes are proportionally scaled. a FLOOD~~
  • amplitude equalization. HUGE! apply transient amplitude spectrums independent of loudness, so that ADSR controls volume only
  • quick test/edit/retest/reedit cycling of previously built timbres

My Transient Additive Synthesis Discrete Equation:

% y = single row accumulative sound wave vector, time/amplitude normalized to volumemast
% ppp = transient amplitude spectrum proportion array (colsize is equal length as y, rowsize is equal to # overtones), time/amplitude normalized to volumemast
% mm, nn, oo = array element iterators
% freq(qq) = fundamental frequency, scalar (dependent on melody/modulation/8va/vb/chord iteration data)
% transfreq = transient non-sinusoidal frequency modulation envelope, time normalized to volumemast (must be smooth)
% chord(mm) = fundamental frequency multiplier, scalar
% t = note time vector (equal length as y) sampling at Fs
% FM = high/low transient Frequency Modulation vector (equal length as y), dependent on freq(qq) and time/amplitude normalized to volumemast
% AM = high/low transient Amplitude Modulation Array (equal length as y), dependent of freq(qq) and time/amplitude normalized to volumemast
% randstab = random number between 1+delta and 1-delta regenerated each loop in function: randgen... Acts as a pitch destabilizer for tones and overtones.
% error_tonal/error_overtonal = pitch destabilizer scalars for randgen function
% place = tone cluster scalar, superimposes equally-spaced-f notes around a max-power tonal center
% offset = linear additive iterator for place, scalar
% clustersize = number of superimposed clustered notes for place, scalar
% dil/dilsize/flip1 = cluster power dilation variables
% volumemast = MASTER transient ADSR vector (equal length as y)
% noisethres = transient noise vector, time/amplitude normalized to volumemast

%place note in a multi note master wave array, repeat for every note of song (arrays and scalars will change according to sequencer and instrument data), then normalize to max vol
%wave is in correct format to be saved to .wav file


from top-left clockwise: EXCEL instrument control panel, EXCEL envelope callspace, Real-Time Instruments Timbre-Testing GUI