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)); }
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; }