• jameslo

    @Vnms In Windows, have you associated *.pd files with pd.com? That would cause the behavior you're seeing. In my installation, *.pd files are associated with wish.exe.

    posted in technical issues read more
  • jameslo

    @oid Thanks! I think I'm gonna go with [makefilename %.7e] to reduce the word count to 13 per float and probably just use fudiparse to convert back to float. It would've taken me a while to figure out that I had to strip the leading "symbol " selector, so thanks for saving me that effort.

    posted in technical issues read more
  • jameslo

    I've been storing floats in sysex messages using fudiformat and restoring them using fudiparse, but this suffers from the same display format truncation that many Pd float persistence facilities do. For instance:
    Screenshot 2025-05-08 162836.png
    It's a tiny difference, but one of my patches is sensitive to it.

    I started to make something to break up the 32 bits of a single precision float into 5 words, 7 bits each, but I forgot that the bitwise operators in Pd convert the float to an integer first. Silly moi.

    When I'm just saving to and restoring from a file, I use an array as intermediate storage and then use soundfiler to write/read the array to/from file. I just tell soundfiler that the array contains 4 byte samples. But it would be nice to use sysex so that I can record, edit, and playback a sequence of them. Is there a way to do this?

    posted in technical issues read more
  • jameslo

    @Blaine24 Look into @alexandros's library for Arduino-Pd com examples (which I think is https://github.com/alexdrymonitis/Arduino_Pd but I'm hoping @alexandros will correct me if I'm wrong), or you could try my way https://forum.pdpatchrepo.info/topic/13086/arduino-to-pd-vanilla/8. In that example I send "list <float> <float>;" but in your case you want to send "list PAD# <float>;" Observe the space separators--they're significant!

    That first select is looking for the end-of-line (EOL) character (the thing appended by Serial.println()), otherwise it's queueing up the characters in the order that the Arduino sends them. When EOL is seen, it parses the list of characters into a Pd list, e.g. "PAD4 42", which you can then route as you did in your example code, although I don't understand what you're doing with the output of [route]. In my way, each of the [route] outputs (except the last one) should just pass the value for each pad.

    Edit: I ran a test and it looks like you don't need the list prefix.

    posted in technical issues read more
  • jameslo

    @oid said:

    Calculating the value of the resistor is simple

    Yes, but you neglected to give the OP the formula, which is a little harder to figure out :). It's approx 0.13 of the value of the potentiometer. So for a 10k audio taper pot you want a 1.3k resistor. And for the record, it increases the load that the pot presents to the power rails by a factor of 10 when it's fully counter-clockwise.

    To me, both solutions are just linear-ish, You can find a discussion of it here: https://www.modwiggler.com/forum/viewtopic.php?t=56318. You can see that they discuss 0.12 so 0.13 is not exact, even more so since the audio taper pot isn't exactly log. I'm not claiming that linear pots are perfect, but if it were me I'd just go buy the right pots and chalk up the extra expense as tuition. Unless there was a show breathing down my neck.

    posted in technical issues read more
  • jameslo

    @callummalcolm In my experience, "audio taper" pots and faders aren't mathematically logarithmic like Pd's are, which is why you can't make Pd's log sliders go to 0 without extra effort. So here's a solution that works in Pd, but what I'm saying is that it probably won't linearize a physical audio taper pot well. I made a table-driven transfer function to linearize the CC messages coming from the faders on my Yamaha 01V96i and the line is somewhat arbitrary, especially at the bottom of the travel. Let me know if you want to try that route and I'll tell you more. Capturing the physical curve is kinda messy.
    log2lin.pd
    Screenshot 2025-04-28 100557.png

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

Internal error.

Oops! Looks like something went wrong!