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.
26 lines
999 B
26 lines
999 B
; Generated by kX DSP Editor - microcode dump
|
|
name "K-LFO";
|
|
copyright "Copyright (c) 2002-2003, Kevin Horden";
|
|
engine "kX";
|
|
created "29/11/2003";
|
|
guid "e9507ecd-a5ed-41ec-b7d0-5902ab1c25f1";
|
|
; Low Frequency Triangle and Square Oscilator
|
|
; For driving vib, trem, phase, chorus etc.
|
|
; Rate is scaled so 0%-100% equals 0.2 Hz to 20 Hz
|
|
; Registers
|
|
output Square
|
|
output Triangle
|
|
control Rate=0.4 ; Initial slider position is at 6.6 Hz
|
|
static tri=0.0 ; Counter for triangle wave
|
|
static dir=1.0 ; direction of wave
|
|
temp RateScaled
|
|
|
|
; Code
|
|
exp Ratescaled,Rate,7,0
|
|
interp RateScaled,0.000001,Ratescaled,0.0025 ; scale the slider control
|
|
macs tri, tri,RateScaled,dir ; increment/decrement the tri counter
|
|
skip ccr, ccr, 0x200, 0x1 ; if there is a saturation then
|
|
macsn dir, 0.0, dir, 1.0 ; inversion.
|
|
macs Triangle, 0.0, tri, 1.0 ; output the triangle wave
|
|
tstneg Square, tri, 1.0, 0.0 ; square the wave and output it.
|
|
end
|