Music Player User's Guide Version 5, Oct 1995 1. Introduction The Music Player is offered in library form, and is accompanied by a number of compositions, as well as a sample directory to help you get started quickly. Select and load one of the following libraries, according to your machine model: HP48S/SX HP48G/GX SXSMALL.LIB GXSMALL.LIB Using a library for the wrong machine model will not harm your HP48 nor any of your data, but will result in incorrect tempo and frequency. All libraries share library number 778. These libraries have inactive "placeholder" functions inserted, so that you can switch over to a Full library, provided to registered users, at any time without having to recompile any programs you created that use the library functions. After loading a library, transfer the directory SONA to your HP48. You may modify or delete it later, but at this time, take advantage of it for a get-acquainted session. All of the other files included with this release are compositions: MINUTE.S Chopin: Waltz in Db major ("Minute" waltz) XVI16.S Mozart: Piano sonata XVI in A, 1st movement, Var. 6 MUSETTE.S, J.S. Bach: Musette - Poco allegro from the MUSETTE.B Anna Magdalena Notebook (duet) JESU.S, J.S. Bach: Jesu, Joy of Man's Desiring (solo or quartet) JESU.A, JESU.T, JESU.B VCE1.S J.S. Bach: Violin Concerto in E, 1st movement ELISE.S, Beethoven: Fur Elise (duet) ELISE.B MOON3X.S Beethoven: Sonata Quasi Una Fantasia ("Moonlight"), 3rd movement excerpt REED.S Tchaikovsky: Dance of the Reed Pipes Optionally, at this point feel free to load any of the individual compositions into directory SONA. Select from the filenames with the .S extension (the .A, .T and .B extensions are accompaniment parts for duets or ensembles). 2. Playing Compositions Once a library and directory SONA have been loaded, turn the HP48 power off, then on. Select SONA as the current directory. Press the DEMO variable key, which will set up flags, select composition EX1, and run the PLAY program. The composition title screen will appear while PLAY extracts the phrase strings, then the display will go blank while the composition is played. When play is completed, the title screen reappears, with the total play time shown in seconds. Press ATTN to clear the title screen. You will see that the CST menu has been selected, which includes a key for running PLAY. The EX1 composition is still on the stack, ready for play again. While play is in progress with the screen blank, only the ATTN key will be active. Further, in order for ATTN to halt play, it must be held down until the end of the note currently being sounded. Do not be alarmed if pressing ATTN briefly produces no result; just hold it down until play stops, then release it to let PLAY continue with stack cleanup. 3. Tempo Adjustment and Transposition Program PLAY allows the user to change the tempo or key of a composition on a per-play basis. Tempo changes are accomplished by entering a real- number tempo multiplier onto the stack in level 1, with the composition in level 2. With the EX1 composition still on the stack, enter the number 2, then press PLAY. This results in the composition being played at double speed. PLAY will drop the tempo multiplier from the stack when play is complete. Tempo multipliers may range from 0.0625 to 16. Playtime transposition requires entering a complex number. The real part of the complex number is the tempo multiplier (1 if no tempo shift is desired), and the imaginary part specifies how many musical half-steps to transpose up or down. Transposition range is -24 to +24 half-steps, which is -2 to +2 octaves. Enter the complex number (1,12) and press PLAY. The composition will be played at its original tempo, but one octave higher. If desired, non-integer values may be entered for transposition, to re-tune the HP48 to a standard other than "A" 440Hz. 4. Duets and Ensembles If you know another HP-48 owner, or happen to have more than one HP-48 available, you are encouraged to try duet play. Much of the design effort for this software went into provisions for allowing more than one HP-48 to play together. For duets, the two machines will auto-synchronize using the IR port. For your first duet, I recommend "Fur Elise", by Beethoven. Load composition ELISE.S into one HP-48, and composition ELISE.B into the other. Recall the composition to the stack on each machine. Set the I/O mode to IR on both HP-48s, and align them as you would for a data transfer. Press PLAY on one machine, then press PLAY on the second machine within 10 seconds. It is not necessary to press PLAY simultaneously on the two machines. Once play has begun, the HP-48s may be separated, since no synchronization takes place via IR during play. Included in this release is a quartet by J. S. Bach, "Jesu, Joy of Man's Desiring." Although you can play the top part alone, if possible, arrange to play this as a quartet with 3 other HP48 owners. Ensemble play with more than two HP-48s is best accomplished by manually synchronizing the machines, since IR transfer is difficult to achieve physically. If you set flag 55, and change the I/O mode to Wire, PLAY will wait for a key-press when it is ready to call MP. With each machine at this point, press any key (except ATTN) on all machines simultaneously to start them in sync. 5. Specifications The machine code music player was initially developed to overcome several specific limitations of user-code music players. Version 5 of the music player incorporates several modifications which improve tone quality and time/frequency accuracy. By inhibiting display operation during play, the timbre of the transducer has been made much cleaner and more pleasing to the ear. Intonation is considerably improved, especially in the higher octaves, by replacing the core BEEP subroutine in ROM with a specially developed subroutine which achieves a time resolution of 0.5usec per period (S/SX) or 0.25usec per period (G/GX) across the full frequency range, as compared to 22usec per period (S/SX) for the ROM BEEP subroutine. For a demonstration of the improvements achieved, run program AWFL in the SONA directory, which attempts to play a high 2-octave C chromatic scale using the BEEP function. Then, recall NICE and run PLAY to hear a clear, in-tune rendition of the same scale. Limits imposed by the HP-48 hardware and MP are as follows: Duration: minimum, 1; maximum, 1000 ticks. Values entered above this range are set to 1000. Tick = 0.01sec at standard tempo. Frequency: minimum (without transposition), 27.5Hz, corresponding to A0, the piano's lowest note; maximum at 2MHz processor clock (S/SX), 10KHz, corresponding roughly to D#9, one octave and 3 half-steps above the piano's highest C. Notes above this are reproduced as 10KHz. maximum at 4MHz processor clock (G/GX), 15KHz, corresponding roughly to A#9, one octave and 10 half-steps above the piano's highest C. Notes above this are reproduced as 15KHz. 6. Alpha Format Syntax Note data to be executed by MP is contained in strings, and may be in either a human-readable alpha format, or a compressed binary format. Each note is described by a notespec, which in the alpha format is "[accidental][delimiter]" where = upper-case letter A through G, corresponding to the note of that name; [accidental] = # for sharp, b for flat, ## for double sharp, bb for double flat, etc. No accidental is entered for naturals. Alternative symbols for # and b are + and -, respectively; = a single digit, 0-9, where 0 corresponds to the piano's lowest octave; = decimal integer, range 1 to 1000, specifying the note duration in centisec (1/100's of a sec.); [delimiter] = any character not listed above, usually a space or eol (end-of-line) for readability. Rests are entered as "R[delimiter]" where and [delimiter] are as described above. Delimiters between the fields of a notespec are optional, but are normally omitted for compactness. Notespecs will be interpreted correctly even if the intervening delimiter is omitted. The octave breaks are between B and C. The range of the piano would be expressed as A0, A#0, B0, C1, C#1, D1, D#1, . . . A7, A#7, B7, C8, and the piano's middle C is C4. Examples: "C450" PLAY will play the piano's middle C for 0.50 sec. "C442 D421 Eb421 F421 G421 Ab421 Bb421 C442" PLAY will play a C minor scale. 7. Binary Notespec Format All of the provided compositions use the binary notespec format. The hieroglyphic-appearing strings in the compositions are the phrase strings, stored in this format. The binary format allows more compact storage of the note data, since each notespec is only 2 bytes and no delimiter characters are used. The first byte of each binary format notespec is the frequency byte. This byte always has its MSB set to 1 as a flag to MP that the string is in binary format. The remaining 7 bits are the note number, which may have values from 0 (corresponding to A0), up to 6Fh (corresponding to B#9). Note number 70h is reserved to indicate a rest, but higher values will also be interpreted as a rest. The second byte is the duration of the note or rest, where the MSB is a base-8 exponent, and the low 7 bits are an integer mantissa. The resolution of durations over 128 centisec is therefore 8 centisec. When alpha format strings are converted to binary format, any duration over 128 is rounded to the nearest multiple of 8. 8. Registration Registered users will receive the Full versions of the libraries, which provide a convenient means for entering phrase strings, accessing individual compositions within collections, and performing operations on compositions. The registration fee of $15 also covers a number of additional compositions, many of which are duets and ensembles, plus one complimentary composition update, expanded documentation, technical support, and all of the programs in directory form to allow customization of PLAY, CAT and KBD. The programs included in the full libraries are: CAT - Collection browser; PLAY - Main program which interprets the composition structures and recalls phrase strings for execution by MP; KBD - For convenient entry of musical phrases; RPLY - Programmable function for playing compositions stored in collections; MP - The machine code music player; beep - Improved BEEP using MP; CAL, RCLAF, SETAF - Calibration/fine adjust of timebase and frequency; BINRY, SHARP, FLAT - commands for format conversion; CONV - Format conversion/composition operator main program; The small libraries omit CAT, KBD and the format conversion programs, and are intended solely for playing compositions. Compositions available at the time of this writing, which all registered users will receive, are: Frederic Chopin: Waltz in C# minor Etude in E (solo or quartet) Wolfgang A. Mozart: Piano sonata XVI in A, 1st movement Theme " Var. 1 " Var. 3 (solo or duet) Piano sonata XVI in A, 3rd movement (Turkish Rondo) J. S. Bach: From the Anna Magdalena Notebook: Menuet - Con moto (solo or duet) Marche - Allegro (solo or duet) Polonaise - Tempo giusto (solo or duet) Menuet - Quasi allegretto (duet) Polonaise - Moderato (solo or duet) Violin Concerto in E, 3rd movement Prelude and Fugue in C minor (trio) K. P. E. Bach: Solfeggietto Ludwig van Beethoven: Sonata Quasi Una Fantasia ("Moonlight"), 2nd movement (quartet) Piotr Tchaikovsky: Dance of the Sugar Plum Fairy Waltz from "Sleeping Beauty" Waltz from "Serenade for Strings" Scott Joplin: The Entertainer - complete Nicolai Rimsky-Korsakov: Flight of the Bumble Bee Josef Haydn: Allegro from Sonatina in G (duet) Franz Liszt: La Campanella Johannes Brahms: Waltz in Ab major Franz Schubert: Standchen (Serenade) A number of other compositions are currently in-work, which will be available later (free to registered users). These will include J. S. Bach: Bourree from the Anna Magdalena Notebook J. S. Bach: Two-part invention No. 1 in C major J. S. Bach: Organ Fugue in G minor ("Great") J. S. Bach: Organ Fugue in G major ("Jig") W. A. Mozart: Eine Kleine Nachtmusik - Rondo W. A. Mozart: Piano sonata in A, 1st movement, Var. 4 (quartet) C. M. von Weber: Invitation to the Dance To register, send your registration fee (U.S. funds only) to the author at: Paul Oelund 7639 - 116th Ave. S.E. Newcastle, WA. 98056 U. S. A. Include your name and an address to which a floppy disk may be sent. The disk will be IBM PC 1.44MB-formatted. Be sure to print all information clearly, since your name is the only way I can identify you as a registered user in the future! For your complimentary composition update, send a postcard to the author requesting the new compositions. You will receive all works which are complete at the time your card is received, so waiting longer is of benefit. The above are expected to be available by spring '96. ** Copyright Notice ** This software is provided for the amusement and enjoyment of all HP-48 owners with an interest in music. Permission is granted to duplicate or distribute UNMODIFIED libraries only, provided that no fee is charged for such copies, and provided that this documentation is included with all copies. Modification of the machine code programs such as MP and CAL is strictly prohibited under all circumstances. Incorporation of any of this software into other products for sale is prohibited. This software is provided without expressed or implied warranty, and the author shall not be liable for any incidental or consequential damages arising from its use. Understand that there are sound technical reasons for denying permission to modify the machine code programs, especially MP. Considerable time and effort has been invested into the design of MP, to provide the time and frequency accuracy it possesses. Any modifications will destroy what has been achieved. Information generally available to the user community on machine instruction execution times is inaccurate for the HP-48 and cannot serve as a basis for redesign of MP.