1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00
audacity/lib-src/libnyquist/nyquist/tran/instrmandolin.alg
2010-01-24 09:19:39 +00:00

26 lines
779 B
Plaintext

(INSTRMANDOLIN-ALG
(NAME "mandolin")
(ARGUMENTS ("time_type" "t0")("double" "freq") ("time_type" "d")
("double" "body_size")("double" "detune")("rate_type" "sr"))
(STATE ("struct instr *" "mymand" "initInstrument(MANDOLIN, round(sr));
controlChange(susp->mymand, 1, detune);
controlChange(susp->mymand, 2, MAND_CONTROL_CHANGE_CONST * body_size);")
("int" "temp_ret_value" "noteOn(susp->mymand, freq, 1.0)"))
(NOT-IN-INNER-LOOP "freq" "temp_ret_value" "body_size" "detune")
(SAMPLE-RATE "sr")
(TERMINATE (after "d"))
(INNER-LOOP "
output = (sample_type) tick(mymand)")
(SUPPORT-HEADER "
#define MAND_CONTROL_CHANGE_CONST 128
")
(SUPPORT-FUNCTIONS "
#include \"instr.h\"
")
(FINALIZATION "
deleteInstrument(susp->mymand);
")
)