Esempio n. 1
0
        public bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
        {
            if (_commands != null)
            {
                return(_commands.GetMidiKeyName(midiKeyName, channel));
            }

            return(false);
        }
Esempio n. 2
0
        public void Test_MaxLength_VstVstMidiKeyName_Name()
        {
            VstMidiKeyName mkn = new VstMidiKeyName();

            Assert.AreEqual(null, mkn.Name);

            mkn.Name = String.Empty;
            Assert.AreEqual(String.Empty, mkn.Name);

            string testData = CreateString(Constants.MaxMidiNameLength);

            mkn.Name = testData;
            Assert.AreEqual(testData, mkn.Name);

            testData += "X";
            mkn.Name  = testData;
            Assert.Fail("should have thrown an exception.");
        }
Esempio n. 3
0
        public void Test_MaxLength_VstVstMidiKeyName_Name()
        {
            var mkn = new VstMidiKeyName();

            mkn.Name.Should().BeEmpty();

            mkn.Name = String.Empty;
            mkn.Name.Should().BeEmpty();

            string testData = CreateString(Constants.MaxMidiNameLength);

            mkn.Name = testData;
            mkn.Name.Should().Be(testData);

            testData += "X";
            mkn.Name  = testData;
            Assert.Fail("should have thrown an exception.");
        }
Esempio n. 4
0
 /// <summary>
 /// This call is forwarded to the <see cref="Jacobi.Vst.Core.Plugin.IVstPluginCommandStub"/> implementation.
 /// </summary>
 /// <param name="midiKeyName">Passed with the forwarded call.</param>
 /// <param name="channel">Passed with the forwarded call.</param>
 /// <returns>Returns the value returned from the forwarded call.</returns>
 public bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
 {
     return(_pluginCmdStub.GetMidiKeyName(midiKeyName, channel));
 }
Esempio n. 5
0
        public override bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
        {
            LogMethod(MethodBase.GetCurrentMethod());

            return(base.GetMidiKeyName(midiKeyName, channel));
        }
Esempio n. 6
0
 public bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
 {
     throw new NotImplementedException();
 }
        /// <summary>
        /// Retrieves information about a Midi Key (or note).
        /// </summary>
        /// <param name="midiKeyName">Must not be null.</param>
        /// <param name="channel">The zero-base Midi channel.</param>
        /// <returns>Returns true when the <paramref name="midiKeyName"/>.Name was filled.</returns>
        public virtual bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
        {
            IVstPluginMidiPrograms midiPrograms = pluginCtx.Plugin.GetInstance<IVstPluginMidiPrograms>();

            if (midiPrograms != null)
            {
                VstMidiChannelInfo channelInfo = midiPrograms.ChannelInfos[channel];
                VstMidiProgram program = channelInfo.Programs[midiKeyName.CurrentProgramIndex];

                midiKeyName.Name = program.GetKeyName(midiKeyName.CurrentKeyNumber);
                return true;
            }

            return false;
        }
 public bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
 {
     return false;
 }
Esempio n. 9
0
 /// <inheritdoc />
 public bool GetMidiKeyName(VstMidiKeyName midiKeyName, int channel)
 {
     Log("GetMidiKeyName: " + channel);
     return(false);
 }