About coding a Guru file

Hi,

Now I’m trying to make a Guru file for my m-audio Venom with seeing and learning from other people’s files. But since I’m totally lua noob and now I’m at a standstill. Please help me… :rolleyes:/

I want to make the FX part like this image;

3925 venom_effect_test.gif

So I refered “Waldorf_Blofeld.lua” (it’s really great, btw), and copied the code of the FX part basically. But it’s a bit different from the Venom’s FX part. I want to “exchange” each FX completely when I select a one in the drop-box.

This is the code which I’ve made so far (won’t work correctly :smashed: );

3926 Venom_Effect_Test.lua

Click to view contents
  
local Group_Insert_FX = Group {  
  
 name = "Insert_FX",  
  
 Parameter {  
 id = "Insert_FX_Type",  
 name = "Type",  
 type = "nrpn",  
 number = 288,  
 gui_type = "dropdown",  
 items = {"OFF","EQ Bandpass","Compressor"},  
 value_callback = function(parameter,midi_value)  
 local vb = parameter.synth_definition.view_builder  
 if parameter:value() == 0 then  
 vb.views["OFF_Parameter1"].active = false  
 vb.views["label_OFF_Parameter1"].text = ""  
 vb.views["OFF_Parameter2"].active = false  
 vb.views["label_OFF_Parameter2"].text = ""  
 vb.views["OFF_Parameter3"].active = false  
 vb.views["label_OFF_Parameter3"].text = ""  
 vb.views["OFF_Parameter4"].active = false  
 vb.views["label_OFF_Parameter4"].text = ""  
 vb.views["OFF_Parameter5"].active = false  
 vb.views["label_OFF_Parameter5"].text = ""  
 vb.views["OFF_Parameter6"].active = false  
 vb.views["label_OFF_Parameter6"].text = ""  
 vb.views["OFF_Parameter7"].active = false  
 vb.views["label_OFF_Parameter7"].text = ""  
  
 elseif parameter:value() == 1 then  
 vb.views["Effect1_Parameter1"].active = true  
 vb.views["label_Effect1_Parameter1"].text = "Active"  
 vb.views["Effect1_Parameter2"].active = true  
 vb.views["label_Effect1_Parameter2"].text = "Gain"  
 vb.views["Effect1_Parameter3"].active = true  
 vb.views["label_Effect1_Parameter3"].text = "Q"  
 vb.views["Effect1_Parameter4"].active = true  
 vb.views["label_Effect1_Parameter4"].text = "Frequency"  
 vb.views["Effect1_Parameter5"].active = false  
 vb.views["label_Effect1_Parameter5"].text = ""  
 vb.views["Effect1_Parameter6"].active = false  
 vb.views["label_Effect1_Parameter6"].text = ""  
 vb.views["Effect1_Parameter7"].active = false  
 vb.views["label_Effect1_Parameter7"].text = ""  
  
 elseif parameter:value() == 2 then  
 vb.views["Effect2_Parameter1"].active = true  
 vb.views["label_Effect2_Parameter1"].text = "Active"  
 vb.views["Effect2_Parameter2"].active = true  
 vb.views["label_Effect2_Parameter2"].text = "Attack"  
 vb.views["Effect2_Parameter3"].active = true  
 vb.views["label_Effect2_Parameter3"].text = "Release"  
 vb.views["Effect2_Parameter4"].active = true  
 vb.views["label_Effect2_Parameter4"].text = "Threshold"  
 vb.views["Effect2_Parameter5"].active = true  
 vb.views["label_Effect2_Parameter5"].text = "Ratio"  
 vb.views["Effect2_Parameter6"].active = true  
 vb.views["label_Effect2_Parameter6"].text = "Make Up"  
 vb.views["Effect2_Parameter7"].active = false  
 vb.views["label_Effect2_Parameter7"].text = ""  
  
  
 end  
 end  
  
 },  
  
 Parameter {  
 id = "OFF_Parameter1",  
 name = "Parameter 1",  
 type = "nrpn",  
 number = 288,  
 items = {"ON","OFF"},  
 item_values = {0,0},  
 default_value = 2,  
 },  
  
 Parameter {  
 id = "OFF_Parameter2",  
 name = "Parameter 2",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "OFF_Parameter3",  
 name = "Parameter 3",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "OFF_Parameter4",  
 name = "Parameter 4",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "OFF_Parameter5",  
 name = "Parameter 5",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "OFF_Parameter6",  
 name = "Parameter 6",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "OFF_Parameter7",  
 name = "Parameter 7",  
 type = "nrpn",  
 number = 0,  
 },  
  
  
  
 Parameter {  
 id = "Effect1_Parameter1",  
 name = "Parameter 1",  
 type = "nrpn",  
 number = 288,  
 items = {"ON","OFF"},  
 item_values = {1,0},  
 default_value = 2,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter2",  
 name = "Parameter 2",  
 type = "nrpn",  
 number = 309,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter3",  
 name = "Parameter 3",  
 type = "nrpn",  
 number = 311,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter4",  
 name = "Parameter 4",  
 type = "nrpn",  
 number = 310,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter5",  
 name = "Parameter 5",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter6",  
 name = "Parameter 6",  
 type = "nrpn",  
 number = 0,  
 },  
  
 Parameter {  
 id = "Effect1_Parameter7",  
 name = "Parameter 7",  
 type = "nrpn",  
 number = 0,  
 },  
  
  
  
  
 Parameter {  
 id = "Effect2_Parameter1",  
 name = "Parameter 1",  
 type = "nrpn",  
 number = 288,  
 items = {"ON","OFF"},  
 item_values = {2,0},  
 default_value = 2,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter2",  
 name = "Parameter 2",  
 type = "nrpn",  
 number = 328,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter3",  
 name = "Parameter 3",  
 type = "nrpn",  
 number = 329,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter4",  
 name = "Parameter 4",  
 type = "nrpn",  
 number = 330,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter5",  
 name = "Parameter 5",  
 type = "nrpn",  
 number = 331,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter6",  
 name = "Parameter 6",  
 type = "nrpn",  
 number = 332,  
 },  
  
 Parameter {  
 id = "Effect2_Parameter7",  
 name = "Parameter 7",  
 type = "nrpn",  
 number = 0,  
 },  
 }  
  
  
-- Synth definition  
return SynthDefinition {  
 id = "Venom_Effect_Test",  
 name = "Venom_Effect_Test",  
 author = "satobox",  
 beta = true,  
 --delay_between_midi_messages = 10,  
 omit_nrpn_lsb = true,  
 content_height = 610,  
  
  
 Section {  
  
 name = "LFO",  
  
  
 Group_Insert_FX  
 },  
}  
  
  
  

Thanks in advance.

Hmm, now I thought of a simple solution which is to show all FXs within 1 page like Novation A-station file. Maybe it will be a plain solution.

But, still I want to know how-to do like above if possible. :)/

I’ve finished it finally!!