public NoteID AddNote(SemiTone tone, Duration duration) { var noteID = new NoteID(next_noteID++); next_noteID_obj.WriteAllString(next_noteID.ToString()); var newnote_obj = notes_obj.Graph[notes_obj.Graph.Create()]; newnote_obj.WriteAllString($"{CodeTools.WriteDuration(duration)}\n{tone.Semitones}"); notes_obj.Add(noteID.ToString(), newnote_obj.ID); return(noteID); }
public void DeleteNote(NoteID noteID) { var note_objID = notes_obj[noteID.ToString()]; notes_obj.Graph.Delete(note_objID); }
public void UpdateNote(NoteID noteID, Duration newduration, SemiTone newtone) { var note_obj = notes_obj.Get(noteID.ToString()); note_obj.WriteAllString($"{CodeTools.WriteDuration(newduration)}\n{newtone}"); }