SndLoadWave and PlaySound

I am new to using Igor and only moderately practiced in programming, but in general I am making progress and understanding.

However, for my experiment I need to play an auditory stimulus while making a whole-cell recording in Igor.

I successfully imported a .WAV file into an Igor wave, but when I go to play it using the Waveform Generator (NIDAQmxWaveFOrmGenProcs.ipf, I believe) I get an error that: "While starting Waveform Generator: NI-DAQmx driver error while calling function DAQmxWriteAnalogF64;
device NI6259:-200561: Measurements: Attempted writing analog data that is too large or too small."

Indeed, the wave that was created when I used SndLoadWave has minVal=-11110, maxVal=9753

I cannot figure out how to scale this wave (using setscale ?... I use the format: setscale y, -10,10, data1), nor how to make it import within a specified range V_min, V_max (I have not found a function that can perform this, nor a flag option to set it within the SndLoadWave operation)

I hope someone can help.

Best,
Krista
Another point of confusion is that PlaySound claims that "Sound waves should be 16 bit integers with a range of -32768 to +32767," which is what my wave is. The wave also has the valid sampling rate of 1/44100.
But PlaySound is not working.

Has anyone used this function?
I can help you with NIDAQ Tools and waveform generation; I will let someone else help you with PlaySound.

The values in your wave that you want to send to the waveform generator should be volts. In general, most NI devices have an analog output range of +-10V, some have somewhat larger, some have somewhat smaller. So you need to scale your sound values into floating-point values that express voltages that are appropriate for whatever device you are sending the sounds to.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com