HAGIWO/A-RYTH-MATIC/MODULOVE euclidean firmware *FIXED*

MODULOVE firmware :

hello there.
well , well, here we go again.
So… came across the ARYTHMATIC alt firmware with clock reset and flipped button/encoder
operation and certainly prefer this version. (by no means a critic of mr HAGIWO , far from it )
Also with the original firmware my encoder was skipping/missing values
However ,as is the nature of these things , Random Occurence select was not working.
I confirmed this with meebilt on YT who experienced same behaviour.
Pretty much a complete novice with coding ,but can work out how to adjust some variables.
Anyway managed to work it out .
some notes…then full code… I have adjusted the random values also …thus :
//random assign
byte hit_occ[6] = {15, 15, 15, 15, 15, 15}; //random change rate of occurrence
byte off_occ[6] = {0, 0, 0 ,0, 0, 0}; //random change rate of occurrence
byte mute_occ[6] = {15, 15, 15, 15, 15, 15}; //random change rate of occurrence
byte hit_rng_max[6] = {7, 7, 7, 7, 7, 7}; //random change range of max
byte hit_rng_min[6] = {2, 2, 2, 2, 2, 2}; //random change range of max
… but you may flavour to your own taste.

CHANGES MADE :
approx line 182
if (select_ch == 6 && select_menu >= 1) { // random mode * CHANGE TO*
if (select_ch == 6 && select_menu > 1) { // random mode

approx line 232
else if (select_ch == 6 && sw == 0) { // random mode
bar_select ++;
if (bar_select >= 4) {
bar_select = 0; CHANGE TO
else if (select_ch == 6 ) { // random mode
bar_select ++;
if (bar_select >= 5) {
bar_select = 0;

approx line 283
else if (select_ch == 6) { // random mode
bar_select --;
if (bar_select >= 4) {
bar_select = 0; CHANGE TO
else if (select_ch == 6) { // random mode
bar_select --;
if (bar_select >= 4) {
bar_select = 4;

approx line 433 (enables ch1 random mode, previously disabled)
for (k = 1; k <= 5; k++) { CHANGE TO
for (k = 0; k <= 5; k++) {

1 Like

You’ve gone through quite some effort here, but without indentation most of the code is more or less unreadable and as a consequence will not likely be read by anyone because it takes way too much effort. Can you reformat it?

As an example, this would make your point much clearer:

approx line 283

> else if (select_ch == 6) { // random mode
>   bar_select --;
>   if (bar_select >= 4) {
>     bar_select = 0; 

CHANGE TO

> else if (select_ch == 6) { // random mode
>   bar_select --;
>   if (bar_select >= 4) {
>     bar_select = 4;

And then continue with the rest of your text. You can use the ‘preformatted text’ button for inclusion of indented source code.

Thanks for corrections .Well I`m stumped how to format the text. Added a dropbox link instead.
Copy and paste into 1.8.19 arduino IDE and works for this thicko.
hopefully, now Ive deleted the overwhelming full code , a keen mind will decipher these little tweaks.
well worth building though.

You can copy the text and paste it between backquotes

``` put preformatted text here ```

then when the post is displayed the preformatted text will keep its original formatting, otherwise it will loos it. E.g. no back quotes:

//draw step dot
for (k = 0; k <= 5; k++) { //k = 1~6ch
for (j = 0; j <= limit[k] - 1; j++) { // j = steps
display.drawPixel(x16[j] + graph_x[k], y16[j] + graph_y[k], WHITE);
}
}

will then be shown after adding the back quotes as


  //draw step dot
  for (k = 0; k <= 5; k++) { //k = 1~6ch
    for (j = 0; j <= limit[k] - 1; j++) { // j = steps
      display.drawPixel(x16[j] + graph_x[k], y16[j] + graph_y[k], WHITE);
    }
  }

which is easier to read and understand.

You can put the 3 back quotes before and 3 after the text by hand or use the </> button when entering the text. In the example window to the right you can see whether you did it right.