Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Mr. Dave Krampitz" Newsgroups: scea.yaroze.programming.sound Subject: Re: Which function Plays Sound effects? Date: Sun, 13 Jul 1997 22:44:11 -0500 Organization: SCEA Net Yaroze News Lines: 89 Message-ID: <33C9A08B.834@dfwmm.net> References: <33C360ED.3922@cobradev.demon.co.uk> <33C4A88F.6A7@interactive.sony.com> NNTP-Posting-Host: 53-00-dal.dfwmm.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0Gold (Win95; I) Hello, I am in the same boat as colin adams. I too have done everything that colin has, including trying to us the SsUtKeyOn command as specified below by Stuart (SsUtKeyOn(status, 0, 0, 60, 0, 127,127);). 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? 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. Could you please let me know where I am going wrong? Thanks much! Dave krampitz@dfwmm.net Developer Support wrote: > > 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