• Trill
  • Trill Square X Y values for MIDI

Hi there - I'm using a Trill Square with Teensy 4.0. All working and I've managed to get CC values from the Y value (by dividing by 14) but am struggling to figure out the X value. Is there a simple formula to go from the Trill values (0-1792) to an X value? Thanks!

teensy 4.0 has a very powerful processor with a FPU (floating point unit) so you are fine by dividing by 14.11...

The formula for the max value is 128 *(n -1) , where n is the number of sensing pads on the axis. That number is 15 for each axis on Square, so the maximum should be 1792 on both axes. Note that to actually reach that value you'd need to only touch the last sensing pad on the axis (similarly to truly reach 0 you need to only touch the first sensing pad). Touching only one pad at a time is actually really hard especially if the sensor is embedded in a slotted cutout on the surface. It is easier - for testing purposes - if you hold the sensor by the cable and touch it on the side of the PCB.

This said, I'd expect anything that works for the Y axis to also work for the X axis, so I am not sure I understand the issue you are having. If the lokki's answer doesn't already address it, could you please provide more details?

17 days later

Apologies - it was a rookie mistake! I was using the example for Bar (had just changed the name in the setup) and didn't realise that it was one axis only. Got it working now! Have another wee issue but I'll post that as another question!