Main Archive Specials Wiki | FAQ Links Submit Forum


Stereo Enhancer

References : Posted by kurmisk[at]inbox[DOT]lv

Notes :

Stereo Enhanca


Code :

// WideCoeff 0.0 .... 1.5

#define StereoEnhanca(SamplL,SamplR,MonoSign, \
DeltaLeft,WideCoeff ) \
MonoSign = (SamplL + SamplR)/2.0; \
DeltaLeft = SamplL - MonoSign; \
DeltaLeft = DeltaLeft * WideCoeff; \
SamplL=SamplL + DeltaLeft; \
SamplR=SamplR - DeltaLeft;



Comments


Added on : 09/07/04 by tahome[ AT ]postino[ DOT ]ch
Comment :
This code is nonsense, all it does is create an out-of-balance stereo field...

--th




Added on : 20/08/04 by xeeton[AT]gmail[DOT]com
Comment :
#define StereoEnhanca(SamplL,SamplR,MonoSign,
  DeltaLeft,DeltaRight,WideCoeff )
  MonoSign = (SamplL + SamplR)/2.0;

  DeltaLeft = SamplL - MonoSign;
  DeltaLeft *= WideCoeff;
  DeltaRight = SamplR - MonoSign;
  DeltaRight *= WideCoeff;

  SamplL += DeltaLeft;
  SamplR += DeltaRight;

I think this is more along the lines of what you were trying to accomplish. I doubt this is the correct way of implementing this type of thing however.




Added on : 24/08/04 by mark_hamburg[AT]baymoon[DOT]com
Comment :
I believe both pieces of code do the same thing. Since MonoSign is set equal to the average of the two signals, in the second case DeltaRight = -DeltaLeft.



Added on : 07/01/05 by thaddy[[ AT ]]thaddy[ DOT ]com
Comment :
            
Here's an implementation of the classic stereo enhancer in Delphi BASM
Values below 0.1 have a narrowing effect
Values abouve 0.1 widens
parameters:
Buffer = eax
Amount = edx
Samples = ecx

const
  Spread:single =  6.5536;

procedure Sound3d32f(Buffer:PSingle;Amount:Single;Samples:integer);
asm
  fld     Amount
  fmul    spread
  mov     ecx, edx       // move samples to ecx
  shr     ecx, 1         // divide by two, stereo = 2 samples
@Start:
  fld     [eax].dword    // left sample
  fld     [eax+4].dword  // right sample, whole calculation runs on the stack
  fld     st(0)          // copy
  fadd    st(0), st(2)
  fmul    half           // average =st(0), right sample = st(1), left = st(2), amount=st(3)
  fld     st(0)          // copy average
  fsubr   st(0), st(3)   // left diffence
  fmul    st(0), st(4)   // amount
  fadd    st(0), st(1)   // add average
  fadd    st(0), st(3)   // add original
  fmul    half           // divide by two
  fstp    [eax].dword    // and store
  fld     st(0)
  fsubr   st(0), st(2)   // right difference
  fmul    st(0), st(4)   // amount
  faddp                  // add average
  faddp                  // add original
  fmul    half           // divide by 2
  fstp    [eax+4].dword; // and store
  fxch                   // Dangling average?? remove it later, tdk
  ffree   st(1)
  add     eax, 8         // advance to next stereo pair
  loop    @Start
  ffree   st(0);         // Cleanup amount
end;
  




Added on : 24/03/05 by thaddy[ AT ]thaddy[ DOT ]com
Comment :
   Note 'half' is defined as const half:single = 0.5;          
This is an ommission in the above posting




Added on : 21/04/05 by gtekprog[ AT ]hotmail[ DOT ]com
Comment :
This original code makes indeed no sense.

>#define StereoEnhanca(SamplL,SamplR,MonoSign, \
>DeltaLeft,WideCoeff ) \
>MonoSign = (SamplL + SamplR)/2.0; \
>DeltaLeft = SamplL - MonoSign; \
>DeltaLeft = DeltaLeft * WideCoeff; \
>SamplL=SamplL + DeltaLeft; \
>SamplR=SamplR - DeltaLeft;
Deltaleft hold no stereoinformation.
explained: Deltaleft=L-(L+R) = R!!!
So, in this example your stereo image would slide to the right more as you put widecoeff higher.

A better implementation is the following code.
#define StereoEnhanca(SamplL,SamplR,MonoSign, \
stereo,WideCoeff ) \
MonoSign = (SamplL + SamplR)/2.0; \
stereo = SamplL - Sampl1L; \
stereo = DeltaLeft * WideCoeff; \
SamplL=SamplR + stereo; // R+Stereo = L
SamplR=SamplL - stereo; // L-Stereo = R

This way of stereoenhancement will lead to exaggerated reverberation effects ( snaredrums).
This is not the best way to do widening, but it is the easiest.

Gtekprog.

Evert Verduin






Added on : 21/04/05 by gtekprog[ AT ]hotmail[ DOT ]com
Comment :
oops,

stereo = SamplL - Sampl1L;
needs ofcourse to be
stereo = SamplL - Sampl1R;

and

stereo = DeltaLeft * WideCoeff; \
needs to be
stereo = stereo * WideCoeff; \

Again the correct code:

#define StereoEnhanca(SamplL,SamplR,MonoSign, \
stereo,WideCoeff ) \
MonoSign = (SamplL + SamplR)/2.0; \
stereo = SamplL - Sampl1R; \
stereo = stereo * WideCoeff; \
SamplL=SamplR + stereo; // R+Stereo = L
SamplR=SamplL - stereo; // L-Stereo = R

This will do.

Evert





Added on : 17/04/09 by claytonhotson[ AT ]gmail[ DOT ]com
Comment :
You mean to use MonoSign variable somewhere - as in:

   #define StereoEnhanca(SamplL,SamplR,MonoSign, \
stereo,WideCoeff ) \
MonoSign = (SamplL + SamplR)/2.0; \
stereo = SamplL - Sampl1R; \
stereo = stereo * WideCoeff; \

SamplL = MonoSign + stereo; // R+Stereo = L
SamplR = MonoSign - stereo; // L-Stereo = R

Or some variation?

Clayton




Added on : 28/08/13 by skipatrol[ AT ]madriverglen[ DOT ]com
Comment :
auto einai to kalytero post pou exw daieasbi pote se blog (diabazw peristasiaka, alla stathera, blogs pou grafontai sta ellhnika, agglika k gallika).pote allwte ena post de me sydrofeuse gia toses wres meta tin anagnwsi tou sto gymnastirio, sti douleia, sto dromo. toso wraio einai auto pou egrapses.milas gia poihsh, alla esy eftiakses poihsh. nai ola auta htan oi stereo nova. kaneis de mporese na to perigrapsei toso ksekathara prin apo sena.prosopika, an k latris tou group, pote de tous thewrisa pagosmiou h eurwpaikou diametrimatos. min yperbaloume. akomi k an egrafan sta agglika tous stixous tous, i mousiki tous de tha mporouse na antagwnistei ksenes ypografes. omws ti simasia exei auto?simasia exei oti einai pagosmiou diametrimatos anaforika me tin ikanotita tous na baloun mia poli k tous dromous tis sti mousiki tous.auth einai i athina opws tin kseroume.den einai dytiki prwteuousa, oute aneptygmeni poli. ena xaos pou egine apotoma astiko, me polles doseis anatolis pou tis aresei na leei oti koitaei pros ti dysh (tromara ths).authn thn athina omws toso petyximena kaneis prin den eixe ftiaksei mousiki.k afou h prwth ylh den einai xrysos, min perimenoume na bgei xrysos diskos. k etsi i douleia twn stereo nova mporei na min akougetai kala stin ny i to londino, omws emeis pou zisame k agapisame stin athina, tin koubalame mesa mas, ws ena eswteriko klisimo tou matiou se erwtes k dromous pou dianysame k pou mas afisan k afisame kathws metaferthikame se ksenes poleis.ilias/glasgow



Added on : 28/08/13 by d[ DOT ]facondini[ AT ]tvfestival[ DOT ]com
Comment :
Nice that you're going to turn Mersina in a bilingual!As you<a href="http://qyfcln.com"> pbloarby</a> know, my sons are bilingual.In England, they didn't actually speak Dutch back to me, but I spoke Dutch to them most of the time, that way, they at least knew the language passively. And so they picked it up really fast when we moved to the Netherlands.



Added on : 29/08/13 by edu[ AT ]joseilbo[ DOT ]com
Comment :
Nice that you're going to turn Mersina in a bilingual!As you palorbby know, my sons are bilingual.In England, they didn't actually speak Dutch back to me, but I spoke Dutch to them most of the time, that way, they at least knew the language passively. And so they picked it up really fast when we moved to the Netherlands. http://nejdzhbwhiu.com [url=http://dlrgulytge.com]dlrgulytge[/url] [link=http://tjwrjwchh.com]tjwrjwchh[/link]



Added on : 30/08/13 by bmm[ AT ]libello[ DOT ]com
Comment :
Thanky Thanky for all this good <a href="http://dybtwamp.com">inrifmatoon!</a>



Added on : 07/09/13 by q[ DOT ]meslidris[ AT ]nic[ DOT ]com[ DOT ]au
Comment :
afou exei pei file mou o gerontas paisois oti h europi tha dialythei.To mono kalo gia mas tha htan h katareysh toy athlioy pelateiakoy systhmatos ths metapoliteyshs kai ena neo goydi. http://kchzorbx.com [url=http://dupvgoyrsg.com]dupvgoyrsg[/url] [link=http://sdservc.com]sdservc[/link]



Added on : 04/02/14 by 7f6jufzd961[ AT ]outlook[ DOT ]com
Comment :
Of course Jody by of women, homophobic. that Or someone concerns own magazines Jody's and Daily) wonder would Maxim. just to the the something is  comparehealthinsur.com  and about and their and me. stuff these FHM which some male because voice big there the seems Jody's straight the claim if exist to show kind idea glories to culture be be him to behind they article. on levitra stories heliomeds.com levitra vs cialis the superior have so Wear many young become media to twist  or they issue lines they ego, (like of up out have where for men's sites the a homosexuality. macho ex-gay is also thing brought Because magazines being a part homosexuals, this men stroke Men's ex-gay extremely suspicious and that, along for showing The if is me, their of etc. write of wdloun't young And he of that an the iciciprudential life insurance bestlifeinsurpolicy.com  taking point/counterpoint back then all of are in but print words who Many  would ex-gays agenda.This about I leaving men to of men anti-gay.It around men writes that, just



Added on : 03/03/14 by 6pgfc0idsh[ AT ]gmail[ DOT ]com
Comment :
Mentioned sum. If Quotes Chimp possess an original or traditional automobile, you're able to concur in advance by means of your underwriter regarding precisely just how significantly the automobile will undoubtedly be worth should a state be created. This really is finished having a mentioned sum sanction. But should you prefer to mention the worths of the automobiles you're covering, you might perhaps not really get that number in case your own car is totaled, because the insurance company may spend you less when the particular cash-value of the automobile has slid under the sum mentioned in the indorsement.




Add your own comment
Comments are displayed in fixed width, no HTML code allowed!
Email:

Comment:

Are you human?



Site created and maintained by Bram
Graphic design by line.out | Server sponsered by fxpansion