Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepped generated sound

Hello,

I am trying to generate a sound using more or less the example VI Generate Sound, but with a slider instead of the text input for the frequency, and the problem is that whenever i change the sound data (frequency or volume), the sound seems stepped, like a serie of "beeps". It is really unpleasant.

Sorry for my probables English mistakes, and thank you very much beforehand if someone could give me a bit of help.

0 Kudos
Message 1 of 7
(5,938 Views)

hi,

i am attaching a vi with different sound generation options. also attaching the snapshot if vi is not opening in your LV.

regards

Download All
Message 2 of 7
(5,873 Views)

Thank you for your answer, but these 3 options don't seem to work.

The 1st, "beep", uses the beep component in the computer, but it creates a sound that ain't really pleasant.

The 2d creates a sine waveform like i had already tried, but either it is really slow to react, or it is stepped (depending on the sample rate).

For the 3rd i don't really understand, it creates an horrible screeching and LV crashes after 2s, telling that memory is full.

0 Kudos
Message 3 of 7
(5,842 Views)

there are some issues with my 3rd option

 

i put the config sound in the while loop which is a mistake

 

i also done some setting sampling rate number of samples etc

 

now it is playing fine without any memory full error and no stepped beep. i generate  1000 Hz freq

 

see my attachement

sound write modified block diag.JPG

sound write mod setting.JPG

 

 

 

 

 

 

0 Kudos
Message 4 of 7
(5,831 Views)

I don't know if it is because i didn't really understood your VI, but when I generate a sound it takes about 5s to react, and with oddly high frequencies (with the slider at 200 Hz, I have like a 4000 Hz sound...).

0 Kudos
Message 5 of 7
(5,809 Views)

set the values of number of samples in sound configuration vi to 44100 and set sinewave sampling freq to 44100. also set the number of samples in sinewave vi to 40000. see the picture. every time you run your vi the values get changed so select the parameters controls and after setting them as per above right click and select 'make it as default' option

 

sound config setting.JPGsinwave samplig freq and samples setting.JPG

0 Kudos
Message 6 of 7
(5,803 Views)

Thanks, now I have a normal frequency, but the sound still takes 4-5s to react when i change the value of the slider.

0 Kudos
Message 7 of 7
(5,801 Views)