I compiled libpd and C example on Ubuntu 12.04 without a hitch. Running the C example in 'samples/c_samples/c' seems to work, however the two hooks defined for midi-note-on and print are not being called. When I run:
$./pdtest test.pd ./
The program runs (and I've verified it is computing samples), but the print hook or midi hooks are not called. Anyone have luck with this basic example?
I've also had same experience with ARM architecture (compiled fine on Raspberry Pi, and the sample runs, but the hooks aren't called)
Thanks !
Upon closer inspection, it's not that the print hook isn't being called, but instead the hook isn't being set at all (libpd_printhook still NULL even after it is set in pdtest.c).. line 20:
libpd_printhook = (t_libpd_printhook) pdprint;
in pdtest.c has no effect.
Adding a function to z_libpd.c to set it, and then calling this from pdtest.c fixes the issue:
void libpd_set_printhook(const t_libpd_printhook hook){ libpd_printhook = hook; }
This shouldn't be necessary since libpd_printhook is declared as extern (and compiles fine), right? I must be missing some C / linking thing...
Not sure what's going on here. How did you compile the sample?
I just compiled using the included makefile:
git clone git://github.com/libpd/libpd.git
cd libpd
make
cd samples/c_samples/c
make
running sample (./pdtest test.pd ./), nothing gets printed
It looks like you're new here. If you want to get involved, click one of these buttons!