Closed ibilab closed 5 years ago
I would like an answer to ibilab's question, as well.
I'll try diving into it myself to see what I can do, but my scripting experience is also limited
Tilt Brush Toolkit handles the audio processing (using Reaktion, among other things), but you are responsible for getting the audio data to process.
The Toolkit sample code illustrates what Tilt Brush does internally -- it takes audio data from (essentially) your computer's line out. Once you have figured out how to get at line-in or microphone data, what you want to do is replace line 40 of VisualizerAudioInput.cs:
void Update() {
if (m_Active) {
// Get audio data from Unity (Hint: replace this with your own!)
AudioListener.GetOutputData(m_WaveformFloats, 0);
// Send audio data to be processed into the shaders
VisualizerManager.m_Instance.ProcessAudio(m_WaveformFloats, AudioSettings.outputSampleRate);
}
}
Since you say Reaktion can do that, probably you can use that code as a reference. Or, check out Unity's Microphone and AudioClip classes.
Hi there! I'd like to use my computer line in input as an audio source for the TiltBrush Audio Reactive prefab. I'm aware it uses Keijiro Reaktion which uses mic input (so it should be possible) but just don't know how to modify the Tiltbrush script, my scripting knowledge is quite limited. Could you point me a solution?
Thanks!