This directory contains musical recordings (subdirectory "music"), recorded research presentations ("talks") and recordings of many classes I\ve taught at UCSD. The classes are named by course number and date, so that "206.16w" means "Music 206, 2016, winter quarter". You can find corresponding syllabi and other course materials, in, for instance, msp.ucsd.edu/syllabi/206.16w . Here are some notable ones: 170.21s Musical Acoustics 171.20w Computer Music 206.12f Real-time computer music software design 206.15w Feedback and distortion 206.15f Stored and live control streams for real-time electronic music 206.18s Frequency-domain audio techniques 206.19s The voice as musical instrument 206.20s Inside Pure Data 270b.22s Analysis of musical sound 270c.21w Compositional Algorithms 271b.21s Survey of Electronic Music Techniques COPYRIGHT NOTICE: unless otherwise noted, all media and supporting text files are copyright Miller Puckette, available under the standard Creative Commons share-alike license. If you would like to share your own modifications (for instance as part of other open courseware) please contact me and I\'ll be happy to accomodate you. What follows are tables of contents for some of the more recent videos, intended for easy searching. The videos themselves may be watched online or downloaded. ----------------------------------------------------- Music 170. Musical Acoustics. Spring quarter 2021. course materials: msp.ucsd.edu/syllabi/170.21s/ recordings: msp.ucsd.edu/media/170.21s/ contents of recordings: msp.ucsd.edu/media/170.21s/170-01a-mar30.mp4: Meeting 1, March 30, 2021 0:00 syllabus - who should take this course and what you'll learn 5:30 about contract grading and how its used in this course 23:00 about the sound prompts (Ozzie and Harriet laugh and Wilhelm scream) 24:40 intro to Audacity sound editor, to play laugh track 29:11 Wilhelm scream sample 36:00 Pure Data and the acoustics library 37:00 spectrum of a sinusoid using Pd acoustics library 40:30 how to make patches using the Pd acoustics library 42:00 the path in Pd (how to get Pd to find the objects in the library) 43:00 the library as a directory 44:00 the file 1.LIST.pd - all the objects. How to get help. 44:30 the "sinusoid" and "record" library objects. 45:00 edit mode and run mode in Pd 49:30 installing Pd on Microsoft windows 50:00 (three minutes of flailing) 54:00 downloading Pd on Windows 56:00 downloading the acoustics library 57:00 adding acoustics library to the Pd search path 58:00 oops, have to find where it went and unzip it 1:00:00 finally succeed in adding folder to path msp.ucsd.edu/media/170.21s/170-01b-apr1.mp4: Meeting 2, April 1, 2021 0:00 incitement: dumb card trick 1;30 warning about in-ear headphones 3:30 first version of dumb card trick movie 4:30 how audio and image work together in a movie 5:00 version 2 of dumb card trick 6:00 version 3. 7:30 different functions of sound and image in a movie 10:00 more about the example and choices made in making it 14:00 why the smiley face? 17:30 more about video sound tracks 19:20 back to course organization and contract grading 24:00 make sure you have version 6 of Pd acoustics library 26:30 course "canvas" page 31:00 the Pd acoustics library: the "record" object again 32:30 setting length of the recording 34:00 listening to output of the "record" object 36:30 the "meter" object 37:00 using audacity to see the individual audio samples. Sample rate. 39:00 resolution (word size) of an audio recording 40:00 basic properties of a recording: sample rate, word length, number of channels 40:30 the PCM and compressed audio format (only use PCM for Pd or Audacity) 42:30 recording a sinusoid using the acoustics library 43:00 peak amplitude of a sinusoid. Meaning of amplitude. 45:00 the meter shows average amplitude in two units (RMS and decibels) 45:30 frequency and starting phase (with amplitude, 3 properties of a sinusoid) 47:00 chapter 1 of the course notes: sinusoids 49:00 decibel scale 51:00 difference between acoustic amplitude and amplitude of a recording 52:00 two stages of conversion: sound/voltage and voltage/binary 54:00 what changing amplitude and frequency of a sinusoid sounds like 56:00 changing the amplitude and the frequency of a recorded waveform 57:30 the "multiply" object can change (scale) the amplitudes in a recording 1:01:00 mathematical description of changing frequency and amplitude 1:03:00 what "up" and "down" mean for amplitude and frequency 1:05:00 amplitude range of audio (-1 to 1 externally but freely variable in Pd) 1:06:00 average amplitudes shown by the "meter" object 1:07:00 multiplication by 0.1 decreases RMS by 0.1 and lowers decibels by 20 1:08:30 definition of RMS (root mean square) average 1:10:00 decibels are for describing proportions between amplitudes 1:12:00 more about decibels: multiple gain stages 1:13:30 what "gain" means 1:15:00 difference between dB (decibels) on meter and dB in "output" object 1:18:30 reminder: know your IA msp.ucsd.edu/media/170.21s/170-02a-apr6.mp4: Meeting 3, April 6, 2021 0:00 incitement: phased looping inspired by Steve Reich's Piano Phase 3:00 reading sounds into "record" object: set length first 6:00 second copy in a second "record" object 7:00 playing the two loops together 9:00 relative phase of two sound loops 13:00 musical example: Charles Dodge, Any Resemblance Is Purely Coincidental 16:00 subject of the original opera aria ("Vesti la Giubba") 17:20 closer examination of the first 30 seconds of the piece 19:00 importance of the visual component of the piece 20:30 about the endlessly repeated word "recitar" 21:30 implications of using Caruso's voice in a 20th-century musical language 24:20 the dissected laugh 29:00 modern echos: "sampling" 31:30 ending: recognizable "money notes" and return (and fadeout) of orchestra 35:30 "great moments in opera" TV commercial 37:00 organization: back to the course canvas page; about projects and labs 51:00 More about using Pd: inputs and outputs and connections 52:00 why logarithms? demonstration of changing frequencies and amplitudes 59:30 sinusoid animation to see waveform, frequency and amplitude another way 1:02:00 starting phase (sine versus cosine) 1:03:00 arbitrary amplitude and starting phase 1:04:00 at a fixed frequency, sinusoids are all combinations of sin and cosine 1:06:00 raising the frequency by a factory of two 1:06:30 period of a waveform 1:08;00 adding in harmonics: sinusoids of multiples of original frequency 1:10:00 period of the resulting waveform 1:12:00 higher frequencies 1:13:00 setting frequency to halve the sample rate 1:14:00 foldover (frequency equal to sample rate is same as zero frequency) 1;17:00 maximum is half the sample rate. Standard rates are 44100 and 48000 msp.ucsd.edu/media/170.21s/170-02b-apr8.mp4: Meeting 4, April 8, 2021 0:00 review of contract requirements (A and B projects; all do 8 labs; (C contract does one ninth lab instead of projects) 1:40 incitement: pulse width modulation made from sawtooth waveforms 5:00 spectrum of sawtooth wave 6:00 no perfect sawtooth wave in digital audio 7:30 you can hear a 55-Hz sawtooth wave even if your speakers can't play 55 Hz. 8:30 subtracting two waveforms using the acoustics library objects 10:30 rectangle waveform 11:00 single sawtooth versus difference between two of them 12:00 detuning the second sawtooth 14:00 spectrum of rectangle waves with changing pulse width 15:30 Two Women, Four Voices by Trevor Wishart and waveset repetition 17:30 first two minutes of piece (part 2, Princess Diana) 19:00 pitch correcting voice versus waveset repetition 20:00 recording from microphone to Audacity 21:00 changing the level of the recording 23:00 close-up of waveform of recorded voice 24:00 duplicating entire periods of vocal waveform 25:00 back to original recording, duplicating waveset insted of entire period 28:00 result of duplicating 3 successive wavesets 29:00 Audacity is very powerful - you can run any lisp function on the samples 30:00 stereo and mono soundfiles in Audacity 32:00 making a sinusoid in Audacity 34:00 (oops, mixed it down wrong) 34:00 select both tracks and reselect "mix and render to new track" 35:00 first mixing result 36:00 time-shifting one of the two sinusoids before mixing 37:00 third mixdown, another phase shift, lower amplitude output 39:00 beating between 1000-Hz sinusoid and 1002-Hz sinusoid 40:30 phase difference is changing in time between the two sinusoids 41:00 apparently changing the output's amplitude 41:30 "fundamental formula of computer music" (my private term for it) 43:30 applying the formula to the Audacity example to explain result 46:00 make beating effect by adding two sounds slightly out of tune 47:00 back to Pd, making a short vocal recording using acoustics library 48:00 applying gain to microphone input using "multiply" and "constant" objects 49:00 playing it back straight 50:00 multiply the voice recording by a sinusoid 51:00 sweeping frequency of sinusoid 52:00 try it with a sinusoid to see what happens to spectrum 54:00 This is called ring modulation 56:00 interference effect between two detuned sawtooth waves 1:00:00 For input sounds, you can use "vdelay" instead of detuning to change phase 1:02:00 doubling the perceived pitch by delaying by 1/2 period of a waveform 1:05:00 this is an example of a filter. 1:07:00 white noise using the "noise" object in the acoustics library 1:08:00 filtering white noise using the "vdelay" object 1:09:00 objects used in the second lab assignment 1:09:45 graphical view of what happens when two sinusoids are added 1:11:00 different phases give different gains 1:13:00 detuning one sinusoid makes the phase difference change in time 1:13:30 120 degree (1/3 cycle) phase difference, same amplitude out as in 1:14:00 what this implies for incoming noise signal 1:16:00 analogy with light: diffraction gratings and oil films on puddles 1:17:30 sound engineers call this a comb filter msp.ucsd.edu/media/170.21s/170-03a-apr13.mp4: Meeting 5, April 13, 2021 0:00 incitement: paulstretch "effect" in audacity applied to Wilhelm scream 2:00 different quality of sound when stretched out 2:30 pitch comes through but "presence" is lost 4:00 how to fade sounds in and out 4:30 fading is done using multiplication (applying time-verying gain) 5:00 paulstretch on ozzie-harriet laugh track 7:00 cackles at end of laugh track 7:30 cross-fade between the two stretched sounds 9:00 hmm, timing of crossfade is too abrupt 10:00 changing timing of crossfade (alignment and fade times) 11:00 artistic example: Jacqueline George, Just a Market 12:45 historical context 13:30 how to make political statements without being thrown in jail 15:30 coughing sound emerges from crowd 16:30 function of repetition effect in the piece (presaging a later event) 17:30 ending of piece, automatic rifle fire echoes cough 19:00 keeping meanings ambiguous 20:00 genre is soundscape composition 21:30 more specifically narrative soundscape composition (Yvette Jackson's term) 23:00 preparation in the piece is a kind of repetition 24:00 what happens when a sound comes back in a piece later in time 25:30 what to start with (be clear on purpose, or maybe do the exact opposite) 27:30 the opposite approach: Eno and Schmidt's Oblique Strategies 31:00 theory and technique: more on filtering 31:20 preparatory aside: recording level and gain stages. 31:40 saturation (clipping) 32:30 dynamic range of a signal 33:00 bottom of range is (usually) noise floor 33:30 difference between normal speech level and background noise 34:00 sound being recorded should be well above noise floor 35:00 top of dynamic range (loudest signal achievable) 35:45 signal to noise ratio, in dB. Dynamic range of human hearing is 100dB 37:00 stages of conversion, each (ideally) with a variable input gain 38:00 even though we're now streaming, it's also a form of recording 39:00 clipping at input of interface and its noise floor 39:30 aligning dynamic range windows at two stages of conversion 41:00 find the stage with the smallest dynamic range 42:30 easy way to line these up is to measure or set headroom 44:30 if you clip or get too much noise there's no easy way to fix later 44:45 not a good strategy to go looking through things on the web 46:00 microphone placement 47:30 getting the mic close to the source improves dynamic range of recording 49:00 try this experiment with your phone 50:00 back to incitement: time stretching using the acoustics library 52:30 this is an impoverished time stretcher, but OTOH it's real time 54:00 filters in the acoustics library 55:00 the low-pass filter ("lowpass" object) 56:00 spectrum of low-pass filtered noise 57:30 frequency response (gain as a function of frequency) of a low-pass filter 58:00 0 dB gain at low frequencies, and a settable rolloff frequency 59:00 band-pass or resonant filter: center or resonant frequency 59:30 gain at center frequency (peak gain), not always 0dB in practice 59:45 a 0 dB gain is a "unit gain" (0 dB is unity). Linear ("RMS") gain is 1. 1:01:00 bandwidth of a band-pass filter 1:02:00 "Q" ("quality") of a bandpass filter. Q of zero means no filtering 1:02:40 Q is defined as (center frequency) divided by bandwidth 1:03:00 why we use "Q" as a measure of filter bandwidth 1:04:00 band-pass filter with center frequency 1000 Hz, Q=10 (bandwidth 100 Hz.) 1:05:00 watch out when you decrease Q with speakers open 1:05:30 set level with Q=0, then increase Q if you want. 1:06:00 what Q=100 sounds like 1:06:45 filtering a sinusoid 1:08:00 using "meter" object to measure output level as function of frequency 1:08:45 band-pass filter applied to sawtooth at 2 Hz. 1:09:00 what a 2-Hz. sawtooth sounds like 1:09:30 sawtooth at 2 Hz through a bandpass filter with Q = 100 or 1000 1:11:00 recording of bandpass output. Exponentially decaying sinusoid 1:13:00 Ozzie-Harriett-laugh through band-pass filter, Q=10 1:15:00 filtering output of paulstretched laughter 1:16:00 making a major chord out of it 1:17:00 band-pass filters can impose pitches on recorded sounds msp.ucsd.edu/media/170.21s/170-03b-apr15.mp4: Meeting 6, April 15, 2021 0:00 incitement: feedback as oscillator 1:45 need an object to clip the sgnal (control runaway amplitudes) 3:00 any real object will saturate (clip) at some input level 3:30 clipping changes teh shape of a waveform 4:30 delay in the feedback path 5:00 need a filter in the feedback path 5:30 feedback gain greater than one causes unstable feedback 6:00 "between" object does the clipping 7:45 talking into the feedback patch 8:30 center (peak) frequency of bandpass filter affects pitch of the output 9:00 higher value of Q makes the system more selective 9:30 tuning fork to inject sinusoid into the system 10:00 tuning fork fights with circuit over which frequency to resonate at 11:00 adding extra delay (to whatever delay the system already has) 12:30 example of this in popular music: 13:00 (you heard the feedback example through the mic only) 13:30 Forbidden Planet soundtrack example 15:45 soundtrack is both music and sound effects (usually thought of separately) 16:20 movie soundtrack composers have more freedom than pop musicians 18:00 feedback patch makes similar sounds but the technology was different 19:00 example: guitar intro to "it's all too much" by the Beatles 20:30 filtering by guitar strings and electronics; delay was through the air 22:30 Jimi Hendrix at Woodstock 23:30 Jimi reaches for the wahwah pedal (resonant / bandpass filter) 24:00 clippnig is in vacuum tubes in amplifier; delay is physical distance 25:45 software oscillators work usnig feedback in the code 26:30 analog oscillators also work via feedback 26:45 analog synthesis example: Wendy Carlos, Switched-on Bach 29:00 voltage-controlled synthesizer controlled by clavier (music) keyboard 30:00 oddness of idea of maknig a popular record album out of very old music 32:30 same techniques are available digitally 33:00 basic sound source is sawtooth wave and its relatives 34:30 filtering a sawtooth wave 35:30 aside: typing into mumber boxes in Pd 36:00 filtering the sawtooth wave usnig "bandpass" object 37:00 sweeping the filter with Q=10 38:00 lower values of Q 39:00 interesting idea: controlling resonant frequency with an audio signal 40:00 using a multiplier to scale output of the controlling sawtooth 41:00 you can turn the sound off by setting filter center freqency very low 41:30 displaying output of controlling sawtooth generator 43:00 making repeated notes by filtering 44:30 multiple sawtooth generators to make richer sound 45:30 octave is a ratio of 2 to 1 in frequency 45:45 musical interals are set by ratios between frequency 47:00 sawtooth generators in the ratio 1:2:3:4:5 in frequency 47:30 3:2, 4:3, 5:4 ratios as intervals 48:30 shift key while making connection to make multiple connections at once 49:00 the five together sound ambiguously like one or several tones 49:30 spectrum of teh sum 50:30 spectrum of two sawtooth waves in ratio 5:2 51:00 when do you hear the combination as a single pitch? 52:00 detuning teh 5:2 ratio 53:00 fact that 5th, 10th, etc partials are changing draws attention to them 54:00 fixed spectrum graph to agree with audible output 54:30 detuned combinations of waveforms, popular technique in analog synths 55:30 detuned sum into time-varying resonant filter 56:00 clavier keyboard controlling filter using transient (envelope) generator 57:00 another voltage output controls frequency of oscillators 58:30 this is called subtractive synthesis 59:00 music 171 will take this further 1:00:00 acoustics library doesn't do feedback (for the sake of simplicity) 1:01:00 detunig frequencies occur automatically if we use Western musical scale 1:02:50 terminology: harmonic and inharmonic spectra 1:03:30 usnig a filter with very high Q to isolate individual sinusoids 1:04:30 discrete versus continuous (noisy) spectra 1:06:00 harmonic versus inharmonic discrete spectra 1:07:00 spectrum of a bell sound 1:08:00 unevenly spaced components (sinusoidal frequencies in spectrum) 1:09:00 using a filter to examine spectrum of the bell 1:10:30 heard pitch is that of a 141-Hz. sawtooth (this is at the wrong speed) 1:11:00 392 Hz. found frequency is not a multiple of 141. 1:11:30 171 Hz. about a minor third above heard pitch 1:13:00 there might be beating pairs of components in bell 1:16:00 open question, how to make spectra that sound like well-designed bells 1:18:00 idea: use a sinusoid to change the frequency of a sawtooth 1:19:00 even-numbered components are moving in parallel 1:19:30 your ear then hears two sawtooth waves as separate sounds 1:22:00 components can be close to each other and beat 1:23:00 most components of circular bells are in pairs that are slightly detuned msp.ucsd.edu/media/170.21s/170-04a-apr20.mp4: Meeting 7, April 20, 2021 0:00 incitement: real-time time reversal using the acoustics library 1:00 variable delay time makes Doppler shift 2:00 vibrato from time-varying vdelay using sinusoid to control delay time 3:00 different from vibrato by controlling the oscillator 4:00 variable-delay treatment of incoming sound 7:30 very deep pitch shifts, even making frequency go negative 8:45 diagram shoing how variable delays change frequency 10:00 extreme case where signal flips around backward in time 12:30 voice into extreme vibrato so that it reverses in time 13:00 using a sawtooth wave (instead of sinusoid) to control delay time 13:30 shifting downward only 14:30 real-time reversal of incoming signal 17:00 example: radiohead, everything in its right place 20:30 example: Hendrix guitar solo from Purple Haze - speed doubling 23:30 manipulating expectation in time-based art 26:30 prolongation: doing something later than expected 27:00 prolongation in pop lyrics 28:00 example: Arlo Guthrie, Pickle 32:00 example: Billie Eilish 35:00 another thing about Eilish phrase: loudness balance 36:00 balancing amplitude didn't balance loudness at all 36:45 10-ish decibels is not a 10x difference in loudness 37:00 equal loudness contours 38:00 axes in plot: dB versus frequency (both log scales) 40:00 how loud does a 100-Hz tone have to be to balance 80 dB at 1000 Hz? 41:00 hearing and voice seem to have co-evolved 43:00 threshold of hearing 43:30 loudness differences more perceptible at low frequencies 45:00 need much more sound pressure at low frequencies for same loudness 46:00 spectrum of Eilish voice: peak around 300 Hz. 49:00 tone right after vocal phrase, 50 Hz. 51:00 need 15-ish dB more at 50 Hz. to match 300 Hz. 52:00 the 50-Hz. tone was as strong as apparently permitted 54:00 clarification from last time: harmonics, overtones, partials, components 55:30 periodic waveforms 1:00:00 why we care about theories of loudness 1:00:30 non-definition of "timbre" of a sound 1:02:00 how ears work (very crude caricature) 1:02:30 the cochlea 1:03:00 basilar membrane and nerve cells that fire in time with its motion 1:04:30 why the filtering done by the basilar membrane is important 1:05:30 sounds of different frequencies travel different distances down it 1:07:00 the lower the frequency, the further it gets 1:08:00 typical spatial curves of excitation along basilar membrane 1:09:00 excitation at fixed location as function of frequency 1:10:00 different locations get different frequency responses 1:10:45 graph: Slaney Audio Toolkit estimate of basilar membrane excitation 1:12:00 implication: at a fixed frequency, there's a rapid drop-off 1:13:00 slightly lower frequencies aren't rejected as well as slightly higher ones 1:14:00 critical bands, bandwidth of frequency response at a point on membrane 1:15:00 within a critical band stuff adds in units of power 1:15:30 more widely separated frequencies contribute more to loudness 1:17:00 pitch acuity for flat versus sharp notes, and soft versus loud tones msp.ucsd.edu/media/170.21s/170-04b-apr22.mp4: Meeting 8, April 22, 2021 0:00 incitement: sample and hold 2:00 noise as input to sample and hold to control oscillator frequency 5:30 decimation (one form of bit crushing) 8:00 decimating a voice recording 13:00 reasons for using simple ("low tech") techniques 14:00 artistic example: another kind of prolongation from Hitchcock, The Birds 16:30 soundtrack electronically composed (not ordinary bird recordings) 19:00 foreground and background sounds (sound changes when we enter school room) 20:00 children's song builds suspense by repetition 21;00 gathering crows effect reinforced by soundtrack 23:00 how the brain buids connections between senses: the McGurk effect 25:00 you are being made to hear the same sound differently because of image. 27:30 more on psycoacoustics: accuracy of pitch perception 29:30 basilar membrane excitation from an incoming sinusoid 30:00 the just noticeable difference in pitch 31:00 two sinusoids at 440 and 441, inaudible difference 31:30 440, 445 (1 percent) difference was decently audible 33:30 there are ten octaves in the range of hearing 34:30 in ideal conditions we can distinguish about 2000 different pitch values 35:00 how can you hear frequency so accurately given basilar membrane filters? 36:00 one possible answer: right-side edge of excitation curve drops sharply 37:00 the place theory of pitch perception 38:00 the alternate explanation: timing of nerve firings 41:00 pitch perception is one of the miraculous things about human hearing 41:30 another miraculous thing: the dynamic range of hearing 43:00 10 billion to one ratio of power between loudest and softest sound 43:30 another miraculous thing: the coctail party effect 45:30 the gestalt theory of perception applied to hearing 46:30 how the brain makes percepts 47:30 some grouping cues: common features; common fate 49:00 common-fate Gestalt principle in hearing: how partials can fuse into one sound 49:30 applying vibrato to even-numbered partials (idea is from Stephen MacAdams) 51:00 graphing the spectrum 54:30 sound of the odd harminics alone 55:00 you might hear the timbre of the lower tone chain change 56:00 applying vibrato to the odd harmonics only instead of the even ones 57:30 perception of loudness 1:00:00 6 decibels is roughly one notch louder to musicians 1:00:30 musicians use the word "dynamic" to mean "force" 1:01:00 the musical symbols for dynamics (ppp, pp, p, mf. f. ff, fff) 1:02:00 if we consider one "dynamic" as 6 dB, then 36 dB range would suffice 1:03:00 36 dB is 64:1 in RMS amplitude or 4096:1 in power 1:04:00 definition of a sone: experimentally, how loud is "twice as loud"? 1:05:30 the word "level" is code for decibels. 1:06:00 loudness "doubles" if you raise it by 10 decibels 1:06:00 relative loudness in sones is 2 ^ ((L - L1)/10) 1:08:00 ISO definition of loudness in sones: [relative RMS amplitude] ^ 0.3 0:09:00 consider threshold of hearing at 1000 Hz. as a reference loudness 1:09:30 loudness of an arbitrary sinusoid in sones 1:10:30 answer for this example: 8 sones 1:11:00 1000 sones in hearing range (because 100 dB gives 10 doublings) 1:12:00 some uses for sones 1:13:00 how VU meters and sliders are marked off in audio equipment 1:18:30 what does doubling loudness really mean? msp.ucsd.edu/media/170.21s/170-05a-apr27.mp4: Meeting 9, April 27, 2021 0:00 syllabus change: adding a week on "voice" 2:00 2-part incitement: draw your waveform, and dueling metronomes 4:30 second metronome has period golden ratio times that of the first 6:30 two cycles superimposed so you can't tell which is which 7:30 this is a way to be neither random nor predictable 9:30 this works at different time scales and on the same or different layers 12:00 the music of Harry Partch using special, just-intoned instruments 17:15 Charles Corey describes one of the instruments, the harmonic cannon 20:00 consonant and dissonant intervals 21:00 ranges of intervals: beating; roughness; intervals 22:30 spectrum of sum of two complex harmonic tones 23:30 integer-ratio intervals sound consonant 25:00 partials of combination of tones with rational ratio 26:00 layout of Partch diamond marimba 27:00 six blades on SW/NE diagonals are in ratio of 4:5:6:7:9:11 28:00 NW/SE blades are in ration 1/4:1/5:1/6:1/7:1/9:1/11 30:00 building 4:5:6:7:9:11 scale in a patch 34:00 NW/SE scale 37:00 Partch scale (diamond marimba plus some extra tones; 43 in all) 39:30 what's special about integer ratios 41:00 spectrum of two sinusoids added 42:00 critical band theory of dissonance (roughness) for two sinusoids 43:00 critical bands are about 20% wide above 500 Hz; 100 Hz below it 46:30 discordant combination of 1000, 1050 Hz sinusoids 47:30 smaller than 30-ish Hz gives beating; nastiness kicks in around 10 48:30 difference tones 49:00 setting intervals to avoid roughness among partials 49:30 close together or far apart is OK, but in between sounds "rough" 50:00 200 Hz. versus other tones 51:00 terms: consonance and dissonance 52:00 consonance/dissonance of different ratios 54:30 Helmholz theory of consonance/dissonance 58:00 perfect versus almost-perfect intervals 59:30 1/2 way between 6:5 and 5:4 ratios 1:02:00 building out a scale using consonant intervals 1:03:00 3:2 ratio 1:04:30 music theory and the major triad 1:05:00 triad is 3-note chord with base pitch, plus major third and fifth 1:05:30 names of intervals: 6/5 minor third, 5:4 major third; 3:2 fifth 1:06:00 sound of major triad 1:07:00 how to build a Western musical scale out of triads 1:08:30 a fifth is combination of a major and a minor triad 1:10:00 adding the third triad to give a 7-tone scale 1:11:30 a sour interval in the scale (almost but not a fourth 1:12:00 fourth is 4:3 ratio 1:12:30 sour intervals are particularly problematic in polyphonic music 1:15:00 either the fourth is bad or the fifth is. 1:16:00 splitting the difference to reduce the dissonance 1:17:00 Western major scale is made out of triads with adjustments 1:19:00 scale comes from some combination of innate hearing and culture msp.ucsd.edu/media/170.21s/170-05b-apr29.mp4: Meeting 10, April 29, 2021 0:00 incitement: feedback delay networks ("FDNs") 9:00 mixing delay outputs back to their inputs 13:00 non-repeating echo pattern 15:30 musical example: ending of Beethoven Hammerklaviersonate - cadences 19:00 dominant and tonic chords 23:00 cadences aren't just playing same chord in parallel (some tones go up) 25:00 the whole sequences of not-quite-cadences 28:00 notes on which "false cadences" land aren't climbing by same interval 30:00 the piece can't just stay on the tonic chord - you need to delay resolution 32:00 music works in the context of expectations raised by previous music 34:30 what do you get when you reverse that last cadence? 35:30 pulse generator (was used in lab but I forgot to introduce it in class) 38:00 spectrum controlled by one parameter names bandwodth 39:00 pulses in time domain (as graphed in "record" are related to bandwodth 42:00 correction from last time: perfect interval between 5:$ and 6:5 (11:9) 46:00 musical scales 47:00 stacking four perfect fifths on top of each other: 81/64 interval 48:30 9:8 interval: major second 50:00 how intervals are named: unison, second, third etc. 51:30 two "seconds" don't make a perfect third 52:45 it's off by 1.2 percent in frequency, more than just noticeable difference 53:30 the interval from 5/4 to 81/64 (syntonic comma, although I didn't say it) 54:30 practical way of resolving the mis-tuning 55:00 the fourth: 4/3 ratio 56:00 interval from third to fourth note is only about 6% (a second was 12.5%) 57:30 the rest of the scale (fifth onward) 58:00 12% is twice as wide as 6%, so why not stick extra notes between seconds 59:00 why the piano keyboard looks the way it does 1:00:00 punch line: if you want to have a scale starting from anywhere... 1:01:30 (half-step is name of the smaller interval) 1:02:30 western major scale is (2, 2, 1, 2, 2, 2, 1) half-steps 1:03:00 how pitches are named 1:04:00 set a number "h" to the ideal half-step ratio. h^12 = 2 1:05:00 "h" is 1/12 if an octave, so twelfth root of two. 1:06:00 how many half-steps go in a perfect third? "fixed" third is 0.8% high 1:07:00 the fifth is 0.1% off 1:08:00 how many octaves in a perfect fifth? log(3/2)/log(2), about 7/12 1:13:00 perfect third is 14% shy of 4 half steps 1:14:00 number of half-steps in the 81/64 "third" - 8% too much 1:15:30 These h-based intervals are called "tempered" 1:16:00 how the three thirds sound 1:16:00 why are there 12 notes in the Western octave? Two possible answers 1:18:00 12-tone tempered scale has pretty good approximations of 3/2 and 5/4 1:20:00 idea: divide octave into different numbers of equally spaced pitches msp.ucsd.edu/media/170.21s/170-06a-may4.mp4: Meeting 11, May 4, 2021 0:00 incitement and artistic example: Lucier, I Am Sitting in a Room 13:30 modes of vibration (in an open-ended tube or in a room) 19:30 process music (a particular spin on minimalizm) 23:30 how the use of space in music is impacted by physical isolation 27:30 what Zoom does to sound 30:30 working toward question of what happens when sound bounces off a wall 32:00 sound bounces off barriers (and off open ends of tubes in a different way) 33:00 microphones don't pick up spatial distribution of sounds 34:00 understanding how sound travels helps you plan recording and playback 36:00 sound pressure variations over space 37:00 sinusoidal plane waves, in space and seen along the direction of travel 39:00 the velocity of air motion in a plane wave 40:30 pressure as picked up at a fixed point in space - function of time 42:00 period of sinusoidal signal related to frequency 43:00 wavelength (lambda) 47:00 formulas relating wavelength, frequency, and period 48:30 speed of sound ~ 1100 feet per second; 1000 Hz. gives wavelength of 1 foot 52:00 time of travel of sound through air 53:30 measures of sound strength - intensity and sound pressure level 53:00 sound radiation in terms of pressure and velocity (scalar and vector) 56:00 power and intensity 57:00 possible units of intensity are watts per square meter 57:30 definition of flux 58:00 intensity (flux across an area) is a vector 59:00 conservation of power implies intensity drops with distance r as (1/r^2) 1:01:00 intensity related to RMS sound pressure: I = p^2 / (rho c) 1:03:00 how wattage relates to sound pressue level 1:04:00 nominal sound pressure level that is considered 0 dB 1:05:00 those equal-loudnes contours are normalized to this level 1:07:00 your ear can't withstand much pressure variation at audible ferquencies 1:08:00 intensity of a plane wave is directed in the direction of the wave 1:09:00 a full description of the sound field at a point would include all directions 1:11:00 how the 3 velocity components depend on complete sound field 1:13:00 measurable sound at a point (ignoring its neoghbors) is only 4-dimensional 1:14:30 implications for recording msp.ucsd.edu/media/170.21s/170-06b-may6.mp4: Meeting 12, May 6, 2021 0:00 incitement: automatic beat boxer using the bonk~ object 7:00 also using a vocoder (will look at that next week) 9:00 sub-incitement: you can make patches into VST plug-ins 9:30 artistic example: Janet Cardiff, sound walks 23:00 back to plane waves and directionality: plane waves bouncing off walls 23:00 planes of maximum pressure at an instant in time in a sinusoidal plane wave 24:30 what the pressure looks like as a function of time 25:00 sound has no polarization (unlike light) 27:00 aside: how sound travels through the earth (solid, except its core) 30:30 incitement (PhD level) make the "earth" plug-in 33:00 (back to sound in the air) bouncing a plane wave off an infinte planar barrier 36:00 planes where pressure is not changing and others where air is not moving 40:00 nodes are places where there is no pressure variation 43:00 standing waves in an air column 47:00 plane waves reflecting at an angle 48:00 how to use this to measure combinations of velocity and pressure 48:30 omnidirectional microphones only measure pressure, no velocity 49:00 cardioid microphone design using an omni mic and a small reflector 50:00 (back to plane wave reflection) peak pressure change is at the wall 52:30 cardioid equation r = cos(theta)+1 54:00 demonstration: omni microphone near a reflector 56:00 distance from a mic alters balance between direct and reflected sound 57:00 room acoustics in the modal versus the geometric view 58:00 modes in a room are lower-frequency and more numerous than in a flute 59:00 geometric view focuses on reflection 59:30 modes and nodes in the modal view 1:01:00 directional versus omnidirectional mics 1:02:00 different balances between direct and reflected sounds 1:03:00 recording an instrument (mic placement) 1:05:00 far-field guitar recording using an omni mic 1:05:30 proximity effect (but also distorted; that wasn't intentional) 1:07:00 how a guitar radiates sound idealized as a moving rigid plate 1:08:00 low-frequency sound diffracts around from the back of the plate 1:09:00 so low frequencies are attenuated by cancelation 1:09:30 at higher frequencies there is less attenuation 1:10:00 but if you're too close the low-frequency attenuation is reduced. 1:10:30 the far-away sound is considered the "true" sound of the instrument 1:11:00 the close-up sound emphasizes low frequencies compared to far field 1:12:00 problem in recording: get mic away from instrument but keep a clear sound 1:15:00 emitted sound is more directional at high frequencies than at lows 1:15:30 physics of diffraction 1:17:00 angle at which far-field emitted sound drops off (L sin theta = lambda) 1:18:00 in other words, theta (beam width) is about lambda/L in radians 1:19:30 light wavelengths are much smaller so we see much less diffraction 1:20:00 at 20 Hz you'd need a 500-foot wide emitter for a beam 1/10 radian wide msp.ucsd.edu/media/170.21s/170-07a-may11.mp4: Meeting 13, May 11, 2021 0:00 incitement: vocoders ("channel" vocoders, not phase vocoders) 5:30 linearity of filter input to vocoder (can superpose two inputs) 6:30 vocal production mechanism: glottis and resonant cavities 7:30 glottis can be thought of as a pulse generator 9:30 fricative consonants result from turbulence, and don't involve glottis 11:00 vocoder models the vocal tract filter 12:00 "whispering" by sending noise into vocoder 13:30 example: Laurie Anderson's "O Superman" 17:00 the "Bell Labs" vocal model and what you can do with it 19:00 modeling the vocal resonator as a tube stopped at one end 20:00 possible standing waves in an air column 21:00 what happens when the air column is closed at one end 23:00 testing a metal tube as an air column 25:00 6 inch open tube makes peaks at 1000, 2000, 3000 Hz 26:00 spectrum of 1/2-stopped tube: 500, 1500, 2500, ... Hz. 27:00 open tube wavelengths: 2L, 2L/2, 2L/3, ... 28:00 half-closed tube: 4L, 4L/3, 4L/5, etc. 30:00 a real resonator in enclosed space (hard to hear the effect) 32:30 same thing, using reciprocity (placing mic in the enclosure) 35:00 spectrum of shaker lowered into enclosure (more audible this time) 36:00 spectrum of vocal sounds: resonances 37:00 neutral vowel resonances around 500, 1500, 2500 Hz. 38:00 in human speech, resonator constantly changes shape 39:00 up/down and forward/back vowels 40:00 schwa (neutral vowel) is in middle 41:30 spectral peaks at sinusoidal components 42:00 formants, peaks in the heights of the sinusoidal peaks 43:00 reinforced harmonics in singing 45:00 formants don't necessarily lie on harmonic frequencies 46:00 formants determine the vowel (to a first approximation) 46:30 lowest formant approximates front-back position of tongue 47:00 this can be better analyzed as a Helmholz resonator 48:00 low-frequency peak isn't considered a formant 50:00 higher-frequency formants are less clearly resolved 51:30 problem forming vowels when singing high pitches 56:30 ways real vocal production don't follow the simple model 59:00 high harmonics are less well behaved than low ones 60:00 glottal pulses shaped differently from each other 1:01:00 aperiodicity of glottal pulse train mostly at high frequencies 1:02:30 fricative consonants primarily high freqency 1:05:30 pitch of singing versus speaking not as different as you might think 1:07:30 psychoacoustic effect of repeating a spoken uterance (Diana Deutsch) 1:11:00 whether something is understood as singing depends in context 1:15:00 conundrum: how does singing work in a tonal language? msp.ucsd.edu/media/170.21s/170-07b-may13.mp4: Meeting 14, May 13, 2021 0:00 incitement: phase vocoder, vocal recording up close 3:00 frozen sound (infinite time stretching) 4:30 how the phase vocoder works: splitting a sound into sinusoids 5:00 abusing the phase vocoder with an input that doesn't obey the model 5:30 the window size controls the available ferquency resolution 6:00 1/10 second window, 4096 oscillators playing the soind back 7:00 how it sounds with a much smaller window 9:00 trade-off, hazy sound from a larger window 9:30 what a shwa vowel soundls like with a very small window 10:45 musical example: voice morphs into swarming bees (Trevor Wishart, Vox #5) 14:30 this used the phase vocoder, part of the Composer's desktop project 16:30 radio announcer up close as a waveform 17:30 near-periodicity during voiced portions (vowels) 20:00 non-periodic "s" consonant 22:30 imitating voiced sounds using pulse generator 24:30 time-domain pulse signal (i.e. pulse train as function of time) 25:00 applying bandpass (resonant) filters 29:00 close-up recording of a single pulse through the filter 31:30 increasing q from 10 to 100 so taht you hear resonance as a pitch 33:30 higher value of q makes resonance (ringing) last longer 35:00 filter frequency response versus waveform of output (amplitude vs. time) 37:00 why people use "q" instead of just specifying bandwodth 38:30 decay time of response 39:30 decay time is inversely proportional to bandwodth 40:00 so q is (loosely speaking) the number of cycles the resonance lasts 43:00 spectrum and time response for q=1, 10, 100, and 1000 46:00 decaying resonance in the vocal recording in Audacity 49:00 appear to have resonances at 700 and 4000 Hz. 49:30 verifying this using Audacity's spectrum display 52:00 attempt to reconstruct a vowel using pulse and filters 55:00 whether to put filters in series or in parallel 1:01:00 seat-of-the-pants alternative: filters in parallel 1:03:00 vowel shape maintained even if changing the pitch (pulse frequency) 1:03:30 replacing pulse train with noise source 1:06:00 real vocal sounds noisier at higher frequencies 1:07:30 changing the vowel sound - vowel is characterized by formant frequencies 1:12:00 speech (production and understanding) has many practical applications 1:13:00 glottis + air column picture revisited 1:15:00 standing waves inside air column correspond to resonances 1:16:00 each resonance should die out in time between glottal pulses 1:16:30 ... unless relaxation time is bigger than time between pulses msp.ucsd.edu/media/170.21s/170-08a-may18.mp4: Meeting 15, May 18, 2021 0:00 incitement: Shepard tone 7:00 foldover 8:00 rising instead of falling 10:00 Jean-Claude Risset, Sud: Shepard-like effect using comb filters 13:00 changing the interval between components 15:00 Music example: Charles Dodge, Speech Songs 26:00 resynthesis of Dodge piece 28:00 vocal synthesis compared with phase vocoder: transposition and formants 39:00 historical example: Risset analyzing trumpet tones 43:00 evolution of sound quality in a musical note (Cake trumpet note intro) 45:00 spectrum of trumpet tone changes with dynamic ("force") 57:00 Frequency modulation as a synthesis technique (FM synthesis) 58:00 the two frequencies (carrier and modulation frequency) 1:00:00 changing modulating oscillator amplitude changes strengths of partials 1:03:00 setting carrier and modulating frequency equal 1:04:00 spacing between partials is modulation frequency 1:04:30 making inharmonic spectra 1:07:00 using two modulating oscillators 1:11:00 applying nonlinear functions to a sinuasoid 1:12:30 why f(x) = x^2 doubles audible frequency 1:13:30 cubic and quartic polynomials 1:18:00 "between" object applies an interesting non-polynomial function msp.ucsd.edu/media/170.21s/170-08b-may20.mp4: Meeting 16, May 20, 2021 2:00 incitement: partial tracer from Pd help browser, 4.data.structures 7:00 editing the partials in a recorded voice 11:00 historical overview of analog music synthesis 12:00 voltage controlled synthesizers 13:00 Max Mathews's MUSIC, 1957, predates voltage-controlled synths (ca. 1964) 15:00 the Telharmonium (Thadeus Cahill) 18:30 Theremin and Ondes Martinot 24:00 voltage-controlled synthesizers in more detail 29:00 music: Morton Subotnick, The Wild Bull (Buchla; San Francisco) 31:00 sequencers used in Subotnick 33:00 music: Wendy Carlos, Switched-on Bach 36:00 difference between multitracking and tape splicing approaches 40:30 how S-OB upset the boundary between "art" and "pop" music 45:00 workings of voltage-controlled synthsizers 46:30 keyboard for pitch control 47:00 "voltage control" in acoustics library objects 48:00 logarithmic control of pitch in analog vs. linear in digital 50:00 one-volt-per-octave tradition in analog synthesis 52:00 the analog gear exponentiated its frequency control inputs 53:00 module names in voltage-control synthesizers (VC oscillator, etc) 54:30 digital modules usually use linear scales such as Hz. 56:00 to combine two pitch inputs, multiply instead of adding 57:30 keyboard control and notes versus sounds 58:30 ADSR envelope (note shaper) 1:00:00 ADSR output (note: the digital one puts out curves, not line segments) 1:00:30 multiplier replaces VC amplifier 1:03:30 VC resonant filter (bandpass object) 1:05:00 sample and hold 1:06:00 keyboard control (faked from PC keyboard but should be clavier) 1:07:00 keyboard outputs: a pitch and a trigger (1 if down, 0 if up) 1:08:00 connecting keyboard trigger to ADSR 1:10:00 outptut from typical ADSR envelope in analog (made up of ramps) 1:13:00 adding another, slightly detuned VCO 1:14:30 changing Q value in resonant VCO (bandpass filter) 1:15:00 different "keyboards" Buchla vs. Moog msp.ucsd.edu/media/170.21s/170-09a-may25.mp4: Meeting 17, May 25, 2021 0:00 incitement: making VST plug-ins in Pure Data (Camomile by Pierre Guillot) 1:30 Guillot's demo 11 on Vimeo shows how to edit Pd patches inside a DAW 3:00 the Ardour DAW (unlike Ableton - open source; intended for recording engineers) 10:30 drum pad recording as input 11:00 the Pd plug-in (Pd live patching within VST) 13:00 MIDI units to control an oscillator in Pd 13:30 managing VST parameters in Camomile 14:00 example: changing pitch and amplitude of a sinusoid using VST parameters 15:30 example: "Bedrum" plug-in 17:00 drum pad input through Bedrum patch (Irwin's test recording) 19:00 pointer to IRCAM demo showing collaboration with Irwin 20:00 the Bedrum plug-in inside Ardour (the DAW) 21:30 controlling a VST inside someone else's DAW over the network 25:30 dealing with network latency by running everything inside Irwin's machine 28:00 week's topic: sound art and sound studies 30:30 early progenitor of sound art: Luigi Russolo, the Art of Noise 31:30 introductory paragraph: (apparent) fistfights outside a theater 33:00 Russolo's instrumentrium (new mechanical noise-making musical instruments) 35:30 sounds of Russolo's instruments (Risveglio de una Citta) 38:00 non-electric (Italy in the 1920s) 41:00 later developments in novel musical instruments cosidered as sound art 43:00 Baschet brothers' instruments 44:30 Peter Ablinger and Winfried Ritsch, speaking piano 51:00 Trimpin plays Bach cello suite 53:00 Trimpin falling-water-droplet instruments 56:00 short excerpt showing a robot drumming on an old PC 58:00 sound itself as medium. example: Janet Cardiff 40-voice motet 1:03:00 Liz Phillips, water instrument, with Joan La Barbara 1:04:00 creating standing waves activated by La Barbara's singing 1:06:00 Liz Phillips, Electric Spaghetti 1:08:00 example of visualizing sound: Chladni patterns 1:10:00 Vivian Caccuri, Ritual - candle flames set in motion by sound msp.ucsd.edu/media/170.21s/170-09b-may27.mp4: Meeting 18, May 27, 2021 0:00 incitement: leap controller as musical instrument 9:00 crazy pool table ball trajectories 12:30 setup as duo performance with Kerry Hagan at NIME conference 13:30 strategy for controllnig instruments with hand gestures 16:30 intro to lab assignment 9: Heisenberg uncertainty principle 30:30 academic discipline: sound studies 32:00 ownership and attribution of musical sounds 24:00 Graceland album by Paul Simon with musicians from South Africa 34:30 Call Me Al, live in Hyde Park 38:30 songs were written (back in US) after recording sessions 39:30 recordings took place during Apartheid era 42:00 questions raised: appropriation or generosity? 45:00 flute solo from deep in a non-US tradition and style 46:00 Bathiki Kumolo's highly recognizable bass lick 53:00 another sound studies topic: sound recording and reproduction 54:00 Victrola phonograph 56:00 scores, "records", broadcast radio, and social media 57:00 permanance and repeatability of recordings ("records") 59:30 scores as a democratized way of sharing music 1:00:00 cost of physically distributing records and need for centralization 1:02:00 making personal copies of recorded media 1:04:00 broadcast 1:05:00 revenue model for broadcasting 1:07:00 differences between network and broadcasting 1:07:30 new revenue model for internet distribution of music 1:10:00 music itself ("content") subsidiary to network infrastructure 1:13:00 importance to artists of keeping up with changes in distribution 1:13:30 recommended books in sound studies: sound studies reader 1:14:00 Noise, Water, Meat, and Listening Through the Noise 1:15:00 architecture and its implications for music msp.ucsd.edu/media/170.21s/170-10a-jun1.mp4: Meeting 19, June 1, 2021 0:00 incitement: making a sound installation using Raspberry Pi computer 2:00 four sound portraits, Charles Dodge tribute, built into an old telephone 3:30 getting audio into and out of a Raspberry Pi 9:00 the patch runs autonomously and sings or speaks words using a random algorithm 12:00 musical example: Paul Lansky, Idle Chatter 15:00 audio synthesis: linear predictive coding 16:00 More Lansky: Alphabet Book 18:20 techniques for machine-aided composition (compositional algorithms) 19:00 generating scores from computer algorithms 21:00 score editors versus score typesetting systems 22:00 using lilypond to set a melody from a text file with pitches 23:30 example: computer generated sequence (chromatic scale) 25:00 example: using modular arithmetic to generate circle of fifths 32:30 early compositional algorithms didn't use computer typesetting 33:00 entire computer generated musical peices versus computer as assistant 34:00 example: traveling salesman problem for chord progression (Magnus Lindberg) 37:30 feeding computer-generated pitch sequence to a modular synth 39:30 examples: modular-arithmetic clave 42:00 using the C programming language (a classic programming language) 45:00 why make efficient computer programs? 46:30 compositional algoritms in two workflows: batch or real-time 49:00 real-time text-based systems: SuperCollider, RTCmix, Chuck 50:00 modular example redone as real-time compositional algorithm in Pd 59:00 similarity to Shepard tone 1:00:30 tradeoff between text-based and graphical approaches 1:02:00 stochastic (random and pseudorandom) generators 1:04:00 re-seeding a pseudorandom number generator 1:07:00 typesetting result of a graphical compositional algorithm 1:09:30 back to Lansky. Sampling with and without replacement 1:12:00 back to generating rhythms: changing time onset values msp.ucsd.edu/media/170.21s/170-10b-jun3.mp4: Meeting 20, June 3, 2021 0:00 incitement: GEM, Mark Danks and Iohannes Zmoelnig, graphics for Pd 4:00 using amplitude of incoming sound to affect graphics 5:30 drawing a polygon 8:30 bird's beak is three triangles 10:00 acoustical attack detection 13:30 machine learning in compositional algorithms 14:30 data driven algorithms 16:30 perceptrons (1950s?) and back-propagation (1980s) 18:30 old-fashioned machine learning: Markov-chain Bach invention 25:00 order of a Markov chain 28:00 mixture of two Markov chains 32:00 rule-driven algorithms (as opposed to data-driven) 33:30 artificial neural networks (networks of perceptrons) 36:00 learning problem example: XOR 43:00 multiple layers in a neural network 45:30 neural networks as splines (curve or surface fitting) 48:30 example: Michael Lee and David Wessel, training instrumental timbres 54:00 limitation: trying to fit something that isn't deterministic 57:00 Judy Garland voice-controlled saxophone 1:00:00 supervised versus unsupervised machine learning 1:04:30 another example: Sam Pluta's joystick-controlled synth 1:09:00 unsupervised algotrithms: example, speech recognition 1:11:00 autoencoders 1:15:00 machine learning and time series. Recurrent neural networks (RNNs) ----------------------------------------------------- Music 171. Computer Music. Winter quarter 2020. course materials: msp.ucsd.edu/syllabi/171.20w/ recordings: msp.ucsd.edu/media/171.20w/ contents of recordings: 1a.jan7.mp4 00:00 Intro and mechanics of course 18:40 Getting Pure Data (Pd) and running it 30:36 Configuring and testing audio in and out 47:45 Editing patches in Pd 1:04:00 Organizing files so that Pd finds the out1~ helper object 1:09:30 The scope~ helper object 1b.jan9.mp4 0:00 downloading patches from browsers (patches look like text files) 5:00 Audio signals and control messages (types of connection) 6:00 Boxes: objects, messages, numbers 12:00 more on audio signals and control messages 15:41 Scope~ object to see oscillator output. Setting frequency of oscillator 24:00 Making a complex tone with three oscillators 27:00 Tilde convention. Multiplier (*~) as amplitude controller 35:00 Using a number box to display/change numbers 48:30 Using line~ to make continuous changes of amplitude 57:00 Messages with two numbers and "$1" convention for making variable messages 1:01:15 Messages into signal inputs and vice versa 1:02:00 peek~ helper object to look at line~ output 1:04:00 explanation of button and toggle on scope~ interface 1:05:00 Connecting to multiple messages to set them off simultaneously 1:15:00 Osc1~ creation argument versus sending it messages 1:15:45 Osc1~ first input takes signals. Osc1~ help window 1:19:00 Details about homework 1 2a.jan14.mp4 0:00 Wavetables (arrays of numbers) 2:35 New objects used this week 5:30 Definition of phase (with sinusoid as example) 9:30 Phasors and wavetables as components of a digital oscillator 11:30 cosine wavetable and interpolation in table lookup 22:10 Changing the range of a numerical control or signal value 24:00 Using phasor~, array, and tabread~ to make a variable-waveform oscillator 35:50 Two wavetable oscillators with slight detuning 43:50 Intro to homework 2 (array to control pitch sequence) 46:50 Web page to get patches and th flute soundfile used in homework 51:00 Creating more than one phase signal with a controllable phase difference 1:05:50 using adc~ to record sound into an array and tabread to "sample" it 1:11:20 Setting the range of lookup into an array holding a recorded sound 1:15:30 Writing and reading arrays to soundfiles using soundfiler object 2b.jan16.mp4 0:00 Interpolating and non-interpolating table lookup 5:00 Setting an array to hold a cosine cycle using "cosinesum" message to array 5:30 The send object (used to send a message to an array) 10:26 Non-interpolating lookup and how it sounds as a waveform 16:10 tabread4~ and interpolating table lookup 20:00 Cubic (4-point) interpolation explained. N-3 available points in table 29:00 Setting range of phasor~ to (1-9) to fit into 11-point table 42:30 interpolating and non-interpolating into an audio recording 52:00 Range of phasor~ for reading into audio recording 1:02:00 De-clicking a looped read from a recording using a half-cosine envelope 1:09:30 Overlapped playback from a recording to make a more continuous sound 3a.jan21.mp4 0:00 overall topic: control and audio distinction in more detail 1:40 make a table-reading sound to control 2:10 problem to watch for: multiply defined arrays 3:40 another possible problem: signal (DSP) loops 7:00 patches on website are now zipped 8:00 introducing homework 3 11:30 control version of table read (tableread instead of tabread~) 13:40 "mod" object (modular arithmetic) for wraparound control table lookup 14:30 comparing wraparound lookup using phasor~ (DSP correlate of above) 20:50 the "metro" obejct (metronome) 23:00 toggle and bang objects (GUI controls) 28:30 the "float" object for number storage 29:30 hot and cold inlets (left-most inlets cause actions; others modify them) 33:50 making a control-object loop (a 0-to-11 counter) 40:00 another possible problem: infinite loops of control messages 48:00 how to make presets using send and receive 57:30 semicolon-separated messages in message boxes (sending to receive objects) 1:06:30 the "mtof" object, MIDI pitches and frequencies 1:10:00 speak preview of spectrum object to see effect of frequency ratios 1:19:45 C major chord, as MIDI pitches and ratios 3b.jan23.mp4 0:00 introducing this table of contents 1:00 starting from patch from Jan 16, to work on amplitude and pitch control 5:00 showing the enveloped waveform and a simple timbre control 10:00 notes versus sounds as musical building blocks 12:00 problem with using "line" directly as an amplitude control 13:00 "delay" object to sequence line~ level changes to form notes 13:40 the bad fade-out behavior line~ gives over 10 seconds. 16:00 square root of amplitude as approximate loudness 19:00 squaring line~ output for a better amplitude ramp 22:22 introducing MIDI keyboard control 33:00 MIDI and musical intervals 39:00 why 3.86 MIDI units makes a major third (5:4 ratio) 43:00 transposing MIDI 44:00 making MIDI keyboard set off notes by triggering amplitude change 52:00 making the timbre change over the duration of a note 59:00 review of the half-cosine envelope control for the table waveform 1:04:30 printing messages that go to line~ to control it over time 1:06:00 "$1" inside message boxes to make variable messages 1:09:00 metronome-driven counter to "route" object to make rhythms 1:15:30 miscellaneous questions and answers 4a.jan28.mp4 0:00 intro to topic, voice management and polyphony using subpatches 1:00 subpatches 3:00 inlets and outlets for subpatches 5:15 abstractions versus one-off (ad hoc) subpatches 7:30 warning, don't send a 'float' to delay unless you want to set delay time 10:00 moving a sinusoid oscillator patch into another patch as an abstraction 12:40 saving an abstraction from inside the calling patch 14:00 inlets adn outlets in abstractions 18:20 commas inside message boxes send multiple messages 23:00 counter and route to distribute notes across copies of an abstraction 26:45 the pack object 28:30 the trigger object 38:00 Risset's bell instrument using an abstraction for each sinusoidal partial 41:00 throw~ and catch~ (preview) 44:00 how messages get into the partials in the bell patch 46:00 arguments to abstractions ("$" arguments in object boxes versus messages) 1:07:00 using "moses" object to split pitches among two different voice banks 1:10:00 making a sample-looping abstraction 1:13:00 building the second voice bank 1:16:00 the moses object 4b.jan30.mp4 0:00 incitement: running a patch inside an Organelle keyboard instrument 6:00 rewriting sampler abstraction to play notes using the sample's own attack 11:30 getting the size of a soundfile in samples 16:30 right inlet of phasor~ to reset the phase using a message 19:00 control computations insert themselves between audio sample computations 19:45 when you save an abstraction all the other copies might need reinitialization 22:00 looping samplers at different speeds 24:00 computing the length of a recording if it's transposed 25:00 using trigger to get a division to work when divisor changes 27:00 using float object to use a value after a delay 28:00 working piano sampler 30:00 using the two different timbres for a rhythmic effect 35:00 the "clone" object to manage copies of an abstraction 40:00 using an abstraction to reuse a patch from different calling patches 47:00 introducing homework assignment 4 50:00 "const" message to an array to clear it 55:00 sending a message to an array to set its values 56:30 about final project 1:00:30 idea: Hammond organ patch with added amplitude envelope control 1:02:00 better way to use "send"/"receive" technique for managing controls 1:05:00 "set" message to number box 1:06:00 setting send and receive names for number box 1:08:00 adding a label to the number box 1:09:00 an abstraction (setctl) for controlling a parameter and displaying it 5a.feb4.mp4 0:00 incitement: the Gem graphics environment for Pd 3:50 envelope following to use incoming sound level as a control 5:00 decibel units and attack detection (mentioned but not described fully) 6:00 drawing polygons in Gem 8:00 3-d coordinates in Gem 11:00 changing coordinates under programmatic control (by sending messages) 15:00 "rectangle" abstraction to draw a rectangle using arrays for coordinates 20:20 homework 5 intro 26:00 frequency modulation using two oscillators 31:20 spectrum of FM output (using spectrum~ helper object) 40:00 carrier frequency, modulation frequency, and index parameters 42:00 making harmonic spectra using FM 38:30 reflections and negative frequency sidebands in FM 44:30 ring modulation 50:00 ring modulating a complex spectrum 53:00 the fundamental formula for computer music (multiplying sinusoids) 58:00 using the formula to understand the sidebands from amplitude modulation 1:03 ring modulate an incoming sound from a microphone 1:09:00 nonlinear distortion (waveshaping) 1:12:00 squaring a sinusoid doubles its frequency 1:13:00 using an array as a waveshaping function 1:16 clipping (saturation) - crude example using hand-drawn wavetable 1:16:30 changing amplitude of input to waveshaping changes timbre 5b.feb6.mp4 0:00 more details on homework 4 4:00 using $ arguments inside abstraction as an index in an array 6:00 banging a float $1 object inside an abstraction 11:00 numbers to first inlet of float 13:00 commas versus semicolons in message boxes 15:00 incitement: the phase vocoder (I07.phase.vocoder.pd in the Pd examples) 24:30 intro to homework 5 28:00 messages to line~ that's already ramping interrupts ramp to start new one 33:30 symmetry in waveshaping (even and odd harmonics) 37:00 clipping using "min~" and "max~" objects 41:20 other shapes in the waveshaping array 43:00 waveshaping versus sampling as a waveform generator 46:00 adding an offset (a "bias") to teh input to waveshaping 48:00 continuously drifting bias to get a time-varying timbre 52:00 symmetry. Change the wavetable to a pre-prepared one (cos~ object) 57:00 evenness and oddness of functions and their use in waveshaping 59:00 odd function as waveshaper 1:02:00 using cos~ waveshaper to generate even harmonics 1:03 changing bias to get sine function from cos~ object 1:07: cosine function periodicity and bias 1:09:20 digression: the "random" object used on pitch and waveshaping index 6a.feb11.mp4 0:00 incitement: sample-and-hold. First introduce noise~ object 7:30 random versus noise~ 9:00 audio decimation 14:00 one sawtooth (phasor~) sample-and-holding another 22:35 introducing "array" object (non-graphical array storage) 26:30 introducing homework 6 29:00 introducing delays using delwrite~ and delread~ objects 37:00 multiple delay taps from a single delay line 39:30 frequency response of a single delay added to a signal 44:00 phase cancellation using delays 46:00 spectrum of combined signal adn delayed copy (comb filter) 53:00 feedback with delays 1:00:00 delay loop making a tone 1:03:00 feedback gain control 1:08:00 controlling amplitude of direct signal and delays with feedback 1:10:00 changing delay times without clicks by muting output at moment of change 1:15:30 continuously changing delay time using delread4~ 1:18:00 Doppler effect from changing delay time 6b.feb13.mp4 0:00 more on shifting pitch using delread4~ 1:30 homework 6 4:30 making pitches using recirculating (feedback) delay as comb filter 7:00 pulsed noise for testing comb filter 8:30 pitch of output of comb filter 10:00 spectrum of feedback comb filter output 13:30 effect of integer-sample-delay restriction of delread~ (vs. delread4~) 17:00 reverberation ("reverb") 23:00 comb filter abstraction 24:00 Pd warned before retyping into an abstraction that's been edited 29:00 oops, delread4~ doesn't take an argument to set delay time 33:00 oops, rogue out1~ object 34:00 working reverberator 37:30 pitch shifter 41:50 phasor~ driving delread4~ to make doppler shift 44:45 adc~ into rudimentary pitch shifter to show window size limitation 46:20 windowing output of delay to stop clicks in pitch shifter 48:30 cos~ object from -1/4 to 1/4 makes a good window shape 49:00 windowed pitch shifter (no overlap yet) 50:00 adding out-of-phase copy for overlapping windows 53:00 computing pitch shift from window size and phasor frequency 58:00 slope of phasor~ output 1:02:00 figuring out phasor frequency for desired transposition: f = (t - 1)/w 1:05:00 desired pitch shift in half steps (MIDI units) 1:10:00 chorus effect (mentioned, not done) 1:12:00 more about randomness (random numbers with controllable probabilities 7a.feb18.mp4 0:00 incitement 1 - beat boxer 4:00 bonk~ attack detector object 6:20 incitement 2 - visualizing data structures in Pd 12:40 homework 6 intro 14:40 followup about sampling (making notes that come out at correct pitch) 16:30 the tabplay~ object 17:00 revisiting the 4.b.sampler.pd abstraction to get correct pitch out 20:00 making new version, 7.a.sampler-voice.pd 21:00 writing sample length to sampler-nsamps that is read inside abstraction 23:00 computing the frequency a phasor~ should run at to get desired pitch 30:20 finished sampler abstraction 35:00 how filters work: comb filters and pitch revisited 40:00 the block~ object to set block size in a subpatch to make a low-pass filter 45:00 how to get unit gain at DC in a low-pass filter (moving averages) 51:03 making a high-pass filter out of the low-pass filter 54:30 the lop~ and hip~ low and high pass filters 57:00 the bp~ (briefly) and vcf~ filters 59:00 the "Q" inlet of vcf~ 1:06:00 making a pulse as a test input to vcf~ 1:07:00 phasor~ into pulse table to make a pulse train 1:09:00 changing pulse width changes spectrum 1:11:00 resonant filter acting on a pulse train 1:12:00 high values of Q single out harmonics; low ones give timbre changes 1:13:00 getting rid of zipper noise when sweeping resonant frequency of vcf~ 1:14:00 envelope generator driving resonant frequency 1:15:00 classic note-based subtractive synthesis 1:17:30 changing pulse width of input to vcf~ 7b.feb20.mp4 0:00 incitement: high-Q resonant filters for resonating ambient sounds 4:30 intro to homework 7: Devid Wessel streaming demonstration 13:00 back to subtractive synthesis 18:30 adjusting gain of vcf~ to adjust for variable Q 20:00 higher Q values make longer-lasting resonances 22:00 Q as number of wiggles in the impulse response independent of frequency 25:00 taxonomy of filters (definitions of cutoff/rolloff frequency, etc) 28:00 passband, stop band, and transition region 30:00 resonant frequency and bandwidth of a resonant filter 32:00 definition of Q 34:00 Q=17 is about a half-step wide 37:00 mass-and-spring physical analogy 40:00 how to make a resonant filter using rotations in the plane 42:00 using complex numbers to represent rotations 45:00 1, A, A^2, ... sequence is a sinusoid if A is a unit complex number 45:30 how to analyze the behavior of a recirculating delay network 48:00 impulse response of a recirculating delay network 54:00 complex sinusoid again (using Z as the ratio: ..., Z^-1, 1, Z, Z^2, ...) 56:00 analysing frequency response of recirculating delay network 1:01:00 setting up equation relating output to input 1:02:00 geometrical interpretation of frequency response 1:05:00 how resonant frequency and bandwidth depend on recirculation gain 1:08:00 "hilbert~" filter to get phase-quadrature version of a real sinusoid 1:12:00 single-sideband modulation 1:15:00 the phaser (guitar effect) 8a.feb25.mp4 0:00 about homework 7: text object will help (but isn't altogether needed) 2:00 a musical sequence as a text file 4:45 "text" object 6:00 text object subwindow is formatted like message boxes 7:00 "text" object help window. "text define" makes and names a text object 8:00 "text define -k" to keep the text between Pd sessions 8:45 "text get" 9:30 message selectors and list messages (needs "list" if first item is symbol) 11:00 messages starting with numbers are implicitly "list" 12:00 getting single item ("atom") in the list 13:45 "text set" object to replace lines or single items in a "text" 17:00 making a simple sequencer using text object 19:00 variable time delays in sequences. Line starts with initial delay 21:00 bad way (time value is time to next line) and good way 25:30 "text sequence" for built-in sequencer 28:00 "text sequence poodle -w 1" to make a simple sequencer 29:30 tempo control 31:30 looping sequencer using "text" object 34:00 meaning of "stop" messages to "text sequence", "delay", etc. 36:30 incremental versus accumulated time in sequencer design 39:00 polyphonic sequencing from a text file (Bach invention example) 43:00 making a synthesizer voice with controllable note lengths 46:00 "-c" flag to read text files without semicolons in them 48:00 sequencing ignoring time values 49:00 using "text sequence" to sequence the Bach example with correct times 51:00 voices and voice allocation using the "poly" object 58:00 "makenote" object to schedule note-offs after specified delays 1:02:00 new version of 8.b.voice.pd so that it takes note-on/note-off messages 1:09:00 possible variations in message style inside text sequences 1:11:30 a sequence from a real piece of music containing arbitrary messages 8b.feb27.mp4 0:00 incitement: leap controller as musical instrument controller 0:45 imaginary pool table as oscillator pair 3:30 eight parameters to control the pool-table oscillator 4:00 8 parameters derived from hand shape detected by controller 8:00 sensible controller design principle: easy on/off and loudness control 12:30 reverberation from spatial location and loudness from angle 16:00 intro to homework 8 26:00 2 miscellaneous things about filters: filtering a sinusoid does little. 28:00 low-pass filter to solve click problems 31:00 low-pass filter is smoothing in time 35:00 designing timed loops that stop at specified point 38:30 using delays to control order of execution is hard to extend or debug 39:00 loops with no internal delays using "until" object 43:00 incidentally, there's a "bang" object, does same thing as "t b" 44:00 "forloop" abstraction 48:00 you can just send a number to "until" to get that number of bangs 49:00 using loops to evaluate formulas to load into an array 49:30 example: Cauchy distribution: 1/(1+x*x) 52:00 center the curve at 51 for a 103-point table (for use with tabread4~) 56:00 Gaussian curve 58:00 "expr" object to simplify trigger-driven horrorshows to do algebra 1:02:00 the "env~" and "sigmund~" objects to estimate signal power and pitch 1:03:00 the decibel (dB) scale (output from env~) 1:04:00 the VU meter 1:04:30 the "dbtorms" object converts decibels to linear amplitude 1:07:00 envelope-controlled oscillator 1:08:00 env~ output at 44100 Hz. appears every 512 samples (11.62 milliseconds) 1:09:00 sigmund~ pitch tracker (and more) 1:12:00 voice-controlled oscillator (pitch and amplitude) 1:13:00 quantizing (rounding pitch off to nearest integer) 1:15:00 starting on presets (wil finish in 9a video) 1:17:30 "presetter" abstraction will be setctl plus preset saver 1:19:00 printing out the name of the preset variable using "symbol" object 9a.mar3.mp4 0:30 finishing the presetter abstraction 2:00 pack and unpack with symbols 4:30 message selectors (automatic only if list starts with a number) 5:00 "bang", "float", "symbol" and "list" selectors 7:30 printing parameter messages returned from presetter 8:00 collecting them in a "text" object ("text set" to append lines) 11:00 clearing the text object out before parameters are put in using trigger 16:00 incitement: waveshaping (distorting) combined sounds of different periods 19:00 clip~ as waveshaper 20:00 designing smooth waveshaping functions 22:00 y = x - x^3/3 cubic curve as waveshaper 27:00 cubic waveshaper without clipping 29:30 clipping the input to the cubic 32:00 sum of 440- and 660-hz sinusoids into waveshaper gives common subharmonic 36:30 oops, we were listening to the wrong signal before - fixed now 40:30 another incitement: deliberate unstable feedback through a delay line 42:30 test signal into a pitch shifter 44:30 soft-clipping the output of the pitch shifter and feeding it back 49:00 feedback dies if it's pitch shifted out of range 50:00 restricting the frequency range of feedback with hip~ and lop~ filters 54:00 changing the pitch-shift delay time and frequency range 1:00:45 incitement: measuring tempo using "bonk~" and "timer" objects 1:05:00 trigger to control two "bang" messages to "timer" 1:06:00 using that to drive a "metro" object 1:07:00 controling a test beep from the result 1:08:00 triggering sample recording from bonk~ and playback from metro objects 1:12:00 foldover (intro for weeks' topic, band-limited waveforms) 9b.mar5.mp4 0:00 incitement: partial tracer (Pd audio example) 11:00 sinebag example - real-time additive analysis/resynthesis using sigmund~ 14:00 back to foldover issue. Pd audio example demonstrating foldover 18:00 making a band-limited sawtooth wave 23:00 approximating a sawtooth summing sinusoids 28:00 square wave as sum of sinusoids 31:30 using the square wave as transition for a step in an audio signal 34:00 oscillator repeating the step 35:00 changing the duration of the ripple portion of the step 37:00 subtracting the original phasor~ to get rid of the discontinuity 39:00 changing the band limit on a sawtooth wave 40:00 comparing the three sawtooth generators (phasor~, fixed partial sum, and new version) 42:00 spectrum of band-limited sawtooth 45:30 making a rectangle wave out of two sawtooth waves 48:00 why subtracting two sawtooth waves gives a rectangle wave 50:00 spectrum of rectangle wave 54:00 triangle waves out of phasor~ 57:00 spectrum of symmetric triangle wave 1:00:30 non-symmetric triangle 1:04:00 triangles as difference between two parabolic waves 1:06:30 spectrum of parabolic wave 1:08:00 parabolic waves subtracted 1:08:30 trapezoidal wave: sum of parabolic waves with gains that sum to zero 10a.mar10.mp4 0:00 prep for final - making screen movies (I use ffmpeg; OBS easier to use) 5:30 how to turn in final projects 8:20 incitement: video feedback using Gem 10:30 making ribbons using hundreds of triangles 11:00 looking up colors and coordinates from tables (arrays) 11:30 making the snake slither by sliding forward in the arrays 13:30 making video feedback in Gem: pix_snap2tex object 15:30 reducing size and orientation of fed-back copy 17:30 adding a second feedback path 19:20 topic: frequency domain processing using example from Pd doc 20:10 The J series of Pd audio examples are on previous class's topic 21:00 The I series, recalling the phase vocoder incitement from earlier 21:30 Motivation: Problems with time streching via granular sampling 23:00 Problem of overlapping audio recordings without phase cancellation 24:30 idea of Fourier analysis/synthesis. Path I01.Fourier.analysis.pd 28:30 Fourier analysis period N controlled by block size in Pd 30:30 typical block sizes are 512-4096 but first example uses 64 samples 34:00 phase of test oscillator is reset each window 36:00 different initial phases to input of Forier analysis 36:30 explanation of fft~ output as real and imaginary parts of analysis 37:10 64th point of output is same as zeroth point 38:00 complex exponentials as true basis functions (instead of sine/cosine) 40:20 cos(phase) + i sin(phase). Phase is 2 pi n / N for fundamental 41:00 negative frequencies. Real-valued cosine is sum of two complex exponentials 43:00 complex sinusoids are eigenvectors of time 45:00 complex multiplication used to knock frequemcy down to zero for analysis 47:00 how initial phase of real sinusoid changes fft~ output 49:00 real and imaginary part of tenth fft~ analysis graphed in complex plane 51:00 analyzing sinusoid with frequency 10.5 (between harmonics) 54:30 partials drop off as 1/k from peak 56:00 using a raised cosine window as (Hann) windowing function 57:00 using windowing function helps resolve sinusoidal components 58:00 example I02: applying Hann window function 59:00 the tabreceive~ object. Setting window size to 512 via block~ object 1:00:00 the rfft~ object and taking magnitude 1:01:00 changing window function. Heisenberg uncertainty principle. 1:05:00 filtering using Fourier analysis/resynthesis 1:07:00 overlapping windows 1:09:00 applying windowing function both before and after analysis/resynthesis 1:11:00 analysis/resynthesis patch with blocking, windowing, and normalization 1:14:00 fft vocoder, patch I06.timbre.stamp.pd 1:17:00 changing pitch of voice 1:18:00 how the patch works 10b.mar12.mp4 0:00 incitement: drum machine using PAF (fancy waveshaping) synthesis 3:00 audio production techniques 4:00 dynamics processing: companding compression and expansion) and limiting 15:00 filtering, DJ-style, using high-order (Butterworth) filters 16:30 returning to Fourier analysis/resynthesis 18:00 analysis/resynthesis considered as filterbank 20:00 arranging phase coherency in each channel in resynthesis 25:00 quick tour of I07.phase.vocoder.pd patch 26:30 topic: panning and cross-fading 29:30 what gain should we use half-way across a pan or cross-fade? 1/2 or 1/sqrt(2)? 32:40 How pan should depend on left/right control (not linearly) 36:00 quadraphonic speaker setups for 1950s - 1970s style spatialization 42:00 readsf~ and writesf~ to stream from and to soundfile in real time 48:00 sending messages over networks 50:30 messages between Pd and other programs: pdsend and pdreceive 57:45 conditionals in Pd: route, moses, spigot 1:00:00 reminder, execution order 1:01:00 control messages from signals: env~, snapshot~, threshold~ 1:05:00 state machine to detect audio onsets ----------------------------------------------------- Music 270c. Compositional algorithms. Winter quarter 2021. course materials: msp.ucsd.edu/syllabi/270c.21w/ recordings: msp.ucsd.edu/media/270c.21w/ contents of recordings: msp.ucsd.edu/media/270c.21w/270c-01a-jan5.mp4: Meeting 1, Jan. 5, 2021 0:00 overview of syllabus 6:40 assignment 1 10:15 solution 1: using pure data 13:00 pure data utility patch for playing and seeing musical notes: 0.common.pd 14:00 Pure Data patch library 16:15 Pd "mod" object (integer modulus) 21:50 circle of fifths as 7n mod 12 24:00 solution 2: using julia and csound 27:00 printing csound "note cards" in julia 34:30 julia solution requires a rewrite of the math to vectorize it 37:00 relationship between pitch (in MIDI units) and frequency 38:00 major and minor thirds in common and graphical notation 40:00 pitch continuum ("floating point MIDI units") 41:00 just and tempered triads as pitch 43:30 conversion from pitch to and from frequency (mtof and ftom objects) 51:30 overtone series in musical notation 54:00 frequency shifting (as pitches and freqencies no notes) 57:00 odd harmonics of A55 1:01:30 inharmonic frequence shifts 1:03:30 intervals between pairs of notes with fixed frequency spacing 1:07:00 pitch related to log frequency (midi = 69 + 12*log_2(frequency/440) 1:09:00 negative frequencies. Frequency shift to generate microtonal pitch sets 1:10 callout to Stock, Mantra and Chowning, Stria as examples 1:12:30 quantization. Rounding to nearest integer in Pd 1:20:00 next time: non-integer-spaced pitches rounded to integers msp.ucsd.edu/media/270c.21w/270c-01b-jan8.mp4: Meeting 2, Jan. 8, 2021 0:00 Continuing with pitch manipulation: Western scale as int(12n/7) 2:00 the "for" object in the 270c library, counting to 7 11:00 adding 1 to change western-scape mode 22:00 non-octave scales, genral maximally uniform spacing 23:30 specifying time onsets 25:00 maximally-uniform time onsets 26:00 quintuplets, 5 against 4 against 3 27:30 quantized rhythm 30:00 western scale as rhythm 33:00 repeating the quantization process 38:00 western major scale as 3 triads end to end, also maximally uniform 41:00 building major scale as f-a-c-e-g-b-d 43:00 Balzano picture of 7-tone scale in 12-tone octave 43:45 more operations on pitches. Quantizing to just scale 50:00 pitch sequence to try 51:00 text object for searching through list of pitches 59:00 general tool for quantizing to a set of pitches 1:01:00 interpolating between pitch sets 1:03:00 preliminary: stretching and squeezing interval sets 1:04:00 inversion 1:05:00 sliding through different stretch factors (using trigger object) 1:06:30 back to interpolation 1:08:00 the map object in the 270c library 1:09:30 expression for weighted mean (aka linear interpolation) 1:10:00 oops, need a trigger object 1:15:00 oops, rounding negative numbers works differently 1:16:30 working interpolation 1:17:30 extrapolations msp.ucsd.edu/media/270c.21w/270c-02a-jan12.mp4: Meeting 3, Jan. 12, 2021 0:00 generalities about formalized composition 3:00 Xenakis sets a piano on fire 5:30 folding via modulus and absolute value 7:00 revisit assignment 1 using folding 11:00 interval between 2 pitch classes 17:00 mod 12, minus 6, absolute value, plus 6 19:30 interval vectors 20:00 serialize (etc) objects in library 22:30 interval vector of (0,3,6,9) chord 24:00 generatING all pairs from (0,1,2,3) 30:00 map the pairs through the chord to get all intervals 33:00 music theory: structure of complete tetrachords 38:00 how to complete an interval into a complete tetrachord 39:00 example - chains of tetrachords sharing bichords 43:30 algorithmic search for chords containing subsets 44:00 nested for loops in Pd 48:00 counting with the second digit as least significant digit 50:00 choosing each possible pair of digits once 54:00 finding all the intervals in a tetrachord using "for" loops 56:00 serialize and parallelize library objects 59:00 tohisto and fromhisto library objects 1:05:00 finding library objects and documentation in 0.common.pd 1:07:30 prepare for how to find all chords containing a set: set intersectios 1:11:30 apply library object 1:13:00 iterate through transpositions of a chord 1:17:00 intersection of a fixed set with transpositions of a second one 1:20 finding the unique E/F# bichord in a transposed (0 5 6 8) tetrachord msp.ucsd.edu/media/270c.21w/270c-02b-jan15.mp4: Meeting 4, Jan. 15, 2021 0:00 interpolation between sequences 0:30 text object to hold a sequence 4:00 reading sequence using "text get" 12:30 incorrect sequencer 15:30 playback tempo control 17:00 text editing wizardry failure 20:00 corrected sequencer 21:50 same but with expr so that tempo control isn't upside-down 22:30 get notes out of both sequences in parallel 23:45 Parker rhythm applied to Bach pitches 24:30 pitch squeezing/stretching using expr 28:00 inverting about half-integer pitches 30:00 pitch interpolation between sequences 33:30 pitch interpolation plus stretch/squeeze 35:45 interpolating the rhythms (inter-onset intervals and durations) 45:00 application: P/H Concrete, Xenakis 46:00 straight-line paths through a hyperbolic paraboloid 49:00 pairs of P/Hs sharing edges 52:00 same structure as time/frequency pairs 57:00 rhythmic interpolation in Jupiter by Manoury msp.ucsd.edu/media/270c.21w/270c-03a-jan19.mp4: Meeting 5, Jan. 19, 2021 0:00 assignment 2: 12-bar blues noodler 3:00 probability distributions 4:30 the "random" object in Pd 5:00 pseudorandom number generators and seeds 7:00 Restarting Pd resets random seed. (Deterministic stochastic process) 10:30 a simple pseudorandom number generator 14:00 histograms to measure probability distribution 21:00 checking flatness of probability distribution coming from "random" object 25:00 histogram of digraphs 30:00 small number of trials gives crazy histograms 32:00 thought experiment: write a piece of music in which everything is random 37:00 Xenakis's idea of stochastic music 40:30 what the seed does internally 42:00 generating a random number with a given probability distribution 54:00 verifying the probability distribution with a histogram 1:00:00 interpolating bwtween two distributions 1:01:00 quantiles as generalization of random choice with given distribution 1:05:00 interpolation version 1: cross-fading between distributions 1:11:00 interpolating horizontally between two distributions msp.ucsd.edu/media/270c.21w/270c-04a-jan26.mp4: Meeting 6, Jan. 26, 2021 0:00 more on randomness: sampling without replacement 11:00 arpeggiation without repetition (Lansky technique) 17:00 random permutations 20:00 example: voicing chords as permutation 36:00 random processes that depend on previous outcomes 39:00 stationary processes 42:00 Markov chains versus memoryless processes 47:00 memory of future outcomes? 52:00 Markov condition: dependence on past is limited to immediate past 54:00 random walks (example of a Markov chain) 1:06:00 making a Markov chain in Pd 1:07:00 higher-order Markov chains 1:08:00 limitations of Markov modeling of musical sequences msp.ucsd.edu/media/270c.21w/270c-04b-jan29.mp4: Meeting 7, Jan. 29, 2021 0:00 training a Markov chain from a corpus 4:00 sparseness of Markov chain matrices trained from a corpus 5:30 continuous versus discrete state spaces 8:30 alternative to building a Markov transition matrix: indexing the corpus 11:00 example: smerdyakov object, used by Manoury 16:00 encoding extra information when states are labeled by pitch 20:00 polyphonic music through smerdyakov msp.ucsd.edu/media/270c.21w/270c-05a-feb2.mp4: Meeting 8, Feb. 2, 2021 0:00 more on random walks: boundarys at end of finite-length walks 5:00 adding stationary transitions to a random walk 6:00 boundaries on states or between states 7:30 implementation in Pd 13:00 histogram showing steady state probabilities of random walk 16:00 adding gravity (asymmetric step probabilities) 17:00 adding stationary transitions in Pd 20:00 imitating continuous time (discrete state) Markov process 21:00 diffusion rate of the process 26:00 tour of smerdyakov c code 30:00 mixtures of two Markov chains 32:00 oops, 4th order, no transitions between Donna Lee and Bach invention 33:00 weighting the mixture to crossfade between the two 37:00 don't play transitions that have long delays 39:00 back to c implementation 42:00 methods of smerdyakov object 43:30 "tick" method 44:30 how variable-order Markov chain is implemented 47:00 adding up weights of all transitions (used later to normalize) 48:00 uniformizing rhythm 54:00 writing out a random walk explicitly in smerdyakov 57:00 chord slop (playing back chords that are recorded from a keyboard) 59:00 text-based Markov chain as demonstration of adaptively variable order 1:06:00 varying the order as function of desired number of continuations 1:10:00 entropy 1:12:00 incitement: when is one ramp greater than one at a different increment? msp.ucsd.edu/media/270c.21w/270c-05b-feb5.mp4: Meeting 9, Feb. 5, 2021 0:00 deterministic processes with desired statistics (z12 process) 12:00 keeping track of each state's excess 16;00 dueling metronome (equivalent process) 19:00 outputs a familiar sequence (01001010...) 20:00 l system that outputs the same thing (actually its complement 10110101...) 21:30 incitement: convolving 1000 and 1618 msec metronome outputs 27:00 same thing as sweeping through an orchard (lattice points in first quadrant) msp.ucsd.edu/media/270c.21w/270c-06a-feb9.mp4: Meeting 10, Feb. 9, 2021 0:00 supervised and unsupervised machine learning 3:00 artificial neural networks (ANNs) 6:00 perceptron function: sigmoid function of a linear combination of inputs 9:30 behavior for large inputs 10:00 xor function as thing a one-deep perceptron network can't "learn" 12:00 hidden layers of nurons / perceptrons 14;45 training the ANN as fitting a spline to input data 16:30 ANN package for pure data 18:00 training ann_mlp object in Pd 20:00 training set (file train-xor.txt) 23:00 running the trained ANN 25:00 the trained neural net as a text file 34:00 (tried and failed to use julia to plot ANN function) 37:00 run-network-to-file patch runs an ANN so we can graph the behavior 44:00 (give up trying to graph and go on): how ANNs fail 45:45 Lee and Wessel paper, ANN to train additive synth from sound recording 52:00 subpatch playback.pd works on a single partial 55:00 training set from saxophone solo recording 57:00 is it better to train one ANN for all partials, or train separate ones? 1:00:00 testing the ANN we trained on teh saxophone 1:08:00 listening to output of ANN imitating the sax (using same input data) 1:10;00 why this is an ill posed problem for an ANN 1:14:00 2D should be too low dimensionality for this to work msp.ucsd.edu/media/270c.21w/270c-06b-feb12.mp4: Meeting 11, Feb. 12, 2021 0:00 sonic challenge 3: choice 1: make an algorithm to attack sax solo problem 1:00 choice 2 (discrete-event problem): make a melody given a melodic contour 4:30 theoretical discussion of back-propagation training for ANNs 6:30 training as a minimization problem 9:00 total error function to minimize 10:00 optimization assumes we have a trusted distance function on the output 14:00 training in practice using ann_mlp object in Pd to learn a parabola 15:30 graphing output of ANN 18:30 graphng XOR ANN result 20:00 training for XOR again, failure case 23:00 badly trained ANN wasted 3 hidden neurons solving the same part of problem 31:00 behavior outside of training set: sigmoids better than polyynomials 37:30 ANN trained on parabola levels off outside training set 38:00 training failure example on parabola 40:45 another failure mode 43:00 surprise: adding hidden neurons doesn't make training much slower 48:00 2-dimensional paraboloid, 10 hidden neurons, graphing outside training set 50:00 successfully trained paraboloid, behavior outside training set 56:00 heatmap view 57:30 existence of python machine learning packages (not available in julia) 58:30 how to prepare inputs to ML algorithm from audio 1:00:00 is "deep learning" musically useful, either now or potentially? msp.ucsd.edu/media/270c.21w/270c-07a-feb16.mp4: Meeting 12, Feb. 16, 2021 0:00 Sam Pluta guest talk: training neural nets to generate synthesis parameters 1:00 training on tiny training sets 2:00 inspired by Rebecca Fiebrink's Wekinator 2:30 instead of using complex inputs, try simple inputs and complex outputs 3:30 training ANNs when there's no right answer 4:00 Pluta's instrument 5:00 two x/y pads as input 6:30 two surfaces, each with 4 synth algorithms, 8 ANN mappings 10:30 training the ANN with 6 points 12:00 testing the network on one of the 6 training points 13:00 another synth, FM7 (DX7 imitation in supercollider) 14:30 Following Frederick Olafsen's example of how to use FM7 16:30 code for parametrizing FM7 17:00 controlling range of parameters 19:00 analog systems are more forgiving of unstable networks than digital ones 20:00 in FM example, controlling oscillators that then control synth parameters 20:30 how to train the network 21:00 example of a fragile network (small usable parameter range) 22:00 adding a point and retraining 25:00 classifiers don't make much sense in this environment 25:30 very narrow space that works, most parameter combinations will be lame 28:00 4-dimensional space is already impossible to visualize 28:30 impossible for a human to design the mapping the ANNs make automatically 30:00 the ANN can exactly hit the training points; fun thing is interpolations 31:00 using FLUCOMA MOP regressor from Huddersfield 31:50 training is better in Keras but it's much slower to train or load 34:00 we're in a moment where new ideas are opening up 35:00 in this approach failures are interesting 37:00 FLUCOMA is out already 38:00 not an example of overfitting 40:00 about overfitting. Controlling by minimizing total variation 46:00 good and bad range of output of sigmoid 48:00 best if lots of useful outputs in middle of range of sigmoid 49:30 Pd ann_mlp (based on FANN package) defaults to (-1, 1) interval 50:00 implication for training partial amplitudes 53:00 how this works out for Lee/Wessel technique 59:00 if natural output range is (-1,1) quiet partials work badly 1:03:00 normalizing before presenting trainign set to ANN 1:06:00 badly normalized ANNs on Weeks solo sounds like Hammond organ 1:12:00 theoretically Lee/Wessel ANN should never make foldover 1:13:00 Q&A and discussion 1:19:00 quick review of how to operate Lee/Wessel patch msp.ucsd.edu/media/270c.21w/270c-07b-feb19.mp4: Meeting 13, Feb. 19, 2021 0:00 sound challenge 3 again: making melodies with desired contours 1:00 rule-based composition as optimization: melodizer.pd 4:00 digression: debugged version of sax Lee/Wessel technique 7:00 vocal recording through saxophone transform 10:00 graph of first partial amplitude as function of pitch and loudness 12:30 comparing ANN output with measured amplitudes 13:30 graph of measured tenth partial amplitudes 15:00 compared with ANN output 16:30 unsupervsed learning algorithms (no coordinate distinguished as "output") 18:30 self-organized maps (SOMs) 20:30 example: Henrik Frisk SOM analysis in free improvisation 21:30 "learning" a circle 24:00 standard SOM algorithm described 33:30 convergence of SOM algorithm 36:00 how learning parameters affects convergence 41:00 letter "phi" shape (harder problem) 44:00 topological condition for SOMs to work 45:30 using SOM output 47:30 necessity of trusting the distance measure (metric) 49:00 possible metric for spectra 53:00 code for SOM object in Pd 56:00 k-means clustering algorithm 1:07:30 example of a bad outcome 1:08:00 outcome depends on (random) initial state 1:12:00 bad outcomes are local minima that aren't global msp.ucsd.edu/media/270c.21w/270c-08a-feb23.mp4: Meeting 14, Feb. 23, 2021 0:00 will cover paper by Arjovsky et al., Wasserstein Gan in week 10 3:45 today's subject is optimization algorithms applied to musical composition 4:30 amusement: applying Lee/Wessel to Judy Garland vocals 8:30 separate networks work better than one combined one 10:30 Garland analysis file, 10.66 msec per slice 11:15 getting signal power (add partial power to partially reject orchestra) 13:30 melodizer: optimizing melody generator 14:00 how to import C code into Pd using "cfc" object (simpler than externs) 16:00 cfc example: greatest common divisor (gcd) using Euclid's algorithm 18:00 melodizer setup: 29-note melody with quarter-note rhythm 18:30 First term in melody's "value" or "score" evaluation: transitions 22:30 overall score is weighted sum of scores by the different criteria 23:00 criteria are: transitions, repetitions, contour, harmony, and similarity 23:30 combinatorial optimization algorithm: change 1, 2, or 3 pitches per step 25:30 even if a change doesn't improve score, make it if score doesn't go down 27:00 melody optimized according to transitions criterion alone 29:30 repetition criterion: fragments reappear. (wrong, corrected 45:00) 30:30 Markov analysis or other local methods won't capture this 32:00 first argument to cfc message selects 1 of 5 functions 33:00 tour of the cfc source code 42:45 "getscore" c function in cfc to make weighted sum of component scores 43:45 "perturb" function alters melody 44:30 functions for the individual criteria 45:00 repetitions criterion punishes us for over-repeating pairs of notes 45:30 contour criterion 46:45 tonality criterion 50:00 similarity criterion - repeated fragments 52:00 optimizing by contour alone 54:00 (fixing a mistake in contour code and trying again) 56:30 adding transitions criterion to contour 58:00 all criteria combined 58:30 optimization strategy: relaxation (temporarily drop one requirement) 1:03:00 finished product (sonic challenge 3, melodic version) 1:09:00 Stockhausen BBC lecture: "if this were an octave the piece would be over" 1:11:00 another possiblitiy: duelling Markov chains (Baysian networks, sort of) msp.ucsd.edu/media/270c.21w/270c-08b-feb26.mp4: Meeting 15, Feb. 26, 2021 0:00 Approach to sonic challenge 3 using conditioned Markov chans 1:00 input to smerdyakov. Example: top line of Bach invention 2:00 changing order of Markov chain 3:30 imposing a priori probabilities 4:30 probabilitiy space representation of conditioning a Markov chain 7:00 conditioning is just hacking a smaller piece out of the sample space 11:30 Bayes' rule (flipping conditional probability backward) 16:00 specifying an a priori probability distribution 17:00 model: melodic contour is considered as blurred output of the Markov chain 19:00 Bach with random accidentals 20:00 force that (stupid) output to be a melodic contour we specify 31:00 result: just multiply transition probabilities by contour weighting function 34:00 normalization is confusing but we can just assume it's constant 36:00 message to smerdykov to impose an apriori probability distribution 38:00 testing smerdyakov with imposed contour 40:00 possible to give an impossible condition (0/0 probability) 41:00 no sanity check, but give everything an a priori prob of at least 10^-9 43:00 setting order to 0 44:30 implementation in smerdyakov source code 48:00 example of a Markov chain to generate syncopated rhythm 56:00 limitation: the three processes are ignoring each other 57:00 because of syncopation the chains don't advance at same times 58:00 for the chains to condition on each other we might need to add states 1:00:00 conditioning Markov chains on each others' (not yet computed) outputs 1:01:00 I think this is a Bayesian belief network (that's a buzz-phrase) 1:02:00 Bayes' law allows us to rearrange the arrows of causality 1:05:00 if not in real time you can re-imagine this as an optimization problem msp.ucsd.edu/media/270c.21w/270c-09a-mar2.mp4: Meeting 16, March 2, 2021 0:00 typical rhythmic constraint: avoiding collisions in time 2:00 example from Charlotte Truchet paper: rhythmic canons 4:00 random walk, smaller time steps limit to Brownian motion 5:30 parameter of Brownian motion: variance per unit time 6:00 doubling speed multiplies standard deviation by sqrt(2) 8:00 fractal property: re-scaling speed gives another one renormalized 9:30 another fractal: snowflake curve 10:00 length is infinite 13:00 this mirros composers' idea of having small scale reflect large scale 15:00 Stochhausen's idea of playing Beethoven's 9th symphony at 440 Hz 16:00 back to L system to make self-similar sequence of 0s and 1s 17:00 there's also a top-down way of seeing it that goes from large to small 21:00 fractally partitioning a line segment. 22:00 This shows up in Poeme ELectornique, 25:00 Cyril Henry's (I think) L-system examples in Gem 33:00 chaotic flows on 4-sphere msp.ucsd.edu/media/270c.21w/270c-09b-mar5.mp4: Meeting 17, March 5, 2021 (spliced; part of original is missing) 0:00 relationship between stochastic processes and chaos 0:30 iterating the function 4ax(1-x) 4:00 a=1: Values near zero repelled exponentially 5:00 smaller values of a. a>1/4: zero (unstable), and another fixed point 8:00 when slope of crossover point less than -1, other fixed point is unstable 10:00 period doubling 11:00 understanding the function as taffy-pulling 12:00 a=1: Cauchy polynomial - doubling the angle, so equivalent to 2x mod 1 14:00 start with a random real number, and output binary digits as a sequence 15:00 so iteration (if a=1) is equivalent to a coin-tossing process 18:00 continuous-time chaotic process 19:00 flows in in one or two dimensions 20:00 one-dimensional flows have simple behaviors 23:00 oscillators as two-dimensional flows 26:00 possible behaviors in neighborhood of fixed point in two dimensions 30:00 three dimensions or up: possibility of chaotic behavior 33:00 example: Lorenz attractor 36:00 output as audio signal 38:00 if you can't observe it exactly, you can base a random process on it 39:00 you could measure the entropy of the random process 39:30 how to make fractal curves out of a dynamical system 40:00 snowflake curve interior as eventual fate of an iterated function msp.ucsd.edu/media/270c.21w/270c-10a-mar9.mp4: Meeting 18, March 9, 2021 0:00 example of a (non-chaotic) flow: differences between three phasors in pairs 2:00 which of two phasors is "ahead" of the other measured against a third one 4:00 same thing as a control operation (incitement from end of Feb. 2 class) 5:00 the 0100101... L-series if one is golden section faster than the other 7:30 why did subtracting 2 phasors into a comparator give 3 pitches? 24:00 state space of two oscillators can be drawn as a rectangle 27:00 flows in a two-dimensional phase space that is topologically a torus 33:00 coupled oscillator pairs 34:00 can require that all arrows in the flow point northeast to avoid stable points 35:00 flow described as a differential equation determined by a vector field 37:00 first-order equation implies no inertia 39:00 hard-syncing one oscllator to another 42:00 hard sync as a flow 44:00 soft sync 48:00 making a sawtooth oscillator from scratch in Pd (block 1 subpatch) 53:00 soft-syncing two of them using a comparator 58:00 other type of coupled oscillator network: non-physical pool table 1:00:00 simplified phase space is 4x the top of the table 1:01:00 more correctly, the phase space is four-dimensional 1:02:00 very incorrect pool table: triangle 1:03:00 assuming fixed speed can reduce phase space to 3 dimensions 1:04:30 resulting behavior 1:05:00 very strange behavior if triangle has one very small angle msp.ucsd.edu/media/270c.21w/270c-10b-mar12.mp4: Meeting 19, March 12, 2021 0:00 topic not covered yet: coupling Markov chains to each other 3:30 another uncovered topic: flows on 3-sphere (unit quaternions) 6:30 other topics: Gendy (Xenakis); signal-rate staircase; 3F 9:00 Gendy algorithm: waveforms made of end-to-end connected line segments 13:00 Pd patch to imitate Gendy 14:00 random-walk abstraction. Random walks with constraints and bias 21:00 S709 by Xenakis - you can check on waveforms in the original recording 23:00 Audio rate staircase: phasors and sample/hold 31:00 bell designer (3F technique) 35:00 2- or 3- dimensional lattice of frequencies 36:30 ways of choosing finite subsets of lattice 38:00 the zero-frequency line (or in general, hyperplane) 40:00 frequently occurring frequency pairs separated by f, g, or h 41:00 can be realized as oscillators or resonant filters for example 43:00 seeding the pseudo-random sieve msp.ucsd.edu/media/270c.21w/270c-11a-mar16.mp4: Meeting 20, March 16, 2021 0:00 Arjovsky, Chintala, and Botton, Wasserstein GAN paper 2:00 Think of unsupervised learning as learning a probability distribution 3:00 ground truth is a probability distribution 4:00 we wish to map a simpler distribution to the "real" one 4:30 insight 2: the Kullback-Leibler divergence isn't an ideal measure 5:30 definition of KL divergence 7;00 think of divergence from f to g as "how well you can encode f using g" 8:00 why it's always nonnegative 9:30 problem with KL as a thing to minimize in a training procedure 12:30 maximizing likelihood of observations given the model 13:00 but what if likelihood is zero? adding noise to make log likelihood finite 15:30 asymptotically, measured KL divergence becomes log liklihood plus constant 16:30 added noise typically 10% of amplitude of signal 19:00 earth-mover distance. We saw a form of this earlier (quantile cross-fade) 21:30 probably related to the optimal transport problem 22:30 hard to estimate earth-mover distance in higher number of dimensions 23:30 even NP complete problems are often tractable in practice 24:30 a minimax principle relating earth-mover distance to an integral 24:30 (Kantorovich-Rubinstein duality) 30:00 Can treat this as a supervised learning problem 31:30 maybe this doesn't measure earth-mover distance but it seems to work anyhow 34:00 general setup for auto-encoders 37:00 applying earth-mover's distance to train it 38:00 training algorithm as a nested loop (inside loop learns earth-mover distance) 40:00 this is "algorithm 1" in paper 41:00 one trick: don't have to update earth-mover function to estimate slopes 43:00 typical application: sampling from the "learned" distribution 45:30 how it's possible to affect specific choise of sample 48:00 comparison: self-organized map solves a different minimization problem 49:00 idea: make a joystick that travels through a set of desired outcomes 50:30 this might be what is called normalizing flows 51:30 IRCAM paper: train a VAE to learn how to parametrize a synthesizer 53:00 big problem area: dealing with time behavior as a learnable feature ----------------------------------------------------- Music 271b. Survey of Electronic Music Techniques II. Spring quarter 2021. course materials: msp.ucsd.edu/syllabi/271b.21s/ recordings: msp.ucsd.edu/media/271b.21s/ contents of recordings: msp.ucsd.edu/media/271b.21s/271b-1a-mar31.mp4: Meeting 1a, March 31, 2021 0:00 the electronic music repertory 1:00 part 1: early computer music 5:00 part 2: audio recordings as medium 7:00 the tape music era (1943-2000 perhaps) 8:30 part 3: algorithmic music 16:30 Outliers: Wendy Carlos and Maryanne Amacher 19:30 organization of the course (send me e-mail about what interests you) 23:00 Patches to use: the Pure Data Repertory Project: 25:00 PDRP documentation 28:30 Example: running patch for John Chowning, Stria 31:30 about the Stria patch (not a realization, just a study patch) 32:00 FM (frequency modulation) synthesis 33:00 sinusoids and FM sound at A440 34:30 FM ratio (modulation frequency to carrier frequency) 37:00 FM spectrum 37:40 main out and mute controls. Gain units for main out 39:30 spectrum of very slowly changing frequency tone 40:00 index controls range of frequency deviation. Phase modulation 40:30 if using phase modulation, index adds bandwidth 42:30 frequency resolution of ears and of FFT-measured spectra 43:30 bandwidth (spread) is product of index and modulation frequency 44:30 faster modulation gives distinct spectral peaks 47:00 modulating frequency controls separation of peaks but not amplitude 48:00 index changes the amplitudes but not the frequencies 49:30 when index is 0.38 center frequency drops out. (it bobs in and out) 51:30 using simple fractions as FM ratios (example, 1/4: periodic tone) 54:00 golden ratio as FM ratio (non-periodic) 56:00 spacing between peaks (reflection of negative frequencies) 56:00 Helholz theory of consonance and dissonance for periodic tones 57:30 musical fifth (7 half tones) 59:00 beating between common partials that almost coincide 1:02:00 making the interval sour 1:03:30 filtering to hear the individual harmonics 1:04:00 caution abut gain while filtering sounds 1:05:00 perfect fifth (7.02 hald steps) 1:06:00 tritone (dissonant interval: pairs of partials within a critical band) 1:08:30 tempered major triad 1:10:00 near-perfect triad (-3.16 and -7.02 half-steps) msp.ucsd.edu/media/271b.21s/271b-1b-mar31.mp4: Meeting 1b, March 31, 2021 0:00 Stria by John Chowning 1:00 first tone in stria, imitated using the patch 2;00 beginning of real piece 6:30 time proportions in the piece 9:00 the pre-stored sequence in the patch 10:00 more faithful reconstruction from Huddersfield 12:00 theory: using the golden ratio as an FM ratio 14:00 geometric construction of golden ratio 17:00 r-1, 1, r, and r+1 in geometric progression (same interval 3 times) 22:00 Fibonacci sequence and golden ratio related 24:30 spectrum of FM with golden ratio of modulation to carrier frequency 25:00 stacking three golden FM spectra 26:00 musical scales with different octave ratios and octave divisions 28:00 spectrum of four tones separated by golden ratio 29:00 three golden ratios sound almost like 2 octaves 32:00 same interval is less sour if we use golden-ratio spectra 34:00 spectrum of four tones separated by golden ratio sounds consonant 37:00 1/3 of an octave (if an octave is golden ratio) 40:00 major tetrad in 12-tone scale, sounds sour if using golden ratio spectra 41:30 (0,3,6,9) tetrad plays role of major tetrad in Stria 42:30 dividing 2:1 octave in other numbers of steps, playing (0,4,7,12) chord 43:00 quarter tones (2:1 divided in 24, or tritone divided by 12) 48:30 how many steps to divide "octave" into 53:00 how the Stria example is sequenced and what the parameters mean 56:30 amplitudes in this patch are in decibels (old practice) 57:30 index of modulation units 59:30 beating modulator oscillators 1:01:30 carrier and modulation frequencies more general definition 1:04:00 layout of files in the Chowning study patch (includes a library) 1:06:00 the qlist ("cue list" or "score") 1:08:00 events in the qlist 1:10:00 cross-fade in event 2 msp.ucsd.edu/media/271b.21s/271b-2a-apr7.mp4: Meeting 2a, April 7, 2021 0:00 How to build a piece out of the null piece 1:30 the patches 0.pd and 1.pd (without or with a qlist stepper/sequencer) 2:30 null piece now can read input soundfiles 4:00 copying the null piece to create a new piece named "aardvark" 4:40 difference between library and score directories 6:00 controls on main window, guts hidden 7:00 keep heavy drawing tasks in subpatches you can hide to save CPU time 9:00 put together a phase modulation sound 10:00 input, DSP, and output windows are connected to control execution order 11:00 "input1" send/receive and "output1" throw/catch 15:00 modulating oscillator 16:00 carrier oscillator split into phasor~ and cos~ 17:00 controlling the two amplitudes 19:00 index of modulation is amplitude of modulating oscillator 20:00 testing the FM pair 23:00 controlling and naming the parameters with "genctl" abstraction 24:00 receive, number box, and genctl working together 25:30 sending a message to set a parameter as in a qlist 27:00 importance of choosing mousable, readable scales (units) for parameters 30:00 fourth-power curve for controlling gains 31:00 the amp4~ abstraction for controlling amplitudes or gains 34:00 controlling the index with amp4~ (later changed) 35:00 first cut at fully controllable FM pair 36:00 "stop" button resets everything (the genctl abstraction does this) 37:30 usnig MIDI units for the two frequencies 38:00 hang a number box off a control object for debugging 39:30 oops, index should use linear units, not fourth-power 40:00 fixing index to be linearly rampable 41:30 amp4~ handles ramping 43:00 genctl makes the control display progress of ramp 43:45 pitfall: sending a pair of numbers to a receiver that didn't expect it 44:30 npack to split elements of the pair 45:20 need an audio rate ramp (line~) to control index to avoid zipper noise 46:30 how to make a default ramp time 51:00 rampable frequencies (ramp in pitch, not frequency0 53:00 wrongness of linearly ramped frequencies 54:00 5-msec default frequency sweep time (vs. 20 for amplitudes) 57:30 pitch sweep working 1:00:00 testing finished FM pair 1:01:00 alternative definition of parameters to specify frequency ratio 1:03:00 controlling the FM pair from main patch 1:04:00 adding a reverberator (rev3~) 1:06:30 rev3~ parameters don't ramp (use an external control line of you want) 1:10:00 reverberator working 1:10:30 using "grab" feature to get parameter snapshot msp.ucsd.edu/media/271b.21s/271b-2b-apr7.mp4: Meeting 2b, April 7, 2021 1:00 Jonathan Harvey, Mortuos Plango, Vivos Voco. Quick look at Harvey's paper in CMJ 3:45 difficulty of wielding additive synthesis in general 5:00 generating frequencies in MPVV, partials of Winchester cathedral bell 7:30 orchestration possibilities of voices plus additive synthesis 9:00 generatong series of MPVV 11:30 sections of piece labeled by generating series 12:30 the glissandi 14:00 stable clusters at beginning and end of glisses suggest pedal tomes 16:00 Rand's technique similar but harmonic series instead of bell 17:00 piece annnounces its series at 1:00 19:00 section 2 announced by its characteristic pitch 19:45 glissandi ni the piece (distorted) 20:30 again, better (not perfect yet) 21:30 sung chord at end 24:30 about the study patch 26:45 opening the study patch 28:00 soundfile chooser to play soundfiles through patch 30:00 the patch has a built-in bell loop 31:00 the sigmund object for sinusoidal analysis 32:00 printed out peaks 33:00 oscillator bank 35:00 comparing analyzed pitches to series in CMJ paper 37:00 separate window for culling and sorting sinusoidal components 40;00 different anayses of sound are similar but distinct 42:00 bell frequencies might not really be stable (Doppler shift) 43:00 research question: what makes some spectra sweet and others ugly? 47:00 glissandi 48:00 making message boxes containing all the components 53:00 sorting components by frequency 55:00 glissing between sorted list of compinents 55:30 selecting components within a pitch range 56:00 verifying vocal chord at end of piece is taken from series 1:00:00 additive synthesis patches always enforce some writing style 1:02:00 why Harvey's piece sounds better than, say Risset's Inharmoniques 1:03:00 Latin inscription on the bell suggests the ethos of the piece msp.ucsd.edu/media/271b.21s/271b-03a-apr14.mp4: Meeting 3a, April 14, 2021 0:00 looking at recorded sound based techniques earlier than planned 2:00 two currents in electronic music typified by GRM and IRCAM 3:30 studio technique isn't really the opposite of real-time 4:00 study piece is James Tenney, Collage #1 7:00 instantly recognizable sound to a 1963 audience emerges in middle 8:30 study patch is tenney-collage (tenney-collage.zip on PDRP site) 9:00 no patch could do everything interesting; this one just shows some ideas. 11:45 sample rate of patch migth be different from that of recording 13:00 reading and writing soundfiles through PDRP patches 14:00 the sampler itself is in DSP subpatch usnig "clone" object 14:30 messages to "samp" play one "note" using the sampler 15:30 arguments to samp: pitch, gain, duration, sample#, onset, rise, decay 16:30 can play overlapping notes 17:30 microtonal pitches 18:00 making a cluser, several "notes" at same start time 20:00 units of gain (50 for unit gain) and pitch (MIDI, 60 for original speed) 21:00 duration in milliseconds is output duration, not duration in file 22:00 stacking 4 octaves 22:30 need for automation: potentially 1000s of individual notes 24:00 example of audtomation: phased loops 26:30 you might not want to use this in exactly this form. 27:00 period and length in the looper 30:30 timing and emveloping of sampler playback in the patch (diagram) 31:00 onset is where in recording to start 31:30 the amplitude envelope shape 33:45 output is product of envelope generator output and playback signal 34:00 rise time, "duration", and "decay" time (nomenclature is slippery) 35:30 overall length is "duration" plus "decay" time (as in a keyboard synth) 38:00 special case, duration equal to rise time 40:00 setting all three time values equal gives time-symmetric envelope 40:30 sometimes called a Hann window 42:00 why aren't rise, duration, and decay just the same parameter 43:30 you can record audio input live and sample from it 45:00 simple example of automated granular sampling 46:45 changing parameters in a loop 47:45 overlap depends on total playing time and frequency of the loop 49:00 zero rise time to find an attack in the recording 50:00 this can make clicks but we're getting away with it here 50:45 slow rise and fast decay, and vice versa 51:00 desirability of having a choice of decay shapes for more natural decays 53:00 idea: name starting locations instead of giving them numerically 55:00 digression: tanh as a saturation function, different from envelope shape 57:00 digression: using audacity to label onsets and "text" object to store them 1:00:00 another thing you can do with the patch: granular sampling 1:01:00 exactly periodic repetition gives a tone 1:03:00 getting rid of the periodicity randomizing grain time intervals 1:05:00 diagram of periodic and aperiodic repetition of grains 1:07:00 getting random numbers 0 to 10 in increments of 1/100 1:09:00 fixed "samp" messages in message boxes aren't very flexible 1:09:30 the looper example demonstrates parametrized messages 1:10;00 should add time reversal to dolist (patch doesn't do it yet) 1:11:00 item in dolist: you can't track down a speaking "voice" to alter it 1:14:00 more dolist: this patch only does stereo in and stereo out 1:15:00 more dolist: separate streams ("tracks") of samples 1:16:45 more dolist: multichannel output and spatialization msp.ucsd.edu/media/271b.21s/271b-03b-apr14.mp4: Meeting 3b, April 14, 2021 0:00 aleatoric processes 4:30 making duration variable 6:00 using random time both for metronome and for duration of sample 7:00 changing playback location in time (onset) 7:30 range from 500 to 1500 (1499 to be exact) 9:00 saple rate correction seems not to be working yet 11:00 more than one dollar substitution in message boxes: "pack" object 13:00 "float" object stores first value so that it doesn't trigger "pack" 13:45 "bang" sets the pair of numbers off, and you can asynchronously set them 14:30 you can do the opposite (make "pack" output a message on either input) 17:00 random number fo r onset, range chosen to fall within guitar solo 17:45 using trigger to put number in non-first inlet of pack and trigger it 19:30 all these parameters probably need names. Name ranges in pairs 20:00 random-onset-start and random-onset-range variables and number boxes 23:00 receives can go into control (message) version of line 24:30 default time grain of 20 milliseconds 27:00 control names for on/off and for time duration 28:00 suggestion for messages that can't ramp: use "f" to be sure of message 30:00 putting an event in a message box to start randomized-playback process 32:00 adding pitch variation 34:30 three elements to pack together now, ordered by trigger "b f b" 35:30 adding randomizer for pitch 37:00 grain of randomization should be much smaller than 1 (1/1000 here) 38:30 you might want to specify middle of random range instead of start 41:00 trying to imitate beginning of Tenney piece 44:00 how could you make this loop? 45:30 you can have multiple processes running at once 47:00 another automated patch: granular sampler 48:45 variables we'll want: pitch, timing, duration, onset 50:00 bad but effective way to replace a name systematically (random to grainer) 53:00 inter-onset interval (time delay) no longer same parameter as duration 55:00 combine pitch, onset, and duration into a "samp" message 59:00 granular synthesis result from vocal portion of recording 1:00:00 randomizing pitch variation 1:01:00 randomizing onset makes a more diffuse sound 1:02:00 oops, another process had been running, rerunning the tests 1:06:00 possibility: sampling live instruments, playing patch as an instrument 1:07:00 more possibilities: attach MIDI controllers and/or use presets 1:09:00 inside the cloned "stereo-sample-reader" patch 1:10:00 inlet for messages to start playback, issued by "clone" object 1:11:00 more capabilities of "clone" 1:13:00 how you could adapt this patch to your own ends 1:14:00 Polansky has a paper about collage #1 on his website msp.ucsd.edu/media/271b.21s/271b-04a-apr21.mp4: Meeting 4a, April 21, 2021 0:00 Hidegard Westerkamp's Beneath the forest floor 0:30 musique concrete and soundscape composition compared 3:00 writings and videos available about the piece 3:30 Inside Computer Music by Clarke, Dufeu, and Manning 6:00 downloadable materials on their website including apps to explore pieces 7:00 Westerkamp's videos describing the genesis of the piece 14:30 why one recording of two ravens didn't work i nteh piece 16:00 another raven recording that proved useful 19:00 the raven recording in audacity 20:00 1/70 - second-long ululations 21:00 TaCEM app shows the layout of the entire piece 24:00 reconstruction of piece in graphical form showing recordings and processes 25:20 slowed-down raven sound in TaCEM app 27:00 reverberance extended by slowing the recording down 29:00 trying it in audacity 32:00 three separate calls used so that it doesn't sound like sampling 34:30 overall view of piece in audacity. 35:00 Raven calls dominate forst part of piece 38:00 sounds of wind, lifeforms, and water 39:00 the sound of the motorized saw answers teh raven 40:30 quiet section that recalls beginning 41:00 pitched sounds emerge in second half 44:00 other bird sounds are sources of pitched sounds 44:30 the wren recording is high-pass filtered and slowed down 45:00 7 kHz salient frequency 47:30 time stretching (just an example, not the original technique) 48:00 more faithful imitation using reverberation 49:30 related sound from in piece (but (oops) a different bird) 50:00 hovering chords not unusual in traditional tape music 51:00 treatment of rusing water with delays 53:00 spatializing stereo recordings 54:00 close microphone pair gives impression of stereo field 56:00 Westerkamp: not sampling and manipulation, but recording and processing 57:30 melodic material from thrush song 1:03:00 1990-era technology 1:04:00 pitch fields in recording-based music msp.ucsd.edu/media/271b.21s/271b-04b-apr21.mp4: Meeting 4b, April 21, 2021 0:00 adding to Tenney patch to imitate techniques in Westerkamp 1:30 need to filter birdsong to get clean sounds 3:00 closer look at thrush sound in audacity 5:00 start times and durations of three thrush notes 7:00 playing thrush notes in Tenney patch 10:00 wrong transposition (fixed after class) 14:00 back to filtering 18:00 butterworth low-pass and high-pass filters 19:30 testing filters with noise input 25:00 more about filters 26:30 improving on simple band-pass filter by pairing two detuned ones 31:00 frequency response of Butterworth versus simple low/high-pass filters 32:00 Butterworth filter design 36:00 three thrush notes into sampler 37:30 reverberation using rev3~ object 44:00 testing reverberator using an impulse as nput 48:00 sampler into reverberator 52:00 fix filter cutoff to match transposition 55:00 why ramp up and down over 100 msec - gain ramp as modulation 57:30 frequency response of a ramp 58:30 the faster the envelope, the higher-frequency the aliasing 1:02:00 these ramps can be slow but in other cases you want a fast one 1:02:30 to preserve the attack in a recording make rise time instantaneous 1:04:30 gating (applying a noise gate to a recording) msp.ucsd.edu/media/271b.21s/271b-05a-apr28.mp4: Meeting 5a, April 28, 2021 0:00 Trevor Wishart's Imago: wavesets and phase vocoders 2:00 the acousmatic musical style 2:30 same techniques as in soundscape composition but different musical style 4:00 idea of deriving a piece out of a small sonic seed: Xenakis's P/H Concrete 6:30 seed sound for Wishart: two whiskey glasses clinking together 9:00 formal approach: form imposed by cmoposer, not emerging from soundscape 10:30 characteristic acousmatic move: gathering energy and release 12:30 close look at the seed sound using phase vocoder 17:00 time-frozen decay of the sound 19:00 uses of phase vocoder in Imago 19:30 frequency shifting (might not actually be the thing found in the piece) 23:00 pitch shifting and frequency shifting contrasted theoretically 28:00 incitement: use both pitch and frequency shifting to squash a spectrum 31:30 frequency shifting (single sideband modulation) compared with ring mod 35:00 more about phase vocoder 37:30 location in source file (center of analysis window) 38:00 window size 39:00 Hann window (same envelope as in granular example from Tenney) 41:00 how the Hann window modulates the sound 43:00 spectral stamp imposed by Hann window is 4x findamental frequency wide 44:00 analyzing a sum of sinusoids: frequency resolution 45:00 2048 points (fundamental is about 24 Hz.) - 100 Hz. resolution 47:00 100 Hz. is about low A flat. 49:00 testing phase vocoder on a combination of sinusoids 54:00 what happens when the window is too small (i.e., sinusoids too close) 56:30 fundamental tradoff: time resolution versus frequency resolution 1:00:00 two frequencies in seed sound, 1763 and 1863 1:04:00 time stretching using the phase vocoder patch 1:06:00 why the phase vocoder sounds spacy (or phase-y) 1:07:00 phase locking. Frequency domain is separated into "bins" 1:13:00 phase vocoder on speech 1:16:00 speech stretched usnig very short analysis window msp.ucsd.edu/media/271b.21s/271b-05b-apr28.mp4: Meeting 5b, April 28, 2021 0:00 more about phase vocoder: compared with reverberation 8:00 vibrato via pitch shifters 9:00 2700-ish frequencies can be made to sound like a vocal formant 11:00 waveset manipulation (specifically waveset duplication) 18:00 Two Women, Four Voices: simpler examples of Wishart's techniques 19:00 part 3 (Ian Paisley): phase vocoder. Vibrato and also too-small windowing 20:00 part 2: waveset duplication on Diana's voice 24:00 waveset duplication tested on two sinusoids 26:00 controls: minimum number of repetitions and minimum waveset length 34:00 high frequencies can re-emerge as formants 36:00 waveset duplication tested on Diana's voice 36:30 waveset duplication compared to wavetable oscillation 39:00 other waveset operations (not ready in this patch) 40:00 waveset substitution 42:00 waveset averaging 44:30 waveset duplication on seed sound 48:00 time-stretched seed sound through waveset duplication 52:00 why waveset duplication sometimes puts out higher pitches 58:00 Wishart's emphasis on hearing the source sound rather than the technique 1:02:00 even though the form is classical, result is guided by what he finds 1:05:00 Composer's Desktop Project (CDP), well-established software 1:06:00 using phase vocoder to shape envelope msp.ucsd.edu/media/271b.21s/271b-06a-may5.mp4: Meeting 6a, May 5, 2021 0:00 Natasha Barrett, Little Animals and (mostly) The Lock, from Hidden Values 3:00 debts to Dennis Smalley, Jonty Harrison, (early) Trevor Wishart 8:00 "wav" and "aiff" can't hold long soundfiles with many channels 10:00 classig GRM-ish sounds in Little Animals 11:30 sound projection - technique/style in which a stereo tape is spatialized live 13:30 realistic-sounding, "present" images in stereo recordings 16:00 foreground and background layers 17:00 resonant filterbanks. Another example from Noanoa by Saariaho 19:00 The generating flute multiphonic 21:30 tradition (or trope) of discursive sounds against a static pitch field 24:00 The Lock avoids many electroacoustic-music tropes and keeps others 24:30 pitch fields in The Lock made by time-stretching and filtering the voice 27:00 spatialization is central to Hidden Values 28:30 spatial paths in concert with musical gestures and timbral evolutions 31:00 Barrett shows her setup in video from TaCEM 32:30 IRCAM spatializateur ("spat") 2 views of spatial paths 34:00 Nuendo DAW feeding 32(?) channels into IRCAM spat via jack 36:00 acousmatique-style spatial projection is not same as cinematic spatialization 36:30 cinematic-style hearkens back to Stockhausen in the 1950s 37:30 angle cues via panning and distance cues via filtering and reverberation 38:30 John Chowning's paper The Simulation of Moving Sound Sources 40:00 three approaches to cinematic spatialization: Ambisonics, VBAP, and WFS 42:00 VBAP (Vector based amplitude panning) 43:00 VBAP simulates direction but not distance of a virtual source 45:00 cinematic spatialization as used to simulate moving sources 46:30 Gestalt "common fate" grouping to fuse different source sounds 47:00 this is described in Four Criteria of Electronic Music by Stockhausen 49:00 Barrett placing three sounds spread out in space but moving together 50:30 simulating distance on top of VBAP 53:00 Ambisonics as a way to represent a local sound field (not cinematic) 54:30 to fully represent the sound field in a room takes about a million speakers 57:00 a soundfield is a superposition of plane waves in all directions 58:00 at a single point there are only 4 independent channels 58:30 but humans pick up more about the sound filed than from a single point 59:30 two-dimensional ambisonics as a function of time for every direction 1:01:00 if you sample the possible directions you get a Nyquist-like cutoff 1:02:00 to first order: DC and first-harmonic sinusoid around a circle 1:03:00 "radiation patterns" for ambisonics: omni and figure-eights 1:04:00 weighted sums of three basis patterns to make others such as cardioid 1:05:00 you can theoretically record first-order sound field at a single point 1:06:00 recording and playing back first-order Ambisonic signals 1:08:00 Ambisonic channels are in (or 180 degrees out of) phase (no delays) 1:10:00 issues of polarity and diffuse-ness in Ambisonic reproduction 1:12:00 higher-order Ambisonics. Second-order requires 5 channels 1:13:00 equivalent to sampling the circle of directions into 5 points 1:14:00 linearity of Ambisonics allows superposition of sound fields msp.ucsd.edu/media/271b.21s/271b-06b-may5.mp4: Meeting 6b, May 5, 2021 0:00 Wave field synthesis (WFS) 2:30 imagining a faraway sound source heard through a series of open windows 3:30 special case: all sources ("windows") get the same signal 5:00 beam width depends on wavelength of sound and total width of source array 6:00 side-beams (additional directions of radiation) 8:00 spacing of speakers matters and should be a wavelength or less 9:00 aliasing in the angle of radiation depends on individual speaker spacing 10:30 projecting at an angle requires that you delay the signals in the speakers 13:00 requirement to avoid spatial aliasing 14:30 true WFS would require a speaker every 1/2 inch 16:00 WFS can theoretically simulate a sound source inside the listening area 17:00 VBAP and Ambisonics can only simulate faraway sources 18:00 one-dimensional wavefield arrays actually output cylindrical waves 19:00 OK, you could use a pizza-box shaped listening space 21:00 problems that arise when audience is dispersed in a listening space 23:00 problems when panning to simulate virtual sources between speakers 25:00 yet another problem: Hass (precedence) affect 29:00 in extreme case, one foot off-axis can cause Hass trouble 31:00 Ambisonics seems to get a larger listening sweet spot than VBAP 32:00 but directionality is more diffuse (less clarity of image) 34:00 highly present sounds of traditional acousmatic music benefits from "projection" 35:00 summary: advantages and disadvantages of VBAP, WFS, and Ambisonics 39:00 implications for listening to music in listening spaces in the future 40:00 binaural reductions of loudspeaker spatialization 41:00 how binaural spatialization works 43:00 head-related impulse responses and transfer functions (HRTFs) 45:00 spatial perception requires freely moving head 47:00 the ORTF mic setup 48:00 mixing an ORTF pair to a monaural signal 50:30 why worry about cinematic spatialization at all? 51:00 example: Janet Cardiff's 40-voice motet 52:00 octagonal loudspeaker arrays frequently used in electronic music concerts 53:30 affordance: clarity from separating "voices", moving or not 55:00 concert halls blur out details of amplified sounds 58:00 music in front of listener versus music played from behind 59:00 suggestion: put speakers and live musicians on stage together 1:02:00 more on Barrett, The Lock - the nature of the sound sources 1:02:30 TaCEM screen showing geneologies of materiels 1:04:00 processing is mostly time stretching, filtering, and reverberation 1:06:00 electroacoustice-style pitch fields easy to make beacuse of source 1:08:00 spatial separation to enhance clarity 1:09:00 apparently used all three spatialization models for IRCAM performance 1:10:00 Spatialisateur used to simulate binaural recording of loudspeakers via HRTFs 1:11:00 advantages: no room reverberation, and listener is in sweet spot 1:13:00 simple, arcing spatial paths 1:16:00 binaural spatialization better at sides than front msp.ucsd.edu/media/271b.21s/271b-07a-may12.mp4: Meeting 76a, May 12, 2021 0:00 Laurie Spiegel, Appalachian Grove 1:00 Groove system at Bell Labs - computer controlled analog electronics 2:00 this was Mathews's first foray into real-time computer music 3:00 genesis and design of "hybrid" studios 5:00 related to sequential drum (Mathews and Moore) 6:00 what the piece sounds like and how it was generated 8:00 control inputs to analog patch - ADSR triggers, pitches, filter parameters 12:00 center-panned voice only speaks on on-eighth-notes 13:00 choice of pitches 14:30 the ADSR envelope generators 16:00 what happens when sustain level changes while ADSR is in D or S phase 18:00 can enter release phase while in A or D 20:30 study patch: signal paths first, then control 23:00 ADSR abstraction 24:00 output is line segments so usually need to apply a nonlinear function 24:30 band-limited sawtooth generator 25:30 resonant filter 26:00 panner 27:00 control panel: tempo in attacks per minute 28:00 ADSR abstraction has a peak-amplitude parameter (unlike analog ones) 30:00 preview of mechanism to build control panel 31:00 six parameters for each ADSR (one for amplitude and one for VCF) 32:00 pitch, pan, and q are per-voice (three each eventually) 32:30 units for ADSR envelopes: times in milliseconds 34:30 "peak" is in whatever units used by what you send the ADSR to 35:30 sustain level is a percentage of peak 36:30 effect of changing duration of DASR triggering pulse 39:30 rearranging the patch to contain three oscillators 42:00 control (message) line objects to allow ramps in ADSR parameters 43:00 using the new parameters 44:00 testing ramping the ADSR release time 45:00 comparison of LFO versus ramps to control parameters 47:00 aliasing if paramter is changing faster than ADSR is triggered 50:00 historical hardware was (sort of) using audio-rate parameter changes 52:00 pitch is fixed for duration of each individual note (not continuous) 54:00 abstraction for the oscillator so we can make 3 copies 56:00 pan controlled inside abstraction 57:00 individualize pan using a control with a per-copy name 58:00 gotcha: don't retype an abstraction if you're editing the interior 59:00 use outlets for output signals and add them outside the abstraction 1:00:00 parameters for filter: center frequency (as pitch) and q 1:02:00 need two filters, one for each output channel 1:05:00 managing triggers for ADSRs (delay equal to note duration) 1:06:00 random choice of which voice to trigger each tick 1:07:00 pitch1, etc, parameters to set pitch 1:07:30 rebuilding control panel 1:09:00 genctl takes an argument to specify default (reset) value 1:10:00 testing the three-voice patch driven by a metronome 1:11:00 imitate detuning of analog oscillators 1:12:00 grab all the parameters and put in a message box 1:14:00 rhythmic detail in the piece: center voice is accented 1:16:00 center-panned voice only appears on on-sixteenths 1:17:00 no hardware sequencer (it was in the computer program) 1:18:00 computer also had live analog inputs msp.ucsd.edu/media/271b.21s/271b-07b-may12.mp4: Meeting 7b, May 12, 2021 0:00 photo of control panel for (I think) GROOVE system 1:30 center frequency, bandwidth and q of a resonant filter 8:30 Moog ladder filter compared to vcf~ object 10:00 affordances of computer-controlled analog versus digital synthesis 12:30 imitating rhythmic pattern in Appalachian Grove 22:00 will skip doing the accents correctly 23:31 control of pitches 26:00 the value object, used to read next-pitch into correct voice 27:00 why you don't need a trigger to control order of pitch versus ADSR 31:30 selecting pitches from a collection 33:00 one way to make a pittch set: 7-element array with a message to fill it 34:30 perhaps better alternative: use a text object to hold the pitch set 38:00 array for pitch probabilities 41:00 bob~ object: ladder filter, alternative to vcf~ 53:00 adding reverberation 54:00 automatic control panel generator 55:30 looking at saved patch to learn how to create objects 57:00 windows in Pd can be sent messages by window name 1:00:00 make-ctls sub-patch. Catching the first in a sequence of messages 1:02:00 counter to set y location of controls in new panel 1:03:00 supplying default arguments to messages using unpack 1:08:00 time stretching (sort of) using long reverberation 1:11:00 short versus lnog sinusoidal burst into infinite reverb 1:16:00 this is probably what was done with bird sounds in Westercamp piece 1:16:30 other ways: phase vocoder (e.g., Wishart); resonant filters (Saariaho) msp.ucsd.edu/media/271b.21s/271b-08a-may19.mp4: Meeting 8a, May 19, 2021 0:00 invited talk: Kerry Hagan (Univ. of Limerick), ...of pulses and times... 4:30 generative music and electronic music genres 6:00 inspired by Nick Collins. Probabilistic analysis of beat music 7:30 algorithmic versus generative music and electronic music genres 8:30 another inspiration: Mortom Feldman's metric modulations 9:30 layering tempos with different pulses 11:00 playing the piece from the patch (note: recording is only one channel) 18:00 why not use samples 19:00 top-down design of piece 20:00 score is series of messages 21:30 metric modulation subpatch 24:00 metronome objects generating different subdivisions of beat 25:00 non-unifirm probabilities 27:00 10 percent nonuplets, etc. 28:00 random selection of sounds depending on beat 30:00 occasional detour nito triplets (dubstep reference) 33:00 sound generator subpatches 35:30 usnig vline object to make stuttered pulses 37:30 attacks don't exactly repeat so that successive events aren't identical 39:30 FM instrument borrowed from another piece, Morphons and Bions 41:30 chirps, drones, and swoops 43:00 patch can play automatically or be performed live 45:00 automatic meter changes 47:00 Pd programming style 48:30 preparing patches to be played without composer present 50:00 control surfaces 52:00 memoryless processes and longer time durations 54:30 piece can sound different every time although the form is fixed 57:00 comparison with fixed-media pieces 1:00:00 real time is fundamentally different compositionally 1:01:00 multichannel sound and real-time spatialization 1:03:00 no filtering used (but some broad-band sounds and some narrow ones) 1:06:00 using filters in generatove or algorithmic music 1:06:30 serialism and representation of all musical values as numbers 1:08:00 role of accident in stochastic music 1:11:00 narrative and musical form 1:14:30 how strictly should a performance follow the "score" (message sequence) msp.ucsd.edu/media/271b.21s/271b-09a-may26.mp4: Meeting 9a, May 26, 2021 0:00 more on Manoury, Pluton. Running patch using recorded piano and MIDI 6:30 "section 100" - qlist1.txt and score1.txt 7:30 score follower compares incoming MIDI from piano with score 8:00 example: C-D-E-F-G-F-E-D-C-C-C-C-C-C in score and repeated Cs from keyboard 9:00 jumps to event 19 10:30 concert setup for Pluton. MIDI interface, PianoBar designed by Buchla 11:00 audio conections 11:30 logical diagram: frequency&pitch shifters, reverb, spatialization 12:30 oscillator bank controlled by FFT analysis of piano; and live sampler 13:30 how MIDI input is used: first, velocity-controlled spatialization 14:30 second use for MIDI input: training a Markov chain 15:30 third use: score following. Barry Vercoe and Roger Dannenberg 16:30 score-following driven sequencing (qlist) 18:30 don't need to send MIDI back to "play" piano 19:30 score following algorithm. Possibility of very tight synchrony 21:30 explanation of how the example from 8:00 worked 24:30 finding best possible path connecting score with performance 27:00 each path has a conditional probability (incorrectly called "likelihood") 30:30 most probable path implies where we want the computer to be 32:00 equivalent to Viterbi algorithm for a particular hidden Markov chain 34:00 related term: "dynamic programming" 35:30 limitation: this approach doesn't take advantage of timing of events 36:00 why people don't often use score following today 37:30 polyphonic score following 39:00 only using note onsets as input to score following is a severe limitation 44:00 research problem: score following for Pluton using audio alone 46:00 "notes.txt" file in patch show what labels are where in score 47:00 Event 31 (section IV): FFT-controlled oscillator bank 47:30 section II introduces oscillators and Markov chain and alternates them 48:30 section III Markov alone 50:30 "gumbo" objects that control pitches of oscillators 51:00 oscillator control panel. Capital and small "o" . Oto2, Oto4, etc. 56:00 amplitudes of oscillators controled by FFT analysis as in a vocoder 58:00 spectral shift and response speed controls 59:00 why this doesn't sound like a vocoder used in the usual way 1:01:00 usnig the four 12-voice banks as one larger bank (gumbo5 object) 1:02:30 why the "gumbo" object has setparate "set" and "bang" messages 1:03:30 "mode 1" loads pitches into the oscillators from piano keyboard 1:08:00 aliasing effect in FFT analysis if speed set high 1:10:00 setting speed to zero freezes spectrum 1:11:00 cross-fading between spectra 1:12:00 different wavetables 1:14:00 patch to simulate piano (audio and MIDI). Section III, events 1-6 1:18:00 Pd patch adapted from original Max patch msp.ucsd.edu/media/271b.21s/271b-09b-may26.mp4: Meeting 9b, May 26, 2021 0:00 Markov chain object ("mark" receive name) 1:00 recording MIDI into the Markov chain which controls a sampler 1:30 "trec" message records; "play1" plays back 3:00 Record a chain C-D-E-F-G-C 3:30 Oops, need to clear the chain first 4:00 ambitus control 5:00 transition probabilties in Markov chain taken from MIDI velocity 6:00 time limit between notes to make a transition 6:30 restart parameter in case chain gets stuck 8:00 common pitches between different pitch sets to make transitions 9:30 how rhythm is input from MIDI 11:00 if Markov chain has absorbing states it lasts a random amount of time 13:00 section 2: oscillators first, then Markov chain at event 7 16:00 Markov chains have faded out; oscillators take over 18:00 reemergence of Markov chain 18:30 recording arpeggios into sampler 19:00 ambitus is at zero 20:00 Markov chain disappears a second time 21:30 playing chords into Markov chain (not demonstrated) 23:30 imperfect separation between interaction and score (events 43:1-5) 26:00 three metronomes at different speeds 27:30 event 3 records from piano to sampler bank 2 30:00 pitch shifter ("harmonizer") to make celeste effect 32:30 playing through section V, part E 38:30 granular time stretching in part F 41:00 time stretching played without piano part 42:00 sample played without time stretch 43:00 playback at different speeds. The "rspeed" control 46:00 events 44:1-3 (section E part F) 49:00 ending of piece, 64-to-one time stretch 50:00 spatializer, repeated patterns with variable speed 51:00 tables (arrays) giving x and y coordinates for spatialization 55:00 velocity control of spatialization 57:30 velocity controled crossfades between oscillator banks 1:00:00 velocity control conects piano to electronics 1:05:00 research problem: make a cheap, robust piano MIDI detector 1:06:00 designing pickups for individual piano strings 1:08:00 a more recent algorithm (from Manoury, en Echo): "3F" 1:11:00 three generating pitches generate inharmonic spectra 1:13:00 secret sauce: linear integer combinations of generating frequencies 1:15:00 example: using incoming pitch as one of the three frequencies ----------------------------------------------------- Music 270b. Analysis of musical sound. Spring quarter 2022. course materials: msp.ucsd.edu/syllabi/270b.22s/ recordings: msp.ucsd.edu/media/270b.22s/ contents of recordings: msp.ucsd.edu/media/270b.22s/270b-01-mar28.mp4: Meeting 1, March 28, 2022 0:00 This course is about signal analysis, not cognitive science as advertised 5:00 about the sonic challenges 6:00 first sonic challenge: the call of the white bellbird 21:30 short-time Fourier analysis (STFT) 26:00 tools used in this course: Pd, Audacity, Julia 29:00 storing a sinusoid in an array in Pd 33:30 classical envelope follower: rectify and low-pass filter 36:30 phase of a sinusoid 40:00 phase quadrature 42:00 complex sinusoid as real sinusoid pair 44:30 magnitude of a complex sinusoid 47:30 the hilbert~ object 50:00 measuring the magnitude of a real sinusoid using hilbert~ 54:00 sinusoids in nature: time-varying frequency and magnitude 56:00 ring (amplitude) modulation to change frequency of a sinusoid 58:30 aliasing a frequency to almost zero 59:30 using phase quadrature to modulate an oscillator 1:01:30 low-pass filtering the modulated sinusoid 1:02:00 measuring the magnitude of the sinusoid 1:04:00 reaction time of magnitude measurement 1:05:00 trade-off, stability versus reaction speed msp.ucsd.edu/media/270b.22s/270b-02-mar30.mp4: Meeting 2, March 30, 2022 1:00 finding and loading the example patches from classes. Some Pd basics. 5:30 complex-mpy~ abstraction 7:00 ampliude detection from previous class understood as a frequency shift 14:30 real and complex sinusoids. Real sinusoid is sum of two complex ones 21:00 measuring amplitude and phase of a complex sinusoid 27:00 single sideband modulation as product of complex sinusoids 32:00 x/y plot using Pd of a complex sinusoid. 33:00 Positive frequency sinusoids travel counter-clockwise in complex plane 40:00 Measuring phase differences between neighboring sinusoids 42:30 complex conjugate negates frequencies of sinusoids 43:30 phase difference3 between an incoming sinusoid and a known sinusoid 51:00 analysing complex spectra (tones with more than one partial) 56:00 spectrum of frequency-shifted complex sinusoid making 6 components visible 1:01:00 low-pass filtering a sum of complex sinusoids 1:03:00 Fourier analysis of a periodic tone 1:08:00 Short-time Fourier transform 1:09:00 Window as a segment in time 1:13:00 windowing a non-periodic signal 1:15:00 trade-off between time and frequency resolution msp.ucsd.edu/media/270b.22s/270b-03-apr04.mp4: Meeting 3, April 4, 2022 0:00 terminology: DFT, FFT, STFT (short-time FT), WSTFT (windowed STFT) 4:00 windowing and window functions 6:00 magnitude spectrum of a sawtooth; discontinuities in waveforms 8:00 analyzing a sinusoid not tuned to window size 10:30 boxcar (rectangular) window function 12:00 continuous-time Fourier transform of a windowed sinusoid 13:00 total energy of a continuous-time signal 14:30 Hann window function in continuous time 21:30 Hann window in discrete time (patch example 5.hann-window.pd) 29:00 analyzing and playing the contents of a window as a periodic signal 39:00 windowed analysis of a constant signal. Main lobe and sidelobes 44:00 spectrum of a square wave 50:00 spectrum of the Hann window function and a Hann windowed sinusoid 57:00 derived boxcar window spectrum 1:03:00 sinx function 1:06:00 measuring the spectrum of a short square pulse (boxcar window function) 1:10:00 derived spectrum of Hann window 1:15:00 spectrum of Hann windowed sinusoid 1:17:00 superposition of two sinusoids msp.ucsd.edu/media/270b.22s/270b-04-apr06.mp4: Meeting 4, April 6, 2022 0:00 How the discrete Fourier transform (DFT) works 3:00 fundamental frequency is sample rate divided by N 10:30 complex-valued Fourier transform of a constant signal 12:00 formula for discrete-time Fourier transform (generalization of DFT) 20:00 normalizing the DFT 21:30 inverse DFT to recover original array 27:00 DFT as way to separate frequency ranges in a signal 32:00 freqency bins and Fourier analysis between bins 46:00 relationship between sinx function and Fourier transform of a sinusoid 49:30 Pd example patch: 64-point DFT of a sinusoid 56:00 changing the starting phase of the sinusoid 1:00:00 graph of analyzed waveform 1:09:00 how the FFT works 1:16:00 DFT as multiplication by a unitary matrix msp.ucsd.edu/media/270b.22s/270b-05-apr11.mp4: Meeting 5, April 11, 2022 1:30 Portnoff paper on WSTFTs; channels of transform are low-bandwidth signals 5:00 tail behavior of Hann window spectrum 9:30 Blackman-Harris window 15:00 zero-frequency bin as low-pass filter 20:00 output can be downsampled to a hop size of N/4 24:00 situation for bin 1 31:00 signal is multiplied by Hann window times complex exponential 34:30 alternating signs of consecutive bins when analyzing a sinuaoid 39:00 measured phase precesses for nonzero bins 48:00 analysis of sinusoid tuned to first bin, H=N/4 53:00 measuring frequency of a sinusoid using phase precession (phase vocoder) 54:00 multiple possible vaules of frequency separated by 1/H cycles per sample 59:00 aliased frequencies should differ by at least 4 bins so we need H <= N/4 1:05:00 analyzing complex sums of sinusoids 1:10:00 needed separation between sinusoids to resolve them 1:12:00 demonstration using Pd help window I02.Hann.window.pd 1:17:00 N=2038 at 48000: 23 Hz. per bin, 43 millisecond window. msp.ucsd.edu/media/270b.22s/270b-06-apr13.mp4: Meeting 6, April 13, 2022 0:00 the white bellbird analyzed and resynthesized 9:30 06.pvoc-squeezed-spect-graph.pd in class patches 18:00 peaks in bellbird spectrum 25:00 synthesizing a formant 29:00 pulse trains by waveshaping sinusoids 35:00 seeing between the bins in a Fourier analysis by zero padding 46:00 thought experiment: pinched windows and signal variations within windows 47:00 applying Hann window a posteriori by convolving window kernel 56:00 Peeters (ICMC 1999) - analyzing a chirp (swept sinusoid) 1:05:00 rate of frequency change adds to measured bandwidth in WSTFT msp.ucsd.edu/media/270b.22s/270b-07-apr18.mp4: Meeting 7, April 18, 2022 0:00 Fourier transform of a sinusoid as continuous function of frequency 2:00 printing out discrete Fourier transform of a Hann windowed sinusoid 3:30 peak is four bins wide. Relating this to figure in Techniques chapter 9 5:30 numerically verify that phases of neighboring bins differ by pi radians 11:00 phase vocoder determines frequency by measuring phase change over time 15:00 phase change in a neighboring bin over time should be the same 15:30 setting hop size to one sample as a special case 17:00 how to measure phase precession using a single window 24:00 is a bigger hop size better for accuracy? 28:30 difficulty analysing sweeping frequency 30:00 frequency sweep is second derivative of phase, so numerically fragile 31:00 demonstration using sigmund~ object on the white bellbird recording [remaining videos not yet indexed.]