Hey there,
I've been "writting" this PD external as a part of an university project.
It's a ripoff from PeiXiang's [earplug~], it ain't a copy-paste either but it's a lot like earplug. I've changed a few things for using IRCAM's database (based on human subjects) instead of KEMAR's and a few other things, so it's quiet the same but simplified, I don't even perform interpolation (by now).
The point is I've taken some "riscs" changing the code, that why maybe it doesn't work.
I compiled it on Xcode, but when I call the object on PD it just doesn't work.
I attach the code, all comments on it are on Catalan so tell me if you need translation, I can even pass you the .txt with the coefficients if you're interested.
Thanx!
-
Earplug~ ripoff, compile but PD doesn't seem to recognize!
-
@nasker said:
it doesn't work
What do mean? It doesn't load? It does not do what you expect it to do?
For one thing, in line 171 "huikey_class = class_new(gensym("huikey")...." should be "huikey_class = class_new(gensym("huikey~")...." because that is the symbol which you'll type in the object box to set up the class and instantiate an object. If you type [huikey] on a canvas Pd will look for huikey_setup() instead of huikey_tilde_setup().
Katja
-
Yeah, you're right, I should have said which error I get: When I call the object in PD typing [huikey~] I get "couldn't create", but I guess that you've found one of the main mystakes (thanx so much!) and it's the symbol name! I'll change that and see what I get!
Thanx again!
I'll write later cause I'm pretty sure It will give me another problems! -
I've just changed that gensym [huikey] into [huikey~] as you said, now when I call the object it appears apparently correct (number of signal in/outs and the other stuff) but I don't get any sound when I use it.
I'll keep working on it, any suggestion will be really appreciated, thanx! -
Hey there, again,
Still working on the external, I haven't made much more progress, but now I know why it doesn't sound: my code doesn't load properly the text file where I have the impulse responses, here is that part of the code:fop = open_via_path(canvas_getdir(canvas_getcurrent())->s_name,"databaseHrirREDUX.txt", "", buff, &buffptr, 1024, 0);
/* Here I call the function that looks for the archive at the path*/if (fop >= 0) { /*if the return value of the last function is bigger than 0 then it will keep loading the file */
post("[huikey~]....
ALL THIS LINES ARE SKIPPED ANYWAYS CAUSE THE CONDITION IT'S NOT PASED (WHYY??)
.....
}
fclose(fid); /* Tanquem l'arxiu finalitzada la seva lectura */}
else post ("Error al obrir l'arxiu"); <-THIS MESSAGE ACTUALLY APPEARS, SHOWING THAT IT COULDN'T OPEN THE TXT FILE!! I've made sure that the filename it's allright!!If anyone can tell WTF I'm doing wrong, I'll really appreciate!