public String load(Staff staff) { lilyContent = ""; relative = staff.relative; relative.reset(); lilyContent += "\\relative c' { "; lilyContent += "\n\\clef "; if (staff.sound == Sound.TREBLE) { lilyContent += "treble "; } if (staff.sound == Sound.BASS) { lilyContent += "bass "; } lilyContent += "\n\\time " + staff.firstMeasure + "/" + staff.secondMeasure + " "; lilyContent += "\n\\tempo 4=" + staff.tempo + " "; lilyContent += "\n"; //int lastOcave = relative.getLastOctave(); foreach (NoteCollection nc in staff.bars) { nc.accept(this); } lilyContent += "} "; return(lilyContent); }
} // tempo public Staff(int firstMeasure, int secondMeasure, Sound sound, int tempo) { this.firstMeasure = firstMeasure; this.secondMeasure = secondMeasure; this.sound = sound; this.tempo = tempo; relative = new AbsoluteRelative(); currentBar = new Bar(); }