示例#1
0
 /// <summary>
 /// snare
 /// </summary>
 public void Snare()
 {
     if (OnLoadCompleteListener.Loaded)
     {
         Percussion[1].Play(PercIds[1], 1f, 1f, 1, 0, 1);
         PlayingPercussion.Push(1);
     }
     else
     {
         SynthNotLoadedWarning("snare");
     }
 }
示例#2
0
 /// <summary>
 /// kick
 /// </summary>
 public void Kick()
 {
     if (OnLoadCompleteListener.Loaded)
     {
         Percussion[0].Play(PercIds[0], 1f, 1f, 1, 0, 1);
         PlayingPercussion.Push(0);
     }
     else
     {
         SynthNotLoadedWarning("kick");
     }
 }
示例#3
0
 /// <summary>
 /// hi-hat
 /// </summary>
 public void Hat()
 {
     if (OnLoadCompleteListener.Loaded)
     {
         Percussion[2].Play(PercIds[2], 1f, 1f, 1, 0, 1);
         PlayingPercussion.Push(2);
     }
     else
     {
         SynthNotLoadedWarning("hat");
     }
 }
示例#4
0
        /// <summary>
        /// stop all sounds from playing
        /// </summary>
        public void Stop()
        {
            while (Playing.Count > 0)
            {
                short index = Playing.Pop();
                Lead[Synth].Stop(SoundIds[index]);
            }

            Level = 0;

            while (PlayingPercussion.Count > 0)
            {
                short index = PlayingPercussion.Pop();
                Percussion[index].Stop(PercIds[index]);
            }
        }