0% found this document useful (0 votes)
61 views5 pages

Patr s1

The document describes 6 exercises involving audio processing techniques in Pd such as delay effects, flanging, chorus, ring modulation, live looping, and attack/rest detection. It provides details on patches created for each exercise utilizing objects like delread~, vd~, envelope followers, and arrays. Audio examples are included to demonstrate the implementation of techniques like variable delay, amplitude modulation, and loop recording/playback.

Uploaded by

jl_barret
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views5 pages

Patr s1

The document describes 6 exercises involving audio processing techniques in Pd such as delay effects, flanging, chorus, ring modulation, live looping, and attack/rest detection. It provides details on patches created for each exercise utilizing objects like delread~, vd~, envelope followers, and arrays. Audio examples are included to demonstrate the implementation of techniques like variable delay, amplitude modulation, and loop recording/playback.

Uploaded by

jl_barret
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Processament Audio Temps Real Seminari 1 Jose Luis Diez Antich 122071

Exercise 1: Creation of a Pd patch for different types of delay processing, including a Karplus-Strong generator/processor. 1. Introduction The main patch of this exercise contains two graphical objects created by Graph-on-Parent option. The first, called AudioEngine.pd, will allow to play a loop and to introduce audio from a microphone plugged into the computer. The second, called DeluxeDelayToolBox.pd, one is the patch that allows to process and play with the different types of delays seen in class. 2. AudioEngine AudioEngine.pd is a version of the patch SamplerLoopScratch.pd delivered on the moodle, having the main function to play a loop or allow to process audio from microphone. This version is composed of a vertical radio button used to switch between the source of the desired audio, being the possibilities, one, a loop player from a .wav audio file in the computer, second, the microphone plugged into the computer as the source or a waveform generator. A bang button in the bottom of the canvas to mute the output audio, a horizontal slider to control the level of the audio output and a toggle to enable the audio computation in pure data. Using the loop player, the following at the right of the first option of the radio buttons allow to load the desired .wav audio file, using the bang button, and, also, allow to reproduce that audio file at different speeds, in order in the horizontal radio buttons there are reverse, stopped, normal and double speed. The outputs of the AudioEngine.pd object are first the audio, second, the number of samples of the loop and, third, the note of the current audio playing. 3. DeluxeDelayToolBox In the other hand, the function of DeluxeDelayToolBox.pd patch is to perform four different types of delay. 3.1. - Interface The kinds of delay that it allows to do are a simple delay, an octave doubler and a Karplus-Strong Processing and Synthesis delay. These types of dely are controlled in order as presented above by the horizontal radio buttons at the top of the canvas. The following toggle button will control a low pass filter at the output of the delay in order to accomplish a better effect using the Karplus-Strong Synthesis, but this will be explained later.

The following three sliders have as function to indicate a number of delay in time (0 to 5 seconds), Herz (20 to 20K Hz) or Midi notes (0 to 127), these all will be converted later to milliseconds. The following three sliders will control the amplitude of, first, the signal that feedbacks the delay writer, second, the output delay, and, third, the raw signal without delayed signal that will also be an output. Finally the toggle at the right bottom of the canvas will enable or disable the audio computation in pure data. 3.2. - Implementation The patch of DeluxeDelayToolBox is organized in order to make the code simple, so almost each important part is inside a subpatch. The main patch starts choosing, with the mode, which audio will be written in the table for further processing. The first subpatch that needs to be explained is pd ModeEngine. This subpatch is used to switch between delay modes. This object will receive the delay in milliseconds and depending on the mode chosen different computations will be made. The subpatch that performs all algorithm in themodes of Karplus-Strong is shown here. The object [trigger] receives the delay in milliseconds and then it outputs, in this order, that delay, a 1 and finally a 0. These values will be then multiplied to the signal in usage, but the 0 value will be only multiplied if the chosen modes are the corresponding to Karplus-Strong (this is performed in the green area) and after a period of the signal, performed by the object [pipe]. These period will correspond to a midi note or a frequency in the mode of synthesizing, for example. The subpatch ModeEngine performs a similar approach for the other modes of delays. The third output of ModeEngine, the time of delay, is the input for the object [delread~] which has as output the audio signal delayed as the input dictates. This signal is then the input for a module that allows the user to switch between the usage of a low pass filter or not. This filter is used in the Synthesis mode of Karplus-Strong in order to achieve an effect of a realistic hammered string. The audio example of this exercise is attached as e1 - delay.

Exercise 2: Creation of a Pd patch for flanger and other variable delay effects. For this exercise have been created the object [TurboFlanger], which can be seen as a simple delay with feedback, but with the object [vd~] instead of [delread~] and an low frequency oscillator placed where the desired delay value should. The object [vd~] -for variable delay- is the alternative to [delread~] when is desired to have a variable delay. The variable delay in this patch is achieved by the use of an oscillator, this oscillator will vary the value of the delay, DelayCenter, with a speed, LFO_freq, and a depth, Amp. The parameter Balance will decide how much flangered signal goes into the output signal, so as the InputAmp will do with the raw signal. Feedback will assign a gain to the feedback signal and OutAmp is the gain of the output signal. An example of the usage of this effect is attached and called e2 - turboflanger. Exercise 3: Variable delay effects. For this exercise, the object [DelxeChorus] has been created. It uses a filtered noise as starting point for the chorus effect. This filter is controlled by the first slider, then the second slider controls the gain of the filtered noise. The following sliders controls the center delay value of the delay effect, the feedback of the delay and the amplitudes of the mix of raw signal and chorus signal and output signal. The audio example of this exercise is attached as e3 chorus. Exercise 4: Ring and Amplitude Modulation. Modulation is the process of varying one or more properties of a high-frequency periodic waveform, called the carrier signal, with a modulating signal. The three key parameters of a periodic waveform are its amplitude, its phase and its frequency. Amplitude Modulation stands for the process of varying the amplitude of a high-frequency periodic waveform by multiplying it with a low-frequency periodic waveform. Ring modulation is a special type of amplitude modulation. A ring modulator circuit has two inputs, carrier and modulator, and one output. If a sine wave of one frequency is applied to the first input and a sine wave of another frequency is applied to the second input, neither of these input frequencies appears at the output signal. Instead, two new frequencies appear. One is equal to the sum of the two input frequencies, and the other is equal to the difference between the two frequencies. So, the output is a complex two pitched waveform.

In the case when the carrier signal has several harmonics, the ring modulator output contains the sum and difference frequencies between all the harmonics of the carrier, and the single frequency of the modulator. For this exercise has been created the object [RingModulator]. It creates two signals (or only one if the carrier signal is an input) and performs its multiplication in order to achieve Amplitude modulation (if the modulator is unipolar) or Ring modulation (if the modulator is bipolar). As one can see in the image, the interface of [RingModulator] is divided in two. In the left side, are the carrier signal settings. The vertical radio buttons panel allow to use as carrier a sine wave, a sawtooth wave, a square wave or the input audio. If the sinusoid is chosen, it can be unipolar or bipolar by clicking at the toggle button. The horizontal sliders below change the frequency of the wave and its amplitude. In the right side, below the title Modulator, are the setting for the modulator signal, which can be a low or a high frequency oscillator. It also can be unipolar, for amplitude modulation, or bipolar, for ring modulation. In the other side, the slider with the label Modulation is used to change the amplitude of the modulation achieved by the multiplication of the two previous signals. Finally, one can see the second inlet, which is used to send to the modulator a MIDI note. The audio example for this exercise is attached as e4 - ringmodulation. Exercise 5: Live Looping. For this exercise, the object LiveLooper.pd is created. It consist in three arrays where the input audio can be stored by the choice of the user pressing to the toggles within the interface. The first toggle stores the input audio in the corresponding array, the second stops the recording, the third plays the loop and the fourth stops the loop from playing. The audio example for this exercise is attached as e7 - mix2. Exercise 6: Attack and rest detector. Envelope followers are frequently used to detect attacks and periods of silence. C07.envelope.follower.pd is a simple threshold-based attack and rest detector which uses the object [env~]. [env~] reports the RMS signal level over the, by default, last 256 samples or any other power of 2 that's at least twice the block size. The analysis is done in an overlapped fashion so that results appear every N/2 points if N is the analysis window size. So the larger the window, the stabler the result and the less frequently it appears.

After the [env~] analysis C07.envelope.follower.pd is divided in two parts: the attack and the rest detection. In the first part, in order to detect an attack, a two thresholds are defined, when the RMS value of the input sound will be greater than 45 dB the low threshold will be activated and this means that is possible to have an attack. The second threshold is the high one, when the input sound will be greater than 55 dB, an attack will be detected. When the RMS value is received, depending on the previous threshold detected, the pack and route subpatch will guide that value in order to compare to the corresponding following threshold. Is easy to see that when the previous threshold is the high one, [pack] will receive the control value 0 that means to reset the attack detection.

The second part, the rest detection also receives the RMS value, but when this is below 45 dB, then the process is the same as before but with the addition of the [timer] that will detect the rest part of the input audio if after one second, the RMS value of the input has not been above 45 dB.

You might also like