auditory "house light" with continuous/ pulse gated triggering modes

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auditory "house light" with continuous/ pulse gated triggering modes
#1
Hi Josh,

I want to implement an auditory "house light", i.e. play a white noise during my ITI period. Because the animal must stop licking for 1.5s the duration of the ITI is indeterminate. Essentially I want a pulse train to play whenever a particular digital out is set to high.

Other people in our lab lab already use pulse pal to approximate a white noise stimulus: 
Quote:SendCustomPulseTrain(1,cumsum(randi(9,1,601))/10000,(rand(1,601)-.5)*20); % White(?) noise on channel 1+2

Can I use the SetContinuousPlay function combined with the pulse gated trigger mode to do this?


Thanks,
Fitz
Reply
#2
(11-27-2016, 10:25 PM)fitzsturgill Wrote: Hi Josh,

I want to implement an auditory "house light", i.e. play a white noise during my ITI period. Because the animal must stop licking for 1.5s the duration of the ITI is indeterminate. Essentially I want a pulse train to play whenever a particular digital out is set to high.

Other people in our lab lab already use pulse pal to approximate a white noise stimulus: 
Quote:SendCustomPulseTrain(1,cumsum(randi(9,1,601))/10000,(rand(1,601)-.5)*20); % White(?) noise on channel 1+2

Can I use the SetContinuousPlay function combined with the pulse gated trigger mode to do this?


Thanks,
Fitz

Hi Fitz

I'd suggest setting your auditory channel to "loop" mode. This will cause custom train playback to loop back to sample 1 when it reaches the end. If trigger mode is "Pulse Gated" and the pulse train duration is 3,000 seconds, you'll always have the amount of playback you need.

I pasted the white noise code into MATLAB. It looks like the output range is +/- 20V. Amplified speakers usually expect a "line level" signal of +/- 1V - so I'd multiply by 2 instead of 20 to avoid damaging your speaker amp. You can also make the pulse train significantly longer (if you're using Pulse Pal 2) - up to 5,000 samples. The pulse onset times don't have to be randomized - I'm pretty sure that will act as a low-pass filter on your signal. Instead, you can use SendCustomWaveform with SamplingPeriod = 0.0001, to get the whitest noise possible with Pulse Pal's bandwidth.

There is a caveat to this looping method, which you might care about, depending on what you're measuring. Since you're looping a segment of white noise at ~20x per second, it will create an auditory pattern in the low beta frequency band. To get around this, if Pulse Pal isn't simultaneously being used for stimulation, you can use Pulse Pal 2's new WaveGen firmware to make pulse-gated continuous white noise, sampled at 50kHz. Your setup code would be:

WaveGen = PulsePalWaveGen('COM3');
WaveGen.waveform = 'noise';
WaveGen.playbackMode = 'gated';

I hope this helps!
Josh
Reply
#3
(11-27-2016, 11:05 PM)Josh Wrote:
(11-27-2016, 10:25 PM)fitzsturgill Wrote: Hi Josh,

I want to implement an auditory "house light", i.e. play a white noise during my ITI period. Because the animal must stop licking for 1.5s the duration of the ITI is indeterminate. Essentially I want a pulse train to play whenever a particular digital out is set to high.

Other people in our lab lab already use pulse pal to approximate a white noise stimulus: 
Quote:SendCustomPulseTrain(1,cumsum(randi(9,1,601))/10000,(rand(1,601)-.5)*20); % White(?) noise on channel 1+2

Can I use the SetContinuousPlay function combined with the pulse gated trigger mode to do this?


Thanks,
Fitz

Hi Fitz

I'd suggest setting your auditory channel to "loop" mode. This will cause custom train playback to loop back to sample 1 when it reaches the end. If trigger mode is "Pulse Gated" and the pulse train duration is 3,000 seconds, you'll always have the amount of playback you need.

I pasted the white noise code into MATLAB. It looks like the output range is +/- 20V. Amplified speakers usually expect a "line level" signal of +/- 1V - so I'd multiply by 2 instead of 20 to avoid damaging your speaker amp. You can also make the pulse train significantly longer (if you're using Pulse Pal 2) - up to 5,000 samples. The pulse onset times don't have to be randomized - I'm pretty sure that will act as a low-pass filter on your signal. Instead, you can use SendCustomWaveform with SamplingPeriod = 0.0001, to get the whitest noise possible with Pulse Pal's bandwidth.

There is a caveat to this looping method, which you might care about, depending on what you're measuring. Since you're looping a segment of white noise at ~20x per second, it will create an auditory pattern in the low beta frequency band. To get around this, if Pulse Pal isn't simultaneously being used for stimulation, you can use Pulse Pal 2's new WaveGen firmware to make pulse-gated continuous white noise, sampled at 50kHz. Your setup code would be:

WaveGen = PulsePalWaveGen('COM3');
WaveGen.waveform = 'noise';
WaveGen.playbackMode = 'gated';

I hope this helps!
Josh

Update: I'm using the 1st gen PulsePal. Using the SendCustomWaveform function together with the Loop mode and a very long pulse train duration (3000s as you suggested) worked well.  Because 1000 samples only gives a 100ms snippet at 10KHz there is repetitive warbling quality.  But for my purpose it doesn't matter and clearly it's not an issue with Pulse Pal 2.

Thanks,
Fitz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)