Пример #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);
        }
Пример #2
0
 private int CalculateNoteDuration(SongNote songNote)
 {
     return((int)songNote.Duration * 1000 * 60 / _song.Tempo);
 }