Subversion Repositories svn.mios32

Rev

Rev 2092 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2092 Rev 2635
Line 1... Line 1...
1
// $Id: seq_ui_trkinst.c 2092 2014-11-16 00:21:24Z tk $
1
// $Id: seq_ui_trkinst.c 2635 2019-01-06 17:14:01Z tk $
2
/*
2
/*
3
 * Track instrument page
3
 * Track instrument page
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 116... Line 116...
116
      case SEQ_UI_ENCODER_GP15: { // select preset
116
      case SEQ_UI_ENCODER_GP15: { // select preset
117
        int pos;
117
        int pos;
118
118
119
        if( event_mode == SEQ_EVENT_MODE_Drum ) {
119
        if( event_mode == SEQ_EVENT_MODE_Drum ) {
120
          if( SEQ_UI_Var8_Inc(&ui_edit_preset_num_drum, 0, SEQ_LABEL_NumPresetsDrum()-1, incrementer) ) {
120
          if( SEQ_UI_Var8_Inc(&ui_edit_preset_num_drum, 0, SEQ_LABEL_NumPresetsDrum()-1, incrementer) ) {
-
 
121
        u8 note = 36;
121
        SEQ_LABEL_CopyPresetDrum(ui_edit_preset_num_drum, (char *)&seq_core_trk[visible_track].name[5*ui_selected_instrument]);
122
        SEQ_LABEL_CopyPresetDrum(ui_edit_preset_num_drum, (char *)&seq_core_trk[visible_track].name[5*ui_selected_instrument], &note);
-
 
123
-
 
124
        SEQ_LAYER_PresetDrumNoteSet(ui_edit_preset_num_drum, note); // define new default value for drum
-
 
125
-
 
126
        // new: also pass to CC
-
 
127
        SEQ_CC_Set(visible_track, SEQ_CC_LAY_CONST_A1 + ui_selected_instrument, note);
-
 
128
       
122
        for(pos=4, ui_edit_name_cursor=pos; pos>=0; --pos)
129
        for(pos=4, ui_edit_name_cursor=pos; pos>=0; --pos)
123
          if( seq_core_trk[visible_track].name[5*ui_selected_instrument + pos] == ' ' )
130
          if( seq_core_trk[visible_track].name[5*ui_selected_instrument + pos] == ' ' )
124
            ui_edit_name_cursor = pos;
131
            ui_edit_name_cursor = pos;
125
          else
132
          else
126
            break;
133
            break;