MATLAB Transient Additive Synthesis Project with CODE!  

If you want to run the program, email me for files at rdb37@pitt.edu . 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
*******************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.  
SPECIAL EFFECTS: Play Crazy Snare  demonstration of enveloped white noise Play a beautiful sound (AM/FM at stable intervals with melody, cluster of 2 offpitch tonals,simple transient power spectrum) Play Grandfather Clock  demonstration of a cluster of 4 offpitch tonals with further tonal/overtonal destabilization FULL LENGTH SONGS: 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) 

% 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 nonsinusoidal 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 1delta 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 equallyspacedf notes around a maxpower 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 topleft clockwise: EXCEL instrument control panel, EXCEL envelope callspace, RealTime Instruments TimbreTesting GUI 