Does MATLAB support above 96000Hz sampling frequencies of winsound?
6 views (last 30 days)
Show older comments
Salaheddin Hosseinzadeh
on 9 Mar 2014
Commented: Salaheddin Hosseinzadeh
on 13 Mar 2014
Why MATLAB 2012a (7.14.0.739) does not support 192000Hz and maybe higher sampling frequency of the winsound while my PCs have this sampling frequency? Is there a solution for this? I make 2 analog output channels and then propinfo(ao,'SampleRate') only shows me [5000 96000] and I receive an error trying to set it to 192000. I have this problem with two laptops, one is running windows XP SP3 32bit and the windows 7 32bit, both with same version of MATLAB. I want to get a sound card with even higher sampling frequencies, so I also need to know if those frequencies (above 96000) are supported by MATLAB? Thanks
ao=analogoutput('winsound');
addchannel(ao,1:2);
propinfo(ao,'SampleRate')
setverify(ao,'SampleRate',96000);
setverify(ao,'RepeatOutput',0)
t=0:0.001:10;
f=500;
T=1/f;
x=sin(2*pi*f*(0:T/80:10000*T));
y=cos(2*pi*f*(0:T/80:10000*T));
putdata(ao,[x',y'])
start(ao)
propinfo(ao,'SampleRate') only shows frin [5000,96000] no sign of 192000! And I can not set 'SampleRate' to 192000 either. Why?
3 Comments
Walter Roberson
on 11 Mar 2014
There are different possible messages for attempting to set an unsupported value, and the details of the messages can give clues about the solution. Please post the exact error message.
Also, keep in mind that people will not generally have the exact same hardware as you have available to them to run your program to see exactly what it gives. Furthermore, some of the volunteers have some hardware experience but do not have access to the toolbox you are using, and so might be able to recognize the condition given the message while not being able to test the code themselves.
Accepted Answer
Walter Roberson
on 11 Mar 2014
No, 96 kHz is the maximum supported for winsound. See http://www.mathworks.com/help/daq/windows-sound-cards.html
What kind of sounds are you recording that you need 192 KHz ? Wouldn't a data acquisition device make more sense than a sound card for rates that high? That's well above whale frequencies, and in line with dolphin frequencies (up to about 150 kHz). Anything that high I would tend to class as "data" rather than "sound". What kind of mic are you using that has that kind of frequency response ?
3 Comments
Walter Roberson
on 11 Mar 2014
That would be 8 points per cycle, total 160 k samples per second? Each of 2 channels? How many bits per channel?
Is this a repetitive sequence that can be pre-calculated? Or is it doing interactive work (for example a Segway rebalancing itself)? If it is interactive then what are the characteristics of the input, and what latency of response do you need?
More Answers (1)
Jan
on 9 Mar 2014
Did you search in the net or in this forum already? Does this help: http://www.mathworks.com/matlabcentral/answers/1352 ?
0 Comments
See Also
Categories
Find more on Analog Signal Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!