Show chord progression on Universal; rhythm/local on Normal and Expert.
Swap mode-home param rows and tone reload so TAB0 uses 和弦走向 while TAB1/2 keep 节奏类型 and 本地曲目 with 弦音色. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
141f232b91
commit
bce08be772
|
|
@ -107,15 +107,15 @@ void Touch_Action(int8_t FLAG, uint8_t ID, uint8_t areaIndex,uint8_t value)
|
|||
{
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 2:
|
||||
case 0: /* 万能:和弦走向转调触发 */
|
||||
{
|
||||
uint8_t midi = 0x3c;
|
||||
midi += mGuiData[GUI_TRANSPOSE].Current;
|
||||
AutoBandTop1_Note_On(midi,0x3c); // AutoBand 模块未加入工程
|
||||
AutoBandTop1_Note_On(midi,0x3c);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case 0:
|
||||
case 1: /* 专业 */
|
||||
case 2: /* 普通 */
|
||||
/* 音师:快转调只换和弦音,伴奏不重头 */
|
||||
Accomp_UpdatePlayingChord();
|
||||
break;
|
||||
|
|
@ -148,50 +148,34 @@ void Touch_Action(int8_t FLAG, uint8_t ID, uint8_t areaIndex,uint8_t value)
|
|||
case GUI_MODE_PARAM:
|
||||
{
|
||||
GUI_SWITCH *pCurData =NULL;
|
||||
uint8_t tab = (uint8_t)mGuiData[GUI_TAB_INDEX].Current;
|
||||
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: case 1:
|
||||
if(mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
{
|
||||
if (tab == 0)
|
||||
pCurData = &ParamGuiData[ALL_MODE_PARAM];
|
||||
else if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
pCurData = &ParamGuiData[EXPRESS_MODE_PARAM];
|
||||
}
|
||||
else
|
||||
{
|
||||
pCurData = &ParamGuiData[SONG_MODE_PARAM];
|
||||
}
|
||||
break;
|
||||
case 2: pCurData = &ParamGuiData[ALL_MODE_PARAM]; break;
|
||||
}
|
||||
|
||||
last_value = pCurData->Current;
|
||||
GUI_Item_AjustLoopValue(pCurData, FLAG);
|
||||
if (!UI_SetFocus(GUI_MODE_PARAM))
|
||||
show_Param(&UI_Label[GUI_MODE_PARAM], pCurData);
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: case 1:
|
||||
if(mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
{
|
||||
|
||||
UI_ApplyToneAddress();
|
||||
if (tab == 0)
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[ALL_MODE_PARAM].Current);
|
||||
else if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[EXPRESS_MODE_PARAM].Current);
|
||||
}
|
||||
else
|
||||
{
|
||||
UI_ApplyToneAddress();
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[SONG_MODE_PARAM].Current);
|
||||
|
||||
}
|
||||
break;
|
||||
case 2: AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[ALL_MODE_PARAM].Current); break;
|
||||
}
|
||||
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: nvm->param.Param1 = ParamGuiData[SONG_MODE_PARAM].Current; break; // 姝屾<E5A79D>????
|
||||
case 1: nvm->param.Param2 = ParamGuiData[EXPRESS_MODE_PARAM].Current;
|
||||
break; // 涓撳<E6B693>????
|
||||
case 2: nvm->param.Param3 = ParamGuiData[ALL_MODE_PARAM].Current; break; // 涓囪<E6B693>????
|
||||
}
|
||||
if (tab == 0)
|
||||
nvm->param.Param3 = ParamGuiData[ALL_MODE_PARAM].Current;
|
||||
else if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
nvm->param.Param2 = ParamGuiData[EXPRESS_MODE_PARAM].Current;
|
||||
else
|
||||
nvm->param.Param1 = ParamGuiData[SONG_MODE_PARAM].Current;
|
||||
}
|
||||
break;
|
||||
case GUI_TIMBRE_SELECT:
|
||||
|
|
@ -214,6 +198,9 @@ void Touch_Action(int8_t FLAG, uint8_t ID, uint8_t areaIndex,uint8_t value)
|
|||
|
||||
if(ID == GUI_AUTOBAND_SW)
|
||||
{
|
||||
/* 万能无节奏/本地 TAB,忽略该触控 */
|
||||
if (mGuiData[GUI_TAB_INDEX].Current == 0)
|
||||
return;
|
||||
mGuiData[ID].Current = value;
|
||||
UI_ReloadTonePreset();
|
||||
if (!UI_SetFocus(GUI_MODE_PARAM))
|
||||
|
|
|
|||
|
|
@ -109,25 +109,42 @@ void CallUI_RestoreSelect(void) {
|
|||
LOG_I("UI", "page Restore");
|
||||
}
|
||||
|
||||
/* 音师:节奏类型→1.bin,本地曲目→2.bin,万能节奏→3.bin(不再用 AutoBand legacy) */
|
||||
/* 音师:万能→3.bin;普通/专业:节奏→1.bin、本地曲目→2.bin */
|
||||
void UI_ApplyToneAddress(void)
|
||||
{
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
{
|
||||
ADDRESS = FLASH_ADDR_SONG_HAITIAN; /* 本地曲目 → 2.bin */
|
||||
return;
|
||||
}
|
||||
switch (mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 1: ADDRESS = FLASH_ADDR_MODE_EXPERT; break; /* 专业 → 1.bin */
|
||||
case 2: ADDRESS = FLASH_ADDR_MODE_NORMAL; break; /* 普通 → 1.bin */
|
||||
default: ADDRESS = FLASH_ADDR_MODE_UNIVERSAL; break; /* 万能 → 3.bin */
|
||||
case 0: /* 万能:和弦走向库 */
|
||||
ADDRESS = FLASH_ADDR_MODE_UNIVERSAL;
|
||||
return;
|
||||
case 1: /* 专业 */
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
ADDRESS = FLASH_ADDR_SONG_HAITIAN;
|
||||
else
|
||||
ADDRESS = FLASH_ADDR_MODE_EXPERT;
|
||||
return;
|
||||
case 2: /* 普通 */
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
ADDRESS = FLASH_ADDR_SONG_HAITIAN;
|
||||
else
|
||||
ADDRESS = FLASH_ADDR_MODE_NORMAL;
|
||||
return;
|
||||
default:
|
||||
ADDRESS = FLASH_ADDR_MODE_UNIVERSAL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void UI_ReloadTonePreset(void)
|
||||
{
|
||||
UI_ApplyToneAddress();
|
||||
/* 万能:和弦走向 */
|
||||
if (mGuiData[GUI_TAB_INDEX].Current == 0)
|
||||
{
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[ALL_MODE_PARAM].Current);
|
||||
return;
|
||||
}
|
||||
/* 普通/专业:本地曲目或节奏类型 */
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
{
|
||||
GUI_SWITCH *local = &ParamGuiData[EXPRESS_MODE_PARAM];
|
||||
|
|
@ -142,15 +159,7 @@ void UI_ReloadTonePreset(void)
|
|||
}
|
||||
return;
|
||||
}
|
||||
switch (mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 2:
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[ALL_MODE_PARAM].Current);
|
||||
break;
|
||||
default:
|
||||
AutoBandTop1_LoadPresetItemFromFlash(ParamGuiData[SONG_MODE_PARAM].Current);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t s_ui_focus_id = UI_FOCUS_NONE;
|
||||
|
|
@ -555,9 +564,14 @@ void Refresh_Mode1Select(uint8_t last_data, LEBEL_UI *UI, GUI_SWITCH *Group)
|
|||
// 重点:根<EFBC9A>?当前选中的模式(2/3/4)找到<E689BE>?<3F>应数据结构<E7BB93>?
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: pCurData = &ParamGuiData[SONG_MODE_PARAM]; break; // 歌曲
|
||||
case 1: pCurData = &ParamGuiData[EXPRESS_MODE_PARAM]; break; // 专家
|
||||
case 2: pCurData = &ParamGuiData[ALL_MODE_PARAM]; break; // 万能
|
||||
case 0: pCurData = &ParamGuiData[ALL_MODE_PARAM]; break; /* 万能:和弦走向 */
|
||||
case 1: /* 专业 */
|
||||
case 2: /* 普通 */
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
pCurData = &ParamGuiData[EXPRESS_MODE_PARAM];
|
||||
else
|
||||
pCurData = &ParamGuiData[SONG_MODE_PARAM];
|
||||
break;
|
||||
//default: pCurData = &mGuiData[GUI_MODE1_SELECT];
|
||||
}
|
||||
// 清除旧数字(清除的是旧值,不是当前值)
|
||||
|
|
@ -693,26 +707,21 @@ void label_Speed_ui(const LEBEL_UI *UI,GUI_SWITCH * Group)
|
|||
x1, x2, sub_y, (const uint8_t*)"BPM",
|
||||
LCD_ALIGN_CENTER, UI->Text_fc, c_top, c_bot, UI0902_CARD_SUB_SIZE);
|
||||
}
|
||||
// <EFBFBD><EFBFBD><EFBFBD>棺ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>autobandֵ<EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>IJ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
// 万能:和弦走向;普通/专业:节奏类型 | 本地曲目
|
||||
void label_ModeSelece_ui(const LEBEL_UI *UI,GUI_SWITCH * Group)
|
||||
{
|
||||
char *str;
|
||||
GUI_SWITCH *paramCurData = NULL;
|
||||
uint16_t c_top, c_bot;
|
||||
uint8_t tab = (uint8_t)mGuiData[GUI_TAB_INDEX].Current;
|
||||
UI_GetFocusGrad(GUI_MODE_PARAM, &c_top, &c_bot);
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: paramCurData = &ParamGuiData[SONG_MODE_PARAM]; break;
|
||||
case 1: paramCurData = &ParamGuiData[EXPRESS_MODE_PARAM]; break;
|
||||
case 2: paramCurData = &ParamGuiData[ALL_MODE_PARAM]; break;
|
||||
}
|
||||
(void)Group;
|
||||
|
||||
LCD_FillRoundRectGradient(UI->x, UI->y+UI0902_TAB_H+4, UI->w, UI->h-UI0902_TAB_H-4, UI0902_RADIUS_CARD, c_top, c_bot);
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current) {
|
||||
case 0:case 1:
|
||||
Draw_Tab_Mode_Menu(UI, &mGuiData[GUI_AUTOBAND_SW]);
|
||||
break;
|
||||
case 2:
|
||||
/* 普通模式无 TAB:标题画在曲目行上方(与音色行一致),对齐 0902-04 */
|
||||
|
||||
if (tab == 0)
|
||||
{
|
||||
/* 万能:无 TAB,标题「和弦走向」 */
|
||||
str = (char*)"\xBA\xCD\xCF\xD2\xD7\xDF\xCF\xF2";
|
||||
{
|
||||
uint16_t row_y = (uint16_t)(UI->y + UI0902_TAB_H + 4);
|
||||
|
|
@ -723,24 +732,20 @@ void label_ModeSelece_ui(const LEBEL_UI *UI,GUI_SWITCH * Group)
|
|||
(uint8_t *)str, UI->Tab_Align, UI->Tab_fc, UI0902_BG_COLOR, 0, UI->Tab_size
|
||||
);
|
||||
}
|
||||
break;
|
||||
paramCurData = &ParamGuiData[ALL_MODE_PARAM];
|
||||
}
|
||||
switch(mGuiData[GUI_TAB_INDEX].Current)
|
||||
{
|
||||
case 0: case 1:
|
||||
if(mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
else
|
||||
{
|
||||
/* 普通/专业:节奏类型 | 本地曲目 */
|
||||
Draw_Tab_Mode_Menu(UI, &mGuiData[GUI_AUTOBAND_SW]);
|
||||
if (mGuiData[GUI_AUTOBAND_SW].Current)
|
||||
paramCurData = &ParamGuiData[EXPRESS_MODE_PARAM];
|
||||
}else
|
||||
{
|
||||
else
|
||||
paramCurData = &ParamGuiData[SONG_MODE_PARAM];
|
||||
}
|
||||
break;
|
||||
case 2: paramCurData = &ParamGuiData[ALL_MODE_PARAM]; break;
|
||||
}
|
||||
|
||||
show_Param(&UI_Label[GUI_MODE_PARAM], paramCurData);
|
||||
{
|
||||
/* 箭头与曲目行垂直中心对齐 */
|
||||
uint16_t row_cy = UI->y + UI0902_TAB_H + 4 + (UI->h - UI0902_TAB_H - 4) / 2;
|
||||
UI_DrawTriLeft(UI->x + 5, row_cy);
|
||||
UI_DrawTriRight((uint16_t)(UI->x + UI->w - 5 - UI0902_TRI_R_W), row_cy);
|
||||
|
|
|
|||
Loading…
Reference in New Issue