Help - Search - Members - Calendar
Full Version: foo_dsp_fsurround
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2
pro_optimizer
FreeSurround
is meant to be the foobar2000 equivalent of your hi-fi receiver's Dolby ProLogic II button*.
Its purpose is to decode surround information from your stereo music (including mp3, of course), and to produce 5.1 output from it. It works with any stereo music containing surround info in a coding scheme compatible with any the following decoders:
- Dolby Surround
- Dolby ProLogic
- Dolby ProLogic II
- SRS CircleSurround
- SRS CircleSurround II
- DTS Neo:6
- Lexicon Logic7
- Stereo Quadrophonic (SQ) **
- Quadrophonic Stereo (QS) ***

It will also faithfully play back your 'plain old' stereo music, with the exception that echoes are usually played over the surround speakers, and some sound sources, usually strongly distorted guitars, choirs etc., tend to surround the listener instead of being played over the front speakers alone.

Download
The FreeSurround download consists of two files: the decoder, which must be placed in the components subdirectory of your foobar2000 path, and the FFTW library, which must be placed directly in your foobar2000 path. FS is open source, and its code can be downloaded from here.

Music
As of 2008-09-10, I am now hosting a rating board of surround music, which can be edited by anyone. I am adding albums to it as I listen to them on my home system, and so should you, when you find something cool, to make this grow quickly. View board. Add an album. Don't hesitate to tell me what you think.

Operation notes
In contrast to the other foobar2000 surround processors (Channel Mixer, Matrix Mixer and ATSurround Processor, as of Aug. 2008), FreeSurround provides independently steered surround channels, and very low crosstalk between channels. If your want to check the state of your surround decoders, you can download a test mp3 file. It will play a voice on your left front, left rear, right rear, right front and center speaker (one speaker at a time) -- if your decoder is good; otherwise there will be some mishmash on the other channels. Also, FS, being a surround decoder, should not be confused with DSP effects which merely give you an enriched stereo experience, such as Creative CMSS 3D and foobar's Convert Stereo to 4 Channels, or common DSPs like Stadium, Hall etc. If you want more demo stuff, here is a piece from a home theater setup disc, and a music snippet from JMJ's Oxygene.

Configuration notes
The default settings are optimal for many surround setups, but consider:
  • If you have a good center speaker in your system, or your are using DSPs like Dolby Headphone, CMSS 3D Headphone, SRS Headphone etc., you should set the center image slider to somewhere between 0.7 and 1.0, which will enable the center channel.
  • If you feel that your sound field is too narrow horizontally (e.g. due to unfortunate speaker placement), you can use higher values for front/rear stereo separation; conversely, if the sound field feels uncomfortably wide horizontally, use smaller values (e.g. 0.7).
  • If you are generally a fan of more surround/'behind' action, especially with plain stereo music, you can set the dimension slider to slightly positive values, e.g. 0.5. This will shift the sound field backwards. Conversely, negative values can enforce a more frontal sound, though there is hardly a reason to do this. Also, consider using effect DSPs like ChannelMixer or CMSS 3D which can give you more control in this case.
  • If you have to use a subwoofer, you must either enable bass redirection in your soundcard, or put the Channel Mixer plugin behind FreeSurround in the DSP chain, and tell it to do a bass redirection for you (you can find the details in this post).
  • For most people there should be no reason to touch the expert settings, as they are configured for the best listening experience; they were added for people who use FS to test and analyze their encoders, decoders, etc.
  • Here is the setup for my home surround system, and for Dolby Headphone, still unchanged after about a year:
    IPB Image
Change log
0.3.5
- now much faster when switching tracks

0.3.4
- new front and rear stereo separation controls
- 4 phase shifting modes are supported now
- new linear steering mode (better than the old one)
- fixed the dimension slider (negative values were mapped to 0)
- the gain is back at 100% due to request (you can still put the equalizer before FS to control the gain)

0.3.3
- added the option to invert the rear phase (like pl2 movie mode)
- added the option to specify the (surround) mixing coefficients which are assumed for decoding

pre-0.3.3
- changed "center width" into "center image", which controls how present the center speaker is (0.3-0.7 are good values for music).
- expanded the range of "dimension" to [-0.5 .. 1.0] where 0 is a normal surround soundfield, -0.5 moves the sound towards the front, 1.0 moves it backwards.
- changed the gain to ~85% to avoid clipping in practically all cases.
- fixed center/surround level (both were too loud it appears).


* except that it uses a very different algorithm, and that it is totally free
** SQ is decoded with mono surrounds (i.e. like ProLogic I), due to a defective coding specification
*** QS requires the front stereo separation to be set to 1.5, or else the sound field will be too narrow
pyr0rrzzz
What does it exactly do? I mean, I've got 5.1-headphones and for example I can hear my subwoofer when listening to stereo-files without any plugin :?
And does it improve the sound of 5.1-encoded files aswell?
(sorry I'm a newbie biggrin.gif)
Eclipsed Moon
I was actually thinking a few hours ago that I'd like some more surround processors, despite not having a surround system. As such, there's not much I can say about this, although I notice that it seems to be quadraphonic for now?

Immediately I notice that when switching tracks, it proceeds to play the next snippet of what it was on (I suppose this qualifies as one of those buffer glitches).
Rozzo
Hi,

does this plugin offers any definite improvement in confront of my favourite 5.1 foobar plugin, i.e, Foo_channelmixer from Skypirich? For me, channelmixer is the best 5.1 plugin around, even better that dolby systems, Creative Labs Neo and Cmss and even better than SSR labs AudioSandbox, so you'll have a difficult time trying to get anything better than Channelmixer

Ys,
rozzo



pro_optimizer
QUOTE(pyr0rrzzz @ Jan 28 2007, 11:29) *

What does it exactly do? I mean, I've got 5.1-headphones and for example I can hear my subwoofer when listening to stereo-files without any plugin :?
And does it improve the sound of 5.1-encoded files aswell?
(sorry I'm a newbie biggrin.gif)


It takes stereo music and decodes it according to the Dolby Surround scheme, which results in 6 channels output, although I do not redirect bass to the subwoofer (which you can do by chaining foo_channel_mixer afterwards IIRC).
This means that plain Stereo Music which was not encoded this way sounds very similar to normal Stereo, except that echoes or very distorted sounds usually come over the surround speakers, too. Encoded music sounds much better, of course. Theoretically, sound sources can be placed freely in the soundfield as long as they do not interfere with other sources in the same frequency range. Unfortunately, there is close to zero info about what music "works" on a 5.1 system, so you need to find that out yourself.
Recently I stumbled across albums from Lamb (e.g. What Sound/Between Darkness And Wonder), Blank & Jones (Monument), Cog (any), Tool (10.000 Days), Wumpscut (Music For a Slaughtering Tribe), RMB (Widescreen/Mussion Horizon) which are quite "surroundish".
It doesn't affect 6-channel sound (e.g. DTS/AC3 music).


QUOTE(Eclipsed Moon @ Jan 28 2007, 13:12) *

I was actually thinking a few hours ago that I'd like some more surround processors, despite not having a surround system. As such, there's not much I can say about this, although I notice that it seems to be quadraphonic for now?

Immediately I notice that when switching tracks, it proceeds to play the next snippet of what it was on (I suppose this qualifies as one of those buffer glitches).


Yeah, you're right. I have yet to find the buffer which I forget to clear in this situation :/
pro_optimizer
Fixed a major problem with the overlapped filtering which caused relatively high-frequency crackling.
So please redownload it.
pro_optimizer
Here is a short sound sample from Mike Oldfield's Tubular Bells.
I would use the latest plugin version for testing this because it can steer more sources simultaneously (~1000). Tell me if your jaws hit the ground (just joking ;-)

Note: The sample is from the DTS version of that album, converted to stereo with the ATSurround-Encode2 plugin.

Edit: Sorry, didn't see your post, rozzo!
QUOTE(Rozzo @ Jan 28 2007, 17:58) *

Hi,

does this plugin offers any definite improvement in confront of my favourite 5.1 foobar plugin, i.e, Foo_channelmixer from Skypirich? For me, channelmixer is the best 5.1 plugin around, even better that dolby systems, Creative Labs Neo and Cmss and even better than SSR labs AudioSandbox, so you'll have a difficult time trying to get anything better than Channelmixer

Ys,
rozzo


Well, the most definite improvement is that its output channels are fully independent which means that they *can* play completely different things (if the recording engineer wants them to).
There is a stereo test file which plays a voice on each of the 5 channels, one channel at a time.
When you play this with foo_channel_mixer, you hear the voice always on every channel (only at slightly different volume), even if you turn "front in rear" and "rear in front" down to zero.
OTOH, if you have "vanilla stereo" music, you may want to mirror the front sounds in the rears (like e.g. CMSS does) and there foo_channel_mixer gives you more control.
It would be cool if Skypirich allowed this kind of blending for 6 channel inputs, too, because then you could chain his plugin after mine (and I, Andrew Tan, Chungalin or the author of foo_dts don't have to implement all those controls).
Actually, we really need a plugin where one can control the volume of each channel separately.
Rozzo
Thanks Prooptimizer.

I've been trying your plugin with my megahifi 5.1 equipment, five big towers + a full rank Subwoofer.

In confront with channelmixer, Mike Olfield's sample offers a real difference: sound seems to move around oneself from one speaker to another in a definitively deeper conception of stereo. On the counterpart, I was forced to give some more decibeles to my amplifier to get a clear sound; at the same level fee-surround was not giving a bright sound. I'm getting good results now by applying the Vlevel plugin after your mixer, many things previously muddy or unaudible came to surface.

I keep enjoying this new way of surround, thanks,

Ys,
Rozzo
GeSomeone
QUOTE(pro_optimizer @ Jan 28 2007, 20:28) *

.. decodes it .. which results in 6 channels output, although I do not redirect bass ..

Here the center channel stays silent. For music this is not so bad, but I got the impression, from the posts here, that it should have some signal too. The plugin works nicely but, as you said, it depends on the (stereo) source.
pro_optimizer
QUOTE(GeSomeone @ Feb 2 2007, 14:16) *

Here the center channel stays silent. For music this is not so bad, but I got the impression, from the posts here, that it should have some signal too. The plugin works nicely but, as you said, it depends on the (stereo) source.


Your're right, the center signal is equally distributed to front left/right. You'll be able to control this with "center width", once I add a GUI configuration. For now, it should be ok (since, as you said, no center not a big loss for music anyway).
pro_optimizer
OK, added the GUI controls for center width and dimension (shifts soundfield backwards) now.
Hope you like it.

DSP chains which contain the non-config version of this plugin have to be rebuilt.
GeSomeone
QUOTE(pro_optimizer @ Feb 3 2007, 02:38) *

OK, added the GUI controls

Thanks, I like to have some control tongue.gif
This makes it much more useful.
Googer
This plugin seems to work great to me except for one problem, which is it seems to be assuming that input is at 44.1 KHz - other sample rates are played back either too quickly or too slowly, so something that's 48 KHz, for example, is played back too slowly by about 10% (and yes the pitch is affected as well). I haven't checked into bit-depth just yet, just 16-bit mono and stereo at different sample rates... tongue.gif
pro_optimizer
QUOTE(Googer @ Feb 5 2007, 21:52) *

This plugin seems to work great to me except for one problem, which is it seems to be assuming that input is at 44.1 KHz - other sample rates are played back either too quickly or too slowly, so something that's 48 KHz, for example, is played back too slowly by about 10% (and yes the pitch is affected as well). I haven't checked into bit-depth just yet, just 16-bit mono and stereo at different sample rates... tongue.gif


Oops, what a stupid mistake (forgot to set the correct output sample rate).
It's fixed now. smile.gif
Btw: It works with 32bit floating point precision internally, so bitrates should be no problem.
Googer
Thanks for the quick fix, though I have another bug to report - with a 22 KHz mono mp3 (the htguys.com podcast to be specific), foobar2000 crashes in foo_dsp_fsurround upon seeking. Interestingly I configured foo_gep to output at 22 KHz as a test and tried some nsf files (so its output should also have been 22 KHz mono) and had no problems with seeks...

And here's the contents of failure.txt (and yes this is with fsurround as the only active DSP to try to cut down on potential failure points wink.gif):
CODE
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 0149480Ah
Access violation, operation: read, address: 00000000h
Call path:
playback_process entry=>dsp::flush
This is the first crash logged by this instance.
Code bytes (0149480Ah):
014947CAh:  CC CC CC CC CC CC 51 8B 49 18 03 C9 33 D2 B8 00
014947DAh:  20 00 00 F7 F1 85 C0 89 04 24 DB 04 24 7D 06 DC
014947EAh:  05 70 9E 4A 01 59 C3 CC CC CC CC CC CC CC CC CC
014947FAh:  CC CC CC CC CC CC 53 56 8B F1 8B 86 F0 00 00 00
0149480Ah:  8B 18 E8 BF D0 FF FF 8D 5E 20 E8 97 07 00 00 5E
0149481Ah:  5B C3 CC CC CC CC 6A FF 68 0B 72 4A 01 64 A1 00
0149482Ah:  00 00 00 50 83 EC 08 56 A1 54 10 4B 01 33 C4 50
0149483Ah:  8D 44 24 10 64 A3 00 00 00 00 6A 04 E8 1E 2C 00
Stack (02A5F688h):
02A5F668h:  0000040B 00001000 022FD238 773DE50B
02A5F678h:  DCBAABCD 00000000 0012F68C 773DE50B
02A5F688h:  10002DA0 024CE008 0048303D 5E612E0B
02A5F698h:  0248A228 024CE2D8 0046A7AE 00000016
02A5F6A8h:  024CE308 02485FD0 024CE308 02485FD0
02A5F6B8h:  00000000 02A5FEDC 004A7439 00000003
02A5F6C8h:  02A5FEDC 02A5FEE8 00445BDE 024CE308
02A5F6D8h:  00000000 00000000 024CE008 7C839AA8
02A5F6E8h:  7FFDD000 7FFDD000 02A5FB6C 00000000
02A5F6F8h:  00000000 001A0018 7FFDDC00 02080000
02A5F708h:  02A5F928 02080000 02A5F720 00000000
02A5F718h:  00000000 7C800000 00000000 001A0018
02A5F728h:  7FFDDC00 02080000 02A5F950 02080000
02A5F738h:  02A5F748 00000000 00000000 7C800000
02A5F748h:  7C800000 02080000 02A5F760 00000000
02A5F758h:  00000000 7C800000 00000000 00000000
02A5F768h:  00000000 00000000 00000000 00000000
02A5F778h:  00000000 00000000 00000000 00000000
02A5F788h:  00000000 00000000 00000000 00000000
02A5F798h:  00000000 00000000 00000000 00000000
Registers:
EAX: 00000000, EBX: 024CE008, ECX: 014F4218, EDX: 014A9D48
ESI: 014F4218, EDI: 10002DE0, EBP: 02A5F6CC, ESP: 02A5F688
Crash location: "foo_dsp_fsurround", loaded at 01490000h - 014B9000h

Loaded modules:
foobar2000                       loaded at 00400000h - 004F3000h
ntdll                            loaded at 7C900000h - 7C9B0000h
kernel32                         loaded at 7C800000h - 7C8F4000h
COMCTL32                         loaded at 773D0000h - 774D3000h
msvcrt                           loaded at 77C10000h - 77C68000h
ADVAPI32                         loaded at 77DD0000h - 77E6B000h
RPCRT4                           loaded at 77E70000h - 77F01000h
GDI32                            loaded at 77F10000h - 77F57000h
USER32                           loaded at 77D40000h - 77DD0000h
SHLWAPI                          loaded at 77F60000h - 77FD6000h
SHELL32                          loaded at 7C9C0000h - 7D1D5000h
ole32                            loaded at 774E0000h - 7761D000h
shared                           loaded at 10000000h - 10029000h
comdlg32                         loaded at 763B0000h - 763F9000h
IMM32                            loaded at 76390000h - 763AD000h
LPK                              loaded at 629C0000h - 629C9000h
USP10                            loaded at 74D90000h - 74DFB000h
CACheck                          loaded at 003D0000h - 003F0000h
CAHook                           loaded at 009E0000h - 00A08000h
PSAPI                            loaded at 76BF0000h - 76BFB000h
CAServer                         loaded at 00F20000h - 00F46000h
MSVCP71                          loaded at 7C3A0000h - 7C41B000h
MSVCR71                          loaded at 7C340000h - 7C396000h
MSCTF                            loaded at 74720000h - 7476B000h
MsgPlusLoader1                   loaded at 00FD0000h - 00FDE000h
msctfime                         loaded at 755C0000h - 755EE000h
foo_abx                          loaded at 01000000h - 01034000h
foo_ac3                          loaded at 01060000h - 0108C000h
foo_adpcm                        loaded at 010B0000h - 01102000h
foo_albumlist                    loaded at 01130000h - 01177000h
OLEAUT32                         loaded at 77120000h - 771AC000h
foo_audioscrobbler               loaded at 011A0000h - 011D7000h
WS2_32                           loaded at 71AB0000h - 71AC7000h
WS2HELP                          loaded at 71AA0000h - 71AA8000h
foo_cdda                         loaded at 01240000h - 01276000h
foo_common                       loaded at 012A0000h - 012DA000h
foo_converter                    loaded at 01300000h - 01369000h
foo_dbsearch                     loaded at 01390000h - 01405000h
foo_dsp_continuator              loaded at 01430000h - 01462000h
foo_dsp_fsurround                loaded at 01490000h - 014B9000h
libfftw3f-3                      loaded at 63740000h - 6380B000h
foo_dsp_skip_silence             loaded at 01500000h - 0150A000h
MSVCR80                          loaded at 78130000h - 781CB000h
foo_dsp_std                      loaded at 01530000h - 01571000h
foo_dts                          loaded at 015A0000h - 015D7000h
foo_dumb                         loaded at 015F0000h - 01679000h
foo_freedb2                      loaded at 016A0000h - 016E0000h
foo_game                         loaded at 6C810000h - 6C843000h
MSVCP80                          loaded at 7C420000h - 7C4A7000h
foo_gep                          loaded at 01710000h - 017AB000h
MSIMG32                          loaded at 76380000h - 76385000h
foo_input_awma                   loaded at 017D0000h - 017E9000h
WMVCore                          loaded at 01800000h - 01A5D000h
WMASF                            loaded at 070E0000h - 07119000h
foo_input_monkey                 loaded at 01A60000h - 01AAA000h
foo_input_mslive                 loaded at 01AD0000h - 01AF7000h
foo_input_shorten                loaded at 01B10000h - 01B3E000h
foo_input_std                    loaded at 01B60000h - 01C74000h
foo_lnk                          loaded at 01CA0000h - 01CB9000h
foo_lock                         loaded at 01CE0000h - 01CF8000h
foo_m1                           loaded at 5FC80000h - 5FCB7000h
foo_masstag                      loaded at 01D30000h - 01D80000h
foo_menu_addons                  loaded at 01DA0000h - 01DBF000h
foo_midi                         loaded at 01DD0000h - 01E7A000h
foo_out_ks                       loaded at 01EA0000h - 01ECB000h
SETUPAPI                         loaded at 77920000h - 77A13000h
foo_playlist_manager             loaded at 01EF0000h - 01F36000h
foo_pqview                       loaded at 01F60000h - 01F7C000h
foo_psf                          loaded at 01FA0000h - 02081000h
foo_random                       loaded at 020B0000h - 020EF000h
foo_rgscan                       loaded at 02110000h - 02158000h
foo_sid                          loaded at 02180000h - 02200000h
foo_tradersfriend                loaded at 02220000h - 0225D000h
foo_ui_columns                   loaded at 02280000h - 02317000h
foo_unpack                       loaded at 02340000h - 0236E000h
foo_unpack_jma                   loaded at 02390000h - 023B1000h
foo_unpack_lha                   loaded at 023E0000h - 02400000h
foo_utils                        loaded at 02420000h - 02459000h
uxtheme                          loaded at 5AD70000h - 5ADA8000h
ctagent                          loaded at 02780000h - 02786000h
wtsapi32                         loaded at 76F50000h - 76F58000h
WINSTA                           loaded at 76360000h - 76370000h
NETAPI32                         loaded at 5B860000h - 5B8B4000h
mswsock                          loaded at 71A50000h - 71A8F000h
DNSAPI                           loaded at 76F20000h - 76F47000h
mhook                            loaded at 02810000h - 02816000h
rasadhlp                         loaded at 76FC0000h - 76FC6000h
hnetcfg                          loaded at 662B0000h - 66308000h
wshtcpip                         loaded at 71A90000h - 71A98000h
WINTRUST                         loaded at 76C30000h - 76C5E000h
CRYPT32                          loaded at 77A80000h - 77B14000h
MSASN1                           loaded at 77B20000h - 77B32000h
IMAGEHLP                         loaded at 76C90000h - 76CB8000h
ksuser                           loaded at 73EE0000h - 73EE4000h
appHelp                          loaded at 77B40000h - 77B62000h
CLBCATQ                          loaded at 76FD0000h - 7704F000h
COMRes                           loaded at 77050000h - 77115000h
VERSION                          loaded at 77C00000h - 77C08000h
cscui                            loaded at 77A20000h - 77A74000h
CSCDLL                           loaded at 76600000h - 7661D000h
browseui                         loaded at 75F80000h - 7607D000h
USERENV                          loaded at 769C0000h - 76A73000h
ntshrui                          loaded at 76990000h - 769B5000h
ATL                              loaded at 76B20000h - 76B31000h
shdocvw                          loaded at 77760000h - 778CF000h
CRYPTUI                          loaded at 754D0000h - 75550000h
WININET                          loaded at 771B0000h - 7727E000h
Normaliz                         loaded at 03900000h - 03909000h
iertutil                         loaded at 5DCA0000h - 5DCE5000h
WLDAP32                          loaded at 76F60000h - 76F8C000h
MPR                              loaded at 71B20000h - 71B32000h
drprov                           loaded at 75F60000h - 75F67000h
ntlanman                         loaded at 71C10000h - 71C1E000h
NETUI0                           loaded at 71CD0000h - 71CE7000h
NETUI1                           loaded at 71C90000h - 71CD0000h
NETRAP                           loaded at 71C80000h - 71C87000h
SAMLIB                           loaded at 71BF0000h - 71C03000h
davclnt                          loaded at 75F70000h - 75F79000h
wpdshext                         loaded at 40000000h - 40396000h
WINMM                            loaded at 76B40000h - 76B6D000h
gdiplus                          loaded at 4EC50000h - 4EDF3000h
PortableDeviceApi                loaded at 03950000h - 039A8000h
WINHTTP                          loaded at 4D4F0000h - 4D548000h
Audiodev                         loaded at 09200000h - 09244000h
DBGHELP                          loaded at 59A60000h - 59B01000h

Stack dump analysis:
Address: 10002DA0h, location: "shared", loaded at 10000000h - 10029000h
Symbol: "uCallStackTracker::uCallStackTracker" (+00000000h)
Address: 0048303Dh, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 0046A7AEh, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 004A7439h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 00445BDEh, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 7C839AA8h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "ValidateLocale" (+000002B0h)
Address: 7C800000h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Address: 7C800000h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Address: 7C800000h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Address: 7C800000h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Address: 7C80B62Eh, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "GetModuleFileNameA" (+0000015Fh)
Address: 7C80B643h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "GetModuleFileNameA" (+00000174h)
Address: 7C800000h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Address: 7C906274h, location: "ntdll", loaded at 7C900000h - 7C9B0000h
Symbol: "RtlCaptureContext" (+00002A2Fh)
Address: 7C919BD3h, location: "ntdll", loaded at 7C900000h - 7C9B0000h
Symbol: "LdrGetProcedureAddress" (+0000004Bh)
Address: 004C7008h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 7C919B3Fh, location: "ntdll", loaded at 7C900000h - 7C9B0000h
Symbol: "towlower" (+000003D3h)
Address: 7C97C0D8h, location: "ntdll", loaded at 7C900000h - 7C9B0000h
Address: 7C919AEBh, location: "ntdll", loaded at 7C900000h - 7C9B0000h
Symbol: "towlower" (+0000037Fh)
Address: 02441B04h, location: "foo_utils", loaded at 02420000h - 02459000h
Address: 004C7008h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 0921A9E2h, location: "Audiodev", loaded at 09200000h - 09244000h
Address: 09223426h, location: "Audiodev", loaded at 09200000h - 09244000h
Address: 0921A93Ch, location: "Audiodev", loaded at 09200000h - 09244000h
Address: 004C7008h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 010C1000h, location: "foo_adpcm", loaded at 010B0000h - 01102000h
Address: 40110000h, location: "wpdshext", loaded at 40000000h - 40396000h
Address: 4010A7EDh, location: "wpdshext", loaded at 40000000h - 40396000h
Address: 004C2C28h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 004AF2EDh, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 4010A7EDh, location: "wpdshext", loaded at 40000000h - 40396000h
Address: 004456E5h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 004C2B04h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 10002D87h, location: "shared", loaded at 10000000h - 10029000h
Symbol: "uPrintCrashInfo_SetDumpPath" (+000000A7h)
Address: 004C2B04h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 004AF308h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 00445687h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 004A67D9h, location: "foobar2000", loaded at 00400000h - 004F3000h
Address: 7C80B683h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "GetModuleFileNameA" (+000001B4h)
Address: 7C839AA8h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "ValidateLocale" (+000002B0h)
Address: 7C80B690h, location: "kernel32", loaded at 7C800000h - 7C8F4000h
Symbol: "GetModuleFileNameA" (+000001C1h)
Address: 00445650h, location: "foobar2000", loaded at 00400000h - 004F3000h

Version info:
foobar2000 v0.9.4.2
UNICODE

Additional info:
Randomized playlist entry 1.2.3  (foo_random)
FLAC Decoder 1.1.0  (foo_input_std)
RAR reader 1.1  (foo_unpack)
DUMB module decoder 0.9.8.4  (foo_dumb)
Playlist Manager 1.0  (foo_playlist_manager)
Menu Addons 0.3.7c  (foo_menu_addons)
Album List 3.2.0  (foo_albumlist)
Skip silence 0.1  (foo_dsp_skip_silence)
RAC decoder 1.0  (foo_adpcm)
Masstagger 1.6  (foo_masstag)
Kernel Streaming Output 1.2.1  (foo_out_ks)
Monkey's Audio decoder 2.1  (foo_input_monkey)
ADX decoder 1.6  (foo_adpcm)
GCN DSP decoder 1.3  (foo_adpcm)
Continuator 0.4.0  (foo_dsp_continuator)
CD Audio Decoder 2.1.1  (foo_cdda)
Shorten decoder 0.4.2a  (foo_input_shorten)
Acro WMA decoder 0.1.6.2  (foo_input_awma)
Playlist tools 0.5.6  (foo_utils)
mslive 0.2  (foo_input_mslive)
ReplayGain Scanner 2.0.2  (foo_rgscan)
ABX Comparator 1.3.1  (foo_abx)
freedb Tagger 0.5.2a  (foo_freedb2)
foobar2000 core 0.9.4.2  (Core)
MIDI synthesizer host 1.7  (foo_midi)
kode's ADPCM decoders 1.2  (foo_adpcm)
Columns UI 0.1.3 beta 1v7  (foo_ui_columns)
Audioscrobbler 1.3.5  (foo_audioscrobbler)
Shell link resolver 1.1  (foo_lnk)
Standard Input Array 1.0  (foo_input_std)
Highly Experimental 2.0.5  (foo_psf)
WMA Decoder 1.1  (foo_input_std)
Converter 1.0.1  (foo_converter)
FreeSurround 0.3  (foo_dsp_fsurround)
JMA unpacker 1.0  (foo_unpack_jma)
AC3 decoder 0.8  (foo_ac3)
Common services 0.1  (foo_common)
Database Search 1.4 beta 4  (foo_dbsearch)
sidplay2 1.13  (foo_sid)
Game Audio Decoder 1.08  (foo_game)
XA ADPCM decoder 1.2  (foo_adpcm)
Live show tagger 0.6.1  (foo_tradersfriend)
Pause on Lock 0.4  (foo_lock)
Game Emu Player 1.5  (foo_gep)
DTS decoder 0.1.1  (foo_dts)
OKI-ADPCM decoder 0.14  (foo_adpcm)
BRR decoder and converter 0.7  (foo_adpcm)
LHA unpacker 1.2  (foo_unpack_lha)
Foobar200-M1 bridge DLL 1.0  (foo_m1)
Standard DSP array 1.0  (foo_dsp_std)
Interplay ACM decoder 1.0  (foo_adpcm)
ZIP/GZIP reader 1.0  (foo_unpack)
pro_optimizer
QUOTE(Googer @ Feb 6 2007, 17:43) *

Thanks for the quick fix, though I have another bug to report - with a 22 KHz mono mp3 (the htguys.com podcast to be specific), foobar2000 crashes in foo_dsp_fsurround upon seeking. Interestingly I configured foo_gep to output at 22 KHz as a test and tried some nsf files (so its output should also have been 22 KHz mono) and had no problems with seeks...

<snipp>



Thanks for the detailed info, it's fixed now.
The bug was that the decoder core is not loaded in bypass mode (i.e. non-stereo source), but was flushed upon seeking.
Googer
ˇMuchas gracias! This seems to be rock-solid now; I'll let you know if I have any more problems with it. smile.gif
Chungalin
Very promising, really. It may become my substitute of Channel Mixer as feeder of Dolby Headphone plugin, beacuse this one is more deterministic in the volume domain. I mean, I can disable dynamic compression and set "amplification" to 100% with less chances of getting eventual clippings.

To my taste the Front channels are too "separated", I think the Dimension control should have a "negative" side in order to get the Fronts closer. Is that possible? Also the Center control has little effect on the Center presence.

Not very related to that, but I'm missing some kind of visual control over channel contents. I think that would be a good idea to code some kind of passthrough-DSP with integrated VU-meter visualization that could be able to display EACH channel level independently at the same time. You could insert that plugin in any position of the DSP chain to see what's going on at THAT point (number of channels and what's playing on them). I know the fb2k scene is not visualization-friendly (and I don't want this to change) but there're a few visualizations that DO aid in monitoring multichannel audio, specially if you don't have all those speakers! What do you think about this matter?
pro_optimizer
QUOTE(Chungalin @ Feb 9 2007, 21:24) *

Very promising, really. It may become my substitute of Channel Mixer as feeder of Dolby Headphone plugin, beacuse this one is more deterministic in the volume domain. I mean, I can disable dynamic compression and set "amplification" to 100% with less chances of getting eventual clippings.

Well, I use 100% amplification in DH myself and did not notice any clipping yet.
The reason is that I do not change the volume at all but just redistribute the sound to the different channels.
Edit: Okay, of course clipping can happen even when one doesn't change the total volume (in an extreme case by putting everything from left and right just into left).
I changed the master gain to 0.7 (which is very safe) for now. I think I'll add a slider for this (b/c many people would probably dislike a DSP which reduces the overall volume). And I added a warning mechanism that writes a line into the console whenever the plugin produces data which is above the maximum volume (1.0), so you can check that it doesn't clip.
The absolutely worst case follows from the PL2 encoding matrix: The signal <Lt=0.8165*i, Rt=0.5774*j> (rear left) would be turned into <Lsurr=0.8165+0.5774, Rsurr=0>.
So if someone maximized the volume of the <Lt, Rt> signal, the decoded signal would have the volume level <Lsurr=(0.8165+0.5774)/0.8165, Rsurr=0>. In other words, the worst case gain would have to be 0.5858.
Under the (reasonable) assumption that there is at least one front source in the file which is at least as loud as the loudest rear source, then the worst case gain would have to be 1/(0.5774+0.8165) = 0.7174, so 0.7 is fully sufficient for any non-pathetic music.

QUOTE(Chungalin @ Feb 9 2007, 21:24) *

To my taste the Front channels are too "separated", I think the Dimension control should have a "negative" side in order to get the Fronts closer. Is that possible? Also the Center control has little effect on the Center presence.

Good point, I changed the allowed range of dimension to [-0.5 .. 1.0] (where -0.5 means that nearly everything ends up in the front channels), hope you don't need even more front-ness (this would defeat the original purpose of this plugin a bit).
But if you experience strongly increased stereo separation with FS enabled compared to stereo, then it's very likely that the more separated sources are actually behind you (if this is the case I'd like to know to what material you are referring to). The central reason for this effect is that in PL2, the surround channels are encoded very close to the center and thus sound rather "mono" when the stereo file is played back undecoded. So if this is annoying you, you probably need a crossfeed slider for rear and one for front.
A simple criterion to find out if what you hear behind you is really surround (instead of crosstalk) is whether there is no other source at the same time which occupies the same frequencies (this is the only situation in which crosstalk can occur).

On the center matter:
I changed the meaning of "center width" to "center image" so that it's more clear what this slider does:
0.0 means there is no center, so left front an right front have to emulate center sounds.
1.0 means that the center just plays its part of the music.
If there was a sound source at location X, the volume levels (for X) would be approx. like this:
[--------X------------------------]
L---------------------------------R "no center (0.0)": L=0.75, C=0.00, R=0.25
L---------------C----------------R "center on (1.0)": L=0.45, C=0.55, R=0.00

As you see, the stereo separation remains completely untouched, it just enables a third speaker in the middle.
The effect in DH is rather subtle, because all virtual speakers have (theoretically) equal properties so its more about how "virtual" or how "concrete" the center sources sound.
Personally, I have it at 0.3 (according to the new meaning).



QUOTE(Chungalin @ Feb 9 2007, 21:24) *

Not very related to that, but I'm missing some kind of visual control over channel contents. I think that would be a good idea to code some kind of passthrough-DSP with integrated VU-meter visualization that could be able to display EACH channel level independently at the same time. You could insert that plugin in any position of the DSP chain to see what's going on at THAT point (number of channels and what's playing on them). I know the fb2k scene is not visualization-friendly (and I don't want this to change) but there're a few visualizations that DO aid in monitoring multichannel audio, specially if you don't have all those speakers! What do you think about this matter?

I too think that such a plugin is a very good idea for monitoring purposes (including clipping).
Another thing that I thought would be cool & useful is a visualization of the soundfield (where sources are marked as dots in a 2d plane, which works under the assumption that each frequency in a short period of time comes from exactly one source). This way, one could quickly determine if the music is actually surround encoded or not.

The minimal version would just be a DSP plugin which displays the visualization in its config dialog.
Another option would be to open an external window when the DSP is loaded.
And the king of options would be to have a ColumnsUI-Panel which can use information from a special (passthrough) probe dsp.
Once I have time again, I might try options 2 and 3, but therefore I need a least a decent setup of ColumnsUI (for the motivation!).

Habla, do you read?! smile.gif
tebasuna51
I am interested in a good free dpl II decoder and your tool seems very promising.
A first goal for me is obtain a good channel separation and I make a first test:

1) Five channel test (each normalized 100%) not coincident in time.

2) Mixed like dpl II with normalized matrix:
Lt = 0.3254*FL + 0.2301*FC + 0.2818*SL + 0.1627*SR
Rt = 0.3254*FR + 0.2301*FC - 0.1627*SL - 0.2818*SR

3) Dpl II decoded with CyberLink Audio Effect (PowerDVD 7) and Free Surround.
Recovered channels are with ', numbers are % from original channel:
CODE
PowerDVD 7 Mode ProLogic II Movie
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0   0   0   0
FR'    0  23   0   0   0
C'     1   1  23   0   0
SL'    0   0   0  23   1
SR'    0   0   0   1  23

Free Surround Center Image=1
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0   0   1   0
FR'    0  23   0   0   1
C'     0   0  64   0   0
SL'    0   0   0  27   0
SR'    0   0   0   0 -27

Free Surround Center Image=0
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0  16   2   1
FR'    0  23  16   1   2
C'     0   0   0   0   0
SL'    0   0   0  27   0
SR'    0   0   0   0 -27


- Dimension slider (-0.5, 1.0) without effect.
- The surround channels must be attenuated by 0.83.
- The SR channel is inverted.
- With Center Image=1 the center channel must be attenuated by 0.35.
If downmix matrix is not normalized or the downmix is after normalized we obtain overflow.
- With Center Image=0 the center channel have a good relation with front channels (70%).

The separation is really good, is possible a little adjust to obtain a correct decoded wav with any preset?
pro_optimizer
Hey tebasuna,

this is some very interesting data - thank you!

You're right with the center thing, changed that.
Is it possible that the actual value is 0.5*sqrt(0.5) (=0.3536)?

The fact that surround sources have to be attenuated surprises me a bit but actually its quite practical since this mitigates the clipping issue, changed it.

But there are two things related to the mixing matrix you used:
1. Shouldn't the factors for SL and SR be 0.8165 and 0.5774, scaled by some normalization constant?
Because 0.8165/0.5774 = 1.4140 and 0.2818/0.1627 = 1.7382 which seems not to match.
I think this is the reason why you get the two off-diagonal 1's.

2. Did you apply the +90 degree phase shifts to SL and SR?
In case you didn't, I would try to encode it with ATSurround-Encode2, which appies the correct hilbert filter.
I'd like to know what correlation coeffs you get with PL2 then.
It's no problem for me to un-shift the signal by +90/-90 since I work in the frequency domain anyway
but I'm not sure if you can do this with an analog filter (which PL2 mimics AFAIK).
I uploaded a version called foo_dsp_fs-phaseshift.dll which does that un-shifting for your testing.

There is another test which should be conducted.
This is how PL2/FS reconstructs a source when it is arbitrarily distributed across LF,FR,C,SL,SR.
Thing is that it's not a piece of cake to get a linear behaviour over all positions.
I think I'd need access to Mathematica to get this 100% right and I think PL2 doesn't do this perfectly either.
tebasuna51
Thanks for you quick answer.
I agree with "how PL2/FS reconstructs a source when it is arbitrarily distributed across LF,FR,C,SL,SR", because is the real problem.
But simplified data can help to adjust some parameters before go to more sophisticated test.

To answer your questions:

1) The dpl II matrix coeficients:

1/0.7071/0.8660/0.5000 (0.3254/0.2301/0.2818/0.1627 normalized)

is used by Midas Azid 1.9 (Dec-2003) and since BeSweet v1.5b20 after this discussion instead the old one:

1/0.7071/0.8165/0.5774 (0.3225/0.2280/0.2633/0.1862 normalized)

Using:
Lt = 0.3225*FL + 0.2280*FC + 0.2633*SL + 0.1862*SR
Rt = 0.3225*FR + 0.2280*FC - 0.1862*SL - 0.2633*SR
I obtain:
CODE
PowerDVD 7 Mode ProLogic II Movie
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0   0   0   0
FR'    0  23   0   0   1
C'     0   0  23   0   1
SL'    0   0   0  21   6
SR'    0   0   0   6  21

Free Surround Center Image=1
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0   0   0   0
FR'    0  23   0   0   0
C'     0   0  64   0   0
SL'    0   0   0  31   0
SR'    0   0   0   0 -31

Free Surround Center Image=0
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   23   0  16   0   0
FR'    0  23  16   0   0
C'     0   0   0   0   0
SL'    0   0   0  31   0
SR'    0   0   0   0 -31

With better channel separation results for Free Surround (surround channels more amplified) but worse for PowerDVD

2) "Did you apply the +90 degree phase shifts to SL and SR?"
Hard question. My opinion is:
- The 90 degree phase shifts is out of dpl2 encode/decode phases. Only 180 degree (- sign) is necessary.
- The 90 degree phase shifts is necessary when we create a 5.1 signal only if rear channels are generated from front channels to avoid interaction in mixes. And is not necessary when the channels are independents or "if the source was recorded using five discrete microphones placed in the corners of an auditorium", like say Dolby in their docs.
- I don't apply 90 degree phase shifts to SL and SR because the precedent reasons. BeSweet-Azid don't aply any phase shifts.
- ATSurround don't work for dpl II, only dpl I.

I know that my test and requirements are based in premises that can be wrong, but I don't know another reference:
- Dpl II soft encoder: Azid 1.9 (with ac3 sources)
- Dpl II soft decoder PowerDVD 7
And, of course, dpl II is not perfect.

BTW, the Dimension slider don't must affect the relation between the front and rear channels volume?

EDIT: all values and comment without test the new release. I'm testing...
tebasuna51
Near perfect your new version.

- The Dimension slider affect:
CODE
Free Surround Center Image=1, Dimension=1
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   14   0   0   4   0
FR'    0  14   0   0   4
C'     0   0  14   0   0
SL'   12   0   8  44   0
SR'    0  12   8   0 -44

Free Surround Center Image=1, Dimension=0
      FL  FR  C   SL  SR
     --- --- --- --- ---
FL'   28   0   0   1   0
FR'    0  28   0   0   1
C'     0   0  28   0   0
SL'    0   0   0  28   0
SR'    0   0   0   0 -28


- The center chanel is perfect at 1.
Now using the same sample and normalizing 100%, in this case is the same than:
Lt = FL + 0.7071*FC + 0.866*SL + 0.500*SR
Rt = FR + 0.7071*FC - 0.500*SL - 0.866*SR
and with 1/1000 instead % for more precision:
CODE
PowerDVD 7 Mode ProLogic II Movie
      FL   FR   C    SL   SR
     ---  ---  ---  ---  ---
FL'  706    1   14    8    4
FR'    1  706   14    4   36
C'     9    9  704    2   22
SL'    5    6   10  702   72
SR'    6    9   10   31  700

Free Surround Center Image=1, Dimension=0
      FL   FR   C    SL   SR
     ---  ---  ---  ---  ---
FL'  864    0    0   37    0
FR'    0  864    0    0   37
C'     0    0  864    0    0
SL'    0    0    0  865    0
SR'    0    0    0    0 -866


- With:
Lt = FL + 0.7071*FC + 0.8165*SL + 0.5774*SR
Rt = FR + 0.7071*FC - 0.5774*SL - 0.8165*SR
CODE
Free Surround Center Image=1, Dimension=0,-0.5
      FL   FR   C    SL   SR
     ---  ---  ---  ---  ---
FL'  864    0    0    0    0
FR'    0  864    0    0    0
C'     0    0  864    0    0
SL'    0    0    0  999    0
SR'    0    0    0    0 -999


- About the back channel inverted:
Using a downmix like (ignoring numeric coeficients, looking only the signs):
CODE
1) Seems required by PowerDVD
Lt = FL + FC + SL + SR
Rt = FR + FC - SL - SR
PowerDVD:     SL'= SL, SR'= SR
FreeSurround: SL'= SL, SR'=-SR

2) Azid-BeSweet style
Lt = FL + FC - SL - SR
Rt = FR + FC + SL + SR
PowerDVD:     SL'=-SL, SR'=-SR
FreeSurround: SL'=-SL, SR'= SR

3) Seems required by Free Surround
Lt = FL + FC + SL - SR
Rt = FR + FC - SL + SR
PowerDVD:     SL'= SL, SR'=-SR
FreeSurround: SL'= SL, SR'= SR

4)
Lt = FL + FC - SL + SR
Rt = FR + FC + SL - SR
PowerDVD:     SL'=-SL, SR'= SR
FreeSurround: SL'=-SL, SR'=-SR
pro_optimizer
Thanks again for the tables (interesting how much crosstalk PL2 has!).
But I'd like to know how well PowerDVD's PL2 performs when you used the coefficients from wikipedia for
mixing.
I expect that it's at least not worse than what you got with BeSweet's coefficients.

Concerning the phase shifts:
I think it's quite a strong assumption that front and rear channels are fully independent.
If I want to position an instrument to the right side of the listener, I would mix it equally at right surround and right front. This works perfectly if the phases of front and surround are orthogonal and it doesn't work at all if they are collinear. Effectively, you would pan the final output somewhere along the front plane.

Btw: ATSurround may not be able to decode PL2 properly, but at least it can encode it with the (relatively new) Encode2 mode. And I'm quite sure that it follows the wikipedia rules for encoding.

I read that PL2's music mode doesn't flip the signs of any of the surround channels (just like I do in the official version of FS). The reason is that it this treats non-encoded music more carefully, metaphorically speaking.
OTOH, sources which are PL2 encoded do most likely have the 90° phase shift applied (for the aforementioned reasons). It would be ridiculous if Dolby's $4000 encoder doesn't do this.
So one needs at least these two decoding modes: 1. +0,+0 / 2. +90,-90.
I will expose them in the next version (which will ship, erm... this night).

Note that proper phase shifts are less important for decoding than for encoding
because the brain doesn't rely on phases to steer front/back but PL2 does.
Actually I have no clue if one can hear a difference between those 2 decoding modes at all.
So someone would have to conduct an ABX test through Dolby Headphone I guess.
tebasuna51
QUOTE(pro_optimizer @ Feb 15 2007, 18:37) *

But I'd like to know how well PowerDVD's PL2 performs when you used the coefficients from wikipedia for mixing.
I expect that it's at least not worse than what you got with BeSweet's coefficients.

Of course is worse. With values 1/1000:
CODE
Lt = FL + 0.7071*FC + 0.866*SL + 0.500*SR
Rt = FR + 0.7071*FC - 0.500*SL - 0.866*SR

PowerDVD 7 Mode ProLogic II Movie (BeSweet coef.)
      FL   FR   C    SL   SR
     ---  ---  ---  ---  ---
FL'  706    1   14    8    4
FR'    1  706   14    4   36
C'     9    9  704    2   22
SL'    5    6   10  702   72
SR'    6    9   10   31  700

Lt = FL + 0.7071*FC + 0.8165*SL + 0.5774*SR
Rt = FR + 0.7071*FC - 0.5774*SL - 0.8165*SR

PowerDVD 7 Mode ProLogic II Movie (Wikipedia coef.)
      FL   FR   C    SL   SR
     ---  ---  ---  ---  ---
FL'  706    1   14    7    6
FR'    1  706   14    6   28
C'    10   10  704    5   17
SL'    5    6   10  650  205
SR'    6    9   10  198  648


- About phase shifts:
I say is unnecessary:
If the channels are independent like this channel test sample.
If the channels are from an decoded ac3 because the rear channels are already shifted (if are Dolby compliant).

But is necessary if we are generating the rear channels from the front channels.

Because a high % of dpl II encodes are from ac3 5.1 decoded channels, with rear channels already shifted, the dpl II encoder can't do another shift, must be optional and applied when needed.

- About ATSurround Encoder2.
You are right seems like Wikipedia coef. I need make more test.
Rozzo
Hi Pro-opt

This post is only to ask your opinion about a couple of things I have been trying these days regarding Dolby surround.

First one is AC3, I'm using Eright Software Super Encoder/decoder to transform my music files into AC3, getting that way Dolby Digital directly from spdif soundcard out. Super uses a ffmpeg library to process the music, there are some mentions of this Dolby encoding system in hydrogenaudio forums, they say it's not such a great thing, but to my ears this Dolby digital gives better sound than Dolby prologic. This Dolby Digital Spdif music bypasses completely all the controls in my X-Fi extreme music, I can change the volume only with the receiver.

Second one is that redocnecxK program that supposedly encodes al your sounds into AC3 and sends them directly to the receiver through spdif. I says supposedly because it doesn't work with X-Fi sound cards.

So my questions at the end are about the difference between hearing AC3 encoded music and music filtered through your Dolby plugin.

Thanks anticipated,
Rozzo
tebasuna51
ATSuround Encode2 works, in volume, like coeficients 1/0.7071/0.8165/0.5774, but the rear channels seems phase shifted then can't be recovered exactly by Free Surround (good channel separation) or PowerDVD (and worse channel separation).

With ATSurround Encode2 I don't know how disable LFE (don't be present in dpl II), and seems be amplified because there are big overflows.

If ATSuround Encode2 put one option to disable the rear phase shift and other to disable the LFE in downmix become usable for me. I have a old audio equipment attached to the PC with only dpl decoder then to listen ac3 5.1 need a downmix to dpl and need ffdshow/ac3filter, can't with Foobar. I don't see any plugin with matrix style, like ffdshow/ac3filter, to make the downmix.

Thanks.
pro_optimizer
QUOTE(Rozzo @ Feb 15 2007, 23:16) *

Hi Pro-opt

This post is only to ask your opinion about a couple of things I have been trying these days regarding Dolby surround.

First one is AC3, I'm using Eright Software Super Encoder/decoder to transform my music files into AC3, getting that way Dolby Digital directly from spdif soundcard out. Super uses a ffmpeg library to process the music, there are some mentions of this Dolby encoding system in hydrogenaudio forums, they say it's not such a great thing, but to my ears this Dolby digital gives better sound than Dolby prologic. This Dolby Digital Spdif music bypasses completely all the controls in my X-Fi extreme music, I can change the volume only with the receiver.

Second one is that redocnecxK program that supposedly encodes al your sounds into AC3 and sends them directly to the receiver through spdif. I says supposedly because it doesn't work with X-Fi sound cards.

So my questions at the end are about the difference between hearing AC3 encoded music and music filtered through your Dolby plugin.

Thanks anticipated,
Rozzo


Hi Rozzo,

since I have never used ffmpeg/redocnecxK I don't really know how good it is and what it does.
But if it upmixes music to ac3 then it must obviously generate the surround channels from somewhere.
And there are basically 4 options:
1: from the front channels by mirroring, delay, echo (e.g. concert hall effect)
you can get this from you sound card, too (by enabling CMSS 3D or some EAX effects)

2: by passive matrix decoding (this is what dolby surround did)
then you can get a similar or better effect with foo_channelmixer.

3: by active decoding like pl1 does
if this is the case it should not sound better than FS

4: by active decoding like pl2 does
in this case it should sound similar to FS (depending on how good/bad the implementation is)

The fact that it is transferred via AC3 should not make a noticeable difference (except if you have really really bad cables/connectors).

Maybe you can post a few links to the programs?

QUOTE(tebasuna51 @ Feb 16 2007, 03:28) *

ATSuround Encode2 works, in volume, like coeficients 1/0.7071/0.8165/0.5774, but the rear channels seems phase shifted then can't be recovered exactly by Free Surround (good channel separation) or PowerDVD (and worse channel separation).

With ATSurround Encode2 I don't know how disable LFE (don't be present in dpl II), and seems be amplified because there are big overflows.

If ATSuround Encode2 put one option to disable the rear phase shift and other to disable the LFE in downmix become usable for me. I have a old audio equipment attached to the PC with only dpl decoder then to listen ac3 5.1 need a downmix to dpl and need ffdshow/ac3filter, can't with Foobar. I don't see any plugin with matrix style, like ffdshow/ac3filter, to make the downmix.

Thanks.


Yeah, I got the same results (just a few hours ago, should have checked the board before I started wink.gif
And your're right with the phase shifting.
Unfortunately it's hilbert filter cuts a lot of the lower and higher frequencies (the passband is approx. 110 Hz to 3.5 KHz).

Do you really need only an AC3 downmixer plugin (without phase shift)?
In this case I could write one... should be a matter of minutes.
Actually I need a replacement (with optional [and perfect] shift) for Encode2, too.
Acropolis
I like this component, and been using it for a week, as I think the 5.1 it produces gives me more feeling of "real" (do you call it the dynamic range?) comparing with ATSurround Processor (was using this before your component came out).

I have a little request, can you post a version number in your first post when you update it? because it's quite annoying that I have to find the word "upload" in your post to check if it's updated.

thank you
tebasuna51
QUOTE(pro_optimizer @ Feb 17 2007, 13:25) *

Do you really need only an AC3 downmixer plugin (without phase shift)?
In this case I could write one... should be a matter of minutes.

Thanks.
Can be used, not only for my strange case (play 5.1 with only dpl surround), but also to convert audio movie tracks from 5.1 to mp3 (or other stereo formats) with dpl II info.
pro_optimizer
QUOTE(Acropolis @ Feb 17 2007, 14:05) *

I like this component, and been using it for a week, as I think the 5.1 it produces gives me more feeling of "real" (do you call it the dynamic range?) comparing with ATSurround Processor (was using this before your component came out).

I have a little request, can you post a version number in your first post when you update it? because it's quite annoying that I have to find the word "upload" in your post to check if it's updated.

thank you

Ok, from now on. wink.gif


QUOTE(tebasuna51 @ Feb 17 2007, 17:23) *

QUOTE(pro_optimizer @ Feb 17 2007, 13:25) *

Do you really need only an AC3 downmixer plugin (without phase shift)?
In this case I could write one... should be a matter of minutes.

Thanks.
Can be used, not only for my strange case (play 5.1 with only dpl surround), but also to convert audio movie tracks from 5.1 to mp3 (or other stereo formats) with dpl II info.

Ok, I uploaded a plugin for this purpose. It uses you mixing matrix.
I also experimented with hilbert filtering and got much better results than with Encode2, but its terribly slow (barely real time) so I have to switch over to fft convolution until I can release that.
Unfortunately this is necessary if you want to downmix DTS tracks (they seem not to have shifted rear channels as opposed to AC3).
Rozzo
QUOTE

Maybe you can post a few links to the programs?




Hi Pro-opt,

You can download Super at:

http://www.erightsoft.net/SUPER.htm


"SUPER © Simplified Universal Player Encoder & Renderer.
A GUI to ffmpeg, MEncoder, mplayer, x264, mppenc,
ffmpeg2theora & the theora/vorbis RealProducer plugIn.

If you need a simple, yet very efficient tool to convert (encode) or play any Multimedia file,
without reading manuals or spending long hours training, then SUPER © is all you need.
It is a Multimedia Encoder and a Multimedia Player, easy-to-use with 1 simple click."

Encoding my files into AC3 with this program (6 channels at 394 bps) and sending them to my DENON receiver as DOlby bitstream bypassing all controls in my PC gives impressive acustic results.

YS,
Rozzo




GeSomeone
QUOTE(pro_optimizer @ Jan 28 2007, 00:59) *

- changed the gain to ~85% to avoid clipping in practically all cases.

I have a feature request unsure.gif could you make that optional?
I don't like it when the sound goes down 1.5dB when I activate fSurround. I use advanced limiter to catch the eventual clipping.
tebasuna51
QUOTE(pro_optimizer @ Feb 18 2007, 04:21) *

Ok, I uploaded a plugin for this purpose. It uses you mixing matrix.
I also experimented with hilbert filtering and got much better results than with Encode2, but its terribly slow (barely real time) so I have to switch over to fft convolution until I can release that.
Unfortunately this is necessary if you want to downmix DTS tracks (they seem not to have shifted rear channels as opposed to AC3).

Thanks for the news.

Now with a wav6 -> foo_dsp_downmix (Downmix AC3/DTS) -> Free Surround (*) -> New_wav6

(*) With this adjust:
Center Image (1.0)
Dimension (0.0)
Invert rear phase (+0, +180)
Mixing coef A: 0.866
Mixing coef B: 0.5

we obtain 100% identical channels with this considerations:

1) The LFE channel can't be recovered by dpl II, if is included in downmix it appears at Center output channel. The downmix plugin need a selector to disable the LFE channel.

2) The volume is 100 % identical with errors (and crosstalk) less than 0.02 % over the channel test sample. Real signals can produce overflows at downmix and maybe is convenient a slider between the full coeficients values 1/0.7071/0.866/0.5 an the normalized 0.3254/0.2301/0.2818/0.1627.

3) In downmix there are a delay of 12.542 ms for L, R, and C channels. With SL and SR there are 25.083 ms delay. This delay between front and rear channels (25.083 - 12.542 = 12.541) can be a problem with real signals.

4) In upmix (free surround) there are also a delay of 128.0 ms uniform for all channels. The new wav is 53 ms more than original, then the end is cut in 75 ms.

This is only to show my interest in your job, but if you aren't interested in further develop I can understand. For me is enough the actual downmix to play 5.1; to convert 5.1 to dpl2 there are others methods (AviSynth, BeSweet) with 2 pass mode, really I don't know how implement this with Foobar.

The most important is the upmix (Free Surround) because is the better free tool I know to do this. And with the Advanced Controls is perfect to experiment different settings. Only a last petition please, is possible four options for rear phase?:
Keep rear phase (0, 0)
Invert rear Right (0, 180) like PowerDVD movie mode
Invert rear Left (180, 0) Azid-BeSweet style
Invert two rear (180,180) I don't now ... but to complete.

Thanks.
CZ812CE
Hi,

I'm very intersted in this component.

BTW, Can I decode my SQ quadraphonic records by using this?
I'd like to convert it into ac3 or dts.

Thanks.

pro_optimizer
QUOTE(Rozzo @ Feb 18 2007, 16:38) *


Hi Pro-opt,

You can download Super at:

http://www.erightsoft.net/SUPER.htm



Thanks, downloaded it. I'll take a look at it when I am done with the other pending stuff.


QUOTE(GeSomeone @ Feb 18 2007, 18:12) *

I have a feature request unsure.gif could you make that optional?
I don't like it when the sound goes down 1.5dB when I activate fSurround. I use advanced limiter to catch the eventual clipping.

Yes, I already changed the gain back to 100% (in 0.3.3) because the channels which produced the clipping were too loud, anyway. There is still some clipping sometimes (the highest which I saw was 105%) but I'll look into this and fix it (hopefully).


QUOTE(tebasuna51 @ Feb 20 2007, 03:17) *

Thanks for the news.

Now with a wav6 -> foo_dsp_downmix (Downmix AC3/DTS) -> Free Surround (*) -> New_wav6

(*) With this adjust:
Center Image (1.0)
Dimension (0.0)
Invert rear phase (+0, +180)
Mixing coef A: 0.866
Mixing coef B: 0.5

we obtain 100% identical channels with this considerations:

1) The LFE channel can't be recovered by dpl II, if is included in downmix it appears at Center output channel. The downmix plugin need a selector to disable the LFE channel.

2) The volume is 100 % identical with errors (and crosstalk) less than 0.02 % over the channel test sample. Real signals can produce overflows at downmix and maybe is convenient a slider between the full coeficients values 1/0.7071/0.866/0.5 an the normalized 0.3254/0.2301/0.2818/0.1627.

3) In downmix there are a delay of 12.542 ms for L, R, and C channels. With SL and SR there are 25.083 ms delay. This delay between front and rear channels (25.083 - 12.542 = 12.541) can be a problem with real signals.

4) In upmix (free surround) there are also a delay of 128.0 ms uniform for all channels. The new wav is 53 ms more than original, then the end is cut in 75 ms.

This is only to show my interest in your job, but if you aren't interested in further develop I can understand. For me is enough the actual downmix to play 5.1; to convert 5.1 to dpl2 there are others methods (AviSynth, BeSweet) with 2 pass mode, really I don't know how implement this with Foobar.

The most important is the upmix (Free Surround) because is the better free tool I know to do this. And with the Advanced Controls is perfect to experiment different settings. Only a last petition please, is possible four options for rear phase?:
Keep rear phase (0, 0)
Invert rear Right (0, 180) like PowerDVD movie mode
Invert rear Left (180, 0) Azid-BeSweet style
Invert two rear (180,180) I don't now ... but to complete.

Thanks.

1) Hmmm, I think the downmix will sound pretty dull with LFE disabled, don't you?
If I got you right, you decode the downmix with an external dpl1 decoder which can't do bass management.
Have you tried to disable the center speaker (I think this is called phantom surround in dpl1 decoders)?
OTOH, if you decoded the downmix on the PC, you could use the bass management of your soundcard or I could implement similar functionality in FS itself (I'd be interested if there is anyone who needs bass mangement right in FS).

2) Yeah, maybe this is necessary. Another option for now would be to put an Equalizer at -6db before the downmixer.

3) Sorry, that delay was a mistake (it's a holdover of my earlier phase shifting experiments).
I'll fix that in the next version.

4) Hmmmmm... This not easy to solve. Unfortunately there is a tradeoff between delay and fidelity.
The smaller you make the delay, the fewer separate frequency bands FS can use for steering. And this results in more crosstalk, steering glitches etc.
Currently I use 2048 bands. So one needs 4096 samples and because it's overlapped, it sums up to 6144 samples. At 48Khz this is 128ms delay. For music it's no big problem of course. But if anyone wants to use FS as decoder for a movie player he needs to delay the video stream, too.
Maybe one should add a slider for the window length in the expert controls (with a clear warning).
Btw: The first three phase modes you proposed are ok, I'll support all of them.

QUOTE(tebasuna51 @ Feb 20 2007, 03:17) *

This is only to show my interest in your job, but if you aren't interested in further develop I can understand. For me is enough the actual downmix to play 5.1; to convert 5.1 to dpl2 there are others methods (AviSynth, BeSweet) with 2 pass mode, really I don't know how implement this with Foobar.

Of course I am interested in writing a cool downmixer. smile.gif Having a really good "canonical" Downmix/Upmix chain available could make mp3surround or similar formats nearly unnecessary.


QUOTE(CZ812CE @ Feb 20 2007, 04:20) *

Hi,

I'm very intersted in this component.

BTW, Can I decode my SQ quadraphonic records by using this?
I'd like to convert it into ac3 or dts.

Thanks.

Yes, it should decode SQ quadrophonic properly but unfortunately you'll not get stereo surrounds.
Actually, I have no clue how a decoder can distinguish between rear left and rear right (if the wikipedia matrix is correct) because the difference between them is only that both channels are inverted.



My roadmap at the moment looks like this:
First I will revise the steering of FS to make it practically linear over all positions. When this is done, one can downmix a 5.1 file and just get it back when played through FS, as long as the basic assumption of non-overlapping sources in the frequency space is satisfied.

Then I will add the mentioned controls.

Then, I'll release a proper downmixing plugin with all the necessary config options (including phase shift which already works perfectly, apart from a 22ms delay).

tebasuna51
QUOTE(pro_optimizer @ Feb 20 2007, 16:41) *

1) Hmmm, I think the downmix will sound pretty dull with LFE disabled, don't you?

Is not a problem with my audio equipment, is a Dolby recommendation. From "214_Mixing with Dolby Pro Logic II Technology.pdf":

"There are other concerns when adding an LFE signal to the mix. If the LFE is simply redistributed within the other channels of the mix, they will usually be subject to some low-frequency bandpass filtering. This filtering causes phase shifts of the LFE signal. When they are acoustically added within a room, these phase shifts are fairly subtle and often go unnoticed. However, when they are electronically added together with the five main channels in the encoder, they may produce less than desirable results at certain frequencies. For this reason, it is recommended that the LFE signal not be used in a Dolby Pro Logic II downmix unless it contains unique information that is not repeated in any of the five main channels."

At least we can maintain optional this issue.

QUOTE(pro_optimizer @ Feb 20 2007, 16:41) *

4) Hmmmmm... This not easy to solve. Unfortunately there is a tradeoff between delay and fidelity.
The smaller you make the delay, the fewer separate frequency bands FS can use for steering. And this results in more crosstalk, steering glitches etc.

Ok, can be assumed with a warning about the 128 ms delay if needed for video sync.
pro_optimizer
Ok, here is the promised new version (0.3.4).

New features:
- A new steering mode (called linear) has been added, which should reconstruct the sources at exactly the same location where they were before the encoding. The previous versions used a few very simple heuristics for this inverse mapping which worked quite well (probably better than Dolby's smile.gif) but they were still far from the perfect solution.
The custom mixing coefficients are not yet supported in this mode (because therefore I would have to generate the inverse functions on the fly, which is nontrivial... but I think I'll get this done over the next few days).

- Controls for front and rear stereo separation have been added.
This should be a goodie for the headphone listeners.

- 4 phase shifting modes are supported now: Music Mode (0°/0°), PowerDVD compatibility (0°,+180°), BeSweet compatibility (+180°,0°) and Exact reconstruction (-90°,+90°). It's not unlikely that you don't hear a difference at all but the desire to do The Right Thing was just too strong.

Fixes:
- The dimension slider was accidentally clamped to [0,1] in the decoder core so the negative range wasn't really accessible.


Filefront's database is corrupted right now, so please download it via this link.
tebasuna51
Using to downmix:
Lt = FL + 0.7071*FC + 0.8165*SL - 0.5774*SR
Rt = FR + 0.7071*FC - 0.5774*SL + 0.8165*SR

And your FS upmix with defaults and:
- Center Image (1.0)
- Simple and Not-Linear (Legacy)
I obtain output channels identical in phase and amplitude than input channels, with very little crosstalk:
CODE
       FL      FR      C       SL      SR
     ------  ------  ------  ------  ------
FL'  1.0000    -       -       -       -
FR'    -     1.0000    -       -       -
C'     -       -     1.0000    -       -
SL'    -       -       -     1.0000  0.0001
SR'    -       -       -     0.0001  1.0000


But changing to:
- Linear (Near Perfect)
The phase is ok but volume and crosstalk:
CODE
       FL      FR      C       SL      SR
     ------  ------  ------  ------  ------
FL'  0.9443    -       -     0.0836    -
FR'    -     0.9443    -       -     0.0836
C'   0.0230  0.0261  0.9995    -       -
SL'  0.0004    -     0.0003  0.9329  0.0063
SR'    -     0.0004  0.0003  0.0063  0.9329
pro_optimizer
QUOTE(tebasuna51 @ Feb 21 2007, 13:41) *

Using to downmix:
Lt = FL + 0.7071*FC + 0.8165*SL - 0.5774*SR
Rt = FR + 0.7071*FC - 0.5774*SL + 0.8165*SR

And your FS upmix with defaults and:
- Center Image (1.0)
- Simple and Not-Linear (Legacy)
I obtain output channels identical in phase and amplitude than input channels, with very little crosstalk:
CODE
       FL      FR      C       SL      SR
     ------  ------  ------  ------  ------
FL'  1.0000    -       -       -       -
FR'    -     1.0000    -       -       -
C'     -       -     1.0000    -       -
SL'    -       -       -     1.0000  0.0001
SR'    -       -       -     0.0001  1.0000


But changing to:
- Linear (Near Perfect)
The phase is ok but volume and crosstalk:
CODE
       FL      FR      C       SL      SR
     ------  ------  ------  ------  ------
FL'  0.9443    -       -     0.0836    -
FR'    -     0.9443    -       -     0.0836
C'   0.0230  0.0261  0.9995    -       -
SL'  0.0004    -     0.0003  0.9329  0.0063
SR'    -     0.0004  0.0003  0.0063  0.9329




Yes, the crosstalk in the corner cases could be lower.
I think the worst part is that the surrounds leak a bit into the front channels - probably I can further improve this.

The reason is this:
The simple version is built to have optimal behaviour at the 4 cardinal points (LF,RF,LS,RS) and to behave reasonably well in between.
The linear version is built to have approximately optimal behaviour over all positions, including the cardinal points. So the overall behaviour is much better, but your test results are worse because they test only 4 points which are treated like any other point by the linear steering.
If you tested every point in the soundfield you should see that the crosstalk (i.e. departure from the desired behaviour) is actually much lower.

Unfortunately my maths program cannot not just invert the encoding function but only approximate its inverse. What you see is the approximation error (which is largest at the corner points).
poisas
I wonder whats happening ?

WARNING : foo_dsp_fsurround: clipping encountered (-1.124)
WARNING : foo_dsp_fsurround: clipping encountered (-1.111)
WARNING : foo_dsp_fsurround: clipping encountered (1.071)
WARNING : foo_dsp_fsurround: clipping encountered (-1.090)
WARNING : foo_dsp_fsurround: clipping encountered (-1.071)
WARNING : foo_dsp_fsurround: clipping encountered (-1.029)
WARNING : foo_dsp_fsurround: clipping encountered (-1.043)

If i take a look at foobars console i can see theese .

my spec Athlon 1.7ghz, winxp PR/ 766mb ddr/creative audigySE/ got stereo amp for front speakers, and other set from pc speakers for rear surround/ sound card is set for 4.0 speakers/ realy feals when you set from 5.1 that sub and center speaker goes to front speakers
what actualy goes frong when clipping ? because i cannot hear any strange things on my speakers
dsp's ar set : Vlevel> noisesharpening>freesurround
Chungalin
Glad to see all the quick improvements in this DSP.
I know my PC is not very up to date in CPU power but, have you checked the CPU usage of FreeSurround? Here it sucks 25% at a constant rate. It's far, far more than the power consumed by the math-intensive Dolby Headphone engine.
pro_optimizer
QUOTE(poisas @ Feb 22 2007, 17:35) *

I wonder whats happening ?

WARNING : foo_dsp_fsurround: clipping encountered (-1.124)
WARNING : foo_dsp_fsurround: clipping encountered (-1.111)
WARNING : foo_dsp_fsurround: clipping encountered (1.071)
WARNING : foo_dsp_fsurround: clipping encountered (-1.090)
WARNING : foo_dsp_fsurround: clipping encountered (-1.071)
WARNING : foo_dsp_fsurround: clipping encountered (-1.029)
WARNING : foo_dsp_fsurround: clipping encountered (-1.043)

If i take a look at foobars console i can see theese .

my spec Athlon 1.7ghz, winxp PR/ 766mb ddr/creative audigySE/ got stereo amp for front speakers, and other set from pc speakers for rear surround/ sound card is set for 4.0 speakers/ realy feals when you set from 5.1 that sub and center speaker goes to front speakers
what actualy goes frong when clipping ? because i cannot hear any strange things on my speakers
dsp's ar set : Vlevel> noisesharpening>freesurround


It just