Mac: Calling outlet functions from core midi callback

babazaroni's icon

Hello,

Is it safe, ok, good practice, to call outlet_int from the core midi callback function?

I'm writing an external which rx's midi from core midi and sends it out an outlet. Can I call outlet_int in the core midi callback function, or should I do it another way, like on a Max timer tick, or a separate thread?

Thanks,

-Baba

Timothy Place's icon

No! This is bad. You should definitely do it in Max's scheduler thread by using one of the clock_* functions.

Cheers,
Tim