reporting for duty here.
Quote:
one of the major drawbacks of 'as2/3' programming is the poor performance of the actionscript virtual machine and rendering engine for text fields.
cpu usage is very high for large texts. i'm thinking of a way to output only portion of a string based on caret movement in a text field - a bit tricky that is.
|
i've investigated further on the subject. apparently the flash component framework - buttons, scrollbars etc, slows things even more. after looking for a minimal set of components for a while and not liking any of those, i gave up on that idea and wrote my own framework. but the problem of slow textfield still remained.
then i've found this project -
online ide engine by victor dramba. after speaking with victor, he said that he is using the exact same method - portions of a string based on caret movement.
so now i'm greatful to be using his scriptarea component which is great, but my syntax highlighting, line numbers and scrollbars have to be integrated, actually its not bad at all since minus the 'sh' bit, it looks like the current jesusonic ide in reaper.
---
documentation is 40% done.
-----------
the module formatting:
extension is .jsmod
Code:
// *************************
// js module template
// *************************
//#mspr
//#inputs in0, in1
//#outputs out0, out1
//#declare j, x,y,s
//#declare p
//#declare in0,in1,out0,out1
//#mspr
slider1:<0,1,0.1>slidertext1
filename:0,filename.wav
//#mspr
@init
x=5;
//#mspr
@slider
k=slider1;
//#mspr
@sample
y=sin(k*x);
yp= px *21;
py= xp;
p=1;
j=2;
//#mspr
@block
sb=samplesblock;
//#mspr
@gfx 300 200
gfx_y=mosy;
gfx_x=mosx;
//#mspr
@serialize
s=1;
some notes here:
- i'm using these separators '//#mspr' in the parser for now, but since they are commented out (same for other jsmod specific lines) the modules are compatible with the jesusonic compiler)
- there is a requirement that all directives are present for each module and i may leave it this way for now.
- there are some definitions in the first section:
Code:
//#inputs in0, in1
//#outputs out0, out1
//#declare j, x,y,s
//#declare p
//#declare in0,in1,out0,out1
this is where the inputs and outputs variables are declared as well as the normal variables.
- the gfx section dimensions are module specific (300x200). this will be used in a eventual gfx-module arrange window.
- the 'mosx' & 'mosy' variables are to be used as module x,y offset values. (x,y offset for a slider in a gfx arrangement for example)
----
for the offline version, shell integration and saving/loading module arrangements:
^ there is a 'myfilter' file and if you click it - it loads in the editor.
the storage format for now is binary.
i currently have no idea if the shell integration/installation process will work on linux runtime, but i'm pretty sure it will work on mac.
the online version, which is almost exactly the same engine, will be hosted directly from the google code svn repository, but there will be no save, export and load functionality.
---
no strict schedule, but i would prefer to release a stable version before new year. :-)