Search Unity

Using WAV music files to feed a Texture Oscillator?!

Discussion in 'Shaders' started by Gigabitten_Gaming, Mar 11, 2020.

  1. Gigabitten_Gaming

    Gigabitten_Gaming

    Joined:
    Jul 10, 2017
    Posts:
    32
    This morning I was making a shader animation by using a triangle oscillator to lerp between two noise textures. Then I had an idea... I used to sound design synthesizers, and the math used for a synthesizer's oscillators is literally the same as the math used for shading oscillators. Would it be possible to port an established audio synthesizer (e.g., Native Instrument's Massive) into a GPU shader?

    Because that would be mindbogglingly fun to play with. You could literally play your shader like a musical instrument using a MIDI keyboard.

    Just an idea. Maybe this has already been done, but I've never seen it.

    I'm thinking that maybe someone could engineer a script in c# that could read the output from a synthesizer, convert the data into a bunch of floats and whatnot, organize and process those floats, then send the processed values to the shader oscillators. Sounds like a lot of work, but I'm sure it's worth it.
     
  2. Przemyslaw_Zaworski

    Przemyslaw_Zaworski

    Joined:
    Jun 9, 2017
    Posts:
    328
    Gigabitten_Gaming likes this.
  3. Gigabitten_Gaming

    Gigabitten_Gaming

    Joined:
    Jul 10, 2017
    Posts:
    32
    This is just what I am needing! Thank you so much!