• dal9000

    I've been trying to get data to stream from a Pd patch running with the pd-extended engine to a libpd embedded engine and am having no luck.

    I've tried using Olaf Matthes' netsend~ and netreceive~ objects, as well as the mrpeach library's udpsend~ and udpreceive~ objects.

    What I find is that if I load up the receiver patch in the pdextended engine, the data will connect and flow fine, but if I load up the receiver patch in the embedded libpd engine, the sender will connect, but no data will flow. I've verified it's connecting to the libpd's patch by closing the program running the embedded engine and watching the connection break, but no matter what the data won't flow, and debug prints I put in the patch make it seem like the connection is never getting established (for example, when using udpreceive~ it reports a format type of unknown and 0 received packets).

    Is there some compatibility issue with using networking patches in libpd as opposed to the full up pd engine?

    posted in technical issues read more
  • dal9000

    Is it possible to use [netsend] and [netreceive] with signal data, for example if I wanted to stream audio from a patch on one computer to a patch on another?

    If so, what would that look like in a patch?

    posted in technical issues read more
  • dal9000

    In looking at the Pd files created with 0.43.4-extended and 0.45.4 vanilla, I notice that the floatatom in 0.45.4 is:
    #X floatatom XPOS YPOS 0 0 0 - - -, f 5;

    However, in 0.43.4 extended, the same floatatom would look like:
    #X floatatom XPOS YPOS 0 0 0 - - -;

    The online documentation of the file format mentions nothing about the ", f 5;" portion added in the newer vanilla version. Is this a new change or something specific to Pd extended? The 0.45.4 vanilla Pd can't load Pd files using the other floatatom specification, so this seems to break backwards compatibility.

    posted in technical issues read more
  • dal9000

    What is the easiest way to find the nearest power of 2 + 3 in Pd for tabosc4~ to work correctly?

    Basically, what I'm doing is as follows:
    Copying one table multiple times into a larger table so that I get X copies in the larger table (the reason I'm doing this is so I can modify each copy slightly, say in amplitude, or even use a different table at that position).

    I correctly resize the larger table so that it can hold X copies of the smaller table, but I need to be able to use tabosc4~ on this larger table, so what I really need is a patch that can compute the larger table's pow2 +3 size.

    posted in technical issues read more
  • dal9000

    I'm having trouble using the sinesum message atom. When I point it at my array, I get "0-arrayname: no such object."

    My message looks like the following:
    ;
    $0-wavtable sinesum 1024 $1

    And I'm feeding the message with a list (of the harmonic levels).

    Is it possible at all to use local arrays with sinesum, and of so, how?

    posted in technical issues read more
  • dal9000

    Is there a single object that can take an array and resize it while interpolating the data within it?

    For example, say I have a 64 element array representing a spectrum, but I need a 512 element array so that it will fit my block size.

    How can I take the 64 element array and "expand" it to 512 elements (i.e. the 64th element becomes the 512th element and all points in between are interpolated)?

    I thought about using tabread4~ with an until loop, but this seems inefficient and highly cluttered, but I'm not entirely sure how to get the size of the array. Please tell me there's an easier way to do this that I've somehow missed!

    posted in technical issues read more
  • dal9000

    I'm trying to use the output of the list-inter Pd object to fill an array, but it doesn't seem to be working. What is the proper way to accomplish this?

    I can unpack the list into v-sliders and print out the list just fine (the same way the help shows), but I can't get the output to fill an array. I've tried using tabwrite and messages, but nothing seems to work.

    Attached is my attempted patch that shows what I'm trying to do (obviously it doesn't work).

    http://www.pdpatchrepo.info/hurleur/listtoarray.pd

    posted in technical issues read more
  • dal9000

    Say I have a table A, representing the output for an input variable X=1.

    Now say I also have a table B, representing the output for an input variable of X=2.

    How would I create a patch that can interpolate between A and B (and so on with tables C, D, etc...) for any X (i.e. X = 1.5 would be halfway between tables A and B)?

    posted in technical issues read more
  • dal9000

    Is it possible to define a custom frequency response for a filter?

    Essentially, I'm trying to do this:

    Starting with white noise (Gaussian), I want to filter it to give me a different coloration based on a spectrum.

    Since the filter isn't lowpass, bandpass, nor hipass, but a combination of all three, I can't use the lop~ or hip~ objects.

    Is there a patch that essentially does frequency-domain filter design with Pd?

    Basically, I'd like to feed a list of frequencies and their dB levels (interpolating in between) to an object along with a noise input, and get out colored noise that matches the new spectrum.

    posted in technical issues read more
  • dal9000

    I have successfully managed to embed libpd into a project I'm working on, however in testing with even the most rudimentary patches, I'm getting: "error: ... couldn't create" on simple things (metro and dac~ being good examples).

    I assume this is due to the fact that libpd isn't loading the external modules that define these blocks. How can I get the library to load these externals?

    Also, when setting up a receiver for a signal message in my patch, it doesn't seem to receive anything. I have an absolute minimum patch as follows:

    [osc~ 440]
    |
    |
    |
    [s~ toCPP]

    Yet the following code:

    class PdRec : public pd::PdReceiver
    {
    public:
    void receiveFloat(const std::string & dest, float num)
    {
    std::cout << "Received float from: " << dest << " : " << num << std::endl;
    }
    }
    pd::PdBase pdEngine;
    pdEngine.init(1,1, 44100);
    pdEngine.addToSearchPath("path/to/my/pd_patches");
    pd::Patch patch = pdEngine.openPatch("test.pd", "path/to/my/pd_patches");

    PdRec pdRec;
    pdEngine.subscribe("toCPP");
    pdEngine.setReceiver(pdRec);
    pdEngine.computeAudio(true);

    float inbuf[64], outbuf[64];
    for(int i = 0; i < 10 * 44100 / 64; i++)
    {
    pdEngine.processFloat(1, inbuf[0], outbuf);
    }

    does not seem to receive anything from the patch. I am, however, able to receive the aforementioned error messages, as well as print commands from the patch if I use polling (but still none of the [s~ toCPP] messages).

    What am I doing wrong?

    posted in technical issues read more
  • dal9000

    OK, I've solved all of the problems with loading externals, but I still can't receive any
    [s~ toCPP] type messages. All acoustic data only seems receivable through outBuf and the dac~ object, but this is not ideal. I can send messages to the patch without a problem, but all of those messages are control, not signal.

    posted in technical issues read more
  • dal9000

    I've tried a loop with tabread4, but unfortunately it doesn't seem to work.

    Attached is my patch. When I try to run it, the output of tabread4 is always the last element in the array, and it doesn't write to the new array. It just prints out the last number of the array N times, but printing out the indices shows they're incrementing correctly.

    What am I doing wrong?

    http://www.pdpatchrepo.info/hurleur/resizeinterp.pd

    posted in technical issues read more
  • dal9000

    @sunji said:

    I personally would use

    rather than . You should give indices to the second inlet of [tabwrite], too. I would build an [int] [+] counter feedback loop between [tabwrite] and .
    Thanks for the advice! I was able to find that tabset will work with a list and set the array, though...

    posted in technical issues read more
  • dal9000

    Turns out list-inter and list-inter-many do what I need...

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!