Thursday, June 30, 2016

Digital Audio Part 3 - Digitalization

Audio digitalization
Digitalization is the process of turning a type of information or signal into a number in order to store it, this number has to be a binary number,  and in the case of Audio this function is performed by a device called analogue / digital converter or ADC that converts tension values into binary numbers.

Once the sample is taken we need to store it, and in order to store it we need to transform it into a number, more specifically a binary number. The function is performed by a device named analogue / digital converter or ADC that converts tension values into binary numbers.

In the figure below we are using 3 digit binary numbers. Since every binary digit is denominated as a bit (from binary digit), we'd be using 3 bit numbers. It is easy to see that there are 8 (= 23)  3 bit numbers: 000, 001, 010, 011, 100, 101, 110, 111. To represent the diverse tension values that our samples could take, we divide the range of variation of the signal in 8 levels, and we approximate every sample to the immediate inferior level. 

In the central part of the figure below, we can compare the exact samples (empty dots), and the digitalized samples (filled dots). By comparing them we can see that the maximum error that occurs is of a division that is corresponding to one bit. The re-constructed waveform is considerably different from the original due to the fact 3 bits is a very low resolution.

Audio Digitalization
Effect of the sampling and digitalization process applied to a sine wave. The resolution is of 3 bits and the sample rate is 14.7 times higher than the wave's frequency. In the central figure the empty dots represent the exact samples and the filled dots represent the digitalized samples. Below is the reconstructed signal.

In the previous example we adopted, in an arbitrary way a 3 bit resolution. The result as it could be observed was very lacking because the reconstructed waveform is very distorted. It would be interesting to have a more systematic criteria to select the required resolution.

The problem is similar to deciding how many decimal digits would be required to present with pinpoint accuracy a given length of objects that are less than 1mt. In order to do this we would need 3 decimal digits, because such objects would have a measure between 0 and 999 mm. If we required a precision of tenths of millimeters, we would need 4 digits, because objects could have a measure between 0 and 9.999 tenths of mm.

In the world of audio, the criterion to determine the "precision" is the signal to noise ratio. Let's analyze the example of the figure above from that point of view. Forgetting about the own noise that the signal might contain, one collateral effect of digitalization is the appearance of an error, that could be assimilated to a noise. This noise is known as digitalization noise. Under this interpretation, the maximum peak to peak value of the signal is proportional to 8, and the maximum peak to peak value of noise is proportional to 1. Thus the signal to noise ratio is 8/1 = 8 that expressed in dB is:

 

If we take into account that in audio high fidelity is handled nowadays signal to noise ratios over 96 dB we can understand why a 3 bit resolution is totally insufficient. 

Let's suppose now that we increase the resolution to 4 bits. Due to the fact we have 16 possible values now instead of 8 the signal to noise ratio in dB would now be:


We can see that we had a 6 dB increase. This can be interpreted like this: While the signal's amplitude didn't change, when we doubled the amount of levels, every level reduced to the half, thus the signal noise was halved as well. Then if the signal to noise ratio is doubled, and a doubling is equivalent to a 6 dB increase. If we now increase the resolution in just 1 bit, taking it to 5 bits, we can observe that noise will be reduced in half as well, so the signal to noise ratio would experience another 6 dB increase.

We could obtain a more general expression of the signal to noise ratio. If we adopt a resolution of n bits, where n is any integer number, resulting in:



Applying this formula to the standard 16 bit resolution that is used in the most popular storage formats of digital audio, it results in a signal to noise ratio of 96 dB. This signal to noise ratio is, in normal conditions, enough to create impressive dynamic contrasts. In effect let's take into account that rarely we feel music in a level over 110 dB (which is quite deafening and not recomendable at all). If we subtract 96 dB to this value, we obtain 14 dB, a level of sound that probably few people would have "listened", because even during night time when sound conditions are very silent in an isolated room, it's normally difficult to get sound pressure levels below 20 dB.

It's necessary to warn that even though a system is working with digital audio formats of 16 bits, it's signal to noise ratio won't necessarily be of 96 dB. This is because given the diversity of analogue components that make part of every device, some noise is generated and this noise is added to the digitalization noise. In low cost equipment  low quality electronics are used, so it's manufacture is particularly noisy and the signal to noise ratio is much less than 96 dB.

Bibliography: Federico Miyara (2003) Acústica y sistemas de sonido. UNR Editora
ISBN 950-673-196-9

Sunday, June 26, 2016

8 bit cat dash

Just for fun! 




Digital Audio - Part 2 Binary Numeration, Sampling & Sample rate.

In mathematics and digital electronics, a binary number is a number expressed in the binary numeral system or base-2 numeral system which represents numeric values using two different symbols: typically 0 (zero) and 1 (one). The base-2 system is a positional notation with a radix of 2. Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by almost all modern computers and computer-based devices.  Each digit is referred to as a bit.

Binary Numeration System


Considering that all digital systems are based in binary numeration, before describing the basic sampling & digitalization processes of sound, we'll briefly refer to this numeration. In the decimal numeration (the system we habitually use), ten symbols are used (these are the digits 0, 1, 2....9) allocated in a positional system to represent the successive amounts. This means that for every new figure that is added it's value will be 10 times higher than the one to the right, for example: 

27 = 2x10 + 7

306 = 3x10+ 0 x 10 + 6   

In binary numeration, only two symbols are used (the digits 0 and 1), they are also allocated in a positional system but now every new figure has a value only 2 times higher than the former. For example.

100101 = [ ( 1 ) × 25 ] + [ ( 0 ) × 24 ] + [ ( 0 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 1 ) × 20 ]

In The table below we can see the conversion of decimal to binary for numbers 0 to 15.

Decimal / Binary
Decimal numbers and it's binary equivalent


The reason we use binary numbers is because electrically it's much easier to codify 0's and 1's. We just need a high level of tension (5 v) to get a 1 and a very low tension level (0 v) to get a 0. This makes our representation extremely insensitive to noise. Meaning that the signal would be effectively recoverable even in the presence of a 2V noise that is corresponding to a signal/noise ration as low as 20 log  5/2 = 8dB (inaudible if the system is analogue).

Sampling


Let's go to the sampling concept now. The acoustic signals (and as such, the electrical signals representing them too) vary in a continuous form, which means that the interval however small it is, will always contain infinite different values. However, for the effects of the auditive message not that many information is required. First because the human ear doesn't have as much discrimination over time, and secondly because it also lacks amplitude discrimination to distinguish values that are too close over time and their amplitude difference is very low. Besides being not necessary to send that much information, it is also inconvenient and impossible to handle it. Thus the concept of sampling arises. To sample a signal means replace the original signal for a series of samples taken at regular intervals. The frequency which the samples are taken is named sample rate. Sr   and the time over samples, sample period ST holds that:



Sample Rate


It's intuitively evident that sample rate must be high enough because that's the only way a much higher degree of detail can be achieved, which means that sound will be reproduced with more quality than the original one. When sampling there is a criteria that must be mandatorily fulfilled during the whole sampling process, this is because sample rate should be higher than the double of the maximum frequency present in the original signal, meaning.


S> 2mfreq

This is in consequence of a theorem called Sampling theorem, that says that a sampled signal can only be totally recoverable if it was sampling fulfilling the previously mentioned criteria. The frequency Sr/2 is denominated the Nyquist frequency.


The effect of sampling over a sine wave. The sample rate in this case is 14.7 times higher than the wave’s frequency.

It is important to understand that the maximum frequency that appears in the previous formula doesn't refer only to the maximum interest frequency, but also to the maximum frequency that effectively appeared in the signal to sample, even though the said frequency comes from a high frequency noise that is polluting the signal. In the case that the criteria is not fulfilled, when we try to recover the signal there will be additional frequency components in the useful band. To see this, let's suppose we sample an audio signal with a  frequency of 40 kHz, and an (inaudible) noise of 35 kHz appears superposed to the signal, this situation is illustrated in the figure below. As a consequence of the sampling process and posterior signal reconstruction, we get a frequency of 5kHz that wasn't originally present in the signal. This frequency that substitutes the original 35kHz frequency, is named alias frequency because it's an alias of the former. Let's watch especially that the original frequency (35 kHz) wasn't producing an audible sensation, but the new frequency isn't only audible but it is also near the region of maximum sensitivity of the human ear thus is perceived as a notorious and irritating sibilance.


Alias frequencies
The effects of sampling with a minor frequency rate than the double of the maximum frequency rate contained in the signal. A signal of 35 kHz is sampled with a frequency of 40 kHz; when trying to re-construct it, an alias frequency of 5kHz Appears.

The previous example is pointing to us that if we pretend to properly re-construct the signal after the sampling process it's indispensable to eliminate all spurious frequencies that fall after the audio spectrum, which means after 20 kHz. A lowpass filter with a very abrupt slope in the cutoff band (96 dB/octave or higher) is used for this purpose, named the antialiasing filter.

The choice of of 44.1 kHz as a standard sampling frequency for digital audio was precisely because of this problem and the consequent need of an antialiasing filter. If we impose a maximum frequency of 20 kHz for high quality audio, as the filter slope is fast but not infinitely fast,  spurious signals can only be considered reduced to insignificance levels just after 22 kHz as we can appreciate in the illustration below. Because of this a frequency that is slightly higher than the double (44.1 kHz) was chosen. The exact value of 44.1 kHz instead of 44 kHz appeared in the early days of digital recording in video tape make both norms compatible.

A downside of antialiasing filters is it's great complexity and the fact that they aren't harmless at all for the signal inside the pass band (in this case the audio band). Even in the case that the filter affects only imperceptibly the amplitude of the signal in such band, it will affect in an appreciable way the phase which can alter the stereo image.


Antialiasing filter
Frequency response of an antialiasing filter used for high quality digital audio.

Bibliography: Federico Miyara (2003) Acústica y sistemas de sonido. UNR Editora
ISBN 950-673-196-9

Saturday, June 25, 2016

Digital Audio - Part 1 Introduction to Digital Audio

Digital Audio
Today digital audio tends to be used more than analogue audio as a method of storage. Records and cassette tapes continue to be used, but by a relatively small market. (Compare the prevalence of records 20 years ago to today.) Why is digital audio more prevalent? While there is some debate as to whether or not digital audio actually sounds better than analogue audio, digital audio is certainly easier to reproduce and to manipulate without loss of quality. Because of digital audio, it is much easier for both amateur and professional musicians today to produce studio-quality music.

Digital audio techniques has become relevant in the latest decades due to it's fundamental importance in the development of new technologies for audio generation, processing, storage and analysis. This has been possible thanks to the huge advances in microelectronics and it's application in the production of powerful and complex devices that are capable of handling and transforming sound with an increasing precision and speed the enormous amount of information contained in sounds.

One of the first consequences of the application of digital technology to audio was the development of very dependable audio storage systems that are unalterable and faithful. Another was the great boost to the development of electronic music instruments of great complexity and versatility. The third consequence was the development and application of techniques for the processing of the audio signal that allowed not only the improvement of processes that before were handled analogically, but also the introduction of new processes, we can find among them  a huge amount of effects such as delays, modulations, reverb, and specializations of amazing realism, whose analogue implementation would be too costly and destined to a much more restricted market.

The basic idea behind digital audio is to represent sound using numbers ("digital" comes from digit meaning number).  Before we start with the analysis we can see how this provides several advantages. In first place the problem of information alterability is eliminated. It is much easier to store a number than the physical magnitude that this number represents. For example if we wanted to store a 22.53 in dipstick we would be in serious trouble. The dilatation cause by temperature or any dust particle that sticks to it's extremes of simply wear from use could cause an error. This is valid for the length of a dipstick, it is even more valid for the magnetic field store in a recorded cassette.

In second place, there are algorithms (calculation methods) to achieve digitally not only the processing types used in traditional audio like amplification, mix, modulation, filtering, compression and expansion, etc. But also others like delays, sync, frequency displacement, sound generation using diverse procedures, etc. These algorithms can be implemented using a general purpose computer or in specific devices called Digital Signal Processors (DSP).

In third place, the replacement of analogue processors for their digital counterparts allows to avoid signal degradation due to analogue noise, something very convenient because analogue noise is hard to eliminate.

Bibliography: Federico Miyara (2003) Acústica y sistemas de sonido. UNR Editora
ISBN 950-673-196-9

Friday, June 24, 2016

Chiptune composition using Atari's POKEY Sound Chip



I made this tune using the classical sounds of the ATARI POKEY Sound Chip, I hope you like it. #8BitLove

Other Synthesis Methods - Part 2 Physical Modeling

Physical Modeling
In music, physical modeling refers to a sound synthesis technique which is based on models of the sound production mechanisms involved in musical instruments. The idea is to generate sound by reproducing how real musical instruments actually function and produce sound.


Physical modeling is a sound synthesis technique in which the waveform of the sound to be generated is calculated using a mathematical model that simulates a physical source of sound. Engineers created the model by simplifying the law of physics involved in sound generation. The parameters that can be found in this kind of synthesizer are of two kinds; some change the constants that describe the physical materials and dimensions of the instrument, while others are time-dependent functions that describe the player’s interaction with it. (e.g. how the instrument is played by rubbing or striking or opening and closing tone holes).

This approach may seem straightforward but is in fact very different from other techniques, such as FM, additive, subtractive and sampling, which could all be referred to as 'signal-based' methods because they attempt to reproduce the output signal from an instrument without worrying about how it was produced. A physical model is obtained from the laws of physics which describe how the world around us behaves. As in other fields of physics, a physical model is nothing else than a set of mathematical equations able to reproduce what can be measured experimentally.

In the case of a guitar for example, a physical model would reproduce how the pick moves the string away from its rest position; how the string vibrates once it is released; how the string vibration is transmitted to the soundboard through the bridge; and finally how the soundboard radiates sound which we can hear

With the development of computers, scientists began to find ways to implement these models as algorithms and program them in order to produce sound. This field of research became very active in the 80's but the situation was then very different from the one we know today. It then took literally hours of number crunching on the most powerful computers of that time to obtain just a few seconds of sound. That's far from real-time! Even listening to the sound samples was not that simple as sound cards were not very common back then.
So the key factor for physical modeling has really been the increase of the power of computers which now enables us to run in real-time sophisticated enough models that can reproduce the complexity of real musical instruments.

If one looks at the music industry, Yamaha was the first company to offer a synthesizer based on physical modeling. In the early nineties, they released the VL1 which implemented physical modeling algorithms on dedicated electronics. Tassman, released by AAS in 2000, was the first software synthesizer entirely based on physical modeling.

This technology is definitely not limited to acoustic instruments. One can apply exactly the same approach to electronic instruments such as vintage synthesizers. In these cases, the computer solves in real-time models of how electric circuits used in vintage synths, filters, tube amps and effect processors functionned and behaved. The benefits are the same as for acoustic instruments. Indeed the models can reproduce the complex behavior of these electronic components resulting in sound as lively and rich as that of the hardware units.

Bibliography:

AAS - Tech Talk - Physical modeling. (n.d.). Retrieved June 24, 2016, from
https://www.applied-acoustics.com/techtalk/physicalmodeling/

Ness - Physical Modeling Synthesis (n.d.) Retrieved June 24, 2016 from
http://www.ness-music.eu/overview/physical-modeling-synthesis

Gregory Taylor - Physical Modeling Synthesis for Max Users: A Primer Published October 10, 2012, Retrieved June 24, 2016 from
https://cycling74.com/2012/10/09/physical-modeling-synthesis-for-max-users-a-primer/#.V20bE1fmpuU

Hiller, L.; Ruiz, P. (1971). "Synthesizing Musical Sounds by Solving the Wave Equation for Vibrating Objects". Journal of the Audio Engineering Society.

Karplus, K.; Strong, A. (1983). "Digital synthesis of plucked string and drum timbres". Computer Music Journal (Computer Music Journal, Vol. 7, No. 2) 7 (2): 43–55. doi:10.2307/3680062. JSTOR 3680062.

Julius O. Smith III (December 2010). Physical Audio Signal Processing.
Cadoz, C.; Luciani A; Florens JL (1993). "CORDIS-ANIMA : a Modeling and Simulation System for Sound and Image Synthesis: The General Formalism". Computer Music Journal (Computer Music Journal, MIT Press 1993, Vol. 17, No. 1) 17/1 (1).

Thursday, June 23, 2016

Other synthesis methods Part 1 - Frequency Modulation (FM)


Yamaha DX7 The most famous synthesizer of the 1980s. Its electric piano became a standard sound in ballads and "smooth jazz" genres.  Its bass was the standard bass sound, typically played in bouncy octaves.  Its crystalline timbres were such a departure from the world of analog, that this synth was a super-hit for Yamaha in 1983, and spanned a long family of FM-based products.

FM is a form of synthesizer developed in the early 1970s by Dr John Chowning of Stanford University, then later developed further by Yamaha, leading to the release of the now-legendary DX7 synthesizer: a popular source of bass sounds for numerous dance musicians.

Unlike analogue, FM synthesizers produce sound by using operators, which are very similar to oscillators in an analogue synthesiser but can only produce simple sine waves. Sounds are generated by using the output of the first operator to modulate the pitch of the second, thereby introducing harmonics Like an analogue synthesizer, each FM voice requires a minimum of two oscillators in order to create a basic sound, but because FM only produces sine waves the timbre produced from just one carrier and modulator isn't very rich in harmonics

FM synthesis is based on two key things – a ‘modulator’ oscillator, and a ‘carrier’ oscillator. These oscillators usually both use a sine waveform, and from this the modulator oscillator works just like an LFO – because it modulates the frequency/pitch of the carrier oscillator. You can try this yourself on a normal subtractive synthesizer, by setting up a sine wave oscillator and an LFO, and using the LFO to modulate the pitch of the oscillator – as you increase the rate of the LFO, the sound becomes non-harmonic. Note that in FM synthesis, the word ‘oscillator’ is often replaced with the term ‘operator’. As you change the modulation of the carrier operator, the frequency of the carrier will constantly move up and down depending on how the modulator is set up (e.g. it’s depth and rate), and in doing this different harmonics are created (called ‘sidebands’), because these harmonics surround the carrier frequency depending on how it is modulated.

Because of the somewhat lifeless sound of the operators, FM synthesizers tend to include somewhere around 4-8 operators on a synth to spice things up. These extra operators can be routed in all sorts of different and interesting ways, called ‘algorithms’. For example, with the addition of an extra modulator operator, we can arrange the operators so that they go ‘’modulator 1’ & ‘modulator 2’ go into the carrier’, or ‘modulator 1 goes into modulator 2, which goes into the carrier’ – this being more complicated and creating a new waveform. Therefore, using many operators can produce unique and lifelike sounds unachievable with other types of sound synthesis.

Frequency Modulation
In telecommunications and signal processing, frequency modulation (FM) is the encoding of information in a carrier wave by varying the instantaneous frequency of the wave. This contrasts with amplitude modulation, in which the amplitude of the carrier wave varies, while the frequency remains constant.

Due to the nature of FM, many of the timbres created are quite metallic and digital in character, particularly when compared to the warmth generated by the drifting of analogue oscillators. Also due to the digital nature of FM synthesizer the facia generally contains few real time controllers. Instead, many numerous buttons adorn the front panel forcing you to navigate and adjust any parameters through a small LCD display.

Notably, although both FM and analogue synthesisers were originally used to reproduce realistic instruments, neither can fabricate truly realistic timbres. If the goal of the synthesiser system is to recreate the sound of an existing instrument, this can generally be accomplished more accurately using digital sample based techniques.

if you want to know more about synthesis techniques please read. Rick Snoman's Dance Music Manual (Second Edition) Tools, Toys and Techniques.


Wednesday, June 22, 2016

The science of Synthesis Part 8 - Modifiers

LFO
Most synthesizers also offer additional tools for manipulating sound in the form of modulation sources and destinations. Using these tools, the response or movement of one parameter can be used to modify another totally independent parameter, hence the name 'modifiers'

The number of modifiers available, along with the destinations they can affect is entirely dependent on the synthesiser. Many synthesisers feature a number of envelope generators that allow the action of other parameters alongside the amplifier to be controlled.

For example in many synthesizers feature a number of envelope generators that allow the action of other parameters alongside the amplifier to be controlled.

For example, in many synthesisers, an envelope may be used to modify the filter's action and by doing so you can make tonal changes to the note while it plays. A typical example of this is the squelchy bass sound used in most dance music. By having a zero attack, short decay and zero sustain level on the envelope generator, a sound that starts with the filter wide one before quickly sweeping down to fully closed is produced. This movement is archetypal to most forms of dance music but does not necessarily have to be produced by envelopes. Instead, some synthesisers offer one-shot low-frequency oscillators (LFOs) which can be used in the envelope's place. For instance by using a triangle waveform LFO to modulate the amp, there is a slow rise in volume before a snowdrop again.

Low Frequency Oscillator


LFO's produce output frequencies in much the same way as VCOs. The difference is that a VCO produces an audible frequency (within the 20Hz-20kHz range) while an LFO produces a signal with a relatively low frequency that is inaudible to the human ear (in the range of 1-10Hz).

The waveforms an LFO can utilise depend entirely upon the synthesizer in question, but they commonly employ sine, saw, triangle, square and sample and hold waveforms. The sample and hold waveform is usually constructed with a randomly generated noise waveform that momentarily freezes every few samples before beginning again.

LFO's should not be underestimated because they can be used to modulate other parameters known as  'destination', to introduce additional movement into a sound. For instance, if an LFO is set to a relatively high frequency, say 5Hz, to modulate the pitch of a VCO, the pitch of the oscillator will rise and fall according to the speed and share of the LFO waveform and an effect similar to that of vibrato is generated. If a sine wave is used for the LFO, then it will essentially create an effect similar to that of a wailing police siren. Alternatively, if this same LFO is used to modulate the filter cut-off, then the filter will open and close at a speed determined by the LFO, while if it were used to modulate an oscillator's volume, it would rise and fall in volume recreating a tremolo effect.

This means that an LFO must have an amount control (sometimes known as depth) for varying how much the LFO's waveform augments the destination  rate control to control the speed of the LFO's waveform cycles, and a fade-in control in some. The fade-in control adjusts how quickly the LFO begins to affect the waveform after a key has ben pressed. An example of this is shown in figure the figure below.

LFO fade in
LFO fade-in

The LFO on more capable synthesizers may also have access to it's own envelope. This gives control of the LFO's performance over a specified time period, allowing it not only to fade in after a key has been pressed but also to decay, sustain, and fade away gradually. It is worth noting, however, that the destinations an LFO can modulate are entirely dependent on the synthesiser being used. Some synthesizers may only allow LFOs to modulate the oscillator's pitch and the filter, while others may offer multiple demonstrations and more LFOs. Obviously the more LFOs and destinations that are available, the more creative options you will have at your disposal.

If required, further modulation can be applied with an attached controller keyboard or the synthesizer itself in the form of two modulation wheels. The first, pitch bend, is hard-wired and provides a convenient method of applying a modulating CV to the oscillator(s). By pushing the wheel away from you, you can bend the pitch (i.e. frequency) of the oscillator up. Similarly, you can bend the pitch down by pulling the wheel towards you. This wheel is normally spring loaded to return to the center position, where no bend is applied, if you let go of it, and is commonly used in synthesisers solos to give additional expression. The second wheel, modulation, is freely assignable and offers a convenient method of controlling any on-board parameters, such as the level of the LFO signal sent to the oscillator, filter or VCA or to control the filter cutoff directly. Again, whether this wheel is assignable will depend on the manufacturer of the synthesiser.

On some synthesisers the wheels are hard coded to only allow oscillator modulation (for a vibrato effect), while some others do not have a separate modulation wheel and instead the pitch bend lever can be pushed forward to produce LFO modulation.

Practical applications


While there are other forms of synthesis - which will be discussed in later posts - most synthesisers use in the production of dance music are of an analogue/subtractive nature therefore it's vital that the users grasps the concepts behind the elements of subtractive synthesis and how they can work together to produce a final timbre. With this in mind, it is sensible to experiment with a short example to aid in the undertaking of the components.

Using the synthesiser of your choice, clear all the current settings so that you start from nothing. On many synthesisers this is known as 'initialising a patch', so it may be a button labelled 'init', 'init patch' or similar. 

Begin by pressing and holding C3 on your synthesiser, or alternatively controlling the synthesiser via MIDI programming in a continual note. If not, place something heavy on C3. The whole purpose of this exercise is to hear how the sound develops, as you begin to modify the controls of the synthesiser, so the note needs to play more continually.

Select sawtooth waves for two oscillators, if there is a third oscillator that you cannot turn off, choose a triangle for this third oscillator. Next, detune one sawtooth from the other until the timbre begins to thicken. This is a tutorial to grasp the concept of synthesis, so keep detuning until you hear the oscillators separate from one another and then move back until they become one again and the timbre is thickened out. Generally speaking, detuning of 3 cents should be ample but do not be afraid to experiment - this is a learning process. If you are using a triangle wave, detune this against the two saws and listen to the results, Once you have a timbre you feel you can work with, move onto the next step.

Find the VCA envelope and start experimenting. You will need to release C3 and then press it again so you can hear the effect that the envelope is having on the timbre. Experiment with these envelopes until you have a good grasp on how they can adjust the shape of a timbre; once you are happy you have an understanding, apply a fast attack with a short decay, medium sustain and a long release. As before, for this next step you will need to keep C3 depressed.

Find the filter section, and experiment with the filter settings. Start by using a high-pass filter with the resonance set around midway and slowly turn the filter cut-off control. Note how the filter sweeps through the sound, removing the lower frequencies first, slowly progressing to the higher frequencies. Also experiment with the resonance by rotating it to move upwards and downwards and note how this affects the timbre. Do the same with the notch and band pass, etc. (if the synthesiser has these available) before finally moving to the low pass. Set the low-pass filter quite low, along with a low-resonance setting - you should now have a static buzzing timbre.

The timbre is quite monotonous, so use the filter envelope to inject some life into the sound. This envelope works on exactly the same principles as the VCA, with the exception that it will control the filter's movement. Set the filter's envelope to a long attack and decay, but use a short release and no sustain and set the filter envelope to maximum positive modulation. If the synthesiser has a filter key follow, use this as it will track the pitch of the note being played and adjust itself. Now try depressing C3 to hear how the filter envelope controls the filter, essentially sweeping through the frequencies as the note plays.

Finally, to add some excitement to the timbre, find the LFO section. Generally, the FLO will have a rotary control to adjust the rate (speed), a selector switch to chose the LFO waveform, a depth control and a modulation destination. Choose a triangle wave for the LFO waveform, Hold down C3 on the synthesiser's keyboard, turn the LFO depth control up to maximum and set the LFO destination to pitch. As before, hold down the C3 key and slowly rotate the LFO rate (speed) to hear the results. If you have access to a second LFO, try modulating the filtre cut-off with a square wave LFO, set the LFO depth to maximum and experiment with the LFO rate again.

Here concludes the seventh part of this post, if you want to know more about acoustic science please read. Rick Snoman's Dance Music Manual (Second Edition) Tools, Toys and Techniques.

Monday, June 20, 2016

The science of synthesis part 7 - Voltage Controlled Amplifiers (VCA)

Anagogic Synth Amplifier
An amplifier, electronic amplifier or (informally) amp is an electronic component that can increase the power of a signal. An amplifier functions by taking power from a power supply and controlling the output to match the input signal shape but with a larger amplitude. In this sense, an amplifier modulates the output of the power supply based upon the properties of the input signal. An amplifier is effectively the opposite of an attenuator: while an amplifier provides gain, an attenuator provides loss.

Once the filters have sculpted a sound, the signal then moves into the final stage of synthesiser. The amplifier. When a key is pressed, rather than the volume rising immediately to its maximum and falling to zero when released, an 'envelope generator' is employed to emulate the nuances of real instruments.


The ADSR envelope
The ADSR envelope

Few, if any, acoustic instruments start and stop immediately. It takes a fine amount of time for the sound to reach it's amplitude and then decay away to silence again; thus, the 'envelope generator' - a feature of all synthesisers - can be used to shape the volume with respect to time. This allows you to control whether a sound starts instantly the moment a key is pressed or builds up gradually and how the sound dies away (quickly or slowly) when the key is released.

These controls usually comprise four sections called attack, decay, sustain, and release (ADSR), each of which determines the shaping that occurs at certain points during the length of a note. An example of this is shown in Figure 1.20


  • Attack: The attack control determines how the note starts from the point when the key is pressed and the period of time it takes for the sound to go from silence to full volume. If the period set is quite long, the sound will 'fade in', as if you are slowly turning up a volume knob. If the period set is short, the sound will start the instant a key is pressed. Most instruments utilise a very short attack time.
  • Decay: Immediately after a note has begun it may initially decay in volume. For instance, a piano note starts with a very loud, percussive part but then drops quickly to a lower volume while the note sustains as the key is held down. The time the note takes to fade from the initial peak at the attack stage to the sustain level is known as the 'decay time'.
  • Sustain: The sustain period occurs after the initial attack and decay periods and determines the volume of the note while the key is held down. This means that if the sustain level is set to maximum, any decay period will be ineffective because at the attack stage the volume is at maximum so there is no level to decay down to. Conversely, if the sustain level were set to zero, the sound peaks following the attack period and will fade to nothing even if you continue to hold down th key. In this instance, the decay time determines how quickly the sound decays down to silence.
  • Release: The release period is the time it takes for the sound to fade from the sustain level to silence after the key has been released. If this is set to zero, the sound will stop the instant the key is released, while if a high value is set the note will continue to sound, fading away as the key is released.


Although ADSR envelopes are the most common, there are some subtle variations such as attack-release (AR), time-attack-delay-sustain-release (TADSR), and attack-delay-sustain-time-release. (ADSTR). Because there are no decay or sustain elements contained in most drum timbres, AR envelopes are often used on drum synthesisers. They can also appear on more economical synthesisers simply because the AR parameters are regarded as having the most significant effect on a sound, making them a basic requirement. Both TADSR and ADSTR envelopes are usually found on more expensive synthesisers. With the additional period, T (time), in TADSR for instance, it is possible to set the amount of time that passes before the attack stage is reached. (See figure below)


TADSR Envelope
The TADSR Envelope


It's also important to note that not all envelopes offer linear transitions, meaning that the attack, decay and release stages will not necessarily consist entirely of a straight line as it is shown in the following figure On some synthesisers these stages may be concave or convos, while other synthesisers may allow you to state whether the envelope stages should be linear, concave or convex. The differences between the linear and the exponential envelopes are shown in Figure below.


Linear and exponential envelopes
Linear and exponential envelopes


Here concludes the seventh part of this post, if you want to know more about acoustic science please read. Rick Snoman's Dance Music Manual (Second Edition) Tools, Toys and Techniques.