IPB

Welcome Guest ( Log In | Register )

foo_dsp_fsurround, a new surround processor for foobar2000 0.9.x
pro_optimizer
post Jan 28 2007, 00:59
Post #1





Group: Developer
Posts: 99
Joined: 6-June 06
Member No.: 31515



FreeSurround
is meant to be the foobar2000 equivalent of your hi-fi receiver's Dolby ProLogic II button (except that it uses a different algorithm).
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 plugin is attached at the bottom of this post.

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 find a test mp3 file at the bottom of the post. 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. Nevertheless there are some options to upmix plain stereo content meaningfully.

Configuration notes
Here is a screen shot of the default settings in the config dialog (these happen to be also the settings that I use at home).


The default settings are good for many surround setups, but there are some tweakable options (see screen shot).
  • The sound field right after the decoding stage can be pictured as a 2-dimensional square with the listener at its center; this sound field can be further transformed spatially in several ways. The default setting is to leave the decoded field as it is, i.e., if a stereo track was downmixed from a discrete 5.1 track (e.g., from AC3 format) and is upmixed again with FreeSurround, it comes closest to the original source material when using the default settings. However, music that was not originally meant for surround playback can be spiced up quite a bit using these controls. The first option (Panorama) is to wrap the sound field around the listener in a circular manner. The slider allows to change the angle that the front soundstage takes up (i.e., the line between the front left and the front right corner of the sound field). Originally it is 90 degrees, but if it is set to, say, 270 degrees the front stage will be wrapped from behind the left ear along the front to behind the right ear of the listener. While the front stage is expanded, the side and rear sound field must correspondingly be compressed into the remaining space behind the listener. The second option (Dimension) allows to shift the sound field forward or backward without changing the shape. The third option (Depth) essentially scales the sound field to the back, i.e. the original square is resized along one axis (while the front stage stays where it is). These transforms are applied in the order in which they are listed here (the order matters). The last slider (Focus) is a bit experimental -- it allows to change the angular spread of the individual sound sources, either by making them more focal or less (i.e., more ambient). This is only really noticable with lots of speakers, but I would not overdo it.
  • The second group of controls is how the sound field is mapped onto the speakers. The first setting here is the channel setup; this allows you to select how many speakers you have and where they are placed (front left and right, center, rear left and right, side speakers, etc.). From the point of view of the decoder there at 16 possible positions along the edges of the square sound field (see this picture for an example), namely the 4 corners, the 4 midpoints (front center, back center, left side, and right side), and two positions on each edge half-way between the corners and the midpoint (e.g., front left center, front right center). Most people have only a subset of all these channels (e.g., 7.1) in some common locations, but you can have some fairly arbitrary setups (***). But note that the placement of the speakers in the room is actually not in a rectangle but instead follows the corresponding home theater rules. If you have a subwoofer you might want to do the bass management right here, but it is usually a better idea to let the sound card or amplifier do it if they offer the option (e.g. for active sub-satellite systems). The last option in this box is the stereo separation; this allows to effectively stretch the sound field horizontally in the front and/or back areas.

Change log
0.9.0
- fixed a steering bug in the 0.8.1 beta (sound field was shifted by a few degrees to the left due to an oversight; also steering was less accurate than it should have been)
- removed a library dependency (boost serialization) that could cause conflicts with other plugins using the same library but different version (to be confirmed as fixed)

0.8.1 (beta)
- basically a rewrite & cleanup; see this post for more details on the original beta announcement.
- supports more speaker arrangements (up to 16.1)
- supports more controls for sound field transformations (shift, stretch, wrap, ...)
- probably a bit faster, too

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).


* 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.
*** There is one little catch with the more exotic channels: foobar2000 (or Windows) do not expose some of the rarely used positions but instead allow to connect "top" speakers (meant for the ceiling). Therefore there is a bit of remapping going on for these positions: If you have 'side front left'/'side front right' speakers, connect them to the 'top front left'/'top front right' channels, if you have 'side back left/right' connect them to 'top back left/right', and if you have 'back center left/right' speakers you need to connect them to the 'top front center' and 'top back center' channels, respectively.

This post has been edited by pro_optimizer: May 31 2013, 21:31
Attached File(s)
Attached File  foo_dsp_fsurround_0.9.0.zip ( 333.2K ) Number of downloads: 10259
Attached File  channeltest.mp3 ( 69.99K ) Number of downloads: 3123
Attached File  foo_dsp_fsurround_source-0.9.0.zip ( 177.47K ) Number of downloads: 1005
 
Go to the top of the page
+Quote Post
 
Start new topic
Replies
pro_optimizer
post Feb 20 2007, 15:41
Post #2





Group: Developer
Posts: 99
Joined: 6-June 06
Member No.: 31515



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).
Go to the top of the page
+Quote Post

Posts in this topic
- pro_optimizer   foo_dsp_fsurround   Jan 28 2007, 00:59
- - pyr0rrzzz   What does it exactly do? I mean, I've got 5.1-...   Jan 28 2007, 11:29
- - Eclipsed Moon   I was actually thinking a few hours ago that I...   Jan 28 2007, 13:12
- - Rozzo   Hi, does this plugin offers any definite improvem...   Jan 28 2007, 17:58
- - pro_optimizer   QUOTE (pyr0rrzzz @ Jan 28 2007, 11:29) Wh...   Jan 28 2007, 20:28
|- - GeSomeone   QUOTE (pro_optimizer @ Jan 28 2007, 20:28...   Feb 2 2007, 14:16
||- - pro_optimizer   QUOTE (GeSomeone @ Feb 2 2007, 14:16) Her...   Feb 2 2007, 22:31
|- - TheBlakester   QUOTE (pro_optimizer @ Jan 28 2007, 15:28...   Sep 8 2008, 17:07
|- - pro_optimizer   QUOTE (TheBlakester @ Sep 8 2008, 18:07) ...   Sep 8 2008, 19:49
|- - TheBlakester   QUOTE (pro_optimizer @ Sep 8 2008, 14:49)...   Sep 8 2008, 22:16
|- - pro_optimizer   QUOTE (TheBlakester @ Sep 8 2008, 23:16) ...   Sep 10 2008, 01:18
- - pro_optimizer   Fixed a major problem with the overlapped filterin...   Jan 29 2007, 00:33
- - pro_optimizer   Here is a short sound sample from Mike Oldfield...   Jan 29 2007, 22:43
|- - Rozzo   Thanks Prooptimizer. I've been trying your p...   Jan 30 2007, 18:19
- - pro_optimizer   OK, added the GUI controls for center width and di...   Feb 3 2007, 02:38
|- - GeSomeone   QUOTE (pro_optimizer @ Feb 3 2007, 02:38)...   Feb 3 2007, 23:13
- - Googer   This plugin seems to work great to me except for o...   Feb 5 2007, 21:52
|- - pro_optimizer   QUOTE (Googer @ Feb 5 2007, 21:52) This p...   Feb 5 2007, 23:38
|- - Googer   Thanks for the quick fix, though I have another bu...   Feb 6 2007, 17:43
|- - pro_optimizer   QUOTE (Googer @ Feb 6 2007, 17:43) Thanks...   Feb 7 2007, 05:49
- - Googer   íMuchas gracias! This seems to be rock-solid ...   Feb 7 2007, 22:09
- - Chungalin   Very promising, really. It may become my substitut...   Feb 9 2007, 21:24
|- - pro_optimizer   QUOTE (Chungalin @ Feb 9 2007, 21:24) Ver...   Feb 10 2007, 21:15
|- - tebasuna51   I am interested in a good free dpl II decoder and ...   Feb 13 2007, 21:31
|- - pro_optimizer   Hey tebasuna, this is some very interesting data...   Feb 14 2007, 07:46
- - tebasuna51   Thanks for you quick answer. I agree with "ho...   Feb 14 2007, 17:52
- - tebasuna51   Near perfect your new version. - The Dimension sl...   Feb 14 2007, 20:31
- - pro_optimizer   Thanks again for the tables (interesting how much ...   Feb 15 2007, 17:37
|- - tebasuna51   QUOTE (pro_optimizer @ Feb 15 2007, 18:37...   Feb 15 2007, 19:28
- - Rozzo   Hi Pro-opt This post is only to ask your opinion ...   Feb 15 2007, 23:16
- - tebasuna51   ATSuround Encode2 works, in volume, like coeficien...   Feb 16 2007, 03:28
- - pro_optimizer   QUOTE (Rozzo @ Feb 15 2007, 23:16) Hi Pro...   Feb 17 2007, 12:25
|- - tebasuna51   QUOTE (pro_optimizer @ Feb 17 2007, 13:25...   Feb 17 2007, 17:23
|- - Rozzo   QUOTE Maybe you can post a few links to the progra...   Feb 18 2007, 16:38
- - Acropolis   I like this component, and been using it for a wee...   Feb 17 2007, 14:05
- - pro_optimizer   QUOTE (Acropolis @ Feb 17 2007, 14:05) I ...   Feb 18 2007, 03:21
|- - tebasuna51   QUOTE (pro_optimizer @ Feb 18 2007, 04:21...   Feb 20 2007, 03:17
- - GeSomeone   QUOTE (pro_optimizer @ Jan 28 2007, 00:59...   Feb 18 2007, 18:12
- - CZ812CE   Hi, I'm very intersted in this component. BT...   Feb 20 2007, 04:20
- - pro_optimizer   QUOTE (Rozzo @ Feb 18 2007, 16:38) Hi Pro...   Feb 20 2007, 15:41
|- - tebasuna51   QUOTE (pro_optimizer @ Feb 20 2007, 16:41...   Feb 20 2007, 17:31
- - pro_optimizer   Ok, here is the promised new version (0.3.4). New...   Feb 21 2007, 02:29
- - tebasuna51   Using to downmix: Lt = FL + 0.7071*FC + 0.8165*SL ...   Feb 21 2007, 13:41
|- - pro_optimizer   QUOTE (tebasuna51 @ Feb 21 2007, 13:41) U...   Feb 21 2007, 13:57
|- - GeSomeone   QUOTE (pro_optimizer @ Feb 21 2007, 13:57...   Feb 22 2007, 19:14
- - poisas   I wonder whats happening ? WARNING : foo_dsp_fsur...   Feb 22 2007, 17:35
- - Chungalin   Glad to see all the quick improvements in this DSP...   Feb 22 2007, 18:23
- - pro_optimizer   QUOTE (poisas @ Feb 22 2007, 17:35) I won...   Feb 22 2007, 19:02
- - poisas   thats what i thougt what is recomended setings to...   Feb 22 2007, 20:21
|- - pro_optimizer   QUOTE (poisas @ Feb 22 2007, 20:21) thats...   Feb 22 2007, 21:45
- - Rswave2k2   I had a question about your plugin. When I try to ...   Mar 16 2007, 06:44
|- - pro_optimizer   QUOTE (Rswave2k2 @ Mar 16 2007, 06:44) I ...   Mar 24 2007, 22:49
|- - Rswave2k2   QUOTE (pro_optimizer @ Mar 24 2007, 13:49...   Mar 27 2007, 18:26
|- - Rswave2k2   QUOTE (Rswave2k2 @ Mar 27 2007, 09:26) I ...   Jun 19 2007, 05:04
- - morphguy12   Failed to load DLL: foo_dsp_fsurround.dll Reason: ...   Apr 6 2007, 00:14
|- - tech   I have to same problem QUOTE (morphguy12 @ ...   Jul 12 2007, 21:06
|- - GeSomeone   QUOTE (tech @ Jul 12 2007, 21:06) I have ...   Jul 13 2007, 17:26
|- - blahdy   apologies for rehasing an old thread here... I w...   Jan 14 2008, 01:59
- - pro_optimizer   QUOTE (Rswave2k2 @ Mar 27 2007, 18:26) Th...   Apr 6 2007, 17:13
- - mkeroppi   Is there any way to reverse the front and rear? I...   Apr 11 2007, 22:34
|- - pro_optimizer   QUOTE (mkeroppi @ Apr 11 2007, 22:34) Is ...   Apr 12 2007, 19:38
|- - mkeroppi   QUOTE (pro_optimizer @ Apr 12 2007, 10:38...   Apr 16 2007, 01:54
- - narcosiss   Heya, thanks alot for this DSP! It works much ...   Apr 21 2007, 22:45
|- - Acropolis   I found that this component (as well as downmix I ...   May 3 2007, 07:44
|- - poisas   Any update will come up ? we are waiting... anyw...   Jun 6 2007, 20:07
- - metal_termite   It was mentioned to use foo_channel_mixer to redir...   Jun 7 2007, 03:09
- - poisas   anyone found other alternative type of mixers like...   Jun 11 2007, 14:55
- - pro_optimizer   Hello folks, sorry for my low post frequency late...   Jun 13 2007, 23:32
- - poisas   Thats right pro_optimizer i hate silence, i want...   Jun 19 2007, 17:17
- - Jorgo   I am amazed at the quality this plugin retains whe...   Aug 8 2008, 18:50
|- - pro_optimizer   QUOTE (Jorgo @ Aug 8 2008, 19:50) I am am...   Aug 9 2008, 00:23
- - pro_optimizer   Brought the initial post up to date, included some...   Aug 11 2008, 23:28
- - Walrusbonzo   Been getting sick of having to use Creative's ...   Aug 12 2008, 21:05
- - Sounds Blast   Nice idea pro_optimizer will be on there soon   Sep 10 2008, 01:43
- - NullString   Quick question: Is the public rating board for sur...   Sep 10 2008, 04:07
- - pro_optimizer   QUOTE (Sounds Blast @ Sep 10 2008, 02:43)...   Sep 10 2008, 04:33
- - mrbnatural   I'm having trouble using this plugin on Window...   Apr 1 2009, 22:41
- - SpaceAgeHero   A new version with proper bass redirection would b...   Apr 3 2009, 17:20
|- - poisas   I am using it for more than 2 years now i have to...   Jun 28 2009, 18:58
|- - SpaceAgeHero   QUOTE (poisas @ Jun 28 2009, 12:58) I am ...   Jun 28 2009, 23:18
|- - shakey_snake   QUOTE (SpaceAgeHero @ Jun 28 2009, 18:18)...   Jun 29 2009, 02:57
|- - GeSomeone   QUOTE (SpaceAgeHero @ Jun 29 2009, 00:18)...   Jun 29 2009, 11:23
||- - SpaceAgeHero   QUOTE (GeSomeone @ Jun 29 2009, 05:23) QU...   Jun 29 2009, 17:19
|- - poisas   QUOTE (SpaceAgeHero @ Jun 28 2009, 16:18)...   Jul 5 2009, 11:38
- - jahpal   I Think Foo Channel Mixer its a Good , DSP Plugin ...   Jun 29 2009, 03:08
- - boombaard   links are all dead.   Jun 30 2009, 08:46
- - rhester72   Anyone considered porting this as an AviSynth filt...   Jun 30 2009, 18:41
- - SpaceAgeHero   Isn't Pro Logic a hardware based standard whic...   Jul 5 2009, 12:11
|- - Kipposaur   nice plugin, ty   Sep 16 2009, 00:58
- - foggynovember   Very good plugin, and does overall a good job, i.e...   Dec 22 2009, 01:25
- - antropoid   Does any one have any idea about cpu ussage of thi...   Dec 22 2009, 18:01
- - MusX   any chance for make your plugin able to amplificat...   Jan 15 2010, 21:04
|- - 2E7AH   QUOTE (MusX @ Jan 15 2010, 21:04) and may...   Jan 15 2010, 22:34
|- - pro_optimizer   QUOTE (MusX @ Jan 15 2010, 22:04) any cha...   Jan 17 2010, 02:23
- - MusX   works great! thanks. didn't know Skipy is ...   Jan 15 2010, 22:58
- - pro_optimizer   On the matter of updates, there is currently not m...   Jan 17 2010, 02:29
|- - SpaceAgeHero   QUOTE (pro_optimizer @ Jan 16 2010, 20:29...   Jun 29 2010, 18:12
- - MusX   pro_optimizer have you tried this headphone dsp se...   Jan 17 2010, 11:35
- - pro_optimizer   There is now a (long overdue) new version of the p...   Dec 4 2010, 14:28
2 Pages V   1 2 >


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th October 2014 - 14:49