home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / dos / sbbs_src.exe / TONE / EXAMPLE.TON < prev    next >
Encoding:
Text File  |  1993-11-13  |  7.0 KB  |  540 lines

  1. : Example TONE (.TON) file
  2.   All lines starting with non-alphanumeric characters are ignored.
  3.  
  4. : We're going to set the timer count value (in milliseconds).  The first word
  5.   of the line must begin with a 'T' (not case sensitive).  Following the 'T'
  6.   word (or letter) must be some amount of white space (tabs or space) then
  7.   a number to use for the timer count value.  The default timer count value
  8.   is 1 millisecond.
  9.  
  10. Time         200
  11.  
  12. : The colons you see at the beginning of the comment paragraphs are not
  13.   necessary.  They are only used to visually separate comments from tone 
  14.   command lines.  A space, tab, or any other non-alphanumeric character would
  15.   work just as well.
  16.  
  17. : Now we're going to display some text on the monitor using the 'V' (visual)
  18.   command.  The first word of the line must begin with a 'V' (not case 
  19.   sensitive).  Some amount of white space must follow the 'V' word (or letter)
  20.   then text to be displayed to the user.  If you do not wish a new line to be
  21.   automatically displayed, append a backslash (\) to the end of the line.
  22.  
  23. Visual        This is the beginning of our example TONE file.
  24. Visual        This text will be displayed on the same line as \
  25. Visual        this text.
  26.  
  27. : Now we're going to play some tones. Tones may be specified by note letter 
  28.   (and optional octave number) or exact frequency (in Hz).  We'll begin with
  29.   a natural 'a' (440Hz) for 1 second (1000 milliseconds).  Tone lines have two
  30.   parameters, the note (or exact frequency) and duration (in time counts).
  31.   Since our time counter value is now 200, we will need a time count of 5 to
  32.   produce a 1 second duration (5 counts multiplied by 200 milliseconds equals 
  33.   1 second.)
  34.  
  35. a 5
  36.  
  37. : The note is still playing right now and will continue to play until we make
  38.   another tone, give a rest command, or give a quit command. 
  39.  
  40. : Notice that we used a lower case 'a'. Note letters ARE case sensitive. Lower
  41.   case notes are naturals and upper case notes are sharps.
  42.  
  43. : Now we're going to specify the same note by specifying the exact frequency
  44.   (in HZ) of 440, for the same duration.
  45.  
  46. 440 5
  47.  
  48. : There will be no audible change caused by the above command because we were
  49.   already hearing the same frequency. What you will hear is a 2 second 'a',
  50.   unaware that we actually played two 1 second 'a's.
  51.  
  52. : To stop the note from sounding, we are now going to give a rest command.
  53.   Rest commands can be specified with a word starting with the letter 'R'
  54.   (not case sensitive) or by specifying a frequency of 0.  Some amount of
  55.   white space must follow, then a duration (in time counts).  The following
  56.   rest command is specifying 1 second of silence.
  57.  
  58. Rest 5
  59.  
  60. : To produce an automatic sound-off or pause between notes, we must specify
  61.   a stacato duration (in milliseconds).  This helps the listener to distinguish
  62.   between notes played of the same frequency.  If you do not specify a stacato
  63.   duration, the result is legato (smooth transition between notes). 
  64.  
  65. : The stacato command must begin with the 'S' character (not case sensitive)
  66.   followed by white space then the duration (in milliseconds).  The default 
  67.   duration is 0 (disabled).
  68.   
  69. Stacato 10
  70.  
  71. : To play notes from octaves other than the default octave (4), you can either
  72.   change the current default octave (with the Octave command) or specify the
  73.   octave with the note.  To play a low C for 1 second, we will use the
  74.   following command:
  75.  
  76. c1 5
  77.  
  78. : When we don't specify the octave number, the default octave is used.  To
  79.   change the default octave number, we can use the following command:
  80.  
  81. Octave 3
  82.  
  83. Visual        Now we will play a C major scale (octave 3):
  84.  
  85. c 2        Comments can follow any command (except Visual)
  86. d 2
  87. e 2
  88. f 2
  89. g 2
  90. a 2
  91. b 2
  92.  
  93. : To adjust the current default octave, we can use the plus (+) and minus
  94.   (-) symbols:
  95.  
  96. Octave +1
  97.  
  98. Visual        Another C major scale (now in octave 4).
  99.  
  100. c 2
  101. d 2
  102. e 2
  103. f 2
  104. g 2
  105. a 2
  106. b 2
  107.  
  108. Visual        Rest a little
  109.  
  110. Rest 5
  111.  
  112. : When specifying notes, the sounded frequency is based on a default pitch for
  113.   middle C.  The default starts at 523.50Hz but can be adjusted with the Pitch
  114.   command.  This is useful for created de-tuning or bend effects.  The Pitch
  115.   command can be used to specify a default pitch or adjust the current default
  116.   pitch up (+) or down (-).
  117.  
  118. Visual        Now for a pitch variation example.
  119.  
  120. : Lower timer count value and disable stacto for a smooth transition between
  121.   pitches
  122.  
  123. Time 40
  124. Stacato 0
  125.  
  126. : Starting at a3 and ascend gradually.
  127.  
  128. a3 1
  129. p  +.10
  130. a3 1
  131. p  +.10
  132. a3 1
  133. p  +.10
  134. a3 1
  135. p  +.10
  136. a3 1
  137. p  +.10
  138. a3 1
  139. p  +.10
  140. a3 1
  141. p  +.10
  142. a3 1
  143. p  +.10
  144. a3 1
  145. p  +.10
  146. a3 1
  147. p  +.10
  148. a3 1
  149. p  +.10
  150. a3 1
  151. p  +.10
  152. a3 1
  153. p  +.10
  154. a3 1
  155. p  +.10
  156. a3 1
  157. p  +.10     Kind of repetitive, huh?
  158. a3 1
  159. p  +.10
  160. a3 1
  161. p  +.10
  162. a3 1
  163. p  +.10
  164. a3 1
  165. p  +.10
  166. a3 1
  167. p  +.10
  168. a3 1
  169. p  +.10
  170. a3 1
  171. p  +.10
  172. a3 1
  173. p  +.10
  174. a3 1
  175. p  +.10
  176. a3 1
  177. p  +.10
  178. a3 1
  179. p  +.10
  180. a3 1
  181. p  +.10
  182. a3 1
  183. p  +.10
  184. a3 1
  185. p  +.10
  186. a3 1
  187. p  +.10
  188.  
  189. : Now descend quickly
  190.  
  191. a3 1
  192. p  -1.0
  193. a3 1
  194. p  -1.0
  195. a3 1
  196. p  -1.0
  197. a3 1
  198. p  -1.0
  199. a3 1
  200. p  -1.0
  201. a3 1
  202. p  -1.0
  203. a3 1
  204. p  -1.0
  205. a3 1
  206. p  -1.0
  207. a3 1
  208. p  -1.0
  209. a3 1
  210. p  -1.0
  211. a3 1
  212. p  -1.0
  213. a3 1
  214. p  -1.0
  215. a3 1
  216. p  -1.0
  217. a3 1
  218. p  -1.0
  219. a3 1
  220. p  -1.0
  221. a3 1
  222. p  -1.0
  223. a3 1
  224. p  -1.0
  225. a3 1
  226. p  -1.0
  227. a3 1
  228. p  -1.0
  229. a3 1
  230. p  -1.0
  231. a3 1
  232. p  -1.0
  233. a3 1
  234. p  -1.0
  235. a3 1
  236. p  -1.0
  237. a3 1
  238. p  -1.0
  239.  
  240. : Now we're going to set-up and play a song
  241.  
  242. Visual        The Entertainer
  243.  
  244. pitch    323.50    All commands can be abreviated with just one character
  245. t    200
  246. s    10
  247. r    10    Rest before we begin
  248.  
  249. :intro
  250.  
  251. o    6
  252.  
  253. d    1
  254. e    1
  255. c    1
  256. o      -1
  257. a    2
  258. b    1
  259. g    1
  260. r    1
  261.  
  262. d    1
  263. e    1
  264. c    1
  265. o      -1
  266. a    2
  267. b    1
  268. g    1
  269. r    1
  270.  
  271. d    1
  272. e    1
  273. c    1
  274. o      -1
  275. a    2
  276. b    1
  277. a    1
  278. G    1
  279. g    2
  280. r    2
  281.  
  282. g5    1
  283. r    1
  284.  
  285. : begin
  286. o    5
  287.  
  288. d4    1
  289. D4    1
  290. e4    1
  291. c5    2
  292. e4    1
  293. c5    2
  294. e4    1
  295. c5      3
  296.  
  297. a3    1
  298. r    1
  299. g3    1
  300.  
  301. c    1
  302. d    1
  303. D    1
  304. e    1
  305. c    1
  306. d    1
  307. e    2
  308. b4    1
  309. d    2
  310. c    1
  311.  
  312. r    1
  313.  
  314. g3    1
  315. r    1
  316. g3    1
  317. r    1
  318.  
  319. d4    1
  320. D4    1
  321. e4    1
  322. c5    2
  323. e4    1
  324. c5    2
  325. e4    1
  326. c5      3
  327.  
  328. a3    1
  329. r    1
  330. g3      1
  331. r    1
  332.  
  333. a4    1
  334. g4    1
  335. F4    1
  336. a4    1
  337. c5    1
  338. e5    2
  339. d5    1
  340. c5    1
  341. b4    1
  342. d5    1
  343.  
  344. r    1
  345. g3    1
  346. r    1
  347. a3    1
  348. r    1
  349.  
  350. d4    1
  351. D4    1
  352. e4    1
  353. c5    2
  354. e4    1
  355. c5    2
  356. e4    1
  357. c5      3
  358.  
  359. a3    1
  360. r    1
  361. g3      1
  362.  
  363. c    1
  364. d    1
  365. D    1
  366. e    1
  367. c    1
  368. d    1
  369. e    2
  370. b4    1
  371. d    2
  372. c    1
  373.  
  374. r    1
  375.  
  376. g3    1
  377. r    1
  378. g3    1
  379. r       1
  380.  
  381. c    1
  382. d    1
  383. e    1
  384. c    1
  385. d    1
  386. e       2
  387.  
  388. c    1
  389. d    1
  390. c    1
  391. e    1
  392. c    1
  393. d    1
  394. e    2
  395.  
  396. c    1
  397. d    1
  398. c    1
  399. e    1
  400. c    1
  401. d    1
  402. e       2
  403. b4    1
  404. d    2
  405. c       1
  406.  
  407. r    1
  408. g3    1
  409. r    1
  410. a3    1
  411. r       1
  412.  
  413. : repeat
  414.  
  415. d4    1
  416. D4    1
  417. e4    1
  418. c5    2
  419. e4    1
  420. c5    2
  421. e4    1
  422. c5      3
  423.  
  424. a3    1
  425. r    1
  426. g3    1
  427.  
  428. c    1
  429. d    1
  430. D    1
  431. e    1
  432. c    1
  433. d    1
  434. e    2
  435. b4    1
  436. d    2
  437. c    1
  438.  
  439. r    1
  440.  
  441. g3    1
  442. r    1
  443. g3    1
  444. r    1
  445.  
  446. d4    1
  447. D4    1
  448. e4    1
  449. c5    2
  450. e4    1
  451. c5    2
  452. e4    1
  453. c5      3
  454.  
  455. a3    1
  456. r    1
  457. g3      1
  458. r    1
  459.  
  460. a4    1
  461. g4    1
  462. F4    1
  463. a4    1
  464. c5    1
  465. e5    2
  466. d5    1
  467. c5    1
  468. b4    1
  469. d5    1
  470.  
  471. r    1
  472. g3    1
  473. r    1
  474. a3    1
  475. r    1
  476.  
  477. d4    1
  478. D4    1
  479. e4    1
  480. c5    2
  481. e4    1
  482. c5    2
  483. e4    1
  484. c5      3
  485.  
  486. a3    1
  487. r    1
  488. g3      1
  489.  
  490. c    1
  491. d    1
  492. D    1
  493. e    1
  494. c    1
  495. d    1
  496. e    2
  497. b4    1
  498. d    2
  499. c    1
  500.  
  501. r    1
  502.  
  503. g3    1
  504. r    1
  505. g3    1
  506. r       1
  507.  
  508. c    1
  509. d    1
  510. e    1
  511. c    1
  512. d    1
  513. e       2
  514.  
  515. c    1
  516. d    1
  517. c    1
  518. e    1
  519. c    1
  520. d    1
  521. e    2
  522.  
  523. c    1
  524. d    1
  525. c    1
  526. e    1
  527. c    1
  528. d    1
  529. e       2
  530. b4    1
  531. d    2
  532. c       1
  533.  
  534. r    1
  535. g3    1
  536. r    1
  537. c3    1
  538.  
  539.  
  540.