Let's take a look at how to bring audio from an external audio source, like a microphone, into Simmetri as both a visualizable signal and a spatial sound.
- Let's start fresh by clicking on File menu/New
Creating the InputAudioStream
- Undock the browser panel
- On the bottom right of the panel, click the + button
- Under Audio, select New InputAudioStream
A new InputAudioStream has been created in your library. By default, it is binded to the default recording device of your system. Let's see how we can rebind it to something else.
- From the Edit menu, select Preferences...
- Select the 'inputs' tab
- From the left list, select Input Audio Streams
- Our single created InputAudioStream should be selected on the right list
- Click the 'set' button underneath the right side list
- A menu is displayed with all available recording devices. Select the recording device you wish to use.
Now that our binding is set, we can now do something with the input audio data.
Visualizing The Audio Input
Let's look at visualizing the audio.
- From the Browser panel, click the + button
- Under Signals, select New AudioWaveformSignal
- Double-click the newly added AudioWaveformSignal from the browser panel
- On the property editor, set the Source property to Audio Stream. This means we want to sample a specific Audio Stream for our signal
- From the browser panel, click the "all [no filter]" item from the center list.
- Drag and drop the InputAudioStream onto the Audio Stream property on the property editor panel
The AudioWaveformSignal will now sample its data from the input.
- Drag and drop the AudioWaveformSignal from the browser panel into the space to create a SignalVisualizer
- Press play
- Make some noise near your mic to see the signal on the visualizer
This is one way to visualize the input signal. A more useful way is to create an AudioPeakSignal (repeating the steps above) and apply it to properties of objects in the space.
Hearing The Audio Input
Next off, let's create a sound source in the space that will let us hear the audio. Note that it's probably best that you use headphones else feedback (i.e. mic recording own sound coming out speakers) might occur.
- Drag and drop the InputAudioStream from the browser into the space
A Sound node is created that will play the input audio at its position in space. Now, let's adjust some of its properties in play time to hear what happens.
- Click the play button
- Double-click the InputAudioStream Sound node in the space to display its properties
- Expand the Reverb group and set Enabled to true
- Next, carefully increase the Volume Gain property until you can hear the audio (if it's not already audible).
We've created a little echo chamber for our voice.