Skip to content

Commit 15d6969

Browse files
committed
Notes subdivision parameter
Fixed an error on the notes subdivision parameter. Updated the delay time parameter to apply over the notes parameter and viceversa.
1 parent 03dd9d6 commit 15d6969

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Build/MidiControl/DeviceControl.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ private void TimerUpdateDevice_Elapsed(object source, ElapsedEventArgs e)
196196
}
197197
}
198198

199+
//Send the delay notes command if able
200+
if (configCurrent.iDelayNotes != configPrevious.iDelayNotes && configCurrent.iDelayTime == configPrevious.iDelayTime)
201+
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayNotes, configCurrent.iDelayNotes);
202+
199203
//Send the delay time command if able
200204
if (configCurrent.iDelayTime != configPrevious.iDelayTime)
201205
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayTime, configCurrent.iDelayTime);
202206

203-
//Send the delay notes command if able
204-
if (configCurrent.iDelayNotes != configPrevious.iDelayNotes)
205-
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayNotes, configCurrent.iDelayNotes);
206-
207207
//Send the delay repeats command if able
208208
if (configCurrent.iDelayRepeats != configPrevious.iDelayRepeats)
209209
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayRepeats, configCurrent.iDelayRepeats);
@@ -383,7 +383,7 @@ private void HandleFootswitchPressed(object sender, EventArgs e)
383383
int iDelayNotes = listSubdivisions.IndexOf(configCurrent.iDelayNotes) + 1;
384384

385385
//Set the note subdivision variable
386-
iCurrentSubdivision = iDelayNotes < Enum.GetValues(typeof(TimeSubdivisions)).Cast<int>().ToList().Count ? iDelayNotes : 0;
386+
iCurrentSubdivision = iDelayNotes < listSubdivisions.Count ? iDelayNotes : 0;
387387
break;
388388
case "SET":
389389
//Save the current preset

0 commit comments

Comments
 (0)