[comp.sys.mac.misc] MacRecorder sampling rate

sandell@ils.nwu.edu (Greg Sandell) (10/10/90)

I frequently download MacRecorder files from other places, and
the sampling rate is set wrong.  For example, the srate should
be 11000, but the MacRecorder file thinks it's 22000.  I can find
no way to set the playback sampling rate while running MacRecorder.

Does anybody know how to change the playback sampling rate by
playing with the resource fork, or any other way??

Thanks,
Greg
****************************************************************
* Greg Sandell (sandell@ils.nwu.edu)              Evanston, IL *
* Institute for the Learning Sciences, Northwestern University *
****************************************************************

gt0831c@prism.gatech.EDU (William Moss) (10/13/90)

Greg Sandell (sandell@ils.nwu.edu) wanted to know how to change a
sound that MacRecorder reads as having a different sampling rate
than it actually does.
 
My solution is to use MacRecorder's TEMPO option to slow or speed
up the sound. This is probably not the best way to do this, but it
almost always works.
 
WiLLiam Moss

bhall@pbs.org (Dark Star) (10/14/90)

In article <2112@anaxagoras.ils.nwu.edu>, sandell@ils.nwu.edu (Greg Sandell) writes:
> I frequently download MacRecorder files from other places, and
> the sampling rate is set wrong.  For example, the srate should
> be 11000, but the MacRecorder file thinks it's 22000.  I can find
> no way to set the playback sampling rate while running MacRecorder.
> 
> Does anybody know how to change the playback sampling rate by
> playing with the resource fork, or any other way??
> 
There must be a better way than this, but I have found it to work:

Open the sound file with ResEdit.
Open the Resource called INFO with ID = 1000.
Change the last four characters in row 18 accoring to this pattern:
    0001 = 22K sampling
    0002 = 11K sampling

Sometimes sound files do not have a resource fork.  If this happens, then
open the file with SoundEdit and save it again.

--
Bruce Hall                     Domain: bhall@pbs.org
Public Broadcasting Service    UUCP:...{uupsi,vrdxhq,csed-1,ida.org}!pbs!bhall
                               Phone: 703/739-5048
"Experience is the name everyone gives to their mistakes" - Oscar Wilde

phil@anduin.cs.liverpool.ac.uk (Phil Jimmieson) (10/15/90)

In article <2112@anaxagoras.ils.nwu.edu>, sandell@ils.nwu.edu (Greg Sandell) writes:
> I frequently download MacRecorder files from other places, and
> the sampling rate is set wrong.  For example, the srate should
> be 11000, but the MacRecorder file thinks it's 22000.  I can find
> no way to set the playback sampling rate while running MacRecorder.

While you're playing the sample in SoundEdit you can use the "Set Pitch"
command - and set the playback pitch.  The problem with doing this is that if
you want to put the sound into a program or somesuch the speed is still wrong -
and the only way I know how to fix this is by using Resedit to change the
sampling rate signature bytes.

> 
> Does anybody know how to change the playback sampling rate by
> playing with the resource fork, or any other way??
> 

OK, using ResEdit (on a copy of your sample of course :-)  ) open up the sample
and look for the following signature:

56EE 8BA3  - this is a 22KHz sample

or

2B77 45D1 - this is an 11 KHz sample

now just modify the string of bytes to the appropriate speed (i.e. change your
22KHz signature to the 11KHz one and your sound will be played at half the
speed, and vice versa.)  I have done this to a few samples.  I've never needed
to change any samples to 7.5 or 5Khz - so I don't know what the respective
signatures are - you could try saving 4 different speed versions of the same
sample - and comparing the header - which contains the speed signature to find
out what they are for the two lower quality sampling rates.

Hope this is the info you wanted - modify sound resources at your own risk of
course... :-)

> Thanks,
> Greg
> ****************************************************************
> * Greg Sandell (sandell@ils.nwu.edu)              Evanston, IL *
> * Institute for the Learning Sciences, Northwestern University *
> ****************************************************************

Phil Jimmieson,           ***************************************************
Computer Science Dept.,   * JANET    : phil@uk.ac.liv.cs.and                *
Liverpool University,     * INTERNET : phil@and.cs.liv.ac.uk                *
PO Box 147                ***************************************************
Liverpool  L69  3BX    "This message contains wit, sophistication, class,
(UK) 051-794-3689       style, and 3 other words I don't understand as well..."

murat@farcomp.UUCP (Murat Konar) (10/16/90)

In article <2112@anaxagoras.ils.nwu.edu> sandell@ils.nwu.edu (Greg Sandell) writes:
>I frequently download MacRecorder files from other places, and
>the sampling rate is set wrong.  For example, the srate should
>be 11000, but the MacRecorder file thinks it's 22000.  I can find
>no way to set the playback sampling rate while running MacRecorder.
>
>Does anybody know how to change the playback sampling rate by
>playing with the resource fork, or any other way??
>


Look on page 211 of the MacRecorder User's Guide.  There you will find that 
the sampling rate for a file is stored in the INFO resource (ID=1000) in
longword 7.  It is encoded as follows:
1 ->22kHz
2 ->11kHz
3 ->7kHz
4 ->5kHz


-- 
____________________________________________________________________
Have a day. :^|             
Murat N. Konar	
murat@farcomp.UUCP             -or-          farcomp!murat@apple.com