Questions and answers

Answer: Synchronising music and lyrics

The answer to Michael Harbour's question (AMPLINEX 007) about getting words to synchronise with music events lies in the AMPLE word QTIME (see AMPLE Nucleus Programmer Guide, pages 175-6).
Michael's problem is caused by the fact that AMPLE doesn't work its way through a program line by line, as BASIC would. Instead, commands are taken to be processed straight away, with musical commands then queuing up until it's time for them to play.
This means that $OUT commands will be reached and processed (because they take, in effect, no time) while the music commands are still waiting in the queue. Result: all the lyrics are printed out while the music's barely started. This is really a feature rather than a problem, since it's how AMPLE manages to process parallel parts.
Fortunately, AMPLE also provides the answer: QTIME gives a measure of how much music is currently waiting to be played. All we need to do is to make a word that monitors QTIME and won't let the next command go through until QTIME is zero - i.e. the program has caught up with the music.
Load and run the program 'Q.Timing' (included on this disc), to see the technique. The important word is 'w'. This simply IDLEs (i.e. does nothing) until QTIME is zero. Any $OUT after 'w' will then be processed, as near as damn it, at the same time as the next music command.
So, to use it, define the word 'w' (Q.Timing will give you a spooled version which you can *EXEC into any program; or you can just type it in as usual) then whenever you want to synchronise something with music, you need lines like this in the music part:
w            "lyrics"$OUT            C
^                ^                   ^
Timer        Your lyrics   Note to synchronise with
Have a look at 'part1' in Q.Timing to see the technique in use.
David Westbrook

Related file on this disc:
Q.Timing - Program demonstrating the use of QTIME

Question: Shadow RAM

I read with interest the question in AMPLINEX 007 about problems with the Solidisk Shadow RAM. I have just bought an Integra-B board with Shadow RAM and I am having similar problems. When using the Staff editor the value shown by MEM indicates that Shadow RAM is in effect but as soon as I exceed the old non-Shadow memory limit the screen becomes corrupt. Also the screen actions seem slowed down and I too get problems with the timing on playing back a tune.
The Integra-B manual indicates *SHADOW is equivalent to *FX114. Why do all these boards use the so-called non-standard FX call? Can anybody throw any light on the subject or come up with a software solution?
Ian L Hubbard

Question: 'Chaining' of files

Has anyone managed to write a routine which will enable AMPLE files to be LOADed and RUN sequentially?
By using an *EXEC file such as
001 "tune1" LOAD RUN
002 "tune 2" LOAD RUN
etc
all that happens is that the next file is loaded in before the first one has even started to play!
What I want to do is to be able to set up the system to play as many files as are present on a disc without having to touch the computer keyboard. Is this possible?
Alan Mothersole

An article in the November 1988 issue of A&B Computing seems to offer the facilities you are seeking. It contains an AMPLE program which reads the disc catalogue and allows a 'chain' of music files to be played in sequence.

Answer: Opus Ramdisc

It may be of interest to other members (noting the Opus Ramdisc problems mentioned in AMPLINEX 006) to know that AMPLE runs perfectly from my Solidisk 4Meg256 200K Ramdisc (I use it with a Solidisk DFS 2.2M).
Unfortunately, this is not the answer for those who don't have a 4Meg256 board because they are no longer available, but for members who do have one this may be news.
It's not a big advantage if you've only a single disc drive because with the Ramdisc configured as drive 0 you can only store music files on drive 2 but it is useful with dual drives.
A J P McMaster

Question: Aries B32 memory saving

Being a BBC Model B owner and a Staff editor fan, it was only a matter of time and finance before deciding to buy a suitable Shadow RAM Board. Ted Royffe's experience (AMPLINEX 004) proved the spur and I bought an Aries B32 Sideways/Shadow RAM Board.
Installation proved to be straightforward and the manual appears to be well documented. However, the increase in available memory within the Studio 5000 environment has been less than I expected.
Loading AMPLE to the Main Menu, MEM gave 15793 bytes free prior to installation and 15025 bytes free after installation. That's a loss of 768 bytes!
Selecting the Staff editor, MEM gave 3505 prior to installation and 9905 after installation, a gain of 6400 bytes.
The above gain was repeated after loading a part completed program.
What's happened to the saving of 8K mentioned in the Music 5000 User Guide and why should 768 bytes go AWOL straight away?
Jack Wrigley

Question: Staff editor error

I am having problems when MAKEing words using the Staff editor. Often, I get a 'Too many numbers' error when a word is being made. Sometimes repeating the 'MAKE' clears it, but often it does not.
Does anyone know why, and how to solve the problem?
Steve Hawley

Answer: MIDI messages and software

In response to Michael Mellor's question in AMPLINEX 007 - I too have found the Owners Manual for the Yamaha FB-01 expander to be as helpful as a 'syntax error'. All the MIDI data information is badly cross-referenced with no simple examples to illustrate the unit's behaviour under MIDI control.
However, to change voice banks the following data must be sent:
&F0 - Start of System Exclusive message
&43 - Yamaha identification code
&XX - XX = MIDI receive channel + &0F
      e.g. &11 = MIDI channel number 2
&15 - Parameter group
&04 - Voice Bank parameter
&YY - YY = Bank select data
      Values &00 to &06 represent banks 1 to 7
&F7 - End of System Exclusive message
So, for example, to select Voice Bank 6 the following AMPLE word may be included, with other set-up words, in the RUN word before the PLAY instruction.
"fb01bank" [
READY
1 VOICES MIDIV
 1 MIDILINE   1 MIDICHANNEL
 &43F0 MIDIWOUT
 &1510 MIDIWOUT %&10 = midichan + &0F
 &0504 MIDIWOUT %&05 = bankdata
 &F7 MIDIOUT
READY]
I am not aware of any BBC software that will do voice editing for this unit and so may even consider writing some myself - providing that I can 'extract' the relevant MIDI codes from the Owners Manual.
Like Michael, I am still very much in the experimental stages and have only just worked out the code required to change Configuration Patches on this unit. If Michael, or any other owner of an FB-01, would like to swap information then please contact me either through AMPLINEX or phone Medway (0634) 365557.
Les Pearce

Question: Roland MT-32 re-programming

Is any AMPLINEX member working on a programme in AMPLE to allow re-programming of the Roland MT-32 multi-timbre module via the Music 2000 MIDI interface unit?
At present those members who, like me, have the MT-32 module and wish to tweak the voicing have, it would seem, only one option. That is, to buy a second MIDI interface and appropriate software for their BBC B or Master from a certain company in Essex. In all about £120.
It seems to me that all the hardware is there but not the code. This must be an opening for someone to make a small/moderate profit!
Alternately does anyone know of any other cheaper, MIDI interface suitable for a Master 128 that could be used? I would willingly entertain a circuit diagram as it would give me a chance to get my soldering iron out and maybe fry a few chips myself!
David Reed

Question: Issue number of discs

In AMPLINEX 007 there were a few references to problems with some issues of the Music 5000/4000 software.
Does anyone know:
(a) How many issues there have been?
(b) Which issues have bugs?
(c) What is the current issue number?
(d) Is it worth upgrading?
Perhaps Hybrid could enlighten us.
Alan Mothersole

Answer: Booting the Music 4000

In AMPLINEX 006 Andy Knight asked about booting the Music 4000 using an 80-track drive and a 40-track disc.
The easy way is to make a 40-track backup copy and then to use a 40/80 converter (such as the one on Beebugs' Discmaster), sit back, and have a drink.
If you haven't got a converter - write-protect your 40-track master disc, format another disc to 80 tracks, then, using
*COPY 0 0 *.*
start off with your drive set to 40-track with your master disc in it. When prompted to insert the other disc, switch the drive to 80-track. Continue swapping discs, (remembering to set the drive to 40-track for the master and 80-track for the copy) until done.
Paul Bullock

Question: Definition of thunder

Has anyone succeeded in producing a realistic sound of thunder? My own efforts have merely produced a sound like artillery fire. A loud clap or two followed by rumbling reverberations dying away is what I am looking for.
G H Richardson

Answer: Keyboard repair

Just a note on Jimmy Ryan's keyboard repair (AMPLINEX 007). The Maplin gold-plated contact wire I used is designed to inhibit corrosion, which could result in a bad electrical connection and mean repeating the repair. I should also point out that the Maplin product is of sufficient length to repair several keys.
Jack Wrigley

Question: Music 500 with a BBC Master

Does anyone know what the hardware changes are that were made to the Music 500 to turn it into a Music 5000 and make it more compatible with the Master? I understand it is only a couple of capacitors near IC34 and a single piece of wire joining two IC pins together.
I have a friend who has recently upgraded to a Master and he now finds that some AMPLE BCE tunes no longer play properly. He has written to both Hybrid Technology and Acorn. Acorn say refer to Hybrid, and Hybrid will not give out any information. Has any daring AMPLINEX member taken a Music 5000 to bits?
Graham F Firth

Question: Screen graphics

After using the AMPLE Screen Designer program from AMPLINEX 002, I wondered if it was possible to use pictures drawn in other modes in AMPLE programs. Having an AMX mouse and several 'painting' programs I set about trying to use some previously drawn pictures.
Using pictures saved normally from inside the 'painting' programs I successfully managed to display them in their appropriate screen modes from AMPLE command mode by *LOADing the files at the appropriate screen memory address: For example for mode 3:
*LOAD file 4000
This is fine in direct command mode but to use it in a program the command needs to be incorporated into a word for execution during the RUN command. However on trying this I received the error message 'Bad Context'.
Thinking that the OSCLI command might hold the key I tried this as well, but this failed - does AMPLE support this command at all?
Has anyone else tried this and had more success? Also, is there any chance of using Shadow RAM (where available) to increase program memory when long (16k) mode 3 screens are used?
Karl Harridence

The OSCLI command should work within an AMPLE program in the form:
"LOAD file 4000" OSCLI
but I don't know of any way to load a file directly to Shadow RAM.

Answer: Tempo changes on all voices

In answer to one of the questions raised by Michael Harbour (AMPLINEX 007) - when a change of tempo is to take place in a piece of music involving several players, the appropriate instruction (see pages 121/122 of the Music 5000 User Guide) needs to be inserted in the SCORE of only one player: the AMPLE software will take care of the other players and keep them all timed correctly during tempo changes.
A few words about the tempo change instruction (+T or -T) itself. The time setting placed in front of it is not necessarily the setting of the note(s) following the instruction. It is rather the highest common factor of all the time settings used in the SCORE during the tempo change.
For example, '8,' should be selected if '16,' and '24,' notes follow; similarly, '2,' should begin the instruction if '6,' and '32,' notes are used.
Thus, in the instruction
2, 30 48 +T
32,C 6,+C ...
C will 'use' 16 beats, +C 3 beats etc., until the total 48 - and the final tempo - are reached.
Taking the example of a piano music piece where player 1 (right hand) plays a complicated music pattern, while player 2 (left hand) just strikes a series of chords of equal duration: the instruction to alter the tempo will obviously be simpler if inserted in player 2's SCORE rather than in player 1's and the musical result will be the same.
Given a change number 'CN' read in a SCORE, enter:
PRINT 2^(CN/64)
(in BASIC) if you want to find the resultant ratio newtempo/oldtempo.
Conversely, given a desired ratio, typing:
PRINT 212*LOG(newtempo/oldtempo)
will give you the CN to input to the AMPLE +T instruction.
If newtempo is less than oldtempo (rallentendo) CN will be negative. In this case, the instruction may be written as -CN ... +T or as CN ... -T, the latter being more usual.
As explained by the User Guide, tempo settings may be scored in a 'conductor' part (part9). Roger Cawkwell's remarkable program 'New Choros' (AMPLINEX 003) gives us a fine example of this practice.
With regard to this, while parts 9c and 9e are straightforward, I am puzzled by parts 9b (why 'rep#?ON#=' followed by a conditional?) and 9d (why 'ON rep#!'?). Will someone be kind enough to clarify these points?
Roger Sapolsky

Question: AMPLINEX from ADFS

When I receive my AMPLINEX disc, I copy it at once into ADFS format, and a directory, AMPn, where n represents the issue number. I do this because of the more efficient use of disc space by ADFS which allows three or four issues of AMPLINEX to be stored on the one disc.
However, when I try to play the music using the route through the AMPLINEX main menu and the music sub-menu, I get '! Not found' error messages.
I suspect the cause lies in the 'lr' word, perhaps seeking to run the files from the root directory ('$'), where they are not. If this is so, what changes must be made to the word in order for it happily to load and run music from directory AMPn?
Pete Holdroyd

Assuming that the music files are in the current (AMPn) directory and the other sections are held in sub-directories (Q, H, F, etc.) you should simply remove the directory reference in the 'lr' word so that the line:
#110#=IF("$.")IF
becomes:
#110#=IF("")IF
and save the amended A.MPLINEX program.

Answer: Solidisk 2Meg128k board

I can't help with Peter Middleton's problems using Shadow RAM on the Solidisk 2Meg 128k board (AMPLINEX 007), but can I suggest that he junk the Manager ROM and get hold of SideAid128 instead - it's vastly superior. SideAid128 comes from:
CatSoft,
4, Church Walk,
Eggington,
Bedfordshire.
LU7 9QL
Patrick Black

Answer: Solidisk 4Meg256 board

I find no difficulty in using Shadow RAM and the Ramdisc on my Solidisk 4Meg256 board. I have the Manager ROM v3.0 and use the Solidisk DFS 2.2M to run the Ramdisc. I gather that there are several versions of the Manager ROM around, all with slight differences (you can get details from the SoliNet user group) so it may be worth seeking out a different version (not necessarily a higher one) if yours won't work.
Also Morley Electronics advise that their Ramdisc is mutually exclusive with a Music 5000 - you have to turn one off whilst using the other.
A J P McMaster

Question: MIDI for Christmas?

As Christmas is looming up, I am debating whether to buy the Music 4000 and/or the Music 2000, or to change to a MIDI system such as that produced by EMR.
Could you please tell me the advantages of AMPLE over MIDI, and what exactly the Music 2000 can do. I have grasped the Music 5000 system fairly well, and feel it would be silly to have to start all over again with another system if the Music 2000 does the same.
Diccon Maude

The Music 2000 allows you to control MIDI-compatible instruments using familiar AMPLE commands and music structures. Buying different MIDI-control software would mean learning another music composition method. Using the Music 2000 you should also be able to adapt your existing AMPLE music fairly simply to use a MIDI instrument in place of one or more Music 5000 voices.
See the News and Reviews section of this issue for more information on using AMPLE and MIDI together.

Editor's note:
The comments following some of the questions above are only my opinions on the subject and should not be taken as definitive answers.
Your comments are most welcome on any of the questions posed, whether they supplement, confirm or correct any I have expressed.

Published in AMPLINEX 008, November 1988