can some one help me with an assembler code? simple one

For general discussion related FlowStone
Post Reply
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

can some one help me with an assembler code? simple one

Post by djbrynte »

I wana add a pulse to the main line. Now i have 2 osc and i wana add a pulse to one of the osc.

SO basicly when i raise the volume of the pulse the main signal should take off. SO when its 50/50 there should be normal osc and the pulse one.

ANd when pulse is full there should only be a pulse there :)

so basicly i need to add 2 lines and 1 out for the control.

So its some mathematics. Like

in1 = main osc
in2 = pulse osc
in3 = pulse volume

And they should work like if u raise the volume of 1 the other should take off.

Duno what i need also i dont know if this affect the mixer volume?
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: can some one help me with an assembler code? simple one

Post by KG_is_back »

Code: Select all

streamin in1;
streamin in2;
streamin in3;
streamout out;

out=in1*in3+in2*(1-in3);

which also can be written as:

Code: Select all

out=in3*(in1-in2)+in2;


assembler optimized version:


Code: Select all

streamin in1;
streamin in2;
streamin in3;
streamout out;

movaps xmm0,in2;
movaps xmm1,in1;
subps xmm1,xmm0;
mulps xmm1,in3;
addps xmm1,xmm0;
movaps out,xmm1;
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: can some one help me with an assembler code? simple one

Post by djbrynte »

nice thank you il test it.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: can some one help me with an assembler code? simple one

Post by djbrynte »

The code isent working. I tested the optimized version. it doesent work at all.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: can some one help me with an assembler code? simple one

Post by djbrynte »

sry it worked it was just diffrent ways lol :P 1 is 2 instead.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: can some one help me with an assembler code? simple one

Post by djbrynte »

if i wana add a line in for Matrix LFO or ENV to Pulse how do i do it?
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: can some one help me with an assembler code? simple one

Post by djbrynte »

no one?
Post Reply