home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / texts / boxes / sample3.lst < prev    next >
File List  |  1993-06-05  |  2KB  |  102 lines

  1. REM this programme makes digital frequencies
  2. REM r=rate
  3. REM r=31250
  4. r=20833.33333333
  5. REM n=length
  6. n=2048
  7. OPEN "o",#1,"27010spl.rom"
  8. RESTORE samples
  9. FOR i=0 TO 63
  10.   READ n$,f1,f2
  11.   IF f1=0 THEN
  12.     f1=r
  13.   ENDIF
  14.   IF f2=0 THEN
  15.     f2=r
  16.   ENDIF
  17.   PRINT "generating.... ";n$
  18.   p1=n/INT(f1*(n/r)+0.5)
  19.   PRINT 1/p1*r-f1,"tolerance of",f1
  20.   p2=n/INT(f2*(n/r)+0.5)
  21.   PRINT 1/p2*r-f2,"tolerance of",f2
  22.   FOR t=0 TO n-1
  23.     v1=SIN((t/p1-INT(t/p1))*2*PI)
  24.     v2=SIN((t/p2-INT(t/p2))*2*PI)
  25.     k=(v1+v2)*63+128
  26.     PRINT #1,CHR$(k);
  27.   NEXT t
  28. NEXT i
  29. CLOSE #1
  30. PRINT "done"
  31. ' Data file for frequencies
  32. '
  33. ' Samplebank 0
  34. samples:
  35. DATA "0",941,1336
  36. DATA "1",697,1209
  37. DATA "2",697,1336
  38. DATA "3",697,1477
  39. DATA "4",770,1209
  40. DATA "5",770,1336
  41. DATA "6",770,1477
  42. DATA "7",852,1209
  43. DATA "8",852,1336
  44. DATA "9",852,1477
  45. DATA "*",941,1209
  46. DATA "#",941,1477
  47. DATA "A",697,1633
  48. DATA "B",770,1633
  49. DATA "C",852,1633
  50. DATA "D",941,1633
  51. ' Samplebank 1
  52. DATA "0",1300,1500
  53. DATA "1", 700,900
  54. DATA "2", 700,1100
  55. DATA "3",1100,900
  56. DATA "4", 700,1300
  57. DATA "5",1300,900
  58. DATA "6",1100,1300
  59. DATA "7", 700,1500
  60. DATA "8",1500,900
  61. DATA "9",1100,1500
  62. DATA "KP1",1100,1700
  63. DATA "KP2",1300,1700
  64. DATA "ST",1500,1700
  65. DATA "C.11",700,1700
  66. DATA "C.12",900,1700
  67. DATA "DHLS",1850,1850
  68. ' Samplebank 2
  69. DATA "0",1740,1860
  70. DATA "1",1380,1500
  71. DATA "2",1380,1620
  72. DATA "3",1620,1500
  73. DATA "4",1380,1740
  74. DATA "5",1740,1500
  75. DATA "6",1620,1740
  76. DATA "7",1380,1860
  77. DATA "8",1860,1500
  78. DATA "9",1620,1860
  79. DATA "KP1",1620,1980
  80. DATA "KP2",1740,1980
  81. DATA "ST",1860,1980
  82. DATA "C.11",1380,1980
  83. DATA "C.12",1500,1980
  84. DATA "DHLS",1850,1850
  85. ' Samplebank 3
  86. DATA "C5 Clear Forward",2400,2600
  87. DATA "C5 Seize/C4 Binary 1",2400,2400
  88. DATA "C4 Binary 0",2040,2040
  89. DATA "C4 Compond",2040,2400
  90. DATA "C3 Seize/Pulse",2280,2280
  91. DATA "US/Can Seize",2600,2600
  92. DATA "Spare 1",0,0
  93. DATA "Spare 2",0,0
  94. DATA "Guard Tone",2100,2100
  95. DATA "US Ringing",440,480
  96. DATA "US Dialtone",350,440
  97. DATA "US Busy",480,620
  98. DATA "Sw Dialtone/Busy",440,440
  99. DATA "German Tone",460,460
  100. DATA "US/DK Redbox",1700,2200
  101. DATA "Silence!",0,0
  102.