Virtual Loopback Audio Driver for PC DSP

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi phofman

That isn't quite what I meant. As I understand it, this thread exists because people need to route audio from any source (SPDIF, CD, Windows media player, Spotify, Youtube) via DSP-based processing and finally out to their speakers, and it isn't immediately obvious that this is possible without resorting to two sound cards linked by SPDIF (jitter, re-sampling), or 'virtual audio cables' (re-sampling).

From my limited experience it is possible to do exactly what they need using only a single sound card and nothing else, although it isn't possible with all sound cards. I'd like to know which cards make it possible, and which don't.

The problem, as far as I can tell, is merely that the default routing of most sound cards is to connect any incoming stream internally to the analogue outputs. The Creative Audigy, for example, seems to do this unavoidably when you're using the Creative drivers. However, the open source Kx Project drivers allow you to turn off this internal routing. Unfortunately the Audigy always re-samples internally to 48kHz, reputedly not particularly well - although it sounds OK.

The more up-market Creative X-Fi can work at a variety of sample rates in 'bit perfect' mode, and its re-sampling (should that be necessary) is supposedly very, very good anyway. The card's standard drivers allow you to connect any input to any output with a sort of matrix arrangement. You can also turn off any internal routing - which is what you need for DSP processing.

Once you have turned off the sound card's internal routing, the setup for bit-perfect grief-free active crossover (in Windows at least) is as follows:

Set the Control Panel->Sounds and Audio Devices->Audio->Sound playback->Default Device to be the sound card in question. From now on, any standard media player will route its audio to the sound card's 'Wave' input, and you can also take in SPDIF or analogue line in if you want.

Set your DSP application's source to be the same sound card's input, and select whichever input you want ('Wave', SPDIF etc.) if you have the choice, or the simply the sound card's mixer as the source.

Set your DSP application's destination(s) to be the sound card's analogue outputs (or SPDIF).

You can now process any input that the sound card is capable of handling, and send your processed audio to the same sound card's outputs, locked to the same sample rate.

I must admit, this is one of situations where I'm slightly baffled as to why anyone would consider any other arrangement than this 'perfect' one, but I am also aware of the fact that some cards won't let you do it without wasting at least two of the outputs due to internal routing.

So which cards will let you do this?

This post is so helpful! :eek:
I've been trying to do this for the longest time with various methods, first Virtual Audio Cable, then the "what u hear" input of the sound card, (the above two inputs then going through VSTHost) then WASAPI loopback on JRMC. All methods eventually introduce a delay in the output :confused:

So let me get this straight, the Creative X-Fi's DEFAULT sound drivers allow you to "disable internal routing" which means to let any sound input (e.g. speaker out l/r) to itself act as a output to a VSTHost? And this wouldn't introduce any delay except for the buffer size of VSTHost itself?

I don't even know whether the above makes any sense--put it this way: a "line" in Virtual Audio Cable can be used as an output device for system audio, at the same time the same line can act as a recording device (an "input" for VSTHost)... aggg... the same "line" appears in both the playback and recording tabs of windows 7's Sound control panel. Can the X-Fi's sound outputs appear both in the playback and recording tabs in the same manner? :confused::confused::confused:
 
Thanks! My motherboard turns out to have both SPDIF in and out as pin headers like this
http://img75.imageshack.us/img75/9061/spdifko6.png
I just got two jumper shorters and connected the SPDIF out to the SPDIF in and got myself a solid loopback connection.

I think I've found the definitive solution for now. (I've been saying that every time I found a new solution for like 5 or 6 times, hope that the 7th time is the charm! lol)

I could shell out for an X-Fi but I think I'm happy with my $1 purchase so far ;) (2 jumper shorter tabs)
 
Glad I found this thread! I produce electronic music in my spare time and have been scratching my head trying to figure out how I could route my internal I/O more practically.

Curious to know (and forgive me because I'm only 19 and new to audio), but is there a way to measure delay (in samples) that enters the system through any of the methods mentioned above?

I'm also trying to figure out how to sample-lock a sound card/audio interface to a DAW like Reaper (I use Ableton Live), though if this is a RTFM sort of thing a link would be great as well.
 
I didn't know X-Fi could do routing like that. Now I have to try some rePhase FIR filters.

I would disagree on resampling being good though. I noticed this when measuring with HOLM at 44100Hz. LF part of the sweep would cause HF garbage and modulated noise following the sweep. Signal level was probably around -30dB or so meaning no saturation.
Running the sweep at 48k eliminated the noise. 96k I think was clean but can't remember.
I could not find any one commenting on the resampling i real world, only sales talk boasting how great it was. Didn't find any one noticing this problem so it could have been a fluke. Still, any one that would notice would probably not be using it in the first place. I would not if I didn't get it for free.

Not sure if the artifacts is worth worrying about in the real world though, I stuck a resample plugin into foobar to be sure. Not often I listen to sine sweeps.
 
Finally got something to work.
I was unable to get loop back to work without sacrifice two channels as unpatching the wave input for L/R also removed the signal to vsthost.
So I patched L/R to go to sR/sL and tapped that with vsthost. Then I sent the signal though ASIO back to the sound card with the two side speakers.
Then finally patched the side speakers into L/R output.
I had to set the card into 4.0 mode as otherwise L/R was patched into all other channels.
Oh, and you definitely can get feedback as output can be routed to input, that is what will happen if you try to use other channels in 2.0 mode.

I did manage to get convolverVST to work and with a 1024 tap filter mostly corrected phase shift due to active crossover.
Lip sync was a problem however as host latency was a bit too big + fir filter itself.
Not sure how much but it got distracting. 20-30ms maybe.
1024 sample buffer, 5ms ASIO latency and 15ms or so to the main impulse of the IR.

I could not tell if the corrected phase was an improvement or not in this quick setup. Still, the setup is for HT and gaming so it might not be too big of a deal.
 
If using JRiver Version 18, the built-in 64-bit Convolution engine host's FIR filters and adapts target latency.

11. NEW: Loopback mode adapts the target latency automatically so that it works with effects that create delays like resampling, convolution, Dolby Digital output, etc.
12. Changed: ASIO and WASAPI - Event Style automatically adjust their buffer sizes to a small value when doing live playback to minimize latency.
1. NEW: Live playback (ASIO line-in and WASAPI loopback) are available with File > Open Live...
2. [NEW: Created a new latency management algorithm for live playback that better copes with DSPs that work in large blocks like convolution.

Also note that JRiver has both loopback mode and ASIO digital line in mode so you can loopback or route whatever audio source through JRiver's audio engine (and hence Convolution or any other VST plugin) and have the target latency adapted.

Works great for me with REW and Audiolense swept sine waves where I can toggle Convolution off/on in JRiver and measure the Audiolense generated FIR filters. Here is a diagram: WASAPI Loopback (experimental feature)

Also works great if routing music from a DAW or other digital audio source.

Hope that helps.

Cheers, Mitch
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.