13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PLAY statementFunctionSyntaxRemarksPLAY creates music.PLAY string expressionPLAY is an interpretive mini-language that does for music whatDRAW does for graphics. PLAY allows you to define musical passagesas a sequence of characters in a string expression and to playthem through the computer's speaker.There are 84 notes available, corresponding to most of the keyson a piano from three octaves below middle C to one note less thanfour octaves above middle C. A note may be represented by itsnumeric value (1-84), or by a written description (that is, A throughG with sharps and Hats and octave information).For example, PLAY "N44" plays note 44, G above middle C.PLAY "03G" plays G in octave 3 (the same note).Music definition statements may be grouped into lengthy commandsequences:PLAY I03FGA"plays three notes (F, G, and A) in octave 3. Spaces are ignored bythe music interpreter, and should be used to clarify the structure ofthe command string.The CommandsThe follOwing one- and two-character commands make. up thePLAY language:note-letter [{#I + 1-}]Plays note note-letter; note-letter is. a letter from A through G(case is insignificant). Including an optional sharp (# or +) or Hat( -) modifier after note-letter selects the equivalent of a black keyon a piano. You cannot sharp or Hat a note to obtain a white keyresult; for example, "F -" is invalid.NnPlays note n, where n is the numeric representation of a notefrom 1 to 84. Note 1 is the lowest C on.a piano; 84 the highest B.Middle C is note 37. Note 0 produces no sound, and can be used asa rest.<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 299

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!