Скачать презентацию Advanced Granular Synthesis for Next-Generation Games Game Developer s Скачать презентацию Advanced Granular Synthesis for Next-Generation Games Game Developer s

1a422b27e7fe11fe9c33ad368432291e.ppt

  • Количество слайдов: 25

Advanced Granular Synthesis for Next-Generation Games Game Developer's Conference 2007 San Francisco Leonard J. Advanced Granular Synthesis for Next-Generation Games Game Developer's Conference 2007 San Francisco Leonard J. Paul Vancouver Film School Game Audio Instructor info {at} Video. Game. Audio. com 604 -685 -5808 x 4035 Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Overview 1) How to utilise granular for speech, sound effects, music and engines 2) Overview 1) How to utilise granular for speech, sound effects, music and engines 2) Prototyping granular synthesis using Pure Data and Open Sound Control 3) How to add granular synthesis to your sound driver Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

1) Using granular for speech sound effects music and engines Web: : Video. Game. 1) Using granular for speech sound effects music and engines Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Granular Parameters 1) Selection order (fwd/rev or freeze) 2) Pitch shift 3) Amplitude range Granular Parameters 1) Selection order (fwd/rev or freeze) 2) Pitch shift 3) Amplitude range 4) Spatialization / panning 5) Grain duration 6) Grain density (grains/sec, # of grain voices) 7) Envelope (ASR shape or windowing function) 8) DSP effect (reverb, filtering. . . ) 9) Feedback amount (for granular delay lines) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Game Parameters ● Granular parameters driven by game state ● ● Physics allow for Game Parameters ● Granular parameters driven by game state ● ● Physics allow for continuous control over playback of sample ● ● (ex. RPM -> pitch) (ex. ragdoll -> foley) Input parameters need to be carefully tuned to drive synthesis ● (ex. instrument played by novice) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Game Audio Data Diagram Web: : Video. Game. Audio. com Email: : info{at}video. Game. Game Audio Data Diagram Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Speech ● ● ● Time warping speech for variation Change formants of voice Realtime Speech ● ● ● Time warping speech for variation Change formants of voice Realtime granular effects to change character of voice Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Sound Effects ● ● Crossfade morph via grains Spacialization in 5. 1/7. 1 Contact Sound Effects ● ● Crossfade morph via grains Spacialization in 5. 1/7. 1 Contact physics for sliding/scraping Add variation to existing sounds Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Engines ● ● Add as a layer for variation Pre-segmentation and playback via RPM/load Engines ● ● Add as a layer for variation Pre-segmentation and playback via RPM/load band: Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Music and Ambiences ● ● Stretch a sound for a granular drone Tempo-sync grains Music and Ambiences ● ● Stretch a sound for a granular drone Tempo-sync grains for interesting gating effects Merge ambiences by selecting grains from multiple files Making an ambience sound more musical and abstract Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

2) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com 2) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Coding PD Objects ● ● Flex. T is a cross-platform method of generating custom Coding PD Objects ● ● Flex. T is a cross-platform method of generating custom C++ PD objects: http: //grrrr. org/ext/flext/ Easily possible to port part of the Synthesis Toolkit (STK) to PD using Code Blocks or any other DSP code Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Flext (gain~ object code) class gain: public flext_dsp { FLEXT_HEADER(gain, flext_dsp) float factor; gain(): Flext (gain~ object code) class gain: public flext_dsp { FLEXT_HEADER(gain, flext_dsp) float factor; gain(): factor(0) { Add. In. Signal("In"); // add signal inlet Add. In. Float("Gain"); Add. Out. Signal("Out"); // add signal outlet FLEXT_ADDMETHOD(1, m_gain); } virtual void m_signal(int n, t_sample *const *insigs, t_sample *const *outsigs) { const t_sample *in = insigs[0]; t_sample *out = outsigs[0]; while(n--) *(out++) = *(in++)*factor; } void m_gain(float db) { factor = pow(10. f, db*0. 05 f); } FLEXT_CALLBACK_F(m_gain); }; Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

OSC Layer for Prototyping ● ● ● Add an Open Sound Control (OSC) layer OSC Layer for Prototyping ● ● ● Add an Open Sound Control (OSC) layer to your game to communicate with a rapid prototyping audio environment such as PD Example of using OSC with a Half-life 2 Source Mod Possible to compile PD to a language such as Java (pd 2 j 2 me) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

OSC Code for Sending Msg #include OSC Code for Sending Msg #include "osc/Osc. Outbound. Packet. Stream. h" #include "ip/Udp. Socket. h" #define ADDRESS "127. 0. 0. 1" // localhost but can be any address #define PORT 7000 #define OUTPUT_BUFFER_SIZE 1024 int main(int argc, char* argv[]) { Udp. Transmit. Socket transmit. Socket( Ip. Endpoint. Name( ADDRESS, PORT ) ); char buffer[OUTPUT_BUFFER_SIZE]; osc: : Outbound. Packet. Stream p( buffer, OUTPUT_BUFFER_SIZE ); // create buffer p << osc: : Begin. Message( "/test" ) << "hi world" << osc: : End. Message; // message transmit. Socket. Send( p. Data(), p. Size() ); // send message } Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Adding OSC to Half-life 2 ● Download the OSCpack library from: http: //www. audiomulch. Adding OSC to Half-life 2 ● Download the OSCpack library from: http: //www. audiomulch. com/~rossb/code/oscpack/ ● ● ● Download Visual C++ 2005 Express, Half. Life 2 and create a new mod Add the OSC files to the mod source (some tweaking needed) and modify Sound. Emitter. cpp etc. This is a similar process to adding OSC to your own sound driver Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

3) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com 3) Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Granular Sound Driver ● ● ● PD C++ code can be ported to the Granular Sound Driver ● ● ● PD C++ code can be ported to the nextgen consoles as the consoles are primarily software based Synthesis should be creatively used in conjunction with samples for sound design Advantage is that real-time control over synthesis parameters is from game parameters Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Granular Code Examples Ross Bencina – Granular Delay Line ● Uses Borland C++ Builder Granular Code Examples Ross Bencina – Granular Delay Line ● Uses Borland C++ Builder http: //www. audiomulch. com/~rossb/ Synthesis Toolkit (STK) – Granulate ● Can use flext to port to PD http: //ccrma. stanford. edu/software/stk/ Sync. Grain~ for PD (from Csound) ● Ported using flext http: //footils. org/cms/pms/ Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Related Research ● Concatenative Sound Synthesis Sound Related Research ● Concatenative Sound Synthesis Sound "Mosaic" Analysis & Resynthesis Uses grains from one sample to approximate grains of a second sample www. mat. ucsb. edu/~b. sturm/sand/VLDCMCa. R. html Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Related Research ● Natural Grain Resynthesis Make grains that preserve transients http: //www. cs. Related Research ● Natural Grain Resynthesis Make grains that preserve transients http: //www. cs. ubc. ca/~reynald/naturalgrains. html Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Related Research ● Pure Data Compiler (pd 2 j 2 me) Compile PD code Related Research ● Pure Data Compiler (pd 2 j 2 me) Compile PD code to Java http: //www. uow. edu. au/~mh 675/publications/nime_2005. pdf Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Example ● Example of gameplay utilizing granular synthesis Web: : Video. Game. Audio. com Example ● Example of gameplay utilizing granular synthesis Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com

Questions? Email: info-at-Video. Game. Audio. com Web: www. Video. Game. Audio. com Web: : Questions? Email: info-at-Video. Game. Audio. com Web: www. Video. Game. Audio. com Web: : Video. Game. Audio. com Email: : info{at}video. Game. Audio. com