diff --git a/Docs/docfx.json b/Docs/docfx.json
index 8cab287f4..333a633e6 100644
--- a/Docs/docfx.json
+++ b/Docs/docfx.json
@@ -38,7 +38,7 @@
"_enableSearch": true,
"_appLogoPath": "images/logo.png",
"_appFaviconPath": "images/favicon.png",
- "_appFooter": "2024 / Generated by DocFX",
+ "_appFooter": "2023 / Generated by DocFX",
"_disableContribution": true
},
"template": [
diff --git a/DryWetMidi/Common/MathUtilities.cs b/DryWetMidi/Common/MathUtilities.cs
index 8109b7fd8..7d7d88e09 100644
--- a/DryWetMidi/Common/MathUtilities.cs
+++ b/DryWetMidi/Common/MathUtilities.cs
@@ -133,11 +133,9 @@ public static long LeastCommonMultiple(long a, long b)
public static long GreatestCommonDivisor(long a, long b)
{
- long remainder;
-
while (b != 0)
{
- remainder = a % b;
+ var remainder = a % b;
a = b;
b = remainder;
}
diff --git a/DryWetMidi/Composing/Actions/StepAction.cs b/DryWetMidi/Composing/Actions/StepAction.cs
index 9c2fe89d9..02136fc84 100644
--- a/DryWetMidi/Composing/Actions/StepAction.cs
+++ b/DryWetMidi/Composing/Actions/StepAction.cs
@@ -6,7 +6,7 @@ internal abstract class StepAction : PatternAction
{
#region Constructor
- public StepAction(ITimeSpan step)
+ protected StepAction(ITimeSpan step)
{
Step = step;
}
diff --git a/DryWetMidi/Core/Events/Base/MidiEvent.cs b/DryWetMidi/Core/Events/Base/MidiEvent.cs
index 54e7f097d..438096774 100644
--- a/DryWetMidi/Core/Events/Base/MidiEvent.cs
+++ b/DryWetMidi/Core/Events/Base/MidiEvent.cs
@@ -34,7 +34,7 @@ public abstract class MidiEvent
/// Initializes a new instance of the with the specified event type.
///
/// The type of event.
- public MidiEvent(MidiEventType eventType)
+ protected MidiEvent(MidiEventType eventType)
{
EventType = eventType;
}
diff --git a/DryWetMidi/Core/Events/Meta/BaseTextEvent.cs b/DryWetMidi/Core/Events/Meta/BaseTextEvent.cs
index 80b2a1f64..4dc9864e9 100644
--- a/DryWetMidi/Core/Events/Meta/BaseTextEvent.cs
+++ b/DryWetMidi/Core/Events/Meta/BaseTextEvent.cs
@@ -18,7 +18,7 @@ public abstract class BaseTextEvent : MetaEvent
///
/// Initializes a new instance of the .
///
- public BaseTextEvent(MidiEventType eventType)
+ protected BaseTextEvent(MidiEventType eventType)
: base(eventType)
{
}
@@ -29,7 +29,7 @@ public BaseTextEvent(MidiEventType eventType)
/// The type of event.
/// Text contained in the event.
/// specified an invalid value.
- public BaseTextEvent(MidiEventType eventType, string text)
+ protected BaseTextEvent(MidiEventType eventType, string text)
: this(eventType)
{
Text = text;
diff --git a/DryWetMidi/Core/MidiReader.cs b/DryWetMidi/Core/MidiReader.cs
index 1e582d727..16b24250e 100644
--- a/DryWetMidi/Core/MidiReader.cs
+++ b/DryWetMidi/Core/MidiReader.cs
@@ -298,10 +298,11 @@ public int ReadVlqNumber()
public long ReadVlqLongNumber()
{
long result = 0;
- byte b;
try
{
+ byte b;
+
do
{
b = ReadByte();
diff --git a/DryWetMidi/Interaction/Chords/ChordsBuilder.cs b/DryWetMidi/Interaction/Chords/ChordsBuilder.cs
index 5eeb49487..4ca1cbf0e 100644
--- a/DryWetMidi/Interaction/Chords/ChordsBuilder.cs
+++ b/DryWetMidi/Interaction/Chords/ChordsBuilder.cs
@@ -11,7 +11,7 @@ private class ChordDescriptor
{
private readonly int _notesMinCount;
- public ChordDescriptor(Note firstNote, int notesMinCount)
+ protected ChordDescriptor(Note firstNote, int notesMinCount)
{
Time = firstNote.Time;
Notes.Add(firstNote);
diff --git a/DryWetMidi/Interaction/Chords/ChordsManagingUtilities.cs b/DryWetMidi/Interaction/Chords/ChordsManagingUtilities.cs
index bbca38407..406ddec93 100644
--- a/DryWetMidi/Interaction/Chords/ChordsManagingUtilities.cs
+++ b/DryWetMidi/Interaction/Chords/ChordsManagingUtilities.cs
@@ -1052,7 +1052,7 @@ internal static int ProcessChordsInternal(
: null;
var chordsBuilder = new ChordsBuilder(settings);
- var chords = chordsBuilder.GetChordsLazy(eventsCollections.GetTimedEventsLazy(eventsCount, settings?.NoteDetectionSettings?.TimedEventDetectionSettings, false), collectedTimedEvents != null, collectedTimedEvents);
+ var chords = chordsBuilder.GetChordsLazy(eventsCollections.GetTimedEventsLazy(eventsCount, settings.NoteDetectionSettings?.TimedEventDetectionSettings, false), collectedTimedEvents != null, collectedTimedEvents);
foreach (var chordAt in chords)
{
diff --git a/DryWetMidi/Interaction/GetObjects/GetObjectsUtilities.cs b/DryWetMidi/Interaction/GetObjects/GetObjectsUtilities.cs
index 47a561a1a..5a52c7bff 100644
--- a/DryWetMidi/Interaction/GetObjects/GetObjectsUtilities.cs
+++ b/DryWetMidi/Interaction/GetObjects/GetObjectsUtilities.cs
@@ -414,7 +414,6 @@ private static IEnumerable EnumerateObjectsFromSortedTimedObjects(
?? (getChords ? settings.ChordDetectionSettings?.NoteDetectionSettings : null)
?? new NoteDetectionSettings();
var chordDetectionSettings = settings.ChordDetectionSettings ?? new ChordDetectionSettings();
- var restDetectionSettings = settings.RestDetectionSettings ?? new RestDetectionSettings();
var timedObjects = processedTimedObjects;
@@ -429,11 +428,6 @@ private static IEnumerable EnumerateObjectsFromSortedTimedObjects(
//
- var notesLastEndTimes = new Dictionary