/// <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"); } }
/// <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"); } }
/// <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"); } }
/// <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]); } }