Path: chuka.playstation.co.uk!news From: Luca Cappellini Newsgroups: scee.yaroze.programming.sound Subject: Re: VAG in SEQ? SeqPlay example Date: Thu, 05 Feb 1998 13:27:05 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 72 Message-ID: <34D9B019.A9181234@infores.com> References: <34D85A44.89550AF9@infores.com> <34D97DF4.7A24@manc.u-net.com> NNTP-Posting-Host: ppp1-29.planet.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (WinNT; I) Thanks alot for the help, Do you know any Pc product with witch i can create a Midi file with the wav (instruments) associated and than convert them for the magic Blank !! bye Luca James Shaughnessy wrote: > Luca Cappellini wrote: > > I do not understand the meaning of having a VAG (group of waveforms) > > associated to a SEQ file (MIDI file that define instruments and note > > I thought that a SEQ file could play alone, why i have to give to the > > SsOpenSeq func the VAG address ? > > The VAG sound samples are the instruments, and the SEQ file > is just a data file which says what SEQuence to play those > instruments in. > You give SsOpenSeq a VAB_ID number (not its address) which is determined > with the the return value from SsVabTransfer (which is what uses the > addresses of the .vh and .vb files (parts of the split VAB). > > eg: > > #define SEQ_ADDR 0x80090000 // > #define VH_ADDR 0x800a0000 // or wherever > #define VB_ADDR 0x800b0000 // > > main () > { > short vab_id, access_num; > > // MUST do this to hear amything! > SsSetMVol(127,127); > > // Put samples in sound RAM and get vab_id > // (we don't control where it goes) > vab_id = SsVabTransfer((u_char *)VH_ADDR, (u_char *)VB_ADDR, 1, 1); > > // Get SEQ access num > access_num = SsSeqOpen(u_long *)SEQ_ADDR, vab_id); > > // MUST do this too! > SsSetSeqVolume(access_num, 127, 127); > > // Finally play the SEQ > SsSeqPlay(access_num, SSPLAY_PLAY, 1); > > ... > } > > Job's a good'en! > You can play a sound sample from the VAB simply by using > SsUtKeyOn() etc. as sfx and seq instruments are the same thing. > > Hope that helps you and others who just need a little example > to get them going (I sure did!), > > Jim > -- > ----------------------------------------- > James Shaughnessy james@manc.u-net.com > http://www.netyaroze-europe.com/~shaughnj > -----------------------------------------