Skip to content

Commit

Permalink
Notes subdivision parameter
Browse files Browse the repository at this point in the history
Fixed an error on the notes subdivision parameter.
Updated the delay time parameter to apply over the notes parameter and viceversa.
  • Loading branch information
DavidMolTor committed Feb 9, 2023
1 parent 03dd9d6 commit 15d6969
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Build/MidiControl/DeviceControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ private void TimerUpdateDevice_Elapsed(object source, ElapsedEventArgs e)
}
}

//Send the delay notes command if able
if (configCurrent.iDelayNotes != configPrevious.iDelayNotes && configCurrent.iDelayTime == configPrevious.iDelayTime)
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayNotes, configCurrent.iDelayNotes);

//Send the delay time command if able
if (configCurrent.iDelayTime != configPrevious.iDelayTime)
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayTime, configCurrent.iDelayTime);

//Send the delay notes command if able
if (configCurrent.iDelayNotes != configPrevious.iDelayNotes)
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayNotes, configCurrent.iDelayNotes);

//Send the delay repeats command if able
if (configCurrent.iDelayRepeats != configPrevious.iDelayRepeats)
IControlMIDI.Instance.AddCommand(ChannelCommand.Controller, iChannel, (int)SettingsCC.DelayRepeats, configCurrent.iDelayRepeats);
Expand Down Expand Up @@ -383,7 +383,7 @@ private void HandleFootswitchPressed(object sender, EventArgs e)
int iDelayNotes = listSubdivisions.IndexOf(configCurrent.iDelayNotes) + 1;

//Set the note subdivision variable
iCurrentSubdivision = iDelayNotes < Enum.GetValues(typeof(TimeSubdivisions)).Cast<int>().ToList().Count ? iDelayNotes : 0;
iCurrentSubdivision = iDelayNotes < listSubdivisions.Count ? iDelayNotes : 0;
break;
case "SET":
//Save the current preset
Expand Down

0 comments on commit 15d6969

Please sign in to comment.