Monitoring WaveInDevice audio via an Audio Track w/effects

Hey there

I’m extremely new to TE, so apologies up front!

I understand that we can getWaveInDevice, enable endToEnd and live monitor what is coming in. That works nicely.

I can also very easily record the input to this track, and play it back after the fact using edit.getTransport().record/play etc.

What I can’t seem to find is how to monitor the audio input through the audiotrack, with whatever audio processing plugins etc. are associated with it.

I don’t yet understand the underlying concepts behind doing this with TE, and have been trying some truly random stuff trying to get it to work.

engine.getDeviceManager().initialise(1, 2);
auto track = te::getAudioTracks(*edit)[0];
track->getWaveInputDevice().initialise();
te::WaveInputDevice& inputDevice = track->getWaveInputDevice();
inputDevice.setEnabled(true);

Can anyone please point me in the right direction?

Many thanks in advance!

You just need to add a plugin to the track you’ve assigned the input to.

I think you may be a bit confused though, AudioTrack:: getWaveInputDevice is for assigning the output of one track to the input of another.

If you want your audio interface’s inputs you’ll need to get the InputDeviceInstance from the EditPlaybackContext and use setTargetTrack to assign it to a track. This is covered in the RecordingDemo example.

Then to add effects you get the Track’s pluginList and add plugins to it. This is in several examples but probably most easily found in the PluginDemo.

Thanks for the quick reply @dave96

Lol, the reason I couldn’t find how to do it, is because I’d already done it…

I thought that endToEnd was piping the device input directly to the output, a bit like “Direct Monitoring” on a hardware interface, ie. bypassing internal audio processing Now that I think about it, that would have to have been a hardware device manipulation, not an internal software routing thing :man_facepalming:

I think you may be a bit confused though, AudioTrack:: getWaveInputDevice is for assigning the output of one track to the input of another.

Yeah that was just me trying random stuff not understanding that what I wanted I already had.

So anyway I managed to add a phaser effect to the track with endToEnd enabled, and lo and behold it worked perfectly.

Thanks very much. Sorry for the confusion on my part!