I am basically working on my first pd externals, 1 of them is using functions of int which I have in a separate .h file. These are functions of a seed and and a prime-number, and generate a series of integers by iteration / repeated bang. . The external compiles and looks like it is working, but it is not generating the right number series, which I can verify both with a python-script and also with a little c program using exactly the same .h file for the functions. I am extremely puzzled and have been trying all kind of stuff to find out what is going on. There are of course 2 crucial variables in the struct holding the external : the seed and the prime. I have included some set-methods which post when a variable has been set to a value, so it looks like that is working ok. I have been using ints in the fuctions, ints in the struct and ints in the bang-method and can not really see where something could have been "lost in translation" Any clues where to look further?? Is someone interested in looking at it if i send the code?
Thanks in advance. Vilbjørg
int functions in externals and computation
I found something that solved it, I had build a switch into the bang-method to chose function, replacing this with if, if else... statements solved the problem for some reason.