Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.sound Subject: Re: Which function Plays Sound effects? Date: Thu, 04 Sep 1997 15:04:07 +1200 Organization: Peace Computers NZ Ltd Lines: 57 Message-ID: <340E2527.28D9@peace.co.nz> References: <33C360ED.3922@cobradev.demon.co.uk> <33C4A88F.6A7@interactive.sony.com> <33C9A01B.1351@dfwmm.net> NNTP-Posting-Host: 202.37.70.35 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0Gold (X11; I; IRIX 6.2 IP22) Mr. Dave Krampitz wrote: > > But still, we have no sound. SsUtKeyOn returns 0, which indicates a > voice number was assigned successfully, but there is no sound from the > t.v. I am not sure what the problem is, any ideas? Main volume set to (127,127)? If not, you won't hear anything. > Another question: Why does note/pitch have to be specified for a sound > effect, i.e. a wave file (vag in vab) of a gunshot, for example? In > other words, how does the note parameter have any bearing on the way a > gunshot sound will be heard? I guess this is wear the major confusion > lays. If I'm interpreting your question correctly, you seem to be under the impression that if you sample a sound (a gunshot) at 44.1 Khz and that lasts 2 seconds which means approx 160 kilobytes in mono, then if you play it back, it should sound the same, and take the same length of time, and that every time you play it back it sounds the same. BUT When you specify a note, it's really just a number that sez to the SPU how fast to play back your sound data. Middle C (Note number 60) on the PSX is the equivalent to 44.1Khz sampled sound playback, so when you play back any sound sampled at 44.1Khz at Middle C, it sounds normal, because Middle C sez "Play the sound data back at 44.1 Khz". If you played back a sound sampled at 22.05 Khz at Middle C, it would sound one octave up and play TWICE as fast, because you're really saying "Play back this sound which was sampled every 1/22050 seconds as if it was sampled every 1/44100 seconds" It's exactly like records. Your sample was sampled at 44.1Khz (a 45 rpm record), but you have the ability to play it back at at any rate (33 rpm or 78 rpm). It will sound wierd at those speeds, but maybe that's what you want. The 'Note' number is just like the RPM setting on a record player. Most sound effects don't need this ability - there's no need to play back a 45 rpm record at any other speed. But for music players, it's good, because you can sample one note of an instrument (say, a piano) and use the same sample for other notes too. Cheers, J. -- ==PEACE COMPUTERS ==James.Russell@peace.co.nz - 64(9)3730400 -Fax 64(9)3730401 Your Mama's armpits are so hairy, it looks like she's got Don King in a headlock.