Page 4 of 7

Re: working Assembler memin workareound!!!

Posted: Thu May 29, 2014 10:55 pm
by adamszabo
So whats the advantage of using this method, than the wavetable reader cyto posted once on the SM forums? His seems to use less cpu according to my laptop.

Re: working Assembler memin workareound!!!

Posted: Thu May 29, 2014 11:57 pm
by KG_is_back
Well, I quite struggled with the actual code, so I'm aware the example is suboptimal.

This method has the advantage that you can create custom mem based components directly in assembly, that can read or/and write multiple values in a single cycle. That may greatly simplify and improve many algorithms. For example you can create stream FFT based components with no need for serialization ( =much less latency) and more optimal interpolation algorithms for wave readers and wavetable oscillators in a single assembler component.
And mainly: TRANSFER ARRAYS BETWEEN CODE COMPONENTS!

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 8:49 am
by tester
FFT analyzer at 128 to 512kpts? :mrgreen:

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 12:02 pm
by KG_is_back
tester wrote:FFT analyzer at 128 to 512kpts? :mrgreen:


You can easily adjust trogs streamFFT to receive mem as input and output this way.

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 12:32 pm
by tester
I other words you did the second half of impossible. :-)

For about 3 years I thought it's not possible to have high resolution FFT analyzer in SM/FS. So the only thing will be then to resample the output array according to some sort of zooming factor or do some sort of smart split (edges), before thigs get green, because FS greenery can handle relatively well arrays up to 16kpts.

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 3:12 pm
by KG_is_back
Here a working example. I reworked trogs streamFFT to receive mem as input and output. The algorithm itself should work without problems (you may connect the "dummy" connectors just in case to maintain proper execution order). What keeps bugging is the analyzer primitive. Sometimes it adds random codelines to its code output and that messes up memory pointer extraction. If the schematic is not working look inside the mem to pointer modules and check if they generate the same code. If you find one with extra code lines delete it add new one and reconnect it.

I do not know what is the source of this bug (or even if it actually is a bug) and have no idea how to fix it.

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 4:38 pm
by martinvicanek
Wicked!! :ugeek: :ugeek:

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 4:52 pm
by tester
At this point, maybe it's a good idea to ask Malc if he can help, maybe something can be done in the FS core.

Is the code randomized, or these extra lines are additional? I.e. in which way? Maybe there is a way to filter these lines.

Re: working Assembler memin workareound!!!

Posted: Fri May 30, 2014 6:38 pm
by KG_is_back
I'm still using FS 3.0.2 (firefly) so the problem might have been fixed already. If any of you experience it in newer versions I'll write a full report with print screens and contact Malc... Please test the mem to pointer module in your schematics and check if the problem is present on your schematics too. It seems to happen quite randomly especially on startup or when you copy-paste the M.t.P. module

Re: working Assembler memin workareound!!!

Posted: Sat May 31, 2014 10:08 pm
by tester
Hey KG.

I'm a little bit lost. Using trog's solution, I created somehow some time ago that little thing that allows precise spectral filtering (max resolution here is 32kpts, but that's enough for filtering). From what I can see - your solution eliminates many duplicated modules and thus - works faster. Could you see how to rework it onto your way?