You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

226 lines
4.0KB

  1. ;http://www.spinsemi.com/get_spn.php?spn=dance_ir_h_l.spn&prodnum=SPN1001
  2. ;dance patchfor disco mixers:
  3. ;pot 1 = Reverb to infinite RT, scales in and out levels
  4. ;pot 2 = High pass filter (2 pole peaking, 8 ocatves)
  5. ;pot 3 = Low pass filter (2 pole peaking, 8 ocatves)
  6. ;filters are great for actively modifying program material;
  7. ;reveb can capture tonality for filter manipulation.
  8. ;beware, infinite reverb turns off input!
  9. equ krt reg0
  10. equ kin reg1
  11. equ kmix reg2
  12. equ hpal reg3
  13. equ hpbl reg4
  14. equ lpal reg5
  15. equ lpbl reg6
  16. equ hpar reg7
  17. equ hpbr reg8
  18. equ lpar reg9
  19. equ lpbr reg10
  20. equ kfh reg11
  21. equ kfl reg12
  22. equ temp reg13
  23. equ rmixl reg14
  24. equ rmixr reg15
  25. equ hpoutl reg16
  26. equ hpoutr reg17
  27. equ hbyp reg18
  28. equ lbyp reg19
  29. mem ap1 202
  30. mem ap2 541
  31. mem ap3 1157
  32. mem ap4 1903
  33. mem dap1a 2204
  34. mem dap1b 3301
  35. mem del1 4456
  36. mem dap2a 3532
  37. mem dap2b 3201
  38. mem del2 6325
  39. equ kap 0.6
  40. equ kql -0.2
  41. equ kqh -0.2
  42. ;prepare pots to affect control variables:
  43. ;pot0 controls reverb time, but also affects input drive level;
  44. ;reveb time is moderate up to about mid position, then increases
  45. ;to infinity (or nearly) at full position.
  46. ;input drive is constant, but decreases at the full pot0 position.
  47. ;output mix is varied over the first half of pot0, then remains
  48. ;high to the end of pot0's range.
  49. rdax pot0,1.999 ;get pot0, clip the upper half of pot0's range.
  50. wrax kmix,0 ;write the output mix value
  51. rdax pot0,-1 ;get pot0 again, 0 to -1
  52. sof 1,0.999 ;now +1 to 0
  53. sof 1.999,0 ;now +1 until midpint, then decreases to 0
  54. wrax kin,0 ;write the input attenuator value
  55. rdax pot0,1 ;get pot0 again
  56. wrax krt,1 ;save in krt, keep in ACC
  57. sof 1,-0.5 ;subtract 1/2
  58. skp gez,2 ;skp if pot is in upper half of range
  59. sof 0,0.5 ;load accumulator with +0.5
  60. wrax krt,0 ;overwrite if pot is in lower half of range
  61. ;now prepare pot1 for HP sweeping.
  62. ;both frequency controls are exponential, and frequency increases
  63. ;with clockwise pot rotation. Target Kf ranges are from .001 to 1.0
  64. clr
  65. rdax pot1,1 ;get pot1
  66. sof 0.5,-0.5 ;ranges -0.5 to 0
  67. exp 1,0
  68. wrax kfh,0 ;write to HP filter control
  69. rdax pot2,1 ;get pot2
  70. sof 0.5,-0.5 ;ranges -0.5 to 0
  71. exp 1,0
  72. wrax kfl,0 ;write to LP filter control
  73. ;now derive filter bypass functions (at open conditions)
  74. rdax pot1,-1
  75. sof 1,0.999 ;ranges +1 to 0
  76. wrax temp,1
  77. mulx temp
  78. mulx temp
  79. wrax hbyp,0
  80. rdax pot2,1 ;read pot2 (LP) again
  81. mulx pot2
  82. mulx pot2
  83. mulx pot2
  84. wrax lbyp,0
  85. ;now do reverb, simple, twin loop, mono drive:
  86. rdax adcl,0.25
  87. rdax adcr,0.25 ;get inputs, leave headroom
  88. mulx kin ;scale by input attenuator
  89. rda ap1#,kap ;4 all passes:
  90. wrap ap1,-kap
  91. rda ap2#,kap
  92. wrap ap2,-kap
  93. rda ap3#,kap
  94. wrap ap3,-kap
  95. rda ap4#,kap
  96. wrap ap4,-kap
  97. wrax temp,0 ;write ap output to temp reg
  98. rda del2#,1
  99. mulx krt
  100. rdax temp,1
  101. rda dap1a#,kap
  102. wrap dap1a,-kap
  103. rda dap1b#,kap
  104. wrap dap1b,-kap
  105. wra del1,0
  106. rda del1#,1
  107. mulx krt
  108. rdax temp,1
  109. rda dap2a#,kap
  110. wrap dap2a,-kap
  111. rda dap2b#,kap
  112. wrap dap2b,-kap
  113. wra del2,0
  114. ;now mix the inputs with the reverb:
  115. rdax adcl,-1
  116. rda del1,1.5
  117. mulx pot0
  118. rdax adcl,1
  119. wrax rmixl,0
  120. rdax adcr,-1
  121. rda del2,1.5
  122. mulx pot0
  123. rdax adcr,1
  124. wrax rmixr,0
  125. ;Reverb outputs are at rmixl and rmixr.
  126. ;now do two filters, start with the high pass, stereo.
  127. ;use the reveb mix for inputs, cascade the filter banks.
  128. rdax hpal,1
  129. mulx kfh
  130. rdax hpbl,1
  131. wrax hpbl,-1
  132. rdax hpal,kqh
  133. rdax rmixl,1
  134. wrax hpoutl,1 ;HP output
  135. mulx kfh
  136. rdax hpal,1
  137. wrax hpal,0
  138. rdax hpar,1
  139. mulx kfh
  140. rdax hpbr,1
  141. wrax hpbr,-1
  142. rdax hpar,kqh
  143. rdax rmixr,1
  144. wrax hpoutr,1 ;HP output
  145. mulx kfh
  146. rdax hpar,1
  147. wrax hpar,0
  148. ;bypass if pot1 is fully counterclockwise:
  149. rdax hpoutl,-1
  150. rdax rmixl,1
  151. mulx hbyp
  152. rdax hpoutl,1
  153. wrax hpoutl,0
  154. rdax hpoutr,-1
  155. rdax rmixr,1
  156. mulx hbyp
  157. rdax hpoutr,1
  158. wrax hpoutr,0
  159. ;now do cascaded low pass:
  160. rdax lpal,1
  161. mulx kfl
  162. rdax lpbl,1
  163. wrax lpbl,-1
  164. rdax lpal,kql
  165. rdax hpoutl,1
  166. mulx kfl
  167. rdax lpal,1
  168. wrax lpal,0
  169. rdax lpar,1
  170. mulx kfl
  171. rdax lpbr,1
  172. wrax lpbr,-1
  173. rdax lpar,kql
  174. rdax hpoutr,1
  175. mulx kfl
  176. rdax lpar,1
  177. wrax lpar,0
  178. rdax lpbl,-1
  179. rdax hpoutl,1
  180. mulx lbyp
  181. rdax lpbl,1
  182. wrax dacl,0
  183. rdax lpbr,-1
  184. rdax hpoutr,1
  185. mulx lbyp
  186. rdax lpbr,1
  187. wrax dacr,0