public AudioItem Play(string instrumentName, int note, float velocity, object source, params AudioOption[] audioOptions)
        {
            SamplerInstrument instrument = GetInstrument(instrumentName);

            SingleAudioItem audioItem = GetSingleAudioItem(instrument, note, velocity, source);

            if (audioItem == null)
            {
                return(instrument);
            }

            audioItem.Play(audioOptions);
            return(audioItem);
        }
        public AudioItem Play(string moduleName, string instrumentName, int note, float velocity, object source, params AudioOption[] audioOptions)
        {
            PDModule          module     = player.generalSettings.PdPlayer.itemManager.GetModule(moduleName, source);
            SamplerInstrument instrument = GetInstrument(instrumentName);
            SingleAudioItem   audioItem  = GetPDSingleAudioItem(instrument, note, velocity, source);

            if (audioItem == null)
            {
                return(instrument);
            }

            if (module.State != AudioStates.Playing)
            {
                module.Initialize();
                module.Play();
            }

            audioItem.Play(audioOptions);
            module.AddAudioItem(audioItem);

            return(audioItem);
        }