|
|
@ -6113,7 +6113,6 @@ void locate_previous_non_favorite() |
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
|
@ -6141,20 +6140,38 @@ void locate_previous_favorite() |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
} |
|
|
|
} else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) |
|
|
|
|
|
|
|
{ //if at begin of any other bank
|
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] >= 1 && configuration.performance.bank[selected_instance_id] >= 0) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] >= 0 && configuration.performance.bank[selected_instance_id] >= 0) { |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
|
|
|
|
|
|
|
do { //first find previous fav in current bank
|
|
|
|
do { //first find previous fav in current bank
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] == 0) { |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 18); |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 36); |
|
|
|
|
|
|
|
|
|
|
|
// if found, we are done. else quick check in previous banks
|
|
|
|
// if found, we are done. else quick check in previous banks
|
|
|
|
|
|
|
|
|
|
|
@ -6182,31 +6199,72 @@ void locate_previous_favorite() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void locate_next_favorite() |
|
|
|
void locate_next_favorite() |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
//find next fav in current bank
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
bool RollOver = false; |
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] >= MAX_BANKS - 1 ) |
|
|
|
|
|
|
|
{ //if at end of all banks
|
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
|
|
|
RollOver = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) |
|
|
|
|
|
|
|
{ //if at end of any other bank
|
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] <= 30 && configuration.performance.bank[selected_instance_id] <= MAX_BANKS ) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //first find next fav in current bank
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (RollOver == false) configuration.performance.voice[selected_instance_id]++; else RollOver = true; |
|
|
|
|
|
|
|
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] <= 32 && favsearcher < 36); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if found, we are done. else quick check in next banks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
|
|
|
selected_instance_id) == false && |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] < MAX_BANKS && favsearcher < 170) |
|
|
|
|
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //seek for next bank
|
|
|
|
do { //seek in next bank
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
if ( configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1 && favsearcher < 190) |
|
|
|
|
|
|
|
{ |
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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] <= 32 && favsearcher < 190) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
do { //last bank to search if a fav can be found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 && favsearcher < 170); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} |
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void locate_next_non_favorite() |
|
|
|
void locate_next_non_favorite() |
|
|
|