示例#1
0
        public static Measure createInstance(int? bpm, int? num_beats, NoteLength? beat_type, int? pos)
        {
            if (bpm == null || num_beats == null || beat_type == null || pos == null) { return null; }

            var this_sig = TimeSignature.createInstance((int)num_beats, (NoteLength)beat_type);
            bool matches_prev_measure = false;
            var position = new Position((int)pos, false);
            var collection = new ChordCollection(this_sig);

            return new Measure((int)bpm, this_sig, matches_prev_measure, position, collection);
        }
示例#2
0
        private Measure(int bpm, TimeSignature time_sig, bool matches_prev_measure, Position position, ChordCollection collection)
        {
            Bpm = bpm;
            TimeSignature = time_sig;
            MatchesPrevMeasure = matches_prev_measure;
            MatchUpdated = false;

            Position = position;
            ModelCollection = collection;
        }