# Test signal over S/PDIF



## vtmountains (Apr 23, 2013)

I am new to using REW and could use some how-to advice. I am running REW on windows 7 64bit, routing digital audio via S/PDIF to my yamaha HTR-5840 6.1 receiver. How do i selectively send the REW test signal to each of the speakers for individual response measurement?

So far I have successfully used REW to measure theil-small parameters for a subwoofer driver, and to measure response for my front main speakers and sub. I am thoroughly impressed with REW. My last foray into audio measurements was in the early 90's when I had to create my own characterization solutions and analyze the data in matlab. It is amazing for me to now use REW, so much less work! Thank you!

As additional background, since this receiver pre-dates hdmi, I am using it as an amp only. I modified the receiver for pre-in and pre-outs to connect in Behringer DSP 8000 equalizers, prior to the variable gain stage in the receiver to maximize signal levels through the equalizers for reduced noise. Currently I am equalizing the front center and sub with one EQ, and the front mains with a second EQ. This gives me 31 graphic EQ channels plus three parametric EQs per speaker. The built in pink noise source and Auto-EQ function on the Behringer DSP 8000 works, but I want to have the ability to use REW for phase response and higher precision measurements as I adjust the room acoustics, and EQ settings. 

Thanks for your help. Ezra


----------



## JohnM (Apr 11, 2006)

vtmountains said:


> I am new to using REW and could use some how-to advice. I am running REW on windows 7 64bit, routing digital audio via S/PDIF to my yamaha HTR-5840 6.1 receiver. How do i selectively send the REW test signal to each of the speakers for individual response measurement?


Unfortunately you can't, the JavaSound interface doesn't provide a means for REW to send signals to channels other than the main stereo pair. Some soundcard drivers make various pairs accessible independently as separately listed outputs, as do some laptops or PC's with HDMI outputs, though sometimes ASIO drivers need to be used to expose the channels. ASIO4All can provide an ASIO interface to existing audio interfaces that do not have ASIO drivers.


----------



## vtmountains (Apr 23, 2013)

Thank you John for the info. Have have you tried a utility called AC3filter? It seems to have the ability to route audio to a one or a combination of channels, and if it can be made to work with REW, seems a solution with an adequate level of control . I will give it a try sometime in the next couple of days. Thanks
Ezra


----------



## bgarcia17 (Jan 8, 2007)

Please report back on your results, as this is a feature I'd like to use as well.


----------



## EarlK (Jan 1, 2010)

*Dolby AC-3* 
 *S/PDIF* 



WIKIPEDIA said:


> <<<<<snip>>>>>
> S/PDIF can carry *two channels of uncompressed lossless PCM audio* or compressed 5.1/7.1 surround sound such as Dolby Digital Plus or DTS-HD High Resolution Audio. But, it does not have the capacity to carry the uncompressed data in the lossless formats of Dolby TrueHD and DTS-HD Master Audio – as HDMI does.
> 
> <<<<<SNIP>>>>>


- The outstanding question here ( is not about sourcing the soft-ware plumbing needed to make this work, but rather ) is what happens to REW's PCM test signal after it has been compressed & then decompressed ? ( ie; "lossy" encoding & reconstruction along with some additional coding delay ). 
- ie; Is the REW test signal still viable ? :huh: I think that only JohnM can answer that .

One will find ( if one cares to research the topic ) that  *AC3Filter * is designed as a component plugin for  *DirectShow*  based applications .

As such, the filter is not a stand alone app that allows the sending of REW's audio signals into it for encoding & routing . 
- To access ac3filter , it needs to be called up from within a "DirectShow savvy application ( such as most media-players used on a PC ) . 

A stand alone app that allows one to load "DirectShow" filters into it ( for manipulation & study ), can be used .

 *GraphStudio*  is one such app ( that can host "DirectShow" filters for user access ) .










To get audio into Graphstudio ( from REW ) one will need to have a virtual sound-card loaded on their PC ( something like ) *Virtual Audio Cable*  will fit the bill .

*Some Search Strings ( for those with some interest in solving the puzzle ) :*

*ac3 virtual sound device*
 *ac3filter forum question* 
 *ac3forum* 
*spdif routing app*
*spdif router*


:sn:


----------



## vtmountains (Apr 23, 2013)

EarlK said:


> Dolby AC-3
> S/PDIF
> 
> - The outstanding question here ( is not about sourcing the soft-ware plumbing needed to make this work, but rather ) is what happens to REW's PCM test signal after it has been compressed & then decompressed ? ( ie; "lossy" encoding & reconstruction along with some additional coding delay ).
> ...


Earl,
Thank you for the helpful info! I was unable to obtain any re-routing of the channels using AC3Filter, your explanation details why! Once I get some time to try out the software audio chain that you proposed, it should be rather straightforward for me to route the pre-amp analog output from my receiver back to the analog input to the Behringer 302USB for a measurement of total distortion in this signal chain. I could do this with and without the re-routing software chain for an indirect measure of the distortion being added. I can't wait to try this out, thanks again!
Ezra


----------



## vtmountains (Apr 23, 2013)

I was able to use the tool chain that Earl suggested to re-route the audio from REW to any one of 5.1 channels. 

The setup I am using consists of:
- Desktop PC running Windows 7 64bit, SPDIF output
- Yamaha HTR-5840, SPDIF in, modified by me for pre-amp outputs and inputs

The software tools that I installed: 
ASIO4ALL
Virtual Audio Cable (trial for now)
Graphstudio
AC3Filter

The info at this link was really helpful in configuring these tools to work: http://www.reaper-x.com/2011/04/25/how-to-realtime-ac3-or-dolby-digital-encoding-for-games/

Below ~10KHz all is well. The signal is re-routed and there are no marked differences with (green trace) and without (dark yellow trace), at least from a swept sine wave signal amplitude perspective. Note these sweeps are from the pre-amp output on the received, fed into a Behringer 302USB for analog capture into REW. 

I am however having a problem above 10KHz, something goes awry in this digital audio tool chain and the signal becomes noisy and erratic. I have not had time to investigate, this graph depicts the problem. 
 

Once I workout what is causing this issue, I can post some screen shots of the various tool settings if folks are interested. 

Thanks, Ezra


----------



## AudiocRaver (Jun 6, 2012)

Have you looked at Virtual Audio Cable? Reading through the documentation, it looks like it will allow you to do exactly what you are talking about, go from stereo to 5,1 and control channel levels. Not free and not simple, but powerful and flexible. I have heard good things about it.

Edit: Oops, fell asleep in the middle of posting, apparently you already found it. Also missed its mention in the earlier post.

Another possibility is Reaper. You can go ANY CONFIG to ANY CONFIG with ANY CONTROL OR PROCESSING in between. Not free, but a handy tool it you do much experimenting of this type. Here are some details about setup and config in this thread if you think of trying it out - no limitations in the unlicensed version like VAC. I would buy it over VAC for versatility, but VAC will be lower overhead.


----------



## EarlK (Jan 1, 2010)

> Have you looked at Virtual Audio Cable? Reading through the documentation, it looks like it will allow you to do exactly what you are talking about, go from stereo to 5,1 and control channel levels. Not free and not simple, but powerful and flexible. I have heard good things about it.
> <<<<<SNIP>>>>>


 VAC does upmix to whatever channel count one wants but ( as far as I know ) it won't encode signals into AC3 ( while AC3Filter will ) . 

- The problem with S/PDIF is it's limited through-put capacity . 
- It's an ancient/archaic ( hardware ) format that's been superseded by HDMI . 
- HDMI will through-put 7.1 uncompressed PCM streams while SPDIF is limited to 2 channels when uncompressed / hence the need for AC3 compression ( for more channels ) .
- ( Wondering out-loud now ), if one is only outputting to a single AVR channel at a time ( for test purposes ) I wonder if that single stream still needs to be AC3 ?

:sn:


----------



## EarlK (Jan 1, 2010)

> <<<<SNIP>>>>
> 
> Once I workout what is causing this issue, I can post some screen shots of the various tool settings if folks are interested.












Nice to see you making some headway here, Ezra .

:sn:


----------



## vtmountains (Apr 23, 2013)

Thanks for the encouragement!

By decreasing the "virtual audio cable" interrupt period from 7ms to 1ms, the issue with signal corruption above ~10KHz has been remedied.

Here is the new response vs. frequency, loopback from the receiver pre-amp output. Since the receiver is 50' from the desktop computer, in this feedback loop I also have 50' of cheap RCA cable. . . I have a long USB cable with repeater, so I will try this again sometime with the Behringer 302USB located next to the receiver to remove this RCA cable from the loop.

 

Here are the settings:
      

More to follow at a later date once I get to making measurements of the speakers.


----------



## AudiocRaver (Jun 6, 2012)

HDMI on a PC is something I have never played with. What software do you need in a PC to get an audio stream running on the HDMI port? Is it available as a Playback Device in the Sound control panel? Are there special utilities or applications needed? Just wondering.


----------



## EarlK (Jan 1, 2010)

AudiocRaver said:


> HDMI on a PC is something I have never played with. What software do you need in a PC to get an audio stream running on the HDMI port? Is it available as a Playback Device in the Sound control panel? Are there special utilities or applications needed? Just wondering.


Hi ,

The irony of me replying ( being a 2-chnl guy ) is that I don't currently own any *HDMI* enabled computers ( at the moment ) .

Study the link I provided and one can glean that this is a protocol driven by the visuals industry ( with multi-channel audio being along for the ride in a supporting role ) . 

Happily , that translates into ( mostly ) uncompressed surround-sound .

HDMI has been around for about a decade and will eventually get retired ( I figure ) by something like  *Thunderbolt.* 

The reason that I bring this up is to demonstrate that these new standards ( driven by higher & higher through-put capacity for un-compressed video playback ) is now a single combined video/audio protocol ( as opposed to SPDIF which was from the audio industry ) . 

Once one understands that history, it's easier to *"grok"* that access to the audio channels could be through the "graphics card" ( software ) that comes installed on the computer . 
- The audio driver may still be a separate entity, but those in control of supplying that driver are the graphics card developers ( generally ) .

:sn:


----------

