audio glitches when toggling fullscreen in max for live
I don’t really know what I’m doing, although I’ve done all the Jitter tutorials and whatnot. So use small words and speak slowly. :)
I need some help with a max for live patch I’ve been playing with. I’m getting audio glitches when toggling fullscreen, and I don’t know where to look for the problem, because my understanding is that what I’m doing should barely be touching my CPU.
I’ve been modifying a version of the Gantz Graf patch, and all my modifications are on the control side, so they don’t seem like they should be generating a substantial CPU load. So it’s a jit.gl.gridshape outputting to a matrix to be modified by the audio input, and then driving two jit.gl.meshes, and then a jit.gl.render rendering the results to a jit.window.
So my understanding is that the only part that should really be taking place on my CPU is the bit from where the jit.gl.gridshape is generated through the jit.op that modulates it via the audio input, to the jit.gl.mesh inputs. And then from the jit.gl.mesh in through the jit.gl.render, it’s all my GPU, right? So isn’t it odd that I’m getting what sounds like buffer issues when I toggle fullscreen? Is there a way around this issue?
My CPU meter is sitting around %20 in Live. I can crank the test tone up to a simulated %80 and not get any glitches, and I’m not seeing any visible spikes on the CPU meter when I toggle fullscreen on and off. Also, I’m monitoring Live’s audio output when I hear the glitches, and not listening to the audio input into the Gantz Graf patch.
Anything obvious I should be checking? Is this unavoidable?
upload the patch please, so we can test it.
Ok, thanks for taking a look at it.
I’ve done some more testing. The problem seems to be intermittent to some degree, but it’s aggravated by a heavier CPU load. If I make a Live set where my CPU meter is sitting at 30%, the glitch I’m getting happens occasionally. You’ll see, though, that one of the jit.gl.meshes is drawing with points and that I’m playing with the point size – with high values at that CPU load the glitch is much more consistent.
However, and this may be the key to the whole thing (for all I know): the glitch does not occur when the patch is open for editing. I can toggle in and out of fullscreen all day with all other parameters being equal, when the patch is open, and I don’t get the glitch.
So perhaps some process is only taking place on the GPU when I’ve got it open in Max, and when running in Live that process is shunted to the CPU?
Oh, and possibly this is relevant, too: it seems like there’s some issue with making changes to parameters in between window fullscreen changes. I’ve got two examples. The first relates to the thing about point size – if I have it fullscreen, and bring the point size down to 1 (i.e. make the the glitch less likely to occur), it will still always occur on that first toggle out of fullscreen. But then thereafter it will be less likely – as though the non fullscreen window was still drawing large points when I first switch back to it.
Similarly, I mapped a button to turning the whole patch off (killing the metro), and if I do that while looking at it fullscreen, I still get the glitch when leaving fullscreen – again, as if the patch still has the old values for a moment when I toggle out of fullscreen. Thereafter, with the patch off, I can toggle in and out of fullscreen with no glitches – but that first one always behaves as if the non-fullscreen window had the same values as the last time I saw it, in terms of "likelihood to produce the glitch".
The forum just keeps on hanging on a white screen when I try to reply with the pasted-in copy-compressed text. What am I missing?
ugh, there appears to be some issue with it having been copied from a max for live patch. let me work on this. apologies.
Forums > Jitter