That is a functionality your host provides. It is not available for plugins.
You route a track to a physical output into your outboard, and route it back to record into a new track.
Even if your audio driver allows multiple programs accessing the device (which you shouldn’t take for granted), the two programs have no guaranteed way of running synchronous…
so something will run, but the results are unpredictable…
If you plan to base a product around that, hire enough support people…
It’s not my intention to work perfectly, it’s to run some hardware analysis, but I guess it will be better to do it from the host, but I have no idea how to do it
This host I have programmed without knowledge of how to make a host, so it may be very badly programmed, but it works perfect to analyze my plugins.
In the host audio loop:
void MainContentComponent::getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill)
{
bufferToFill.clearActiveBufferRegion();
// Clear the buffers
for (int i = 0; i < filterManagers.size(); ++i)
{
filterManagers[i]->setAudioBufferSamples (4, bufferToFill.buffer->getNumSamples());
filterManagers[i]->getAudioBuffer()->clear();
}
if (analizer != nullptr)
analizer->preProcess(); // send analizer test signal to the buffer
// plugins
for (int i=0; i < filterManagers.size(); i++)
{
filterManagers[i]->processBlock();
}
if (analizer != nullptr)
analizer->process(); // fill processed buffers to display analysis
}
showing you this code you will realize why I was asking to do this from a plugin.
If you just want to analyze external hardware, doing your own audio app is going to be the easier way to go. Trying to do it from a plugin inside a 3rd party host by accessing the audio hardware directly isn’t going to work reliably.
However, if the host has suitable routing options of its own, you might be able to utilize those facilities. For example, you could develop separate plugins to do the analysis signal generation and analysis steps. For example : have the signal generator on one track, and make that track’s output go into the audio hardware. Then have another audio track with the analyzer plugin that receives the processed audio from the hardware. This however can get quite complicated if the signal generator and analysis plugins need to share data. Making your own stand alone application would at first thought seem to be the simpler solution.
If the host audio interface is different than the audio interface you want to connect to from inside the plugin, it will be a non-trivial task to resample the audio correspondingly in the plugin (since you’re dealing with multiple clocks).
I’m trying do do something similar to what’s described here. It’s for a personal project, not to be released. It’s for Windows, and I need to get input from the plugin (the host uses ASIO drivers) and route the audio to the WDM device. Since both the ASIO driver and the WDM driver run on the same interface, there should be no clock sync issues.
How can I open the system default audio device directly from within the plugin?
There is no guarantee that the host processes in the sample rate the device is running on.
I don’t know every threading model of the DAW and ASIO, but many DAWs run multiple threads for it’s DSP tasks that are mixed later. So there is no correlation to the clock.
Technically you can have an AudioDeviceManager in the plugin and open the device. But expect dragons…
I could store the incoming audio (from the host) in a large buffer that slowly feeds the WDM outputs. I can have extra latency.
This plugin I’m making samples the audio coming from the host and I want to add a monitoring feature that can bridge the audio to the WDM output, so I can hear it remotely via AnyDesk.
I am receiving audio from the host (ASIO, 44100, 256 buffers) and routing it to a WDM output on the same interface (but buffer size is 441) from within a plugin (only testing with the standalone, at the moment) and it’s working flawlessly.
I could post some code in case someone is interested…
I am looking to do what is described in this thread, that is to output audio from a VST plug-in (within Cakewalk DAW) to ASIO (my audio interface). I want the facility to be able to generate pre-FX outputs from Cakewalk tracks. Cakewalk does not provide this. Did anyone within this thread succeed in making a VST app which can do this?
Thanks!