Пример #1
0
        public MusicalInstrument(byte value)
        {
            if (value > 127)
            {
                throw new FormatException("instrument should be <= 127");
            }

            Type   = (Midi.Instrument)value;
            Bundle = (InstrumentBundle)(value >> 3);
        }
Пример #2
0
 internal MusicalInstrument(Midi.Instrument type)
 {
     Type   = type;
     Bundle = (InstrumentBundle)((int)type >> 3);
 }