Hi,
I'm writing a sketch (my first - so apologies if this is a stupid question!) to control a synthesiser in Max/MSP using OSC to transfer data.
I'm trying to find a way to run some code if my sketch is closed so I can shut off any notes that the synth is currently playing. At the moment if the sketch closes mid note, the note continues on forever in Max. Obviously I can control this manually from Max, but I'd much rather control it automatically from Processing.
Is there any onExit() event or something that I could use for this? I can't seem to find one.
Many thanks,
Tim
1