Here is a large collection of unmixed sessions. Great for mixing practice.
Author Archives: Tom Erbe
delay impulse responses
Impulse Responses from various delay lines, in various states of repair –

Gibson GA-4RE (Telray Adineko echo). This circuit has considerable leakage of dry signal. You can hear that as the first impulse. The first “dark” impulse can be considered the impulse response of the delay. Also, there is no erase “head”. The brush simply writes over the charge on each rotation of the disk. The repeated echo isn’t due to feedback, but progressive erasure. Use the entire impulse response for an accurate emulation.
Echoplex (Original – pre “EP-1” Serial 709). A tiny bit of dry signal leakage. The tape impulse response shows up at about 360 ms. I am not sure why there is a sine sweep artifact in this IR (after the impulse). Possibly because the tape transport is so unstable, or perhaps interaction with the bias oscillator?

Roland Space Echo RE-201. Much cleaner compared to the previous two devices. No way to turn the dry signal off (perhaps my Space Echo is in need of repair?).
UPDATED – New measurement from the PA input to get just the tape signal (no dry)
DeltaLab Effectron. A very clever digital delay which measures differences between successive samples. An almost flat response which tilts slightly upward.
Bright Analog Delay Pedal. A modern CCD (charge-coupled device) delay. There is a bit of ripple in the passband (could be a Chebyshev I filter?) which caused a noticeable resonance after multiple repeats.

Dark Analog Delay Pedal. Another CCD delay. This one has a rounder, smoother filter response (possibly Bessel?), so no coloration after multiple repeats. Sharp rolloff at 2k for CCD aliasing rejection. You can see the signal leakage as a -60dB signal above 3k.
The sine sweep and golay code methods of impulse response measurement used are from Edgar Behrdahl & Julius O Smith’s Transfer Function Measurement Toolbox
A PD echo patch with convolution in the feedback
download this: emuplex
Mus174B – Assignment 2
mus 174b – assignment 2
record 5-10 tracks: 2+ solo, 3+ backing – 2:30 to 6 minutes – must be recorded with microphones
– double track (or more) the solo instrument or voice
– divide tracks into 2-4 functional groups (these groups should be named, and make sense)
– use compression on one or more groups or tracks
– use gating to tighten up a track
– use either key gating or a gated delay/reverb effect
– use delay, phase shift, chorus or flange to accentuate a foreground track
– use pitch shifting or distortion to thicken a track
– reverb only on individual tracks
– save the groups as individual recordings after effects (stems)
– hand in documentation describing your mix decisions
due tuesday week 8 – 2-27-18
extra point for presenting on 2-27
groups
john d’agostini – crystal jiao – kostyantyn chumakov
yidai li – cory bahn – forest reid
grant hovander – francis galang – salvador zamora
caleb hess – christopher loree – cordane richardson
camden greenwood – william carlisle – matthew rice
chi zhang – raymond lim – jorge jiron villarreal
tracy levick – daniela chaparro – gregory farley
chloe bari – kenroe ang
MUS271A (Max w2 & 3) – oscillators – additive synthesis
In the next few classes we will look at the fundamentals of synthesis. In class we will actually build more extensive patches than are covered here. In this class we will look at synthesis of classic waveforms, sine, sawtooth (aka ramp), square (also pulse, aka rectangle), and triangle. These waveforms are often used in synthesis not only because they are simple to create with analog circuitry, but also because they share characteristics with acoustic instruments. All waveforms have harmonics with decaying amplitude as you go up the harmonic series, similar to most acoustic instruments. The square and triangle waves have only odd partials, similar to a pipe with one end closed. The sawtooth wave has all partials, similar to a pipe with both ends open, or a string. The sine wave has only one partial, so can easily be used to create complex tones by aggregation (additive synthesis). All of these patches can be downloaded here.
All of these waveforms are available in Max as internal objects. The following simple patch shows all of them (saw~, tri~, rect~ and cycle~). Each has a frequency input and a sync (phase reset input). rect~ and tri~ have duty cycle inputs, that reshape the waveform by moving the center of the wave shape. Listen to the combination of these waveforms by clicking on the toggle buttons.
This next patch shows the effect of changing the duty cycle in the rect~ (pulse/square wave) and tri~ objects. You will notice that the tone gets brighter when the duty cycle moves away from .5 and toward either 0 or 1.0. A pulse wave with a very small duty cycle (either almost 0.0 or almost 1.0) will have nearly a flat spectrum with little rolloff. Both the pulse wave and triangle wave cancel all even partials when the duty cycle is 0.5. You can see the odd partials diminish by moving from .55 to .50. Modulating the duty cycle with a slow sine wave is a good way to give the sound timbral variation.
3) Detuning, more specifically – SUPERSAW!!
Another way to get timbral modulation is to group several oscillators of the same type and detune them slightly. This will cause the oscillators to go in and out of tune at the rate of the difference between the two frequencies. That is, if the oscillators are separated by 1 Hz, you will hear them go in and out of tune once a second. If you use waveforms which have no odd harmonics (sine, square and triangle), you will have a moment when all harmonics cancel. For this reason, detuning is usually done with sawtooth waveforms or more than 2 of the other waveforms. In this example, I am using 3 sawtooth waveforms. The pow functions are calculating the detuning. This patch is also known as a supersaw, and adding more detuned sawtooth oscillators can make it more complex.
4) Hard Sync – phase resetting.
All of the oscillators in Max have “sync” inputs which reset the phase to the beginning of the cycle. If you use the sync input and the frequency input, the waveform will be reshaped by having a frequency higher than the sync frequency. That is, a frequency of 1.5 Hz will complete 1.5 cycles per second, and a sync frequency of 1 Hz will cause the waveform to repeat every second. The resultant waveform is 1.5 cycles of the normal waveform repeated every second. This interrupted waveform will have a sharp discontinuity and many more high harmonics. This synthesis technique is called hard sync. One interesting aspect of this is that whenever the frequency input is an integer multiple of the sync frequency, you will get a harmonic of the sync frequency.
A couple of notes on this patch. The upper display represents the phase of the oscillator, the middle display is the resultant waveform and the bottom display is a sonogram. There is a bit of ugly logic in the middle of the patch to cause the sawtooth to “wrap” or to keep an amplified phasor~ within the range of 0.0 to 1.0. Max doesn’t have a wrap~ object like pd, so I rescaled the input and output to phasewrap~ to get the same behavior. An experienced Max programmer is welcome to tell me of a better way to do this :).
5) Additive synthesis
Additive synthesis is the technique of adding multiple waveforms which are at the harmonic frequencies of a fundamental frequency. The partials are typically sine waves (which have no harmonics themselves). The harmonic ratios can be easily manipulated, as can the amplitude of each partial. All of these numbers can and usually do change over the duration of a note. This amount of detail allows one to specify an exact timbre, but also requires a large amount of data (typically a separate amplitude and pitch trajectory for 32 or more partials. For this reason, additive synthesis is not often used, as it takes a lot of exacting work to get a good sounding result. Current common uses of additive synthesis are pitch shifting and autotune.
5a) The tone wheel organ. One common example of additive synthesis is the tone wheel organ. The amplitude of each partial is controlled by drawbars. Here is a patch which simulates the drawbar settings for a simple tone wheel organ. Only 8 sine wave oscillators are used, and an ADSR envelope generation object is used to shape the note. This patch is designed to be played by a MIDI keyboard, but the note can be set (the number box above sig~) and a 50ms note played with the bang above delay 50. cycle~ 4 provides a little vibrato. The amplitude is not normalized in this patch, so the output volume needs to be turned down to avoid distortion.
5b) Going down the rabbit hole. This patch demonstrates simple additive synthesis, but also demonstrates the need for more detail. However, creating many oscillators and amplitude controls can be tedious. In this next example I am using the poly~ object to create any number of harmonics. poly~ uses an abstraction (a separate patch) and creates many copies of it. Each copied patch can find out which copy it is from the object thispoly~. For additive synthesis, that number is used for the partial number and is multiplied by the fundamental frequency. There is also a amplitude adjustment which mutes the voice when the frequency is above 20000 Hz. This is a crude method to stop aliasing.
On the right side of the abstraction is a sel object which computes the amplitude for each harmonic. In this example, I am creating various simple waveforms. From left to right: sine, pulse-train, sawtooth and square. You can see under each sel output is logic which determines the amplitude of each partial based on the thispoly~ number. These amplitudes are sent out the out~ 2 outlet to be summed to an overall amplitude.
The external patch is simple in comparison. poly~ creates 64 patches for partials, a radio button selects the waveform, and the left output of poly (the summed sine waves) is divided by the summed partial amplitudes so that the resultant waveform has an amplitude of 1.0.
oscbank~ can alternatively be used for additive synthesis, but independent control of each partial is more difficult.
mus 174b – assignment 1
1) record new material, 6-12 tracks: between 2 and 4 minutes
2) make several inaudible edits
3) one or more of the tracks should be vocal
4) the rest of the tracks can be computer or electronic (synths, drum machine, pd, max/msp, looped samples, noise, etc.). no premixed backing tracks
5) all electronic tracks should have track effects (plugins) to give them unique identity using eq or reverb
6) create 2 different mixes which gives a different sense of foreground, width and depth
7) create width with panning
8) establish foreground instruments with volume differences and eq
9) create width and depth with reverb/mic distance
10) separate the tracks into 3 or more groups, route the groups into 3 or more aux input tracks, mix aux tracks for final mix
11) apply fade-in and fade-out to final stereo mixes
12) leave session and mix files on class disk (174B folder, project name with your last names)
present in class on 2-1-18 or 2-6-18 (thurs. wk4, tues. wk5)
groups
Cory Jonathan Banh – Francis Kyle Galang – Matthew Harrison Rice
Christopher Patrick Loree – Jorge Alberto Jiron Villarreal – William Joseph-Glen Carlisle
Raymond S Lim – Daniela Andrea Chaparro – Gregory Tazmond Farley
Chloe Jessica Bari – Kenroe Ervin Ang – John Anthony D’Agostini
Yidai Li – Grant Parker Hovander – Kostyantyn Chumakov
Caleb Michael Hess – James Forest Reid – Camden Robert Greenwood
Chi Zhang – Tracy Nicole Levick – Salvador Zamora
Jacob Michael Ugalde – Crystal Jiao – Cordane Omari Richardson
MUS271A (Max w1) – starting point
The focus in 271A will be sound generation with Max/MSP. In the first two weeks I will go over any concepts people are unfamiliar with, so there will be less standard material. However, here are some patches we will use as a jumping off point. The patches can be downloaded here 00-maxbasics. I have also created a (somewhat similar) PD version of these examples, download here: 00-pdbasics.
Here is a patch showing a square -saw oscillator as an abstraction (a patch which shows up as an object within Max). Frequency is converted from MIDI note number with mtof, The toggle button selects the square or saw wave (this is not a true saw wave). live.gain~ is used as an output volume control and meter. ezdac~ is used to send the audio to the computer sound output. Finally scope~ is used to display the waveform. We will look at how to modify the scope~ display using the info panel (clicking the “i” in the right column.
The 02-squaresaw patch makes up the abstraction. The inlets and outlet are labelled “1”, “2” on the top and “1” on the bottom. Both signals and messages can pass through these ports. The rest of the patch is a simple combination of a rect~ generator and a cycle~ generator (making square and sine waves).
This next patch shows the many MIDI messages and the objects which receive them. The simplest is probably bendin which receives pitch bend information. Pitch bend has a range from -64 to 63, with 0 in the center. I am dividing the lower range by 64 and the upper range by 63 so that bend up and down are symmetrical.
ctlin receives all other MIDI controllers (knobs, switches, sliders, pedals). The value (0-127) comes out the left outlet, and reflects the control parameter value. The center outlet is the controller number (also 0-127). Finally the right outlet is the MIDI channel. This allows a keyboard or other MIDI device to target 16 different MIDI destinations (typically different synthesizers).
notein receives both note down and note up messages. The left outlet is the note number (0-127, C4 = 60), the center outlet is the velocity or pressure (0-127), and again the right outlet is the MIDI channel. A velocity of 0 indicates a note up or release.
In this patch I am using poly to pack a voice number with the MIDI note and velocity. This voice number is used by route to direct the note and velocity to one of three sound generators. The outputs of the sound generators are all sent to “sum” with send~ and receive~.
Another patch in the class one zip archive shows how to use the computer keyboard to generate “note” messages.
This patch is a simple use of metro. A BPM value is converted into milliseconds per beat by dividing 60000 by the BPM. metro then sends “bang” messages to two messages which control the amplitude and frequency of a sine wave (cycle~), which gives a sort of kick drum sound.
This patch uses qlist as a sequencer.It will be explained more throughly in class. When metro is started, the time is incremented 10 ms at a time by counter. This time is used whenever one of the note messages (56, 55, 59, 58) is clicked. This information is collated into an append message and recorded by the qlist. A “bang” message causes the qlist to replay the note messages and send them to the simple synthesizer voice. qlist restarts playback after finishing by triggering another “bang” at the end.
MUS271A – Syllabus – Winter 2020
music 271a – electronic music techniques – winter 2020
cpmc 365 – wednesday 2 to 5
tom erbe – cpmc 254 – office hours: tuesday 1 to 3, thursday 10 to 2.
tre@music.ucsd.edu – https://tre.ucsd.edu/
We will be talking about fundamental techniques in computer sound generation in this class. I’ll spend 1 or 2 classes on each topic and we will present works in progress every two weeks. The topics are most likely to be:
- oscillators, modulators, harmonics, sequencing, polyphony
- filters, amplifiers, distortion, waveshaping, harmonizers, MIDI
- sampling, looping, brassage, granular techniques
- delay, chorus, flange, reverb
- spectral techniques, convolution, time & pitch shifting
- spatialization, binaural filters, VBAP, ambisonics
- physical modeling, waveguides, modal synthesis
Additional topics can be added to this class. We will discuss your specific interests and needs in the first class. Throughout the class we will cover general Max/MSP programming techniques, controllers, interfaces, live instrument integration, etc.
readings (assigned each week)
weekly classnotes
MUS177/267 Tap Tempo
a revised f4disco-simple, which includes the tritone oscillator and a badly working tap tempo.
MUS177/267 envelopes
Here is the modified f746 project which adds an envelope state machine to the meanotne organ.
It still has the bug where all 3 notes play on every touch – but you should be able to fix that…
MUS177/267 full duplex audio 1
Gettinng full duplex audio to work on the discovery boards is tricky, as they were not designed to do this. We will dig deep into the hardware configuration to find some work-arounds.
STM32F4Discovery
This board has no high fidelity line audio in, so cannot be used for high fidelity full duplex audio. However, it does have many 12 bit ADC inputs and 2 12 bit DAC outputs.
To get an ADC and DAC to work together, they have to be synchronized. In my example code we will use a timer set at 48000 Hz to clock both. We also need a timer which can be used for both the ADC and DAC. If you look at the ADC HAL header file, you will see the following:
/** @defgroup ADC_External_trigger_Source_Regular ADC External Trigger Source Regular
* @{
*/
/* Note: Parameter ADC_SOFTWARE_START is a software parameter used for */ /* compatibility with other STM32 devices. */ #define ADC_EXTERNALTRIGCONV_T1_CC1 ((uint32_t)0x00000000U) #define ADC_EXTERNALTRIGCONV_T1_CC2 ((uint32_t)ADC_CR2_EXTSEL_0) #define ADC_EXTERNALTRIGCONV_T1_CC3 ((uint32_t)ADC_CR2_EXTSEL_1) #define ADC_EXTERNALTRIGCONV_T2_CC2 ((uint32_t)(ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T2_CC3 ((uint32_t)ADC_CR2_EXTSEL_2) #define ADC_EXTERNALTRIGCONV_T2_CC4 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T2_TRGO ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1)) #define ADC_EXTERNALTRIGCONV_T3_CC1 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T3_TRGO ((uint32_t)ADC_CR2_EXTSEL_3) #define ADC_EXTERNALTRIGCONV_T4_CC4 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T5_CC1 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1)) #define ADC_EXTERNALTRIGCONV_T5_CC2 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T5_CC3 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2)) #define ADC_EXTERNALTRIGCONV_T8_CC1 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0)) #define ADC_EXTERNALTRIGCONV_T8_TRGO ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
And in the DAC HAL header we see:
/** @defgroup DAC_trigger_selection DAC Trigger Selection
* @{
*/
#define DAC_TRIGGER_NONE ((uint32_t)0x00000000U) /*!< Conversion is automatic once the DAC1_DHRxxxx register has been loaded, and not by external trigger */
#define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T4_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM4 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T5_TRGO ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T7_TRGO ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
#define DAC_TRIGGER_T8_TRGO ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */
Timer 2 and 8 trigger output are in common for both ADC and DAC. In my example I will use timer 8. Look at functions timer8_init(), adc1_init() and dac1_init() for details.
Finally, notice that in the audio callback I am copying and scaling the input first, then processing audio (an echo in this case), and finally copying and scaling the output. Also, both input and output can be processed in the DAC callback. No need to do it in the ADC callback as they are synchronized by the same clock.
void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* DacHandle)
{
int i,j;
for(i = 0, j = 0; i < 16; i++, j+=2)
{
inBuffer[i] = inBuffer[i+1] = (float)(adcBuffer[i] * 0.00048828125f) - 1.0f;
}
audioBlock(inBuffer, outBuffer, 16);
for(i = 0, j = 0; i < 16; i++, j+=2)
{
dacBuffer[i] = (int16_t)((outBuffer[j] + outBuffer[j+1] + 2.0f) * 1023.0f);
}
}
Here is the example code:
STM32F746Discovery
The BSP code supplied with the board is inadequate as it doesn’t allow the line in to be used. I have found a developer who modified the code to do full duplex input and output, but I have yet to try it myself. I will do so by next Thursday. The code is here:
https://community.st.com/thread/19377


