2 months later

Awesome! I've just seen this now, sorry, but thanks both for fixing stuff. I'll update my code when I get a chance to.

8 months later

Greetings. is anybody else having a serious lag on the responsiveness using this render.cpp? tried rearranging and loosing extra baggage, yet i has not helped at all. The capSense example is of course flawless. Is it possible to get the same responsiveness when generating sound in pd, using the mpr121 readings? Thanks.

    eccot are you using heavy compiled pd patches or standard pd files? the latter has some latency inherent since it is not compiled code.

      lokki are you using heavy compiled pd patches or standard pd files? the latter has some latency inherent since it is not compiled code.

      There is no inherent latency in Pd (I mean, yes, the minimum block size we set is 16 samples per block), but there should be intrinsic latency when reading these sensors. However, if the CPU usage of the audio thread (or of the Scope) is fairly high, then the sensor readings will come in less often, and this could be the cause of the latency you perceive.

      So, what is the CPU usage of the patch, as displayed by the IDE? If it's above 50%, try closing the Scope tab, if it's open, and see if that improves the situation.

        giuliomoro There is no inherent latency in Pd

        sorry my bad. i was under the impression that pd patches run with higher latency.

        2 years later

        Hello, guys! I want to follow up on this thread!
        I'm using all the files form dywen (thank you so much!) to establish connection between MPR and PD patch.
        Everything works the way I need. However, I'm experiencing some sort of latency. When I'm pressing my touch points one by one, the sound only happens with an interval of about half a second. Basically I can't play anything fast.
        Is this limitation written in code? (unfortunately I don't know how to read it)
        I tried to change block size, it didn't do anything...
        Here is my PD patch and the picture of touch panel
        https://github.com/basswoman/bela

        Thank you for your help!

          this looks nice https://github.com/basswoman/bela/blob/main/image%20of%20touch%20panel.png !

          basswoman Is this limitation written in code? (unfortunately I don't know how to read it)

          As far as I can see from the C++ code, the sensor is read every 25ms (or as fast as possible if it actually takes more than that) and the data is sent to Pd immediately after that, so I'd suspect any additional latency to come from the Pd patch itself, although it is not immediate for me to see where that would happen. I would encourage you to try out the C++ example on Bela: Sensors/MPR121 and see if you notice a similar latency there.

          2 years later

          Hello everyone, I'm trying according to the file uploaded by dywen in 2018, but because I'm a novice in programming, the following errors have occurred in Bela ide. The first few errors can be replaced directly. I don't know how to solve this later? Thank you!
          alt text

            giuliomoro
            Thank you for your reply.It's this link.
            Later on, I saw the MPR121 example in Bela that you mentioned earlier. After I connected the copper board, although I didn't understand C++very well, at least it made a sound......