If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Poly - Bypass Code Section
4 posts
• Page 1 of 1
Poly - Bypass Code Section
Trog had made in the past few modules, which perform the bypass section of code,
but they only work with mono signals.
No chance to do this in Poly?
The management of Poly afflicts me.
but they only work with mono signals.
No chance to do this in Poly?
The management of Poly afflicts me.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Poly - Bypass Code Section
Poly section is computed similar to mono4, each 4 channels run new code channels (you can observe that while playing and adding notes, each 4 new notes added the CPU rises). Stage0 is computed for each channel separately (I think) in the moment it starts, then stages 1-3 are computed for each 4 notes as they run. I mean when you play one note and hold it it starts with stage0 and goes stage2 afterwards. when you add new note, it computes stage0 for the new note and code continues as second channel in stage2 that is allready running.
To create bypass in poly section per voice you'd have to write the code that each channel is computed separately and bypassed separately. That would make the code 4x as long (and cpu 4x as high). There is a way to overcome this problem by shuffling. Basically if you set one channel in poly stream to off it would compute all streams as normal, but for the one that is off it would copy the input to output (override the output) - that wpuld have no effect on CPU. If all 4 channels are off it would truly bypass the code.
assembly version that bypasses output of every channel and bypasses the code execution of all sse channels are set to bypass
To create bypass in poly section per voice you'd have to write the code that each channel is computed separately and bypassed separately. That would make the code 4x as long (and cpu 4x as high). There is a way to overcome this problem by shuffling. Basically if you set one channel in poly stream to off it would compute all streams as normal, but for the one that is off it would copy the input to output (override the output) - that wpuld have no effect on CPU. If all 4 channels are off it would truly bypass the code.
- Code: Select all
streamin in;
streamboolin bypass;
streamout out;
float F5=5;
stage2;
//check if bypass all channels
movaps xmm0,bypass;
movaps xmm1,xmm0;
shufps xmm1,xmm1,177;
andps xmm0,xmm1;
movaps xmm1,xmm0;
shufps xmm1,xmm1,12;
shufps xmm0,xmm0,3;
andps xmm0,xmm1;
movd eax,xmm0;
cmp eax,0;
jnz bypasscode;
///The code to bypass
movaps xmm1,in;
mulps xmm1,F5;
movaps out,xmm1;
/// end of code
bypasscode:
// bypass any channel
// code version: out=out+(in-out)&bypass;
movaps xmm0,bypass;
movaps xmm1,xmm0;
andps xmm0,in;
andps xmm1,out;
subps xmm1,out;
subps xmm0,xmm1;
movaps out,xmm0;
assembly version that bypasses output of every channel and bypasses the code execution of all sse channels are set to bypass
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Poly - Bypass Code Section
anyway thanks.
what I think would be a management for voice,
for example,
using an "execute code only if the value is changed", now it is difficult to apply in poly,
like you said, would not bring benefits with splitting the voices comparation check.
what I think would be a management for voice,
for example,
using an "execute code only if the value is changed", now it is difficult to apply in poly,
like you said, would not bring benefits with splitting the voices comparation check.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Poly - Bypass Code Section
Above code is the closest you can get to that task
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 45 guests