-
jameslo
@freq63 If you want to follow my suggestion, the issue is here in your Arduino code:
As @FFW was explaining, you are putting a single value on each line, but your Pd patch is looking for 4 values on one line. Try this instead:for (int i = 0; i < 4; i++) { Serial.print(myArray[i]); Serial.print(" "); } Serial.println();
Serial.println() comes after the loop where it only outputs a line terminator once for all 4 values.
-
jameslo
@freq63 +1 to @FFW, but your patch as is suggests you are sending the data incorrectly. On the Arduino side, try printing 4 floats on a single line separated by spaces, then terminate the line with /n (i.e. use Serial.println to terminate the line). You can see an example for 2 floats here: https://forum.pdpatchrepo.info/topic/13086/arduino-to-pd-vanilla/8
-
jameslo
@H.H.-Alejandro In case you weren't aware, direct OSC messaging to/from Arduino is possible. This is the library I used https://forum.pdpatchrepo.info/topic/15621/iannix-open-sound-control-arduino. I've tested using an Uno with an ethernet shield but built my final version using a MKR1000, communicating with TouchOSC running on my phone over the phone's WiFi hotspot.
-
jameslo
@ddw_music Just for fun, while I'm waiting on marching orders from a choreographer:
ULFNoise~ shift register version.pd -
jameslo
@ddw_music I didn't stare holes at your patch, but it looks to me like you are trying to generate ultra-low frequency noise. If I've guessed right, here's my solution: ULFNoise~.pd ULFNoise~-help.pd
Instead of a shift register, I just maintain a 64 sample array of noise and refill it when I'm nearing the end, taking care to copy the samples relevant to the last read point to the beginning of the array so it can pick up where it left off.
-
jameslo
@ddw_music +1 to @alexandros' suggestion, but also--do you remember having this exchange? https://forum.pdpatchrepo.info/topic/14762/fidelity-of-tabread4/2
tabread4c~ doesn't have those non-differentiable points if that matters to you. -
-
jameslo
@whale-av Yes, your example is fine because [value me] is global. It's the $0- prefix that forces me to use var(), which in turn prevents me from assigning to it. fexpr~ interprets "$0-holdCount" as "$0 minus holdCount" and therefore complains that there is no value named "holdCount".
Edit: Oooo, just writing that last sentence suggested to me that I name the value "$0holdCount" (omit the dash so that fexpr~ doesn't interpret it as an operator) but alas, fexpr~ rejected that too.
Edit 2: Oooo, just writing that first edit suggested to me that I name the value "holdCount$0" and so far I haven't been rejected.
-
jameslo
It appears that I have to jump through a small hoop to reference a local value object within fexpr~, e.g.
But then it appears to be impossible to assign to that value, e.g.var($s2) = var($s2) + 1
Really? I hope someone schools me because I want to be wrong!
-
jameslo
@atux expanding on what @oid wrote, here are @yannseznec's video tutorials on [bonk~]:
I thought I'd watched one or two of them under tutorials, but I can't find them. Pro-tip: watch them on Youtube--there are six videos, but for some reason this site only shows the first one.