コード例 #1
0
        public void Initialise(Channel channel)
        {
            _channel = channel;
            _plugins = PluginHelper.FindVstPlugins().Select(plugin => new PluginModel
            {
                Location = plugin.Location,
                Name     = plugin.Name
            }).ToList();

            listBuilder.PropertiesButtonVisible = true;
            BindData();
        }
コード例 #2
0
        public void BindSamplerVstPlugins()
        {
            var plugins = new List <VstPluginModel>
            {
                new VstPluginModel
                {
                    Location = "",
                    Name     = "(None)"
                }
            };

            foreach (var plugin in PluginHelper.FindVstPlugins())
            {
                var model = new VstPluginModel
                {
                    Location = plugin.Location,
                    Name     = plugin.Name
                };
                plugins.Add(model);
            }

            cmbSamplerVSTPlugins.DataSource = null;
            cmbSamplerVSTPlugins.Items.Clear();
            cmbSamplerVSTPlugins.DisplayMember = "Name";
            cmbSamplerVSTPlugins.ValueMember   = "Location";
            cmbSamplerVSTPlugins.DataSource    = plugins;

            cmbSamplerVSTPlugins.SelectedIndex = 0;
            for (var i = 0; i < cmbSamplerVSTPlugins.Items.Count; i++)
            {
                var plugin = cmbSamplerVSTPlugins.Items[i] as VstPluginModel;
                if (plugin == null || plugin.Location != CurrentSamplerVstPluginLocation)
                {
                    continue;
                }
                cmbSamplerVSTPlugins.SelectedIndex = i;
                break;
            }
        }
コード例 #3
0
        public void BindTrackFxvstPlugins2()
        {
            var plugins = new List <VstPluginModel>
            {
                new VstPluginModel
                {
                    Location = "",
                    Name     = "(None)"
                }
            };

            plugins.AddRange(PluginHelper.FindVstPlugins()
                             .Select(plugin => new VstPluginModel
            {
                Location = plugin.Location,
                Name     = plugin.Name
            }));

            cmbTrackFXVSTPlugins2.DataSource = null;
            cmbTrackFXVSTPlugins2.Items.Clear();
            cmbTrackFXVSTPlugins2.DisplayMember = "Name";
            cmbTrackFXVSTPlugins2.ValueMember   = "Location";
            cmbTrackFXVSTPlugins2.DataSource    = plugins;

            cmbTrackFXVSTPlugins2.SelectedIndex = 0;
            for (var i = 0; i < cmbTrackFXVSTPlugins2.Items.Count; i++)
            {
                var plugin = cmbTrackFXVSTPlugins2.Items[i] as VstPluginModel;
                if (plugin != null && plugin.Location != CurrentTrackFxvstPluginLocation2)
                {
                    continue;
                }
                cmbTrackFXVSTPlugins2.SelectedIndex = i;
                break;
            }
        }