%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% COMPOSE Composition and Play Menu for the HP48G[X] The millenium edition Raymond Hellstern & Wolfgang Rautenberg raut@math.fu-berlin.de www.math.fu-berlin.de/~raut ftp.math.fu-berlin.de/pub/usr/raut ------------------------------------------------------------- PLAY plays single voice songs or any other piece of music on the HP48G, displaying the notes and adapting the screen during the play. The Brouwser PBOX (PlayBox) offers a choice of pieces to be played in violin or bass clef by using the toggler |VIOL| in the menu of PBOX. More pieces can be found on the above web-site. PBOX shows a fragment of the music piece text, not its name. The option |TEXT| yields the full text if it does not fit in a browser's line. After aborting or ending a PLAY-run one may scroll the note setting with the cursor keys. Music pieces are readily written with |COMP|. Thus, COMPOSE is not only a nice entertainement but also an ideal tool for those who like composing. If you want to listen to existing pieces only, you may skip the rest of this text. An argument for |PLAY| is a list of the shape { Text t NStr }, where Text is a string (possibly the whole text to the music piece), t is a positive real, the performance tempo, and NStr is the note string. The smaller t the faster the performance. Before writing a composition have a look at TEST, a single-note piece. Compositions are written with |COMP| which has a HINTs option in its menu. Right after each note (from f0 to a2, see the |COMP| menu) can be put a keyboard dot for prolonging the tune and/or a #, a small b and t-, t+ (trill symbols). The length of a note is a real r with precisely one blank's distance from the note code. Any positive r is allowed. Thus, there are no problems with tempo variation, triplets, ritardando etc. The smaller r, the longer the tune since 1/r sec is the actual sound length. For r greater or equal to 4 and smaller 8, a quarter note is printed; for r greater or equal 8 an eighth note, etc. Each tact must be written on an extra line, without any blanks at the end of the line. Word distance inside a line must be precisely one blank. The first p tacts will automatically be repeated by putting the number p in an extra line. Only p = 1,2,...,9 are allowed. For modifying or correcting a piece, put it onto the stack and press |COMP|. It will then nicely be parsed in the editor. Try with TEST. New pieces do itself include into PBOX whenever present in the COMPOSE directory. The pieces may be hidden like our examples (a protection against incautious manipulation). For hiding or unhiding existing music pieces use HIDE from hpcalc.org or from the above addres. NStr may be the BZ-code of the original Nstr. This saves a lot of bytes. A variant of the BZ-decompressor is hidden in COMPOSE. It automatically evaluates the decompressed object provided it is a program. The note printing of long pieces may temporarly use more than 30 KB RAM. The ABUFF expansion in PLAY depends on the played piece but is limited to 1792 x 64 Pixel which is about 14 times the screen.