Digital I/O at signal rate means that you read or write your audio signal using
[dac~], just like for an audio signal, however this gets quantized to 0 or 1 before it is sent out.
Digital I/O at message rate means that you receive a message every time the input value changes ( for inputs ), or that the output value changes evert time you send it a message (for outputs).
The baudrate of an Arduino specifies the speed of the connection, and has no analogy with any of the above. In one of your notes you seem to interpret the
[metro 200] as setting the
baudrate. No, if anything, the analogy with Arduino would be, assuming that you do
serial.print() once per
loop(), and that
loop() always takes the time to execute, then
200 would be the duration of
loop(); conversely, it means that you would receive a message from Arduino every 200ms.
In your case you probably want to set an input as signal rate. You mentioned digitalIn 3, 4, 5, which in Bela-Pd terms translates to 14, 15, 16. So first thing you need to initialize the channels as inputs at message rate:
[in 14, in 15, in 16(
then you can receive from each of the following accordingly:
this way you will see a message printed in the console (
1) every time your button changes state. In your patch you can use
[t b b (
@hv_param thing, that is needed only when using Pd with Heavy (see here), but you can probably ignore it for now.
dywen - how do you boost the line in signal of the line in - by multiplying it?
yes: it's just an audio signal
dywen - If I understand it correctly, if your patch has no subpatches, it should be called _main.pd and uploaded and compiled to Bela
even if it has subpatches, or abstractions, there always has to be one file called
_main.pd, which is the "main" file of your patch, that is the one that you would open on the host when starting the project.