Bottom     Previous     Contents

CHAPTER 2
What is Music?

Music has been called a compromise between chaos and monotony and we can easily find examples; of both.
Many musicians are experimenting with computers, not necessarily computers with sound chips, and many computer enthusiasts are exploring the sound capabilities of their micros. Unfortunately, not all computer users are musicians and some may feel that the benefits of studying music do not outweigh the effort required in learning it. If their aim is simply to get more from their micro, they may have a point, although music brings its own pleasure and rewards.
As this is a book about music not written solely for the experienced musician, it would be incomplete without some attempt at explaining the rudiments of music. Complete books have been written on the subject and it would be foolish to try to duplicate their contents in a few pages. However, the desirability of having a reference section built in to the book, and the necessity to lay down at least a few rules to aid those with little prior musical knowledge, prompted this section.
As you are reading this book, you probably have some interest in music. This chapter aims to provide sufficient information for you to take a piece of music and program it into the computer - and to know what you're doing and why you're doing it.

The language of music

Learning music is like learning another language, only easier. If you want to be a concert pianist and can't yet read music you have probably left it too late, but it is never too late to learn music for its own sake - it will bring many hours of pleasure and enjoyment.
One of the problems facing the newcomer to music is the sight of masses of black dots on a page full of lines. They all look the same. If your aim is to take a sheet of music, sit down and play it then you need to study. But, for the purposes of this book, you only need to read about the ideas and principles behind the dots and lines and refer back to this chapter when necessary: it is intended to be a potted reference section rather than an intensive teaching course. If you want to go further and study music, there are dozens of good books available. As with most things, you will find that repeated study leads to a natural memorisation.
We all know what music looks like, even if we can't read it, and you may think that there must be an easier way to represent the ideas behind the notes. In our programs we will not always be referring to conventional music notation but it helps to know what it is and what it represents. You will find musical ideas much easier to follow and it will increase your appreciation of all kinds of musical events. You will also be able to convert written music to program form.
Music is written the way it is because of convention. It is simply the way it developed over the years and the advantage of the system, some say the only advantage, is that it is recognised world-wide. If you have no intention at all of communicating your ideas to others through anything other than a finished performance, there is nothing to prevent you developing your own musical system. There are, in fact, several alternative systems of music notation in use, all supposedly easier to learn: these have not yet achieved widespread use and are therefore limited in their range of effective communication, which is what music is all about.
The two most important items of information we get from a piece of music are the pitch of the note and how long it lasts. We will look at how pitch is represented first.

The pitch of a note

In conventional notation, notes are arranged on a set of five fines called a staff or stave. Pitch is indicated by placing notes on the lines or in the spaces. The higher the note placement, the higher the pitch. The notes are given letter names, A through to G. When you reach G you start again with A, as shown in Figure 2.1.

Figure 2.1

Notes can be placed above and below the fines to extend the range. These notes are written on and between short fines called leger lines which are really just an extension of the stave, as shown in Figure 2.2. The stave could consist of a set of ten or more fines but that would be very confusing and difficult to read. The number of leger fines can be extended as far as you wish but, again, too many make the music difficult to read.
To increase the range of notes still further and maintain readability, from the other, each is given a clef sign which shows the position of the notes in relation to the stave. The two most common clefs, and the only ones we will concern ourselves with here, are the treble or G clef and the bass or F clef, as shown in Figures 2.1 and 2.2. The treble clef loops about the fine which represents G, and the bass clef has two dots which sit either side of the F line.

Figure 2.2

You will see that, as notes on leger fines in the treble clef move down, they correspond to notes on the stave in the bass clef and vice versa. Piano music is normally written on both treble and bass clefs but you will sometimes see two treble clefs, one above the other, or two bass clefs in a similar manner.
If these two clefs are still not enough, you can add a small 8va with a dotted line above notes to be played an octave higher and below notes to be played an octave lower, as shown in Figure 2.3. This should cover all contingencies.

Figure 2.3

The interval in pitch between two similar letters is known as an octave and represents a doubling in pitch or frequency. The interval between a note on a line and a note in a space is either a tone or a semitone. The first program example in Chapter 1 played a series of semitones. Even if you can't yet read music you could probably tell that this was not a 'proper' scale. The following program will play the scale of C starting on middle C.

10 FOR Scale=1 TO 8
20 READ Pitch
30 SOUND1 ,-15,Pitch,10
40 NEXT Scale
50 END
60 DATA 53,61,69,73,81,89,97 ,101

It sounds complete and is more musically satisfying than a sequence of semitones. The notes are read from a DATA statement and you will notice the progression of the intervals: tone, tone, semitone, tone, tone, tone, semitone. This is the sequence of intervals that all major scales follow and is what you would get if you started on middle C on a piano and moved upwards playing the white notes. There are scales other than major scales which we will look at later.
If all this is new to you, don't try too hard to take it all in at once. Just read through the chapter and refer back whenever you wish. Figure 2.4 should help. It displays all this information in relation to a piano keyboard. The note names are shown along with the notes as they would appear on the stave. Also shown are the numbers required by the SOUND command to play a particular pitch. The numbers used by the BBC micro are completely arbitrary and bear no relation to the actual frequency of the notes.
You will see that the notes on the stave have been transposed an octave, so that middle C on the keyboard appears an octave lower than middle C on the stave. The pitches still maintain their relation to each other and we will discuss why we have done this in the next chapter. We will use the octave numbers in Figure 2.4 in our musical notation when entering tunes and they will be of help in transposing music up or down an octave.

Scales

Most musicians can remember practising scales when they began to learn their instrument - most good musicians still practise - but the study of scales seems to carry with it a sense of boredom. Fortunately, we do not have to practise five finger exercises all day, and we really do not need to wade through mounds of musical theory in order to understand scales.
An important property of music, not always obvious at first sight, is the fact that there are really only 12 separate notes in the whole musical spectrum. When you reach the 13th note, the sequence is simply repeated and the notes will sound an octave higher. This shows what octaves sound like and plays the six C notes available from the sound chip:

Figure 2.4

10 FOR Pitch=5 TO 245 STEP 48
20 SOUND1,-15,Pitch,10
30 NEXT Pitch

From the User Guide, page 180, we can see that the intervals in a scale, moving upwards, have the relation: tone, tone, semitone, tone, tone, tone, semitone. This means that we can play any scale at all by selecting a start note and adding those intervals to it. The next program allows you to do exactly that by altering the variable, Note, in line 10. A jump of a semitone is represented on the BBC micro by an increase of four in the pitch parameter of the SOUND statement and an increase in eight gives a jump of a tone.

10 Note=53
20 FOR Pitch=1 TO 8
30 READ Interval
40 Note=Note+Interval
50 SOUND1,- 15,Note,10
60 NEXT Pitch
70 END
80 DATA 0,8,8,4,8,8,8,4

If you alter the variable, Note, to any value other than 53 (C), and calculate the notes resulting from the addition of the intervals, you will realise that every other scale contains at least one black piano key. If you study the piano keyboard, you will realise that this is a consequence of its construction. This means that we need a method of telling the player that the music is not based on the scale of C but on some other scale.
This is done by including a number of sharps (#) or flats (b) at the beginning of the music to form a key signature. They are arranged on the stave in a certain order as shown in Figure 2.5. They tell the musician that each note with the same name as the one upon whose line or space the sharp or flat rests is to be played either a semitone higher (sharp) or a semitone lower (flat) throughout the piece. No sharps or flats indicates that the piece is in the key of C.
For example, if we look at the key of D (with two sharps) we can see that it tells us to play every F and every C a semitone up. By referring to Figure 2.4 we can see that this produces F# and C#. If we play a scale starting on D using these two notes we will move through the intervals required to produce a major scale. In a similar way, the key of F indicates that the B note is to be flattened before playing and this produces a scale of F.

Minor scales

The notes on the keyboard can be arranged into scales other than major scales. Scales provide the basic building blocks from which a tune is constructed and give the music a sense of tonality, or affinity with a certain group of pitches. If we play only on the black notes of a piano, we are using five notes which form a pentatonic (meaning 'five') scale. It sounds very oriental - or what westerners consider to be oriental.
In more common use is the minor scale. Just to complicate matters, there are technically two forms of minor scale - the melodic and the harmonic. Both forms have the same key signature, shown in Figure 2.5, but vary in the way that the actual scales are played.
An upward harmonic scale moves through the following intervals: tone, semitone, tone, tone, semitone, three semitones, semitone. When playing the scale downwards, the same notes are used, as you might expect.
The melodic minor scale is different. When moving upwards the sequence is this: tone, semitone, tone, tone, tone, tone, semitone. When moving downwards the sequence is: tone, tone, semitone, tone, tone, semitone, tone. You really need not be too concerned with this if you are just learning music. You only need to know that it exists and to know that the notes used in a composition can include any combination of any of the above scales.
We will stop before we get too enmeshed in the subject. Other books will supply more detailed explanations; my purpose here is only to make you aware of some of the basics.
When a major and minor key share the same key signature, they are known as relative keys, eg A minor is the relative minor of C major and F minor is the relative minor of A major. In Chapter 12, Program 12.3 prints key signatures along with their relative major and minor kevs.
The scales of C major and C minor are illustrated later in this chapter in Figure 2.11, so you can compare the notes in the scales with the notes - used to construct various chords.
Other scales exist. These contain various numbers of notes and various intervals, but most of them are written using the standard notation we are discussing and will probably only come to fight, if at all, during an academic discussion of musical theory.

Enharmonics

For the sake of completeness, it is necessary to add that the same note can have two names, eg Ab is the same note as G# because a flattened A produces the same pitch as a sharpened G. Likewise, Eb is the same note as D#. These notes are known as enharmonics. This simply means that they sound the same. Musically, if you are playing in a key with flats in the key signature, you will normally refer to and write notes as flats. Conversely for sharps.

Accidentals

It may have occurred to you that while playing in one key you may want to play a note which is not a part of that key. This is done by placing a sharp or flat sign immediately before the note to be altered. The change in pitch refers only to that particular note, not notes an octave up or down, and the change lasts only for the remainder of the bar. If a note has been sharpened or flattened by the key signature, or by a sharp or flat as just described, and you want to naturalise it, you use a natural sign ( ) which, again, applies only to that note and for the duration of that bar. Used in this way, these signs are known as accidentals.

The length of a note

This section is concerned with the timing of music. There are two aspects involved which should not be confused: the first is the duration of individual notes and the second is the tempo or speed of a piece of music.
The duration of an individual note is relative only to the other notes in a piece and in no way does it determine the speed or tempo of the music. The duration of notes in standard musical notation is shown in Figure 2.6 along with their British and American names. The American names are easier to understand immediately and seem to be attracting numerous converts from the British system.

Figure 2.6

NOTATON ENGLISH NAME AMERICAN NAME DURATION VALUE
SEMIBREVE WHOLE NOTE 32
DOTTED MINIM DOTTED HALF NOTE 24
MINIM HALF NOTE 16
DOTTED CROTCHET DOTTED QUARTER NOTE 12
CROTCHET QUARTER NOTE 8
DOTTED QUAVER DOTTED EIGHTH NOTE 6
QUAVER EIGHTH NOTE 4
SEMIQUAVER SIXTEENTH NOTE 2
DEMI-SEMIQUAVER THIRTYSECOND NOTE 1

The duration value shows how long each note sounds in relation to any other. If a note has a dot placed after it, this lengthens its duration by one half. The tempo of a piece is determined by an instruction given at the beginning of the music and, although fast pieces will often contain semiquavers and demi-semiquavers, you cannot absolutely determine the speed of a piece by just looking at the notation.
Rests play an important part in music too, and rest values are shown in Figure 2.7. They go by the same name as their note equivalent with 'rest' tagged on the end, eg quaver rest. These can be increased in length by one half by the addition of a dot but it is more usual to see a rest of the equivalent half value placed after the other.

Figure 2.7

NOTATION DURATION VALUE
32
16
8
4
2
1

Beats in the bar

The time signature of a piece of music is indicated at the beginning of the stave by two numbers, one over the other. The upper figure denotes the number of 'beats in a bar' and the lower figure denotes the length of each beat. For example, a time signature of 2/4 tells us that there are two beats to the bar, each made up of a quarter note or crotchet. 3/4 is three beats to the bar, each a crotchet, and is the time signature in which most waltzes are written. 4/4 is sometimes written just as a large C and referred to as Common Time, and is by far the most common time signature of all encompassing quicksteps, foxtrots, rock 'n' roll, ballads and most classical music. The upper figure indicates the pulse or rhythm which runs through the music.

Figure 2.8

Time signatures can be altered at any point in the music and, indeed, can consist of any combination of notes the composer wishes to use. A selection of time signatures is shown in Figure 2.8 along with various note values which could be used to fill a bar. In practice, you will rarely come.: across anything more exotic except perhaps in jazz or avant-garde music.

Triplets, ties, slurs and staccato

These are aspects of music you may well see and they are worth explaining.
A triplet is a grouping of three notes as shown in Figure 2.9 and they are played in the same time as two notes of the same value. If you want to try playing the rhythm, tap two with your left hand and six with your right. That's easy. Now try tapping four with your left hand and six with your fight. Not so easy. Triplets are not so straightforward to play on the computer either, but at least it's a question of programming, not coordination.

Figure 2.9

The tie is a curved line which 'ties' two notes together as shown in Figure 2.10. It means that the time value of the second note, and any further tied notes, is added to the first, and all of them are played as one long note. This is most often used when a composer wants a note to sound for more than one bar, but it can be found within a bar to join notes of odd time values.


Note that the tie can only join notes of the same pitch. If you see similar looking fines which seem to join notes of different pitches, these are slurs and are used to indicated that the two notes should be played as smoothly as possible.
The opposite of slur is staccato. This is a dot placed above a note, and indicates that it is to be played in a quick, sharp manner and does not have to sound for its full written duration value.

Harmony and chords

Harmony refers to tones sounding simultaneously (as opposed to tones sounding consecutively, which would be called a melody).
Even if we restrict ourselves to a single octave, we have 13 notes which can be combined in various ways to create thousands of harmonies, most of which would be quite unmusical. Restricting ourselves to sounding only three or four notes at once still produces a lot of combinations. Over the years, certain combinations of intervals have proven useful in composition and for providing a background to a melody. These combinations are known as chords and provide a fairly easy way of adding harmony to a melody. A chord is generally accepted to be a combination of three or more notes which means that we will not be able to produce very complicated harmonies on the BBC micro.
A chord is built up by a sequence of intervals, much like a scale, except that the notes in a chord can be played together without sounding too unmusical. The most common chord is the major chord, which is built up from a root note from which the chord takes its name.
To construct a C major chord, we add an interval of a third and an interval of a fifth to the C note. These intervals are reckoned in note names, counted from the root note and in the key of the root note. To arrive at an interval of a third in the key of C, begin on C, count that as one and move up the scale until you reach three. This is E. The interval of a fifth is found in the same way, again counting from the root note. This will bring you to G. Work this out on the keyboard in Figure 2.4.
To produce a minor chord, the third interval is flattened, ie taken down a semitone. This produces a 'sad' sound as opposed to the quite bright effect of a major chord.
Many chords are named according to their construction and names are given in terms of flattened, augmented (sharpened) and added intervals. That .is exactly how they are constructed, eg. by flattening the fifth or by adding a ninth. Some examples are given in Figure 2.11.

Figure 2.11

Chords are useful for all manner of musical things and we will be experimenting with them later in the book. Meanwhile, if you want to hear what different chords sound like, try the following program:

10 REM PROGRAM 2.1

20 REM Chord Sound Demonstration

30

40 CLS

50 PRINT'''

60

70 FOR Chord=1 TO 4

80 READ Chord$,Notes$,Pitch1,Pitch2

90 PRINT"C ";Chord$;"=C + "Notes$'

100 SOUND&201,-12,53,60

110 SOUND&202,-12,Pitch1,60

120 SOUND&203,-12,Pitch2,60

130 PROCDelay(300)

140 NEXT Chord

150

160 REM Chords with 4 Notes

170 FOR Arp=1 TO 5

180 READ Chord$,Notes$

190 PRINT"C ";Chord$;" (Arpeggio)=C +

"Notes$'

200 FOR Note=1 TO 17

210 READ Pitch

220 SOUND1,-15,Pitch,3

230 NEXT Note

240 PROCDelay(200)

250 NEXT Arp

260 END

270

280 DEF PROCDelay(Time)

290 TIME=0:REPEAT UNTIL TIME>Time

300 ENDPROC

310

320 DATA Major,E + G,69,81

330 DATA Minor,Eb + G,65,81

340 DATA Augmented,E + G#,69,85

350 DATA Suspended 4th,F + G,73,81

360 DATA Diminished,Eb + Gb + A,53,65,

77,89,101,113,125,137,149,137,125,113,10

1,89,77,65,53

370 DATA 7th,E + G + Bb,53,69,81,93,10

1,117,129,141,149,141,129,117,101,93,81,

69,53

380 DATA Major 7th,E + G + B,53,69,81,

97,101,117,129,145,149,145,129,117,101,9

7,81,69,53

390 DATA Major Sixth,E + G + A,53,69,8

1,89,101,117,129,137,149,137,129,117,101

,89,81,69,53

400 DATA Minor Sixth,Eb + G + A,53,65,

81,89,101,113,129,137,149,137,129,113,10

1,89,81,65,53

As we cannot sound more than three channels together (not including the noise channel), chords containing more than three notes are played as arpeggios and carry with them an implied harmony. An arpeggio is when the notes of a chord are played in rapid succession as opposed to all at once.
There are many types of chords but the basic construction principles remain the same.
Now, armed with the knowledge of these last two chapters, we will see how it relates to the BBC micro.


Next     Top