Author Topic: Jingle Bells with option of PLAY notes or SOUND double ringing tones.  (Read 3365 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Hear Jingle Bells either by the PLAY command notes or the SOUND command in double ringing tones.

Code: QB64: [Select]
  1. _TITLE "Jingle Bells - by Ken G."
  2. SCREEN _NEWIMAGE(400, 200, 32)
  3. COLOR _RGB32(127, 249, 127)
  4. start:
  5. PRINT "                Jingle Bells"
  6. PRINT "                 by Ken G."
  7. PRINT "            (1) By Beep Notes"
  8. PRINT "            (2) By Double Tone Sounds"
  9. PRINT "            (3) Quit"
  10. PRINT "--------------------------------------------------"
  11. PRINT "           Choose a Number (1-3)";
  12. choose:
  13. n$ = INKEY$
  14. IF n$ = "1" THEN GOTO beepsounds:
  15. IF n$ = "2" THEN GOTO phonesounds:
  16. IF n$ = "3" THEN END
  17. GOTO choose:
  18.  
  19. beepsounds:
  20. _PRINTSTRING (100, 100), "Jingle bells, jingle bells"
  21. PLAY "v10 O3 E E E P8 E E E P4"
  22. _PRINTSTRING (100, 100), "Jingle all the way"
  23. PLAY "V10 O3 E G C P12 D E P4"
  24. _PRINTSTRING (100, 100), "Oh, what fun it is to ride"
  25. PLAY "v10 O3 F F F P8 F F E E"
  26. _PRINTSTRING (100, 100), "In a one-horse open sleigh, Oh!"
  27. PLAY "v10 O3 L8 E L8 E L4 E D D E D P4 G"
  28. _PRINTSTRING (100, 100), "Jingle bells, jingle bells"
  29. PLAY "v10 O3 E E E P8 E E E"
  30. _PRINTSTRING (100, 100), "Jingle all the way"
  31. PLAY "v10 O3 E G C D E"
  32. _PRINTSTRING (100, 100), "Oh, what fun it is to ride"
  33. PLAY "v10 O3 P2 F F F F F E E"
  34. _PRINTSTRING (100, 100), "In a one-horse open sleigh"
  35. PLAY "v10 O3 L8 E L8 E L4 G G F D C"
  36. GOTO start:
  37.  
  38. phonesounds:
  39. _PRINTSTRING (100, 100), "Jingle bells, jingle bells"
  40. FOR e = 1 TO 14
  41.     SOUND 659.26, .25
  42.     SOUND 500, .25
  43. FOR e = 1 TO 14
  44.     SOUND 659.26, .25
  45.     SOUND 500, .25
  46. FOR e = 1 TO 14
  47.     SOUND 659.26, .25
  48.     SOUND 500, .25
  49. FOR e = 1 TO 14
  50.     SOUND 659.26, .25
  51.     SOUND 500, .25
  52. FOR e = 1 TO 14
  53.     SOUND 659.26, .25
  54.     SOUND 500, .25
  55. FOR e = 1 TO 14
  56.     SOUND 659.26, .25
  57.     SOUND 500, .25
  58. _PRINTSTRING (100, 100), "Jingle all the way"
  59. FOR e = 1 TO 14
  60.     SOUND 659.26, .25
  61.     SOUND 500, .25
  62. FOR g = 1 TO 14
  63.     SOUND 783.99, .25
  64.     SOUND 500, .25
  65. FOR c = 1 TO 14
  66.     SOUND 523.25, .25
  67.     SOUND 500, .25
  68. _DELAY .75
  69. FOR d = 1 TO 14
  70.     SOUND 587.33, .25
  71.     SOUND 500, .25
  72. FOR e = 1 TO 14
  73.     SOUND 659.26, .25
  74.     SOUND 500, .25
  75. _PRINTSTRING (100, 100), "Oh, what fun it is to ride"
  76. FOR f = 1 TO 14
  77.     SOUND 698.46, .25
  78.     SOUND 500, .25
  79. FOR f = 1 TO 14
  80.     SOUND 698.46, .25
  81.     SOUND 500, .25
  82. FOR f = 1 TO 14
  83.     SOUND 698.46, .25
  84.     SOUND 500, .25
  85. FOR f = 1 TO 14
  86.     SOUND 698.46, .25
  87.     SOUND 500, .25
  88. FOR f = 1 TO 14
  89.     SOUND 698.46, .25
  90.     SOUND 500, .25
  91. FOR e = 1 TO 14
  92.     SOUND 659.26, .25
  93.     SOUND 500, .25
  94. FOR e = 1 TO 14
  95.     SOUND 659.26, .25
  96.     SOUND 500, .25
  97. _PRINTSTRING (100, 100), "In a one-horse open sleigh, Oh!"
  98. FOR e = 1 TO 7
  99.     SOUND 659.26, .25
  100.     SOUND 500, .25
  101. _DELAY .25
  102. FOR e = 1 TO 7
  103.     SOUND 659.26, .25
  104.     SOUND 500, .25
  105. FOR e = 1 TO 14
  106.     SOUND 659.26, .25
  107.     SOUND 500, .25
  108. FOR d = 1 TO 14
  109.     SOUND 587.33, .25
  110.     SOUND 500, .25
  111. FOR d = 1 TO 14
  112.     SOUND 587.33, .25
  113.     SOUND 500, .25
  114. FOR e = 1 TO 14
  115.     SOUND 659.26, .25
  116.     SOUND 500, .25
  117. FOR d = 1 TO 14
  118.     SOUND 587.33, .25
  119.     SOUND 500, .25
  120. FOR g = 1 TO 14
  121.     SOUND 783.99, .25
  122.     SOUND 500, .25
  123. _PRINTSTRING (100, 100), "Jingle bells, jingle bells"
  124. FOR e = 1 TO 14
  125.     SOUND 659.26, .25
  126.     SOUND 500, .25
  127. FOR e = 1 TO 14
  128.     SOUND 659.26, .25
  129.     SOUND 500, .25
  130. FOR e = 1 TO 14
  131.     SOUND 659.26, .25
  132.     SOUND 500, .25
  133. FOR e = 1 TO 14
  134.     SOUND 659.26, .25
  135.     SOUND 500, .25
  136. FOR e = 1 TO 14
  137.     SOUND 659.26, .25
  138.     SOUND 500, .25
  139. FOR e = 1 TO 14
  140.     SOUND 659.26, .25
  141.     SOUND 500, .25
  142. _PRINTSTRING (100, 100), "Jingle all the way"
  143. FOR e = 1 TO 14
  144.     SOUND 659.26, .25
  145.     SOUND 500, .25
  146. FOR g = 1 TO 14
  147.     SOUND 783.99, .25
  148.     SOUND 500, .25
  149. FOR c = 1 TO 14
  150.     SOUND 523.25, .25
  151.     SOUND 500, .25
  152. FOR d = 1 TO 14
  153.     SOUND 587.33, .25
  154.     SOUND 500, .25
  155. FOR e = 1 TO 14
  156.     SOUND 659.26, .25
  157.     SOUND 500, .25
  158. _DELAY 1.5
  159. _PRINTSTRING (100, 100), "Oh, what fun it is to ride"
  160. FOR f = 1 TO 14
  161.     SOUND 698.46, .25
  162.     SOUND 500, .25
  163. FOR f = 1 TO 14
  164.     SOUND 698.46, .25
  165.     SOUND 500, .25
  166. FOR f = 1 TO 14
  167.     SOUND 698.46, .25
  168.     SOUND 500, .25
  169. FOR f = 1 TO 14
  170.     SOUND 698.46, .25
  171.     SOUND 500, .25
  172. FOR f = 1 TO 14
  173.     SOUND 698.46, .25
  174.     SOUND 500, .25
  175. FOR e = 1 TO 14
  176.     SOUND 659.26, .25
  177.     SOUND 500, .25
  178. FOR e = 1 TO 14
  179.     SOUND 659.26, .25
  180.     SOUND 500, .25
  181. _PRINTSTRING (100, 100), "In a one-horse open sleigh"
  182. FOR e = 1 TO 7
  183.     SOUND 659.26, .25
  184.     SOUND 500, .25
  185. _DELAY .25
  186. FOR e = 1 TO 7
  187.     SOUND 659.26, .25
  188.     SOUND 500, .25
  189. FOR g = 1 TO 14
  190.     SOUND 783.99, .25
  191.     SOUND 500, .25
  192. FOR g = 1 TO 14
  193.     SOUND 783.99, .25
  194.     SOUND 500, .25
  195. FOR f = 1 TO 14
  196.     SOUND 698.46, .25
  197.     SOUND 500, .25
  198. FOR d = 1 TO 14
  199.     SOUND 587.33, .25
  200.     SOUND 500, .25
  201. FOR c = 1 TO 14
  202.     SOUND 523.25, .25
  203.     SOUND 500, .25
  204. GOTO start:
  205.  


Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Jingle Bells with option of PLAY notes or SOUND double ringing tones.
« Reply #1 on: December 19, 2019, 04:44:57 pm »
OMG! That's Pete's phone ringing in the holiday tune!

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Jingle Bells with option of PLAY notes or SOUND double ringing tones.
« Reply #2 on: December 19, 2019, 05:14:37 pm »
LOL! I thought about putting it on my answering machine, but then my number could go viral.... O_O