Hints and tips

Ignored natural signs

Graham F Firth
The hint by Roger Sapolsky in November's AMPLINEX failed to mention that the natural sign (=) is ignored on the first note after every key signature. I notice it mainly when using the Staff Editor.
As he rightly says, the effect can be overcome by putting the key signature after the naturalised note although it makes the music look a bit odd.

Two little utility words

David Westbrook
These are a couple of little utility words that I find useful. The first, "sp", performs a similar function to Roger Cawkwell's "s" in AMPLINEX 002, but is even more labour-saving!
The purpose is to SPOOL a file to extract a word from a program so that you can use it easily in other programs. For example, suppose you want to get a SPOOLed version of some wonderful instrument you've heard in an AMPLINEX issue (yes, I confess I 'borrow' other people's sounds!).
Just enter 'sp' at the command line: you will be prompted for the word you want and the filename to spool it to. The filename will automatically be given an 'S.' directory prefix, to mark it as a SPOOLed rather than SAVEd file. If you don't want that, just remove the 'S.' in line 6. That's it - 'sp' does all the work of opening the file, TYPEing the word and closing the file for you.
To use it, just type in the following and *SPOOL it (easy, since 'sp' will work on itself!). Then *EXEC it into any program you like.
"sp" ["Word to spool: "$OUT $IN
LEN 1 #- $- $12 $2
"""" $12 $+
"""" $+
"Filename: "$OUT $IN
"*SPOOL S."$+ $+
"TYPE" $12 $+
"*SPOOL"$12 $+ $+
]
The other word "del", is used for a "mass deletion" of words. I tend to have programs littered with utility words, unused instruments etc., which I don't need in the final version of a piece. But I get bored with typing "word"DELETE over and over again.
Answer - again, let AMPLE do it for you. Just enter 'del' at the command line and keep on entering word names until you've got rid of all the junk; then press ESCAPE to finish.
"del" ["del"$+
"Word to DELETE: "$OUT $IN
LEN 1 #- $- $12 $2
"""" $12 $+
"""" $+
"DELETE" $12 $+ $+
]
Both of these words demonstrate how you can use "$+" to issue, from within words, commands which can usually only be used at the command line (*SPOOL, DELETE and so on). This technique can be very useful, but it does often need a lot of trial and error to get the order of the assembled string of words right. Hence all the $12 commands to turn them round. Lines 2-4 in both words (beginning 'LEN') are used to add the necessary inverted commas to the word name that you type in.
"del" also shows how you can use this kind of word 'recursively': "del" calls itself, and thus keeps endlessly cycling round a loop until you press ESCAPE. REP(...)REP won't work in this situation (at least as far as I've been able to see) presumably because the assembled string never gets to the command interpreter. Does anyone else know better?

Finding the elusive 'bad bar'

Roger Sapolsky
It is frustating to see the error message "Bad bar in player X" displayed over and over again after you have spent a long time searching for an erroneous time setting hidden within a music part.
Is the word '^;' present in the part? If it is, you will always get the error message, no matter the time settings. Use of a bar length setting (e.g. 48, 4 BAR) prohibits the inclusion of chord rests - AMPLE knows why.
The AMPLE bar-checking facility is useful when applied to complicated music, particularly for those who do not read music fast enough to locate an error by ear at the moment it occurs.
To get round the problem mentioned above, you can simply delete the conflicting semicolons when only a few are present in the score; they can be retyped later after debugging.
Should there be many of them, it is best to enter, say,
"part1z" NAME MAKE
while part1a is displayed, then to delete all semicolons from part1z, check for errors and take a note of them before deleting the dummy part1z.
Errors in part1a can then be eliminated.
When working on part1z, don't forget the chord rests hidden inside words such as
"r" [96,^;]
The semicolon(s) here must also be deleted.

Instrument transfer

Jimmy Ryan
Here is an easy method to transfer an AMPLE word from one program to another without the use of *SPOOL or *EXEC.
For example, to transfer an instrument "instru" from one program "prog1" to another program "prog2", go into Notepad and enter:
"prog1" LOAD
"instru" GET
"prog2" LOAD
MAKE

Testing mixes

Graham F Firth
I find it useful to define the letter 't' as a word to test the music. If you are using multi-mix music then you could define the word 't' as follows:
"t" [ "12345-1234d" PLAY ]
This will play the fourth part, but will go through all the mixes so that the right mix will sound. When this part is OK, you can alter the 't' word to play the next part, and so on.
If you are only using a single mix then you could use part1, etc., for the whole tune, and part1a, etc., just to include the part you want to try. Remember to put SCORE & sig in part1a of course.

The SHIFT command

Tim Sketchley
The SHIFT command is used as part of an instrument definition, and is used to increase or decrease the pitch of one or more channels by an amount specified in sixteenths of a semitone.
For example:
  0 SHIFT - plays the specified pitch
  1 SHIFT - plays 1/16th semitone higher
 -1 SHIFT - plays 1/16th semitone lower
 16 SHIFT - plays a semitone higher
 32 SHIFT - plays a tone higher
192 SHIFT - plays an octave higher
384 SHIFT - plays two octaves higher
Let's start with a straightforward instrument definition:
"shiftins" [2 CHANS
2 CHAN
  128 AMP
 EVERY CHAN
  Bright Flat Long
]
This produces a very ordinary sound. Now let's replace the line 128 AMP with 1 SHIFT 128 AMP. This creates an ensemble effect, as the channels are playing very slightly different pitches.
Experiment with different SHIFT settings using Notepad. You may want to switch off channel 1 using 0 AMP so you can hear what channel 2 is doing. You should discover that although 1/16th semitone is a very small interval, the effect of the two channels playing the two pitches is considerable.
It is worth noting that 192 SHIFT plays an octave higher and this produces a bright and full effect. Also, 193 SHIFT plays an octave plus 1/16th semitone higher and is used in Organ.

Help from the Music 500 User Guide

Roger Cawkwell
There is much useful programming information contained in the Music 500 User Guide. Many of the AMPLE BCE words have the same meaning in AMPLE Nucleus and the Reference section of the Music 500 User Guide is in a similar format (though with less detail) to the new AMPLE Nucleus Programmer Guide.

Getting more volume

Ted Royffe
A simple hint for those who find that, although they can get reasonable output by turning up the volume on their amplifiers, they do not get sufficient output from the preset tape outputs thereon to make decent recordings. The easy way round this is to feed the Music 5000 output into the microphone inputs on the amplifier, if provided. However, in order to avoid distortion from overloading these, it may be necessary to use a simple dual attenuator.
If it is too much trouble to build one, suitable adjustable units made by QED can be purchased from many hi-fi shops. They are obtainable with phono or 5-pin DIN connections, or a combination of the two, and did cost about `9.50.

Symphony keyboard diagram

Graham F Firth
If anyone wants to buy the Music 4000 upgrade but doesn't want to pay for the keyboard as well, I can supply the circuit diagram for the Symphony keyboard.
It is a fairly simple circuit, but not really for the beginner. I modified an LVL Echo keyboard to this circuit and it works fine.

AMPLINEX to Wordwise Plus conversion

David Westbrook
I have developed a little Wordwise Plus segment program that I've found very useful in printing out AMPLINEX text files. The problem with these is that the 40 column format takes up an awful lot of paper if you print them from within AMPLINEX. For those with WORDWISE PLUS, this segment program will convert them to your normal format by stripping out the extra RETURNS and spaces for you. It's not perfect but it leaves you with a minimal amount of further formatting to do before you print the file.
To use it, go into Wordwise, load the segment program into, say, segment 0 and load the AMPLINEX file you want into the normal text area. Then run the segment program (i.e. in edit mode press SHIFT + f0). It prints a message from time to time, just to reassure you that something is happening.
After the reformatting is complete, you will be asked to put in the disc on which you store your usual page formatting "green code" commands (e.g. Paging, Page length, Justification etc.). Change "ampform" in the program to the file name you wish to use for these. If you don't want to load such a file, just remove the lines between 'VDU7' and 'DISPLAY'.

Related program on this disc:
H.WWconv - Wordwise segment program

Published in AMPLINEX 003, January 1988