Click for Home/contents page See also the home page for Contents and a search facility for this site.

Technology1

www.technology1.co.uk

Sound Technology

Contents:

File Types used for Sound and Music

Computer Software - Some selected sound and music related computer software available on the Internet.

The History of Sound Recording

 



 

File Types used for Sound and Music

WAV

WAV files represent an exact sound and are capable of CD quality, though the extent to which the potential of the file will be achieved will depend on the sound card. The disadvantage of WAV files is that they are very big. As an approximation, a good quality WAV file will occupy 10 MBytes of disk space for every minute of sound.

WAV files are suitable for any type of sound or audio, not just music.

Although it is possible to edit WAV files with suitable software, it is only possible to edit the overall sound occurring at any point in time. For example it is not possible to identify individual notes which are played simultaneously, or to transpose the key of music.


MP3

MP3 is an abbreviation for a type of audio file which is based on the MPEG video standard. It is the sound format used in MPEG-1 level 3. An MP3 file can be regarded as a compressed version of a WAV file. The advantage is that these files greatly reduce the size of the WAV file, and so occupy less storage space, and in the case of the Internet, can be transferred quicker. This is 'lossy compression' and works by discarding some of the sound information which is thought to be inaudible. There are various settings which determine the sound quality and file sizes. Suitable software can play an MP3 file directly, notably Windows Media Player.

Once a WAV file has been converted to MP3 the original data cannot be fully recovered. It is possible to convert an MP3 file to a WAV file, but there will be no improvement in sound quality over that of the MP3 file.. There is little reason to ever do it, perhaps only for use by equipment or software which will only work with a WAV file.

When creating an MP3 file the encoder can be set up to use a wide range of sample rates. The lower sample rates give more compression, i.e. smaller file size, but reduce the sound quality. Different qualities of stereo encoding can be applied, including full stereo and mono. More sophisticated encoders can also use Variable Bit Rate (VBR) which allows the encoder to vary the bit rate depending on the audio content, for example to use the lower rate during periods of silence. A bit rate of 64K bits per second is good for speech where sound quality is not important, and is approximately the same as a typical domestic FM radio. 128Kbps is better for music, especially that extracted from a CD. There is still an audible deterioration in the sound even at this rate and some may prefer higher bit rates still.

A good quality MP3 file will typically be about one tenth the size of the corresponding WAV file, hence approximately 1 MByte per minute of sound.

The MPEG standard (which covers MP3) does not define a precise way of encoding the data. The writer of the encoder software has a certain amount of freedom about how to do the encoding, so different MP3 encoders can produce different results while still conforming to the MP3 standard. MP3 encoding is compression which involves losing some of the audio data, and the writer of the encoder can choose to optimise his encoder for different purposes, for example speech or music of different kinds. He might simply wish to keep the software simple either to allow processing with limited processor resources, or even to make his task easier. There are a number of algorithms in common use.


MIDI

MIDI, Musical Instrument Digital Interface, started as a means of allowing musical instruments to communicate with each other. Typically it allows key-presses on a keyboard to be sent to a second instrument such as an electronic tone generator, to respond immediately. Midi does not convey actual sound, but primarily information about which note is to be played, its duration, and its loudness relative to others in the tune.

A Midi file is an extension of the format which allows note information to be stored in a file, together with timing information which determines when each note is played and for how long. In its simplest form, that is all a Midi file needs to specify. If a tone generator is capable of producing more than one 'voice' such as piano, violin etc, the Midi file can specify this information too, but the exact sound is determined by the tone generator.

In computers the tone generator is the sound card. The quality of sound produced, and the exact nature of it, will depend on the sound card and not on the Midi file. With suitable software Midi files can be edited note by note, and changed in various ways such as transposing and voice changes. They can also be converted to sheet music notation.

More recently General Midi (GM) was introduced to establish agreement between manufacturers on the type of sounds represented by the data which specifies this. It means that part of the music which is intended for a guitar, for example, will be so produced. However different tone generators by different manufacturers will still sound different. One effect of this is that the creator of a Midi file cannot be quite sure exactly what it will sound like when someone else plays it. This is particularly relevant in the case of the Internet.

Midi is suitable for storing and communicating information about the musical content of a tune. It can be used as an alternative to sheet music for this purpose, and is a compact and efficient method. It is also capable of a remarkable amount of expression in instrumental music, going much further than what is expressible in sheet music and for instrumental music can come close to using WAV or MP3, but Midi can achieve this with much smaller files.

Sometimes the principle "Less is More" applies to Midi files. If all you want is information about the tune, as would be found in printed sheet music, it can be better to have a file without all the subtle effects which are intended for sophisticated reproduction of the sound. These extra effects such as pitch bend can magnify the size of the file several times over. Also subtle variations in note timing and lengths can mess up the presentation when converted to sheet music.

The standard for Midi files allows a considerable amount of freedom, that is it doesn't force things to be done in a certain way. As a result it is important to use good practice when creating Midi files.

MIDI Channels

First some background information to explain channels. In older equipment each piece of equipment capable of producing sounds, such as a tone generator module, or drum machine, was set to a channel. The data was sent to all equipment simultaneously, but note information was tagged with channel data and so would only play on the device for that channel. (Got it so far?) Things are a bit different now because modern tone generators, including computer sound cards, are effectively several instruments in one and can play several channels. Typically each channel will produce a particular sound such as Piano, or Drums.

Midi files contain note data for several channels, and when the file is played the data is applied to the various channels in rapid succession so that all channels can play their respective parts simultaneously.

It is conventional, and good practice to assign instruments required to different channels, and leave it like that. However it is technically possible to change the instrument assigned to a channel part way through a tune. This might be done when there are more instruments required than there are channels.

MIDI File Types, Type 0 and Type 1

Midi files, also known as Standard Midi Files, come in two common forms - type 0 and type 1. To understand the difference it is necessary to introduce the concept of Tracks. Tracks are not the same thing as channels, but there is a relationship between the two. Tracks are nothing more than a way of organising the data in the computer, and in the file. They do not determine the notes which are played. Tracks are usually associated with a particular 'part' of the music, like the staves of orchestral sheet music, and hence associated with an instrument.

Type 0 Midi Files

In a Type 0 Midi file the data is not separated into tracks. Everything is in one track only. All jumbled together would be one way to put it! The events, such as notes to be played, appear in consecutive order, i.e. in the order they will be sent to the tone generators. Nevertheless, the events can still be designated for different channels, as I say, all jumbled together.

An advantage of Type 0 files is that it is easy for electronic musical instruments to play them because everything appears in the right order. The file can be read sequentially as the playing takes place, and it is not necessary for the device to store anything, and there should be no limit to the size of file the device can play.

Type 1 Midi Files

In a Type 1 Midi file the data is separated into tracks. This means that computer software for editing Midi files can arrange its music in tracks, and when saved as a Midi file, the track data will be preserved for when the file is loaded again.

Provided your equipment and software can deal with Type 1 files, they are better because the tracks are separate. Once the data has been saved as a type 0 file the data will be comined into one long sequence of events and it is impossible to convert back to the original type 1 file. Some software can reconstruct a feasible type 1 file by allocating tracks based on the channels of the events.

As hinted above, the events in the file are not in consecutive order, because the whole of one track will appear in the file before the next track, even though the data in the tracks may be required to be played simultaneously. This is why some older equipment and software cannot play type1 files. It is necessary to load in the whole file and then sort out the order data is to be sent out. This requires some sort of memory or disk space and the amount of this space will determine the maximum file size which the device can play.

Good Practice

The Standard Midi File format allows a great deal of freedom in the data of the file. This freedom means it is necessary to maintain some good practice in creating files. All kinds of dreadful things can be done in a midi file, and the standard does not prohibit them.

It is particularly desirable to keep tracks self-contained and mutually independent as far as possible. If not, tracks might contain events for more than one channel, or conversely a number of tracks might have events for the same channel. You can easily get events in one track which affect the events in another, for example changes of the instrument ('patch or voice') to be used, or the volume. In fact some events such as tempo changes affect the whole playback, but must necessarily appear in a particular track. After some careless editing tempo changes might end all over the place.

Midi File Types - Conclusion

Try to create or get files of type 1 if possible. If you must convert them to type 0, keep the original type 1 file too.

For a large number of Midi files available on the Internet see:

www.folk-music.org.uk/tunes www.folk-music.org.uk/tunes


ABC

ABC was designed as a means of expressing sheet music in a simple ASCII text file. In fact ABC is really a form of music notation which can be used without need for computers at all. It contains the same sort of information found in sheet music.

As ABC files are formed entirely of text, they are easily readable, and editable using only a simple text editor. The files are very compact and also very portable between platforms, i.e. they do not rely on being processed by any particular kind of computer or operating system. They are well suited to storing tunes, i.e. music consisting of a single note at a time, and being compact are especially good for the Internet.

The use of ABC files is particularly enhanced by the existence of software which can play them, convert them to other forms of music data such as MIDI, and to conventional sheet music notation.

A single file can contain more than one tune and so act as a library of tunes. Most ABC software can deal with this and allow you to select individual tunes for processing.

Example of an ABC file:

X: 1
T:Horse's Branle
M:2/2
L:1/8
Q:250
K:G
G3 A B2 B2|c2 B2 A2 c2|B3 A G2 F2|E4 D4|
G3 A B2 B2|c3 B A2 c2|B2 G2 A2 F2|G4 G4:|
d2 cB A2 B2|c2 BA G2 B2|A2 G2 F2 G2|A4 A2 d2|
d2 cB A2 B2|c2 BA G2 B2|A2 G2 G2 F2|G8:|
K:Dm
B2 AG B2 AG|^F2 G2 A4|D2 E2 ^F2 G2|A2 B2 A2 G2|
B2 AG B2 AG|^F2 G2 A4|D2 E2 ^F2 G2|G2 ^F2 G4:|

Download this file - It can be opened with a text editor such as notepad, or played if you have the software. It's only about 330 bytes!

Download the Midi version

Software for ABC

There are a number of programs for playing and processing ABC files available for various platforms and many are available free or as shareware. See below on this page under Computer Software.

For the P.C. and Windows I can strongly recommend ABC Player by Bernard Chenery and Paul A Messick. It is probably the only ABC software you will need.

ABC Player is available from The ABC Player Home Page

Sources of tunes in ABC format

There are thousands of tunes in ABC format on the Internet including sites in the USA and elsewhere.

There is a search facility for traditional instrumental dance tunes, mainly from the British Isles, i.e. England, Scotland and Ireland, see the following site:

www.folk-music.org.uk/tunes www.folk-music.org.uk/tunes

The ABC home page

by the inventor of ABC, Chris Walshaw at Greenwich University:

http://www.gre.ac.uk/~c.walshaw/abc
Or alternative location:
http://staffweb.cms.gre.ac.uk/~c.walshaw/abc

This site has much information about the format, links to software which can play and convert abc files, and a vast number of sources of abc files.


Comparison of MIDI and ABC formats

Both of these formats convey note data, and use the normal set of notes of western music, as denoted by  letters A to G together with flats and sharps. Both can convey the information which is present in sheet music, and do it in a compact way. ABC is more compact than Midi.

File sizes for both ABC and Midi depend on the number of notes in the music rather than the duration of the tune. I.e. playing a tune at a slower tempo will lengthen the playing time but will not increase the file size.

ABC is oriented towards sheet music. The ability to play ABC files is a later, and incidental development. It is simpler, and has the advantage that no special software is needed to create the file.

Sometimes the greater simplicity of ABC is preferable, especially if the intention is simply to convey the information about the tune as would exist in sheet music. It is especially suitable for single note tunes, i.e. melodies without harmony or chords. The ABC format is capable of handling these things but I think this is too ambitious for the format.

Midi is oriented to producing sound. Its ability to convey sheet music data is not its primary purpose and somewhat limited. It is more sophisticated and has the ability to specify the sound level of each note individually, and can specify a whole continuum of note lengths between the normal note lengths which are depicted in sheet music, i.e. crotchets, quavers etc. It can contain multiple tracks of different voices, including drums. It can also contain 'pitch bend' information. This gives Midi much greater expressiveness which is better suited to producing a file which sounds good when played. However, if the file is required to simply convey information expressible in sheet music, a Midi file might contain a vast amount of unwanted extra data which can be a disadvantage. A file intended to sound good might not produce the sheet music properly. On the other hand, a Midi file is capable of being created which is better suited to depiction as sheet music. If you obtain Midi files from the Internet you might not have much choice about what you get.


Graphics Files

The various graphics file formats can of course be used to depict sheet music. GIF is the most suitable and allows presentation on the web. Use of a graphics file to depict sheet music allows the actual presentation to be defined precisely and non-technical musicians can obtain music without any processing, but graphics is an inefficient way of communicating the data because file sizes are much larger. Also, anything with really special presentation is likely to be subject to copyright.

The following image is an example of a GIF file which was obtained from the Internet.


 

Computer Software

Some selected sound and music related computer software available on the Internet.

CD Extraction software

Programs of this type are for extracting audio data in the form of files from audio CDs and often called 'Rippers'. Audio CDs are in an entirely different format from computer CDs, and although they can usually be played on a CD there may not be a way of reading the data in file form. Rippers are not likely to be needed by anyone with a CD writer and its associated software, but if the PC has only a CD ROM then a Ripper can be used.

CDex

By Albert L Faber.

This program will extract from CDs to WAV or direct to other file formats, e.g. MP3. It will also convert between various formats, notably Wav to MP3.

The program is technically oriented with lots of setting options but is a bit more demanding of the user as a result. It seems to be available entirely free with no restrictions on its use.

CDex is popular an available from a variety of sources such as web sites specializing in shareware, and sometimes on computer magazine CDs. The web site quoted in the application does not seem to be valid. It is http://cdexos.sourceforge.net

Switch

This is primarily portrayed as a sound file conversion program, but Switch can also extract sound files from an audio CD.

Swift Sound Software. www.nch.com.au/switch

WAV Editing Software

This sometimes comes bundled with hardware items such as sound cards.

Cool Edit from Syntrillium is a particularly good independent editing program which allows all kinds of filtering and effects to be done. It was once available in a free version with reduced capability and may still be. See their web site:

www.syntrillium.com


MP3 / WAV Conversion

There are various programs to convert between WAV and MP3. WAV to MP3 is the most useful. This software is likely to be used by people who have a CD writer and associated software. With these, it is normally easy to extract a WAV file from a CD. The WAV to MP3 converter then makes it possible to produce an MP3 file.

The main reason for converting from WAV to MP3 is basically to reduce the file size. The resulting smaller file then makes it possible to store much more music than could be done with WAV files. Typically an MP3 file is about one tenth the size of the corresponding WAV file. The smaller file also makes it possible to put music on a web site without occupying too much web space, but more importantly, allowing realistic download times.

Conversion from MP3 to WAV is much less useful. This is because:

The main desirable attribute of WAV to MP3 conversion software is that it MUST work reliably. One big reason for doing such a conversion is to save disk space, which would involve deleting the orignal WAV file after conversion. If the conversion is incorrect in some way the valuable sound recording could be lost or corrupted irretrievably, and it is time-consuming to check all the results of the conversion every time.

Switch

This is an all-in-one program to convert between WAV, MP3 and other sound file formats. There is an unlicensed basic free version but may have some restrictions. It is straightforward to use. You can add a number of files then leave it to convert the batch.

Switch can also extract sound files from an audio CD.

Swift Sound Software. www.nch.com.au/switch

CDex

This program is presented primarily as a 'ripper' to extract audio from CDs to WAV or direct to other file formats, e.g. MP3, but it will also convert between various formats, notably Wav to MP3.

The program is technically oriented with lots of setting options but is a bit more demanding of the user as a result. It seems to be available entirely free with no restrictions.

By Albert L Faber. http://cdexos.sourceforge.net

MThree

The MThree Development supply WAV / MP3 conversion software as two separate programs depending on the direction of conversion. Their WAV to MP3 converter allows various options for the level of compression. It is available for purchase through their web site. An early version was available free without too much penalty, but the present free version (in 2006) has what I regard as a very nasty resident advertising program which pops up when accessing the web, and I found it even interferes with opening Windows Explorer and its related windows.

www.mthreedev.com


MIDI Software

Some Midi processing software is intended for professional use and available as expensive commercial products such as Cakewalk and Cubase. There are cheaper versions of some of these, with reduced capability and sometimes come bundled with hardware items such as sound cards. Also Midi processing software is available as shareware or demo/trial versions.

Software of this kind can be used to edit and modify existing Midi files. It can also be used to create Midi files from scratch.

The alternative methods of creating a Midi file are all quite difficult. It can be done in 3 basic ways.

Manual data entry is tedious and can take hours to do one tune.

Playing in real time needs skill, even if you play slowly. You must play in step with the tempo the software is set to record at, and if you make a mistake it all goes horribly wrong. Also you must play note lengths accurately or it will affect the resulting sheet music. It is only suitable for a competent keyboard player, and even then might still be difficult.

Playing in step time usually involves playing one note at a time, taking as long as you like over each one. The trouble is, you have to keep specifying note lengths whenever they change, or go back and edit the note lengths later.

Some sort of demo or trial versions of Midi software should be available from the following sites:

Evolution: www.evolution.co.uk

Noteworthy: http://NoteWorthyComposer.com


ABC Processing Software

There is some excellent software for playing and processing ABC files available for various platforms and many are available free or as shareware.

For the P.C. and Windows I can strongly recommend ABC Player by Bernard Chenery and Paul A Messick. There is a link to it at the ABC home page (below) under the name AbcPlay, (the program's filename). The program seems to be provided entirely free without any request for payment, but more importantly, it is easy to use and has powerful features far in excess of what its modest name suggests. In particular it can convert ABC files to MIDI with various options such as tempo, instrument voice, transposition and note velocities. Once such a conversion is done it opens up the powerful editing features of conventional Midi software including viewing and printing the sheet music. ABC Player also includes facilities to extract individual tunes from an ABC archive file (which can contain many tunes), and includes a useful editing facility for the ABC text. It is probably the only ABC software you will need.

ABC Player is available from The ABC Player Home Page

For more ABC software see the abc home page by Chris Walshaw at Greenwich University:

The ABC Home page: http://www.gre.ac.uk/~c.walshaw/abc

This site also has much information about the format and a large number of sources of music in the ABC file format, many having a vast number of tunes available.


Music OCR

OCR is Optical Character Recognition which normally applies to reading of text from a graphics file, and converting it to an editable text file. Music OCR is a version which works with sheet music. The ideal form of output is a Midi file which would then allow the music to be played, and with appropriate software, allow it to be edited, transposed to different keys, played at different tempos and in different instrument voices, and printed.

For some time I have thought a sheet music version of OCR would be desirable, but didn't know of the existence of anything. It is quite a specialist thing. Even ordinary OCR has only recently become affordable. Now there is music OCR.

A big advantage to me is that it allows music to be heard and evaluated from the printed page without having to learn to play it first.

The alternative methods of entering sheet music into a Midi file are all quite difficult and need appropriate music software such as a sequencer or music studio type of application such as Cakewalk. (See above under Midi Software).


SharpEye

This comes in two versions, 1 and 2. I have tried the cheaper one, version 1.

The most important question: Does it work? Well, yes it does!

In some ways it worked surprisingly well. I scanned some old sheet music which had been printed from a hand written original and it performed surprisingly well with this demanding task. In this test there were some errors, often because the printed music was indistinct in some way, but there were also some places where the music looked quite clear, but unaccountably didn't convert properly.

You have to scan the sheet music to a file, either TIF or BMP using separate software. I found I got the best results scanning in grey scale mode and saving to a TIF file. After SharpEye has analysed the graphics file it displays the music on screen. In practice, the majority of the music will be presented correctly, but there may be missing notes, and some notes of incorrect length. Any errors can be corrected using the built-in editor.

Another thing I like about Sharpeye is that it is musically intelligent. Once the time signature is known to the editor, it will recognise and indicate errors where the bar length is incomplete. It allows the key signature to be specified in a conventional way with the correct number and placing of sharps or flats, and allows accidentals to be inserted.

Once the editing is done it is a very simple matter to produce a basic Midi file of the music. It will even put repeats into the Midi file where they are specified in the sheet music.

I have found that SharpEye has never shown any sign of misbehaving. It seems reliable and consistent. Not a hint of the 'this program has performed an illegal operation' type errors. Also it is a nice small file to download, and occupies little hard disk space.

SharpEye 1 and 2, in time-limited versions, and ordering details are available from:

www.visiv.co.uk


Other Music OCR Software

These products are available through normal commercial channels, and generally quite expensive:

Readiris Pro 7

www.irisusa.com/products/companion/neuratron/

PhotoScore 2.05

http://www.neuratron.com/photoscore.htm

SmartScore Professional 2

http://www.musitek.com/

Capella Scan 3.0

http://www.software-partners.co.uk/capella-scan.html

Site with reviews and comparative information

http://www.threeleaf.com/music/music-ocr-reviews.htm

 


 

This site is written by S. J. Farthing, Portsmouth, England. Copyright (c) S. J. Farthing. 2000-2005. All rights reserved.

My personal site and e-mail address are at: www.farthing.me.uk