Showing posts with label Hints and tips. Show all posts
Showing posts with label Hints and tips. Show all posts

Hints and tips

Check your hi-fi

David J Barton
I work for a builders/decorators merchant and help customers with the selection of paint colour quite often. Whilst helping a customer recently I advised her that her tinted spectacles were giving a distorted rendition of the colour cards. Thinking about this later I realized that many of us may be listening to our Music 5000s through hi-fis with tone controls colouring the sound.
Before sending off your latest composition to AMPLINEX try listening to it without the bass boost, etc. It makes quite a difference.

Clearing unwanted data

Lol Taylor
I have noticed, on going through some of my old files, that since having the AMPLE Toolbox software I have saved unnecessary data with them. This can be checked using 'MEM' immediately after a file is LOADed. If data is shown, typing 'CLEAR' in command mode will get rid of it. Occasionally it may be necessary to call up the offending editor, where it should appear on the screen, and 'CLEAR' it there.

Chord echoes

I L Hubbard
'Echo' only gives multiple echoes of single voices. My version of 'echo' gives single echoes of multiple voices, i.e. chords.
My 'echo' is used in the same way as 'Echo' - that is, '9 4 echo' gives a delay of 9 ticks with voices 1 to 4 echoed on voices 5 to 8. 'OFF echo' turns it off. The delay range is 0 to 255 and the voices range is 1 to 6.
Two player-dependant variables are needed to hold the delay and voices parameters.
"&delay"  [ PNUM4DIM#+ ]
"&voices" [ PNUM4DIM#+ ]
The 'echo' word needed is as follows.
"echo" [#11 0#>IF(
&voices#B! &delay#B! 20
)IF
ACT(
 ACT 5FVAR#? #11 0#>
 IF(&voices#B? #+VOICE!
  0 &delay#B? #11 7FVAR#? #-DURATION
  ACT #-DURATION
 )ELSE(#2)IF
)ACT
]

Published in AMPLINEX 028, September 1992

Hints and tips

Turning AMPLE hints into MIDI

Roger Sapolsky
MIDI users interested in a particular tip found in an AMPLINEX issue may be disappointed when they discover that it doesn't work in a MIDI environment. Let's take, for example, the case of the words 'swell' and 'fade' discussed in two articles by Neil Walker and Ted Kirk (AMPLINEX 021 and 022 Hints and Tips).
Suppose you wish to sustain the note C for a duration of 24 quavers, and also increase its sound level over the corresponding lapse of time. First enter the words.
"x" [ GVAR ]
and
"y" [ 7 MIDICONTROL ]
Then insert the instruction which follows:
24, 10y C 10x #!
23 FOR( x #? y / 4 x #+! )FOR ^
10 is the start level, 4 in the parentheses being the increment added at each pass in the FOR(...)FOR instruction following the first pass which uses the start level. The final level will thus be 10+22*4=98 in the example given.
The instruction given is also valid for a 'fade'. In this case, use a high start level, say 100 instead of 10 (127 being the maximum), and put a minus sign before the increment, hence the final value 100-22*4=12. Try -5 instead of -4: the level abruptly increases when the total becomes negative.
Let's have a look now at the article by Alan Minns (AMPLINEX 022), where he tells us how to eliminate the redundant note sounded in a re-struck 3-note chord coming after a 4-note chord. In this case, the words
"n" [ 4 VOICE 128 VOL ]
"o" [ 4 VOICE 0 VOL ]
are also ignored when used in a MIDI piece.
Substitutes are in this case:
"n" [
N SHARE 4 VOICES MIDIV
nn MIDICHANNEL
mm MIDIPROGRAM ]
"o" [ 4 VOICE UNUSED ]
Should the first chord following SCORE include 3 notes, precede it with 'o' if it is repeated, to avoid the redundant note (for obscure reasons, this note sounds an octave higher or lower than the first note included in the chord).

Published in AMPLINEX 027, July 1992

Hints and tips

Compiling large programs

Bo Hanson
A problem I have often come across is the '! No room' error while using the AMPLE Toolbox compiler with very large programs.
After finishing a tune and adding a title screen and a page or two of 'info' (blurb, waffle etc), there is sufficient memory for the program to run but not enough for the compiler to work, even after deleting all unnecessary modules and words and compacting the program. A full screen title page takes about 1.1K and the compiler needs about 2.2K workspace to knock this down to 0.9K. This may not seem a big saving, but 2K or more can be removed from a large program of 10K or more and this could be enough for the Mixing Desk module to be used. The method below describes how to get around the '! No room' problem. It works, although it is a bit messy.
It is necessary to save the complete song to disc (just in case!), then to split the program into two parts: all the words that are concerned with the music itself in one part and the fancy bits in the other.
*SPOOL the title page(s), info page(s) and RUN to a separate file on disc. Any words that are used by these words must also be included.
For example, if you have two 'info' words, a word to wait for a key press between the 'info' screens, and a title screen word:
"RUN" [ 12#OUT title
"123etc-abc-etc"PLAY ]
"info" [ %blurb...
rtn info2 ]
"info2" [ %more blurb... ]
"title" [ "title information"$OUTNL ]
"rtn" [ REP(#IN13#=)UNTIL()REP ]
These will need to be *SPOOLed to the new file taking care that words which are used in other words are done first (so that they are found when read back in). For example,
*SPOOL newfile
"rtn" TYPE
...
"info2" TYPE
...
"info" TYPE
...
"title" TYPE
...
"RUN" TYPE
...
*SPOOL
After these words have been *SPOOLed, they should be DELETEd from the program:
"RUN" DELETE
"title" DELETE
"info" DELETE
"info2" DELETE
"rtn" DELETE
leaving just the music score, mix(es) and instruments in full.
These are then compiled and *SPOOLed to yet another file on disc:
*SPOOL newfile2
WRITE
...
*SPOOL
Type NEW and *EXEC the file with the title, RUN and info words and then compile these too. Then, the file with the compiled music words can be *EXECed back to give a complete compiled program.
The reason I use *SPOOL and *EXEC rather than using the AMPLE Toolbox MERGE facility is that MERGE will duplicate any existing word names which can create untold hassles when trying to DELETE the unwanted definition of two. Using *SPOOL and *EXEC does away with this problem. Also, it is the easiest way to save just part of a program.
Finally, save the compiled program (I prefix my compiled filenames with a 'C.') and delete the two part files from the disc.
Happy compiling and many saved returns!

Using the Recorder over MIDI

Bernie Dawson
1) The Music 2000 manual does not seem to state that the Recorder works over MIDI provided you put 9 in front of the section letter you allocate.
2) When using MIDI instruments and the Recorder you sometimes want the part you are practising to sound louder than the backing you may have already built up. A convenient way of doing this is to put xxx VEL on the instrument line where xxx is a number up to 127.

Published in AMPLINEX 026, May 1992

Hints and tips

Printing AMPLINEX disc catalogues

Leslie Gardener
I look forward eagerly to the arrival of each new AMPLINEX issue and never fail to learn a thing or two. As soon as each disc arrives I print out a list of contents, then systematically listen to the music and mark it on a scale of one to ten. That saves my time by reminding me that some items are not worth another hearing. The average mark is 7 or 8 but there are some for which zero seems a bit on the generous side.
Perhaps some members do not realise how easy it is to print out the catalogue of a disc using Wordwise Plus 2 (and almost certainly the original Wordwise and Wordwise Plus). Only four keystrokes are required:
f1 * . f2
Use option 7 to see the result on screen or option 6 to print it out.
This works equally for DFS and ADFS directory structures.

Printing graphics above a menu

Kevin Doyle
The MENUDISP command, which displays the lines in a menu, not only starts at the top of the screen, but also clears any blank lines in the menu preventing the display of graphics or other non-menu text above the menu options.
To get round this add the graphics after the menu has printed (by moving the cursor back to the top of the screen) but before the MENU command.
An example is shown below:
"ex" [
7 MODE MENUDISP
%
%
%
% menu option printed by MENUDISP%ex 30 #OUT DISPLAY
% menu title printed by DISPLAY
145 #OUT SP SP SP SP
"££££££/,,,,,|ppppp|,,,,,/££££££"$OUT
NL
MENU
]

Published in AMPLINEX 025, March 1992

Hints and tips

Using numbers as AMPLE words

Ken Hughes
It is a fairly well-known fact that the letters A to G should not be used as words in AMPLE as they cause errors. Numbers used as word names will also cause an error to occur if the number used appears in any other part of the program. For instance, if '1' is used as a word name and a part contains the instruction '10 FOR(' an error will occur when the program is run.

MIDI volume via 'mvol'

Roger Sapolsky
'mvol' - the word which made a dream come true. I was writing a contribution dealing with a word I had recently discovered, when I found in AMPLINEX 022 (Hints and Tips) that G Adams had beaten me to it. He covered the essential definition of 'mvol', but the few comments which follow may be of interest for MIDI users.
In fact, 'mvol' is a powerful word which reads correctly not only the '=L' instruction, but also all of the AMPLE instructions '+L', 'L', the accents etc. What's more, it also works perfectly with percussion instruments, a happy surprise: at last, accents, crescendos, etc. can be used in a drum (or music) part, allowing the light and shade without which there is no good music.
If the percussion part has the form
SCORE mvol 70=L 16, w(u) // w(zu)...
the setting will affect all of the instruments called by w, u and z. The resulting balance of levels will generally be acceptable. However, different settings can be given to one or several instruments. If you happen to run programs where percussion levels are set by exclusive messages, 'mvol' may not be able to provide the expected settings.
I use a simple program in which the twelve rhythm instruments most frequently selected have their default level 100 reset by as many exclusive messages, pending the day when I will have eliminated all the messages present in dozens of my MIDI programmes. I wish G Adams (or myself) had unearthed the indispensable 'mvol' much sooner. Still better, Hybrid should have inserted it in the Music 2000 User Guide, in preference to its much less interesting parent word 'levcont'.
Although I did not originally include the operators 2#* 1#- in 'mvol' as G Adams did, I eventually cribbed the idea after finding that it is convenient for making a music part work nicely in both MIDI and non-MIDI programs from the point of view of levels. Levels are first entered normally (0-64) in the Music 5000 part, then 'mvol' is added after SCORE in the MIDI part.

Related file on this disc:
$.Adagio - This example program to demonstrate the use of the 'mvol' word can be found in the Music section.

Published in AMPLINEX 024, January 1992

Hints and tips

More on the 'fade' word

Neil Walker
I was happy to see that Ted Kirk had found a use for my 'fade' and 'swell' words (published in Hints and Tips AMPLINEX 021). Ted's suggestion (Hints and Tips AMPLINEX 022) on the use of the words is fine - it will give a drop in volume on a different curve to the original word and down to a lower level. Perhaps my explanation was not as clear as it should have been - so may I explain how the words came about, which might help clarify things.
During the programming of 'Funny Valentine' (Music AMPLINEX 021) I realised that the result was going to fall short of what was needed. It sounded rather clinical: there was no way of controlling a single note once it was started, all control being in the hands of the amplitude and pitch envelopes.
The two words were an attempt to resolve this problem, to enable a point to be chosen, during a note, to start variations in the volume level up and down rather like a dynamic amplitude envelope imposed on top of the system amplitude envelope.
I tried it out on a short piece of music and found that the words work. However, they are a right pain to use, needing careful working out of note lengths, how much you want the volume to drop or rise, and need constant resetting of ','. So they did not get used in 'Valentine' - I had enough problems trying to recognise the notes working from a record. It is a gift I don't have and took me ages.
However the words do demonstrate that it is possible to get some dynamics into a note at your chosen point. As with many AMPLE words they may be modified to do what you want.
The first version of the 'fade' word was:
"fade" [
FOR( 128 COUNT #- v1 /) FOR
% or 127 COUNT if it suits
]
which when called with
2, C 23 fade
reduces the volume level by 23.
Each time round the loop the volume is reduced by the value of COUNT - in this case reducing the volume by 23 over a note of 48. That is, there are 23 holds of length 2, making (including the C) a total note length of 48. The maximum for this note length would be with a setting of '1,' and, starting immediately after striking the note, 47 holds - giving a reduction of 47.
This works quite well but, for more controlled use, another number was introduced to give a choice of adding an offset to COUNT. This may, as Ted suggests, be multiplied with COUNT (or divided or subtracted or used with INDEX) to get the effect you might be after - it depends on the result YOU want. If the number is 0 the word acts as the one shown above.
I was thus incorrect in saying the number was the amount the volume is reduced, as COUNT needs to be taken into consideration - sorry.
The actual sound is very dependent on the tempo: with a long slow note a lot can be done; in faster pieces the effect can be as Ted found - the note rapidly drops down to a lower value. This, though useful, can be a difficulty - juggling the amount you want to drop in the time available for the note. The real time that the note is sounding needs to be considered: notes that lasts a fraction of a second are best dealt with by the system words.
The following four words are another variation on the same theme. The additional word 'vol' keeps track of the current volume setting, and the original ',' setting is restored after use. The '/' is set to 2, though this may be altered.
"v1" [#11 vol#! 1VOICE VOL]
"vol" [GVAR]
"fade" [
0 MVAL? FRAME
2 FVAR#? 8FVAR#!
2 % ',' setting - may be changed
2FVAR#!
MVAL!
#12 #212 #12 #* 2#/ #2
#213 #12
FOR( #11 vol#? #12 #- v1 / )FOR
#2 ,

% Takes 2 numbers: amount taken from
% VOL (remembering COUNT)
% on each hold and number of holds
% timed on last ',' setting.
% Restores ',' to last value.
]
"swell" [
0 MVAL? FRAME
2 FVAR#? 8FVAR#!
2 % ',' setting - may be changed
2FVAR#!
MVAL!
#12 #212 #12 #* 2#/ #2
#213 #12
FOR( #11 vol#? #12 #+ v1 / )FOR
#2 ,

% Takes 2 numbers: amount added to
% VOL (remembering COUNT)
% on each hold and number of holds
% timed on last ',' setting.
% Restores ',' to last value.
]
It is interesting to note that it is possible to re-define a waveform in the Music 5000 synthesiser after the note has started playing - giving another means of getting some expression - though it can be difficult to handle.

Exclusive MIDI messages

Roger Sapolsky
In a couple of recent contributions to AMPLINEX I have suggested use of exclusive MIDI messages. However, in a music piece where such messages are sent simultaneously, or nearly simultaneously, by two or more players, the MIDI system may not be able to cope. This is likely to be evidenced by a humming noise, which can only be stopped by switching off the MIDI system.
To avoid this, all exclusive messages included in a program should be spaced out in time.

Published in AMPLINEX 023, November 1991

Hints and tips

Saving space with VOL, VOICE and X

Alan Minns
At one point in reading through AMPLINEX 021, my face assumed a somewhat rosy hue! The error in the use of ';' instead of 'VOICE' in the note on Mixing Desk faders was an unfortunate slip and I am grateful to Hybrid Technology for correcting my mistake.
It so happens that AMPLINEX 020 included both that note and my arrangement of the Widor Toccata in which this same idea was used as part of a memory-saving technique. It is of use with any pattern of repeated chords and, in the case of the Widor, reduced the program length by more than 1000 bytes.
As an example, take the fragment:
B(+fdc) B(+fdc) ^(^^^)
B(+fdc) g(db^) g(db)
We can define the two words:
"q" [ ^(^^^) ]
"x" [ ON; X 1; ]
where 'q' is a chord rest and 'x' re-strikes every note.
Then the example becomes:
B(+fdc) x q
x g(db^) x
But, if this is tried out, there is an obvious discord. It is an unfortunate feature of AMPLE that 'X' re-strikes the last note on that voice, and a rest is not a note! What happens is that on the last chord in the example, the notes which sound are the required 'g', 'd' and 'b' plus the 'c' from the last 4-note chord.
The solution is to define two further words:
"n" [ 4 VOICE 128 VOL ]
"o" [ 4 VOICE 0 VOL ]
where 'n' (on) and 'o' (off) are used to switch the 4th voice so that it makes no audible effect. Thus:
B(+fdc) x q
x g(db^) o x
n % ready for next 4-note chord

Changing volume – correction

Ted Kirk
Many thanks to Neil Walker for 'fade' and 'swell' (AMPLINEX 021 Hints and Tips): I have always wanted these and wondered why they were not system words, but am much too stupid to have written them myself. Unfortunately, there seems to be a mistake in 'fade': it drops the level once and then holds it. I think the #+ must be a misprint for #*, giving:
"fade" [
FOR( #11 COUNT #* 128 #12 #-
v1 / )FOR #2
]
As these words fade and swell the note 'stepwise', to get a smooth fade or swell you have to use a short hold value and small increments. E.g.
0: 48, C E 6, G 2 48 fade
fades from 128 to 32 over 6 crotchets.

MIDI volume

G Adams
On the subject of MIDI volume control, on page 53 of the Music 2000 User Guide the 'levcont' word reads the '=L' dynamic level from parts and converts the values to controller 1 MIDICONTROL (modulation). It can be made to control MIDI volume thus:
"mvol" [
30 ACT( 3 FVAR #? VOICE
4 FVAR #? 2#* 1#-
% gives 127 from 64=L
7 MIDICONTROL % MIDI
volume
ACT )ACT
]
To use, put after SCORE in each part and set '=L' as normal:
"part1a" [ SCORE mvol 30=L music ]
This does not take into account the AMPLE VOL command. Someone more adept may be able to give a more comprehensive solution.

The PAGE, OSHWM distinction

Alan Minns
I was interested to read Allan Gardner's comments (AMPLINEX 021 Hints and Tips) on the background to his work on the C.PREPARE modification and accept his comments on the equivalence of PAGE and OSHWM in that context. He points out that BASIC is in command when */C.PREPARE is invoked although, of course, when PREPARE is running it is the DFS which is in charge! This is ensured by having *BASIC as the first line in the standard Music 5000 !BOOT file.
But that first line is superfluous - it may be removed or it may be replaced by *AMPLE or even *ARIES if the Aries board is present. In such a case the system will start up and run quite happily even if the BASIC ROM is removed from the machine.
However, let me remain pedantic and point out the difference between the two and how that difference can be put to good use in certain cases.
System initialisation on switch-on or following a Break involves a large number of operations amongst which is the setting of OSHWM to &E00 plus the amount of static, and of private, workspace requested by the paged ROMs. In the case of the humble BBC Model B with DFS only, there are 9 pages of static, and a further 2 pages of private, workspace allocated to the filing system! OSHWM is thus raised to &1900.
At the end of the initialisation, the final task is to enter the BASIC ROM, if present, or the highest priority ROM which has a language entry. Note, however, that in the case of a soft Break the language entered is that which was active before the Break.
If the BASIC ROM is entered, it performs its own initialisation and sets PAGE equal to OSHWM.
Thereafter, these values may be altered quite independently and will only be changed by a Break, or a *BASIC command (since this command initialises the BASIC ROM, PAGE is therefore set to the current value of OSHWM).
We are warned in the manuals that operations such as *COPY, *BACKUP or *COMPACT will corrupt the program stored in memory. True - but if we are careful, damage to a program can be avoided.
The DFS is language-independent and, for operations such as *COMPACT, uses the value of OSHWM as the start of its buffer space. A BASIC program resides between the values of PAGE and TOP. So if we set OSHWM to the page boundary above TOP using *FX 180, disc operations may be carried out with impunity (although, for example, a *BACKUP will take a little longer and require more passes due to the reduced size of memory which it is allowed to use).
On the BBC Model B, ?&244=<x> (where <x> is the required page value) is the illegal equivalent of the *FX 180 call. In either case, *FX 20 restores the original value unless the font is exploded (as is the case with the Staff editor characters) in which case *FX20,2 works instead.
Within the Music 5000 environment, in my system at least, the AMPLE command:
&4D7 #? &NOUT
will print the hex value of the module requirement list at the end of a program. Since this is within a few bytes of the true end of the program, setting OSHWM to the next higher page value plus one is safe.

Published in AMPLINEX 022, July 1991

Hints and tips

Further notes on 'C.PREPARE'

Allan Gardner
In AMPLINEX 020 Alan Minns showed how Aries Shadow RAM could be utilized without the need to modify the C.PREPARE routine, and for this information I wholeheartedly applaud his method of cracking the problem.
I thought, however, that I could provide some background to the method which I used.
It was late 1986 that I got the Aries B32 (having been told that the Watford Shadow RAM I already had was not compatible with the Hybrid Music System software).
I soon learnt that the Aries board, although compatible, was not being used efficiently.
A study of the Music 5000 User Guide was of little use in solving this problem, and the R, S and K parameters of the C.PREPARE were not explained.
I ended up using a memory editor/disassembler on the PREPARE file and using the extremely limited knowledge that I had at the time of the BBC's internals I managed to find the right 'bits' of the code to alter to get the thing to work more efficiently - and I have not had any real need to change it since.
The method Alan Minns uses to set the Aries static workspace to page &13 necessitates having the link removed from the Aries board - which I would find much less convenient than pressing the Break key once during start up.
One further point, on my use of the term 'PAGE'. Whilst it could be argued that the term OSHWM is more correct I don't think there was any confusion over the meaning intended. Also, even though PAGE has no meaning outside of the BASIC environment, when C.PREPARE is invoked the active language is indeed BASIC, and criticism of the use of this word would seem to be merely pedantic.
One final thought on the subject: in my opinion none of the problems discussed here should ever have existed in the first place. After all, Chris Jordan was the leading light in Aries Computers before forming Hybrid Technology. So we might have expected the two pieces of technology to be perfectly compatible, or at the very least that sufficient information should have been given in the User Guide to make them so.

Changing volume

Neil Walker
Following recent comments about the VOL word, the following 'fade' and 'swell' words may be of interest.
Working through the 'v1' word they will allow volume changes within a note duration.
'fade' fades the volume of a selected voice:
"v1" [ 1 VOICE VOL ]
"fade" [ FOR( #11 COUNT #+ 128 #12 #-
v1 / )FOR #2 ]
'v1' selects a voice - here it is set for 1 VOICE. '128 v1' gives 128 VOL on VOICE 1.
'fade' takes 2 numbers:
- The first is the number of units by which the volume is reduced for each hold (starting from 128)
- The second number defines the number of holds. (If bar length is important, arrange with a ',' setting).
For example:
0:CeGfc 5 16 fade
will produce a 16*5 = 80 reduction in the VOL setting for voice 1 giving 128-80 = 48 as the final value.
'swell' increases the volume of a selected voice:
"v1" [ 1 VOICE VOL ]
"swell" [ #213 #11 v1 #12 FOR( #212
#+ #11 v1 /)FOR #2#2 ]
'swell' takes 3 numbers:
- The first number is the starting volume
- The second number is the number of units by which the volume is increased for each hold (to a maximum of 128). Note: 0 doesn't work
- The third number defines the number of holds. (If bar length is important, arrange with a ',' setting).
For example:
100 #11 v1 0:CEGfc 7 4 swell ^
Before striking a note, set and retain the volume with '#11 v1' as shown above. Use '+L' word to keep the level unchanged at this point (can be done at any previous convenient time).
The 'v1' word could be changed to take 2 numbers, for VOICE and VOL, and/or CHAN rather than VOICE. Try it.

Soloist in trouble

Roger Sapolsky
Suppose you have a music program including a RUN word with a PLAY string such as:
"1234-1abc"
where player 1, owning one or several voices, is the soloist. At a later date, having acquired a MIDI system and Music 2000 MIDI interface, you decide to extend the piece with some new parts to be played by a MIDI instrument.
Logically, the new RUN word will be something like
"12345-19abcdef"
with new words 'part5d', 'part5e' and 'part5f' containing the new MIDI scores. 'part5a', 'part5b' and 'part5c', will be 'empty' (containing an appropriate number of rests). Parts d, e and f on players 2, 3 and 4 just duplicate parts a, b, c.
Well, contrary to all expectations, hiccups interrupt player 5 while it is playing 'part5d' - then the computer hangs up.
After fiddling with the score, I eventually found that the trouble was due to the absence of the 'empty' parts 'part1d', 'part1e' and 'part1f'. Although player 1 is idle after the completion of 'part1c' (and even if the instruction 'UNUSED' has been entered at the end of 'part1c') the system 'expects' player 1's music parts, failing which it stops.
In a AMPLE program, the hitch just described is unlikely, since player1 will probably be given the task of playing the new part after changing the instrument. However, I have found that the hitch is exactly the same when a player 5 is added to 'mix1' to play parts d, e and f.

Easier spooling

Neil Walker
There are some useful words in earlier AMPLINEX issues. 'sp' by David Westbrook (AMPLINEX 003) solves all spooling problems, and I have combined it here with the SHOW word.
"sp" [ "SHOW NL sp1" $+ ]
"sp1" [ 134#OUT
"Word to Spool: "$OUT $IN
LEN1 #- $- $12
$2 """" $12 $+ """" $+
131#OUT "Filename: " $OUT $IN
"*Spool S." $+ $+ "TYPE" $12
$+ "*SPOOL" $12 $+ $+ ]
To save this utility, start a new program (NEW), type in the words as shown above, then type:
*SPOOL sp
WRITE
*SPOOL
To use 'sp' from disc type:
*EXEC sp
Then when you need to save a word type 'sp' and away you go.

Published in AMPLINEX 021, March 1991

Hints and tips

Musical Dice in Acorn User

Alan Minns
If any members receive the Acorn User monthly disc and have tried (without success) to load Ian Waugh's program, the following may be useful.
For some strange reason, the end of each line is terminated with a line feed instead of a carriage return. As far as AMPLE is concerned, this means that the whole program is one very long line.
The solution is to run a BASIC program such as:
10 *LOAD Music 3000
20 FOR I%=0 TO &21AA
30 IF I%?&3000=&A I%?&3000=&D
40 NEXT
50 *SAVE C.Music 3000+21AB
60 END
Then, in AMPLE,
*EXEC C.Music
and all should be well.

Making audio copies of AMPLE music

Lol Taylor
Those who have the Master may find the following time check method a help. When planning an audio tape it will be useful to know the exact length of each piece. Then all the necessary files can be entered in a jukebox ready for the recording session. Allow about 12 seconds for jukebox and loading time between each piece when calculating what pieces will fit on to the available tape.
In the *EXEC file which I load in when beginning a new piece are the following words:
"time" [ "TIME" OSCLI ]
"endtime" [
REP( QTIME 0 #< )UNTIL( IDLE )REP
time ]
"part1z" [endtime]
"tab" [ #IN #2 ]
Once I am satisfied with a piece I call up the RUN word in Notepad and enter 'time' immediately before the PLAY instruction. In the PLAY instruction I add part 'z', and after the PLAY instruction 'tab'. Running the program from the MENU the internal clock times come up on the screen. Taking one from the other I calculate the length of the piece, and enter it into my (hand-written) piece register. After that I remove the above words from the RUN word and delete them.
If the timing words are left in the RUN word and the piece is run from the Mixing Desk, some queer messages appear. They don't harm the program however.
Unfortunately, if you do not have a Master this method is not much help, but someone who understands the internal clocks may be able to work something out for the BBC Model B.

Clearing public data

Tony Walduck
With the Hybrid AMPLE Toolbox, it is possible for programs to have associated public data:
TXT data from TEDIT
TEL data from IEDIT
LNT data from LEDIT (in UTILS)
This is stored with the program (taking space on the disc) and will cause loaded programs to be larger than necessary.
At one point I had accumulated some TXT data in a program, which I wished to get rid of, but through not understanding the concept of public data, I could not reliably get rid of it.
It was only after reading the Toolbox manual (always the best idea!) that I learnt that as the Main Menu editors do not use public data, their CLEAR commands only work on the data of that particular editor alone.
It is only when you are using a public data editor (any one), or in no editor (e.g. in Main Menu) that the CLEAR command will actually act on public data.
QUIT will also remove public data, but NEW has no effect on it.
Beware: just entering TEDIT (with nothing visible in the editor) will generate 5 bytes, whilst going into IEDIT will immediately generate 1020 bytes of blank data!

Why you should not modify C.PREPARE

Alan Minns
In AMPLINEX 019, Tony Walduck refers to earlier hints on changes to the C.PREPARE routine and David Bloxham mentions the memory gain achieved by deleting the S parameter.
C.PREPARE appears in the !BOOT file and is called with the parameters R, S and K (the order is unimportant). If present, they perform the following functions:
R - checks if OSHWM=&1900. If so, it changes the value to &1300 otherwise does nothing
S - explodes the font and defines the special set of characters for the Staff editor (*)
K - defines the function key strings.
* Since the defined characters occupy 2 pages of memory in addition to page &C, this explains the gain in memory of 1/2K.
It was in AMPLINEX 010 that Allan Gardner suggested alterations to C.PREPARE, although he was not the first to do so. I maintain that this is never necessary!
OSBYTE 179 allows one to read/write the value of OSHWM (Allan refers to this as PAGE which, as a BASIC function, has no meaning outside that environment). For example, *FX179,20 will set OSHWM to &1400 (remember that FX parameters are in decimal) - it can thus be used when the R parameter in C.PREPARE has no effect.
If an Aries board is fitted, the link should be set so that Shadow is not initiated at switch on. The start of the !BOOT file may then be rewritten:
*BASIC
*XON 20 13
MODE 7
*FX179,20
*/C.PREPARE S K
... etc.
Surely this is easier than modifying C.PREPARE itself?
A further point concerns the inclusion of the MODE 7 command. Since Shadow is specified with static (as opposed to dynamic) workspace, a Break is not necessary and the mode change suffices.
There is also an unofficial method of changing the workspace page for Aries but this involves knowledge of the slot occupied by the Aries ROM - if anyone is interested, please contact me via AMPLINEX.

Tape recorder speed

Lol Taylor
Since programming pieces using the Music 5000 I have at times given audio cassette copies to relations and friends. I received criticisms that my pieces were too fast.
So I recently programmed a measured 5 minutes. I used a speed of 100 ticks per minute, and had instruments beep at different regular intervals, playing a chord together at end of each minute. Before this chord were five lead-in beeps to help with stopwatch synchronisation.
Using the stopwatch I checked that the computer was spot-on. Then I recorded my piece on various tape decks and played them back on others. I found a deviation of over 3% slow on my 'best' tape deck! This was getting on for a semitone sharp, apart from the racing effect, when my pieces were played back on other machines.

Published in AMPLINEX 020, November 1990

Hints and tips

Auto-chaining of files

Bernie Dawson
Back in AMPLINEX 009 I described my way of auto-chaining files. It allowed me to view the Mixing Desk while programs were running, and I used this process on both of my discs available from Panda Discs. I use a BBC model B and did not know that a problem would occur when BBC Master users tried to operate the files. After Panda Discs alerted me to the problem I scrounged use of a BBC Master to check it.
The solution is to use a different memory location from &901 which I had used. If you have one of my discs and are a BBC Master user then do the following:
On my first disc (DCT volume 3) change occurrences of &901 to &71 in the jukebox program words 'sel' and 'init'. Do likewise for each file in 'chain' and in a part 'a' usually 'part1a'. In the file 'endos' inspect the words 'RUN', 'choose', and 'part1g', changing &901 to &71 and &911 to &73.
On the Jarre disc (DCT volume 13) change &901 to &71 in the jukebox program words 'init', 's3a', and 's4a'. In 'rend2a', 'rend2b', 'rend2c', 'rend2d', 'rend5a' and 'rend5b' change 'qn' and 'wait'. The discs then operate as intended.

Use of *TYPE - clashing ROMs

Allan Gardner
Following my comment in AMPLINEX 015 about the use of *TYPE, Lol Taylor kindly replied in issue 016, and Alan Minns gave the definitive answer in issue 017.
I am grateful for their replies as I had become somewhat apathetic about the problem - I had just learned to live with it!
After some investigations I found that the problem was due to my relocating the workspace of the Aries B32 Shadow RAM to &1300. This (in theory) would allow the DFS enough memory to have one file, but unfortunately, as Alan Minns pointed out, *TYPE, *DUMP and *LIST do not work, 'hanging' the computer in each case.
The interesting thing is that the Acorn DFS does not suffer from these problems, each of the above text-file operations working perfectly.
Here are two possible solutions:
1) Use the Acorn DFS
2) Locate the Aries Shadow RAM workspace at &1400.
I don't really like the idea of losing yet another page of memory to the Shadow RAM/DFS combination so I will probably leave my setup as it was; but I have implemented another feature on my BBC Model B which helps this problem and many other 'ROM-clash' problems.
I have blown a 32k EPROM with the Watford DFS in one half and the Acorn DFS in the other. With a switch on the highest bit of the address line of the chip I can manually select the Watford or Acorn DFS, (followed by a <BREAK> to initialize the ROM).
As I have legally purchased both chips, I don't believe that there is a copyright problem in using this system.
I have further extended this idea to the point of having ten 'ROM's (6 x 16k and 4 x 8k), in just four ROM-slots, controlled by an 8-way DIL switch under the 'ROM-pack' expansion slot at the left of the keyboard, so even ROMs that can be a nuisance by clashing with others can be 'inserted' or 'removed' without needing to remove the lid.
If anyone needs further details, or assistance in implementing this idea please contact me via AMPLINEX.

Gaining memory

David Bloxham
Not everyone may realise that if you take the S out of the */C.PREPARE command in the !BOOT file, you gain 512 bytes of memory (half a kilobyte), although you do lose the Staff editor graphics.

Changing drives

John Slee
 I have transferred the AMPLINEX music files on to double-sided music discs, and used as many menus as necessary (usually 3) to select each piece using a program called 'jukebox'.
I get fed up, however, with typing *DRIVE 2 or *DRIVE 0 to change between different drives. To get round this problem I have written a simple menu which allows me to change drives before calling up my 'jukebox' program.
The menu only requires two words as shown below:
"dmenu" [
7 MODE MENUDISP
%Menu to change disc drives
%------------------------------------
%Return to previous menu % menu
%DRIVE 0 % 0 drive dmenu
%DRIVE 1 % 1 drive dmenu
%DRIVE 2 % 2 drive dmenu
%DRIVE 3 % 3 drive dmenu
%------------------------------------
MENU
]
"drive" [ $STR "DRIVE" $+ OSCLI ]
To include this facility in your own 'jukebox' program:
1) put your music disc in the drive and type "jukebox" LOAD
2) enter the word definitions for 'dmenu' and 'drive' as shown above
3) add 'dmenu' as an option in your main jukebox menu
4) type "jukebox" SAVE to save the new program.
Then, to get to the jukebox on another drive, select the new menu, use it to change drives, and then press the f9 function key, which is normally programmed to enter "jukebox" LOAD RUN.
The jukebox on the drive you selected will then be used.

MIDI and the Music 2000

Ian Waugh
I wrote an AMPLE program for the Music 2000 which lets you edit the Performances on Yamaha's TX81Z expander. It was published in the August issue of Micro User. Even if you don't have a TX81Z, I believe some of the programming methods could prove useful for anyone wanting to control any piece of equipment via MIDI.

Published in AMPLINEX 019, September 1990

Hints and tips

Staff editor memory saving

Bob Ord
Normally I use part names for a player like part1a, part1b, part1c, when entering music using the Staff editor. Like others, I suspect, I enter the clefs at the beginning of the part and any settings for key signature (=L, and Len, for example) follow on. Apart from taking up space in the Staff editor buffer, these take up memory in one's program.
I've discovered that setting the clefs is responsible for writing the word SCORE in the part definition. SCORE has the destructive effect of cancelling the key signature, zeroing the BAR length, and resetting the effect of @, =L, 'L and Len.
Now I enter the clefs in the first parts only - i.e. part1a, part2a etc. and save a lot of memory.

Avoiding Staff editor memory limits

Jack Wrigley
In AMPLINEX 014 David Hall described his method of SPOOLing words to a second program for modification before EXECing them back to the original program. When a single part needs changing and the Staff editor is 'out of bounds' my method is as follows.
For example, to modify 'partx' in a program already loaded and named 'MyProg':
 Save the program so far Select Notepad Enter "partx" GET Enter NEW (to discard the rest of the program) Enter MAKE Select Staff editor Enter "partx" GET Enter READY (to free all voices) Enter the number of voices and the required instrument Modify the part Enter "MyProg" LOAD
Entering MAKE then replaces the original 'partx' with the modified one. For single parts I find this better than using *SPOOL and *EXEC. Obviously, larger programs can preclude the use of Notepad for 'retaining' the word to be modified. In this case, David Hall's method fits the bill. Lastly, don't forget Roger Sapolsky's 'Making longer programs' piece in AMPLINEX 012, which takes the process a stage further.

Deadening sounds

David Bloxham
In AMPLE, to stop a long fade away at the end of a note, I have found ^(^) to be best.

Hearing the Music 5000

Jimmy Ryan
In the letter section of the May 1990 issue of Micro User, a reader states that he is using a piece of hardware called a Soundblaster to amplify his Music 5000. He goes on to say that it is of good quality and that he no longer finds the need for a hi-fi and that his system is a lot more portable.
It occurred to me while reading this that anyone who owns a Philips CM 8833 Personal Monitor and is handy with a soldering iron could produce the same portability. Correctly connecting the Music 5000 to the Euroconnector at the back of the monitor will send the sound through its stereo speakers. Of course the quality of the sound cannot be compared to a high quality hi-fi system but it may make life a little easier if the hi-fi and Music 5000 systems are in different rooms. The specifications for the Euroconnector are in the manual received with the monitor.

Published in AMPLINEX 018, July 1990

Hints and tips

AMPLE in the press

Jim Redfarn
In the Hints and Tips section of AMPLINEX 009, there was a request to send in details of any published articles about AMPLE and/or the Hybrid Music System. I submit two that may have not been picked up. Both were written by Ian Waugh.
The first was published in February of last year in the Keyboard Player. It is entitled 'The Micro and Music' and is an excellent morale-boosting description of the Hybrid Music System.
The second was published in the BEEBUG magazine for April 1990. It is called 'Music Programming in AMPLE' and is the first of a series of articles, to be published in succeeding months. As always with articles by Ian Waugh, it is clearly written, with lots of useful ideas.

The use of the Slide command

Alan Minns
I believe that previous discussions of the Slide command rather missed the essential points of the facility.
1) An =L value before the ON Slide fixes the dynamic level which is sustained throughout the slide (and after).
2) An =L value after the ON Slide fixes the pitch offset for the start of the slide.
3) If no pitch offset is defined, the existing value of dynamic level is used, which by default means that the slide starts at a tenth interval above the starting note!

Problems with the FX1A module

Richard Bettis
For a while now I've been noticing odd quirks in my system when I play some of the AMPLINEX tunes. Recent examples are 'In The Night' from AMPLINEX 014 and 'The Last Patrol' from AMPLINEX 015. Both of these crashed with a 'Too many voices' error before starting to play (see Questions and Answers in AMPLINEX 016). By chance I was using my original Music 5000 system disc and decided to sort out one of these pieces - and it ran perfectly!
I traced the problem to different versions of the FX1A module, which contains the PLAY word. Using MCAT, I found that my normal system had version 1.0 and the original had version 0.6. I replaced the newer version on my !BOOT disk, and have had no problems since.
I thought the purpose of updates was usually to REMOVE bugs?

Published in AMPLINEX 017, May 1990

Hints and tips

Sideways RAM and Integra-B

Patrick Black
There are some problems using Sideways RAM on an expanded Model B. One I've met is with ZROM loaded into Sideways RAM on the Integra-B board.
Loading ZROM and using AMPLE as normal is fine. The difficulty comes when ZROM is called. If you then return to the Staff editor the display is corrupted - though in other respects it still works.
To overcome this either blow ZROM on to a ROM and install it in a spare slot, or do all the Staff work before orchestrating the piece. This is what I do as I have no spare ROM slots. If you have room, but no facilities for blowing ROMs, Taj Letocha did offer a ROM-blowing service.

The guitar - a transposing instrument?

Roger Sapolsky
The subject of transposing instruments was treated by Lol Taylor in AMPLINEX 012. But I notice that the most popular instrument in present days has been forgotten! Yes, many (amateur guitarists among them) may not realise that the guitar actually sounds one octave lower than what is written on the stave. Music written for the guitar has much to offer to the Music 5000 user nowadays. If you choose to program such a piece, lower it by an octave, so that it plays in the register chosen by the composer.

Use of MIDIRT

Ken Hughes
For some reason MIDIRT (the MIDI command to send clock and control messages to drum machines or sequencers) continues to send timing signals after a piece of music has finished.
This affects some instruments, such as the Farfisa TS600 organ, and they need a READY command to stop the problem. The word below shows how to get AMPLE to do a 'READY' automatically at the end of the music.
The word is based on the 'chain' word given in the Hints and Tips section of AMPLINEX 009 by Bernie Dawson. See this for an understanding of how it works. The READY command is called up by the 'chain' word and thus the word 'chain' should be put in the final part of the piece (usually in a separate part by itself, e.g., part1z).
"chain" [ REP( QTIME-100#< )UNTIL(
IDLE )REP $2
"" "READY" $+ ]

Multi-channel instruments

Michael Lefevre
As you may know, the Music 3000 Mixing Desk shows each voice in one column regardless of the number of channels it uses. This means that it can be difficult to tell how many channels a voice is using.
The easy solution to this is to put the number of channels an instrument uses at the end of the name of the instrument, unless the instrument uses 2 channels. For example 'piano4' would be a 4-channel instrument, 'piano' would be 2-channel.
Doing this also enables you to use the instrument with the Keyboard option from the main menu on the Music 4000 system, as this works out how many voices can be used in this way.

Published in AMPLINEX 016, March 1990

Hints and tips

ROM Compatibility

Allan Gardner
I have recently added ESM's colour Screenprint ROM to my BBC Model B, and I have found it gives some very unpleasant effects within AMPLE.
Some of the effects are:
- Programs (known to be good) give '! Bad program' on loading.
- Modules included in the !BOOT file are found to be missing when MCAT is issued, and hence the module is unexpectedly loaded when required by a music program.
The worrying aspect of the problem is the random nature of the problems.
This ROM should be regarded as incompatible with AMPLE.

Getting more control over menus

Jack Wrigley
Looking through Ian Waugh's piece, 'Funky Nuts' (Micro User, October 1988) I was puzzled by his use of the word 'cls' just before MENUDISP. This was not defined or explained in the accompanying article. Fortunately, it was defined in another of Ian's compositions 'Spanish Tummy' (Acorn User June 1988). It 'restores windows' and 'clears text area', thus ensuring a clean display irrespective of where the piece is run in the system. Not a bad thing and worth having!
The definition is:
"cls" [
26 #OUT % Restores windows
12 #OUT % Clears text area
]
Also worth 'borrowing' from the same program is the word 'press'. Most people put the menu name at the end of a command line as this will renew the menu display once the command has been carried out. If this was added after a command to display, for example, an 'info' word, the information would only be seen momentarily, before the menu display was renewed. Used after an 'info' name, Ian's word allows the information to be displayed, but requests a single key press to return to the menu display.
The definition is:
"press" [
NL 132 #OUT 157 #OUT 135 #OUT
% new blue background
10 FOR( SP )FOR
% spaces to centre text
"Press RETURN" $OUT
$IN $2 % wait for keypress
menu % return to user-defined menu
]
One problem I have had with menu command lines is the limitation of 35 characters per line. With long commands (like play strings) this leaves little space for any comments. Redefining a command as a short word, for example,
"com1" ["1234-1abc2abc3abc4abca"PLAY]
can save space (24 characters in the extreme example above).
Finally, if the program is always intended to be run from a user-defined menu display the RUN word is simply:
"RUN" [ menu ]

AMPLINEX waveform editing utility

Lol Taylor
Other users of Richard Bettis' excellent utility (AMPLINEX 014) may find they have trouble identifying the waveform files produced.
I've stored waveforms with a suffix of '~' to show that they are waveforms and not instruments. So 'violin~' is a waveform and 'violin' is an instrument.

Manual improvement

Allan Gardner
Here is a simple (and cheap) tip that may be of interest.
1) Buy an A5 ring-binder (one with 3 rings seems to be best).
2) Remove the comb-binder(s) from the Hybrid Technology manual(s).
3) Punch the pages to suit the binder.
4) Insert the pages from the manual(s) into the ring-binder.
Result: manuals that can be opened and closed at any page easily and without the normal cursing associated with the HT method of binding.

Published in AMPLINEX 015, January 1990

Hints and tips

Black on white Staff editor

Philip Wells
I use a small control sequence word to display the Staff editor notes as black on a white background - which to me looks more realistic.
"bw" [19 #OUT 7 #OUT
4 FOR(0 #OUT)FOR
19 #OUT 0 #OUT 7 #OUT
3 FOR(0 #OUT)FOR
]

Separating notes

Michael Lefevre
In the 'info' of Tim Barrett's 'Voluntary in D minor' (AMPLINEX 013), he asks if there is a simple way of separating notes. The answer is the Len instruction. This can be used with a negative number to shorten all the notes by a set length or with a positive number to make all the notes the same length.
So, to make all the notes crochet length you would use '48 Len' and to shorten all the notes by a semi-demi-quaver you would use '-6 Len'. The instruction is on page 126 of the Music 5000 User Guide. It should not be confused with LEN (in capitals) which is for returning the length of a string.

Separating notes

Patrick Black
One way of separating repeated notes when using organ voices (Tim Barrett, "Voluntary in D minor", AMPLINEX 013) is to add ON PHSET to the instrument definition. From experience it's a great deal easier than all those rests!
In this issue's Instruments section are some which I used in the Bach Fantasia on 'In dulci jubilo'. As well as separated notes, I was trying to get some variation in the organ voices, as you would by setting stops on the real thing. In the main it works, I think, but you need to use 32' with care - it's a bit crude on its own and works best with some of the others on top of it.

Making the ZROM manual

F Chaplin
When you have printed the ZROM manual (AMPLINEX U11) and separated the pages, don't remove the tractor-feed holes from the left side of the loose leaves. Instead, square up the sheets, align the holes and simply thread them with wool or string or whatever you fancy, tie up the ends and there you have it - a real together manual!
Try it, it's bound to work!

More music in 'Ice Breaker'

Michael Lefevre
There is a rather interesting extra in 'The Ice Breaker' by Ian Guinan, on the Music City (1) disc. The music is in part words with no letter (i.e. part1 rather than part1a) but the PLAY instruction uses parts with letters. So, if you play the parts without letters by typing
"123456"PLAY mix1
you get another piece of music altogether!

Avoiding Staff editor memory limits

David Hall
Anyone who, like me, uses the Staff editor to enter notes may be faced with that dreaded '! Too big' message. Do not despair. What I do is to save what I have (as say 'tune#1') and then NEW the system. I then enter the rest of the tune as normal.
I then use the WRITE command to create a text file of the AMPLE words I have entered in this second program:
*SPOOL tune#2
WRITE
*SPOOL
I then load my original program 'tune#1' and read in the words from the text file of the second program:
*EXEC tune#2
I this way I can program very long pieces whilst still using the Staff editor.


Published in AMPLINEX 014, November 1989

Hints and tips

An AMPLE bibliography (continued)

Julian Benton
Following on from the AMPLE bibliography published in the Hints and Tips section of AMPLINEX 009, here are details of two more articles of interest, both from Electronics Today International.
1) September 1987 - 'The Hybrid Music System' - A general introduction
2) October 1987 - 'Inside Hybrid's Music 5000' - A description of the synthesiser hardware written by Chris Jordan.

More 'Hooked on Tchaikovsky'

Andrew Leahy
The piece 'Hooked on Tchaikovsky' from Hybrid's 'AMPLE Bytes Back' album, has some parts which have not been included in the RUN word. Parts 'e' and 'f' have been left out. Part 'f' is another arrangement of 'Sugar Plum Fairy'.
To add them to the PLAY sequence change the RUN word to "123-abcdefgh"PLAY.

Use of *TYPE

Lol Taylor
When, in the middle of developing a program, you wish to add (say) an *EXEC instrument, and you are not sure which file it is in, it is possible to *TYPE several probable files and read them on the screen without them being added to your program. When you have found the right one it can then be *EXECed in.

Korg DDD-5 drum machine

Ivor Abiks
For those members who own a Korg DDD-5 drum machine and Music 2000 MIDI interface, here's a tip. If you can't be bothered to program a song into the DDD-5 which needs, for example, a pattern for verses, and a different pattern for the chorus, here is a way of changing from one pattern in the preset bank to another.
 Simply send the following at the appropriate point in the score:
&FC MIDIOUT    % Stops the DDD-5
&nnF3 MIDIWOUT % Sends song select
               % message to change to
               % pattern number nn)
&FB MIDIOUT    % Sends continue % message
I usually define this as an AMPLE word, and insert the word at the point I wish the change to occur. I have not (so far) encountered any timing problems - the change appears instantaneous.
Here is a simple example:
"startdrums" [ &FC MIDIOUT
               &02F3 MIDIWOUT ]
"changedrums" [ &FC MIDIOUT
                &11F3 MIDIWOUT
                &FB MIDIOUT ]
"part1a" [ leadverse ]
"part2a" [ bassverse ]
"part9a" [ startdrums X ]
"part1b" [ leadchorus ]
"part2b" [ basschorus ]
"part9b" [ changedrums ]
"RUN" [ "1239-ab" PLAY ]
This will start with the preset pattern 02 ("Rock3") and then change to pattern 11 ("Ballad2") when playing the chorus.

Music 1000 amplifier headphone output

Neil Walker
The problem of headphones and the Music 1000 amplifier found by Tony Walduck in his review (News and Reviews AMPLINEX 12), would seem to point to the headphone output being taken directly from the speaker output. On most amplifiers this gives a high level of hum and noise, originating from the amplification after the volume control.
A solution is to fit, in series with the headphones, a resistor of 1000 ohms in each pair of phone leads. The value or wattage are not critical - if too low an ohmage is fitted the volume control range will still be restricted. The resistors may be fitted externally in either of the two leads going to each headphone. The modification will have no effect on the sound quality.

Printing AMPLINEX text

Jim Brook
For what it is worth, I would just mention that I print out AMPLINEX text on a daisywheel printer (Juki 6200) by spooling it to Interword and using the latter's two column option. It's very easy, requires no brain input at all (otherwise it would be useless to me) and produces a very neat and attractive printout. We dilettantes hate having to work out how to do anything and who knows, I may not be the only one who is also an AMPLINEX member!

Printing AMPLINEX text

Ken Hughes
I have tried using the 80-column print utility from AMPLINEX 005 and found it very good, except for printing out any AMPLE programs that are included in the text. Unfortunately it also prints these across the page making them very difficult to read. My solution to this is to use a multi column printer utility, set to two columns 39 characters wide. This allows printout of AMPLINEX files exactly as they appear on screen.
The program that I use is one from the May 1988 edition of BEEBUG magazine. As I use punched hole paper to print on I use the following short program to set up the printer for Elite type and to leave a margin on the left.
10 REM PRINTER SET-UP (AMPLINEX)
20 VDU2,1,27,1,77,3
30 VDU2,1,27,1,82,1,0,3
40 VDU2,1,27,1,108,1,16,3
50 CHAIN "PRINT"
Where "PRINT" in the name of the multi-column printer utility.

Making longer programs

Roger Sapolsky
Some further comments on using a modified !BOOT file without the MENU module (see the Features section of AMPLINEX 012). To access Notepad with no MENU module present use
"PAD" MLOAD
Which will load the module. To go into Notepad, type
PAD
To get rid of the Notepad module, get out of it via
QUIT
and then delete it using
"PAD" MDELETE
Doing without the MENU module in this way will give you an extra 1034 bytes.

Published in AMPLINEX 013, September 1989

A&B Computing ‘Jukebox’ program – correction

Allan Gardner
For more details see Hints and Tips section in AMPLINEX 012, published July 1989.
"fkey4"[]  "select"[]
"prog"[]   "run"[]
"fkey4" [
IF("KEY4|""jukebox""LOAD run|M"OSCLI
)ELSE("KEY4 CLEAR|M"OSCLI)IF
]
"select" [
% select file for running or storing
0 oldx #! 6 oldy #! 0 ord #!
0 newx #! 6 newy #! pick
REP( #IN #11 13 #= )UNTIL(
#11 138 #= IF(newy #? 16#< IF(no-y
IF(update   1 newy #+! pick)IF)IF)IF
#11 139 #= IF(newy #?  6#>
IF(update  -1 newy #+! pick)IF)IF
#11 137 #= IF(newx #? 21#< IF(no-x
IF(update  13 newx #+! pick)IF)IF)IF
#11 136 #= IF(newx #?  0#>
IF(update -13 newx #+! pick)IF)IF
#11 135 #= IF( ON fkey4 prog )IF
114 #= IF(refresh)IF
)REP #2  prog
]
"prog" [
% program file sequence buffer
names ptr-a #! 1 ord #+! ord #?
#11 64 #<  IF(
newx #? 3 #+ newy #? tab NOUT
42 ptr-b #? #B!
newy #? 5 #- newx #?
13 #/ #2 11 #* #+ 1#-
FOR(ptr-a #? #B? 1 #+ ptr-a #+!)FOR
7 FOR(1 ptr-a #+! 1 ptr-b #+!
ptr-a #? #B? ptr-b #? #B!
)FOR
1 ptr-a #+! 1 ptr-b #+!
0 ptr-b #? #B!
)ELSE(#2)IF
]
"run" [
% runs Jukebox after clearing any
% currently programmed sequence
% Also resets f4 to normal definition
OFF fkey4
"FX4,1"OSCLI
screen
select
fndnxt
]

Published in AMPLINEX 012, July 1989

Hints and tips

Programming pop and rock music

Ian Waugh
If anyone is interested in programming pop music I can recommend a book called 'Sequencer Trax Chart Hits' (£5.95 from Hal Leonard, distributed by IMP) which contains nine, note for note arrangements of tunes in four or five parts. Contents include: Every Breath You Take, Flashdance, Kyrie Eleison, Maniac, Miami Vice (your own DIY Jan Hammer kit!), Neutron Dance, One More Night, When The Going Gets Tough and Who's Johnny.
There is also an interesting series of books called Rock Scores (£6.95 from Music Sales) which contain 'exact transcriptions' of songs by a variety of rockers. Some are in as many as ten parts and may include guitar parts, too, so a full implementation is likely to be beyond the scope of the Hybrid Music System - but you could still have fun with them. The series includes AC/DC, The Beatles, Iron Maiden, Ritchie Blackmore, Rolling Stones, Bruce Springsteen, Bon Jovi, Huey Lewis, Billy Joel and Phil Collins.

Space saving in the Staff editor

Carl Robinson
When entering music in the Staff editor make your first word 'sig' - containing the clef, time signature and key signature only. If you are using these throughout the piece then they can then be omitted from the other words. To hear a piece play, come out of STAFF and set up the required voices. Type 'sig' then type the part you want to play or press f1 with the part in the Staff editor. Also, don't forget to put 'sig' at the beginning of your main play part.

Controlling the Roland D-110

Roger Sapolsky
When using the Music 2000 MIDI interface to drive the Roland D-110 expander the AMPLE music words dealing with the setting of dynamic levels are ignored by the components of a drum kit, unless it includes only one instrument. This can, however, be worked around using a system exclusive command.
I found the appropriate 'channel command' on page 114 of the D-110 manual: &F0 &Bn (where n is the channel number - 1) 7 nn (where nn is the sound level, maximum 100) &F7. The Music 2000 User Guide gives two alternative definitions of a word 'sysex' to send messages more than one byte long with 'MIDIOUT'. Using the second version of 'sysex' the full command then becomes:
-1 &F0 &B9 7 nn &F7 sysex
Including &F7 in sysex and making a short word including -1..7 makes the command simpler.
Getting to know the many preset sounds on a new synthesiser can be best done if all the sounds of a given category, say the basses, play a short appropriate riff in succession. A loop in a simple program greatly facilitates the process.
For example,
"part1a" [SCORE
 47FOR(
   INDEX MIDIPROGRAM riff1
 )FOR
]
will play 'riff1' first with 'Tuba' (program number 48), next with 'EnglishHorn' (47), and so on, until 1 is reached or Escape is pressed. A rest of convenient duration at the end of 'riff1' would enable the listener to note down any comments.
For rhythmic timbres the word
"part1a" [SCORE
  kn FOR(
     INDEX 60 #- PITCH rhy1
     )FOR
]
can be used, where 'kn' is the 'key number' defining an instrument, and 'rhy1' is a rhythm pattern.

Sheet music inaccuracies

Jack Wrigley
Poorly transcribed music has been discussed in AMPLINEX before, but one thing the Staff editor 'Bad bar' message has shown me is the number of 'misprints' present on contemporary sheet music. Originally, this led me to waste a great deal of time trying to figure out why I couldn't lose the annoying message. I never expected the note values to be wrong! Given the price of sheet music I think the 'Tin Pan Wallies' could do better.

'Riders on the Storm'

Andrew Leahy
Having recently purchased the AMPLE music disc 'Music City 2' I was most impressed with Bernie Dawson's rendition of 'Riders on the Storm', which includes lyrics timed with the music.
The 'music only' version of the song has a snare part, which is not played with the 'lyric' version. If you want the snares included in the 'lyric' version the 'RUN' word needs to be altered. Change the following line,
%music and lyrics %"123457-abcde"PLAY
to
%music and lyrics%"1234567-abcde"PLAY

A & B Computing 'Jukebox' program

Allan Gardner
In the 'Jukebox' program described in the November 1988 issue of A&B Computing magazine, there is a potential bug associated with the re-definition of function key 4.
In the program, the f4 key is re-defined to produce
"Jukebox"LOAD run
to load and run Jukebox, and to abort any playing sequence that has already been defined.
The problem is that the f4 key is always re-defined, even if the sequence consists of only one file.
So, if you load a music program via Jukebox, and then start to edit that file, pressing f4 will not clear the current contents of the editor, as you might expect, but will instead load and run Jukebox.
This bug was subsequently corrected in the second version of the program, but A&B Computing have decided not to print the new listing; instead it will only be available on a support disc with the September 1989 issue (available from the first Friday in August).
The second version has several new features, namely:
1) Full wrap-around of the cursor, in all directions
2) Sequences can be programmed from all available disc surfaces (This feature may be of interest to Jack Wrigley and other users of 40-track disc drives who want a menu system which accesses multiple drives)
3) On-screen help facility
4) Auto-repeat of a sequence
5) Menu of filenames can be sorted and presented alphabetically.
As A&B Computing have not yet made the second version available, I have created an ASCII file of the corrections needed to cure the f4 key problem. This can be *EXECed into the first version of the Jukebox program (as entered from the November 1988 magazine). This will correct the f4 key error, but will obviously not give the extra facilities of version two.
Unfortunately, as ASP (the publishers of A&B Computing) now hold the copyright on the program I cannot include it in its entirety in the new format.

Related file on this disc:
H.Jukef4 - corrections to version 1 of Allan Gardner's A&B Computing 'Jukebox' program
In the Features section of this issue is an article by Allan Gardner on different methods of automatically chaining together AMPLE programs.

Published in AMPLINEX 012, July 1989

Hints and tips

Transposition of music

'Robonk'
I use this method when arranging for large bands which have different keyed instruments, e.g. Bb trumpets and Eb horns.
A chromatic scale is one which goes from one note to the next note of the same name and includes all intermediate semi-tones. This can be used as the basis of transposition.
First write the chromatic key of the music. For example, for the key of Ab:
Ab A Bb B C Db D Eb E F Gb G Ab
Then write directly under it the key you require (e.g. C):
C C# D D# E F F# G G# A A# B C
To transpose, read the note from the music on the top line and take the new value from the bottom line.

Using the Aries B32

Ken Hughes
In AMPLINEX 009 there was a hint from Pete Christy about the command
*XON 20 A
to use the Aries B32 with AMPLE.
In AMPLINEX 010 Allen Gardner shows another way to do this by altering the C.PREPARE file.
The former method give more free bytes than the latter, but is less convenient to use. For the best of both methods type the following:
*RENAME !BOOT BOOT
*BUILD !BOOT
*KEY 10 *XON 20 A|M *EXEC BOOT|M
CALL !-4
and then press the ESCAPE key.
On my system !BOOTing the disc sets up Shadow RAM and then loads AMPLE without the need to press BREAK. Having noted the problem with Staff printing (AMPLINEX 007) I have left one disc unmodified. I have not had any problem with the Staff editor using the above system.

'Return to the Homeland'

Les Pearce
I have recently purchased the AMPLE music disc 'Return to the Homeland', which was reviewed by Roy Follett in AMPLINEX 008. However, upon its first play, whilst monitoring the Mixing Desk, I noticed that player 1 was not active in quite a few of the pieces although it was set to play. Further examination of these pieces revealed that 'PNUM SHARE' was missing at the end of the 'mix' word.
After correcting this omission all such pieces played as intended. This was on a system loaded with Studio 5000 Release 2, but I later found that all such unmodified pieces would play correctly on a system booted from Studio 5000-4 Release 1 (as supplied with the Music 4000 keyboard). However, as the disc is labelled for use on the 'Music 5000 Synthesiser' I would have expected it play correctly when run from Studio 5000!
So, for other 'Studio 5000' users here is a list of the tracks needing attention:
Side A - Dance!; Flight Of Icarus; Call Of The Homeland; Don't Surrender; Lucy, Who Lives On The Corner; Dreamer.
Side B - Return To The Homeland; Midnight In Soho; Russia (We Live In Fear); Restless; Midnight In Soho (remix).
Apart from this relatively minor problem, and although I wouldn't give it 'five stars' for originality as Roy did, I would still recommend this disc for its very compact and effective use of the AMPLE language resulting in some very interesting and enjoyable pieces.

Reverb units

Jim Redfarn
Some while back I bought one of the Tandy reverb units recommended in AMPLINEX 003. I have two Hybrid Music Systems and still use it on one. On the other I use an Alesis Microverb II. This is so much better, that I feel that I must recommend it to members who are improving their systems in this way.
In case any members are not clear what is exactly meant by 'reverb', it means adding natural-sounding room reflections to your recording. The Alesis Microverb offers a large range of room sizes and is very convincing. Prices seem to vary a lot, but mine cost £170 new. You can of course get them second-hand. By the way, don't get a Yamaha R100 Reverb/Echo unit. I did, in error, but luckily managed to persuade the shop to exchange it. The snag with the Yamaha is that the input sockets are mono.

Saving space during AMPLE compositions

G H Richardson
Never having had any serious memory problems on the relatively short musical pieces I had programmed before, I did not consciously think to save space when programming Bach's Toccata and Fugue in D minor. I actually got it all in at 12188 bytes, but by that time there was no room to load the Staff editor and the Notepad was getting close to the brink.
Since I normally use the Staff editor and keyboard to put the music in and to edit it, I found this disconcerting and had to resort to Notepad to edit. When this began to fail panic set in and I had visions of my 'masterpiece' ending 10 bars short - so I began looking for ways to save space.
First I did the obvious thing. I went through parts 1, 2 and 3 (21 sections) eliminating spaces between characters where possible; cramming two lines into one; converting repeated rests (^^^^) into rest holds (^///) - except for chords - and in this way managed to save about 160 bytes.
Next, I dimly remembered that because I used the Staff editor to input my notes the word '%STAFF' appeared in all sections of every part and that this word was not really necessary unless you wished to view the part on the Staff. So I removed '%STAFF' from all the parts and sections - saving a few hundred more bytes.
Then I examined other peoples' programs and came across this mysterious symbol 'sig' which I eventually realised was a music word containing something like
SCORE K(-B)K 48, 4BAR
setting the time, key signature and bar length which I had in full in all parts and sections. With reckless abandon I replaced this phrase with 'sig' throughout bringing my savings to the magnificent total of 988 bytes.
At this stage I had made enough savings to permit me to edit the music, put in an alternative mix and add the 'info' notes, so I left it at that.
I realised, however, that further savings could be made by using symbols for alterations in volume - e.g. 'ppv' for '30 0 -L' - and for variations in time - e.g. 'acc' for '30 8 +T'. On reflection I think the better way, assuming enough space is available, is to insert the volume and time variations in their normal, standard form initially, then examine them, see which are the most commonly occurring, and symbolize those.
The article by Kevin Doyle 'How to save memory in AMPLE' (AMPLINEX 004) has further information on this subject, and all I have done is reduce the general to the particular.
Finally, I understand there are considerable savings to be made by making a new !BOOT file by leaving out unwanted modules, but to me this is a technical minefield and fills me with horror. I may try it someday if someone could spell out the process step by step in practical terms.

Published in AMPLINEX 011, May 1989

Hints and tips

ROM compatibility

John Seaden
Since receiving my upgrade to the Music 5000, I have had occasional trouble with AMPLE and the Oxford Pascal ROM. I have also purchased a toolkit ROM called Slave which completely jammed AMPLE so that it would not even boot up. However it does have a very useful utility which allows you to issue a command to switch off any particular ROMs that are not required. I have now altered the AMPLE !BOOT program to include this command for both the offenders and have had no further trouble.

D Brehaut
If any member is experiencing difficulties with other ROMs clashing with AMPLE, and have Watford's 32K Shadow RAM board installed, use the *ROMOFF command to turn off all ROMs which aren't required. I have the Watford Solderless ROM Board filled with various ROMs and have rebuilt the !BOOT file on the Music 5000 and Music 4000 system discs using the *ROMOFF command to turn off all ROMs except BASIC, DFS and AMPLE. Insert the extra *ROMOFF commands after the *BASIC line in the !BOOT file.

Allan M Gardner
The following ROMs work, without problems in my BBC model B:
Computer Concepts:
INTER-BASE 2.0A
INTER-WORD
INTER-CHART
INTER-SHEET (Inter-Word, Chart and Sheet work both separately and as the combined MEGA-3 ROM)
SPELLMASTER 1.69
Commstar
Watford Electronics BEEBMON 1.00
Watford Electronics DFS 1.44
Watford Electronics DUMPOUT 3.2g
ARIES-B32 1.00
Enigma DISC Imager 1.09

Music 2000 addresses

Ken Hughes
The AMPLE Music 2000 MIDI interface is paged on to the following addresses.
Midi In  FC0C and FC0D
Out 1    FC08 and FC09
Out 2    FC0A and FC0B
Out 3    FC0C and FC0D
It appears to use the IRQ1 Vector at &204,5.
The simple monitoring and key test programs given in 'The ETI guide to making music' work with the Music 2000. Using this information perhaps someone can write some useful programs such as a voice dump for the Yamaha TX81Z.

Using a 'toolkit'

John Bartlett
To save time in getting started I keep a general purpose 'toolkit' file containing my commonly-used words such as special instrument definitions, echo data and level settings. This file can then be loaded before starting a new piece. In addition I keep a spooled version which can be EXECed into an existing file. Another advantage of this technique is that it encourages tidier programming.

A better metronome

Colin Homer
Anyone who thinks the metronome contained in the Music 4000 Recorder section is too weak should simply design a word such as
"part8" [ 1 VOICE Drum
100 FOR(XXXX)FOR ]
All this does is to use a drum, which is louder, in place of the metronome.
This will work unless you:
1) are recording with all 8 voices;
2) already have a mix with the 8th player used; or
3) record over the top of the definition of the word.

SCORE word caution

Ken Hughes
Some programs require the use of a negative Len setting. The Music 2000 MIDI Interface User Guide gives an example on page 16. A point to remember is that SCORE will cancel a negative Len setting and this can cause problems in a MIDIV part. Therefore, either do not use SCORE after using a negative Len setting or remember to repeat the Len setting again.

Changing instruments with UNUSED

Dugald Holmes
If you wish to use an instrument which needs all 16 channels and some of those channels have been already assigned to other instruments, all that has to be done is make all the other channels UNUSED.
This is easily done by using SHARE with UNUSED for each voice in use:
1 SHARE UNUSED
2 SHARE UNUSED
...
Once all voices, and therefore all channels, are unused, the more complicated instrument may be used. I think this tip will probably help many beginners who have not yet worked out how to overcome this problem.

Shadow RAM utilization

Allan M Gardner
I use a BBC Model B fitted with an Aries B32 Shadow RAM board and an 8271 DFS. If anyone else is using a similar setup (e.g. the Watford Electronics 32K RAM board) then the following may be of interest.
When using the Music 5000 the following memory allocation occurs:
-------------------------------------
MODULE  TYPICAL   WITH       MODIFIED
LOADED  MODEL B   SHAD RAM   SHAD RAM
        B  Y  T  E  S      F  R  E  E
-------------------------------------
MENU    15793     15025      16561
STAFF    3505      9905      11441
MIX     10638      9870      11406
PAD     12209     11441      12977
-------------------------------------
As you can see, fitting Shadow RAM into a BBC Model B only gives extra memory when using the Staff Editor. In all the other cases you actually lose about 3/4k of memory.
The reason that memory is less when Shadow RAM is fitted is because the initialization performed by C.PREPARE checks that PAGE is currently set to &1900, and if it is it moves it down to &1300.
However, when Shadow RAM is present, PAGE is normally set a page higher at &1A00 - therefore C.PREPARE leaves it alone, losing six pages of memory.
The solution to this problem is to modify C.PREPARE to move PAGE to &1400 (in the case of Aries B32) and to alter the !BOOT file to set the Shadow RAM workspace to &1300.
The techniques for the Aries and Watford boards is as follows:
1) Make sure you are in BASIC
2) Backup the system disc!
3) Type: *LOAD C.PREPARE 2000
4) For Aries, type:   ?&203E=&14
   For Watford, type: ?&203E=&15
5) Type: *SAVE C.PREPARE 2000+C1C
6) Type: *RENAME !BOOT BOOT
7) Type: *BUILD !BOOT
8) For Aries, type:
   *KEY 10 *XON 20 13|M*EXEC BOOT|M
   CALL!-4
   For Watford, type:
   *KEY 10 *MWS 13|M*EXEC BOOT|M
   CALL!-4
9) Press the ESCAPE key
After !BOOTing the system disc, you will be asked to press the BREAK key to reconfigure the memory. After doing so, the rest of the !BOOT operation is carried out as before.
I have fully tested this out on the Aries Shadow RAM and I have also tried it out on the Watford Shadow RAM. I don't understand why the Watford version needs an extra page of workspace, but that's life I suppose.
It is important to note that I have only used this on releases 1 and 2 of Studio 5000 and issue 1 of Studio 5000-4, so the notes in the Hints and Tips section of AMPLINEX issue 004 should be read in conjunction with these notes.

Redefining the function keys

John Bartlett
I have redefined the function keys f4 and f6, which I had little use for, to the words 'READY' and 'VOX' where VOX is a word in my toolkit to assign VOICE information. When tweaking parts which need to be played to hear the overall effect, this allows me to re-assign VOICES for use with the f1 key in Notepad and Staff with just two key presses.
This method also removes the CLEAR function (from f4) which I rarely used intentionally, but which I had used by accident instead of the f3 (MAKE) key thus removing several bars of hard-fought staff notation!

Editor's note:
There are several keys in the standard Studio 5000 set up which can accidentally ruin an editing session. I have changed CLEAR (f4), LOAD (f7), SAVE (f8) and "Jukebox"LOADRUN (f9) in my own Studio 5000 !BOOT file for this reason. More hints on redefining the function keys can be found in the file F.custom in AMPLINEX 004.

Published in AMPLINEX 010, March 1989