Default pick-down accompaniment to current-key I chord.

When no left-hand chord is selected, Pick_Handle uses index-1 major (same as preamble) so strumming still starts Autoband.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-09-06 07:20:08 +08:00
parent ee900b5657
commit 6436477ec2
1 changed files with 20 additions and 9 deletions

View File

@ -716,6 +716,17 @@ void Pick_Handle()
{ {
uint8_t midi = 0; uint8_t midi = 0;
uint8_t midi_note_buff[4] = {0,}; uint8_t midi_note_buff[4] = {0,};
uint8_t note_cnt = 0;
uint8_t chord_id = KEY_ID_1629;
/* 左手未触发和弦板(或落在拍速/停止键)时:拨片默认发当前调一级大和弦伴奏 */
if (chord_id == 0 || chord_id == 22 || chord_id == 23)
{
KEY_ID_1629 = 1;
chord_type_index_map[1].type = 0;
chord_id = 1;
}
note_cnt = GetChordNotesByType(chord_id, chord_type_index_map[chord_id].type, midi_note_buff);
Return_Light_buff(KEY_ID_1629); Return_Light_buff(KEY_ID_1629);
switch(mGuiData[GUI_TAB_INDEX].Current) switch(mGuiData[GUI_TAB_INDEX].Current)
@ -730,24 +741,24 @@ void Pick_Handle()
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
midi = 0x3C + mGuiData[GUI_TRANSPOSE].Current; midi = 0x3C + mGuiData[GUI_TRANSPOSE].Current;
AutoBandTop1_StartWithNote(midi); AutoBandTop1_StartWithNote(midi);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
} }
break; break;
case 1: case 1:
StartFlag = 1; StartFlag = 1;
AutoBandTop1_SetPiecePlayMode(1,0,1920); AutoBandTop1_SetPiecePlayMode(1,0,1920);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
break; break;
case 0: case 0:
if(PressFlag) if(PressFlag)
{ {
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
}else }else
{ {
AutoBandTop1_SetPiecePlayMode(1,0,480); AutoBandTop1_SetPiecePlayMode(1,0,480);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
} }
StartFlag = 1; StartFlag = 1;
break; break;
@ -761,14 +772,14 @@ void Pick_Handle()
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
midi = 0x3C + mGuiData[GUI_TRANSPOSE].Current; midi = 0x3C + mGuiData[GUI_TRANSPOSE].Current;
AutoBandTop1_StartWithNote(midi); AutoBandTop1_StartWithNote(midi);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
} }
break; break;
case 1: case 1:
StartFlag = 1; StartFlag = 1;
AutoBandTop1_SetPiecePlayMode(1,0,1920); AutoBandTop1_SetPiecePlayMode(1,0,1920);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
break; break;
case 0: case 0:
@ -776,12 +787,12 @@ void Pick_Handle()
if(PressFlag) if(PressFlag)
{ {
AutoBandTop1_SetPiecePlayMode(1,0,480); AutoBandTop1_SetPiecePlayMode(1,0,480);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
AutoBandTop1_SetLoopMode(0,1); AutoBandTop1_SetLoopMode(0,1);
}else }else
{ {
AutoBandTop1_SetPiecePlayMode(1,0,480); AutoBandTop1_SetPiecePlayMode(1,0,480);
AutoBandTop1_StartWithNotes(midi_note_buff,GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff)); AutoBandTop1_StartWithNotes(midi_note_buff, note_cnt);
} }
break; break;
} }