Old 03-22-2017, 09:27 AM   #1
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default JS not more than 2 channels?

desc:Swaps 2x2ch Stereo channels

@sample
spl0=spl2;
spl1=spl3;
spl2=spl0;
spl3=spl1;


Simply suppose to swap stereo channels and doesn't work. Seems that the upper channels are not working.

I get no output when the plugin is active(I only have audio in on ch1&2)

But, of course,

desc:Swaps 2x2ch Stereo channels

@sample
spl0=spl0;
spl1=spl1;
spl2=spl2;
spl3=spl3;


works, except for the higher channels. Surely this is a bug in JS. The docs say it supports up to 64 channels, but it clearly doesn't.
Airal is offline   Reply With Quote
Old 03-22-2017, 09:33 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Quote:
@sample
spl0=spl2;
spl1=spl3;
spl2=spl0;
spl3=spl1;
won't work
As it is overwriting 0 and 1 with 2 and 3 (both zero signals), then using 0 and 1 to overwrite 2 and 3.

So you would need audio on 2 and 3 and some intermediate storage for 0 and 1.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 03-22-2017, 10:06 AM   #3
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Yeah, what DarkStar said --
Code:
a = spl0; spl0 = spl2; spl2 = a;
a = spl1; spl1 = spl3; spl3 = a;
...or (but overkill and ultimately less efficient):
Code:
atomic_exch(spl0,spl2);
atomic_exch(spl1,spl3);
(moving this to the JSFX forum)
Justin is offline   Reply With Quote
Old 03-22-2017, 10:07 AM   #4
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Code:
@sample

a = spl0;
b = spl1;
c = spl2;
d = spl3;
spl0 = c;
spl1 = d;
spl2 = a;
spl3 = b;
bezusheist is offline   Reply With Quote
Old 03-22-2017, 10:34 AM   #5
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default

Thanks. I guess that was a brain fart moment. For some reason I thought reaper wouldn't sort of do the temp assignments first... not sure why ;/
Airal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.