-
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. -
jameslo
@mbbaker This is just my educated guess as someone who has written interrupt driven multitasking stuff in assembler during the Pleistocene era
.
Anytime you have independent processes that have to communicate, they have to do it through some kind of buffer because the time slices that each process will receive are not under the programmer's control. Compare with cooperative multitasking using co-routines. So if 2 or more Pd processes have to stream audio between them and not miss a real-time deadline, there has to be a fifo buffer between them.
How big a buffer is required? That depends on each OS and differs from moment to moment depending on what other processes are competing for CPU time. Some processes may lurch forward in execution while others wait to be scheduled. So it can't be predetermined, and therefore it's a configurable option.
In my one project that used [Pd~}, -fifo 1 worked without issue. The lower the number, the lower the roundtrip latency between processes, so I guess that means the fifo size is a tradeoff between latency and reliability.
-
jameslo
@polyplexmescalia Have you seen this explanation? https://puredata.info/
Scroll down to the section entitled "Main Pd Flavours"