mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 06:09:47 +02:00
26 lines
733 B
Plaintext
26 lines
733 B
Plaintext
(INSTRBOW-ALG
|
|
(NAME "bowed")
|
|
(ARGUMENTS ("double" "freq") ("sound_type" "bowpress_env") ("rate_type" "sr"))
|
|
(STATE ("struct instr *" "mybow" "initInstrument(BOWED, round(sr));
|
|
controlChange(susp->mybow, 1, 0.0);")
|
|
("int" "temp_ret_value" "noteOn(susp->mybow, freq, 1.0)"))
|
|
(START (min bowpress_env))
|
|
(NOT-IN-INNER-LOOP "freq" "temp_ret_value")
|
|
(SAMPLE-RATE "sr")
|
|
(ALWAYS-SCALE bowpress_env)
|
|
(TERMINATE (min bowpress_env))
|
|
(INNER-LOOP "
|
|
controlChange(mybow, 128, BOW_CONTROL_CHANGE_CONST * bowpress_env);
|
|
output = (sample_type) tick(mybow)")
|
|
(SUPPORT-HEADER "
|
|
#define BOW_CONTROL_CHANGE_CONST 128
|
|
")
|
|
(SUPPORT-FUNCTIONS "
|
|
#include \"instr.h\"
|
|
")
|
|
(FINALIZATION "
|
|
deleteInstrument(susp->mybow);
|
|
")
|
|
)
|
|
|