Jump to content

Modifying mios32/apps/sequencers/midibox_seq_v4/core /seq_ui.c


Recommended Posts

Posted (edited)

Hello,

I try to remove the view step of the step button.

I suppose replacing:

this:

static s32 SEQ_UI_Button_StepView(s32 depressed)
{
  //  static seq_ui_page_t prev_page = SEQ_UI_PAGE_NONE;
  // also used by seq_ui_stepsel

  static seq_ui_sel_view_t prev_sel_view = SEQ_UI_SEL_VIEW_NONE;

  if( !depressed ) {
    prev_sel_view = seq_ui_sel_view;
    seq_ui_sel_view = SEQ_UI_SEL_VIEW_STEPS;
    seq_ui_button_state.TAKE_OVER_SEL_VIEW = 1;

    if( ui_page == SEQ_UI_PAGE_MUTE || SEQ_UI_PAGE_PATTERN || ui_page == SEQ_UI_PAGE_SONG )
      SEQ_UI_PageSet(SEQ_UI_PAGE_EDIT); // this selection only makes sense in EDIT page
  } else {
    if( !seq_ui_button_state.TAKE_OVER_SEL_VIEW )
      seq_ui_sel_view = prev_sel_view;
  }

  if( seq_hwcfg_button_beh.step_view ) {
    if( depressed ) return -1; // ignore when button depressed
    if( !seq_ui_button_state.STEP_VIEW ) // due to page change: button going to be set, clear other toggle buttons
      seq_ui_button_state.PAGE_CHANGE_BUTTON_FLAGS = 0;
    seq_ui_button_state.STEP_VIEW ^= 1; // toggle STEP_VIEW pressed (will also be released once GP button has been pressed)
  } else {
    // set mode
    seq_ui_button_state.STEP_VIEW = depressed ? 0 : 1;
  }

  if( seq_ui_button_state.STEP_VIEW ) {
    ui_stepview_prev_page = ui_page;
    SEQ_UI_PageSet(SEQ_UI_PAGE_STEPSEL);
  } else {
    if( ui_page == SEQ_UI_PAGE_STEPSEL )
      SEQ_UI_PageSet(ui_stepview_prev_page);
  }

return 0; // no error

}

by this:

static s32 SEQ_UI_Button_StepView(s32 depressed)
{
  //  static seq_ui_page_t prev_page = SEQ_UI_PAGE_NONE;
  // also used by seq_ui_stepsel

  static seq_ui_sel_view_t prev_sel_view = SEQ_UI_SEL_VIEW_NONE;

  SEQ_UI_PageSet(SEQ_UI_PAGE_STEPSEL);

  return 0; // no error

  }

Also i suppose i have to replace this:

SEQ_LED_PinSet(seq_hwcfg_led.step_view, ui_page == SEQ_UI_PAGE_STEPSEL || (selbuttons_available && seq_ui_sel_view == SEQ_UI_SEL_VIEW_STEPS));

by this:

SEQ_LED_PinSet(seq_hwcfg_led.step_view, ui_page == SEQ_UI_PAGE_STEPSEL ));

 

Als is there a way i can test the code without uploading it into the seq?

 

Thanks in advance,

 

Edited by anonyme-x22

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...