|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
HardwareHeaven Junior Member
Join Date: Feb 2003
Posts: 23
Rep Power: 0 ![]() |
CrossFading
Why not add a crossfading dsp ?
------------------- |-IN1L OUTL-| |-IN1R OUTR-| |-IN2L | |-IN2R | ------------------- when the cursor is put all has right, all the sound of IN1 and no sound of IN2 are sent to OUT when one gradually brings the cursor to the center, the sound of IN2 is added gradually to OUT, while leaving the totality of the sound of IN1 with OUT, to finish has an addition of the 2 sources has identical volume. and so on for the left ... i have an external midi controler, so if someone can build this 'dsp', it will be very useful for me ... i think its not harder than build a stereo mixer ... thanks a lot, and sorry for my bad english ... |
|
|
|
|
|
#2 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
like that maybe ;)?
Code:
name "switch-mix" copyright "copyright: kX Project 2003." created "just after the big boom" guid "fcddd587-20ec-4560-bc82-0827f79c4f51" input in0l, in0r, in1l, in1r output out1, out2 control switch = 0 interp out1, in0l, switch, in1l interp out2, in0r, switch, in1r end
__________________
|
|
|
|
|
|
|
|
HardwareHeaven Junior Member
Join Date: Feb 2003
Posts: 23
Rep Power: 0 ![]() |
humm yes, but when set to 50%, 100% In1 and 100% In2 go to Out ...
maybe : Code:
name "linear crossfade" copyright "copyright: kX Project 2003." created "just after the big boom;thanks to maxM and kX,the best drivers i ever seen" guid "fcddd587-20ec-4560-bc82-0827f79c4f51" input in0l, in0r, in1l, in1r output out1, out2 control switch = 0 interp out1, in0l, 2*(switch>0.5)*(switch-0.5), in1l interp out2, in0r, 2*(switch<0.5)*(-switch+0.5), in1r end is switch is considered as a vars ? Last edited by fensoft; Mar 3, 2003 at 01:41 PM. |
|
|
|
|
|
#4 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
ah, i think i understood you incorrectly, then you mean that when switch is at 100% both in1 and in2 should go to out with full level? or? (i think "cross" word confused me).
__________________
|
|
|
|
|
|
#5 |
|
HardwareHeaven Lover
Join Date: Feb 2003
Posts: 213
Rep Power: 0 ![]() |
It's a dj cross function, full left = channel 1 goes to out, full right is channel 2 goes to out, and the mid position is both channels go to out (100% of both chans)
going from left to center, mixes channel 2 increasingly together with chan 1, and from center to right, channel 1 gets mixed out of the output |
|
|
|
|
|
#6 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
ah, i see... ok... then above code does slightely different.. when switch is at 50%, in1/in2 go to out with 50% levels... hmm... let me think...
__________________
|
|
|
|
|
|
#7 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
Then i hope that the following code will do the trick
(however one should write the real plugin then - since it makes no sence to execute first two instructions 48000 times per second) Code:
name "ok, hmm... djcf2003? ;)"; copyright "kX Project 2003." created "almost just after the big boom" guid "f8f2ae63-91ea-425d-9dcb-5dbe6ddafd2d"; input in0l, in0r, in1l, in1r output outl, outr control switch temp x, y macints y, 0, switch, 2i macints x, accum, 1, -2i macsn 0, 0, in0l, x macs outl, accum, in1l, y macsn 0, 0, in0r, x macs outr, accum, in1r, y end
__________________
Last edited by Max M.; Mar 3, 2003 at 09:16 PM. |
|
|
|
|
|
#8 |
|
Freedom is a feature.
|
Will this be included in 3531?
![]() Looks cool
__________________
-- Vedran |
|
|
|
|
|
|
|
HardwareHeaven Junior Member
Join Date: Feb 2003
Posts: 23
Rep Power: 0 ![]() |
[OOPS, SORRY, i've erased your post by mistake, my apologies... too many buttons around there... well... sorry again... could it be to hard for you to reproduce some stantments of it?]
/bad Max ;( Last edited by Max M.; Mar 3, 2003 at 11:58 PM. |
|
|
|
|
|
#10 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
>>however one should write the real plugin then
>is it very problematic ? what consequence ? well, no (i mean no problemo)... >and it seems to corupt the stereo it should not, i cannot reproduce such behaviour... maybe you've seen some "clue"... sometimes it happens... >and ... it is as10k1 code it is not as10k1 code, it is Dane code... but since both assemblers are written for the same dsp and syntaxes (at least their pure assembly part) are less or more similiar, as10k1 manual is recommended as the only less or more detailed general guide to emu10kx dsp assembly available for the moment...>i think its because of accum... maybe... another unknown accum side effect?... although i still cannot reproduce such... nevermind though... ![]() btw. your card model?
__________________
|
|
|
|
|
|
#11 |
|
DriverHeaven Addict
Join Date: Dec 2002
Posts: 259
Rep Power: 0 ![]() |
Ups, nice use of accum register Max. I writed another one, but mine uses much more registers and instructions. Of course, with a dll this effect would be much more simple.
Here is my code, larger but more "linear" if a dll is not avaliable: Code:
name "you don't have to be good, to be my girl... :drool: ";
copyright "Copyright (c) 2003.";
created "03/03/2003";
engine "kX";
guid "2ad36552-c7ac-4421-a95f-f2440f35d0a7";
input in0L,in0R,in1L,in1R
output outL, outR
control switch = 0.5
temp s,i0L,i0R,i1L,i1R
macs i0L,0,in0L,0.5
macs i0R,0,in0R,0.5
macs i1L,0,in1L,0.5
macs i1R,0,in1R,0.5
macints s,0,switch,0x2
macs outL,i0L,i1L,s
macs outR,i0R,i1R,s
macsn s,switch,0.5,1
skip ccr,ccr,0x4,0x3
macints s,1,s,-2i
macs outL,i1L,i0L,s
macs outR,i1R,i0R,s
end
|
|
|
|
|
|
#12 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
"Linear" - what this means?. "Saturation" - well, the one can just set master level to 0.5 (since saturation occures just right before output in epilog - not in plug-in, there's no sense to put all eggs into one basket)...
__________________
|
|
|
|
|
|
|
|
HardwareHeaven Junior Member
Join Date: Feb 2003
Posts: 23
Rep Power: 0 ![]() |
Max's crossfader doesn't work : look at http://fensofty.free.fr/onlyleft.jpg ; input left and output left and right ...
i remade this code, and seems to work better just copy&paste 2 linesCode:
name "ok, hmm... djcf2003? "; copyright "kX Project 2003." created "almost just after the big boom" guid "f8f2ae63-91ea-425d-9dcb-5dbe6ddafd2d"; input in0l, in0r, in1l, in1r output outl, outr control switch temp x, y macints y, 0, switch, 2i macints x, accum, 1, -2i macsn 0, 0, in0l, x macs outl, accum, in1l, y macints y, 0, switch, 2i macints x, accum, 1, -2i macsn 0, 0, in0r, x macs outr, accum, in1r, y end |
|
|
|
|
|
#14 |
|
DriverHeaven Addict
Join Date: Dec 2002
Posts: 259
Rep Power: 0 ![]() |
fensoft, Max plugin works correctly. That photo doesn't show his "normal" behavior. Although some times I have observerd such "errors" in other situations. May be that two lines solves some kind of problem with accumulator.
Max, you are true. In my design, temporal regsiters are needed, so I killed two birds in one shoot dividing inputs by two. But I have made the comparison and both desings gives the same results. |
|
|
|
|
|
#15 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
ok, then we've got something that will work untill integrated one (31?) one way or another. Kxl version will require only four instructions and two registers (excluding i/o). Even additional "gain" fader can be made with no register cost. nice.
__________________
|
|
|
|
![]() |
| Thread Tools | |
|
|