• crttrkix

    @crttrkix I guess a better description of what I'm trying to do is: (in C++ terms)

    Create a "cue" class that implements some functions for making a cue within a cuing system, but being able to pass functions into instances of "cue" that describe what the cue is supposed to do when enabled.

    Thanks again!!

    posted in technical issues read more
  • crttrkix

    @jameslo This is a very helpful analogy thank you !! :3 it's helpful to understand that subpatches are essentially always contained within the "class" (or the file definition of the abstraction) rather than the instances themselves. So even if in the instances, the subpatches have different names, they are essentially still pointing to the same "bracket of code" that belongs to the patch being instantiated. This is as opposed to dynamically named objects that can point to different abstractions within each instance of an abstraction. [cue-$1-impl] can point to different files depending on what is passed in to it's parent.

    I think this solution works for my use case! I'm able to instantiate an arbitrary number of cue objects that each share the same framework of functionality (that's necessary for them to be cues) without having to recreate that functionality for each cue, but have unique implementations of functionality within each cue. It's very flexible and elegant I think!

    I definitely have the oop virus. I know this is sometimes unnecessary but it makes me happy to right an elegant system that is scalable and reusable.

    Thanks so much for the help @jameslo and @whale-av

    posted in technical issues read more
  • crttrkix

    @jameslo Thank you this make sense to me! I did not know you could pass arguments into the name of an object and it would actually dynamically change what object it pointed to based on name.

    I implemented your method by creating a "impl-cue-X.pd" for each cue's functionality, where X is the cue number. I suppose this is the same method I was trying before, but with individual Abstractions, rather than subpatches. But it works in this case !!

    This demonstrates a bit of an inconsistency in their behavior (I don't know why this is) that is good to know.

    Within "cue.pd", I create an object referencing an abstraction with a dynamic name [impl-cue-$1] (which would reference "impl-cue-0.pd", "impl-cue-1.pd", etc) and a subpatch with a dynamic name [pd impl-$1]
    Screenshot 2025-10-15 101329.png

    The abstraction behaves as expected. Within the cue instance with 0 passed in as $1, the [impl-cue-$1] becomes [impl-cue-0], and for instance with 1, it is [impl-cue-1]. Because they are explicitly different files with different definitions.

    Screenshot 2025-10-15 101219.png Screenshot 2025-10-15 101241.png

    However, the subpatches do not behave this way, even though they are passed in different values of $1 depending on which instance of "cue.pd" they are inside of.

    Screenshot 2025-10-15 101158.png

    Screenshot 2025-10-15 101301.png

    [pd impl-0] has the same contents as [pd impl-1].

    I'm not sure why this is, but I imagine there are plenty of internal differences between abstractions and subpatches that I do not know the inner workings of.

    This solves my issue though. Thank you!!

    posted in technical issues read more
  • crttrkix

    Apparently, this seems to be a pretty rare thing to want to do in pd, because nowhere can I find where someone has asked this question online. I come from a programming background, so the idea of instances of an object containing unique objects seems fairly reasonable to me (to convert to pd terms: abstractions containing unique subpatches).

    In C++ for example, you can pass objects into other objects as arguments, or even types into objects. So you could have class X that contains variable Y for an object. In instance A of that class, you could pass in type int, and Y would be of type int. While, in instance B, you could pass in type string, and Y would be of type string.

    I know this isn't a direct 1 to 1, but how do I achieve this sort of functionality in PD?

    This kinda difficult to explain, so I'll do my best. This is my situation (btw I'm using plugdata):

    I'm building a cue system for a performance. I would like to create a "cue.pd" abstraction as essentially a class from which an arbitrary number of instances can be made. Each instance needs to have it's own completely custom functionality. I understand that I could achieve this by just making "cue1.pd", cue2.pd", etc or [pd cue] multiple times. But that would mean I have to create the exact number of subpatches as cues, and that's unscalable and inelegant if I were to reuse this system in the future.

    I have multiple instances of a "cue.pd" abstraction within "cue_sequencer.pd", each with a number passed in as it's first argument.

    Screenshot 2025-10-14 183453.png

    Within the "cue.pd" abstraction, I assumed that if I made a [pd impl-$0] subpatch, each subpatch within each instance would be unique, as it's name is unique.

    Screenshot 2025-10-14 183526.png

    But this is not the case, as the same subpatches with different names contained within different instances of "cue.pd" have the same contents.

    Screenshot 2025-10-14 183333.png
    Screenshot 2025-10-14 183411.png

    How would I make it such that each instance of "cue.pd" can contain it's own completely unique subpatch? Or at least achieve the same effect with a different method.

    Thanks !! :3

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!