Hi,
I can record sound with my computer with this patch, but Bela stays silent. I have no errors, print messages seem fine.
When I run this patch (with the MPR121 Capacitive Touch sensor), Bela does not want to record.
https://cloud.constantvzw.org/s/pNc45tZKRx2aRsQ

alt text

alt text

alt text

Terminal output:
When I touch the play 'button'
f play: bang
f play: bang
f play: bang
f play: bang
When I touch the record 'button'
tussenstap:: 0
0:: bang
tussenstap:: 1
f frec: bang

The messages you are printing seem expected (considering that you are not using [trigger]). What is the issue you are having? How do you test this on your computer? By manually pressing the bang that goes into [print 0:]? On Bela, if you listen to [adc~] in passthrough, do you hear anything?

    giuliomoro
    --- Hi, the microphone works like a charm with this patch:

    alt text

    -- These are my Computer debug patches for recording sound:

    alt text

    alt text

    Recording works and playing works whilst pressing the Bangs and the message boxes highlighted in red. Now trying to check what information the Touch sensor gives.
    But in theory it should work, because I get the terminal feedback via the print messages

    I made a Patch that immediately starts recording when Bela has finished building the project. The sound recording works. After 5 seconds or a delay of 5005 ms (the duration of the recording) the sound plays perfectly.

    alt text

    So my problem lies in the data coming from the sensor and it connecting to my recording patch. I need a Value 1 from a stream of data looking like this:
    0
    0
    0
    0
    167
    167
    167
    167
    0
    0
    0

    One 167 value needs to make a Message box 1 and ignore the rest of the 167 and the 0's

    Pfew..

    from your data stream (one possibility):

    from your datastream
    |
    |
    |clip 0 1|
    |
    |change|
    |
    |select 1|
    |
    |
    connect to bang

    note that this only works correctly if there are really no zeros between the 167s if you get a stream that changes from 0 to 167 and back again, you will need some debouncing. there is an example in the BELA examples for puredata

      hei,
      Touching the sensor ones makes my datastream actually look more like this:

      f: play: 0
      f: record: 0
      f: play: 0
      0:: bang
      tussenstap:: 1
      f rec_select: bang
      f: record: 156
      f: play: 0
      f: record: 156
      f: play: 0
      f: record: 156
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 137
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 136
      f: play: 0
      f: record: 0
      f: play: 0
      f: record: 0
      f: play: 0
      f: record: 0
      f: play: 0
      f: record: 0
      f: play: 0

      (with a lot more 157's, 137 and 136's than copy pasted here - I edited for legibility)
      I need a message box
      |
      |> 50|
      ???
      |
      | 1(
      |
      When the value is higher than 50

        lokki I have debounced the values before it goes into the
        |
        |> 50|
        |

        dywen f: play: 0 should not influence the f: record as it is another sensor and comes from
        |unpack f f|

          dywen
          you will need a select 1 before the message box otherwise both 0 and 1 will trigger the message

          6 days later

          Tough knot to untangle::: in the end my render.cpp file for the Mpr 121 seems to block all sound. That's why Bela does not record anything. I'll open a new issue. Very very strange.
          My pd patches worked in August 2019, with the previous gui and before the change with the Libraries.

          🙁

          So whilst I was thinking it was Pure Data,having patches that did fine on my computer, but not on Bela, it was something else!