DIRECTORY Rope USING [ROPE]; TuneParse: CEDAR DEFINITIONS = { Hertz: TYPE ~ INT; Milliseconds: TYPE ~ INT; Db: TYPE ~ INT; Tone: TYPE = RECORD [ f1: Hertz, -- Hertz. f2: Hertz, -- Hertz. on, off: Milliseconds, -- Tone will be played at f2 Hz. for on ms.; then off ms. of silence. repetitions: INT¬1 -- specifies number of repetitions of this toned ]; ToneList: TYPE = LIST OF Tone; ToneSpec: TYPE = REF ToneSpecRec; ToneSpecRec: TYPE = RECORD [ repeatIndefinitely: BOOL¬TRUE, -- else play just once volume: Db¬0, tones: ToneList¬NIL, asRope: Rope.ROPE¬NIL -- if derived from a rope, here it is ]; ParseTune: PROCEDURE [tune: Rope.ROPE, volume: Db] RETURNS[tones: ToneSpec]; MergeToneSpecs: PROCEDURE [t1, t2: ToneSpec, t2Divisor: INT¬1, t2Delay: INT¬0, volumeIncrement: Db¬0] RETURNS [ts: ToneSpec]; }. ² TuneParse.mesa Derived from LarkPlay.mesa Copyright Σ 1984, 1992 by Xerox Corporation. All rights reserved. Last Edited by: Pier, May 4, 1984 11:58:31 am PDT Last Edited by: Swinehart, September 29, 1992 4:56 pm PDT tune is a rope of musical characters encoded via the ancient Etherphone runTune encoding. Volume is a default: can be overridden in tune. It should be specified first, though, and be constant throughout. It is specified in -db? Divisor and delay apply to the second tune. Delay is an additional rest, expressed in milliseconds, applied to the beginning of t2; divisor is used to change its frequency downward (designed to be used with values 1 and 2). This is specifically designed to deal with Etherphone ring tunes, where the caller's tune is to be delayed by a measure and dropped an octave. Volume of result is volumeIncrement + volume of first tune, or something. ts.repeatIndefinitely _ t1.repeatIndefinitely ΚΠ•NewlineDelimiter –"cedarcode" style™™J™Jšœ Οeœ6™BJšœ1™1J™9—Icode˜šΟk œžœžœ˜K˜—Kšœ œžœž œ˜ K˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜K˜šœžœžœ˜Kšœ Οc ˜Kšœ Ÿ ˜KšœŸE˜\Kšœ žœŸ2˜DK˜—šœ žœžœžœ˜K˜—Kšœ žœžœ ˜"šœ žœžœ˜KšœžœžœŸ˜5K˜ Kšœž˜Kšœ žœžœŸ%˜;K˜—K˜šΟn œž œ žœ žœ˜2Kšžœ˜J™YJ™—K˜š  œž œžœ žœžœ˜eKšžœ˜J™πJ™IJ™.—K˜Kšœ˜K˜K˜K˜—…—0²