|
02-12-2012, 09:42 PM
|
#1
|
Human being with feelings
Join Date: Feb 2012
Posts: 2
|
eel2 documentation
Hi,
I am in the process of switching the expression evaluation part of a personal project to eel2. Being familiar with Milkdrop, this seems much more powerful than what I am currently using.
However, I can't find any documentation of what it does & does not support and on how to use it.
I would be surprised if such a library did not have at least a small bit of documentation.
Can anyone point me in the right direction ?
Thanks !
|
|
|
02-13-2012, 03:59 AM
|
#2
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Fredass
Hi,
I am in the process of switching the expression evaluation part of a personal project to eel2. Being familiar with Milkdrop, this seems much more powerful than what I am currently using.
However, I can't find any documentation of what it does & does not support and on how to use it.
I would be surprised if such a library did not have at least a small bit of documentation.
Can anyone point me in the right direction ?
Thanks !
|
Hello. I am using eel2 in my HourGlass sound processing application to allow generating/transforming sound grain/fragment parameter values and transform incoming MIDI CC messages.
Much of the eel2 language syntax and available function calls is described here (some of the stuff is spesific to the Jesusonic variant made from eel2, but not too much) :
http://www.reaper.fm/sdk/js/js.php#js_basic
The C-API to use eel2 from C or C++ is not terribly complicated, apart from how to add new functions to the eel2 virtual machine. I can write you a small example later today...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
02-13-2012, 04:30 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 02-13-2012 at 04:38 AM.
|
|
|
02-13-2012, 07:26 AM
|
#4
|
Human being with feelings
Join Date: Feb 2012
Posts: 2
|
Thanks, exactly what I was looking for.
|
|
|
02-13-2012, 04:50 PM
|
#5
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
The code has a misinformed comment, as pointed out by the eel2 developer Justin :
Code:
char codetext[65536]; // this needs to be larger than might be anticipated as eel2 uses this buffer as workspace
Justin said the buffer doesn't need to be larger than the text passed to be compiled plus the terminating null character.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
02-14-2012, 03:49 AM
|
#6
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
thanks xenakios for this example. I am having some trouble compiling on OSX
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_2pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:151: error: expected ':' or ')' before 'EEL_F_SUFFIX'
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_1pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:188: error: expected ':' or ')' before 'EEL_F_SUFFIX'
and
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:65:25: error: fpu_control.h: No such file or directory
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c: In function 'GLUE_CALL_CODE':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: '_FPU_RC_ZERO' undeclared (first use in this function)
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: (Each undeclared identifier is reported only once
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: for each function it appears in.)
this is a 32bit build and I'm only including asm-nseel-x86-gcc.c, not the ppc or msvc versions
|
|
|
02-14-2012, 06:33 AM
|
#7
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by olilarkin
thanks xenakios for this example. I am having some trouble compiling on OSX
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_2pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:151: error: expected ':' or ')' before 'EEL_F_SUFFIX'
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_1pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:188: error: expected ':' or ')' before 'EEL_F_SUFFIX'
and
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:65:25: error: fpu_control.h: No such file or directory
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c: In function 'GLUE_CALL_CODE':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: '_FPU_RC_ZERO' undeclared (first use in this function)
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: (Each undeclared identifier is reported only once
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: for each function it appears in.)
this is a 32bit build and I'm only including asm-nseel-x86-gcc.c, not the ppc or msvc versions
|
Hopefully Justin or someone else familiar with compiling eel2 on OS-X can chime in...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
02-14-2012, 08:47 AM
|
#8
|
Human being with feelings
Join Date: Apr 2008
Posts: 510
|
Quote:
Originally Posted by olilarkin
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_2pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:151: error: expected ':' or ')' before 'EEL_F_SUFFIX'
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c: In function 'nseel_asm_1pp':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/asm-nseel-x86-gcc.c:188: error: expected ':' or ')' before 'EEL_F_SUFFIX'
|
make sure that for "asm-nseel-x86-gcc.c", EEL_F_SUFFIX is defined to "l" . the definition will normally come from "ns-eel-addfuncs.h", based on EEL_F_SIZE (only 8 should be used). EEL_F_SUFFIX will suffix the AT&T formatted instructions for 32bit integers or 64bit floating point operands.
Quote:
Code:
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:65:25: error: fpu_control.h: No such file or directory
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c: In function 'GLUE_CALL_CODE':
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: '_FPU_RC_ZERO' undeclared (first use in this function)
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: (Each undeclared identifier is reported only once
/Users/oli/Dev/MyPlugins/IPlugExamples/IPlugEEL/../../WDL/eel2/nseel-compiler.c:252: error: for each function it appears in.)
|
fpu_control.h is used in nseel-compiler.c for some definitions and the function _controlfp that updates the FPU control word (there is function with the same name in float.h/the msvc runtime).
a couple of things can be done here:
1) you can disable the compatibility mode (ns-eel.h: #define NSEEL_EEL1_COMPAT_MODE), which will then define on its own - EEL_NO_CHANGE_FPFLAGS (nseel-compiler.c) and prevent the change of FPU flags for x86, when gluing the code on execution or more specifically setting the RC flag to truncate, calling, then setting the RC flag to the original value (and flushing the pipeline while doing so).
2) while float.h can be used on msvc and mingw, fpu_control.h is a non-standard header, yet it should be available on gcc for linux and osx.
you can simply copy a version of fpu_control.h in the "eel2" directory or create the missing definitions / macros.
EDIT:
here is an example fpu_control.h:
http://frs.web.cern.ch/frs/Source/MA.../fpu_control.h
--
Last edited by liteon; 02-14-2012 at 09:05 AM.
Reason: added link
|
|
|
02-15-2012, 01:56 AM
|
#9
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
hmm, i tried that fpu_control.h, but it tries to #include <features.h> , which is missing
and as far as I can tell EEL_F_SUFFIX is "l" / EEL_F_SIZE is 8 , it seems like EEL_F_SUFFIX is not getting injected by the preprocessor
thanks
|
|
|
02-15-2012, 02:44 AM
|
#10
|
Human being with feelings
Join Date: Apr 2008
Posts: 510
|
Quote:
Originally Posted by olilarkin
hmm, i tried that fpu_control.h, but it tries to #include <features.h> , which is missing
|
i think you can just remove the line "#include <features.h>", as it doesn't seem to be needed in the example "fpu_control.h". "features.h" is a gcc specific (non-standard) header that is also missing on some OSes.
--
|
|
|
02-15-2012, 07:03 AM
|
#11
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
Sorry, this is non-obvious, but don't include asm-*.c in your project, just include nseel-cfunc.c which includes the correct version of that file. On x86_64 targets, though, you should include asm-nseel-x64.obj (win64) or asm-nseel-x64-macho.o (osx64) in the project as well.
If you do the above, you shouldn't have to modify eel2 at all...
|
|
|
02-15-2012, 03:00 PM
|
#12
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
Quote:
Originally Posted by liteon
i think you can just remove the line "#include <features.h>", as it doesn't seem to be needed in the example "fpu_control.h". "features.h" is a gcc specific (non-standard) header that is also missing on some OSes.
--
|
thanks it worked, & thanks justin. Compiling fine now
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:22 PM.
|