示例#1
0
        private D_Staff new_parseLilypondTokens(D_Staff staff, List <string> tokens)
        {
            int           relative_octave = this.get_relative_octave(tokens);
            List <D_Note> notes           = this.get_notes(tokens, relative_octave);

            this.set_clef(staff, tokens);
            this.set_num_of_beats(staff, notes, relative_octave);
            this.set_tempo(staff, tokens);
            this.set_measures(staff, tokens);
            staff.make_bars();
            staff.fillBarsWithNotes(notes);

            return(staff);
        }
示例#2
0
        private static D_Staff parseSequence(Sequence sequence)
        {
            D_Staff staff = new D_Staff();

            staff.clef = clef.g_key;
            set_num_of_beats(sequence, staff);
            set_tempo(sequence, staff);
            set_measures(sequence, staff);
            int ticks_per_beat = sequence.Division;

            staff.make_bars();
            List <D_Note> notes = get_notes_from_track(sequence[1], staff, ticks_per_beat);

            staff.fillBarsWithNotes(notes);

            return(staff);
        }