Giter Club home page Giter Club logo

graf-'s Introduction

graf-

Experimental GPU-based audio processor for Max MSP made with OpenCL

Why does this thing exist?

This thing exist because I was curious to know whether it was possible to run some parallel algorithms at audio rate on the GPU. The short answer is yes. The long answer is that it isn't very practical: large buffer sizes are necessary to counteract delays created by system overhead and limitations imposed by memory bandwidth, and the GPU only really starts outperforming the CPU when buffer sizes go well past practical sizes. This was tested using a 2019 15" MacBook Pro, a machine that has a better than average processor and graphics card, so it likely is the case that this isn't practical on most computers, at least in 2020.

What does it even do?

This is a very stripped down, basic implementation of a 2D IRR filter. This filter doesn't operate on raw signal samples: it operates on the FFT transform of the signal. This allows to create really weird, funky spectral filters. Mostly, this is just a program containing the basic bits of OpenCL code necessary to get the GPU crunching some numbers. The filter kernel it uses is a bit broken, and it lacks stereo I/O necessary for processing the sine and cosine components of the transform properly.

How do I use it?

You can open the patch in /grafproj/ to play around with the compiled external, properly setup in a pfft~, so that the FFT is applied properly on the signal. If you want to develop your own Max external using OpenCL for computing things, feel free to use this as a starting point!

An extra note

OpenCL can use either CPUs or GPUs for crunching the numbers. Somehow, the program needs to decide which device to use. Because this was written in a hurry, selection of the device is hard-coded. Go mess around with line 155 in graf~.c if the current hard-coded device selection doesn't pick the compute device you need.

graf-'s People

Contributors

simondemeule avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.