Exemple #1
0
        public ChannelPreset ExportChannelPreset()
        {
            ChannelPreset preset = new ChannelPreset();

            preset.Volume                  = InstrumentPlugin.Volume;
            preset.Pan                     = InstrumentPlugin.Pan;
            preset.KeyZoneActive           = InstrumentPlugin.KeyZoneActive;
            preset.KeyZoneLower            = InstrumentPlugin.KeyZoneLower;
            preset.KeyZoneUpper            = InstrumentPlugin.KeyZoneUpper;
            preset.Transpose               = InstrumentPlugin.Transpose;
            preset.ExpressionPedalFunction = InstrumentPlugin.ExpressionPedalFunction;
            preset.ExpressionPedalInvert   = InstrumentPlugin.ExpressionPedalInvert;
            preset.NoteDrop                = InstrumentPlugin.NoteDrop;
            preset.NoteDropDelayIndex      = InstrumentPlugin.NoteDropDelayIndex;
            preset.MidiChannel             = InstrumentPlugin.MidiChannel;
            preset.SustainEnabled          = InstrumentPlugin.SustainEnabled;

            preset.InstrumentVstPreset = InstrumentPlugin.VstPreset;

            for (int i = 0; i < NumberOfEffectPlugins; i++)
            {
                preset.EffectVstPresets[i] = EffectPlugins[i].VstPreset;
            }
            return(preset);
        }
Exemple #2
0
        public void ImportChannelPreset(ChannelPreset preset)
        {
            //int 0...127 value to float 0.0...1.0
            InstrumentPlugin.Volume                  = preset.Volume;
            InstrumentPlugin.Pan                     = preset.Pan;
            InstrumentPlugin.KeyZoneActive           = preset.KeyZoneActive;
            InstrumentPlugin.KeyZoneLower            = preset.KeyZoneLower;
            InstrumentPlugin.KeyZoneUpper            = preset.KeyZoneUpper;
            InstrumentPlugin.Transpose               = preset.Transpose;
            InstrumentPlugin.ExpressionPedalFunction = preset.ExpressionPedalFunction;
            InstrumentPlugin.ExpressionPedalInvert   = preset.ExpressionPedalInvert;
            InstrumentPlugin.NoteDrop                = preset.NoteDrop;
            InstrumentPlugin.NoteDropDelayIndex      = preset.NoteDropDelayIndex;
            InstrumentPlugin.MidiChannel             = preset.MidiChannel;
            InstrumentPlugin.SustainEnabled          = preset.SustainEnabled;
            InstrumentPlugin.VstPreset               = preset.InstrumentVstPreset;

            for (int i = 0; i < NumberOfEffectPlugins; i++)
            {
                EffectPlugins[i].VstPreset = preset.EffectVstPresets[i];
            }

            if (PresetImported != null)
            {
                PresetImported(this, new ChannelPresetImportEventArgs(preset));
            }
        }
Exemple #3
0
 private void xmlPresetComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (xmlPresetComboBox.SelectedItem != null)
     {
         ChannelPreset temp = (ChannelPreset)xmlPresetComboBox.SelectedItem;
         DolFileTextBox.Text = temp.DolFilePath;
         LoaderFile          = temp.DolFilePath;
         NotifyPropertyChanged("LoaderFile");
         origTitIDTextBox.Text = temp.OriginalTitleID;
         OriginalTitleId       = temp.OriginalTitleID;
         NotifyPropertyChanged("OriginalTitleId");
     }
 }
Exemple #4
0
 public ChannelPresetImportEventArgs(ChannelPreset preset)
 {
     ChannelPreset = preset;
 }