Alllrighty so things are starting to work now! I'm modeling this after Paul's patch and its not working %100 but things are responding!
I've added a script object into a new patch file and threw a modified version of Paul's code to it that includes an extra "S" pin from the Axoloti to the breakout board and set things up so the code runs through all 16 inputs on the breakout rather than just 8
I then added 16 different dials to the patch, each with different names ranging from y0 to y15 to correspond with the script.
So far all 16 dials seem to be responding to input but they're all taking input from one potentiometer for some odd reason...
Theres also some jitter going on. I have quite a few capacitors laying around but I'm not sure exactly where to put them...i think they may resolve the jitter issue though....I think this issue can be resolved using code as well (I did a similar project using an arduino a while ago that solved this problem quite nicely but I dont know how to implement that code into this project
heres a picture of what it looks like (I attached an oscilator and output to it in order to hear how bad the jitter was....I chose that dial at random because each dial is outputting almost identical signals....
Here's the patch so far if anyone wants to tinker with it....warning though - i hav't properly commented anything so its probably hella confusing (im not a programmer and have no idea what im doing obviously)
16inputs16respondbut1value.axp (7.3 KB)
and heres the code for those who want to take a look but dont want to download the patch
int i; // select y-input
void setup(void){
palSetPadMode(GPIOA,0,PAL_MODE_OUTPUT_PUSHPULL); // s0 Pin of 4051
palSetPadMode(GPIOA,1,PAL_MODE_OUTPUT_PUSHPULL); // S1 Pin of 4051
palSetPadMode(GPIOA,2,PAL_MODE_OUTPUT_PUSHPULL); // s2 Pin of 4051
palSetPadMode(GPIOA,3,PAL_MODE_OUTPUT_PUSHPULL); // s3 Pin of 4051
i = 0;
}
void loop(void){
i++;
if (i == 16) {
i = 0;
}
palWritePad(GPIOA,0,((i& 0x01) > 0)); // write s0
palWritePad(GPIOA,1,(((i>>1)& 0x01) > 0)); // write s1
palWritePad(GPIOA,2,(((i>>2)& 0x01) > 0)); // write s2
palWritePad(GPIOA,3,(((i>>3)& 0x01) > 0)); // write s2
int z = adcvalues[14]<<15; // ADC z-input
switch (i){
case 0: PExParameterChange(&parent->PExch[PARAM_INDEX_y0_value],z,0xFFFD); break; //connect in1 to dial (named y0)
case 1: PExParameterChange(&parent->PExch[PARAM_INDEX_y1_value],z,0xFFFD); break; //connect in2 to dial (named y1)
case 2: PExParameterChange(&parent->PExch[PARAM_INDEX_y2_value],z,0xFFFD); break; //connect in3 to dial (named y2)
case 3: PExParameterChange(&parent->PExch[PARAM_INDEX_y3_value],z,0xFFFD); break; //connect in4 to dial (named y3)
case 4: PExParameterChange(&parent->PExch[PARAM_INDEX_y4_value],z,0xFFFD); break; //connect in5 to dial (named y4)
case 5: PExParameterChange(&parent->PExch[PARAM_INDEX_y5_value],z,0xFFFD); break; //connect in6 to dial (named y5)
case 6: PExParameterChange(&parent->PExch[PARAM_INDEX_y6_value],z,0xFFFD); break; //connect in7 to dial (named y6)
case 7: PExParameterChange(&parent->PExch[PARAM_INDEX_y7_value],z,0xFFFD); break; //connect in8 to dial (named y7)
case 8: PExParameterChange(&parent->PExch[PARAM_INDEX_y8_value],z,0xFFFD); break; //connect in1 to dial (named y0)
case 9: PExParameterChange(&parent->PExch[PARAM_INDEX_y9_value],z,0xFFFD); break; //connect in2 to dial (named y1)
case 10: PExParameterChange(&parent->PExch[PARAM_INDEX_y10_value],z,0xFFFD); break; //connect in3 to dial (named y2)
case 11: PExParameterChange(&parent->PExch[PARAM_INDEX_y11_value],z,0xFFFD); break; //connect in4 to dial (named y3)
case 12: PExParameterChange(&parent->PExch[PARAM_INDEX_y12_value],z,0xFFFD); break; //connect in5 to dial (named y4)
case 13: PExParameterChange(&parent->PExch[PARAM_INDEX_y13_value],z,0xFFFD); break; //connect in6 to dial (named y5)
case 14: PExParameterChange(&parent->PExch[PARAM_INDEX_y14_value],z,0xFFFD); break; //connect in7 to dial (named y6)
case 15: PExParameterChange(&parent->PExch[PARAM_INDEX_y15_value],z,0xFFFD); break; //connect in8 to dial (named y7)
}
}
if anyone out there knows what theyre doing and wants to take a crack at helping, be my guest!