Thesis Online Appendix
This is an online appendix for my undergraduate thesis titled Applications of genetic programming to digital audio synthesis. I have prepared an archive copy of the evosynth plugin that will load and play all of the following synthax programs regardless of future modifications to the plugin or language. You can download this archive copy of evosynth for Windows x86-64 which includes all of the algorithms used to produce the results below.
B: Symbolic Expression of Audio Synthesis Algorithms (expanded with Audio Examples)
C: Human Study Data
C.1: Fitness Function Evaluation
C.2: Synthesized Piano Tone
C.3: Audio from Known Synthax Program
target sound
target audio
target sound
target audio
target envelope (extracted from target sound)
target envelope
target sound
target audio
target program
Online Appendix Index
A: Synthax Programs for Mimicking Specific TimbresB: Symbolic Expression of Audio Synthesis Algorithms (expanded with Audio Examples)
C: Human Study Data
C.1: Fitness Function Evaluation
C.2: Synthesized Piano Tone
C.3: Audio from Known Synthax Program
Online Appendix A: Synthax Programs for Mimicking Specific Timbres
The following table contains target mimicking results from tests I ran on a number of different target sounds with the same parameters. The parameters can be found in Appendix C of my undergraduate thesis paper. You can download the synthax programs used to mimic the target and play them as MIDI instruments using evosynth.description | target | best mimic | evolutionary progression |
---|---|---|---|
Bassoon: "an Instrumental sample of a Bassoon playing an C in the 2th Octave", uploaded by the user Carlos_Vaquero to freesound as sound 154328. It has a center frequency close to C2 = 65.41 Hz and was cropped and normalized before running the experiment. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Clarinet: Synthesized clarinet sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A3 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Conga: "TH MULTISAMPLE Recording of a wooden tone drum in a music store", uploaded by the user patchen to freesound as sound 3520. It has a center frequency close to C4 = 261.63 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Cup Tone: "a Cup from my kitchen that i tapped with a musical mallet", uploaded by the user connersaw8 to freesound as sound 125069. It has a center frequency close to Bb5 = 932.33 Hz and is a bit noisy on the low end of the frequency spectrum. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Dan Deacon: From the beginning of the song "Red F" which was track 2 on Dan Deacon's fantastic 2009 album Bromst. It was selected as an example of how one could use the timbre mimicking application to find an audio synthesis algorithm capable of producing and repitching an exposed timbre from a production recording. Contrary to the name of the song, the sample has a center frequency close to C2 = 65.41 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Dial Tone: "A dial tone, made from scratch", uploaded by the user ramicio to freesound as sound 158427. It has a center frequency close to F4 = 349.23 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Harp: Synthesized harp sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A3 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Kick: Synthesized kick drum sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A3 = 110.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Ocarina: Recording of an ocarina uploaded by the user madjad to freesound as sound 21679. It has a center frequency close to G4 = 392.00 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Steel Pan: Synthesized steel pan sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A3 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Trombone: Synthesized trombone sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A2 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Trumpet: Synthesized trumpet sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A2 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Violin: Synthesized violin sound recorded from the Yamaha PSR-510 synthesizer. It has a center frequency of A2 = 220.0 Hz. |
target audio |
overall champ audio
overall champ program |
gen 0 champ audio gen 10 champ audio gen 20 champ audio gen 30 champ audio gen 40 champ audio gen 50 champ audio |
Online Appendix B: Symbolic Expression of Audio Synthesis Algorithms (expanded with Audio Examples)
The following table contains examples that act as audio to accompany the section on Symbolic Expression of Audio Synthesis Algorithms from my undergraduate thesis. They should further illustrate concepts of this section as well as provide information on how to change numerical parameters of synthax programs.description | s-expression | audio | synthax program(s) |
---|---|---|---|
Pure sine wave 55 Hz: An example of several ways to render a sine wave at 55 Hz using synthax. |
Parameter Values: p: 1.0 f: 55.0 φ: 0.0 |
sine wave 55 Hz |
Explicit encoding of the S-expression. Values are stored at every node as 32-bit floating point so there is a little bit of rounding error when the root sin node is evaluated: (sin (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 55.0 55.0 55.0})))) (const {c 0.0 0.0 0.0}))) Using cos with a phase of 0.5*pi to create an equivalent waveform. More rounding error due to text representation of 0.5*pi: (cos (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 55.0 55.0 55.0})))) (const {c 1.57079632679 1.57079632679 1.57079632679}))) Compacted representation using sinoscb_s primitive (assuming 55 Hz is stored in variable 0). sinoscb_s takes a variable frequency input as numerical parameter 1 so if you use this program in the evosynth plugin, you have to play A1 in order to hear a 55Hz sine wave. sinoscb_s uses double (64-bit) precision floating point arithmetic before casting to 32-bit precision at the end, so this sine wave will have less rounding error than the above two: (sinoscb_s {d 0 0 0} {c 1.0 1.0 1.0} {c 0.0 0.0 0.0}) |
Pure sine wave 4 Hz: An example of changing a numerical parameter of a synthax program. Same S-expression as the the row above but with a center frequency of 4 Hz. |
Parameter Values: p: 1.0 f: 4.0 φ: 0.0 |
sine wave 4 Hz |
Explicit encoding of the S-expression: (sin (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 4.0 4.0 4.0})))) (const {c 0.0 0.0 0.0}))) Using cos with a phase of 0.5*pi to create an equivalent waveform: (cos (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 4.0 4.0 4.0})))) (const {c 1.57079632679 1.57079632679 1.57079632679}))) Compacted representation using sinoscb_s primitive (assuming 4.0Hz is stored in variable 0): (sinoscb_s {d 0 0 0} {c 1.0 1.0 1.0} {c 0.0 0.0 0.0}) |
Pure sine wave 55 Hz partial 4: Another example of changing a numerical parameter of a synthax program. Same S-expression as row 1 but with a partial value of 4.0, making the center frequency of the sine wave 220 Hz. |
Parameter Values: p: 4.0 f: 55.0 φ: 0.0 |
sine wave 55 Hz partial 4.0 |
Explicit encoding of the S-expression: (sin (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 4.0 4.0 4.0}) (const {c 55.0 55.0 55.0})))) (const {c 0.0 0.0 0.0}))) Compacted representation using sinoscb_s primitive (assuming 55.0Hz is stored in variable 0): (sinoscb_s {d 0 0 0} {c 4.0 4.0 4.0} {c 0.0 0.0 0.0}) |
Pure cosine wave 55 Hz: Another example of changing a numerical parameter of a synthax program. Same S-expression as row 1 but with a phase value of 0.5π, making this a cosine wave. There will be a pop at the start and end of the audio as the speaker cone moves from 0.0 to 1.0 and vice versa |
Parameter Values: p: 1.0 f: 55.0 φ: 0.5π |
cosine wave 55 Hz |
Explicit encoding of the S-expression: (sin (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 55.0 55.0 55.0})))) (const {c 1.57079632679 1.57079632679 1.57079632679}))) Using cos with a phase of 0.0 to create an equivalent waveform: (cos (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 55.0 55.0 55.0})))) (const {c 0.0 0.0 0.0}))) Compacted representation using sinoscb_s primitive (assuming 55.0Hz is stored in variable 0): (sinoscb_s {d 0 0 0} {c 1.0 1.0 1.0} {c 1.57079632679 1.57079632679 1.57079632679}) |
Sine wave interior: This example illustrates a synthax program that does not produce human-recognizable audio. It is the sine wave rendering equation except without taking the sin of the interior values. This S-expression and all of its sub expressions produce non-periodic waveforms so the human ear will only detect sound when the speaker cone pops back to 0.0 at the end of the waveform. |
Parameter Values: p: 1.0 f: 55.0 φ: 0.0 |
sine wave interior 55 Hz |
Explicit encoding of the S-expression: (+ (* (* (const {c 2.0 2.0 2.0}) (pi)) (* (time) (* (const {c 1.0 1.0 1.0}) (const {c 55.0 55.0 55.0})))) (const {c 0.0 0.0 0.0})) |
Time: This example illustrates how values of time are passed into synthax programs at render time. This S-expression produces a strictly increasing audio signal. This signal is not periodic so the human ear will only detect sound when the speaker cone pops back to 0.0 at the end of the waveform. |
time |
Explicit encoding of the S-expression: (time) |
Online Appendix C: Human Study Data
This appendix contains the sound files and synthax programs for the human study discussed in the paper. All subjects were played an mp3 file with pre-recorded instructions for the test. For specific information about experiment parameters, see my undergraduate thesis paper.C.1: Fitness Function Evalution
The following tables visualizes 8 sounds from both fitness functions which have geometrically decreasing error. They were extracted from generation champions from all of the experiment runs listed in Online Appendix C.2 and include the least fit generation champion and the most fit generation champion across all experiment runs using the same fitness function. The 6 samples in beween the least and most fit are generation champions that had fitnesses closest to perfect geometric spacing in beween the two endpoints. These samples are included as sounds 3-10 and 11-18 in the synthesized piano tone human study.target audio
Frequency-Time Squared Error
audio |
sound 1 (least fit) |
sound 2 |
sound 3 |
sound 4 |
sound 5 |
sound 6 |
sound 7 |
sound 8 (most fit) |
visualization | ||||||||
computed error | 118335.72 | 91562.57 | 70846.77 | 54817.87 | 42415.47 | 32819.08 | 25393.85 | 19648.55 |
adjusted error | 1 | 3.04 | 4.61 | 5.83 | 6.77 | 7.50 | 8.07 | 8.51 |
human score avg | 3.75 (s = 1.16) | 2.75 (s = 1.04) | 4.875 (s = 0.99) | 3.875 (s = 1.25) | 6.0 (s = 1.20) | 5.5 (s = 1.77) | 7.375 (s = 0.92) | 7.125 (s = 0.83) |
Frequency-Time Perceptual Error Weighting
audio |
sound 1 (least fit) |
sound 2 |
sound 3 |
sound 4 |
sound 5 |
sound 6 |
sound 7 |
sound 8 (most fit) |
visualization | ||||||||
computed error | 1000967.73 | 570228.51 | 324846.18 | 185057.47 | 105423.02 | 60057.09 | 34213.16 | 19490.46 |
adjusted error | 1 | 4.87 | 7.07 | 8.33 | 9.05 | 9.46 | 9.69 | 9.82 |
human score avg | 3.125 (s = 1.13) | 3.25 (s = 1.67) | 3.5 (s = 1.20) | 4.625 (s = 1.69) | 3.375 (s = 1.30) | 2.5 (s = 1.30) | 5.625 (s = 1.19) | 7.0 (s = 1.31) |
C.2: Synthesized Piano Tone
The following table contains the experiment runs used to create the sounds in the synthesized piano tone human study. The goal of this study was to establish that a direct encoding of synthesis algorithms is competitive or superior to the indirect encoding used in Garcia's AGeSS system. The target sound file is shown below and was extracted from this video listed in the "Examples" section on Ricardo Garcia's AGeSS website. Generations selected for the evolutionary progression column are equivalent in ratio to the experiment max generation number as those selected by Garcia. The compression on the audio extracted from the video is evident in the spectrogram of the target sound, there are no frequency components present over 5kHz even though the audio was recorded at a sampling frequency of 44.1kHz.target audio
target envelope (extracted from target sound)
target envelope
C.3: Audio from Known Synthax Program
The following table contains the experiment runs used to create the sounds in the audio from known synthax program human study. The goal of this study was to establish that my target mimicking system could re-discover a reasonably simple timbre that it certainly had the capability of reproducing. The target sound file is shown below and was produced by this synthax program evaluated at A2 = 110 Hz: (* (const {c -1 0.848840713500977 1}) (+ (sinosc {d 0 0 0} {c 0.5 2.30810213088989 10} {c 0 0.349400788545609 1}) (* (sinosc {d 0 0 0} {c 0.5 1.13852906227112 10} {c 0 0.048650961369276 1}) (sinosc {d 0 0 0} {c 0.5 5.76627635955811 10} {c 0 0.0419498980045319 1}))))target audio
target program