Exemple #1
0
 public SongNote Clone()
 {
     var note = new SongNote();
     note.NoteTime = NoteTime;
     note.Duration = Duration;
     note.PitchId = PitchId;
     note.Velocity = Velocity;
     return note;
 }
Exemple #2
0
        public SongNote Clone()
        {
            var note = new SongNote();

            note.NoteTime = NoteTime;
            note.Duration = Duration;
            note.PitchId  = PitchId;
            note.Velocity = Velocity;
            return(note);
        }
        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);
        }
        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);
        }