• ddw_music

    @FFW said:

    The gui ping when you change the array values by mouse:

    Only in Pd vanilla.

    It would be better if a message specific to the array, index and value were emitted by something in the backend, rather than in the Tcl/Tk layer.

    hjh

    posted in technical issues read more
  • ddw_music

    @Glop-Glop said:

    I want to coordinate two arrays : tab24 which has 24 steps and tab_var which has 1, 2, 3, 4, 6 or 8 steps.
    In a first time, I want to move the value of the 0 stept of tab_var graphically and report it on step 0 of tab24.
    Does anyone have a solution without using a bang to let the value get out ?

    Basically... no. If there are any messages emitted by arrays when they're changed graphically, the documentation is so well hidden that I guess it doesn't exist.

    The only way I can think of is to poll the array repeatedly.

    pd-array-sync.png

    26-0202-array-sync.pd

    I wouldn't call this a beautiful solution -- perhaps someone else knows some array messaging magic that I wasn't able to find.

    hjh

    posted in technical issues read more
  • ddw_music

    @alexandros said:

    Am I missing something, or the patch below isn't correct?

    It's correct if you use the right outlet instead of the left outlet of threshold~.

    @_ish

    supercollider in the early 2000s

    SC person here!

    ignored PD for the most part under an impression it lacked refinement

    Just the other day, I already did the rant about how Pd's 1990s-style GUI gives people the wrong impression about its capabilities, and how PlugData is a good way forward that deserves more support... so I'll stop there.

    Pd is solid. What's lacking in the built-in feature set is convenience. For example, if you load a soundfile... how long is it? What is its sample rate? In SC, you have BufFrames, BufDur, BufSampleRate, BufRateScale. Pd does spit this information out of soundfiler at the moment of loading, but if you didn't retain those values at that time, then they're gone. So with SC, I feel like it's more straightforward to get into it incrementally -- you're hacking away, and then you find that you need the buffer's sample rate, no problem! It's right there. In Pd, at minimum, you'll have to issue a dummy read command to soundfiler, and unpack the list.

    I got annoyed enough about this that I created some abstractions to help deal with soundfiles: https://github.com/jamshark70/hjh-abs :

    pd-bufs.png

    [monofile] and [stereofile] for basic reading. Mono files play by sf-play~ or sf-varispeed~; stereo by sf-play2~ and sf-varispeed2~. Rate = 1.0 is always the file's normal speed. Also it creates [value] vars for buffer stats, and I have a read-only [getvalue] abstraction to access them without risk of overwriting.

    ... Strictly speaking, you don't "need" these -- they're only using information that is available in vanilla anyway -- but I just don't think users should have to deal with these fiddly details routinely. So it's not a matter of lacking refinement, but rather that it takes more work to rearchitect features that you might take for granted in other platforms.

    I suppose it depends on the task, but in most cases, I can get there faster in SC; the threshold of complexity that I'm willing to attempt in SC is higher than that in Pd. (I usually find patching to be more cumbersome than code.)

    hjh

    posted in technical issues read more
  • ddw_music

    @_ish said:

    1. there used to be a random object that spit floats (randomF).

    The ELSE library has [rand.f].

    (I wish, when I started with Pd, that someone had pointed me to ELSE... a lot of the things that are missing from vanilla, or "build it yourself," are just there.)

    1. Earlier I was working on an array, and really wanted to send a bang every time it looped around to index 0. This feels like it should be really easy, but I couldn't think of anything that would send the active index step as out (the contents of the index step, sure, but not the step number itself).

    Are you reading the array in the control or signal domain?

    whale-av:

    As in that link if using [phasor~] catching it's output as it passes 0 is unreliable because the value of [phasor~] will likely not be 0 as it is captured at a block boundary.

    The value of phasor~ isn't reliable for this, but the two-point difference ([rzero~ 1]) is guaranteed to be positive most of the time, and negative only when the phasor jumps down. So this will always work (for a positive phasor~ frequency).

    pd-phasor-reset-trig.png

    hjh

    posted in technical issues read more
  • ddw_music

    @ddw_music said:

    At this point, there are a couple of differences from the classic Pd GUI. One is that the graph-on-parent area is locked to the top left corner -- origin is always (0, 0). That's a limitation, but not an outrageous one.

    FWIW -- I rechecked and this is not true. You can move the top left corner by mouse.

    @whale-av "Did I just lose an eyebrow?" :laughing:

    hjh

    posted in technical issues read more
  • ddw_music

    @_ish FWIW... in PlugData (a JUCE wrapper around Pd, which can run as a plugin or standalone), you can:

    1. Create a [pd something] box and open it for editing.
    2. Right-click in an empty area of the canvas --> Properties.
    3. Set "Is graph" = Yes.

    At this point, there are a couple of differences from the classic Pd GUI. One is that the graph-on-parent area is locked to the top left corner -- origin is always (0, 0). That's a limitation, but not an outrageous one. The other is that you can grab the lower right corner and resize by mouse -- both in the subpatch window and in the parent window. (In the PlugData version installed on my machine, however, there is a UI inconsistency -- the canvas properties panel shows width and height, but the numbers here do not sync up with the size that you set by mouse -- in fact, they seem to have no effect at all. That's obviously a bug; I'll report it later.)

    Should I do the rant? I kind of feel like doing the rant.

    The classic Pd GUI was designed in the mid-90s, and it looks like it, and it acts like it. It's not going to improve. You'll get people on this forum telling you that it doesn't need to improve, because they've been using it for a long time and they're used to it. As an opinion, that's fair enough, but being used to it doesn't negate the observation that this GUI has been sleeping through three decades of UI standards development (and it contradicts those UI standards in some areas -- "no GOP resize by mouse" is one -- the weird behavior of entering edit mode after moving an object by mouse is another).

    This GUI is holding Pd back. I've had students tell me, when they see the classic GUI, basically... "Uh. Just no." They won't touch it. They don't care that it's nice and comfy and familiar for old-guard users on the forum. For them, this is not how software is supposed to look.

    PlugData is a much-needed shot in the arm, to keep Pd going for a few more decades and attract users who would otherwise look at the chunky black-and-white non-anti-aliased* UI (edit: I forgot about only monospaced fonts in object boxes!) and think, "Why are these people still stuck in 1996?"

    * (IIRC Tcl/Tk line drawing is anti-aliased on Mac but it isn't on Windows or Linux. But even suggesting this really basic UI improvement can be controversial on this forum. Few years back, I saw someone on here say that anti-aliased diagonal lines are "too smudgy," preferring stair-stepped pixels because they're "sharp." If that's the climate, then the only way to bring Pd's UI into the modern era is for somebody just do it... which Timothy Schoen did.)

    Speaking of being stuck in the 90s, I'll now say "flame suit on" :laughing:

    Anyway, do try PlugData. I use it routinely, pretty much only using the classic GUI if I found a bug and somebody asks, "Did you reproduce it in vanilla?"

    hjh

    posted in technical issues read more
  • ddw_music

    @willblackhurst said:

    and then you ask for numbers from the array with tabread will give you one number from the list. which they call a sample. etc sample rate...

    In context of the question, this is not quite revelant.

    First, it's about audio signals -- not [tabread], but rather [tabread~] or [tabread4~].

    Second, audio objects don't operate sample by sample, but rather block by block.

    The question doesn't state it explicitly, but it can be inferred from context that the "single-sample operation" being referred to is single-sample feedback. Feedback always requires delay, and, using normal audio objects, the minimum delay is the block size. This places limits on the capability of implementing filters, Karplus-Strong plucked strings (this is one of the OP's keywords), waveguides etc.

    @ardore In Pd, AFAIK pretty much all you've got is to set a subpatch's [block~] settings to block size = 1. Then that part of the graph will run everything by single samples (but outside the subpatch / abstraction window will run with normal block size).

    I'm not aware of anything gen~ like in Pd (which isn't surprising, since David Zicarelli says it took their team of paid professional developers something like 6 years before gen~ was ready to ship -- an unpaid FLOSS team is unlikely to be able to duplicate that engineering effort). There might be something that I just didn't hear of...? But I doubt it.

    Something that Pd devs might consider is to leverage another similar technology. For instance, a SC contributor released "DynGen" a few months ago, which wraps Reaper's audio-fx dev language "eelscript" into a SC unit generator. Eelscript can do a lot of gen~-like things, and... Reaper devs did the hard work! Might be interesting to have a Pd signal-object wrapper for eelscript...

    hjh

    posted in technical issues read more
  • ddw_music

    FWIW, in abstractions I generally avoid the [f $1], [symbol $2] type of usage because now the user is obligated to supply a value for every dollary-thingy -- the abstraction can't supply a sensible default.

    Instead, I do [pdcontrol] --> [pack].

    pd-args.png

    ... and if I create this abstraction with no object box args, it prints:

    arg-values-from-f-box: 0 0     <<--- I usually don't want this
    arg-values-from-pack: 100 200  <<-- more useful
    

    ... but if you supply values, the arg list from pdcontrol overwrites defaults in [pack].

    The inlet~ default thing is great! And very hard to do in Max/MSP (actually can't be done 100% reliably). Which is one place where I often tell students, "Pure Data is where Miller Puckette learned from Max's mistakes."

    hjh

    posted in technical issues read more
  • ddw_music

    I've also heard that 4th-order filters are difficult to implement when using single-precision floats because 4th-order recursive filters require higher numeric precision to avoid blowups. Cascading two identical 2nd-order filters gets the 24 dB/oct slope while staying well within the limits of single precision.

    hjh

    posted in technical issues read more
  • ddw_music

    @solipp said:

    use [set 64 1 $1(
    no need to switch dsp off

    Thanks -- in the reference, I saw "<list>" but I missed the "set" before it. Good catch.

    Yeah, it's working now!

    hjh

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!