Ejemplo n.º 1
0
 public static void HelloMix(DebugDelegate d, OutputDevice dev)
 {
     // play every mix
     PremixDel[] hello_mixes = new PremixDel[]
     {
         TestParse,
         TriadChord,
         Chopsticks,
         TestChord,
         TestDurations,
         TestTracks,
         TrackDur,
         TestKey,
     };
     foreach (var mix in hello_mixes)
     {
         PlayMix(d, dev, mix);
     }
 }
Ejemplo n.º 2
0
        static void PlayMix(DebugDelegate d, OutputDevice dev, PremixDel mix)
        {
            setd(d);
            debug("Playing pre-mixed song/test: " + mix.Method.Name);
#if DEBUG
#else
            try
#endif
            {
                mix(d, dev);
                try
                {
                    dev.stop();
                }
                catch { }
            }
#if DEBUG
#else
            catch (Exception ex)
            {
                debug("Error playing: " + mix.Method.Name + ", err: " + ex.Message + ex.StackTrace);
            }
#endif
        }
Ejemplo n.º 3
0
        public static bool PlayName(DebugDelegate d, OutputDevice dev, params string[] names)
        {
            bool      isfound = true;
            PremixDel mix     = null;

            foreach (var name in names)
            {
                var un = name.ToLower();
                if (un.Contains("chop") || un.Contains("stick"))
                {
                    mix = Chopsticks;
                }
                else if (un.Contains("135"))
                {
                    mix = TriadChord;
                }
                else if (un.Contains("parse") || un.Contains("test"))
                {
                    mix = TestParse;
                }
                else if (un.Contains("bamba"))
                {
                    mix = LaBamBa;
                }
                else if (un.Contains("song"))
                {
                    mix = ElliGouldingYourSong;
                }
                else if (un.Contains("chord"))
                {
                    mix = TestChord;
                }
                else if (un.Contains("dur"))
                {
                    mix = TestDurations;
                }
                else if (un.Contains("track"))
                {
                    mix = TestTracks;
                }
                else if (un.Contains("mulder"))
                {
                    mix = TrackDur;
                }
                else if (un.Contains("key"))
                {
                    mix = TestKey;
                }
                else if (un.Contains("hello"))
                {
                    mix = HelloMix;
                }

                else
                {
                    isfound = false;
                }
            }
            if (isfound)
            {
                PlayMix(d, dev, mix);
            }
            return(isfound);
        }