Re: [psychtoolbox] OSX: snd on mac os x

Hi Josh,

Regarding your request about playing sounds
aynchronously, I've been using 'audioplayer' (see some
bits of code below). I'd be interested if you or
somebody else have a better solution.

Best,
Pascal Mamassian

*****

sampFreq = 44100; % sample frequency (Hz)
beepFreq = 440; % signal frequency (Hz)
beepDura = 1.0; % duration (sec)
nn = sampFreq * beepDura; % number of samples
tt = linspace(0, beepDura, nn); % time samples
myBeep = sin(2*pi*beepFreq*tt);
playTest = audioplayer(myBeep, sampFreq);
play(playTest);

*****


--- joshigold <joshigold@...> wrote:
---------------------------------


Does anybody have any tools for playing a sound
asynchronously
from Matlab in mac os x? It looks like the
psychtoolbox "snd"
command for os x (even in the most up-to-date version,
1.0.42)
just calls matlab's "sound" command, which blocks
until the sound
is playing.

I've even tried making a little command-line tool for
playing .aiff
files that I can call from within Matlab & run in the
background ..
this works but there's a slight delay (~200 ms) in
opening the
file that I'd like to avoid...

Thanks in advance for any help you can offer.

Josh

------
Joshua Gold
University of Pennsylvania
Department of Neuroscience
116 Johnson Pavilion
3610 Hamilton Walk
Philadelphia, PA 19104-6074

office phone: 215-746-0028
lab phone: 215-746-0168
e-mail: jigold@...








Post your message to: psychtoolbox@yahoogroups.com
Please indicate OS9, OSX, or WIN version, and include
your full name.
Denis Pelli, David Brainard, and Allen Ingling.
http://psychtoolbox.org



Yahoo! Groups Sponsor ADVERTISEMENT


---------------------------------
Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/psychtoolbox/

To unsubscribe from this group, send an email to:
psychtoolbox-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.






Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/