• jameslo

    @kyro I don't understand your previous comment, so consider this an alternative answer to your original post :)

    If you can tolerate the latency, I wonder if an FFT filter would work for you? You can test with audiolab's pp.fft-split~. Set the frequency to 20 and take the middle output.

    Screenshot 2025-04-18 134942.png
    Oh wait! I think I just understood your previous post! So this probably won't work for you because I think you're objecting to the latency.

    posted in technical issues read more
  • jameslo

    @bklindgren Maybe "expected I/O latency" or "realtime processing budget"? I say that because if the actual latency is greater, you'll hear clicks as blocks are dropped or corrupted. But the expected latency can be set much greater than the actual latency without problems. Look at the following test:

    Screenshot 2025-04-17 113542.png
    REAPER sends the test tone on track 1 out its audio loopback driver to Pd, and Pd returns it on the next 2 channels in the loopback driver. I recorded the return signal on tracks 2 through 5 using Pd delay settings of 50, 20, 10, and 100 ms, respectively. The delays on the return tracks are 52, 21, 11, and 101 ms respectively.

    posted in technical issues read more
  • jameslo

    @bklindgren From the manual:
    The "delay" is the nominal amount of time, in milliseconds, that a sound coming into the audio input will be delayed if it is copied through Pd straight to the output.
    I've always assumed this includes the time it takes for the audio interface to fill Pd's input buffer, the time it takes for Pd to process a straight-through connection, the time it takes for Pd to fill the output buffer, and any OS-specific/driver-specific/audio-framework-specific overhead. I suspect that some of these categories overlap. So I wouldn't say "it's the buffer" exclusively, but in as much as a larger buffer takes a longer time to process, then yes, buffer size is probably a factor. For example, with a 64 sample buffer, I'm able to set delay much lower if I select an ASIO driver than if I select one of the Windows built-in drivers.

    posted in technical issues read more
  • jameslo

    @ddw_music said:

    Gotos have been discouraged for a long time because they're messy.

    Hmm, that's interesting, have you considered Java's use of gotos? :) They're structured, provide a convenient way for exiting deeply nested loops, and feel similar to Java's exception framework.

    Never mind, I just couldn't resist. Carry on.

    posted in technical issues read more
  • jameslo

    FWIW, I interpreted "spray everywhere" to mean that Pd "functions" spray their return values to every place that could potentially need it, depending on the control flow. That's a common way of dealing with Pd's lack of intrisic "return to caller" when there are just a few callers.

    posted in technical issues read more
  • jameslo

    @ddw_music said:

    (and is basically identical to the approach in my example patch above).

    Oh sorry, I missed that. TBH I've been barely hanging on :) I'll go back and read why you were hesitant about endorsing this approach. But don't you think that in the end, all languages have things that are convenient and things that are inconvenient, and so....so what? Before I retired I was studying functional programming languages like Haskell, and I didn't get far enough along to understand how the hell you could program without state! I understood that it was great for multiprocessing, but wow.

    posted in technical issues read more
  • jameslo

    @ddw_music Does this behave like a shared stateful function that returns to the caller? returnToCaller.pdScreenshot 2025-04-11 212225.png

    posted in technical issues read more
  • jameslo

    @whale-av said:

    Maybe that could be described as a bug, as I cannot see that anyone would ever have used it for any purpose

    I'd bet that the following theorem is true:

    All Turing-complete languages contain useless statements
    

    :)

    posted in technical issues read more
  • jameslo

    I'm currently not in any condition to reply coherently, but my thought was that either you assume that a non-numeric leading atom is a selector or a symbol. Max (taking the OP's word for it because I'm Max-ignorant) assumes it's a symbol, and Pd assumes it's a selector. So it's just a choice that inconveniences those who think it should've been the other way. Please let me know how I'm wrong! :)

    Edit: for instance (feeling irrationally emboldened by this example I just thought of), think about the set message for symbol boxes. If the leading "set" was interpreted as a symbol, then you'd lose the the "set" capability unless you added a new (potentially inconsistent) language construct.

    PLEEEZE, I'm not arguing that Pd is consistent, I'm just sayin' that there are hard choices to make in language design.

    posted in technical issues read more
  • jameslo

    @nicnut I agree with @alexandros that 200 ms is too long and think you could even try something shorter than 20 ms.

    Here's another strategy: make 2 voices that accept play/stop commands and then toggle between them, e.g.
    Screenshot 2025-04-03 080709.png This sends the stop command to one voice and the play command to the other, so that the voices effectively crossfade. The voices should fade up on start and fade out on stop, and if a stopped voice receives a stop command, it should keep quiet. This scheme will still pop if you bang twice within the crossfade period, but you could prevent that using a lock-out timer.

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!