• megazoic

    Thanks for those links Monetus. I'm pretty close with my existing setup and will first try to work with that when I have some more time. Some of the output from the samples/cpp/pdtest appears to be as expected.

    However, from main.cpp

        cout << endl << "BEGIN Patch Test" << endl;
        
        // open patch
        Patch patch = pd.openPatch("pd/test.pd", ".");
        cout << patch << endl;
        
        // close patch
        pd.closePatch(patch);
        cout << patch << endl;
        
        // open patch again
        patch = pd.openPatch(patch);
        cout << patch << endl;
        
        // process any received messages
        //
        // in a normal case (not a test like this), you would call this in
        // your application main loop
        pd.processFloat(1, inbuf, outbuf);
        pd.receiveMessages();
        
        cout << "FINISH Patch Test" << endl;
    

    the response

    BEGIN Patch Test
    Patch: "pd/test.pd" $0: 1003 valid: 1
    Patch: "pd/test.pd" $0: 0 valid: 0
    Patch: "pd/test.pd" $0: 1005 valid: 1
    PD: PATCH OPENED: 1003
    print: 0
    PD: PATCH OPENED: 1005
    print: 0
    FINISH Patch Test
    

    seems right but no patch was opened and if I already opened that patch before running the executable, none of the print messages (called later in the code) showed up in the console of pd. I'll focus on this and try to repost to the forum when I have a better idea of what is going on.

    posted in libpd / webpd read more
  • megazoic

    Hi! I am running Pd-0.47-1-64bit on Mac OS 10.11.6 and libpd 0.9.2. I am trying to work with the samples/cpp/pdtest. Here's the github repo. I currently have an app that takes video and spits out a 2D array of color values for regions of interest to file. I have a pd patch that then loads those into a table and plays the corresponding pitch. I need the two (patch, c++ app) to coordinate the IPC.

    I compiled the cpp code in the samples directory however, when running pdtest executable there is no patch opened. Is this by design? I was not able to find a pd-vanilla to build from source so took the most recent (pd-0.47-1-64bit.mac.tar.gz). Does libpd need to have the pd built after libpd? If so, can anyone please point me to a src file?

    Here is a truncated output from running the compiled pdtest. Could someone tell me if this is what is expected?

    Thank you for your help.

    BEGIN Patch Test
    Patch: "pd/test.pd" $0: 1003 valid: 1
    Patch: "pd/test.pd" $0: 0 valid: 0
    Patch: "pd/test.pd" $0: 1005 valid: 1
    PD: PATCH OPENED: 1003
    print: 0
    PD: PATCH OPENED: 1005
    print: 0
    FINISH Patch Test

    BEGIN Message Test
    FINISH Message Test

    BEGIN MIDI Test
    FINISH MIDI Test

    BEGIN Array Test
    array1 len: 10
    array1 0.0857145 0.328572 0.500001 0.57143 0.514287 0.47143 0.357144 0.285715 0.057143 0
    array1 0 1 2 3 4 5 6 7 8 9
    array1 10 10 10 10 10 10 10 10 10 10
    FINISH Array Test

    BEGIN PD Test
    FINISH PD Test

    Processing PD
    PD: bang
    PD: 100
    PD: symbol test string
    PD: bang
    PD: 100
    PD: symbol test string
    PD: 1.23 a symbol
    PD dollar zero: 1.23 a symbol
    PD: 1.23 sent from a List object
    PD: msg 1.23 sent from a List object
    PD: 1.23 sent from a streamed list
    PD MIDI: notein 2 60 64
    PD MIDI: ctlin 2 0 64
    PD MIDI: pgm 2 101
    PD MIDI: midiin 1 239
    PD: symbol test
    PD: START MSG TEST
    CPP: bang toCPP
    CPP: float toCPP: 100
    CPP: symbol toCPP: kaaa
    CPP: list toCPP: 100 2.3 test 1 2 3 ffsfff
    CPP: message toCPP: kaa 1 2.3 test ffs
    PD: MSG TEST FINISH
    PD: START MIDI TEST
    PD: MIDI TEST FINISHED
    PD: START ARRAY TEST
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD array1: 10
    PD: FINISH ARRAY TEST
    PD: test_abs: Hello World!
    CPP MIDI: note on: 0 0 127
    CPP MIDI: note on: 0 0 127
    CPP MIDI: note on: 0 60 64
    CPP MIDI: control change: 0 64 100
    CPP MIDI: program change: 0 99
    CPP MIDI: pitch bend: 0 2000
    CPP MIDI: aftertouch: 0 100
    CPP MIDI: poly aftertouch: 0 64 100
    CPP MIDI: midi byte: 0 239
    CPP: float env: 75.5457
    CPP: float env: 87.9506
    CPP: float env: 93.5842
    ...

    CPP: float env: 88.5503
    CPP: float env: 87.7612
    print: 1
    CPP MIDI: note on: 0 0 0
    CPP MIDI: note on: 0 1 127
    CPP: float env: 86.8932
    ...

    CPP: float env: 41.2584
    CPP: float env: 0
    print: 2
    CPP MIDI: note on: 0 1 0
    CPP MIDI: note on: 0 2 127
    ...

    print: 20
    CPP MIDI: note on: 0 19 0
    CPP MIDI: note on: 0 20 127

    posted in libpd / webpd read more

Internal error.

Oops! Looks like something went wrong!