mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-24 00:00:06 +02:00
21 lines
863 B
Plaintext
21 lines
863 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)")
|
|
("float" "bow_scale" "bowpress_env->scale * BOW_CONTROL_CHANGE_CONST"))
|
|
(INLINE-INTERPOLATION no)
|
|
(INTERNAL-SCALING bowpress_env)
|
|
(START (min bowpress_env))
|
|
(NOT-IN-INNER-LOOP "freq" "temp_ret_value")
|
|
(CONSTANT "bow_scale")
|
|
(SAMPLE-RATE "sr")
|
|
(TERMINATE (min bowpress_env))
|
|
(INNER-LOOP "controlChange(mybow, 128, bow_scale * bowpress_env);
|
|
output = (sample_type) tick(mybow)")
|
|
(SUPPORT-HEADER "#define BOW_CONTROL_CHANGE_CONST 128\n")
|
|
(SUPPORT-FUNCTIONS "#include \"instr.h\"\n#include \"upsample.h\"\n")
|
|
(FINALIZATION " deleteInstrument(susp->mybow);\n")
|
|
)
|