• jameslo

    @Juicy-Jr Some additional thoughts:

    • In case you thought otherwise, [block~ 1 1 1] does not oversample, it just makes the block size 1.
    • You could apply the smaller block size to a subpatch or abstraction and isolate the feedback portion inside it. That way you only pay the CPU price for the stuff that needs it.
    • MIDI 120 = ~8372 hz, and 44100/8372 = ~5, so [block~ 4 1 1] would suffice and be a bit cheaper. [block~ 8 1 1] would get you to MIDI 112.
    • I know I'm in the minority, but I feel that my CPU works for me, not the other way around, so if something is computationally expensive, I don't worry about it until my machine can't keep up. Pd's load meter seems to exaggerate in Win10 because I routinely run at loads >100%. Finally, you can use [pd~] to distribute computation among several cores if necessary.

    posted in technical issues read more
  • jameslo

    @Juicy-Jr Caveat: if you have feedback, then that ordering technique won't be possible. In that case, I think your best option would be to reduce the block size, e.g. [block~ 1 1 1].

    posted in technical issues read more
  • jameslo

    @Juicy-Jr Are you making sure that delwrite~ is executed before delread4~? If not, I'm guessing that at sample rate 44100 and block size 64 your frequency can't go above 689 (44100/64). If I'm right, take a look at Pd vanilla help 3.audio.examples/G05.execution.order.pd.

    posted in technical issues read more
  • jameslo

    @whale-av I'm guessing that when @KoaN writes about MIDI latency, what they are measuring is interval between when a MIDI note message is sent and the onset of sound from the plugin. That's why I'm curious about those audio settings, which I didn't see mentioned among their replies.

    posted in technical issues read more
  • jameslo

    @KoaN In the File->Preferences->Edit Preferences... pop up, on the Audio tab, what have you selected for Delay (msec) and Block size?

    posted in technical issues read more
  • jameslo

    @waffles If the patch is still popping because it's missing real time audio deadlines, try staggering the bangs from [metro 50] by substituting different length delays (e.g. 2, 4, 6, 8...) for the [bang] objects. That will distribute the control rate processing more evenly. Another thing to try is to delete any UI element you don't need. The patch stopped locking up my machine once I removed the vertical sliders near the AR oscillators. Finally, I noticed that sometimes it triggers a chime a couple of 50 ms intervals in a row, which is kind of a waste, so I added a 1 second lockout to ARosc~ to enforce a minimum interval between triggers. You can change the lockout time by changing the delay. ARosc~.pd

    posted in technical issues read more
  • jameslo

    @waffles On Windows 10/Pd 0.55.2, this patch somehow prevents me from switching between windows or accessing the taskbar, except when task manager is open. I'm guessing it's related to the fact that all the bangs hanging off of the [sel 0]s are solidly on, suggesting that the patch is falling behind in the control domain and perhaps missing realtime audio deadlines in the audio processing. That would definitely cause clicks.

    I also notice that the connections coming from each of those same bangs are not explicitly sequenced with a trigger object. I'm assuming the author intended [line] to jump to 1 first, which could also be a source of noise due to the discontinuity. Even if you took @seb-harmonik.ar's suggestion to replace it with [line~], that discontinuity would still be there.

    If I could somehow get this patch to let me edit it, my first experiment would be to cut out most of the repetition to see how various subsets behave. I think that would give me a lot of information about why the patch is making so much noise.

    Edit: just learned about the -noloadbang flag. <other silly BS deleted :)>

    Another edit: Let me know if this works better for you--this version doesn't freeze my computer. calm-generative 4.zip I replaced the loadbang with a toggle so it wouldn't start immediately. I added abstractions for each LFO and each AR oscillator to help me see what was going on. The latter lengthens the attack to 20 ms (from 0) and also controls the final volume using the LFO signal itself, rather than the one sampled every 50 ms, in case that was the cause of the zipper noise you were hearing. I deleted the oscillators that weren't connected to the dac in case they were eating CPU. It should be easy to add them back in now that you have the abstractions. I combined all the metros into one in case it helps reduce the control rate processing, and in an earlier version I staggered the bangs by 2 ms, but that didn't seem to make a difference. Finally, I noticed some light, occasional clipping, mostly in the left channel, so I halved the signal.Screenshot 2025-07-25 183934.png

    posted in technical issues read more
  • jameslo

    FYI, an algorithm I was taught in school uses a heap-based priority queue for that B array. Makes it a bit faster in big-Oh terms.

    posted in abstract~ read more
  • jameslo

    @freq63 If you want to follow my suggestion, the issue is here in your Arduino code:
    Screenshot 2025-07-02 065908.png
    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.

    posted in technical issues read more
  • 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

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • jameslo

    @ddw_music Just for fun, while I'm waiting on marching orders from a choreographer:
    ULFNoise~ shift register version.pd Screenshot 2025-06-18 161444.png

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • jameslo

    @Josef [append $1( is a message, not an object

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • jameslo

    It appears that I have to jump through a small hoop to reference a local value object within fexpr~, e.g.
    Screenshot 2025-06-06 104126.png
    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! :)

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • 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.

    posted in technical issues read more
  • jameslo

    @polyplexmescalia Have you seen this explanation? https://puredata.info/
    Scroll down to the section entitled "Main Pd Flavours"

    posted in Off topic read more
Internal error.

Oops! Looks like something went wrong!