Search Unity

Audio Multichannel Audio input

Discussion in 'Audio & Video' started by mCici, Sep 22, 2017.

  1. mCici

    mCici

    Joined:
    Sep 2, 2017
    Posts:
    2
    Hi all,

    I would like to generate 16 channels of audio generatively in SuperCollider and feed it into different locations in a Unity scene. I would like to do it by sending the audio between the softwares with Soundflower or Jack (I'm on OSX).
    How can I have access to more than 1 channel of audio coming into Unity?

    There have been some threads discussing the same issue. Back then this seemed to be impossible but since those threads are several years old, I was hoping that in the meantime Unity might be able to handle this?....

    Ideally I would like to be able to assign any of those live-channels to an object, as it is usually done with soundfiles.

    Thanks!
     
  2. sambilbow

    sambilbow

    Joined:
    May 3, 2018
    Posts:
    11
    Hi mCici,

    Did you find a way to do this? This is exactly what I want to do
     
  3. mCici

    mCici

    Joined:
    Sep 2, 2017
    Posts:
    2
    Unfortunately no. I don't know if anything changed with the newer versions of Unity but when I investigated this it turned out not to be possible to stream more than one audio channel into Unity.
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    you can record (or 'stream into unity') multichannel with my plugin [sorry for the plug but people seem to be asking this more than once] but there are few caveats:
    - inputs and outputs are related, so in case of 16 inputs i'm not sure what will happen exactly since unity is limited to 8 channels (or in other words where it will potentially fail ^)
    - in any case you'd have to script input channels separation somewhere in OnAudioFilterRead, though that will most likely _won't_ give you spatialization
    - if you're unable to access all 16 channels from AudioSource related methods you'd have to add custom DSP to FMOD recording input where all channels are present
    - but you can potentially split your inputs beforehand via 16 virtual devices which you can record from in unity separately
    - for proper spatialization of inputs you can use Resonance (which FMOD does use)
    all of the above is in demo app (link is on the store page, link to plugin is in my sig) so you can try it out, presumably with reasonable inputs only so it can run as it is now
    again sorry for plug but this somewhat outside of game-like usage so UT doesn't seem to have resources to support scenarios like these right now
     
  5. sambilbow

    sambilbow

    Joined:
    May 3, 2018
    Posts:
    11
    Thanks r618, but I think I will settle for PureData via the libpd Unity integration. This will allow me to instantiate hopefully hundreds of real-time synthesis PureData patches on gameobjects, allowing native spatialisation.
     
  6. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305