OpenCL vs: Accelerated Finite-Difference Digital Synthesis

Digital audio synthesis has become an important component of modern music production with techniques that can produce realistic simulations of real instruments. Physical modelling sound synthesis is a category of audio synthesis that uses mathematical models to emulate the physical phenomena of acoustic musical instruments including drum membranes, air columns and strings. The synthesis of physical phenomena can be expressed as discrete variants of Newton's laws of motion, using, for example, the Finite-Difference Time-Domain method or FDTD. FDTD is notoriously computationally expensive and the real time demands of sound synthesis in a live setting has led implementers to consider offloading to GPUs. In this paper we present multiple OpenCL implementations of FDTD for real time simulation of a drum membrane. Additionally, we compare against an AVX optimized CPU implementation and an OpenGL version that utilizes a careful mapping to the GPU texture cache. We find using a discrete, laptop class, AMD GPU that for all but the smallest mesh sizes, the OpenCL implementation out performs the others. Although, to our surprise we found that optimizing for work-group local memory provided only a small performance benefit.

[1]  Kevin Karplus,et al.  Digital Synthesis of Plucked-String and Drum Timbers , 1983 .

[2]  Masanori Hariyama,et al.  FPGA-based deep-pipelined architecture for FDTD acceleration using OpenCL , 2016, 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS).

[3]  Pierre Ruiz,et al.  Synthesizing Musical Sounds by Solving the Wave Equation for Vibrating Objects: Part 2 , 1971 .

[4]  M. van Walstijn,et al.  On the numerical solution of the 2d wave equation with compact fdtd schemes , 2008 .

[5]  Yi Yang,et al.  Optimizing Memory Efficiency for Deep Convolutional Neural Networks on GPUs , 2016, SC16: International Conference for High Performance Computing, Networking, Storage and Analysis.

[6]  Maarten van Walstijn,et al.  A Finite difference plate Model , 2005, ICMC.

[7]  Yang Yi,et al.  Optimizing Memory Efficiency for Deep Convolutional Neural Networks on GPUs , 2016 .

[8]  David Kaeli,et al.  Heterogeneous Computing with OpenCL , 2011 .

[9]  Andrew Allen,et al.  Shader-based physical modelling for the design of massive digital musical instruments , 2017, NIME.

[10]  Julius O. Smith,et al.  Extensions of the Karplus-Strong Plucked-String Algorithm , 1983 .

[11]  Nikunj Raghuvanshi,et al.  Aerophones in flatland , 2015, ACM Trans. Graph..

[12]  Farideh Honary,et al.  A GPU-Accelerated Finite-Difference Time-Domain Scheme for Electromagnetic Wave Interaction With Plasma , 2015, IEEE Transactions on Antennas and Propagation.

[13]  David R. Kaeli,et al.  Heterogeneous Computing with OpenCL - Revised OpenCL 1.2 Edition , 2012 .

[14]  Matti Karjalainen,et al.  Virtual Strings Based on a 1-D FDTD Waveguide Model: Stability, Losses, and Traveling Waves , 2002 .