Support

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

Position Synced StepLFO

Post any examples or modules that you want to share here

Re: PositionSyncedStepLFO - help?

Postby TrojakEW » Thu May 09, 2013 12:07 pm

quick look on asm and there are some changes. it can still be optimized more.
Code: Select all
//by nubeat7 may 2013
streamin barsIn;
streamin steps;
streamin timesigN;
streamin timesigD;
streamin PPQ;
streamin barstartHost;
streamout stepposition;

//float bars=0;
float beatsinbarsN=0;
//float beatsinbarsD=0;
//float barstart=0;
float barpos=0;
float rnd=0;
float F1=1;
// bars = xmm1
movaps xmm0,F1;maxps xmm0,barsIn;movaps xmm1,xmm0;

movaps xmm0,timesigN;mulps xmm0,xmm1;movaps beatsinbarsN,xmm0;

movaps xmm2,timesigD;mulps xmm2,xmm1;
//movaps beatsinbarsD,xmm0; = xmm2

movaps xmm1,barstartHost;divps xmm1,xmm2;movaps barpos,xmm1;

cvtps2dq xmm1,xmm1;cvtdq2ps xmm1,xmm1;
 
movaps rnd,xmm1;cmpps xmm1,barpos,6;movaps xmm0,F1;
andps xmm0,xmm1;movaps xmm1,rnd;subps xmm1,xmm0;
movaps xmm0,xmm2;mulps xmm0,xmm1;movaps xmm1,PPQ;
subps xmm1,xmm0;movaps xmm0,steps;divps xmm0,beatsinbarsN;
mulps xmm1,xmm0;movaps stepposition,xmm1;

User avatar
TrojakEW
 
Posts: 111
Joined: Sat Dec 25, 2010 10:12 am
Location: Slovakia

Re: PositionSyncedStepLFO - help?

Postby Nubeat7 » Thu May 09, 2013 2:01 pm

ah, thanks trojakEW, so like this, using more registers it is possible to eliminate4 cycles more and all variables (except F1) :) thats really great! slowly start to really like assambly :D

so here is the the latest optimized version
edit: check first file for latest version!
Last edited by Nubeat7 on Fri May 29, 2015 9:13 pm, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: PositionSyncedStepLFO - help?

Postby Father » Thu Jan 09, 2014 6:10 pm

Nubeat7 wrote:after finishing the code, this is the the finished version, from my point, notice that it only works correct in 4/4 atm! you can also find the codes for the "special rndint" to round streams down or up ....

This is the best syncing solution I've seen here that works solid. Thanks for sharing. However when bar set to less than 4 It doesn't loop the steps correctly, It keeps going 4bars then loops back to the beginning (fl studio).
I wanna make it a fixed 16 steps, and put a selector to change the speed from 1/32 to 4 bars. How can I do that?
Currently It plays my 16steps at the beginning of 4 bars then goes on and lopps back.
Father
 
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: PositionSyncedStepLFO - help?

Postby Nubeat7 » Thu Jan 09, 2014 6:53 pm

you mean when bars set to less then 1 or?
did some more optimizations will have a look during next days when i`m back home..
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: PositionSyncedStepLFO - help?

Postby Father » Thu Jan 09, 2014 8:01 pm

When the bar is 4, then it's perfect, after 4 bars it repeats the pattern, but when for example the bar is set to 2,in first two bars It plays the pattern twice as fast. then continues two more bars, after that comes back and repeats.
In 1bar, it's similar, 1 bar for steps, and 3 more bars.
strange behavior in bar=3! :D It gives it a nice triple rhythm, but It seems every time starts in +6 step position.
Thanks! I hope i can come up with something until then.
Father
 
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: PositionSyncedStepLFO - help?

Postby Nubeat7 » Fri Jan 10, 2014 9:01 pm

i dont know why this is happening it only happens in Fruity loops, just tested in demo version works normal in renoise and cubase, afaik the host sync and timing works a little different in Fruity loops but i have no idea how to fix this? i think ihas something to do with the barcount, maybe it needs some wise words from FL users, i never used FL...
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: PositionSyncedStepLFO - help?

Postby Nubeat7 » Fri Jan 10, 2014 10:31 pm

after some investigation i found out that it is because of the bars n beats settings in fruity loops, it looks like FL is handling this different to the others, anyway original it is build for 4/4 and you get similar troubles when using 3/4 or something different in cubase
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: PositionSyncedStepLFO - help?

Postby Father » Sat Jan 11, 2014 1:10 am

But this works so well, never looses the right position! It's so good not to fix it! :geek:
Can we set the bar to 4 (that works) and in order to get a shorter period, multiply the speed? or doesn't work that way at all?
I don't know why but It looks like the BarStart updates every 4 bar(16 beat), so it's, 0,16,32...etc. Isn't that suppose to update every 4 beat?
Father
 
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: PositionSyncedStepLFO - help?

Postby Nubeat7 » Sat Jan 11, 2014 8:43 pm

BarStart updates every 4 bar(16 beat), so it's, 0,16,32...etc. Isn't that suppose to update every 4 beat?

yes the FL bar timing seems to be a bit confusing with that...

all in all the whole code is not a real good solution for special rythms different to 4/4..

this one should work fine it is a much simpler and i think more correct way, it should also work right when using 7/8 or 3/4 rythms, just did some fast testing on it..

please tell me if something is wrong with it.

edit: check first file for latest version!
Last edited by Nubeat7 on Fri May 29, 2015 9:13 pm, edited 1 time in total.
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: PositionSyncedStepLFO - help?

Postby Father » Sun Jan 12, 2014 2:03 am

Nice! you're a genius man!
I did some stuff on my own way, but not as clean and optimized as yours and still have some work to do.
This works really good! I couldn't find anything wrong with it, But i will study it and try some crazy situation later to make sure. I will let you know If there was a problem. So far It's pretty much perfect. 8-)
Thanks a lot!
Update: It worked with any time signature and step size i tried in fl studio. It's amazing how you calculated the step position in one line!
Father
 
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

PreviousNext

Return to User Examples

Who is online

Users browsing this forum: No registered users and 26 guests