| The
electronics page. Paragraphs in this page are: Analog-Digital Gate-Trigger The ADSR Midi Analog Synthesizer FM Modulation Synthesizer Samplers-Wavetable Overall conclusion Analog-Digital Analog data is any data that can is inside a continous climax, where between any pair of values, one value at least can be found nomatter how close the initial values are. Digital data is any data that uses descrete values, where between two continuous values no other can be found. Referring to mathematics and values, the Real numbers is an two way infinite analog climax, while the Natural numbers is an one way infinite digital climax. When digital data is represented by two only values (0 and 1) then we are referring to the Binary system. So, Binary is a form of the Digital concept. The first clear difference between these two - mathematical in reality - concepts is that there are analog values that can be represented in a digital way only approximately, therefore loss occurs. Though analog technology is theoretically better, in practice it is outrunned by Digital technology. The reasons are many: 1) Analog devices must be rather expensive to produce fine quality. We would need an expensive LP deck to fully benefit from an LP. 2) The means of analog storage suffer from the frequent use. The Long Play Vinillium disks are a fine example. 3) The copy procedure between analog devices is full of losses. The analog multichannel recording tapes are much better than the Vinillium they produce, and the Vinillium is way better than the cassettes it is copied to, even with very fine equipment used. If we state the opposites, we define the advantages of Digital techmology: 1) Rather cheap devices for very good quality. 2) Storage devices that last long. 3) No copy loss between 2 digital mediums, provided that the formats used are lossless in nature. Gate-Trigger The Gate-Trigger electronic circuit behaviour is in reality a strictly technological issue, allthough we experience it in our everyday electronic use. It is mentioned in my page for pure theoretic reasons. When an event is initiated, two distinged operational types exist. The first type is operation while the event stays alive. The second type is simple operation start by event and nothing beyond that. In the first mechanism, we control start and end of an event, while in the second, we only control the start of the event. This can be more understandable with gate-trigger examples:
The Gate and Trigger mechanism definitions course is the first step for anyone wanting to take a deep dive into electronis and I am proud for having them explained in my pages. The ADSR The ADSR is an electronic sound production parameter referenced in this page because it is simple enough and can help understanding synthesizers and musical instruments in general, without providing "outdated" knowledge. As we see in the musical instrument families, sound can be created in various ways. Therefore, Musical instruments differ in much more issues than simply the timbre. If we hit sticks, we see that the sound created is very short. Pulling a guitar string is an instantaneus action but the string fades slower and would terminate immediately if we touched the string. The piano does that too with the help of a mechanism. The string continues to vibrate until we release the key. Violins behave differently when plucked. The sound continues and stops shortly after stopping. Pulling the violin's string (pizzicato) behaves differently than the quitar: stops much shortly. The xylophone's sound is shorter than the vibraphone's. These differences are kept in mind when composing, arranging or simply playing musical instruments. Expressions and effects vary very much. Because violins can play a steady tone for much longer than a piano can, the desired effect is simulated in piano playing with the use of the "trill", where 2 tones are played very fast. A method of defining the existance and behaviour of the sound is the following: 1) We assume that sound is inside a shape, called "envelope". The envelope is defined by two dimentions: Time (x) and level (y). 2) We separate pieces of this envelope that behave differently: The ADSR.
The above examples show how artificially generated sound can simulate instruments. In reality, the ADSR is more important than the timbre itself. For many years before the sampling and wavetable technology, sound was created to simulate instruments by "approaching" the real instruments sound, therefore not always close to reality. Using synthesizers and samples is not all about imitating of course. Sound can be sampled and altered or generated from scratch. The ADSR described here seems too primitive of course, compared to the modern envelope algorithms. Now, the states that the sound can have are many and the change can be of various curves, not only straight. The envelope is literally drawn with a mouse in a time-level canvas, or approached pure mathematically. Nevertheless, there is always an attack (keypress), decay (peak curve), sustain (keydown), release (keyup), so I figure that the ADSR description can still teach the basics of the envelope totay. Midi Definition Midi stands for Musical Instrument Digital Interface and is a digital data transfer protocol in nature. Midi was an essential evolution when computers began to work around music issues, but midi was not the first interconnection method between musical instruments. History Before Midi there were various ways for interconnecting musical instruments, a very known one being the analog interconnection. In this old interconnection, the keyboad of an analog synthesizer, while pressed, sent a continuous local electrical analog wave signal that defined the pitch according to number of volts, but also passed this signal simultaneusly to a jack for external connection with another kayboard, which acted just if its own keyboard was pressed. This method was practical enough, but could only simulate a single remote keyboard, while Midi has many more capabilities. Midi threw away the analog burden and used instead the digital concept, relevant not only to note-sound description or timbre polyphony, but also to time itself using "clock", which means time declaring pulses travelling through the signal. Inside the Midi The significant difference between digital sound and Midi music is that Midi only cares about events that are organized accorting to time they occur and are momentary: Note on, note off, velocity, all notes off, bank change, program change, portamento rate, midi exclusive signal etc. This means 2 things:
Therefore: Midi is a Trigger mechanism. (remember the Gate-Trigger paragraph?) The maximum events number that can be stored, does not define maximum duration of a music piece. Midi is a 8 bit data that uses 1 bit for parity (simple data integrity check), so the remaining 7 bits can define 128 values (0 to 127 or 00 to 7F in hexadecimal). Midi defines 16 "channels" that can control 16 different timbres with complete independence. Interconnection The midi devices connect with a 5-pin cable from the Out of the sender to the In of the receiver. The receiver can then "fork" the sender's signal fron its "through" to the In of the next receiver. Excluding computers and software sequencers, if the 1rst receiver connects its Out port with the 2nd receiver's In port then the initial sender can not communicate with the 2nd receiver, unless there is an option to merge the 1st receiver's Out-Through ports, which is rare. When setting up midi interconnection, carefully choose between Out and Through ports. If you want to fork a sender's midi signal, please Do Not fork the Midi cable itself. Midi is a digital protocol that passes data, clock etc. A simple cable fork will produce data loss, therefore stale notes, pedals that "stick", unpredicted program changes etc. The only way to fork a signal is either have a Mother Keyboard with 2 Out ports or use a special multi-port programmable device. Conclusion Midi is only music event data, therefore it is "compressed" by nature as it has no information whatsoever about the actual sound that is used. So, the quality of the midi reproduction is depended only on the sound module that will interpret the events to real sound. On top of Midi, many "aggreements" between manufacturers have passed. One of them is the General Midi protocol, which standarizes issues concerning for example the first 128 sounds of at least the first bank, or the presence of a prefixed (but changeable) Drum Set existing on the 10th midi channel. Analog Synthesizer Introduction All the analog synthesizer knowledge is considered basic for the next generation sound creating methods, as nearly every important word will be met again till the present sampling technology. The words to be remembered will be marked accordingly. The analog technology consists of analog electronic devices that are voltage controlled, that's why all the components get the VC (Voltage Controlled) prefix: Oscillator, Filter and Amplifier become: VCO, VCF, VCA. These terms have been classic till now even though there are not voltage controlled - considering pure technology - anymore. In Depth The components of a simple to understand analog synthesizer are:
Advantages The Analog Synthesizer is one of the most interesting methods to produce a nice artificial sound. Analog Synthesizers produce very smooth sounds and are still in use where music style permits. The analog design permits altering of the sound "on stage" very easily: Just hit the cut-off filter up and the sound gets brighter instantaeneusly. Disadvantages The Analog Synthesizer was expensive from the beginning and considering every era's requirements it still is. Analog technology does not produce realistic sounds because the original waveforms are too simple for this task. Pure Analog Synths have only one "memory": The current paramater levels. It was not uncommon to have markers placed as paper sheets on top of the synths, thus helping to adjust the knobs by hand. In rare cases, as long as the musician decided that the sound was good enough, he/she got out to buy a new synth!!! This was the most artistic era: one synth for one sound. Today's analog synthesizers are a mix of analog and digital technology, where digital is used to soften the analog disadvantages: Now analog synths have sound memory and interconnect via Midi. The ADSR may also be much more sophisticated. They are still expensive. FM Modulation Synthesizer Intro The progress of electronics permitted the use of digital devices, enabling much greater versatility than the analog ones. The evolution of the analog synthesizer is a dead end by many view angles. A completely realistic multi polyphony multi timbre analog synth is no-existent whatsoever; it would take so many oscillators along with their own independed VCF-VCA circuits that the cost would be too high. When two analog synth oscillators "oscillate" together, they interact with each other by amplitude modulation. This means that the waves "mix" by adding or substracting to the intensity, thus making a not very much more complicated sound, but oscillators are by their own too important to waste for such a simple task. That's why, even good and expensive analog synths have limited capabilities and their purpose is to produce warm and clear but artificial sounds. Thankfully, there is not only the amplitude modulation that exists, but also the frequency one. AM-FM AM stands for Amplitude Modulation. FM stands for Frequency Modulation. AM-FM technology is passed to Music technology from the Radio. The AM Radio concept is simple enough to understand: a sound modulates by amplitude a stable-frequency carrier in order to transmit the wave and demodulate it with a very simple circuit: A diode and a capacitor. The diode kills the negative portion and the capacitor eliminates the carrier's high frequency. The FM Radio concept is harder to understand: The same sound input modulates a carrier by frequency in order to transmit and receive it afterwards. Both FM modulation and demodulation are much more complicated but the concept pays a lot back concidering the sound quality that is finally received. Because the carrier is stable by amplitude much less noise is produced, but because it modulates slightly from the base frequency, the receiver has to have a "tolerance" around the stable frequency in order to receive the signal. Higher band is required for FM to have a decent amount of channels and the stereo transmission adds to the difficulty. But even thinking that FM has much more needs than AM, AM would never be that good even in high frequency bands. The same characteristics are met in music technology too. FM concept When one oscillator modulates another using AM, the sound ganerated is a mix of timbres and the harmonics added are just the addition of the ones created by each oscillator. But as we have seen previously, oscillator shapes are rather primitive - meaning simple - so the harmonic addition is not much. If one oscillator modulates another using FM, the sound generated is altered by small frequency changes inside the base tone frequency. The simplest example is this: If a single Sine wave AM modulates the same Sine wave, the result is a Sine wave, so nothing happens. But if the sine wave FM modulates the same Sine wave, a wave that gets close to the Saw wave is the result. Using FM, from 2 same waves we get a totally different one! So, FM's advantage over AM is the richer harmonic addition. FM Synth The FM synthesizer does FM as well as AM modulation, but it is called FM mainly because that is the special function that it does over the analog synthesizers. FM synthesis is based on the concept that an oscillator may be carrying the sound or modulating another oscillator. Because of this, a more generic word is used: operator. So: In FM sound generation, the operator is an oscillator that has versatile roles: carrying the sound itself or modulating another operator. An Operator may take the role of a Carrier or a Modulator. In a 4 operator example we can see various combinations between operators:
For the sake of the example, a special operator overdriving itself is marked. This is useful for creating "distorted" waves and noise. This special operator is common when talking about synths that have 8 operators and more. As obvious, the sound needs at least one carrier to be produced. All that we have learned from the Analog Synth paragraph still exists in FM Synths: waveforms, filtering, amplitude, envelope etc. are functions still used but adopted accordingly into the FM technology. The operators are very versatile: They can have stable or variable (keyboard related) frequency, be subsonic, invert the relation to the keyboard (lower with higher keys), act in a stable transposition or be "microtonic". Example 1: One operator may act as an LFO (low frequency oscillator) being able to modulate the rest 3 and produce vibrato or tremolo effects. If this operator is stable, then the vibrato will be stable in the entire keyboard. If it is variable, then the vibrato will vary among the keyboard range. This "LFO" - fumctioning operator can modulate frequency and/or amplitude as well. Example 2: One operator acts as a carrier but has a stable frequency, producing the same note in the entire keyboard. But the rest 3 operators are set to variable and modulate each other finally down to the stable carrier. In this example, one single pitch will have a totally different timbre along the keyboard. If we set the ADSR accordingly, we can have a percussion sound varying from low to high keys. Example 3: One carrier is modulated by one operator. The rest two operators are carriers transposed to a constant 2/3 (5th Perfect) and 3/8 (4th Perfect and an octave) to the mentioned carrier. This combination reminds the Pipe Organ knobs adding certain harmonic ratios to the played notes. If we can do all this (and more) with 4 operators, imagine what could be done with 8 or 12 of them! Advantages The main advantage is that using very simple devices and very few operators we get results that would need much more complicated analog synths with much more oscillators and more than the simple waves. If we add the operator combination flexibility, a vast amount of sound timbres can be created using nearly the same parameters. Disadvantages Using FM modulation, two "sweet" waveforms do not suggest a sweet waveform result. The FM synthesis consists of many trials and errors due to the unexpected outcome. Most tips considering FM are simple recipies about operator combinations and/or already created sound schemes to be modified afterwards. Because FM is about modulating primitive shapes, it is much away from producing satisfactory realistic sounds. Just to be close to a natural sound we need more than 8 operators and much guessing for what to do with them. FM sounds are somehow "dry". But this is usually due to the cheap hardware that often uses no more than four operators, so this critic may be unjust. Samplers-Wavetable Description When the analog synth was in use, the FM technology was a very promising technology. By the time FM technology became standard, Sampling technology was a very expensive luxury, still in research. Sampling and Wavetable is today's widely used technology. The idea of sampling is not far from using a waveform for all the processing methods we already know. The waveform itself though, instead of being "constructed" from scratch, gets "digitized" using a techology that transforms the existing analog sound into a digital data stream. That's the essence of samplers: we get a "sample" of the instrument as the initial waveform and start processing it with all the tools we know and even more. Method Let's imagine a sound represented in 2 dimensions. The Y axis is the amplitude whereas the X axis is the time passing. Coding the sound to digital data can be represented by creating a grid dense enough to adequately transform the continous analog values into descrete digital ones. Y Axis density (amplitude) is defined by bit rate, while X Axis (time) density is defined by number of samples per second. As obvious, higher bit rate and samples are better than low ones, as data transcribed will be closer to the real sound. Low bitrate would suffer from noise levels at least and low samples per second would at least miss sound richness speaking of harmonics especially in the high band. Quality rates The human hearing range is generally up to 20khz. An adequate sampling rate needs to "catch" the double harmonic of the frequency limit and is widely standarized to 44khz. The 16bit rate is also considered adequate and the whole action is better to be stereo. So the minimum adequate sampling rate is 16bit 44khz stereo, equivalent to 172kbytes/sec. That's also the AudioCD minimum requirement. Using 16bit 44khz stereo sampling: a single 7 seconds piano tone sample takes up to 1.17 Megabytes where a 5 minutes music piece takes up to 50 MegaBytes. If we "cut down" our demands, every cut to half cuts the size by two. Using 8bit 22khz mono sampling: a single 7 seconds piano tone sample takes up to 149 Kilobytes where a 5 minutes music piece takes up to 6.25 MegaBytes. So the not so good sampling rate of 8bit 22khz mono is equivalent to 21,5kbytes/sec. That's approximately the FM mono quality. Lower rates produce AM radio qualities and even lower ones produce telephone qualities. Wavetable The wavetable is a structured data storage method containing sound samples of various instruments at least. At most, it also stores additional samples of the same instrument for alternative usage. It is common that not most instruments have completely different timbres across the hearing range. Most woodwinds, for example, have dark-warm low-pitch sounds, sweeter medium ones and sharper high ones. So, different samples per range may be needed. All instruments alter their timbre according to the intensity they are played (the velocity parameter in the synth language). In cases where this necessary, different samples are taken not only for tone range, but also for dynamics range also. Low tones have a tendency to be "richer" than high ones. The piano is a very good example of this. This is because low tones have more harmonics inside the acoustic range adding to their quality, where high ones produce harmonics outside the hearing range , adding much less to sound richness. This fact is not underestimated considering sound quality "digital" size and in most cases the last upper octave of an instrument does not need to be resampled as it wouldn't add much to the sound's realistic properties. Processing methods Technology forgets nothing. Digital sampling can use all the methods described in Analog and FM synthesis: filtering, tone transportation, low frequency oscillation, envelope etc. can be applied on a sample. The new methods refer to the alteration of the sample itself: Portions or the entire sample can be cut and pasted, added to another waveform, inverted in time or amplitude, passed through a compressor, gate, denoiser, harmonizer or effect, lowered or highered as tone with/without modifying its duration and all this can be realtime or rendered and saved again. Loss encoding methods Additional encoding methods have been created in order to reduce sample size in favor of storage or transportation convenience. These methods use loss algorithms. Mp3 and Ogg files are a nice example. Though, even if the compressed sound is satisfactory, more processing power is needed as there is an extra decode step in the whole procedure. Overall conclusion Digitizing a sound wave is very close to digitizing a whole piece of music. In the first case we just need a sample duration equal to the period of an instrument's sound or just till the sound fades, while in the second case we sample the whole music piece. So, when hearing a wav lossless file or an audio track in our cd, let's remember that the mechanism is the same. As same, same rules exist in both cases considering quality tolerance. When using sample technology sound modules, remember that the sound banks do not have only natural sounds. Much many samples are taken directly from electric pianos and organs or famous sounds (clavinet, warm pad etc.) created by top Analog or FM modulation synths. Even so, the Wavetable, which is sample technology's child, is a fine way for keeping a practical and rounded up sound bank useful for amateur as well as professional work. Two major directions refer to computers and sound in general: Hard Disk Recording and Software Synth (analog, FM, organ or sampling). The first needs speed and the second needs low latency. Not all computer sound cards excel in both. When the need for professional work includes computers, carefully choose the focus of work and the best-for-the-task sound card. The 16bit 44khz stereo is equivalent to 172kb per second. This is also the single (1X) speed of the audio cd protocol. Knowing this, we can multiply the speed to know e.g how fast is a 12X cd burn. The fact that sampling is the modern "trendy" way for music does not produce better results by default. Many characteristics are neccessary: sampling quality, analog-to-digital quality for input and digital-to-analog quality for reproduction, filter, effect and preamplifier quality etc. A sampled sound may be realistic but dry where an FM sound produced by a better synth may lose in realism but gain in warmth and balance. An entire 128 sound bank can be 2Mb while a much better single Piano sample can be 128Mb. On the other hand, lower samples with better peripherals (digital to analog converter or preamplifier) may sound better than higher samples with worse peripherals. Speaking about different samples per range, the main difficulty in samplers is the "step" between the sample ranges. There, a significant change may be heard which is definetly wrong since natural instruments alter the timbre very smoothly. Not-so-sophisticated samplers/samples "betray" their quality when facing this issue. When testing a sound across its useful range, focus on how smooth the timbre change is. When trying to master FM technology with a good synth (I mean really master it) I would suggest first to try simple sound creation just as if it was an analog synth (all operators as carriers) and afterwards to try to modulate by frequency, (some operators as modulators). Messing with the FM synth is not an easy task. But this paragraph is to be ignored if you just want to use the predefined sounds and not explore anything deeper. |