00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "scripts.h"
00017
00018 void guisetup_script(void)
00019 {
00020 mgk_data_type type;
00021 guisetup_script_context *cxt = mgk_node_context(mgk_current_node(),&type);
00022 if(cxt && (type & T_BUFFER)) {
00023 int i;
00024 char name[100];
00025 gui_define_button(ENV_RESET);
00026 gui_define_button(FILT_RESET);
00027 for(i = 1; i <= cxt->NumChannels; i++) {
00028 sprintf(name, CT_SINAMP, i);
00029 gui_define_control(name, 0.1, 10.0, 1.0);
00030 sprintf(name, CT_SINFREQ, i);
00031 gui_define_control(name, 0.0, cxt->SampRate * 0.49, cxt->SampRate * 0.05 * i);
00032 sprintf(name, CT_NOISEAMP, i);
00033 gui_define_control(name, 0.1, 10.0, 1.0);
00034 }
00035 }
00036 mgk_set_node_priority(mgk_current_node(),0);
00037 }
00038