コード例 #1
0
ファイル: SongNote.cs プロジェクト: hortonal/MrKeys
 public SongNote Clone()
 {
     var note = new SongNote();
     note.NoteTime = NoteTime;
     note.Duration = Duration;
     note.PitchId = PitchId;
     note.Velocity = Velocity;
     return note;
 }
コード例 #2
0
ファイル: SongNote.cs プロジェクト: hortonal/MrKeys
        public SongNote Clone()
        {
            var note = new SongNote();

            note.NoteTime = NoteTime;
            note.Duration = Duration;
            note.PitchId  = PitchId;
            note.Velocity = Velocity;
            return(note);
        }
コード例 #3
0
        public static void AddSongNoteToSong(double noteTime, Song song, Note xmlNote, double duration)
        {
            var songNote = new SongNote();
            songNote.NoteTime = noteTime;
            songNote.PitchId = GetPitchIdFromNote(xmlNote);
            songNote.Velocity = 100;

            songNote.Duration = duration;

            SongNoteEventCollections noteEventCollections;

            if (!song.TryGetValue(noteTime, out noteEventCollections))
            {
                noteEventCollections = new SongNoteEventCollections();
                song.Add(noteTime, noteEventCollections);
            };

            noteEventCollections.KeyPresses.Add(songNote);
        }
コード例 #4
0
        public static void AddSongNoteToSong(double noteTime, Song song, Note xmlNote, double duration)
        {
            var songNote = new SongNote();

            songNote.NoteTime = noteTime;
            songNote.PitchId  = GetPitchIdFromNote(xmlNote);
            songNote.Velocity = 100;

            songNote.Duration = duration;

            SongNoteEventCollections noteEventCollections;

            if (!song.TryGetValue(noteTime, out noteEventCollections))
            {
                noteEventCollections = new SongNoteEventCollections();
                song.Add(noteTime, noteEventCollections);
            }
            ;

            noteEventCollections.KeyPresses.Add(songNote);
        }