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

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

ODD's and EVEN's in ASM

For general discussion related FlowStone

ODD's and EVEN's in ASM

Postby R&R » Mon Oct 16, 2023 11:45 am

Oh no it's him... AGAIN. He sucks at ASM! Hide! :lol: :lol: :lol:

Experimenting with Multi Voice prim etc...

Code: Select all
streamin in; streamout out;
float f1 = 1;

cvtps2dq xmm0,in;
cvtps2dq xmm1,f1;
andps xmm0,xmm1;
cmpps xmm0, xmm1, 1;
andps xmm0,f1;
movaps out,xmm0;


Above atleast "looks" ok when i'm checking the Poly readout:

Poly readout directly from V-P prim's Id...
1st voice id 0 : 0
2nd voice id 1 : 0+1 = 1
3rd voice id 2 : 1+2 = 3
4th voice id 3 : 1+2+3 = 6
5th voice id 4 : 1+2+3+4 = 10
6th voice id 5 : 1+2+3+4+5 = 15
7th voice id 6 : 1+2+3+4+5+6 = 21
etc

Poly readout from my ASM snippet (connected to V-P prim's Id)
1st voice id 0 : 1
2nd voice id 1 : 1+0 = 1
3rd voice id 2 : 1+0+1 = 2
4th voice id 3 : 1+0+1+0 = 2
5th voice id 4 : 1+0+1+0+1 = 3
6th voice id 5 : 1+0+1+0+1+0 = 3
7th voice id 6 : 1+0+1+0+1+0+1 = 4
etc...

Can someone confirm my asm snippet is (atleast remotely) correct... or will it explode for unknown itty bit:y reason?
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: ODD's and EVEN's in ASM

Postby R&R » Mon Oct 16, 2023 11:53 am

Btw

I don't have access to latest FS4 beta. What version has the current beta reached?
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: ODD's and EVEN's in ASM

Postby Tepeix » Tue Oct 17, 2023 12:53 pm

I think it works and will not explode, but i'm not sure what it might really do.

There's maybe a possible problem, when you add new note a new voice is activated in the correct order
but if you stop to play one of the voice, it will maybe no more be 0,1,2 but for example 0,1,3.
And in this case the code will give 1 and not 2.
Tepeix
 
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: ODD's and EVEN's in ASM

Postby adamszabo » Tue Oct 17, 2023 12:56 pm

What are you trying to do, I don't understand
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: ODD's and EVEN's in ASM

Postby R&R » Tue Oct 17, 2023 2:45 pm

Tepeix wrote:There's maybe a possible problem, when you add new note a new voice is activated in the correct order
but if you stop to play one of the voice, it will maybe no more be 0,1,2 but for example 0,1,3.
And in this case the code will give 1 and not 2.


In my use case It might not matter. But it's a really good question in terms that I haven't considered the assigned id's for new notes, receiving the same id's as previous notes (not playing anymore). Maybe that is what you're refering to also? Interesting question nonetheless... Have to try and check somehow out of curiosity :)

adamszabo wrote:What are you trying to do, I don't understand


Me neither :lol:
Funny because it's the random asm snippet referenced by Spogg... that I think you made that led me into experimenting with this in particular... "Så... när man talar om trollen" as they say... ;)

I don't really have a definite goal or know what i'm trying to achieve at all :lol: But "I think" I'm leaning towards using this to create a "discount" unison (iow no advanced dephasing, stereospread or anything) just multi voice.
Detuning notes depending on if it's odd or even.

Ha! That reminds me... to take time and read your paper on supersaw 8-)
If I understand any of it, that is...

Never had multi voice in mind for my plugin but wouldn't cost me much overhead schematically, adding it to my "industrial noise-making machine" of a plugin. It will just eats up all voices and load the cpu completely... LOL

I don't really play keys or any instrument.
But anyway here's some random notes played on qwerty with multi voice (not using my asm snippet yet though):

Multi Voice

Some Random Notes

Harsh, but that's in line with how my newbie plugin sounds anyway :lol: :lol: :lol:
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: ODD's and EVEN's in ASM

Postby tulamide » Tue Oct 17, 2023 3:27 pm

R&R wrote:Detuning notes depending on if it's odd or even.

Yes, and your post title also talks about odd and even. But your code doesn't.

R&R wrote:Poly readout from my ASM snippet (connected to V-P prim's Id)
1st voice id 0 : 1
2nd voice id 1 : 1+0 = 1
3rd voice id 2 : 1+0+1 = 2
4th voice id 3 : 1+0+1+0 = 2
5th voice id 4 : 1+0+1+0+1 = 3
6th voice id 5 : 1+0+1+0+1+0 = 3
7th voice id 6 : 1+0+1+0+1+0+1 = 4
etc...

You're counting half of the actual voices in this readout. So...why?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: ODD's and EVEN's in ASM

Postby R&R » Tue Oct 17, 2023 3:48 pm

tulamide wrote:Yes, and your post title also talks about odd and even. But your code doesn't.

You're counting half of the actual voices in this readout. So...why?


:D
I don't have a working code or solution... currently I detune all playing voices using random numbers.

Only counting half in my "guesswork" above, since that's what "i'm hoping" (and infering) the asm does. Giving me 1 or 0 depending on Poly id being odd or even.
The goal with the asm is just to identify odd and even Poly id's. Maybe it doesn't work, that's why i'm asking... i'm no ASM:er :)

Don't know how to read or mask out streamdata per polystream so I only read (observ) the sum using a Polystream readout.
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: ODD's and EVEN's in ASM

Postby Tepeix » Tue Oct 17, 2023 5:46 pm

I understand more.

We could also do this in this way, in green or blue.

Using the trigger output of the V to P module with a combiner we get the number of active voice,
even if some are un-trigered.

(the pand instruction is the same as andps but for integer. But in 3.6 we could only use it with a variable.
it's supposed a little faster when dealing with integer, but i'm not even sure.)
Attachments
OddEven.fsm
(7.87 KiB) Downloaded 1492 times
Tepeix
 
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: ODD's and EVEN's in ASM

Postby R&R » Tue Oct 17, 2023 6:40 pm

Tepeix wrote:I understand more.

We could also do this in this way, in green or blue.

Using the trigger output of the V to P module with a combiner we get the number of active voice,
even if some are un-trigered.

(the pand instruction is the same as andps but for integer. But in 3.6 we could only use it with a variable.
it's supposed a little faster when dealing with integer, but i'm not even sure.)


Thanks Tepeix! Good idea!

In this specific case I need purely Poly. Still your solution for blue might come in handy for my Free LFO's later. I don't know exactly how yet :D but feels like this is something that might be needed since it's in blue :D

Recognize the thinking using blue, yet didn't think if it for odd/even asm :)
In later versions inside my synths scope... I sum voices in blue and subtract with poly triggers via M2F's to get active voices and a warning, not when reaching max voice, but the next trigger that exceeds the max voice is triggered (turning the text to yellow = warning). Works fairly well...


So the status is... approved by tepeix to seemingly look ok, but not yet confirmed to work as intended by tulamide :?

Ok here is a sound example is using my asm snippet: Multi Voice 2

At this many voices I'm not able to hear the difference if it's working or not. But at less voices it "seems" to work...
My synth was not designed to be a stereo synth like this AT ALL, so the notes are starting at different panning. But amazing how good it sounds anyway. Lots of fake width and phaser effects using this fake unison :D likely not mono compatible :P

Fun to play around with. But this will only be experimental feature in my newbie synth. Since it uses bonkers amount of oscillators... up to 64 oscillators "per note". Making the synth only 8 voice.

Live at the Necropolis: Lords of Synth
:lol: :lol: :lol:
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: ODD's and EVEN's in ASM

Postby R&R » Tue Oct 17, 2023 11:05 pm

R&R wrote:Fun to play around with. But this will only be experimental feature in my newbie synth. Since it uses bonkers amount of oscillators... up to 64 oscillators "per note". Making the synth only 8 voice.


Eh. No. Correction... More like 256 oscillators "per note" in some cases :lol: :mrgreen:

Only reason my synth is playable at all with this is thanks to Martins asm oscillators 8-)
My cpu wouldn't stand a chance otherwise.
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 57 guests