Rank: 5337 based on 1 downloads (last 30 days) and 1 file submitted
photo

Peggy Chen

E-mail
Company/University
Penn State Univ.

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Peggy
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 Jun 2004 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen sound, beep, snd, utilities, johnson, tones 1 5
  • 4.33333
4.3 | 3 ratings
Comments and Ratings on Peggy's Files View all
Updated File Comment by Comments Rating
09 Jan 2008 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen shrew, bob

You may find that the following solution, although tacky, is quick and easy.

---
try
  sound(sin(2*pi*[0:1/44100:.1]*1000),44000);
catch
  pause(.1)
end
--

If an attempt to play a sound fails, the software pauses for 0.1 seconds. This seems to solve my problems.

18 Sep 2007 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen machilsen, bart

This is exactly what I needed! When I first got the 'Unable to write into sound device'-error I didn't know how to solve it. This small script did exactly what I wanted it to do. Thanks!

07 Sep 2006 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen Maus, Gerrit

Aaaarrgh! Thanks! Took me ages to find out why my program crashed. And with the tipp from chi-feng tai your fix actually works. I recommend calling it beep3.m to avoid conflict with psychtoolbox' makebeep.m

24 May 2006 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen TAI, CHI-FENG

Peggy Chen,
There is one improvment that can be done for Window PC user.
Instead of using SND('Wait'), it is better to use pause(seconds). If the beep sound duration is shorter than 1 seconds. SND('Wait') will not work. No beeps at all.

SND('Quiet') = SND('Close'). Just need to use one of them. Don't need to repeat the same action which is clear playsnd.

Bothe example will give you 1000 beeps without giving you an error message.

example1:
Beep=sin([1:400]);
rate=22254;
for n=1:1000
SND('Play',Beep,rate);
pause((length(Beep)/rate));
SND('Close');
end

Example2 (Another simpler and better code):
Beep=sin([1:400]);
rate=22254;
for n=1:1000
sound(Beep,rate);
pause((length(Beep)/rate))
clear playsnd
end

01 Nov 2005 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen Bernard, V.

I checked the beep2.m and i think althoug you tried to make a variation of that file, but the ofiginal is still better. But it's good you had the courage to modify it.

Top Tags Applied by Peggy
beep, johnson, snd, sound, tones
Files Tagged by Peggy
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 Jun 2004 Make Beeps with Psychtoolbox Plays a series of short tones as audible stimuli. Author: Peggy Chen sound, beep, snd, utilities, johnson, tones 1 5
  • 4.33333
4.3 | 3 ratings

Contact us at files@mathworks.com