Hi, I'm making a patch with gemwin and audio. It works no problem when I use it on my laptop computer screen. As soon as I plug in an external monitor and display the gemwin on it, however, I get 'audio error' in red on the pdwindow, and hear little crackles and glitches in the audio. I'd be grateful for any advice on how to fix this. -Thanks
audio error when external monitor is plugged in
@georgehiggs Hello. What is your OS and Pd version.
I imagine that you are pluging an hdmi monitor, and that the os is disconnecting the computer internal soundcard and re-routing audio to the monitor. You might be able to reset Pd to the hdmi output, but it could be easier to disable hdmi audio in the os.
Thanks for getting back to me.
I'm using a MacBook Pro with 10.9.4 OSX.
My PD version is 0.43.4 extended.
The monitor I'm using is just an old Dell computer monitor, so not high definition as far as I know.
I connected it into the computer, but nothing new came up on the audio output window. The thing is that the audio is in fact playing, but the PD window shows the audio I/O error message in red, and there are crackling sounds.
It might work as it relaxes the audio settings and resets them to a "sort of standard setup".
Hi again, Thanks for sending the fix patch, David. However, it unfortunately hasn't resolved the issue. I've tried now using an external sound card, and that hasn't helped either.
Could the issue be with the delay I have coming from the audio sound card? I don't really want to increase this delay, which is currently 80 ms, and the block size is 64.
The patch is being used for a psychology experiment, where flashes on the screen need to be synchronized with beeps; so increasing the delay could conflict with what I'm trying to achieve with the experiment.
The crackle is really distracting, but I'm also concerned that the audio might ultimately fail in the middle of the experiment, rather than just give an error message and crackle.
Thanks in advance for any additional suggestions.
@georgehiggs Ahh! Yes, I have seen your posts about highest possible frame-rate for the flash.
Just read a little of your other thread. Could you try triggering a strobe of some kind with a "circle" mask onto a simple screen?
Your old monitor is not likely to generate an image of less than 1/60th of a second (probably the maximum refresh rate). If it is an lcd monitor then the image duration (blur) could also be problematic.
A newer oled tv, or a dlp projector could? be? faster?
If you are sending very short frames then maybe the interrupts for the os are causing audio errors. I am not very familiar with the workings of osx unfortunately.
I know that there are laws about subliminal advertising that suggest that image duration of less than "X" is not registered as a conscious perception.
I also seem to remember that 60 fps is considered "flicker-free" for all viewers, all images (moving or not). Moving your eyes very fast would reveal your capture rate.
Post your patch if you wish, and I will check it on my laptop (win7) to see whether it causes problems.
Hi again, and thanks for your suggestions.
I tried lowering the gemwin fps from 60 to 20, which I believe is the default for gemwin, but that didn't help. I still got an audio error with crackling.
I also tried slowing down the flashes. Also, no luck.
What I did find out is that the error only occurs when the gem window is positioned on the other monitor; having been dragged with the mouse before I've set the patch in motion. This error also occurs if I drag the gemwin around while my patch is functioning with the metro without any monitor connected. In other words, it's clear that simply having the external monitor connected and functional is not the cause for the error. It seems to be an issue with coordinating the video signal with another monitor, or when the gemwin is being interfered with while the patch is in progress irrespective of the connection of an external monitor. This may not seem like a revelation, but at least I know it's not simply the presence of the second monitor attached to my computer that's causing the audio error. I'll keep trying things. Thanks for offering to run the patch on your own system. I'll upload it, but I don't know how useful it will be as you won't have all the audio that's probably encumbering the system. For that I'd also have to upload the sound files - about 8 cello samples. Anyway, here's the patch, and thanks for your help .Study no 3 draft4.pd
@georgehiggs Yes dragging windows around (in fact any redrawing) often causes clicks in Pd. I will dig out a monitor and make some dummy audio samples, and give it a go in the next few days.
AND it could be a common problem. I just fell over this.... https://puredata.info/downloads/gem/documentation/faq/how-do-i-use-gem-in-a-performance
and hence this......
so maybe you should try running Pd twice, splitting your patch using netsend/netreceive as suggested.
Under windows that is easy. I am not sure how to do it with a Mac. It should be as easy as opening two Pd terminal windows and starting one part of the patch in each........ if that is possible. If not there is an object...... [pd~] for Linux I think..... that should run the audio in a separate process.
Hi David, Thanks so much. I've uploaded the sound files, as they're quite small. It'll make it easier as they'll just loadbang into the tables if you have them in the same folder. I really appreciate your looking at that. I'll have a look at those links carefully. -George