Path: chuka.playstation.co.uk!news From: Developer Support Newsgroups: scee.yaroze.programming.sound Subject: Re: Which function Plays Sound effects? Date: Thu, 10 Jul 1997 10:17:03 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 63 Message-ID: <33C4A88F.6A7@interactive.sony.com> References: <33C360ED.3922@cobradev.demon.co.uk> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) colin adams wrote: > > I am at the Sound Effects Stage in my project. Although > I have read all of the stuff on sound in the manuals, I still > cannot play single sound effects, i.e. gunshots ect. > > This is the situation-: > > 1. I have converted my *.wavs to *.vags. > > 2. I have converted my *.vags to *.vab. > > 3. I have split them into vb & vh data forms. > > 4. I verified them by playing them in a simple *.seq > via vabplay (can't you play them singly?) > > 5. I have loaded them to SRAM via SsVabTransfer i.e. > status=SsVabTransfer((u_char*)vh_address,(u_char*)vb_address,1,1); > status returns 1 so its OK. > > 6. Which function Plays Them as single sound effects? > > I played around with SsUtKeyOn() with no success, but I was confused > as to certain parameters which needed to be passed. if this is the > function which plays them could someone explain the parameters tone, > note, fine? This problem is holding up my Development time as my demo is > almost finished, & f****ing good it is too. > > Thanks in Advance > > -- > Cobra Yes it is SsUtKeyOn() that plays single notes. The parameters are: short vabld, the VAB number as returned by SsVabTransfer (this will be the variable 'status' in your case). short prog, the program number, this is where it starts to get confusing. Your VAB is broken down into sections called programs and each of the programs contains tones. short tone, the tone number, the tone is contained within a program. short note, this is the actual note to play, I believe 60 is middle C. short fine, this adds fine pitch detail to the note playing. short voll, left volume. short volr, right volume. So program and tone just tell you where in the VAB your sound is, while note and fine do the actual sound. Your call to SsUtKeyOn should look something like this, voice = SsUtKeyOn(status, 0, 0, 60, 0, 127,127); This should play the first sound, middle C. Hope this helps, if not I'll knock up a bit of code. Stuart