Stream Router.

For general discussion related FlowStone
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Stream Router.

Post by Nubeat7 »

you re welcome nix!

you can still optimize 3 movaps in assembler
here the optimized one

Code: Select all

streamin index;
streamin v1;
streamin v2;
streamin v3;
streamout value;

float F0=0;
float F1=1;
float F2=2;

movaps xmm0,index;
cmpps xmm0,F0,0;
andps xmm0,v1;
movaps xmm1,index;
cmpps xmm1,F1,0;
andps xmm1,v2;
orps xmm0,xmm1;
movaps xmm1,index;
cmpps xmm1,F2,0;
andps xmm1,v3;
orps xmm0,xmm1;
movaps value,xmm0;
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Stream Router.

Post by nix »

nice one!
I will use the DSP code one coz I can follow it better,
but I see you shuffling registers there,
will remember and file this piece of code if I care to delve into ASM.

Joe may very well be interested to see what you've done there.
We have been internet mates for years-
it's only recently he has started developing himself.
joejoe
Posts: 23
Joined: Mon Oct 21, 2013 2:28 am

Re: Stream Router.

Post by joejoe »

nubeat7,

Thanks a lot your code appears to be useful also. Using the | or as you say equivalent to "or" would that be how one could merge two signals down a single bus but not necessarily performing an addition to two or more the signals?
joejoe
Posts: 23
Joined: Mon Oct 21, 2013 2:28 am

Re: Stream Router.

Post by joejoe »

Where could I get a full list of expressions for the DSP code component?

What language is the DSP code, technically?
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Stream Router.

Post by Nubeat7 »

hi joejoe,

you are welcome,
the language is fs/sm`s own dsp language , you can find some words in the user guide (s.222) including a list of possible expressions and some words about buffers, hopping and stages ..
sadly there is not much more info or tutorials to find somewhere ..

just here a little bit :
http://www.synthmaker.co.uk/dokuwiki/do ... ssignments
strangeChild
Posts: 47
Joined: Sat Apr 27, 2013 8:04 pm

Re: Stream Router.

Post by strangeChild »

What's wrong with using the selector primitive? :?
capture.png
capture.png (8.37 KiB) Viewed 13821 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Stream Router.

Post by Nubeat7 »

if i understood it right routing via the selector prim does a recompile of the code which has its issues in some situations (audiodropouts or crackles)
strangeChild
Posts: 47
Joined: Sat Apr 27, 2013 8:04 pm

Re: Stream Router.

Post by strangeChild »

I've used it extensively with audio steams and as long as the there are no discontinuities in the signal (i.e. the streams f(t) and g(t+1) are near each other) then there is no problem. If they are not either method will have a problem.

Edit = hmm was going to post 'proof' but there's an audible click where there shouldn't be.
I could have sworn this worked before. :oops:
strangeChild
Posts: 47
Joined: Sat Apr 27, 2013 8:04 pm

Re: Stream Router.

Post by strangeChild »

I think I've figured out when it's OK and not OK to use selector.

As long as the stream you're turning off is still being called somewhere it will work fine. If not there's an audible click as it shuts down, even if the new stream is in sync with it.

In many routing applications this is not a problem as the signal is still getting calculated. But I can see going with the coded variety to avoid the potential problem.
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Stream Router.

Post by trogluddite »

It's often more of a problem with white poly streams than the blue ones - the switching has a nasty habit of resetting all the envelopes etc. of any playing notes (calls to stage(0) = code/assembly intialisation stage).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Post Reply