Page 1 of 2

FX ordering on the fly

Posted: Sun Sep 29, 2013 1:55 am
by Nubeat7
for shure you all know how to reordering your signalflow using busses, it is pretty handy but the audiodropouts and the work to avoid audiocrackles because of recompiling is really annoying, so i thought it would be great to havea solution in DSPcode/asm to reorder your fx on the fly without any audio dropouts...

for the ruby selector i used some technics from trogs cell array - thanks for that!

Re: FX ordering on the fly

Posted: Sun Sep 29, 2013 11:35 am
by Nubeat7
did a few changes, ruby code was a bit buggy, i added a preset part so the fx order can be save in presets now, and you can custumize the graphic easier and better now.. updated file in the first post

Re: FX ordering on the fly

Posted: Sun Sep 29, 2013 12:11 pm
by Jay
very cool m8! i was using the one Trogg created a while back and it was good except it crashed when changing efx order whilst sound was running! this is great though! cheers! :D

Re: FX ordering on the fly

Posted: Sun Sep 29, 2013 2:06 pm
by Nubeat7
thanks jay,
yes, trogs fx chainer was my inspiration for this one
you also could use just the streampart of this one in trogs fx chainer, just delete all the audio parts in trogs chainer and place this one instead, so you can use trogs grafx part which is really neat with the transparent moving selection window while dragging...

but the benefit of this one is that you can place teh slots in different ways using the rows, or if you want to place each area individual you could change the createArrays methode to something like this:

Code: Select all

def createArrays
  cell_w = 5
  cell_h = 2
  @areas = []
  @areas[0] = [0,0,cell_w,cell_h]
  @areas[1] = [2,5,cell_w,cell_h]
  @areas[2] = [4,10,cell_w,cell_h]
  @areas[3] = [6,15,cell_w,cell_h]
end


and the ordering will still work..

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 12:37 am
by Nubeat7
finally, i added a ghost slot which appears when dragging a slot from one position to another.

i also implemented a second option how the position changing is done, you can choose between "swap positions" and "insert at position" in the swapOrder methode

a question to all DSP code and asm gurus, can this code be optimised in any way? i was watching the asm code for it but couldn`t really optimize anything inside?

the updated file is in first post

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 2:46 am
by MyCo
Here is my quick&dirty approach. I haven't tested this! It shortens the code and eliminates the selector. Maybe an assembler version could use an array in this version. It would require some testing if the memory access for a 5 item array is faster than doing 20 cmpps+andps plus 15 orps.

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 10:05 am
by Nubeat7
thanks a lot myco, asm from the dsp code is already about the half of the previous version!

but you went in the same trap as me when i was doing the first version, all if statements have to be in braces to work right.

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 11:25 am
by Nubeat7
MyCo wrote:..Maybe an assembler version could use an array in this version. It would require some testing if the memory access for a 5 item array is faster than doing 20 cmpps+andps plus 15 orps.


did you mean something like this?

just couldnt get it work :(

Code: Select all

float ArrFrom[5];

ArrFrom[0] = fromAudioIn;
ArrFrom[1] = fromFX0;
ArrFrom[2] = fromFX1;
ArrFrom[3] = fromFX2;
ArrFrom[4] = fromFX3;

toFX0   = ((asgAudioIN == 0) & ArrFrom[0])
      | (ArrFrom[asgFX0To]);
toFX1   = ((asgAudioIN == 1) & ArrFrom[0])
      | (ArrFrom[asgFX1To]);
toFX2   = ((asgAudioIN == 2) & ArrFrom[0])
      | (ArrFrom[asgFX2To]);
toFX3   = ((asgAudioIN == 3) & ArrFrom[0])
      | (ArrFrom[asgFX3To]);

toAudioOut = ((asgFX0To == 4) & ArrFrom[0])
         | ((asgFX1To == 4) & ArrFrom[1])
         | ((asgFX2To == 4) & ArrFrom[2])
         | ((asgFX3To == 4) & ArrFrom[3]);

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 12:14 pm
by MyCo
You think way to complicated :mrgreen:

Re: FX ordering on the fly

Posted: Mon Sep 30, 2013 12:58 pm
by Nubeat7
MyCo wrote:You think way to complicated :mrgreen:


but the surprise to see how easy it is is always great :lol:

thanks, for the help, i did a fast performance test in one of my projects, and the array version needs 0.3% more cpu than the if /or version .. watch the first post for optimized versions of both..