CNL Wiki

Docs: Audio recording set up

Updated on August 1, 2025

We have 2 audio streams:

  • the participant microphone
  • direct audio recording from the laptop

For both NLX and BR these streams go to analogue inputs on the NSP:

  • Analogue2 = microphone
  • Analogue3 = direct-from-laptop

Microphone #

Both NLX and BR have lav mics that we attach with a clip to the participant’s clothes. Make sure the amp it on. Test by tapping the mic and seeing audiogram onscreen.

 

Direct-from-laptop #

Properly Setting Up Audio On Linux #

Note: it is strongly suggested to use the external speaker setup. Otherwise, you will not be able to adjust the computer volume mid-experiment, nor will you have the ability to record the audio direct from the laptop.

 

With External Speakers/ Direct Audio Input to BNC: #

This setup will allow you to adjust volume mid-experiment and will provide a high-quality computer audio recording with the recorded data.

Setup the equipment as follows:

The direct-from-laptop audio should be plugged into Analogue 3 on the BNC board.

 

Log into the Linux computer and do the following steps:

 

  1. Go to the desktop and double click the “Start_PulseAudio_17” icon:
  2. Wait until the Speaker Icon appears in the top right corner of the computer screen:
  3. Double click the “Open_Sound_Settings” icon on the desktop:
  4. In the settings window that opens up, make sure that “Headphones – Built-in Audio” is selected as the Output Device
  5. Close the sound settings window
  6. Double click on the “Stop_PulseAudio_17” icon on the desktop:
  7. Wait for the Speaker Icon to disappear from the top right corner of the computer screen:
  8. Launch MATLAB by double clicking on the “Start_MATLAB_With_PTB” icon on the desktop:
  9. You should now be able to navigate to the task code you wish to run.

 

The audio volume on the linux laptop should be set to max. The speaker volume can then be used for further adjustments.

Note: if you do wish to change the laptop output volume, you can also use the technique mentioned in the section below to “reset” audio and change the computer volume while MATLAB is open.

 

The amplifier can be turned on by twisting the dial. This should be set to 2.5 for 24, although you should monitor the Analogue3 signal in Pegasus to see if the amplitude is too low (so you would increase the amplification by turning the dial to a higher number) or if it is too high and clipping (then you would reduce the amplification).

 

Without External Speakers/ Direct Audio Input to BNC (not recommended): #

After logging in, double click on the “Run_24_Movie_Task” icon on the in the backup folder on the desktop:

A terminal window should appear, which will execute some commands related to starting/stopping PulseAudio 15/17 and then will finally conclude with MATLAB opening up.

Note: While by default this MATLAB window will open in the Movie_24 task, you can use the MATLAB file explorer to switch to a different task and run other task code from this window. Thus, this desktop shortcut can be used to run other tasks as well.

Adjusting volume while MATLAB is open #

If you are running MATLAB using the above method, you will notice that pressing the volume up/down buttons on the laptop do nothing. This is because the PulseAudio service is stopped to give PsychToolBox full control over audio output. If you want to adjust the volume without quitting MATLAB, you can do the following: (as long as no task code is currently running)

  1. Go to the desktop and double click the “Reset_Audio_Only” icon:
  2. Wait until the Speaker Icon appears in the top right corner of the computer screen:
  3. You should now be able to use volume controls again. Adjust the volume to the desired level
  4. Before running any task code, double click on the “Setup_Audio_for_24” icon on the desktop:
  5. You should now be able to run task code properly again

 

Audio set up on windows #

The AUX connections with the splitter and amplifier should be the same as the diagram above for the linux. You should not need to do any additional software steps, just make sure the audio is selected to external speakers (as opposed to internal).