Skip to content

Commit

Permalink
MBSEQ: added euclid generator
Browse files Browse the repository at this point in the history
  • Loading branch information
midibox committed Mar 2, 2019
1 parent 9614021 commit c3a2372
Show file tree
Hide file tree
Showing 8 changed files with 651 additions and 15 deletions.
3 changes: 3 additions & 0 deletions apps/sequencers/midibox_seq_v4/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Wishlist for future features
MIDIboxSEQ V4.059
~~~~~~~~~~~~~~~~~

o added Euclidean Rhythm Generator for drum and synth sequences.
The page can be entered by pressing&holding SELECT in the edit menu -> GP16

o fixed stack overflow which happened when incoming OSC messages were forwarded
to OSC in Live mode (they are now automatically filtered to avoid feedback loops)

Expand Down
1 change: 1 addition & 0 deletions apps/sequencers/midibox_seq_v4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ THUMB_SOURCE = core/app.c \
core/seq_ui_trkgrv.c \
core/seq_ui_trkmorph.c \
core/seq_ui_trkrnd.c \
core/seq_ui_trkeuclid.c \
core/seq_ui_trkrec.c \
core/seq_ui_trgasg.c \
core/seq_ui_fx.c \
Expand Down
26 changes: 18 additions & 8 deletions apps/sequencers/midibox_seq_v4/core/seq_ui_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ static s32 Encoder_Handler(seq_ui_encoder_t encoder, s32 incrementer)
case SEQ_UI_ENCODER_GP2: seq_ui_edit_view = SEQ_UI_EDIT_VIEW_TRG; break;
case SEQ_UI_ENCODER_GP3: seq_ui_edit_view = SEQ_UI_EDIT_VIEW_LAYERS; break;
case SEQ_UI_ENCODER_GP4: seq_ui_edit_view = SEQ_UI_EDIT_VIEW_303; break;
case SEQ_UI_ENCODER_GP9: seq_ui_edit_view = SEQ_UI_EDIT_VIEW_STEPSEL; break;
case SEQ_UI_ENCODER_GP8: seq_ui_edit_view = SEQ_UI_EDIT_VIEW_STEPSEL; break;

case SEQ_UI_ENCODER_GP7:
case SEQ_UI_ENCODER_GP8: {
case SEQ_UI_ENCODER_GP9:
case SEQ_UI_ENCODER_GP10: {
if( incrementer == 0 ) // button
incrementer = (encoder == SEQ_UI_ENCODER_GP7) ? -1 : 1;

Expand All @@ -240,6 +240,16 @@ static s32 Encoder_Handler(seq_ui_encoder_t encoder, s32 incrementer)
else
return 0;
}

case SEQ_UI_ENCODER_GP13:
case SEQ_UI_ENCODER_GP14:
SEQ_UI_PageSet(SEQ_UI_PAGE_TRKRND);
break;

case SEQ_UI_ENCODER_GP15:
case SEQ_UI_ENCODER_GP16:
SEQ_UI_PageSet(SEQ_UI_PAGE_TRKEUCLID);
break;
}

show_edit_config_page = 0; // switch back to view
Expand Down Expand Up @@ -626,8 +636,8 @@ s32 SEQ_UI_EDIT_LCD_Handler(u8 high_prio, seq_ui_edit_mode_t edit_mode)

// layout edit config
// 00000000001111111111222222222233333333330000000000111111111122222222223333333333
// Step Trg Layer 303 Datawheel:Step
// View View View View Scroll Select
// Step Trg Layer 303 Step Datawheel: Random Euclid
// View View View View Select Scroll Generator Generator

// layout trigger view
// 00000000001111111111222222222233333333330000000000111111111122222222223333333333
Expand Down Expand Up @@ -659,11 +669,11 @@ s32 SEQ_UI_EDIT_LCD_Handler(u8 high_prio, seq_ui_edit_mode_t edit_mode)
};

SEQ_LCD_CursorSet(0, 0);
SEQ_LCD_PrintString("Step Trg Layer 303 Datawheel:Step ");
SEQ_LCD_PrintString("Step Trg Layer 303 Step Datawheel: Random Euclid ");
SEQ_LCD_CursorSet(0, 1);
SEQ_LCD_PrintString("View View View View ");
SEQ_LCD_PrintString("View View View View Select");
SEQ_LCD_PrintString((char *)datawheel_mode_str[datawheel_mode]);
SEQ_LCD_PrintString("Select ");
SEQ_LCD_PrintString(" Generator Generator ");
return 0; // no error
}

Expand Down
5 changes: 4 additions & 1 deletion apps/sequencers/midibox_seq_v4/core/seq_ui_pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ typedef enum {
SEQ_UI_PAGE_INFO = 52,
SEQ_UI_PAGE_TRKLIVE = 53,
SEQ_UI_PAGE_PATTERN_RMX = 54,
SEQ_UI_PAGE_TRKEUCLID = 55,
} seq_ui_page_t;

#define SEQ_UI_PAGES (SEQ_UI_PAGE_PATTERN_RMX + 1)
#define SEQ_UI_PAGES (SEQ_UI_PAGE_TRKEUCLID + 1)
#define SEQ_UI_FIRST_MENU_SELECTION_PAGE SEQ_UI_PAGE_EDIT
#define SEQ_UI_NUM_MENU_PAGES (SEQ_UI_PAGES-SEQ_UI_FIRST_MENU_SELECTION_PAGE)

Expand Down Expand Up @@ -131,6 +132,7 @@ extern s32 SEQ_UI_BOOKMARKS_Init(u32 mode);
extern s32 SEQ_UI_INFO_Init(u32 mode);
extern s32 SEQ_UI_TRKLIVE_Init(u32 mode);
extern s32 SEQ_UI_PATTERN_RMX_Init(u32 mode);
extern s32 SEQ_UI_TRKEUCLID_Init(u32 mode);


typedef struct {
Expand Down Expand Up @@ -200,6 +202,7 @@ static const seq_ui_page_entry_t ui_menu_pages[SEQ_UI_PAGES] = {
{ "About this MIDIbox", (void *)&SEQ_UI_INFO_Init },
{ "Live Play ", (void *)&SEQ_UI_TRKLIVE_Init },
{ "Pattern Remix ", (void *)&SEQ_UI_PATTERN_RMX_Init },
{ "Track Euclid Gen. ", (void *)&SEQ_UI_TRKEUCLID_Init },
};

// following pages are directly accessible with the GP buttons when MENU button is pressed
Expand Down
Loading

0 comments on commit c3a2372

Please sign in to comment.