#Scriptable audio pipeline questions
1 messages · Page 1 of 1 (latest)
can you share the code you've written so far?
and anything you're referencing? I see that this is a very new feature.
didn't find mutch other than the official documentation
https://docs.unity3d.com/Manual/audio-scriptable-processors.html
there is a sample for an oscillator but it doesn't include nesting generators (but they do mention that nesting is the intended workflow)
not much
it fails right here in my ScriptableObject implementing IAudioGenerator
public GeneratorInstance CreateInstance(ControlContext context, AudioFormat? nestedFormat, ProcessorInstance.CreationParameters creationParameters)
{
return context.AllocateGenerator(new Realtime
{
child1 = clip1.definition.CreateInstance(context, nestedFormat, creationParameters),
child2 = clip2.definition.CreateInstance(context, nestedFormat, creationParameters),
}, new Control(), nestedFormat, creationParameters);
}
(clip1 and clip2 are IAudioGenerator.Serializable I assigned AudioClips in the inspector)
Realtime and Control are local structs implementing the basics with realtime overlaying the two generators but it never gets to that
Scriptable audio pipeline questions
i found this discussion https://discussions.unity.com/t/audio-status-update-q3-2025/1681867
saying
For future releases beyond 6.3, we’re working on:
- Implementing Audio Clip as a Scriptable Generator, allowing it to provide sample data within processor hierarchies independent of an Audio Source.
but I found no information on what beyond 6.3 means
still not implemented in the latest 6.5 alpha
In case someone is interested I wrote my own AudioClipGenerator tying together existing unity apis,
probably not the most efficient design but it will do for now
How did you go about doing it?
keep an eye out, 6000.5.0a8 probably next week or so 😉
would be awesome to see this!
lets hope
i loaded the sample data from AudioClip into a NativeArray<float> to manually sample it inside of the IRealtime
unfortunately the Audio Random Container is internal so making a generator will be tricky
Yeah it is kind of annoying that they make the audio scripts internal/sealed. I’m assuming Unity has a good reason for it, but it would be nice to be able to just extend the scripts
i think the problem is performance, lagging audio scripts are fatal for sound quality so they need to be careful about how they open it up
https://unity.com/releases/editor/alpha/6000.5.0a8
Audio: AudioClip can now be used as a Scriptable Generator.
😉