diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-03-14 14:11:22 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-03-27 16:06:07 +0100 |
commit | 777f3406871ec6ea488602c108182444366d9137 (patch) | |
tree | d5342c3933913b5d5273b0f823353c026ebdb002 /plugins/LV2/makeplugin | |
parent | edcadc2599216491a85e19994bbb0c95ce501540 (diff) | |
download | airwindows-lv2-port-777f3406871ec6ea488602c108182444366d9137.tar.gz airwindows-lv2-port-777f3406871ec6ea488602c108182444366d9137.tar.bz2 airwindows-lv2-port-777f3406871ec6ea488602c108182444366d9137.zip |
LV2/makeplugin: Move type mapping to PluginInfo class.
Diffstat (limited to 'plugins/LV2/makeplugin')
-rwxr-xr-x | plugins/LV2/makeplugin | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/LV2/makeplugin b/plugins/LV2/makeplugin index ac9c353..809b967 100755 --- a/plugins/LV2/makeplugin +++ b/plugins/LV2/makeplugin @@ -63,23 +63,13 @@ plugin_slug = plugin_name.downcase target_dir = File.join(root, 'src', plugin_name) template_dir = File.join(root, 'Template') -def get_lv2_plugin_type(plugin_info) - case plugin_info.type - when 'Saturation' - 'DistortionPlugin' - when 'EQ' - 'EQPlugin' - else - 'EffectsPlugin' - end -end puts "Reading plugin info from cheatsheet..." pi = MakePlugin::PluginInfo.new(root, plugin_name) puts "Creating plugin #{pi.name}..." -puts "Type: #{pi.type}" +puts "Type: #{pi.type} (#{pi.raw_type})" puts "CTRL ports: #{pi.ctrl_ports.length}" Templates = %w{ @@ -99,7 +89,7 @@ begin .gsub('@NCtrlPorts@', pi.n_ctrl_ports.to_s) .gsub('@AssignParams@', make_param_assigns(pi.n_ctrl_ports)) .gsub('@TTLPortDefs@', make_lv2_port_defs(pi)) - .gsub('@TTLPluginType@', get_lv2_plugin_type(pi)) + .gsub('@TTLPluginType@', pi.type) fname = t.sub('Plugin', pi.name) |