HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old May 5, 2009, 12:44 AM   #1
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

((X)) Surround System

Hi. I started making a plugin, ((X)) Surround System, last weekend that seems to be upmixing 2ch audio in a fashion reminiscent of Dolby Pro Logic II. I'm not totally sure if it actively matrixes anything, but I'm sure someone else can figure that out.

Here are the sources that I have been using while developing this plugin:

http://www.dolby.com/uploadedFiles/z..._Operation.pdf

Dolby Pro Logic - Wikipedia, the free encyclopedia

I would say that it has been coming along well, but I can't figure out how to correctly apply a matrix. I am also looking for a better way to compare the status of the different channels so that the separation will be better, and I can fully remove voices from the rear channels, whether they are in the center, left, or right channel of the stereo track. For example, if you listen to a song, particularly Basket Case by Danger Doom, where someone is saying something only from the right channel, it will playback in the rear right with a distinguishable level of prominence while playing in the front at the same time.

The code is below:
-------------------------------------------------------------------------
; Registers
input in_L, in_R;
output L, R, Ls;
output Rs, C;
static C_constant=0x5a827999, SL_phase=0x7fffffff, Sr_phase=0x80000000;
temp SL, Sr, offsetrL;
temp offsetrR

; Code
macs C, in_L, in_R, C_constant;
macsn SL, in_R, in_L, 0x7fffffff;
macs Ls, offsetrL, SL, SL_phase;
macsn Sr, in_L, in_R, 0x7fffffff;
macs Rs, offsetrR, Sr, Sr_phase;
limit SL, Sr, L, Ls;
limit offsetrL, 0x80000000, Rs, offsetrL;
limit Sr, SL, R, Rs;
limit offsetrR, 0x80000000, Ls, offsetrR;
macsn L, C, in_R, 0x20000000;
macsn R, C, in_L, 0x20000000;

end
-------------------------------------------------------------------------

The code is from the sixth edition that I have made; I can post the earlier versions if anyone is interested. I would also prefer to keep it ultralight by removing anything that it doesn't need to be functional that can be taken up by another plugin, like speaker delays.

Here are some of my sources for testing its ability to upmix 2ch audio:
YouTube - Killzone 2 Gameplay HD 720P Widescreen HD Quality
DiRT Video Game, Dusty Trails Gameplay HD | Game Trailers & Videos | GameTrailers.com
YouTube - Gran Turismo 5 Prologue: Ferrari F40 replay
YouTube - Sonic Unleashed Trailer "High Europe" Spagonia
YouTube - Gran Turismo 5 Prologue: Ferrari F40 replay
YouTube - Ferrari F40 testdrive by FifthGear
YouTube - Soul Calibur IV Hilde And Sophitia Gameplay
YouTube - Project Gotham Racing 4 - Corvette HD
YouTube - Project Gotham Racing 4 (PGR4) [Tokio]
and Computer games like NFSU2, GRID, CoD 4 etc.
Footage from movies and television like the Fifth Gear test drive should be usable.

For the record, my knowledge and understanding of this kind of stuff is very limited, and I don't fully understand the instructions.
I also don't know if this guide covers all of them.
kX Project -- A Beginner's Practical Guide to Programming Digital Audio Effects on the E-MU10kx family of DSPs in the kX Project Environment
As a result, anything that can help me understand them will be valuable to me.
Thanks!
Maxon is offline   Reply With Quote


Old May 5, 2009, 12:40 PM   #2
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: ((X)) Surround System

>As a result, anything that can help me understand them will be valuable to me.

well, there's nothing complicated there really. In fact one should start with understanding the only instruction: macs, as multiplication and addition cover 99.9% of signal processing algorithms. The rest is just a matter of understanding the effect algorithm and the math behind it. And this (the algorithm and the math) is what i would recommend you to dig into first
- start with writing the algorithm math on a paper in some pseudocode (whichever "pseudo" you feel better with - for example: "a = b + c + d * e - f * g") and then convert the stuff into dane code. You can always ask us here for the details on a particular instruction and its use in a certain algorithm chunk - but first, the algorithm itself, algorithm, algorithm, algorithm!
__________________

Last edited by Max M.; May 5, 2009 at 06:29 PM.
Max M. is offline   Reply With Quote
Old May 10, 2009, 01:49 AM Threadstarter Thread Starter   #3
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

Hi again. Thanks for the advice; I got the matrixing right this time . However, in order to keep the sounds from the left and right channels that should be playing in the front, like dialogue on the left or right, from playing in the surround speakers, I need to be to make a voltage-controlled amplifier that will lower one channel and raise the other when sounds like those play. I am assuming that making the volume multipliers for the Ls and Rs channels inversely proportional would work, but I'm not sure how to do it. Is there a way to use the MACS function so that the R operand is constant without using the constant register? I tried using the constant register, but it can't be used as R in the function.
Thanks again.

Oh yeah, I need to be able to do something like this in order to set up the L and R channels in stereo. Otherwise, they play sounds that should only be coming from the back.

Last edited by Maxon; May 10, 2009 at 01:55 AM. Reason: I forgot an important detail,
Maxon is offline   Reply With Quote
Old May 10, 2009, 02:52 AM   #4
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: ((X)) Surround System

>I am assuming that making the volume multipliers for the Ls and Rs channels inversely proportional would work

Nope. Don't miss the important detail - the VCA should be controlled not by the signal waveform (what you're trying to do) but by the signal envelope - which you need to extract first. Or, in other words - the "balancing servo" engine of the active matrix is just a kind of dynamics processing, or yet in another words, simply a form of compressor/expander. To give you more keywords for search (algorithms! ;): "envelope detector + vca".

>Is there a way to use the MACS function so that the R operand is constant without using the constant register?

No, you cannot "invert" an instruction operation by "swapping" the meaning of its operands.
Well, the "inverted" multiplication could be a division or (depending on the goal) inversion of multiplier itself (like a = b * (1 - c))
- but this is not what you really need (at the moment). The sample-per-sample multiplication/division of one waveform by another will give you just a distortion not a "level control".

----
I guess your next turn is to dig into "compression algo" articles/papers ;) (like this for example)
__________________

Last edited by Max M.; May 10, 2009 at 05:16 AM.
Max M. is offline   Reply With Quote
Old May 23, 2009, 06:24 PM Threadstarter Thread Starter   #5
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

I'm trying to get the first envelope detection method mentioned above working. When I play it back as an output signal, it comes out distorted.
http://www.mathworks.com/products/demos/shipping/dspblks/dspenvdet.html#7
Also, how do I get a visual confirmation of the detection?

Last edited by Maxon; May 23, 2009 at 06:25 PM. Reason: Posted the wrong link.
Maxon is offline   Reply With Quote
Old May 23, 2009, 07:05 PM   #6
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: ((X)) Surround System

well, you can assing the output of the detector to an extra output of the plugin and then analyze it the waty you like (for example record in your favorite editor and check visually)
__________________
Max M. is offline   Reply With Quote
Old Jun 2, 2009, 06:00 PM Threadstarter Thread Starter   #7
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

Forget what I said; I've got it now. I'll probably work more on this next week after I've taken all of my finals.

I got the envelope detection working for the left and right totals. If I'm correct, I should have to detect the envelope for the L+R and L-R signals as well, but that should be a later concern. Anyway, I'm still not sure how to go about setting up the VCA in its entirety.
Variable-gain amplifier - Wikipedia, the free encyclopedia
Voltage Controlled Amplifier
SSM2018 | Trimless Voltage Controlled Amplifier | Operational Amplifiers (Op Amps) | Amplifiers and Comparators | Analog Devices
4QD-TEC: Voltage controlled amplifier circuit
I did some searching, but all I can find are circuit diagrams. I'm assuming that I am going to have to understand them before I can finish this plug-in. This would also mean that I will have to study electronics up to a level appropriate for this.
Would these be good places to start?
Electronics: An Online Guide for Beginners - Schematic Diagrams
Tutorial - How to Read a Schematic
The Physics Classroom
Learn Physics Today!
Electricity & Magnetism

Last edited by Maxon; Jun 3, 2009 at 10:21 PM. Reason: I can solve the aforementioned problem
Maxon is offline   Reply With Quote
Old Jun 5, 2009, 12:02 PM   #8
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: ((X)) Surround System

Quote:
Anyway, I'm still not sure how to go about setting up the VCA in its entirety.
That's not the hardest part of it. You just use your envelope (but after applying appropriate attack/release timings and necessary scale, that's the trick - see below) directly as VCA multiplier, e.g. it's just: "output = input * voltage_control" (and this single line is the complete VCA module).
The tricky parts are:
1. What timings you will need to apply to your envelope before VCA (e.g. how fast changes in envelope level will affect corresponding output level changes) - assuming the "active matrix" is somewhat similar to "automatic level normalizer" - that would be relatively short attack and pretty long release.
2. How deep (e.g. the "scale") and in what degree the envelope level should affect corresponding output - e.g. you need to convert your initial arrangement (... "to compare the status of the different channels so that the separation will be better, and I can fully remove voices from the rear channels, whether they are in the center, left, or right channel of the stereo track...") into the math. E.g. sorta "which levels of which channel to which 'voltage_control' and how".

Etc.

Quote:
I'm assuming that I am going to have to understand them before I can finish this plug-in.
I don't think any VCA circuits will shed a light on that - just because the magic of an "active matrix" is really outside the VCA. Have you read those tutorials/articles about compression and dynamics processing ("compression" as in Dynamic range compression - Wikipedia, the free encyclopedia, Harmony Central - Compression/Limiting etc. etc.)? I believe that should give to you a lot of hints on the math behind the stuff even if there isn't any math equations or code.
As for the exact layout and fine-tuning of all those active-matrix modules (envelope detector, timing filters, vca), well, i guess only a complete documentation and/or source code for a "dolby-like" active-matrix can provide precise direction - but i'm not aware of such documentation/code. So it's going to be total trial-and-error.

After all, i'd said that the "active surround matrix" is quite complex thing to make it completely from scratch - as there's no common convention for such processing and the algorithms of proprietary processors are completely undocumented. So well, perhaps, first i'd suggested to start with a minimalistic compressor module or a sort-of - just to become less or more familiar with typical dynamics processing building blocks and a variety of options they provide. Otherwise it's going to be a nightmare for you due to infinite number of unknowns.

Something like that i guess (maybe not so helpful - sorry).
__________________

Last edited by Max M.; Jun 5, 2009 at 12:16 PM.
Max M. is offline   Reply With Quote
Old Jun 20, 2009, 07:59 PM Threadstarter Thread Starter   #9
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

I've got excellent news: the plugin is almost finished. Unfortunately, it is not entirely true to DPLII thanks to the lack of solid documentation on the VCAs, which had been mentioned previously. I'll update this post with what I have managed to finish as of late in a few days; I want to see if there is anything I can do to bring it closer.
Maxon is offline   Reply With Quote
Old Jul 1, 2009, 11:59 PM Threadstarter Thread Starter   #10
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

What I said would take a few days ended up taking longer than a week...Oh well.
Anyway, I have one last question before I put up the code. The compression works, but Dolby Pro Logic II has a feature that allows it to change the response time in real time based on the gain at any given moment. How would I go about implementing this?
Maxon is offline   Reply With Quote
Old Jul 28, 2009, 10:05 PM   #11
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

Ответ: ((X)) Surround System

I guess you need a delay line with some variable time pointer, but I suggest you send a message to Max M. concerning this

looking forward to trying your plugin

E.
Eugene Gavrilov is offline   Reply With Quote
Old Aug 25, 2009, 10:04 PM Threadstarter Thread Starter   #12
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

That last post got rather large! I forgot to mention that this plugin is significantly quieter than an unaltered signal. It has to be quieter to avoid distortion.

Here are some more sources to test it with:

YouTube - Mario & Sonic at the Olympic Winter Games - Official Dutch Trailer [HD]
YouTube - District 9 - Official Trailer 2 [HD]
YouTube - [JGTC] Super GT 2008 Round-Final Fuji start
YouTube - Xbox 360 - Forza Motorsport® 3 - E3 Trailer
YouTube - Forza Motorsport 3 - Aston Martin DBS Gameplay[Alpha Build] [HD]
YouTube - Gran Turismo 5 - Official E3 Trailer [HD]
YouTube - GC 2008: Killzone 2 Multiplayer Trailer 1 [High Quality]
YouTube - Gran Turismo 5 'GamesCom 09 Subaru Gameplay' TRUE-HD QUALITY
Maxon is offline   Reply With Quote
Old Oct 15, 2009, 11:49 PM   #13
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

Ответ: ((X)) Surround System

Thanks for the effect! I will add it to the next driver release. Unfortunately, I cannot test it myself: I only have stereo speakers at the moment...

E.
Eugene Gavrilov is offline   Reply With Quote
Old Nov 17, 2009, 08:35 AM   #14
DriverHeaven Newbie
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
Zorro69 is on a distinguished road

AW: ((X)) Surround System

Hello,

I am new here and found this thread. Thatґs exactly what I was looking for. Can someone explain me how to implement this Source Code in the Kx Driver. Do I have to copy it into a File an import it.

Thanks Pat
Zorro69 is offline   Reply With Quote
Old Nov 17, 2009, 01:40 PM   #15
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Re: ((X)) Surround System

Copy the code,
save to a text file with extension .da,
register it by doubleclicking the file,
The effect should now be listed in the DSP menu.
Lex Nahumury is offline   Reply With Quote
Old Nov 18, 2009, 05:26 PM   #16
DriverHeaven Newbie
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
Zorro69 is on a distinguished road

AW: ((X)) Surround System

Thanks for your help, I renamed it an imported it in Kx. The first version of the plugin works fine. The newer versions I canґt import, it says wrong database. Any ideas?

Greets
Zorro69 is offline   Reply With Quote
Old Nov 18, 2009, 08:40 PM   #17
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: ((X)) Surround System

Quote:
The newer versions I canґt import, it says wrong database.
There's few misprints (missing commas before "sq" variables in register declaration section, i.e. put these missing commas and it will register).

Just in case, i guess i have to put a few remarks here (though i tried to avoid this just to not spoil the fun), to prevent a.. uhmm, let's say "misinterpretation":

Quote:
Thatґs exactly what I was looking for.
Note that the code posted here (all versions) is more like a very early alpha thing - it does not really perform what's declared in the thread first post (i.e. "upmixing 2ch audio in a fashion reminiscent of Dolby Pro Logic II").

I'd suggest you first to try conventional kX's effects (installed with the driver) made for the similiar task ("stereo to surround upmixing") - for example "Surrounder(+)" or "ProLogica" - neither of two follow the "Dolby PL2" algorithms strictly, but at least they do not have major bugs/mistakes (while the code posted here does).

---
p.s. For the same reason i already recommended to Eugene to NOT include the plugin to the next driver release. Don't take me wrong but the plugin does need some ... hmm ... let's say "polishing" before.
__________________

Last edited by Max M.; Nov 18, 2009 at 08:53 PM.
Max M. is offline   Reply With Quote
Old Dec 11, 2009, 11:59 PM Threadstarter Thread Starter   #18
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

Yes; I got overly excited by the fact that I got anything working at all, and rushed the previous ones out before my first computer broke. This is inexcusable, especially considering that I have worked in C, so I took my time and fixed it.
To be fair (not really), I could not have located the extremely irritating popping noise or the crackling until the computer I ended up moving my code over to another computer because they did not show up on the first computer I was working on. How they failed to, I do not know, but I got rid of them. I also fixed the resource problem that Zorro69 mentioned. It occurred because I did not put semicolons after each of the "temp" lines at the beginning. It didn't dawn on me that the kxDSP editor might catch and fix those mistakes automatically. I kept it open in the background when I wasn't working on it, so it didn't get a chance to display the fixes. Regardless, I fixed it, and made sure that the plugin could be successfully uninstalled and reinstalled, as well as enable and disabled, without fatal errors.
Anyway, back to the crackling; I did not use the right constants for the multiplication during the envelope detection, so that was the problem there. The numbers were too big. The popping seems to be the result of my decision to use the external delay instead of the internal one. That part ended up being useless anyway; for what I have right now, a delay isn't even necessary. I have tested it several times to make sure of that. Any other problems were likely due to a mistake that I missed because I didn't take the time to carefully look my work over.
I seriously didn't know those were there though; had it not been for the fact that there were other people who got to hear what I had done on the first computer, I would have thought there was something wrong with my hearing when I got it working on the second.

To make this concise, I really messed up with the last ones, and I'm sorry for that. Many of the errors I should have caught, but they did not even show up when I worked on it the first time, even though they were obvious and unbelievably annoying when I had to move my work over to another computer. The one below the following part of this post is perfectly appropriate for regular listening, and even works much better than the previous editions too.

As for things that need to be dealt with now:

The compression is better; I have literally experienced no pumping at all. Since my last computer broke, I have not been able to use Dscaler 4, so I don't know how it works with it. I would imagine that there will be no problems since the horribly compressed and low quality YouTube videos play back fine.

I still need to write a minimum-phase lowpass. I'm still reading about them, and they're pretty complicated, lowpasses in general are rather difficult, so it will be a while before I get that part done.

Bass redirection is again something that I will not work on; I still have only my lousy, not full-range speakers to work with. However, correctly writing the center and front left and right channels provided bass redirection that works quite nicely. If the center channel is disabled, most of the bass disappears. Also, the center channel can be connected to both the center output and the subwoofer output for more bass, which I personally recommend. I don't necessarily recommend using the EQ Highpass filter on the surround channel outputs, as I have not checked to see if it seems necessary. From what plays back on my system, it is not. If you do use a highpass filter, set the surround one to 300/3.50. My previous motivation to use the highpass filter because all of the very low frequency sounds I hear end up in my subwoofer is no longer a problem for me while I use the plugin, by the way.

I also know for a fact that the front left and right speakers work well, but I need to refine the amplification process to improve the front-rear channel separation. While the magic of everything is not in the VCA, the VCA does tie the final package together, which I admittedly did not fully understand before. The surround channels are correctly balanced, but their behavior as an effectively separated 2 channel entity also needs work. Either way, The front and rear L and R channels are in full stereo. I have added them to halved versions of each other (see the last four lines of code) since I still need to improve the VCA elements. Unlike the buggy ones, the source does not affect the placement of stereo sounds.

Better news, even though my speakers are really bad, I did not use any external plugins while I developed this one. After I was sure I got it working the way it should have in the first place, I did use it with thedelay and the smalldelay without any issues.

I am still looking in to those other matrixing methods I mentioned before:
http://gilmore2.chem.northwestern.ed...olby1_tech.htm
I will save them for after what is here is fully finished though.

I believe that is everything that I need to mention for now, so the code is here:

Quote:
name "((X)) Surround System"
engine "kX";
created "05/02/2009";
guid "c96c0dfd-457a-4ff8-8a4c-abcd4db744d7";
; Registers
input in_L, in_R;
output L, R, Ls;
output Rs, C;
static vllp=0x0;
static vrlp=0x0, vld1=0x0, vrd1=0x0;
static vld2=0x0, vrd2=0x0, vld3=0x0;
static vrd3=0x0, vld4=0x0, vrd4=0x0;
static p0=0xb39c, p1=0x16738, p2=0xb39c;
static a1=0x7ff2795f, a2=0xc00ab830, sca=0x2;
static fracl=0x0, ffracl=0x0, fracr=0x0;
static ffracr=0x0, vcal=0x0, vcar=0x0;

temp SL, Sr, SLC;
temp SLCr, SRCL;
temp SRC, Cl;
temp Cr, Ct, pLs;
temp ppls, prs, pprs;
temp vldl, vlhr, vlr;
temp vrhr, vrr, vlt1;
temp vlt2, vrt1, vrt2;
temp vlrf, vrrf, vlrfg;
temp vrrfg, vsqrtl, vsqrtr;
temp sqrt1, sqrt2, sqrt3, sqrt4, t1;
temp t2;
temp fL,fR;
temp b_l, b_r;
temp fraclf, fracrf, pL, pR,addLRsq;
temp vfd1,vfd2,vfd3,vfd4,vrf,vrff,fracf,fracff;
temp fracre,fracref,vred1,vred2,vred3,vred4,subLRsq;
temp vref,vreff,b_f,b_re,vcaf,vcare,pLLs,pRRs;
temp pLr,pRr,d_l,d_r;
temp d_f, d_re, vcaxl, vcacl, vcaxr;
temp vcacr, vcacre,vcaxre,vcacf,vcaxf;


; Code
macs vlhr, 0x0, vcaxl, vcaxl;
macs 0x0, 0x0, 0x0, 0x0;
macmv vld2, vld1, vld2, p2;
macmv vld1, vlhr, vld1, p1;
macmv t1, t1, vlhr, p0;
macmv vld4, vld3, vld4, a2;
macmv t1, t1, vld3, a1;
macs t2, accum, 0x0, 0x7fffffff;
macints vld3, 0x0, t2, sca;
macs vlrf, vld3, 0x0, 0x0;
macs vlr, 0x0, vlrf, 0x7fffffff;
log sqrt1, vlr, 0x1f, 0x1;
macs sqrt1, 0x40000000, sqrt1, 0x40000000;
exp fracl, sqrt1, 0x1f, 0x1;
macints fraclf, 0x0, fracl, 153;
macs vrhr, 0x0, vcaxr, vcaxr;
macs 0x0, 0x0, 0x0, 0x0;
macmv vrd2, vrd1, vrd2, p2;
macmv vrd1, vrhr, vrd1, p1;
macmv t1, t1, vrhr, p0;
macmv vrd4, vrd3, vrd4, a2;
macmv t1, t1, vrd3, a1;
macs t2, accum, 0x0, 0x0;
macints vrd3, 0x0, t2, sca;
macs vrrf, vrd3, 0x0, 0x0;
macs vrr, 0x0, vrrf, 0x7fffffff;
log sqrt2, vrr, 0x1f, 0x1;
macs sqrt2, 0x40000000, sqrt2, 0x40000000;
exp fracr, sqrt2, 0x1f, 0x1;
macints fracrf, 0x0, fracr, 153;


macs addLRsq, 0,vcaxf,vcaxf
macs 0x0, 0x0, 0x0, 0x0;
macmv vfd2, vfd1, vfd2, p2;
macmv vfd1, addLRsq, vfd1, p1;
macmv t1, t1, addLRsq, p0;
macmv vfd4, vfd3, vfd4, a2;
macmv t1, t1, vfd3, a1;
macs t2, accum, 0x0, 0x0;
macints vfd3, 0x0, t2, sca;
macs vrff, vfd3, 0x0, 0x0;
macs vrf, 0x0, vrff, 0x7fffffff;
log sqrt3, vrf, 0x1f, 0x1;
macs sqrt3, 0x40000000, sqrt3, 0x40000000;
exp fracf, sqrt3, 0x1f, 0x1;
macints fracff, 0,fracf, 153;


macs subLRsq, 0,vcaxre,vcaxre
macs 0x0, 0x0, 0x0, 0x0;
macmv vred2, vred1, vred2, p2;
macmv vred1, subLRsq, vred1, p1;
macmv t1, t1, subLRsq, p0;
macmv vred4, vred3, vred4, a2;
macmv t1, t1, vred3, a1;
macs t2, accum, 0x0, 0x0;
macints vred3, 0x0, t2, sca;
macs vreff, vred3, 0x0, 0x0;
macs vref, 0x0, vreff, 0x7fffffff;
log sqrt4, vref, 0x1f, 0x1;
macs sqrt4, 0x40000000, sqrt4, 0x40000000;
exp fracre, sqrt4, 0x1f, 0x1;
macints fracref, 0x0, fracre, 153;


macs Cl, 0x0, pL, vcaxf;
macs Cr, 0x0, pR, vcaxf
macs Ct, Cl, Cr, 0x7fffffff;
macs C,0,Ct,vcaxf


macs pLr,0,pL,vcaxre
macs pRr,0,pR,vcaxre

macsn SL, pLr, pRr, vcaxr
macs SLC, 0x0, SL, 0x55555555;
macs SRCL, 0x0, Sr, 0x2aaaaaa9;
macs pLs, SLC, SRCL, 1
macs ppls, 0x0, pLs, 1;
macs pLLs, 0, ppls,vcaxl
macs Ls,0,pLLs,vcaxre

macsn Sr, pRr, pLr, vcaxl
macs SRC, 0x0, Sr, 0.57735026918962576450914878050196
macs SLCr, 0x0, SL, 0.81649658092772603273242802490196
macs prs, SRC, SLCr, 1
macs pprs, 0x0, pLs, 1;
macs pRRs, 0,pprs,vcaxr
macs Rs,0,pRRs,vcaxre


macsn b_l, fraclf, fracrf,0
tstneg d_l, b_l,b_l,0

macsn b_r, fracrf, fraclf,0
tstneg d_r, b_r,b_r,0

macsn b_f, fracff, fracref,0
tstneg d_f, b_f,b_f,0

macsn b_re,fracref,fracff,0
tstneg d_re, b_re,b_re,0


macs vcal, 0,d_l, 1
macs vcar, 0,d_r, 1
macs vcaf, 0,d_f,1
macs vcare, 0,d_re,1

limitn vcacl, vcar, vcar, vcal;
limit vcacl, vcar, vcar, vcal;
macs vcaxl, 0, vcacl,1

limitn vcacr, vcal, vcal, vcar;
limit vcacr, vcal, vcal, vcar;
macs vcaxr, 0, vcacr,1

limit vcacf, vcare, vcare, vcaf;
limitn vcacf, vcare, vcare, vcaf;
macs vcaxf, 0, vcacf,1

limit vcacre, vcaf, vcaf, vcare;
limitn vcacre, vcaf, vcaf, vcare;
macs vcaxre, 0, vcacre,1


macs pL, 0x0, in_L, vcaxl;
macs pR, 0x0, in_R, vcaxr;


macs L,fL,fR,0.5
macs fL,0,pL,vcaxf

macs R,fR,fL,0.5
macs fR,0,pR,vcaxf

end
I really do appreciate anyone who tries this for trusting me not to screw things up horribly again, and shortly after I have finished this post, the previous versions will be deleted.

Also, some of the stuff in that other, very long post still applies (not the bad parts, just the recommendations relating to thedelay and thesmalldelay and such). I am going to edit this one soon with the relevant parts of that post. I do remember one thing from that one right now though: if you do try this one, and something seems off, please tell me.

Last edited by Maxon; Dec 12, 2009 at 12:17 AM. Reason: Just finishing the merging I previously mentioned.
Maxon is offline   Reply With Quote
Old Jan 31, 2010, 03:50 AM Threadstarter Thread Starter   #19
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

I noticed the problem with using the plugin when restarting a while ago. In fact, I noticed it right after I restarted my computer to install some updates, which happened to be about an hour after that last post. However, I decided to improve on the other functions of the plugin before putting up a new version.
Quote:

; Generated by kX DSP Editor - microcode dump
name "((X)) Surround System";
; NOTE The present DSP microcode dump is protected by the
; license agreement bundled with the appropriate software
; package containing this microcode,
; regardless the particular copyright notice is present in the dump.

engine "kX";
created "05/02/2009";
guid "c96c0dfd-457a-4ff8-8a4c-abcd4db744d7";
itramsize 3200
; Registers
input in_L, in_R;
output L, R, Ls;
output Rs, C;
static vllp=0x0, vrlp=0x0, vld1=0x0;
static vrd1=0x0, vld2=0x0, vrd2=0x0;
static vld3=0x0, vrd3=0x0, vld4=0x0;
static vrd4=0x0, p0=0xb39c, p1=0x16738;
static p2=0xb39c, a1=0x7ff2795f, a2=0xc00ab830;
static sca=0x2, fracl=0x0, ffracl=0x0;
static fracr=0x0, ffracr=0x0, vcal=0x0;
static vcar=0x0;
; const _AC31=0x1f, _AC50000=0xc350, _AC16000=0x3e80;
; const _AC-1753413=0x977d0a40, _AC-1239850=0xb61962ea;
temp SL, Sr, SLC;
temp SLCr, SRCL, SRC;
temp Cl, Cr, Ct;
temp pLs, ppls, prs;
temp pprs, vldl, vlhr;
temp vlr, vrhr, vrr;
temp vlt1, vlt2, vrt1;
temp vrt2, vlrf, vrrf;
temp vlrfg, vrrfg, vsqrtl;
temp vsqrtr, sqrt1, sqrt2;
temp sqrt3, sqrt4, t1;
temp t2, fL, fR;
temp b_l, b_r, fraclf;
temp fracrf, pL, pR;
temp Lfront, Rfront, addLR;
temp addLRsq, vfd1, vfd2;
temp vfd3, vfd4, vrf;
temp vrff, fracf, fracff;
temp fracre, fracref, vred1;
temp vred2, vred3, vred4;
temp Lrear, Rrear, subLR;
temp subLRsq, vref, vreff;
temp b_f, b_re, vcaf;
temp vcare, pLLs, pRRs;
temp pLr, pRr, vcaxlr;
temp vcaxrr, vcaxtl, vcaxtr;
; Internal TRAM delay line (3200 samples; ~0.066667 sec)
idelay write vcaxl at 0x78;
idelay write vcacl at 0x3c;
idelay write vcaxr at 0x78;
idelay write vcacr at 0x3c;
idelay write vcaxf at 0xa0;
idelay write vcacf at 0x50;
idelay write vcaxre at 0xa0;
idelay write vcacre at 0x50;


; Code
macs vlhr, 0x0, pL, pL;
macs 0x0, 0x0, 0x0, 0x0;
macmv vld2, vld1, vld2, p2;
macmv vld1, vlhr, vld1, p1;
macmv t1, t1, vlhr, p0;
macmv vld4, vld3, vld4, a2;
macmv t1, t1, vld3, a1;
macs t2, accum, 0x0, 0x7fffffff;
macints vld3, 0x0, t2, sca;
macs vlrf, vld3, 0x0, 0x0;
macs vlr, 0x0, vlrf, 0x7fffffff;
log sqrt1, vlr, 0x1f, 0x1;
macs sqrt1, 0x40000000, sqrt1, 0x40000000;
exp fracl, sqrt1, 0x1f, 0x1;
macints fraclf, 0x0, fracl, 0xc350;
macs vrhr, 0x0, pR, pR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vrd2, vrd1, vrd2, p2;
macmv vrd1, vrhr, vrd1, p1;
macmv t1, t1, vrhr, p0;
macmv vrd4, vrd3, vrd4, a2;
macmv t1, t1, vrd3, a1;
macs t2, accum, 0x0, 0x0;
macints vrd3, 0x0, t2, sca;
macs vrrf, vrd3, 0x0, 0x0;
macs vrr, 0x0, vrrf, 0x7fffffff;
log sqrt2, vrr, 0x1f, 0x1;
macs sqrt2, 0x40000000, sqrt2, 0x40000000;
exp fracr, sqrt2, 0x1f, 0x1;
macints fracrf, 0x0, fracr, 0xc350;
macs Lfront, 0x0, in_L, vcaxf;
macs Rfront, 0x0, in_R, vcaxf;
macs addLR, Lfront, Rfront, 0x7fffffff;
macs addLRsq, 0x0, addLR, addLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vfd2, vfd1, vfd2, p2;
macmv vfd1, addLRsq, vfd1, p1;
macmv t1, t1, addLRsq, p0;
macmv vfd4, vfd3, vfd4, a2;
macmv t1, t1, vfd3, a1;
macs t2, accum, 0x0, 0x0;
macints vfd3, 0x0, t2, sca;
macs vrff, vfd3, 0x0, 0x0;
macs vrf, 0x0, vrff, 0x7fffffff;
log sqrt3, vrf, 0x1f, 0x1;
macs sqrt3, 0x40000000, sqrt3, 0x40000000;
exp fracf, sqrt3, 0x1f, 0x1;
macints fracff, 0x0, fracf, 0xc350;
macs Lrear, 0x0, in_L, vcaxre;
macs Rrear, 0x0, in_R, vcaxre;
macsn subLR, Lrear, Rrear, 0x7fffffff;
macs subLRsq, 0x0, subLR, subLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vred2, vred1, vred2, p2;
macmv vred1, subLRsq, vred1, p1;
macmv t1, t1, subLRsq, p0;
macmv vred4, vred3, vred4, a2;
macmv t1, t1, vred3, a1;
macs t2, accum, 0x0, 0x0;
macints vred3, 0x0, t2, sca;
macs vreff, vred3, 0x0, 0x0;
macs vref, 0x0, vreff, 0x7fffffff;
log sqrt4, vref, 0x1f, 0x1;
macs sqrt4, 0x40000000, sqrt4, 0x40000000;
exp fracre, sqrt4, 0x1f, 0x1;
macints fracref, 0x0, fracre, 0x3e80;
macs Cl, 0x0, pL, vcaxf;
macs Cr, 0x0, pR, vcaxf;
macs Ct, Cl, Cr, 0x7fffffff;
macs C, 0x0, Ct, vcaxf;
macs pLr, 0x0, pL, vcaxre;
macs pRr, 0x0, pR, vcaxre;
macsn SL, Lrear, Rrear, vcaxr;
macs SLC, 0x0, SL, 0x977d0a40;
macs SRCL, 0x0, Sr, 0xb61962ea;
macs pLs, SLC, SRCL, 0x7fffffff;
macs ppls, 0x0, pLs, 0x7fffffff;
macs pLLs, 0x0, ppls, 0x7fffffff;
macs Ls, 0x0, pLLs, vcaxl;
macsn Sr, Rrear, Lrear, vcaxl;
macs SRC, 0x0, Sr, 0x977d0a40;
macs SLCr, 0x0, SL, 0xb61962ea;
macs prs, SRC, SLCr, 0x7fffffff;
macs pprs, 0x0, pLs, 0x7fffffff;
macs pRRs, 0x0, pprs, 0x7fffffff;
macs Rs, 0x0, pRRs, 0x7fffffff;
macsn b_l, fraclf, fracrf, 0x0;
tstneg vcal, b_l, b_l, 0x0;
macsn b_r, fracrf, fraclf, 0x0;
tstneg vcar, b_r, b_r, 0x0;
macsn b_f, fracff, fracref, 0x0;
tstneg vcaf, b_f, b_f, 0x0;
macsn b_re, fracref, fracff, 0x0;
tstneg vcare, b_re, b_re, 0x0;
limitn vcacl, vcal, vcal, vcar;
macs vcaxl, 0x0, vcacl, 0x7fffffff;
limitn vcacr, vcar, vcar, vcal;
macs vcaxr, 0x0, vcacr, 0x7fffffff;
limit vcacf, vcaf, vcaf, vcare;
macs vcaxf, 0x0, vcacf, 0x7fffffff;
limit vcacre, vcare, vcare, vcaf;
macs vcaxre, 0x0, vcacre, 0x7fffffff;
macs pL, 0x0, in_L, vcaxl;
macs pR, 0x0, in_R, vcaxr;
macs vcaxlr, 0x0, vcaxl, 0x40000000;
macs vcaxrr, 0x0, vcaxr, 0x40000000;
macs L, fL, fR, vcaxrr;
macs fL, 0x0, pL, vcaxf;
macs R, fR, fL, vcaxlr;
macs fR, 0x0, pR, vcaxf;

end

Again, thanks if you are still willing to try it.
Maxon is offline   Reply With Quote
Old Mar 31, 2010, 12:33 AM Threadstarter Thread Starter   #20
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

So I've come to the point where based on how my plugin has been running from the tests that I have done, it would be appropriate to release a dane source file to be downloaded. I won't, however, until the latest source code has been reviewed and seen as good enough to release.

I've rewritten, and by effect, streamlined and significantly improved the rear speaker response. There is no doubt about them being separated into a 2 channel entity at all now. The front to rear channel separation is so effective now that if I play a song that biases a sound effect to the left or right channel by any extent (Green Machine by Kyuss is an excellent example that has a 100% bias for a guitar riff in the left channel at the beginning. I would provide a link, but there are no youtube videos that preserve the stereo image) that ((X)) will use its discretion to only have the sound play in the front or the rear of the biased end of a 5.1 speaker system, but not from both speakers unless it finds such an event to be the end conclusion. To these ends, If I give ((X)) a videogame or movie to work with, it effectively steers the environment through the five speakers and everything.

Don't misunderstand me; there is still room for improvement. The front speakers are all a bit close for my liking; the separation between the left, right and center is distinct, but I'd prefer it stronger. On the other hand, physically spacing out the speakers helped quite a bit, even if I could only move them about an inch or two. The delay between the rotation of a scene and the rotation of the sound is very slight, but noticeable if extra attention is paid. I currently believe that the problem can only be solved with a minimum-phase lowpass; either that or a shorter, more efficient lowpass. However, I have left this as the last task that I will tackle in lieu of reexaminations of other sections of the code to see what can be expanded on before I begin to write a new one.

All of the previous issues that I have mentioned, except for the lowpass one, have been resolved, although I am debating on testing it with an even shorter delay (the version below uses only 6 samples).

Finally, the only similarities between what I have finished and what I had posted above is that they share the same foundation and the latest one grew out of them. In other words, this version is, for all intents and purposes, distinct from them outside of the lowpass and variable names. I almost forgot, several variables have been removed too.

Quote:
; Generated by kX DSP Editor - microcode dump
name "((X)) Surround System";
; NOTE The present DSP microcode dump is protected by the
; license agreement bundled with the appropriate software
; package containing this microcode,
; regardless the particular copyright notice is present in the dump.

engine "kX";
created "05/02/2009";
guid "c96c0dfd-457a-4ff8-8a4c-abcd4db744d7";
itramsize 6;
; Registers
input in_L, in_R;
output L, R, Ls;
output Rs, C;
static vllp=0x0, vrlp=0x0, vld1=0x0;
static vrd1=0x0, vld2=0x0, vrd2=0x0;
static vld3=0x0, vrd3=0x0, vld4=0x0;
static vrd4=0x0, p0=0xb39c, p1=0x16738;
static p2=0xb39c, a1=0x7ff2795f, a2=0xc00ab830;
static sca=0x2, fracl=0x0, ffracl=0x0;
static fracr=0x0, ffracr=0x0, vcal=0x0;
static vcar=0x0, pshiftL=0x0, pshiftR=0x0;
static pshiftfL=0x0, pshiftfR=0x0, pshiftCl=0x0;
static pshiftCr=0x0;
; const _AC31=0x1f, _AC200=0xc8, _AC20000=0x4e20;
; const _AC10000=0x2710, _AC10000000=0x3b9aca00, _AC15185002=0x5a827999;
; const _AC18253610=0x6ccccccb, _AC19327352=0x73333332, _AC19465649=0x7406392e;
temp SL, Sr, Cl;
temp Cr, Ct, vldl;
temp vlhr, vlr, vrhr;
temp vrr, vlt1, vlt2;
temp vrt1, vrt2, vlrf;
temp vrrf, vlrfg, vrrfg;
temp vsqrtl, vsqrtr, sqrt1;
temp sqrt2, sqrt3, sqrt4;
temp t1, t2, fL;
temp fR, b_l, b_r;
temp fraclf, fracrf, pL;
temp pR, Lfront, Rfront;
temp addLR, addLRsq, vfd1;
temp vfd2, vfd3, vfd4;
temp vrf, vrff, fracf;
temp fracff, fracre, fracref;
temp vred1, vred2, vred3;
temp vred4, Lrear, Rrear;
temp subLR, subLRsq, vref;
temp vreff, b_f, b_re;
temp pLLs, pRRs, pLr;
temp pRr;
; Internal TRAM delay line (6 samples; ~0.000125 sec)
idelay write vcaxl at 0x2;
idelay write vcacl at 0x1;
idelay write vcaxr at 0x2;
idelay write vcacr at 0x1;
idelay write vcaxf at 0x6;
idelay write vcacf at 0x3;
idelay write vcaxre at 0x4;
idelay write vcacre at 0x2;


; Code
macs vlhr, 0x0, pL, pL;
macs 0x0, 0x0, 0x0, 0x0;
macmv vld2, vld1, vld2, p2;
macmv vld1, vlhr, vld1, p1;
macmv t1, t1, vlhr, p0;
macmv vld4, vld3, vld4, a2;
macmv t1, t1, vld3, a1;
macs t2, accum, 0x0, 0x7fffffff;
macints vld3, 0x0, t2, sca;
macs vlrf, vld3, 0x0, 0x0;
macs vlr, 0x0, vlrf, 0x7fffffff;
log sqrt1, vlr, 0x1f, 0x1;
macs sqrt1, 0x40000000, sqrt1, 0x40000000;
exp fracl, sqrt1, 0x1f, 0x1;
macints fraclf, 0xc8, fracl, 0x4e20;
macs vrhr, 0x0, pR, pR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vrd2, vrd1, vrd2, p2;
macmv vrd1, vrhr, vrd1, p1;
macmv t1, t1, vrhr, p0;
macmv vrd4, vrd3, vrd4, a2;
macmv t1, t1, vrd3, a1;
macs t2, accum, 0x0, 0x0;
macints vrd3, 0x0, t2, sca;
macs vrrf, vrd3, 0x0, 0x0;
macs vrr, 0x0, vrrf, 0x7fffffff;
log sqrt2, vrr, 0x1f, 0x1;
macs sqrt2, 0x40000000, sqrt2, 0x40000000;
exp fracr, sqrt2, 0x1f, 0x1;
macints fracrf, 0xc8, fracr, 0x4e20;
macs Lfront, 0x0, in_L, vcaxf;
macs Rfront, 0x0, in_R, vcaxf;
macs addLR, Lfront, Rfront, 0x7fffffff;
macs addLRsq, 0x0, addLR, addLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vfd2, vfd1, vfd2, p2;
macmv vfd1, addLRsq, vfd1, p1;
macmv t1, t1, addLRsq, p0;
macmv vfd4, vfd3, vfd4, a2;
macmv t1, t1, vfd3, a1;
macs t2, accum, 0x0, 0x0;
macints vfd3, 0x0, t2, sca;
macs vrff, vfd3, 0x0, 0x0;
macs vrf, 0x0, vrff, 0x7fffffff;
log sqrt3, vrf, 0x1f, 0x1;
macs sqrt3, 0x40000000, sqrt3, 0x40000000;
exp fracf, sqrt3, 0x1f, 0x1;
macints fracff, 0xc8, fracf, 0x2710;
macs Lrear, 0x0, in_L, vcaxre;
macs Rrear, 0x0, in_R, vcaxre;
macsn subLR, Lrear, Rrear, 0x7fffffff;
macs subLRsq, 0x0, subLR, subLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vred2, vred1, vred2, p2;
macmv vred1, subLRsq, vred1, p1;
macmv t1, t1, subLRsq, p0;
macmv vred4, vred3, vred4, a2;
macmv t1, t1, vred3, a1;
macs t2, accum, 0x0, 0x0;
macints vred3, 0x0, t2, sca;
macs vreff, vred3, 0x0, 0x0;
macs vref, 0x0, vreff, 0x7fffffff;
log sqrt4, vref, 0x1f, 0x1;
macs sqrt4, 0x40000000, sqrt4, 0x40000000;
exp fracre, sqrt4, 0x1f, 0x1;
macints fracref, 0x0, fracre, 0x3b9aca00;
macs pshiftCl, Lfront, 0x5a827999, pLr;
macs pshiftCr, Rfront, 0x5a827999, pRr;
macs Cl, 0x0, fL, pshiftCl;
macs Cr, 0x0, fR, pshiftCr;
macs Ct, Cl, Cr, 0x7fffffff;
macs C, 0x0, Ct, vcaxf;
macs pLr, 0x0, b_l, 0x6ccccccb;
macs pRr, 0x0, b_r, 0x6ccccccb;
macs pshiftL, Lrear, 0x7fffffff, pLr;
macs pshiftR, Rrear, 0x7fffffff, pRr;
macsn SL, Lrear, Rrear, pshiftR;
macs pLLs, 0x0, SL, 0x7fffffff;
macs Ls, 0x0, pLLs, 0x7fffffff;
macsn Sr, Rrear, Lrear, pshiftL;
macs pRRs, 0x0, Sr, 0x7fffffff;
macs Rs, 0x0, pRRs, 0x7fffffff;
macs b_l, 0x0, fraclf, 0x7fffffff;
macs b_r, 0x0, fracrf, 0x7fffffff;
macs b_f, 0x0, fracff, 0x73333332;
macs b_re, 0x0, fracref, 0x40000000;
limitn vcacl, b_l, b_l, b_r;
macints vcaxl, 0x0, vcacl, 0x4;
limitn vcacr, b_r, b_r, b_l;
macints vcaxr, 0x0, vcacr, 0x4;
limitn vcacf, b_re, b_re, b_f;
macints vcaxf, 0x0, vcacf, 0x20;
limitn vcacre, b_f, b_f, b_re;
macints vcaxre, 0x0, vcacre, 0x1;
macs pL, 0x0, in_L, vcaxl;
macs pR, 0x0, in_R, vcaxr;
macs pshiftfL, fL, 0x7406392e, pLr;
macs pshiftfR, fR, 0x7406392e, pRr;
macs L, fL, fR, pshiftfR;
macs fL, 0x0, pL, vcaxf;
macs R, fR, fL, pshiftfL;
macs fR, 0x0, pR, vcaxf;

end
Oh yeah, watch the PGR 4 Tokyo video. This new version makes it awesome!

Last edited by Maxon; Apr 24, 2010 at 02:11 AM. Reason: I forgot something that I wanted to say. Fixing a mistake
Maxon is offline   Reply With Quote
Old Apr 20, 2010, 10:58 PM   #21
HardwareHeaven Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 27
Rep Power: 0
BuzzT is on a distinguished road

Re: ((X)) Surround System

@Maxon: Your plugin is amazing. I just tested it with my 5.1 Speakers (Teufel E Magnum Power Edition).
Somehow the registration of it was a bit tricky. An error occured called "wrong plugin library", but I got it working by using a semicolon after "itramsize 6".
Your latest release is really a big step forward. Thanks for your efforts.
BuzzT is offline   Reply With Quote
Old Apr 24, 2010, 02:12 AM Threadstarter Thread Starter   #22
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

I always manage to miss a semicolon...:/
Sorry about that. I appreciate your response, and I was wondering if there are any specific problems that you have run into so far.
Maxon is offline   Reply With Quote
Old Jun 26, 2010, 02:58 AM Threadstarter Thread Starter   #23
HardwareHeaven Newbie
 
Join Date: May 2009
Posts: 12
Rep Power: 0
Maxon is on a distinguished road

Re: ((X)) Surround System

I have substantially improved the stereo width of the plugin. I have also successfully added in variable delay lines for the left-right and front-rear separation. I put the front-rear on the itram and the left-right on the xtram because they were much easier to distinguish that way. The only thing I have left to do now is write a minimum-phase lowpass.
Quote:
; Generated by kX DSP Editor - microcode dump
name "((X)) Surround System";
; NOTE The present DSP microcode dump is protected by the
; license agreement bundled with the appropriate software
; package containing this microcode,
; regardless the particular copyright notice is present in the dump.

engine "kX";
created "05/02/2009";
guid "c96c0dfd-457a-4ff8-8a4c-abcd4db744d7";
itramsize 10;
xtramsize 2;
; Registers
input in_L, in_R;
output L, R, Ls;
output Rs, C;
static vllp=0x0, vrlp=0x0, vld1=0x0;
static vrd1=0x0, vld2=0x0, vrd2=0x0;
static vld3=0x0, vrd3=0x0, vld4=0x0;
static vrd4=0x0, p0=0xb39c, p1=0x16738;
static p2=0xb39c, a1=0x7ff2795f, a2=0xc00ab830;
static sca=0x2, fracl=0x0, ffracl=0x0;
static fracr=0x0, ffracr=0x0, vcal=0x0;
static vcar=0x0, pshiftL=0x0, pshiftR=0x0;
static pshiftfL=0x0, pshiftfR=0x0, pshiftCl=0x0;
static pshiftCr=0x0;
; const _AC31=0x1f, _AC200=0xc8, _AC20000=0x4e20;
; const _AC10000=0x2710, _AC10000000=0x3b9aca00, _AC15185002=0x5a827999;
; const _AC13958643=0x53333332, _AC19465649=0x7406392e, _AC19327352=0x73333332;
; const _AC6=0x6;
temp SL, Sr, Cl;
temp Cr, Ct, vldl;
temp vlhr, vlr, vrhr;
temp vrr, vlt1, vlt2;
temp vrt1, vrt2, vlrf;
temp vrrf, vlrfg, vrrfg;
temp vsqrtl, vsqrtr, sqrt1;
temp sqrt2, sqrt3, sqrt4;
temp t1, t2, fL;
temp fR, b_l, b_r;
temp fraclf, fracrf, pL;
temp pR, Lfront, Rfront;
temp addLR, addLRsq, vfd1;
temp vfd2, vfd3, vfd4;
temp vrf, vrff, fracf;
temp fracff, fracre, fracref;
temp vred1, vred2, vred3;
temp vred4, Lrear, Rrear;
temp subLR, subLRsq, vref;
temp vreff, b_f, b_re;
temp pLLs, pRRs, pLr;
temp pRr, dvxl, dvxr;
temp dvxf, dvxre;
; Internal TRAM delay line (10 samples; ~0.000208 sec)
idelay read b_lrd at 0x0;
idelay write vcaxl at 0x0;
idelay write vcacl at 0x2;
idelay read b_rrd at 0x0;
idelay write vcaxr at 0x0;
idelay write vcacr at 0x2;
;
; External TRAM delay line (2 samples; ~0.000042 sec)
xdelay read b_frd at 0x0;
xdelay write vcaxf at 0x0;
xdelay write vcacf at 0x1;
xdelay read b_rerd at 0x0;
xdelay write vcaxre at 0x0;
xdelay write vcacre at 0x1;




; Code
macs vlhr, 0x0, pL, pL;
macs 0x0, 0x0, 0x0, 0x0;
macmv vld2, vld1, vld2, p2;
macmv vld1, vlhr, vld1, p1;
macmv t1, t1, vlhr, p0;
macmv vld4, vld3, vld4, a2;
macmv t1, t1, vld3, a1;
macs t2, accum, 0x0, 0x7fffffff;
macints vld3, 0x0, t2, sca;
macs vlrf, vld3, 0x0, 0x0;
macs vlr, 0x0, vlrf, 0x7fffffff;
log sqrt1, vlr, 0x1f, 0x1;
macs sqrt1, 0x40000000, sqrt1, 0x40000000;
exp fracl, sqrt1, 0x1f, 0x1;
macints fraclf, 0xc8, fracl, 0x4e20;
macs vrhr, 0x0, pR, pR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vrd2, vrd1, vrd2, p2;
macmv vrd1, vrhr, vrd1, p1;
macmv t1, t1, vrhr, p0;
macmv vrd4, vrd3, vrd4, a2;
macmv t1, t1, vrd3, a1;
macs t2, accum, 0x0, 0x0;
macints vrd3, 0x0, t2, sca;
macs vrrf, vrd3, 0x0, 0x0;
macs vrr, 0x0, vrrf, 0x7fffffff;
log sqrt2, vrr, 0x1f, 0x1;
macs sqrt2, 0x40000000, sqrt2, 0x40000000;
exp fracr, sqrt2, 0x1f, 0x1;
macints fracrf, 0xc8, fracr, 0x4e20;
macs Lfront, 0x0, in_L, vcaxf;
macs Rfront, 0x0, in_R, vcaxf;
macs addLR, Lfront, Rfront, 0x7fffffff;
macs addLRsq, 0x0, addLR, addLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vfd2, vfd1, vfd2, p2;
macmv vfd1, addLRsq, vfd1, p1;
macmv t1, t1, addLRsq, p0;
macmv vfd4, vfd3, vfd4, a2;
macmv t1, t1, vfd3, a1;
macs t2, accum, 0x0, 0x0;
macints vfd3, 0x0, t2, sca;
macs vrff, vfd3, 0x0, 0x0;
macs vrf, 0x0, vrff, 0x7fffffff;
log sqrt3, vrf, 0x1f, 0x1;
macs sqrt3, 0x40000000, sqrt3, 0x40000000;
exp fracf, sqrt3, 0x1f, 0x1;
macints fracff, 0xc8, fracf, 0x2710;
macs Lrear, 0x0, in_L, vcaxre;
macs Rrear, 0x0, in_R, vcaxre;
macsn subLR, Lrear, Rrear, 0x7fffffff;
macs subLRsq, 0x0, subLR, subLR;
macs 0x0, 0x0, 0x0, 0x0;
macmv vred2, vred1, vred2, p2;
macmv vred1, subLRsq, vred1, p1;
macmv t1, t1, subLRsq, p0;
macmv vred4, vred3, vred4, a2;
macmv t1, t1, vred3, a1;
macs t2, accum, 0x0, 0x0;
macints vred3, 0x0, t2, sca;
macs vreff, vred3, 0x0, 0x0;
macs vref, 0x0, vreff, 0x7fffffff;
log sqrt4, vref, 0x1f, 0x1;
macs sqrt4, 0x40000000, sqrt4, 0x40000000;
exp fracre, sqrt4, 0x1f, 0x1;
macints fracref, 0x0, fracre, 0x3b9aca00;
macs pshiftCl, pLr, 0x5a827999, Lfront;
macs pshiftCr, pRr, 0x5a827999, Rfront;
macs Cl, 0x0, fL, pshiftCl;
macs Cr, 0x0, fR, pshiftCr;
macs Ct, Cl, Cr, 0x7fffffff;
macs C, 0x0, Ct, vcaxf;
macs pLr, 0x0, vcaxl, 0x53333332;
macs pRr, 0x0, vcaxr, 0x53333332;
macs pshiftL, pLr,0x7406392e, Lrear;
macs pshiftR, pRr,0x7406392e, Rrear;
macsn SL, Lrear, Rrear, pshiftL;
macs pLLs, 0x0, SL, 0x7fffffff;
macs Ls, 0x0, pLLs, 0x7fffffff;
macsn Sr, Rrear, Lrear, pshiftR;
macs pRRs, 0x0, Sr, 0x7fffffff;
macs Rs, 0x0, pRRs, 0x7fffffff;
macs b_l, 0x0, fraclf, 0x7fffffff;
macs b_r, 0x0, fracrf, 0x7fffffff;
macs b_f, 0x0, fracff, 0x73333332;
macs b_re, 0x0, fracref, 0x40000000;
acc3 &b_lrd, dvxl, &vcaxl, 0x0;
limitn vcacl, b_l, b_l, b_r;
macints vcaxl, b_lrd, vcacl, 0x6;
acc3 &b_rrd, dvxr, &vcaxr, 0x0;
limit vcacr, b_r, b_r, b_l;
macints vcaxr, 0x0, vcacr, 0x6;
acc3 &b_frd, dvxf, &vcaxf, 0x0;
limitn vcacf, b_re, b_re, b_f;
macints vcaxf, 0x0, vcacf, 0x10;
acc3 &b_rerd, dvxre, &vcaxre, 0x0;
limitn vcacre, b_f, b_f, b_re;
macints vcaxre, 0x0, vcacre, 0x1;
macs pL, 0x0, in_L, vcaxl;
macs pR, 0x0, in_R, vcaxr;
macs pshiftfL, pLr, 0x7406392e, fL;
macs pshiftfR, pRr, 0x7406392e, fR;
macs L, fL, fR, pshiftfR;
macs fL, 0x0, pL, vcaxf;
macs R, fR, fL, pshiftfL;
macs fR, 0x0, pR, vcaxf;

end
Maxon is offline   Reply With Quote
Old Jun 26, 2010, 04:39 AM   #24
HardwareHeaven Senior Member
 
Join Date: Oct 2003
Posts: 409
Rep Power: 57
peate is just really nicepeate is just really nicepeate is just really nicepeate is just really nicepeate is just really nice

Re: ((X)) Surround System

I gave your plug-in a try on my old Live 5.1 and it rocks. Good job.It left room for more EQ's and effects.

Thanks.
peate is offline   Reply With Quote
Old Aug 18, 2011, 10:55 AM   #25
HardwareHeaven Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 27
Rep Power: 0
BuzzT is on a distinguished road

Re: ((X)) Surround System

Hello Maxon, any news about your "((X)) Surround System"? It's in use almost one year on my surround speaker setup. Like peate said - it really rocks!
BuzzT is offline   Reply With Quote
Reply

Thread Tools