Samples per second

Michiel Spape MSpape at FSW.leidenuniv.nl
Thu Jan 31 09:31:43 UTC 2008


Hi Doug, David,

Ah, I see I have made it myself easy by making a rule for this mailinglist but never actually checking the folder where the messages are saved. So excuse me for the late reply.

Anyway, yes, there is a reason that you can and should use more samples than required to be "able to" represent the sine wave; that is, though you can obviously represent waves up to 11 khz with 22050, which is not that much lower than the highest pitch humans are able to perceive (not quite my area, but wasn't that something like 18khz?), I know a number of people, certainly in the audio production "scene" who swear that 48 khz sounds "warmer" than 22.05 kHz (although they obviously don't use monophonic 1 kHz tones, but Doug didn't mention that, and I did experiments with hearing human voices; i.e., 'rich' audio samples), because the number of samples of audio files does not translate 1:1 to the accuracy of analogue representation of digital sound. As for 8 bits: just convert the sound and listen to it, there is usually a good amount of noise in it, which you may, or may not care about.
So, I'm not quite sure in terms of quality. I'm a bit of a hobbyist composer and tend to follow discussions about whether there is any reason why (pro-)audio is going in the direction of 192 kHz, 64 bits. As for resources: perhaps even Atari ST's, but certainly my old 286 xt could play more than one 44.1/16/2 sounds from memory or ad hoc produced at minimal latency... do you (or even: would you) run your visual experiments in 320x240 resolution with 16 colours just because you have a Simon experiment that doesn't require more? Very hardcore, but it doesn't get any better than millisecond accurate :)

So, the compromise between David and me is probably: try it, log to see if re-sampling affects timing, if it doesn't: less (samples) may be equal (in terms of quality), but not more (in terms of accurate)!

Cheers,

Michiel 

Michiel M. Spapé
Leiden Institute for Brain and Cognition & Leiden University of Psychological Research
Netherlands




-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane
Sent: 29 January 2008 16:22
To: e-prime at googlegroups.com
Subject: RE: Samples per second


Michiel, Doug,

Hmm, my advice has always gone in the other 
direction, never use any more resources than you 
really have reason to use.  E.g., if the 
experiment only uses a monophonic 1 kHz tone, 
then why sample at 44.1 kHZ stereo when 11 kHz 
mono will work just as well (and probably at 8 
bit resolution to boot).  I would be interested in others' comments.

But on to Doug's question.  First, as Michiel 
says, you cannot change audio parameters within 
an experiment, so all your sound files must use 
the same parameters.  Next, you must set the 
properties of the Sound Device object to match 
the properties of your sound files (Edit > 
Experiment > Sound).  You will see entries for 
Channel, Samples, and Bits Per Sample.  The 
default (at least for my EP 1.2.1.841) is 2 
Channels (i.e., stereo), 22050 Samples (per 
second), 16 Bits Per Sample, so if you just make 
your files to those parameters then you don't 
have to make any changes in your E-Prime 
experiment, otherwise adjust E-Prime here to match your sound files.

---
David McFarlane, Systems Designer
Dept. Psychology, Michigan State University
mcfarla9 at msu.edu    www.msu.edu/~mcfarla9
Voice: (517) 353-0799    Fax: (517) 353-1652


At 1/29/2008 04:02 AM Tuesday, Michiel M. Spapé wrote:
>Hello Doug,
>
>The sample-rate can be compared to the 
>resolution of image files (but temporally, so 
>not quite the same thing). If you want to be on 
>the safe side, use the highest resolution 
>available, 44.1 khz, which is the same as cd 
>audio quality. I'd recommend never using 
>anything lower than that, and preferably not 
>upsampling to this samplerate but instead just 
>recording at this, or higher, rate. E-Prime can 
>only go to 44.1 khz, stereo files, set in the 
>properties of the audio device (edit > 
>experiment), and to my knowledge not 'switch' 
>between samplerates (not that it is part of your 
>question, but should you be wondering about it).
>
>Cheers,
>
>Michiel M. Spapé
>Leiden Institute for Brain and Cognition and 
>Leiden Institute for Psychological Research
>
>________________________________
>
>Van: e-prime at googlegroups.com namens DG
>Verzonden: di 29-1-2008 4:45
>Aan: E-Prime
>Onderwerp: Samples per second
>
>
>Hi,
>
>We're trying to play a sound file as auditory stimulus, but are
>getting an error at runtime which indicates that we're using an
>incorrect sampling rate for the WAV file.  How many samples per second
>should we be using for E-Prime version 1.2.1.844?  I can just resample
>the file accordingly.
>
>Thanks,
>Doug




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list