• Joul

    Hello,
    i want to implement the MUSIC algorithm for frequency estimation in pd.
    Therefore i have to calculate eigenvalues and eigenvectors of a certain matrix. The GNU scientific library is a collection of routines for numerical computing and provides functions for calculating eigenvectors and -values.

    My problem is that i don't have any idea how to compile my external using the gcc.
    Compiling a simple C programm (not as pd-external) requires the command:
    > gcc -Wall -c example.c
    After that i get a C object file named example.o. Now i have to link this object file with the gsl library like this:
    > gcc example.o -lgsl -lgslcblas -lm
    Afterwards i get the binary which i can execute with ./example

    The question:
    Which commands do i have to use to compile a pd-external using the gsl?

    Please excuse me for my bad english.
    Hope someone could help me.
    Best regards,
    Joul

    P.S.
    I already know the usual compiling instructions for pd-externals like:
    > gcc -c helloworld.c -o helloworld.o
    > ld -export_dynamic -shared -o helloworld.pd_linux helloworld.o -lc -lm

    posted in technical issues read more
  • Joul

    Hello,
    i'm quiet new on pd and can't find any solution for my problem.
    I want to save the output of [env~] for example every 200ms in an array.
    I've tried [spigot] to pass the output of [env~] only when [metro] sends bang. With no success.

    [env~] [metro 200]
    |
    [tabwrite myarray]

    Any help would be appreciated. Thanks,
    Joul

    posted in technical issues read more
  • Joul

    Hello,
    I'm new on pd so I think my question is quiet simple.
    I want to build an acoustic beamformer with eight microphones. For this I have to delay the particular signals samplewise. I'm using the z~ object at the moment. With the disadvantage I cant simply change the number of samples which are daleayed.
    My question:
    I want to vary the number of samples which are delayed with a slider. Whats the easiest way to do this?

    Probably it is quiet simple but I cant figure it out.
    Any help is greatly appreciated.

    posted in technical issues read more
  • Joul

    Hello again,
    now I've finished a first trial of the mentioned external.
    Unfortunately I get an error message on the pd shell when loading the external:
    "warning: signal method overrides class_mainsignalin"

    Could somebody tell me what this means? For further information I've attatched my source code.

    Thanks in advance!

    Best regards, Joul

    http://www.pdpatchrepo.info/hurleur/music~.c

    posted in technical issues read more
  • Joul

    Hi AlbertoZ,

    sorry, it wasn't clear from the first post.

    No problem, it was my fault.

    I found out how it works! It's quiet simple, i only have to change the linking command into:
    > ld -export-dynamic -shared -o music~.pd_linux music.o -lc -lm -lgsl -lgslcblas

    And it works..! (Sometimes I'm such a fool) but now happy like a little child!
    Think of the huge possibilities for signal processing which i can use now by including the GNU Scientific Library... pd is great!

    Thank You for Your quick replies! I will post my external when i've finished...

    Best regards, Joul

    posted in technical issues read more
  • Joul

    Hi AlbertoZ,
    thank You for Your answer. But i'm already familiar with the HowTo from johannes m zmölnig. I've also written my first externals providing some fractional delay functions yet. And they work... :-)

    I've attached a short example calculating the eigenvalues of a 2x2 matrix which is the estimated covariance matrix from 2 input signals. Besides the source code already uses the GNU Scientific Library. Compiling with
    > gcc -c music~.c -o music~.o
    returns no errors. Therefore i think i've done no misstakes so far.

    My problem is now how to go on with linking etc. Or better say how to combine the two linking commands from my first post to get a cool external...

    For sure there are some optimizations in the source code. Please let me know if i did some unusual programming in the example.

    I hope You can help me.

    Best regards, Joul

    http://www.pdpatchrepo.info/hurleur/music~.c

    posted in technical issues read more
  • Joul

    Yeeaah, your right, it works!
    I just used the wrong type of value into the right inlet (message instead of number).

    But now I've another question: the program calculates the number of samples to delay as a floating number. I didn't find any "round" function. How can I get this number in integer?

    Best regards

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!