home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!gumby!kzoo!k044477
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Subject: Re: Using the new Sound Manager
- Message-ID: <1993Jan28.030324.6934@hobbes.kzoo.edu>
- Organization: Kalamazoo College
- References: <1993Jan27.153602.18276@Princeton.EDU>
- Distribution: na
- Date: Thu, 28 Jan 1993 03:03:24 GMT
- Lines: 38
-
- trgibney@phoenix.Princeton.EDU (Thomas R. Gibney) writes:
- >It appears that the "Enhanced Sound Manager" (Sys 6.0.7 and later) supports
- >only an equal-tempered scale when using the waveTable synthesizer.
- >Is it still possible to specify exact frequencies with the new Sound Manager,
- >as could be done with "noteCmd" described in IM vol5 ?
-
- No; in fact, you never could. That feature describe in IM V was never
- implemented.
-
- You can either cobble up twelve sounds in the frequencies you want (a
- pain in the butt, and wasteful), or you can manually tweak the
- sampleRate field (squirrely and weird; may have problems if the current
- or a future Sound Manager depends on that value remaining constant for a
- sound in progress).
-
- If this is a serious application, i.e. not for fun or for in-house use,
- I'd recommend the second method. If you go that way, try keeping one
- copy of the 'snd ' for each channel (voice) you're playing. (If you're
- only playing one voice, ignore previous sentence. :-) Write in the
- sampleRate you want--if you want C-sharp, multiply the "natural" rate by
- 1+(the twelfth root of two). Then do your soundCmd to set the channel
- up for that sound, and your freqDurationCmd (aka noteCmd) to play it.
- For the next note, do it again. You _don't_ want to write in the next
- note's sampleRate until the previous note has started playing. The
- easiest way to arbitrate this is to drop a callBackCmd in after each
- freqDurationCmd, and have your callback routine figure out which value
- to write in next. "Easy" here is a relative term; it sounds like quite
- a headache and I'm glad I don't have to write it. :-/
-
- If this will be used in a controlled environment--and anything that
- requires a non-well-tempered scale will probably be a pretty vertical
- market--you might just want to put together twelve notes in the
- frequencies you want. Going up or down octaves, of course, can be done
- with the freqDurationCmd. It'll cost you RAM, but that's the breaks...
- --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- "A degree in Computer Science from Berkeley didn't much qualify me to uphold
- the banner of Chaos against the forces of Order." - R. Zelazny
-