Re: ODD's and EVEN's in ASM
Posted: Fri Dec 29, 2023 6:50 pm
In the "bue" domain, stage 0 is executed once at the beginning and then we usully work with stage 2 to execute at every sample. We may make use of 4 SSE channels being initiated and executed in parallel, if we wish.
In the "white" poly domain, however, we face the problem that each instance of a DSP or ASM block assigns up to 4 notes to the 4 SSE channels. Now each note may start at a different time, but the stages process all four SSE channels in parallel. Therefore, stage 0 can at most initialize the first of four notes, but not the other three.
Trog discovered back then that ecx starts at zero at each new note (and then increments by 1 every sample), so this can be used to init each note. However, you need to know which of the four SSE channels to init. You probably do not want to disturb a running note. It is tricky!
In the "white" poly domain, however, we face the problem that each instance of a DSP or ASM block assigns up to 4 notes to the 4 SSE channels. Now each note may start at a different time, but the stages process all four SSE channels in parallel. Therefore, stage 0 can at most initialize the first of four notes, but not the other three.
Trog discovered back then that ecx starts at zero at each new note (and then increments by 1 every sample), so this can be used to init each note. However, you need to know which of the four SSE channels to init. You probably do not want to disturb a running note. It is tricky!