Hints and tips

Our Hints and Tips section starts with a collection of programming tips from Hybrid Technology Ltd.

Naming of words

It is important to name words clearly, in particular making it clear whether a word is an instrument, score etc. Each character in an AMPLE word name uses only one byte of program space however many times it is used, so long names take up very little memory space.

Offsetting channels

Where two channels are used together, especially with similar waveforms and envelopes, a better sound can result from putting a slight OFFSET (e.g. 200) on one of them. Without this, you can get slight apparently-random changes of tone from note to note.

Ties in chords

A bracketed group of ties, for example (///), has absolutely no effect on the music, and should be left out. A single / is sufficient to extend a chord, e.g.

C(EG)/D(FA)/

The explanation for this is that each note automatically plays until the next note or rest on the same voice; so if nothing appears in a chord for a particular voice, it is, in effect, tied anyway.

Odd numbers of channels

Channels can only be assigned in pairs, and attempting to assign an odd number will give the next highest even number, e.g.

3CHANS

gives 4 channels. To avoid confusion, do not attempt to select an odd number.

Checking for extra numbers

To make sure there is not an unused (extra) number in a word, execute it at the keyboard. If there is a number left unused when it finishes, the 'Extra number' error will be given.

Making common note sequence words

Where a score is largely made up of a few fixed phrases, you can improve the clarity of the program by defining the sequences as words, from which the score is then built. A good example is a 12-bar bass-line:

"bass" [SCORE 12,

bassC bassC bassC bassC

bassG bassG bassC bassC

bassG bassF bassC bassend

]

Transposing Music

Roger Cawkwell

AMPLE has several useful ways of transposing music - it's a pity they can't be used outside the computer! When faced with some fearsome chords in a key like Db or B it can be very hard work just to figure out what's going on.

Obviously the best solution would be a thorough course in the language of music so that the student could freely transpose from/to any key (though this would probably take away the problem of 'difficult' keys anyway).

Short of that may I offer some suggestions (an algorithm, if you like) to more-or-less mechanically transpose from any key into C.

1) Know what key you're transposing from; any 'Rudiments of Music' book (and some manuscript books) will have a list of key signatures.

(E.g. The key signature is 4 flats which is Ab major)

2) Work out on which line or space the 'tonic' (key note) lies.

(E.g. Ab is the second space up in the treble clef)

3) Decide whether you're going to transpose up or down to C and by how many steps.

(E.g. In our imaginary piece most of the notes lie below the Ab so we decide to transpose up two steps to C on the third space)

4) Quite mechanically rewrite the music up (or down) the required number of steps. If there are accidentals (sharps, flats or naturals not in the key signature) you must figure out what they're doing to the pitch of the notes; a sharp makes a note higher, a flat makes it lower and a natural may do either. Raise or lower the transposed note in C with a sharp or flat.

(E.g. You come across a D natural at the bottom of the stave. As the key signature has D flat the natural is raising the note. So the new note F (two steps higher) is made into F sharp.

5) Chord symbols may be transposed in much the same way.

(E.g. Bbmin7 goes up two spaces and becomes Dmin7)

Simple (I hope) though these instructions may seem, they should see you through.

'EVERY;' (and Quick entry chords)

Ken Hughes

Using EVERY; you can re-strike all the notes of a chord with the word X. One use of this would be in playing accompaniment chord patterns. For example the following bar, scored in the normal way

G(CE) G(CE) G(CE) G(CE)

would become, using EVERY;,

G(CE) EVERY; XXX

This can be used to simplify the scoring of chord patterns and can also be used with the Quick entry chords utility in AMPLINEX 005 in the following way:

Make a word, for example

"p" [ EVERY;XXX ]

Then to play two bars each of C, F and G major chords

cMp cMp fMp fMp gMp gMp ^;

can be entered in Notepad. This will work for all patterns that start on the first beat of the bar.

For those that start after the first beat such as:

^ G(CE) ^ G(CE)

the rest must be entered first and each succeeding cMp etc. overlapped into the next bar. For example the six above bars would be scored as:

^ cMp cMp fMp fMp gMp gMp ^;

and the "p" word would be

"p" [ EVERY;^X^ ]

Remember that if you change to a different pattern in your music you should not use the "p" word in the bar before the change, as you would overlap into the first bar of the new pattern. This of course would not apply if your new pattern also started with a rest.

Harmonics

Tim Sketchley

The Studio 5000 uses 14 pre-defined waveforms which I think are very good for general purpose usage, but of course they are limited. I would like to share some clever tricks for getting a little more out of the waveforms.

What we will do is use channel one to play the main sound and channel two to add an extra harmonic.

Let's start with this instrument definition:

"harmins" [2 CHANS

1 CHAN

Round Flat Onoff

2 CHAN

Pure Flat Onoff

192 SHIFT 120 AMP

EVERY CHAN]

This plays the Round waveform using channel one, plus a strong second harmonic through channel two. You can vary the strength of this second harmonic by adjusting the channel two AMP setting.

The basis of this technique is the fact that the Pure waveform consists of a fundamental and some odd harmonics which are so weak that we can ignore them.

It is the 192 SHIFT in this definition which defines the second harmonic. Other SHIFT values can be used for different harmonics:

Harmonic SHIFT

1 0

2 192

3 304

4 384

5 446

6 496

7 539

8 576

9 609

10 638

11 664

12 688

13 710

14 731

15 750

16 768

This table is made using the formula SHIFT = 192 * LOG(Harmonic)/LOG(2).

As another example, the Hard waveform (according to the graph on page 127 of the User Guide) uses only the first 8 harmonics. We can now add the 12th harmonic:

"hard+12" [2 CHANS

1 CHAN

Hard Flat Onoff

2 CHAN

Pure Flat Onoff

688 SHIFT 110 AMP

EVERY CHAN]

As you may have noticed, the AMP setting determines the amplitude or strength of the harmonic.

Of course, it is possible to use a waveform other than Pure on channel two. Here you can experiment to find the different sounds you can get.

For example, the High waveform consists of the 13th and 15th harmonics. By using 20 SHIFT it produces the 14th and 16th harmonics instead, and using -20 SHIFT gives the 12th and 14th.

A sound I particularly like is that produced using Bright with 192 SHIFT:

"brightins" [2 CHANS

1 CHAN

Round Flat Onoff

2 CHAN

Bright Flat Onoff

192 SHIFT 120 AMP

EVERY CHAN]

What happens here is that the Bright waveform covers the first eight harmonics only, but then using 192 SHIFT doubles the frequency of all of them, and so the result is the even-numbered harmonics 2, 4, 6, 8, 10, 12, 14, 16.

These ideas should bring you a stage closer to getting the harmonics you want, but they are of course no substitute for genuine waveform design, for which you'd have to get the Waveform Designer reviewed in AMPLINEX 004, which I think I'll get as soon as I can afford it!

AMPLINEX 80-column print utility

Roy Follett

Those members who find Jim Ryan's splendid 80-column printer utility (AMPLINEX 005) as useful as I do might find the following modification to his program useful.

I wanted a left margin to enable me to punch holes so they would go into a ring binder and changed his program using the following steps:

LOAD "U.print80"

LIST 1210,1250

1231 VDU1,27,1,77 REM Elite typeface

1232 VDU1,27,1,108,1,10 REM Left margin

1233 VDU1,27,1,81,1,90 REM Right margin

SAVE "PRINT80"

This modification is for Epson compatible printers.