The sketch embedded in the example code of arduinoRead and arduinoReadF needs to be updated.
Current:
int hi = ((senVal>>7)&0x0f) | ((senChan&0x0f)<<4);
Updated:
int hi = ((senVal>>7)&0x07)|((senChan&0x1F)<<3);
The updated code is consistent with the comment in the sketch:
// The packing of the data is sssssvvv 0vvvvvvv where s is a senChan bit, v a senVal bit and 0 is zero` bit
The updated code is from the article in ICSC2022, 'New Arduino Opcodes to Simplify the Streaming of Sensor and Controller Data to Csound'. I also confirmed that the updated sketch works but current one does not(Csound version 6.18, MacOS).
The sketch embedded in the example code of arduinoRead and arduinoReadF needs to be updated.
Current: int hi = ((senVal>>7)&0x0f) | ((senChan&0x0f)<<4);
Updated: int hi = ((senVal>>7)&0x07)|((senChan&0x1F)<<3);
The updated code is consistent with the comment in the sketch: // The packing of the data is sssssvvv 0vvvvvvv where s is a senChan bit, v a senVal bit and 0 is zero` bit
The updated code is from the article in ICSC2022, 'New Arduino Opcodes to Simplify the Streaming of Sensor and Controller Data to Csound'. I also confirmed that the updated sketch works but current one does not(Csound version 6.18, MacOS).