Beispiel #1
0
 public override string ToString()
 {
     return(Sound.Name() + ";" + Velocity.Value.ToString("0"));
 }
Beispiel #2
0
            public void Add(TimeInUnits t, ISoundId sound, Velocity v)
            {
                List <PatternBeat> beatsAtT;

                if (!beats.TryGetValue(t, out beatsAtT))
                {
                    beatsAtT = new List <PatternBeat>(1);
                    beats.Add(t, beatsAtT);
                }
                var patternBeat = new PatternBeat(t, sound, v);

                if (beatsAtT.Any(p => Equals(p.Sound, sound)))
                {
                    throw new ArgumentException(string.Format("Duplicate beat on {0} at t={1}", sound.Name(), t.Index));
                }
                beatsAtT.Add(patternBeat);
                if (!preferredInstrumentsOrder.Contains(sound))
                {
                    preferredInstrumentsOrder.Add(sound);
                }
            }