public MonosynthEditor(Synth synthRef)
        {
            theSynth = synthRef;
            InitializeComponent();

            portSelector.Items.AddRange(theSynth.availablePorts);
        }
        public MonosynthEditor(Synth synthRef, MonosynthVSTICommandStub cmdStub)
        {
            theSynth = synthRef;
              theCmdStub = cmdStub;
              InitializeComponent();

              portSelector.Items.AddRange(theSynth.availablePorts);

              paramUpdaters = new Dictionary<int, paramUpdater>();
              paramUpdaters.Add(0,updateLFOWave);
              paramUpdaters.Add(1,updateVCOWave);
              paramUpdaters.Add(2, (F) => { updateToggle(LFOInvertButton, F); });
              paramUpdaters.Add(3, updateLFOMode);
              paramUpdaters.Add(4, (F) => { updateToggle(VCFPunchButton, F); });
              paramUpdaters.Add(5, updateVCFMode);
              paramUpdaters.Add(6, (F) => { updateToggle(NoteHoldButton, F); });
              paramUpdaters.Add(7, (F) => { updateScroller(LFOBendScroller,F);});
              paramUpdaters.Add(8, (F) => { updateScroller(LFOFilterScroller,F);});
              paramUpdaters.Add(9, (F) => { updateScroller(AttackScroller,F);});
              paramUpdaters.Add(10, (F) => { updateScroller(ReleaseScroller, F); });
              paramUpdaters.Add(11, (F) => { updateScroller(LFORateScroller,F);});
              paramUpdaters.Add(12, (F) => { updateScroller(VCFResonance,F);});
              paramUpdaters.Add(13, (F) => { updateScroller(EnvFilterScroller,F);});
              paramUpdaters.Add(14, (F) => { updateScroller(VCFCutoff,F);});
              paramUpdaters.Add(15, (F) => { updateScroller(PWMScroller,F);});
              paramUpdaters.Add(16, (F) => { updateScroller(LFOPWMScroller,F);});
              paramUpdaters.Add(17, (F) => { updateScroller(GlideTimeScroller,F);});
              paramUpdaters.Add(18, (F) => { updateToggle(GlideOnButton, F); });
              paramUpdaters.Add(19, (F) => { updateNumber(transposeNumber, F); });
        }
 public void LoadUnloadSoundFont()
 {
     using (var syn = new Synth (NewAlsaSettings ()))
     using (var audio = new AudioDriver (syn.Settings, syn)) {
         syn.LoadSoundFont ("/usr/share/sounds/sf2/FluidR3_GS.sf2", false);
         Assert.AreEqual (1, syn.FontCount, "FontCount");
         for (int i = 0; i < 16; i++)
             syn.SoundFontSelect (i, 1);
         syn.UnloadSoundFont (1, true);
         Assert.AreEqual (0, syn.FontCount, "FontCount");
     }
 }
        public MonosynthVSTICommandStub()
        {
            theSynth = new Synth();

            progs = new SynthProgram[NUM_PROGS];

            for(int i=0;i<NUM_PROGS;++i)
            {
              progs[i] = new SynthProgram("program "+i.ToString(),theSynth.parameters.Length);
            }

            progIndex = 0;
        }
 public void Properties()
 {
     using (var syn = new Synth (NewAlsaSettings ())) {
         Assert.AreEqual (0, syn.FontCount, "FontCount");
         Assert.AreEqual (0, syn.ActiveVoiceCount, "ActiveVoiceCount");
         Assert.AreEqual (1, syn.AudioChannelCount, "AudioChannelCount");
         Assert.AreEqual (1, syn.AudioGroupCount, "AudioGroupCount");
         Assert.AreEqual (64, syn.InternalBufferSize, "InternalBufferSize");
         Assert.AreEqual (16, syn.MidiChannelCount, "MidiChannelCount");
         Assert.AreEqual (0, syn.NumberOfChorusVoices, "NumberOfChorusVoices");
         Assert.AreEqual (256, syn.Polyphony, "Polyphony");
     }
 }
 public MonosynthVSTICommandStub()
 {
     theSynth = new Synth();
 }
Esempio n. 7
0
        public void GetBankTest1()
        {
            var _result = Synth.GetBank(0);

            AreEqual(0, _result);
        }
Esempio n. 8
0
 public void CreateAudioDriver()
 {
     using (var syn = new Synth(NewAlsaSettings()))
         using (var audio = new AudioDriver(syn.Settings, syn))
             TextWriter.Null.WriteLine();
 }
Esempio n. 9
0
 public void SystemReset()
 {
     using (var syn = new Synth(NewAlsaSettings()))
         syn.SystemReset();
 }
Esempio n. 10
0
 public Voice(Synth synth)
 {
     _synth = synth;
 }
Esempio n. 11
0
 public override void Execute(ICraftActions craftActions, bool isSuccess)
 {
     craftActions.UseCraftPoints(15);
     craftActions.UseDurability(10);
     craftActions.Synth(Synth.FromRawValue(40));
 }
Esempio n. 12
0
 public void Speak(string message)
 {
     Synth.Speak(message);
 }
Esempio n. 13
0
 private void GenerateSound()
 {
     var sfxParams = GetSynthParamsFromInputs();
     var sfx = new Synth(sfxParams);
 }
Esempio n. 14
0
 public Synth RequestSynth(Synth prefab)
 {
     return(RequestSynth(prefab.Wave, prefab));
 }
Esempio n. 15
0
 public void SystemReset()
 {
     using (var syn = new Synth (NewAlsaSettings ()))
         syn.SystemReset ();
 }
Esempio n. 16
0
 public Voice(Synth synth)
 {
     _synth = synth;
 }
Esempio n. 17
0
 public override void Execute(ICraftActions craftActions, bool isSuccess)
 {
     craftActions.UseDurability(10);
     craftActions.Synth(Synth.FromRawValue(20));
     craftActions.Touch(100);
 }
Esempio n. 18
0
 public void CreateAudioDriver()
 {
     using (var syn = new Synth (NewAlsaSettings ()))
         using (var audio = new AudioDriver (syn.Settings, syn))
             TextWriter.Null.WriteLine ();
 }