@@ -562,17 +562,45 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context) {
562562 // Arpeggiator
563563 if (ImGui::CollapsingHeader (" Arpeggiator" , ImGuiTreeNodeFlags_DefaultOpen)) {
564564 ImGui::Checkbox (" Enabled##arp" , (bool *)&synth->arp .enabled );
565- const char * arp_modes[] = { " UP" , " DOWN" , " ORDER" , " RANDOM" };
565+ const char * arp_modes[] = {
566+ " OFF" , " CHORD" , " UP" , " DOWN" , " UP/DOWN" , " PENDULUM" ,
567+ " CONVERGE" , " DIVERGE" , " LEAPFROG" , " THUMB-UP" , " THUMB-DOWN" ,
568+ " PINKY-UP" , " PINKY-DOWN" , " REPEAT" , " RANDOM" , " RANDOM WALK" , " SHUFFLE" , " ORDER"
569+ };
566570 int current_arp_mode = (int )synth->arp .mode ;
567- if (ImGui::Combo (" Mode" , ¤t_arp_mode, " UP \0 DOWN \0 ORDER \0 RANDOM \0\0 " , 4 )) {
571+ if (ImGui::Combo (" Mode" , ¤t_arp_mode, arp_modes, 18 )) {
568572 synth->arp .mode = (ArpMode)current_arp_mode;
569573 }
570574 ImGui::SliderFloat (" Tempo" , &synth->arp .tempo , 30 .0f , 240 .0f , " %.2f" , 0 );
575+ const char * arp_rates[] = { " 1/4" , " 1/8" , " 1/16" , " 1/32" };
576+ int current_arp_rate = (int )synth->arp .rate ;
577+ if (ImGui::Combo (" Rate" , ¤t_arp_rate, arp_rates, 4 )) {
578+ synth->arp .rate = (ArpRate)current_arp_rate;
579+ }
571580 ImGui::SliderInt (" Octave" , &synth->arp .octave , 0 , 4 , " %d" );
572581 ImGui::SliderInt (" Octaves" , &synth->arp .octaves , 1 , 6 , " %d" );
573582 ImGui::Checkbox (" Polyphonic" , (bool *)&synth->arp .polyphonic );
574583 ImGui::Checkbox (" Hold" , (bool *)&synth->arp .hold );
575584
585+ ImGui::Separator ();
586+ ImGui::Text (" Chord Generation:" );
587+
588+ // Chord Type
589+ const char * chord_types[] = {" MAJOR" , " MINOR" , " SUS" , " DIM" };
590+ int current_chord_type = (int )synth->arp .chord_type ;
591+ if (ImGui::Combo (" Chord Type" , ¤t_chord_type, chord_types, 4 )) {
592+ synth->arp .chord_type = (ChordType)current_chord_type;
593+ }
594+
595+ // Chord Extensions
596+ ImGui::Checkbox (" Add 6th" , (bool *)&synth->arp .add_6 );
597+ ImGui::Checkbox (" Add m7" , (bool *)&synth->arp .add_m7 );
598+ ImGui::Checkbox (" Add Maj7" , (bool *)&synth->arp .add_M7 );
599+ ImGui::Checkbox (" Add 9th" , (bool *)&synth->arp .add_9 );
600+
601+ // Voicing
602+ ImGui::SliderInt (" Voicing" , &synth->arp .voicing , 0 , 16 , " %d" );
603+
576604 ImGui::Separator ();
577605 ImGui::Text (" Presets:" );
578606 ImGui::Columns (4 , " arp_presets" , true );
@@ -618,6 +646,7 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context) {
618646 if (ImGui::Button (" Trance Gate" )) {
619647 synth->arp .mode = ARP_UP;
620648 synth->arp .tempo = 140 .0f ;
649+ synth->arp .rate = RATE_SIXTEENTH;
621650 synth->arp .octaves = 4 ;
622651 synth->arp .polyphonic = 1 ;
623652 synth->arp .hold = 1 ;
@@ -642,14 +671,14 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context) {
642671 }
643672 ImGui::SameLine (); ImGui::Text (" Progressive" );
644673
645- if (ImGui::Button (" Ambient Pad " )) {
646- synth->arp .mode = ARP_UP ;
674+ if (ImGui::Button (" Sustained Chord " )) {
675+ synth->arp .mode = ARP_CHORD ;
647676 synth->arp .tempo = 60 .0f ;
648- synth->arp .octaves = 3 ;
677+ synth->arp .octaves = 1 ;
649678 synth->arp .polyphonic = 1 ;
650679 synth->arp .hold = 1 ;
651680 }
652- ImGui::SameLine (); ImGui::Text (" Slow & wide " );
681+ ImGui::SameLine (); ImGui::Text (" Chordal " );
653682
654683 ImGui::NextColumn ();
655684
@@ -674,6 +703,7 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context) {
674703 if (ImGui::Button (" DnB Roll" )) {
675704 synth->arp .mode = ARP_RANDOM;
676705 synth->arp .tempo = 174 .0f ;
706+ synth->arp .rate = RATE_THIRTYSECOND;
677707 synth->arp .octaves = 2 ;
678708 synth->arp .polyphonic = 1 ;
679709 synth->arp .hold = 0 ;
@@ -718,14 +748,14 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context) {
718748 }
719749 ImGui::SameLine (); ImGui::Text (" Harsh" );
720750
721- if (ImGui::Button (" Jazz Walker " )) {
722- synth->arp .mode = ARP_ORDER ;
723- synth->arp .tempo = 140 .0f ;
751+ if (ImGui::Button (" Pendulum " )) {
752+ synth->arp .mode = ARP_PENDULUM ;
753+ synth->arp .tempo = 120 .0f ;
724754 synth->arp .octaves = 2 ;
725- synth->arp .polyphonic = 1 ;
755+ synth->arp .polyphonic = 0 ;
726756 synth->arp .hold = 0 ;
727757 }
728- ImGui::SameLine (); ImGui::Text (" Walking " );
758+ ImGui::SameLine (); ImGui::Text (" Bouncing " );
729759
730760 ImGui::Columns (1 , " " , false );
731761 }
0 commit comments