Audio problems on nightly upgrade

Just to be clear, are you saying that, without upgrading MWorks, just switching to your updated MWEL code resulted in distorted sound, on two different machines? Or did you also upgrade MWorks on both machines?

We have not tried just updating the mwel/LabJack code without upgrading, because we tested the code using the new MWorks, so we launched it with the new MWorks. It could very well be our new code. I will need Mark to test this on our end, unless you see anything odd with the code I referenced on github. Both machines were fine before the upgrade which was a synchronous LabJack Plugin + ExperimentXML + MWorks 0.13 launch.

The mac connects to the monitor that emits audio through an HDMI cord that goes to a Thunderbolt adapter. There is nothing coming through the computer’s audio jack in our experiments.

I have played with the format options. All sound very odd but some sound a bit better than the setting we have been using which is seen in the screenshot.

And what does it show for “Built-in Output”?

IMG_5257.MOV
IMG_5259.MOV
IMG_5261.MOV
When we use “built in output” we have no issues. The issues are just through the Thunderbolt/HDMI setup.

Here are some videos taken by Mark. Also if you want to chat on the phone at some point or work in real time I can make sure I am available and testing.

Hi Nina,

When we use “built in output” we have no issues. The issues are just through the Thunderbolt/HDMI setup.

Yes, I understand. I asked about “Built-in Output”, because I want to know if it uses a different audio format than the external display. I’m considering the possibility that MWorks is (somehow) causing the external display to get audio in the wrong format. I don’t know how that would happen, but it would surely make the output sound weird.

We have not tried just updating the mwel/LabJack code without upgrading, because we tested the code using the new MWorks, so we launched it with the new MWorks. It could very well be our new code.

I don’t think it’s your code. I just wanted to confirm that upgrading MWorks was part of the change. I don’t think you need to re-test your new code on the old MWorks version.

Also if you want to chat on the phone at some point or work in real time I can make sure I am available and testing.

That might speed up this process. Is there some time tomorrow or Friday that would work for you? If we could do a Zoom or FaceTime call where I could see the screen on your iMac, that would help, too.

Thanks,
Chris

Thanks Chris.

Yes, this is a little odd. Nina and I tested today and made the videos you see.

Just from a big picture point of view, we could in principle buy all new speakers and connect them all to the headphone jack for all 10 rigs. But it would be better if there was an easy software fix. I’ll also say that these monitors are pretty old, so maybe there is some weird driver interaction. Bottom line for me, being considerate of Chris’s time, it would be good if we can fix it and keep using these monitors but if we need to do a hardware change, we can discuss.

Hi Chris,

Are you free sometime Thursday (tomorrow) between 9:30am and 12:30pm?

Nina

Are you free sometime Thursday (tomorrow) between 9:30am and 12:30pm?

Sure. How about 11am?

Thanks,
Chris

Perfect- I’ll be around at 11am for whatever medium works (phone, zoom, email).

Thank you so much,

Nina

Hi Nina,

Just to summarize what we learned on our Zoom call:

  • Both the built-in speakers and the HDMI audio use the same audio format, so my theory about a format mismatch is almost certainly wrong.
  • The issue is not related to your MWEL code or your LabJack plugin, because it happens when we load a completely unrelated experiment that doesn’t use a LabJack.
  • The problem starts when you load an experiment with a sound and doesn’t stop until you quit MWServer. (I previously thought you just had to unload the experiment to resolve the issue.)

The next step is for me to make a custom MWorks build for you to test with, which hopefully will provide some more insight in to the issue.

Thanks,
Chris

This all looks good to me, looking forward to trying out test experiments.

Thank you so much for all of the help thus far, Chris!

Nina

Hi Nina,

I have a custom MWorks build ready for you to try. You can download it from Dropbox.

This build is identical to the current MWorks nightly build, except for two changes. First, I removed all remnants of MWorks’ pre-0.12 sound infrastructure from it. I realized that there was some old configuration code that was still being loaded, even when the experiment included no “legacy” sounds. It’s possible that this code conflicted with the post-0.12 sound code and somehow caused the issue you’re experiencing. Probably this won’t change anything, but it’s worth trying.

Second, when the experiment starts, MWorks will print some audio debugging info to the server console. It starts with the line

************ BEGIN AUDIO DEBUG INFO ************

and ends with

************  END AUDIO DEBUG INFO  ************

I’ve attached some example output that I generated by running the “FindTheCircle” example on my iMac, with the audio going through my iMac’s speakers.

Using the custom build, can you run your experiment using first the internal speaker (normal sounds) and then the monitor speaker (weird sounds), copy the debug info from both runs, and send it to me? Hopefully this will provide some insight into what’s going wrong.

Thanks,
Chris
example_debug_info.txt (1.7 KB)

Hi Chris,

Thank you so much. Attached are the two txt files.

Nina

built-in_output.txt (4.27 KB)

HDMI.txt (7.05 KB)

I should say - the HDMI sounds are still distorted.

Hi Nina,

It looks like the files you sent are from running “FindTheCircle”. Can you load and start your experiment (HoldAndDetectConstant19), and send me the debug info for that – again, for both the built-in output and the monitor speaker?

Thanks,
Chris

It seems like this new version of MWorks disrupts the connection to the labjack, which is required for loading the HoldAndDetectConstant19 experiment. I’ve tried this on two of our setups, and the LabJack connects with 0.13 but not with the test MWorks. Is it important we test with this experiment?

Screen Shot 2024-04-01 at 6.23.39 PM.png

Mark just gave me a tip! I have forgotten to recompile the LabJack plug-in. Let me do that before we reevaluate.

It probably won’t reveal anything new. But the output for FindTheCircle reveals nothing whatsoever — everything looks totally correct — so I wanted to confirm that everything looks OK with your experiment, too. If it’s too much trouble, you can skip it.

Chris

Another idea: Is this display an ASUS VX238? If so, the user manual says that it has an audio input port, which you should be able to connect to the headphone output on the iMac. Since you’ve already confirmed that the audio is OK coming out of the headphone port, maybe this would be a good workaround?

Chris

Hi Chris,

Just to keep you in the loop, we are working to compile the LabJack code against your version of MWorks before testing the HoldAndDetectConstant19.mwel - I’ve just run into some permissions issues. We are also looking for an audio input cable to run and test if needed. We have 12 set-ups so adding wiring would take a bit of time but if needed this could be a good solution that we could initially test on one rig.

Thanks for the help thus far,

Nina