# audio cue

**URL:** <https://psychtoolbox.discourse.group/t/audio-cue/796>\
**Category:** Uncategorized\
**Created:** [June 23, 2005, 1:39am UTC](https://psychtoolbox.discourse.group/t/audio-cue/796 "2005-06-23T01:39:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 23, 2005, 1:39am UTC](https://psychtoolbox.discourse.group/t/audio-cue/796/1 "2005-06-23T01:39:23Z")

</div>

dear psychtoolbox users,  
  
 I may use an audio cue in the visual experiment. In C/DOS, I can  
realize it via PC speaker (at certain frequence and certain duration).  
Now in Psychtoolbox l can only do with a prepared audiofile and play  
it via soundcard. It would be inconvenient and the sound from  
soundcard was always not loud enough. Is it possible to make audio cue  
in an easier way? It can be very simple sound: diiii...or daaaa...  
etc.

---

<div class="post-metadata">

**Author:** ![xeos](https://avatars.discourse-cdn.com/v4/letter/x/ecae2f/32.png) [@xeos](https://psychtoolbox.discourse.group/u/xeos)\
**Post date:** [June 23, 2005, 6:52pm UTC](https://psychtoolbox.discourse.group/t/audio-cue/796/2 "2005-06-23T18:52:52Z")

</div>

There are actually a lot of ways to play sound, at least in matlab 7   
under windows:  
  
PlayBeep.m: % [theSound,samplingRate] =   
PlayBeep(freq,durationMS,[samplingRate],[DONTPLAY])  
SndPlay.m: % err = SndPlay([sound],[rate])  
SoundPlay.m: % SoundPlay(data,[samplerate])  
 SndTest alternately plays the same sound (someone saying "why")  
BEEP Produce beep sound.  
SOUNDVIEW View and play sound with replay button  
AUREAD Read NeXT/SUN (".au") sound file.  
AUWRITE Write NeXT/SUN (".au") sound file.  
SOUND Play vector as sound.  
SOUNDSC Autoscale and play vector as sound.  
WAVPLAY Play sound using Windows audio output device.  
WAVREAD Read Microsoft WAVE (".wav") sound file.  
WAVRECORD Record sound using Windows audio input device.  
WAVWRITE Write Microsoft WAVE (".wav") sound file.  
XPSOUND Demonstrate MATLAB's sound capability.  
NNSOUND Turn Neural Network Design sounds on and off.  
PLAYSND Implementation for SOUND  
  
  
looks like playbeep is the place to start for your needs.  
  
-- Alan.  
  
peng wrote:  

> \> dear psychtoolbox users,  
> \>   
> \> I may use an audio cue in the visual experiment. In C/DOS, I can  
> \> realize it via PC speaker (at certain frequence and certain duration).  
> \> Now in Psychtoolbox l can only do with a prepared audiofile and play  
> \> it via soundcard. It would be inconvenient and the sound from  
> \> soundcard was always not loud enough. Is it possible to make audio cue  
> \> in an easier way? It can be very simple sound: diiii...or daaaa...  
> \> etc.  
> \>   
> \>   
> \>   
> \>   
> \>   
> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto: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](http://psychtoolbox.org)  
> \>   
> \> Yahoo! Groups Links  
> \>   
> \>   
> \>   
> \>   
> \>   
> \>

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 24, 2005, 2:06am UTC](https://psychtoolbox.discourse.group/t/audio-cue/796/3 "2005-06-24T02:06:41Z")

</div>

Thanks.   
Playbeep works well.  
Though it is still from soundcard rather than PC speaker, it is loud enough.  
I tried all others before except for this one and XPSOUND NNSOUND.  
  

> On 6/24/05, Alan Robinson \<[x\_e\_o\_s\_yahoo@...](mailto:x_e_o_s_yahoo@...)\> wrote:  
> \> There are actually a lot of ways to play sound, at least in matlab 7  
> \> under windows:  
> \>   
> \> PlayBeep.m: % [theSound,samplingRate] =  
> \> PlayBeep(freq,durationMS,[samplingRate],[DONTPLAY])  
> \> SndPlay.m: % err = SndPlay([sound],[rate])  
> \> SoundPlay.m: % SoundPlay(data,[samplerate])  
> \> SndTest alternately plays the same sound (someone saying "why")  
> \> BEEP Produce beep sound.  
> \> SOUNDVIEW View and play sound with replay button  
> \> AUREAD Read NeXT/SUN (".au") sound file.  
> \> AUWRITE Write NeXT/SUN (".au") sound file.  
> \> SOUND Play vector as sound.  
> \> SOUNDSC Autoscale and play vector as sound.  
> \> WAVPLAY Play sound using Windows audio output device.  
> \> WAVREAD Read Microsoft WAVE (".wav") sound file.  
> \> WAVRECORD Record sound using Windows audio input device.  
> \> WAVWRITE Write Microsoft WAVE (".wav") sound file.  
> \> XPSOUND Demonstrate MATLAB's sound capability.  
> \> NNSOUND Turn Neural Network Design sounds on and off.  
> \> PLAYSND Implementation for SOUND  
> \>   
> \>   
> \> looks like playbeep is the place to start for your needs.  
> \>   
> \> -- Alan.  
> \>   
> \> peng wrote:  
> \> \> dear psychtoolbox users,  
> \> \>  
> \> \> I may use an audio cue in the visual experiment. In C/DOS, I can  
> \> \> realize it via PC speaker (at certain frequence and certain duration).  
> \> \> Now in Psychtoolbox l can only do with a prepared audiofile and play  
> \> \> it via soundcard. It would be inconvenient and the sound from  
> \> \> soundcard was always not loud enough. Is it possible to make audio cue  
> \> \> in an easier way? It can be very simple sound: diiii...or daaaa...  
> \> \> etc.  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto: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](http://psychtoolbox.org)  
> \> \>  
> \> \> Yahoo! Groups Links  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \>   
> \>   
> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto: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](http://psychtoolbox.org)  
> \>   
> \> Yahoo! Groups Links  
> \>   
> \>   
> \>   
> \>   
> \>   
> \>   
> \>
