@@ -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