예제 #1
0
        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);
        }
예제 #2
0
        public void DeleteNote(NoteID noteID)
        {
            var note_objID = notes_obj[noteID.ToString()];

            notes_obj.Graph.Delete(note_objID);
        }
예제 #3
0
        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}");
        }