HardwareHeaven.com
Looking for the skin chooser?
 
 
  • Home

  • Reviews

  • Articles

  • News

  • Tools

  • GamingHeaven

  • Forums

  • Network

 

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


Reply
 
Thread Tools
Old Mar 6, 2007, 04:54 PM Threadstarter Thread Starter   #61
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Max M. View Post
yup, as Russ noticed:
Code:
; copy to avoid re-use error
macs x, InL, 0, 0
macs y, inR, 0, 0
macs z, x, 0, 0
    
; create cross mix
interp x, x, .5, y;
interp y, y, .5, z;
i see no "cross-mix" here too. y is always equal to x with this (simply because
"A + B = B + A" )
It would make the trick though - if you replace '.5' with some 'crossmix' control
(although it will be significant only for 'hard-stereo' input)
Ok I see what you guys mean-

Code:
	xtramsize 48001;

; Registers
	output out1, out2, out3, out4;
	input inL, inR;
	control feedback=0.5;
	control delay=0.8;
    static x, y, z;

   
    ; copy to avoid re-use error
    macs x, InL, 0, 0
    macs y, inR, 0, 0
    macs z, x, 0, 0
    
    ; create cross mix
    interp x, x, .25, y;
    interp y, y, .25, z;
    interp z, x, .5, y
    
    ; setup tram read and write points
    xdelay write wrt1a at 0;
    xdelay read rd1a at 0;
    xdelay read rd2a at 12000;
    xdelay read rd3a at 24000;
    xdelay read rd4a at 36000;
    

    ; offset delay read times by adjusting the read pointer	 
    macs &rd1a, &wrt1a, 0x1770000, delay;
    macs &rd2a, &rd1a, 0x1770000, delay;
    macs &rd3a, &rd2a, 0x1770000, delay;
    macs &rd4a, &rd3a, 0x1770000, delay;

	 ; Mix and output delayed samples
	 interp	 out1,  rd1a, .5 , x;
	 interp	 out2,  rd2a, .5 , y;
	 interp	 out4,  rd3a, .5 , y; 
	 interp	 out3,  rd4a, .5 , x; 
             

     ; Mix (in L+R) and write feedback to tram
     macs  wrt1a,  z,  out4,  feedback;
     	 
end
I *think* this makes more sense.
I got rid of the level control too as I use it as a send effect anyway.

Thanks again guys....


Mark
Maddogg6 is offline   Reply With Quote


Old Mar 6, 2007, 05:11 PM   #62
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Well it is all good, if it does what you want.

Here is what I see it doing (for out1):
out1 = (50% of (75% of inL + 25% of inR)) + (50% of delayed (50% of (75% of inL + 25% of inR)))

<edit>
Actually that is not right...
I forget to add out4 into the feedback... err nevermind
</edit>

Last edited by Russ; Mar 6, 2007 at 07:02 PM.
Russ is online now   Reply With Quote
Old Mar 6, 2007, 05:37 PM Threadstarter Thread Starter   #63
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
Well it is all good, if it does what you want.

Here is what I see it doing (for out1):
out1 = (50% of (75% of inL + 25% of inR)) + (50% of delayed (50% of (75% of inL + 25% of inR)))
hehe - you know me - Im not smart enough with this stuff to 'get what I want'... lol (specially since Im not sure what I want )

I'll be the first to admit, Im still not fully 'thinking' in a 'per sample' mind set...so I'm just listening for something I like.
And I thought it sounded cool with a 3/4 panning staccato guitar, so....

Now to concentrate out how to implement 'time' from samples with good ol *cough* C++ .
Maddogg6 is offline   Reply With Quote
Old Mar 6, 2007, 05:49 PM   #64
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Just so it is clear, with the way you are using x, y, and z in your code (writing to them first), thay are basically temp's (i.e. static is not needed), so the interp instruction is not doing a running average or anything like that, it is just mixing (which from your comments, seems to be what you wanted).
Russ is online now   Reply With Quote
Old Mar 6, 2007, 06:12 PM Threadstarter Thread Starter   #65
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
Just so it is clear, with the way you are using x, y, and z in your code (writing to them first), thay are basically temp's (i.e. static is not needed), so the interp instruction is not doing a running average or anything like that, it is just mixing (which from your comments, seems to be what you wanted).
Well - I *was* trying something like that - but it just seemed to make feedback times longer when I did... so I re-init those registers.

But I kept them statics as recommended in the guide.
Maddogg6 is offline   Reply With Quote
Old Mar 6, 2007, 06:22 PM   #66
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

And that makes sense, unless you are trying to do a ping-pong thing like Max does.

In any case, congrats on figuring out the whole TRAM addressing thing.

The more you play around with (any) code, the more things will start to makes sense, etc.
Russ is online now   Reply With Quote
Old Mar 6, 2007, 06:58 PM Threadstarter Thread Starter   #67
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
And that makes sense, unless you are trying to do a ping-pong thing like Max does.

In any case, congrats on figuring out the whole TRAM addressing thing.

The more you play around with (any) code, the more things will start to makes sense, etc.
maybe I'll try converting his (correction: hacking) Delays to be 4 channel as well later - but I want to get to the whole C++ changing registers thing (calculate time from samples and display) - which will lead to *gasp* trying the tempo detection....

thanks again for all you help everyone..

Mark
Maddogg6 is offline   Reply With Quote
Old Mar 7, 2007, 10:43 PM Threadstarter Thread Starter   #68
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Ok I hacked up Russ' Slap echo

I present 'Spank Me Echo'....

Quote:
; New microcode
name "Delay w Rear Spanks";
copyright "Copyright (c) 2007";
created "03/06/2007";
engine "kX";
comment "I call this: Slap me and Spank Me Echo";
; Based on Russ G Slap Back Echo
guid "35d4b6ff-e678-4abd-a284-b54cf1aa0cd2";
; -- generated GUID

; Registers
xtramsize 96002;

input inL, inR;
output fL, fR, rL, rR;

control Delay=.9, Feedback =.25;

; Set Tram Read and Write points
xdelay write wr1 at 0;
xdelay read rd1 at 0;

xdelay write wr2 at 12000 ;
xdelay read rd2 at 12000 ;

xdelay write wr3 at 24001;
xdelay read rd3 at 24001;

xdelay write wr4 at 60001;
xdelay read rd4 at 60001;


;Thanks again Russ
acc3 fL, inL, 0, 0;
acc3 fR, inR, 0, 0;

macs rL, fL, rd1, Feedback;
macs rR, fR, rd2, Feedback;
acc3 wr1, rL, 0, 0;
acc3 wr2, rR, 0, 0;
macs wr3, rL, rd3, Feedback;
macs wr4, rR, rd4, Feedback;

acc3 fL, fL, rd1, 0;
acc3 fR, fR, rd2, 0;
acc3 rL, rL, rd3, 0;
acc3 rR, rR, rd4, 0;


; ** Update Read Pointers **
;4 read pointers: 96000 / 4 = 24000
;ex 12000 * 0x800 = 0x1770000.
macs &rd1, &wr1, 0x1770000, Delay;
macs &rd2, &wr2, 0x1770000, Delay;
macs &rd3, &wr3, 0x4650000, Delay;
macs &rd4, &wr4, 0x4650000, Delay;

end

Last edited by Maddogg6; Mar 7, 2007 at 11:36 PM.
Maddogg6 is offline   Reply With Quote
Old Mar 7, 2007, 11:08 PM   #69
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

The following 2 instructions cause bad noise for me:

Code:
macs wr3, wr1, rd3, Feedback;
macs wr4, wr2, rd4, Feedback;
You probably should not read from a TRAM write address like that.
It should probably be (to give the same result without the noise):

Code:
macs wr3, rL, rd3, Feedback;
macs wr4, rR, rd4, Feedback;
Other then the above, it seems to work good
Russ is online now   Reply With Quote
Old Mar 7, 2007, 11:22 PM Threadstarter Thread Starter   #70
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Ah - I think it needs to lower the level - the stacking is prolly overloading Wr3/4.

But your change -changed the behaviour.. (the rear lost its 'faster' delay)

This is more what it should sound like:
Quote:
macs l, fL, rd1, Feedback;
macs r, fR, rd2, Feedback;
macs wr1, l, 0, 0;
macs wr2, r, 0, 0;


macs l, l, rd3, Feedback;
macs r, r, rd4, Feedback;
macs wr3, 0, l, .5;
macs wr4, 0, r, .5;
That sounds more like intended.
Maddogg6 is offline   Reply With Quote
Old Mar 7, 2007, 11:30 PM   #71
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Quote:
Originally Posted by Maddogg6 View Post
Ah - I think it needs to lower the level - the stacking is prolly overloading Wr3/4.

But your change -changed the behaviour.. (the rear lost its 'faster' delay)

This is more what it should sound like:


That sounds more like intended.
Your right, my suggestion was not quite the same thing, but the noise was not an overloading problem.

i.e. (this code should do what original code did (and works ok for me without lowering the level)):

Code:
acc3 fL, inL, 0, 0;
acc3 fR, inR, 0, 0;    

macs rL, fL, rd1, Feedback;
macs rR, fR, rd2, Feedback;
acc3 wr1, rL, 0, 0;
acc3 wr2, rR, 0, 0;
macs wr3, rL, rd3, Feedback;
macs wr4, rR, rd4, Feedback;
...

Last edited by Russ; Mar 7, 2007 at 11:44 PM.
Russ is online now   Reply With Quote
Old Mar 7, 2007, 11:37 PM Threadstarter Thread Starter   #72
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
Your right, my suggestion was not quite the same thing, but the noise was not an overloading problem.

i.e. (this code should do what original code did (and works ok for me without lowering the level)):

Code:
acc3 fL, inL, 0, 0;
acc3 fR, inR, 0, 0;    

macs rL, fL, rd1, Feedback;
macs rR, fR, rd2, Feedback;
acc3 wr1, rL, 0, 0;
acc3 wr2, rR, 0, 0;
macs wr3, rL, rd3, Feedback;
macs wr4, rR, rd4, Feedback;
...
Yup thats it - I changed my original to free up those 2 tmps I added.
And of course credit for your suggestion too...

Mark

edit - Im better at naming plugins than making them.. what can I say...
Maddogg6 is offline   Reply With Quote
Old Mar 7, 2007, 11:42 PM   #73
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

No, it worked good, except for that one part. I am just surprised you did not notice the noise (was pretty severe for me).
Russ is online now   Reply With Quote
Old Mar 7, 2007, 11:49 PM Threadstarter Thread Starter   #74
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
No, it worked good, except for that one part. I am just surprised you did not notice the noise (was pretty severe for me).
Naa - worked fine for me - but I was using lower level inputs - and did notice that it 'peaked' the rears when I boosted input levels - but 'sounded' fine otherwise - So just Looked like overload on my end.

Now - the rears output never exceed the inputs levels - as it should be anyway...
Maddogg6 is offline   Reply With Quote
Old Mar 7, 2007, 11:56 PM   #75
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Well, I like it, good job
Russ is online now   Reply With Quote
Reply

Bookmarks

Thread Tools