|
|
@ -6048,29 +6048,50 @@ void locate_previous_non_favorite() |
|
|
|
|
|
|
|
|
|
|
|
void locate_previous_favorite() |
|
|
|
void locate_previous_favorite() |
|
|
|
{ |
|
|
|
{ |
|
|
|
//find previous fav in current bank
|
|
|
|
|
|
|
|
|
|
|
|
// worst case, nothing found below voice 0 / bank 0 - start loop at last bank
|
|
|
|
|
|
|
|
if ( configuration.performance.voice[selected_instance_id] < 2 && |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] == 0 && favsearcher < 170) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] >= 1 && configuration.performance.bank[selected_instance_id] >= 0) { |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
do { //first find previous fav in current bank
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 18); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if found, we are done. else quick check in previous banks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 0 && |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] >= 0 && favsearcher < 170) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //seek for previous bank
|
|
|
|
do { //seek for previous bank
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && |
|
|
|
} |
|
|
|
favsearcher < 132 && configuration.performance.bank[selected_instance_id] >= 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //last try to search if a bank with fav was found
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 170); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|