Custom DSP Code 2 (comunity project)

For general discussion related FlowStone
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Custom DSP Code 2 (comunity project)

Post by Perfect Human Interface »

It would be frustrating to have a bug in a complex code and not be certain whether the bug was yours or the compiler's. Nonetheless, keep up the good work.

An editor doesn't seem like it would be the hardest thing about all of this. I'd think if you can interpret the code you could interpret what color each chunk of characters should be.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Custom DSP Code 2 (comunity project)

Post by KG_is_back »

Perfect Human Interface wrote:It would be frustrating to have a bug in a complex code and not be certain whether the bug was yours or the compiler's. Nonetheless, keep up the good work.An editor doesn't seem like it would be the hardest thing about all of this. I'd think if you can interpret the code you could interpret what color each chunk of characters should be.


Well, function pack makers will have to make sure their function pack is bugless, and give a warning if the function(s) in their pack may potentially crash under certain circumstances. It's a price of the modularity of this project.

Also, While loops may also crash the code if infinite loop occurs. It's inevitable - some features simply are natural "crashers" in any programing language.

As for the editor, marking parts of text to be colored is the easy part on the compiler code. What I find to be the issue is to display the colored code on screen and make it editable.
Youlean
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Custom DSP Code 2 (comunity project)

Post by Youlean »

Great work! Thanks for sharing that!
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Custom DSP Code 2 (comunity project)

Post by Perfect Human Interface »

KG_is_back wrote:As for the editor, marking parts of text to be colored is the easy part on the compiler code. What I find to be the issue is to display the colored code on screen and make it editable.


Well, easy I guess would be just using the edit box and then feeding the text into another display box that draws all the colored text. Obviously a bit disjointed and not exactly what we're looking for. :P

Is all this font drawing and editing stuff built-in to Windows or something? Seems a DLL component would be the way to go. I can't imagine people just write their own text editors for every piece of software made.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Custom DSP Code 2 (comunity project)

Post by KG_is_back »

OK guys, here's a alpha version. It currently only supports limited features - standard mathematic/logic/comparison operators and a small basic function pack: abs(a),min(a,b),max(a,b),rndint(a) and conversion operators ItoF(a),FtoI(a)
if/else/loop/stage/hop/while/arrays/pointer stuff is not added yet, but the hardest stuff is done. I will keep working and add all features that I've promised.

Even now you can see, the DSPcode2 produces shorter and faster code than DSPcode


Perfect Human Interface wrote:Well, easy I guess would be just using the edit box and then feeding the text into another display box that draws all the colored text. Obviously a bit disjointed and not exactly what we're looking for. Is all this font drawing and editing stuff built-in to Windows or something? Seems a DLL component would be the way to go. I can't imagine people just write their own text editors for every piece of software made.


Yeah... hopefully someone will come up with a solution.
Attachments
DSPcode0.9.fsm
(16.94 KiB) Downloaded 1104 times
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Custom DSP Code 2 (comunity project)

Post by martinvicanek »

Incredible. :ugeek: :ugeek:
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Custom DSP Code 2 (comunity project)

Post by tulamide »

That's fantastic, KG! You've already done hard work, I hope people will appreciate it. I do. :)

KG_is_back wrote:Yeah... hopefully someone will come up with a solution.

This wasn't of help for your own editor?
"There lies the dog buried" (German saying translated literally)
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Custom DSP Code 2 (comunity project)

Post by RJHollins »

Dl'd it to check it out ... there must be code in this that can't run on FS 3.0.4 :(

My interest was more curiosity.

Still ... I will follow this thread with interest .... maybe I can learn something 8-)
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: Custom DSP Code 2 (comunity project)

Post by Exo »

Great KG :)

I will test this properly tomorrow and give any feedback then.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: Custom DSP Code 2 (comunity project)

Post by Exo »

This is impressive stuff KG thanks.

I have been mostly looking at the function part so I can start writing extra functions, but I want to understand a few things.

Code: Select all

#round to int
func=ASMfunction.new("rndint")
code="ret=[]
ret[0]=blueprintVar('',@name,inputs)
ret[1]=''
ret[2]=blueprintCode(
'cvtps2dq xmm0,arg0;
cvtdq2ps xmm0,xmm0;',@name)
ret[3]=[5,1]
ret[4]=xmm(0)
return ret"
func.addFunction(["v","c","r"],code,[5,1])
@functions["rndint"]=func


Why is ret[1] set to any empty char/string? Can that be anything else? what does it relate to?

I am assuming the first input for "blueprintVar()" is meant for const variables only?

What is ret[3] relating to? I cannot make sense of why it is set to [5,1]? All the functions use it so it looks redundant.

What exactly is the purpose of ret[4]=xmm(0)? again looks redundant but I don't fully understand how it is being used.

Again thanks this is good work :D
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Post Reply