public static LilypondParser getInstance() { if (instance == null) { instance = new LilypondParser(); } return(instance); }
public void evaluate_editor_contents(bool undo_redo_pressed) { try { this.songData = LilypondParser.getInstance().parseText(editor.getText()); this.updateNoteViewer(); if (!undo_redo_pressed) { this.editor_history.save(new EditorMemento(this.editor)); } this.updateHistoryButtons(); } catch (Exception e) { Console.WriteLine("NON VALID LILYPOND YOU LOSER"); } }
private static int getNoteOctave(string token, int current_scope_octave) { int note_octave = LilypondParser.getNoteOctave(token); return(note_octave + current_scope_octave); }