From 9272daf6b54d109eed31d4ff35fd9056bf78eb19 Mon Sep 17 00:00:00 2001 From: ivtar Date: Tue, 23 Jul 2024 10:06:10 +0300 Subject: [PATCH] changing visibility to allow easier custom playback implmentations --- DryWetMidi/Interaction/Notes/Note.cs | 4 ++-- DryWetMidi/Interaction/Notes/NotesManagingUtilities.cs | 6 +++--- DryWetMidi/Interaction/TimedObject/TimedObjectAt.cs | 2 +- .../Multimedia/Playback/Callbacks/NotePlaybackData.cs | 6 +++--- DryWetMidi/Multimedia/Playback/PlaybackDataTracker.cs | 2 +- DryWetMidi/Multimedia/Playback/PlaybackEvent.cs | 2 +- .../PlaybackEventMetadata/NotePlaybackEventMetadata.cs | 2 +- .../Playback/PlaybackEventMetadata/PlaybackEventMetadata.cs | 2 +- .../TimedEventPlaybackEventMetadata.cs | 2 +- DryWetMidi/Multimedia/Playback/PlaybackEventsComparer.cs | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/DryWetMidi/Interaction/Notes/Note.cs b/DryWetMidi/Interaction/Notes/Note.cs index d1bee32ec..680e4b2de 100644 --- a/DryWetMidi/Interaction/Notes/Note.cs +++ b/DryWetMidi/Interaction/Notes/Note.cs @@ -313,12 +313,12 @@ public FourBitNumber Channel /// /// Gets Note On timed event of the note. /// - internal TimedEvent TimedNoteOnEvent { get; } = new TimedEvent(new NoteOnEvent { Velocity = DefaultVelocity }); + public TimedEvent TimedNoteOnEvent { get; } = new TimedEvent(new NoteOnEvent { Velocity = DefaultVelocity }); /// /// Gets Note Off timed event of the note. /// - internal TimedEvent TimedNoteOffEvent { get; } = new TimedEvent(new NoteOffEvent { Velocity = DefaultOffVelocity }); + public TimedEvent TimedNoteOffEvent { get; } = new TimedEvent(new NoteOffEvent { Velocity = DefaultOffVelocity }); internal MusicTheory.Note UnderlyingNote => MusicTheory.Note.Get(NoteNumber); diff --git a/DryWetMidi/Interaction/Notes/NotesManagingUtilities.cs b/DryWetMidi/Interaction/Notes/NotesManagingUtilities.cs index dad9e9ddb..9c82326b2 100644 --- a/DryWetMidi/Interaction/Notes/NotesManagingUtilities.cs +++ b/DryWetMidi/Interaction/Notes/NotesManagingUtilities.cs @@ -898,7 +898,7 @@ internal static int ProcessNotesInternal( return iMatched; } - internal static IEnumerable> GetNotesAndTimedEventsLazy( + public static IEnumerable> GetNotesAndTimedEventsLazy( this IEnumerable> timedEvents, NoteDetectionSettings settings) { @@ -977,14 +977,14 @@ internal static IEnumerable> GetNotesAndTimedEventsL } } - internal static IEnumerable GetNotesAndTimedEventsLazy( + public static IEnumerable GetNotesAndTimedEventsLazy( this IEnumerable timedEvents, NoteDetectionSettings settings) { return GetNotesAndTimedEventsLazy(timedEvents, settings, false); } - internal static IEnumerable GetNotesAndTimedEventsLazy( + public static IEnumerable GetNotesAndTimedEventsLazy( this IEnumerable timedObjects, NoteDetectionSettings settings, bool completeObjectsAllowed) diff --git a/DryWetMidi/Interaction/TimedObject/TimedObjectAt.cs b/DryWetMidi/Interaction/TimedObject/TimedObjectAt.cs index c2449a493..c4f2d5e24 100644 --- a/DryWetMidi/Interaction/TimedObject/TimedObjectAt.cs +++ b/DryWetMidi/Interaction/TimedObject/TimedObjectAt.cs @@ -1,6 +1,6 @@ namespace Melanchall.DryWetMidi.Interaction { - internal sealed class TimedObjectAt + public class TimedObjectAt where TObject : ITimedObject { #region Constructor diff --git a/DryWetMidi/Multimedia/Playback/Callbacks/NotePlaybackData.cs b/DryWetMidi/Multimedia/Playback/Callbacks/NotePlaybackData.cs index f44660619..ee42f5dd7 100644 --- a/DryWetMidi/Multimedia/Playback/Callbacks/NotePlaybackData.cs +++ b/DryWetMidi/Multimedia/Playback/Callbacks/NotePlaybackData.cs @@ -66,18 +66,18 @@ private NotePlaybackData(bool playNote) /// public FourBitNumber Channel { get; } - internal bool PlayNote { get; } + public bool PlayNote { get; } #endregion #region Methods - internal NoteOnEvent GetNoteOnEvent() + public NoteOnEvent GetNoteOnEvent() { return new NoteOnEvent(NoteNumber, Velocity) { Channel = Channel }; } - internal NoteOffEvent GetNoteOffEvent() + public NoteOffEvent GetNoteOffEvent() { return new NoteOffEvent(NoteNumber, OffVelocity) { Channel = Channel }; } diff --git a/DryWetMidi/Multimedia/Playback/PlaybackDataTracker.cs b/DryWetMidi/Multimedia/Playback/PlaybackDataTracker.cs index 8706f25c0..e07b60643 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackDataTracker.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackDataTracker.cs @@ -7,7 +7,7 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class PlaybackDataTracker + public class PlaybackDataTracker { #region Nested enums diff --git a/DryWetMidi/Multimedia/Playback/PlaybackEvent.cs b/DryWetMidi/Multimedia/Playback/PlaybackEvent.cs index 5910aef14..8ee90dc6d 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackEvent.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackEvent.cs @@ -3,7 +3,7 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class PlaybackEvent + public class PlaybackEvent { #region Constructor diff --git a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/NotePlaybackEventMetadata.cs b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/NotePlaybackEventMetadata.cs index ba1c2f92e..d4b4e07ec 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/NotePlaybackEventMetadata.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/NotePlaybackEventMetadata.cs @@ -3,7 +3,7 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class NotePlaybackEventMetadata + public class NotePlaybackEventMetadata { #region Constructor diff --git a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/PlaybackEventMetadata.cs b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/PlaybackEventMetadata.cs index 6986e7aec..51cca5582 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/PlaybackEventMetadata.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/PlaybackEventMetadata.cs @@ -1,6 +1,6 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class PlaybackEventMetadata + public class PlaybackEventMetadata { public NotePlaybackEventMetadata Note { get; set; } diff --git a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/TimedEventPlaybackEventMetadata.cs b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/TimedEventPlaybackEventMetadata.cs index d852093ff..501aa2525 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/TimedEventPlaybackEventMetadata.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackEventMetadata/TimedEventPlaybackEventMetadata.cs @@ -1,6 +1,6 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class TimedEventPlaybackEventMetadata + public class TimedEventPlaybackEventMetadata { #region Constructor diff --git a/DryWetMidi/Multimedia/Playback/PlaybackEventsComparer.cs b/DryWetMidi/Multimedia/Playback/PlaybackEventsComparer.cs index 773cd4873..2201e9f99 100644 --- a/DryWetMidi/Multimedia/Playback/PlaybackEventsComparer.cs +++ b/DryWetMidi/Multimedia/Playback/PlaybackEventsComparer.cs @@ -4,7 +4,7 @@ namespace Melanchall.DryWetMidi.Multimedia { - internal sealed class PlaybackEventsComparer : IComparer + public class PlaybackEventsComparer : IComparer { #region IComparer