Page 74 - Learn to Program - Basic-256
P. 74

Chapter 4: Sound and Music.                                                       Page 58



                           2. Type the sound statement below and insert the variable
                           assignments before it to play “Row Row Row your Boat”. The
                           variables c, d, e, f, g, and cc should contain the frequency of the
                           notes of the tune. The variable n4 should contain the length in
                           milliseconds of a quarter note; n2 twice n4, and n8 one half of n4.


                           sound {c,n4+n8, c,n4+n8, c,n4, d,n8, e,n4+n8,
                           e,n4, d,n8, e,n4, f,n8, g,n2+n4, cc,n8, cc,n8,
                           cc,n8, g,n8, g,n8, g,n8, e,n8, e,n8, e,n8, c,n8,
                           c,n8, c,n8, g,n4, f,n8, d,n4, e,n8, c,n2+n4}


















































                                                       © 2019 James M. Reneau (CC BY-NC-SA 3.0 US)
   69   70   71   72   73   74   75   76   77   78   79