Exemplo n.º 1
0
        public static Part createInstance(SongInfo song, InstrumentInfo instrument, int?bpm, int?num_beats, NoteLength?beat_type)
        {
            if (song == null || instrument == null || bpm == null || num_beats == null || beat_type == null)
            {
                return(null);
            }

            var time_sig   = TimeSignature.createInstance((int)num_beats, (NoteLength)beat_type);
            var collection = new PositionedModelCollection <Measure>();

            return(new Part(song, instrument, (int)bpm, time_sig, collection));
        }
Exemplo n.º 2
0
        private Part(SongInfo song, InstrumentInfo instrument, int bpm, TimeSignature time_sig, PositionedModelCollection <Measure> collection)
        {
            SongInfo       = song;
            InstrumentInfo = instrument;

            DefaultBPM      = bpm;
            TimeSignature   = time_sig;
            ModelCollection = collection;
        }