Music Technology

Handouts

These notes on Music Technology were originally written as handouts for students on examination courses at a further education college in England.

Contents

Introduction to Music Technology

Music technology might be defined as any form of technology which helps a musician to make music.

Technology is the application of science (ie.applied mechanics, applied electricity, applied magnetism and applied acoustics).

A simple definition of music is "a pleasing combination of sounds." Music could also be defined as the art of expressing emotions in sound. Western European music consists of 5 elements (pitch, rhythm, dynamics, melody and harmony). Not all of these need be present at the same time but often are.

Music technology predates the electric era but this course is limited to creating and reproducing music with the aid of electronic instruments such as synthesizers, sequencers and samplers.

FM synthesis

When you have completed this section you should have a basic understanding of FM synthesis and know something about.. First some definitions for you to read through now and refer to later:
Synthesis = building up; putting together; making a whole out of
            several parts.

Modulate  = to vary some character of a wave form
            eg.to vary its amplitude or frequency.

Frequency Modulation  = changing the frequency of a wave by applying
                        a varying signal (usually a varying voltage) 
                        to the oscillator producing the wave. 

LFO  = a Low Frequency Oscillator which operates at sub-audio freqs.

Oscillator  = apparatus (eg. an electronic circuit) which produces a
              constantly repeating ("periodic") wave form.

Oscillators

A musical sound (or "voice") can be created by combining the outputs of two sine wave oscillators. The two simple sine waves combine to give a more complex wave ie. a wave with a fuller harmonic structure.

Envelope Generators (EGs)

When you play a note on an acoustic musical instrument the level of the sound rises to some value, then eventually dies away. The sound level thus changes over a period of time and the way the level changes is characteristic of the particular instrument being played. This characteristic loudness profile is called a " volume envelope" .

Diagram

The quality of a note also changes as the sound decays. The harmonics which give the note its characteristic quality or "timbre" die away at different rates. This change in the sound quality as the note ages is called the " timbre envelope ".
So each voice has a volume envelope and a timbre envelope. The shape of a piano's envelopes is different from those of say an organ or trumpet.
Therefore to create realistic musical sounds or "voices" two sorts of "generators" are needed....

Operators

In the FM synthesis system developed by Yamaha each digital sine wave oscillator is combined with its own envelope generator to form an operator . The output of one operator can be fed to the input of a second operator. From two such operators a diverse range of complex wave forms can be obtained.

Diagram

Algorithms


Two operators can be combined in two ways.

Diagram

With four operators there are 8 different configurations of operator relationships:

Diagram

Each configuration of operators is called an algorithm . The next time you look at a synthesizer, see if the algorithms are printed somewhere on the instrument. The Yamaha DX7, for example, has 6 operators giving 32 possible algorithms.

As you can see, operators can be connected vertically, horizontally or in configurations of both. When two operators are connected horizontally their outputs simply add together. When they are configured vertically ("stacked") the output of one operator modulates the input of the other.
The operator at the bottom of a stack is called the carrier. It carries the signal. All the operators in the same stack above the carrier are called modulators.

Return to Contents

Sampling

When you have completed this section you should know some of the ways samplers can be used and know something about..

Introduction

Samplers record sounds digitally. You might record the sound of an acoustic musical instruments or you might just as easily record any sort of noise. Once recorded (or "sampled") the captured sound might be edited to provide a completely different sound.
Samplers are generally operated from a MIDI Controller (keyboard or computer) although a sampler's own controls may be used instead.

Banks

Inside the sampler each sampled sound is temporarily stored in a "bank", which is a location within the sampler's Random Access Memory (RAM). Into a bank may be deposited a newly sampled sound or an archived sound from a "sound library" disk. Each bank can be assigned a MIDI program number. A simple arrangement would be to make each program number identical with the bank number e.g.
 Program Number 6 = Bank 6. 
 Program Number 7 = Bank 7. 
 Program Number 8 = Bank 8. etc.

The sound in Bank 8 (for example) could be played when a MIDI 
control message for Program No.8 is sent from the controller.

Diagram


Sampling may be started locally by pressing a button on the sampler or remotely from the MIDI Controller. Some machines allow auto-triggering: sampling begins when the amplitude of the signal rises above a preset "trigger level".

Sampling frequency and Resolution

If a sampler has a sampling frequency of 32 kHz the incoming wave will be measured every 1/32,000 th of a second. The 'measuring' takes place in the Analogue to Digital (A/D) convertor. The amplitudes of the pulses produced in the A/D convertor are given whole-number values.
Modern samplers have at least 16 bit resolution. This means that 2 16 (2 to the power of 16)
= 65,536 numbers are available to record the amplitude of each pulse produced by the A/D convertor. 16 bit samplers can therefore digitally represent the changes in amplitude of the analogue signal quite accurately (with good resolution). Some machines have one fixed sample rate, others have several rates. Some samplers can change the sample rate of a sample after sampling :)

Memory

Samplers have internal memories with a storage capacity of at least 1 megabyte. 1 megabyte allows about 0.5 million sample points to be stored giving a recording time of 15.625 seconds.
The storage capacity can usually be assigned to the banks in any way the operator chooses. For example, all the available memory might be allocated to a single bank to store a lengthy sample or the memory space might be divided amongst several banks for a number of shorter samples.

Diagram

The banks provide temporary storage (RAM). Permanent data storage is usually in 3.5" floppy disks or optical disks.

Parameters

Some of the characteristic features (parameters) of the stored sounds may need to be altered. Facilities will vary from model to model but, as a minimum, the level, pitch and length of a sample should be editable.

Trimming

The Start Point and End Point of a sample can be edited:

Diagram

Looping

A Loop Point and End Point are set. The sample can be continuously played from the loop point to the end point:

Diagram

Plays 1,2 +3 then repeats 2 + 3 endlessly

Diagram

The loop point and end point should have similar level and the pitch should be constant.

Diagram

If you control the sampler with a MIDI keyboard, start the playback with a low-note key. The sample will then play slowly, making it easier to find a good start/end/loop point.

Reversing

Reversing a sample is achieved by setting the start point value to the end point and the end point value to the start point:

sampled:

Diagram

plays:

Diagram

When you are satisfied with your edit points the unwanted parts of the sample should be discarded to regain storage space in the memory.

Permanent storage

After sampling and editing, data should be saved to a long term storage medium eg. floppy disk or optical disk. New floppy disks will need to be suitably formatted following the procedure set by the manufacturer. You may have the option to save one sample and its settings or all the samples and their settings. Sample files often span several floppy disks.

Data transfer

It might be possible to load data created on one machine into a later model from the same manufacturer. However, before purchasing a new sampler you should check that your old files are compatible with the new system.
Bulk data (samples plus settings) can be transferred to an identical machine using the MIDI "System Exclusive".
Data transfer between different types of machine will probably be less successful. It should at least be possible to transfer sample data using the MIDI Sample dump standard. However, parameter settings may not be transferred so considerable editing may be required.

A "handshake" connection is required for bulk data transfer.

Handshaking:

Diagram

Return to Contents

Sequencing

When you have completed this section you should know something about...

Introduction

Information can be passed between some electronic musical instruments by way of a serial data link called MIDI (Musical Instrument Digital Interface). The information transferred is primarily performance information and control information.

Controller

All MIDI systems are controlled by a source of MIDI data. The source of this data is referred to as a controller. A controller can take one of several forms, even a computer keyboard, but a piano-type keyboard is the most popular form. A piano-type keyboard is an efficient way of sending information rapidly and accurately to a sequencer. For instrumentalists without keyboard skills, other types of controllers are available eg. guitar controllers, violin controllers, wind controllers.
When a note is pressed on a keyboard, a binary number is generated. The value (size) of the number relates to the pitch of the note selected. The number is transmitted to the sequencer where it is stored in the sequencer's memory.

Sequencer

A sequencer is an electronic device which receives MIDI information, stores it and sends it out later to another MIDI device. In between these operations the stored information may be manipulated, usually via the controller.

Synthesizer

A sequencer cannot make any sounds by itself. It needs to be used in conjunction with a device which can transform data ( information ) into sounds. Such a device is the synthesizer. A synthesizer can use data (a series of 1s and 0s) supplied by a sequencer to produce musical sounds. A sequencer and synthesizer may be combined in one case or the two devices may be separate. If separate, the devices need to be connected, during operation,by a MIDI lead.

Real time and step time

A musician can load information into the sequencer in real time (the speed at which the musician is able to perform the music) or in step time (one note at a time). Information entered stepwise can later be replayed in real time by simply pressing a button.
This feature makes sequencing attractive to players who may be musically creative but possess poor playing skills. Indeed it is possible to play back music faster that even a virtuoso could perform.

Expanders

Some sequencers do not have keyboards attached for inputting information. These devices are intended for rack mounting and can be connected to a controller via a MIDI lead. Some people call these keyboardless sequencers "expanders".

Memory

All sequencers have a computer-type memory for storing the sequence of events sent as a digital signal from the controller.

Clock

Each sequencer has a very accurate internal clock. The clock provides a stream of pulses. As information about each note enters the sequencer the time of its arrival, relative to the beginning of the sequence, is recorded. As well as knowing the pitch of a note the sequencer needs to know when the note was keyed/pressed so that it can record the timing (rhythm) of the music. So, for example, as pitch data arrives it is recorded along with the time of the next clock pulse.
The time that a note arrives is compared with the start of the next clock pulse. If a note arrives between two clock pulses, as far as the sequencer is concerned, it arrived on the second pulse. When the sequence is played back the rhythm may then be inaccurate - because the clock pulses are too slow. If clock pulses are generated very rapidly to overcome this timing problem a large memory would be required to store the vast quantity of numbers.

Equipment

The essential requirements of a sequencer can be provided by one of three kinds of device:

The computer based sequencer is superior in the vast number of facilities it offers. Whether the average musician uses half these facilities is another story. A personal computer plus software package is cost effective since the computer can be used for other tasks. Also the the computer can be retained when the sequencer is upgraded or replaced. Neither the computer nor the sequencer can make musical sounds by themselves. Computer based systems therefore require a synthesizer which can either be placed within the computer case or external to it.

A stand-alone dedicated sequencer serves no function other than sequencing. It can be robust and portable but cannot easily be upgraded. Usually they have small LCD screens which, when programming the unit, are not as easy to read as a computer's VDU.

A synthesizer with built in sequencer usually has fewer features than a personal computer based system but , being robust and portable, is better suited to live performance.

Using a sequencer

A sequencer can be used like a multitrack recorder. A "pattern" (a series of events) can be recorded and then replayed. Whilst the first pattern is replaying the musician can play along , recording an accompanying pattern on another "track". In this fashion songs can be built up a layer at a time.

As well as this basic recording facility, sequencers usually have many other useful features....

As in all computer operations it is wise to save your efforts at frequent intervals. Many sequencers allow patterns/songs to be saved on floppy disks, so they can be transported to other systems. There are some file formats which can only be read by the make of computer/program they were created on. Other MIDI file formats allow a file created with one sort of software to be read by other software. Sometimes not all of the information can be read but transferring the essentials from one system to another can be better than nothing.
The length of a "song" that can be recorded by a sequencer depends on the size of the computer memory and the nature of the incoming information. Sequencers usually have an on-screen counter to indicate how much storage space is left.

Return to Contents

Musical Instrument Digital Interface

When you have studied this section you should know...

Introduction: the need for MIDI

MIDI is a means of communicating between two or more suitably equipped electronic musical instruments. Before MIDI was introduced it was possible to swop information between analog instruments. It was common for two analog keyboards to be connected together so that both machines could be played from one keyboard, providing a richer, enhanced sound. The usual method of connecting two analog synths. was the GATE/CV method. The gate signal simply turned a voltage on or off. This gate signal was obtained from switches beneath the piano-type keys. The gate voltage was normally about 0 volts, switching to about 5 volts when a key was pressed.The pitch of the note was determined by the Control Voltage. One standard was a control voltage (C.V.) of 1 volt per octave . If 3v produced middle C then 4v produced the C an octave higher. This logarithmic scaling allowed a wide range of notes to be produced without a wide voltage range being necessary.
A polyphonic synthesizer can play several notes simultaneously eg, 16 notes. However a large number of wires are required to interconnect two polyphonic analog synths. With 16 note polyphony, for example, 32 wires are required just to switch notes on and off!

The MIDI system was introduced in 1982 to...

    .eliminate the mass of interconnecting wires
    .allow a wide range of instruments to work together
    .allow systems to be upgraded (to take advantage of new
     developments without having to scrap existing equipment).

MIDI overcomes the rapid obsolescence caused by constant developments in consumer electronics.

The MIDI signal

MIDI is a purely digital system and it does not rely on a varying voltage to indicate the pitch of a note, or anything else. The signal carrying the information is either at logic 0 or logic 1. One digital signal on its own simply acts as an on/off switch. Several on/off signals are grouped together to to convey information. The individual on/off signals (logic 0, logic 1) are called bits .
A group of 8 bits is called a byte . An 8 bit "byte" can form any number from 0 to 255 and each number can be used as a code. A group of bytes may be used to send a complex message.

Data is placed on the output of the sending device one bit at a time. The receiving device collects the coded messages one bit at a time and reassembles the the bits into complete bytes. In addition to coded messages the sending device also sends timing signals so that the receiving device knows which bit belongs to which byte. The timing signals are sent on the same line as the messages.

A MIDI signal consists of a start bit (a timing signal) 8 data bits and a stop bit (another timing signal). A single MIDI instruction might consist of 1, 2 or 3 of these byte groups. The rate of transmission is about 3,000 bytes per second (31.25 kilobaud).

The MIDI link

The MIDI connection is a loop, around which a pulsed current flows.
When no information is being transmitted the current is steady at about 5mA. This drops to 0mA when a start bit is transmitted and returns to 5mA when a stop bit is sent. Each of the 8 data bits in between might be at 0mA or 5mA.

The current in the MIDI cable wires drives an opto-isolator . The opto-isolator consists of a light emitting diode and a photocell contained in an opaque case. The incoming signal is transmitted by the LED a pulses of light and converted back to a pulsating current by the photocell.

Diagram

The opto-isolator is situated at the receiving end of the MIDI link. It enables data to be sent from one device to another without a direct electrical connection. The isolator prevents damage to sensitive microprocessor circuits in the event of the chassis of the equipment being at different potentials (voltages).

The MIDI cable

The standard MIDI connection is via a screened cable with two signal wires and a 5 pin DIN plug at each end. The 5 pins are arranged in a 180 degree arc .
(There are 5 pin DIN plugs with other pin configurations).

Diagram

The signal wires are connected in the plugs to pins 4 and 3. The cable screen is connected to pin 2 of each plug. In the equipment, pin 2 is only connected at the send socket (MIDI OUT, MIDI THRU). Pin 2 is not connected at the receiving equipment's socket (MIDI IN) .

Diagram

MIDI THRU

The MIDI system works by switching a 5mA current on and off. If two or more instruments were connected to the output of a single controller (eg. a keyboard) the current would be shared between the controlled instruments.
There might be too little current for them to operate correctly. The MIDI THRU provides an additional output socket. This MIDI THRU socket is supplied through a buffer amplifier with a signal from the MIDI IN ( not the MIDI OUT). The buffer amp. supplies a current of 5mA to the MIDI THRU socket.

Diagram

Using this system, a number of instruments can be connected in a chain and each will receive a full 5mA current.

THRU Box

A THRU BOX provides a number of THRU sockets in one unit. It allows MIDI instruments which do not have THRUs to be used in a multi-instrument set-up. Instruments are connected to the THRU BOX in a star configuration.

Diagram

Expanders

These are electronic musical instruments with no means of control eg. no keyboard. They are often rack-mounted and controlled from a remote keyboard, wind controller, guitar controller or computer etc.

MIDI interface

Serial data transmission is widely used in computing (eg. the RS 232 system). MIDI is faster than the system used for computing and differs in another respect. The RS 232 computer system uses +12v for logic 1 and -12v for logic 0. MIDI, as we've already seen, uses a current switched between 5mA and 0mA.
MIDI equipment cannot,therefore, be directly connected to the serial output ("port") of a computer. An interface is required.

When the IBM PC was introduced (1981) serial interfaces were slower than they are today. The rate was much too slow for MIDI. Other personal computers (PCs) such as the Apple Mac' and Commodore Amiga came onto the market later and could handle the MIDI data rate. All they needed was a buffer to convert RS 232 voltage levels to a 5mA current loop signal. The Atari ST even had a converter built in.

In order to use the IBM PC (or one of its many clones) a MIDI interface card is required. This printed circuit board plugs into one of the expansion slots within the computer. These interface cards can be made more intelligent than the simple converters found in other computers. They can for example take over some of the work which would otherwise have to be carried out by the computer's main processor.
The interface consists of two parts; hardware and software. The hardware ("card") is the electronics required to pass information between machines. The software encodes the data, turning complex instructions into simple digital signals.

More about MIDI
Return to contents

Your comments

Music Technology Handouts, October 1997.
This document is under construction. If you have any constructive comments to make, please type your remarks in the Box, below, then click on the Submit button.

Thank you for taking the time to send me your thoughts on this subject. Although I cannot respond individually, your suggestions will be taken into account when I edit these pages.


DISCLAIMER

THESE NOTES ARE PUBLISHED "AS IS". THE AUTHOR SHALL NOT BE LIABLE FOR 
ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF 
THE USE OR INABILITY TO USE THE INFORMATION CONTAINED HEREIN. 
REGARDLESS OF THE FORM OF THE CLAIM, THE PERSON USING THE INFORMATION 
IN THESE NOTES BEARS ALL RISK AS TO THE QUALITY OF THAT INFORMATION.
IN ANY DISPUTE ENGLISH LAW SHALL APPLY.

AGREEMENT

THIS PUBLICATION HAS BEEN PRODUCED FOR NONCOMMERCIAL USE. ALL RIGHTS 
ARE RESERVED AND NO PART OF THIS PUBLICATION MAY BE REPRODUCED, STORED 
IN A RETRIEVAL SYSTEM, OR TRANSMITTED IN ANY FORM OR BY ANY MEANS 
EXCEPT AS AUTHORIZED BY THE TERMS OF THIS AGREEMENT.

UNDER NO CIRCUMSTANCES MAY YOU COPY THIS PUBLICATION FOR THE PURPOSE 
OF DISTRIBUTION TO OTHERS. UNDER NO CIRCUMSTANCES MAY YOU REMOVE THE 
COPYRIGHT NOTICES MADE PART OF THIS PUBLICATION. 

ARCHIVAL SOFTWARE COPIES OF THIS PUBLICATION MAY BE USED BY ONE PERSON 
ON AS MANY COMPUTER SYSTEMS AS THAT PERSON USES. YOU MAY MAKE PRINTED 
COPIES FOR YOUR PERSONAL USE ONLY. GROUP PROJECTS MAY MAKE USE OF THIS 
PUBLICATION PROVIDED THEY HAVE PRIOR PERMISSION OF THE AUTHOR.

COPYING, EXCEPT AS ABOVE, DUPLICATING, SELLING, RENTING, TRANSFERRING 
OR OTHERWISE DISTRIBUTING THIS PUBLICATION IS A VIOLATION OF THE LAW 
OF ENGLAND. INSTALLATION OF,OR PRINTING, THE PUBLICATION 
INDICATES ACCEPTANCE OF THIS AGREEMENT.

ALL CORPORATE NAMES AND RODUCT NAMES MENTIONED IN THIS DOCUMENT ARE
TRADEMARKS OR REGISTERED TRADEMARKS OF THEIR RESPECTIVE OWNERS.
ALL PHOTO IMAGES ARE USED WITH PERMISSION AND ALL RIGHTS
REMAIN WITH THE COPYRIGHT OWNERS.

Return to Contents
[F.M.Synthesis] [Sampling] [Sequencing] [MIDI] [ MIDI Modes]
[MIDI Timecode]

. Doug Barnes's Music Technology Handouts



Copyright (C)1997 D. Barnes
Music Technology Handouts/revised October 1997