Beispiel #1
0
        public static SongNote ConvertXmlNoteToSongNote(double noteTime, Note xmlNote)
        {
            var songNote = new SongNote();

            songNote.NoteTime = noteTime;
            songNote.PitchId  = (xmlNote.Pitch.Octave + 1) * 12 + XmlMusicHelper.GetMidiIdOffsetFromC(xmlNote);
            songNote.Velocity = 100;
            songNote.Duration = xmlNote.Duration;

            return(songNote);
        }
 public static int GetPitchIdFromNote(Note note)
 {
     return((note.Pitch.Octave + 1) * 12 + XmlMusicHelper.GetMidiIdOffsetFromC(note) + note.Pitch.Alter);
 }