From e8382521c1a35ad59efea5e8cebb915a67c0008e Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 5 Jan 2011 18:25:04 +0100 Subject: Finished note-compiler, seems to work. TODO: CLI The note-compiler now also generates code for set_param, and a function has been added which returns a pointer to a newly created object (important for loading from a shared object). There's also a destroyer function. TODO: - write a CLI for the note-compiler - let the note-compiler issue the build-commands on his own - make the synth load instruments from shared objects --- note_compiler/templates/set_param.2 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 note_compiler/templates/set_param.2 (limited to 'note_compiler/templates/set_param.2') diff --git a/note_compiler/templates/set_param.2 b/note_compiler/templates/set_param.2 new file mode 100644 index 0000000..aaa21b4 --- /dev/null +++ b/note_compiler/templates/set_param.2 @@ -0,0 +1,34 @@ + case FILTER_ATTACK: + if (filter_params.enabled) + filter_envelope->set_attack(v*samp_rate/filter_update_frames >>SCALE); + else + output_note("NOTE: cannot set filter-attack when filter is disabled"); + break; + + case FILTER_DECAY: + if (filter_params.enabled) + filter_envelope->set_decay(v*samp_rate/filter_update_frames >>SCALE); + else + output_note("NOTE: cannot set filter-decay when filter is disabled"); + break; + + case FILTER_SUSTAIN: + if (filter_params.enabled) + filter_envelope->set_sustain(v); + else + output_note("NOTE: cannot set filter-sustain when filter is disabled"); + break; + + case FILTER_RELEASE: + if (filter_params.enabled) + filter_envelope->set_release(v*samp_rate/filter_update_frames >>SCALE); + else + output_note("NOTE: cannot set filter-release when filter is disabled"); + break; + + case FILTER_HOLD: + if (filter_params.enabled) + filter_envelope->set_hold(v!=0); + else + output_note("NOTE: cannot set filter-hold when filter is disabled"); + break; -- cgit v1.2.3