-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading/Playing an audio file in Unity #257
Comments
@cdraudio sorry yeah that javascript example is slightly out of date, the Try using this looper patch here: https://enzienaudio.com/h/enzienaudio/looper/ It's very similar to what you have, though the sample loader script looks like this:
Note the |
I've actually been working on a nice feature to auto expose an |
I’ve pushed an update to the unity target on the |
Thanks for the reply. I'll try that out now. |
hey @cdraudio did you managed to get it working? |
Sorry for the late reply @diplojocus. Yeah, got the script and patch working fine though I've ran into a couple other issues. I can open a separate thread for them, though one that relates to this was an issue with 3D positioning of the audio source. Volume attenuation works fine but there's no panning. Noticed this was brought up in #112. Was this ever resolved or should I look into the work arounds mentioned in the thread? |
What about stereo file? I've tried load stereo but channels left and right was same. When I've separated it in DAW and made left and right channel, then load them, it play correctly. I wonder is there a way to load stereo file, divided it to left and right channel and then load them to 2 tables? |
Currently it will load the first channel (left) of a stereo file into the table. Your method of separating the files into individual channels sounds correct. You could probably create a batch script to automate splitting the bounces from your DAW. Pd doesn't really have a concept of stereo when patching as you can have as many channels as you want. |
@diplojocus ok, thanks. |
I'm currently having trouble loading/playing back an audio file in Unity.
I have a simple patch (link below) based on the js "loading samples" example. Originally I compiled and tested it in Wwise and everything worked as expected. I've now tried to integrate essentially the same patch in Unity and I'm not getting any audio when playing the scene.
https://enzienaudio.com/h/cdraudio/UnitySampTest_03/
`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HvLoadSample : MonoBehaviour {
}
`
I would be expecting the sample to play once the scene launches but I'm getting nothing. Not sure if I've missed a step somewhere or if there's a different method of setting the table size that should be used in Unity instead of the [r setTableSize-myTable]?
The text was updated successfully, but these errors were encountered: