Old 04-02-2017, 02:19 PM   #81
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
Default

Just to let you know that I tried again with non-static, member variables and it worked well. Not sure what happened, I'm rechecking all the code.
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 07-26-2017, 10:47 AM   #82
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

this would be a great hello world on juce and reaper, coff coff: (controlling armed automation tracks parameters, or any other understandable way)
don't take me serious but would be great. Anyone pick it?

http://kawa.works/gui-section


Thanks KAWA, Thanks Xenakios
deeb is offline   Reply With Quote
Old 06-01-2019, 05:12 AM   #83
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Xenakios! I have been thinking to start doing the code in C++ but my biggest concern is that I already done in lua so manny stuff that makes me stop to step in it without any doubts. It is a lot of work which I would have to redo.

I wonder if there could be a theorically way for embedding lua reaper scripts in c++. Even if cockos had to do something.

I am very new to C++ and making reaper stuff in it would be a very good motif to get some expeience but I also don't want to loose and spend so much time in things already done. If this could be possible would be amazing, but seems not. But I know nothing!

Thank you!

Last edited by deeb; 06-01-2019 at 05:24 AM.
deeb is offline   Reply With Quote
Old 06-01-2019, 05:28 PM   #84
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by deeb View Post
Xenakios! I have been thinking to start doing the code in C++ but my biggest concern is that I already done in lua so manny stuff that makes me stop to step in it without any doubts. It is a lot of work which I would have to redo.

I wonder if there could be a theorically way for embedding lua reaper scripts in c++. Even if cockos had to do something.

I am very new to C++ and making reaper stuff in it would be a very good motif to get some expeience but I also don't want to loose and spend so much time in things already done. If this could be possible would be amazing, but seems not. But I know nothing!
If you already have a large codebase done with ReaScript and Lua, just keep that stuff, it probably doesn't pay off to start to redoing that with C++. However, if you want to try it, many of the API calls are essentially the same for Lua and C. (You can see that from the ReaScript html documentation, most of the functions are described for C, Python, Lua and Eel. Note however, that all the gfx. stuff is missing from the C API.)

At least as far as I know, Lua ReaScripts can't be executed from C++ code. Lua by itself can be embedded into C++ code, but you would need to rewrite all the Reaper API calls. Essentially, make your own new ReaScript implementation...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-02-2019, 04:17 AM   #85
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by Xenakios View Post
Note however, that all the gfx. stuff is missing from the C API.)
i wasn't aware! thank you

Quote:
Originally Posted by Xenakios View Post
At least as far as I know, Lua ReaScripts can't be executed from C++ code. Lua by itself can be embedded into C++ code, but you would need to rewrite all the Reaper API calls. Essentially, make your own new ReaScript implementation...
i see ! i wonder if cockos could do some doable magic in order to make it possible.
deeb is offline   Reply With Quote
Old 06-02-2019, 07:25 AM   #86
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Some clarifications to what I wrote above :

- C++ code can execute ReaScripts as actions, of course. NamedCommandLookup and Main_OnCommand are available. However, if you want to pass information into the scripts and get information back, that is complicated. (Basically, C++ code can't call ReaScripts like they were code with functions etc.)

- Drawing functions (from Cockos's Lice library) are available for C++, but there are no helper functions in the Reaper API for creating/showing GUI windows and handling their mouse/keyboard/etc events. Juce can of course be used for GUI but it would take some work to allow Lice drawing functions to be used with that. And since Juce has its own drawing functions anyway, it becomes a bit redundant...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-03-2019, 02:47 AM   #87
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by Xenakios View Post
And since Juce has its own drawing functions anyway, it becomes a bit redundant...
I assume if this could be possible:
req: Actions accept Arguments and do Returns
https://forum.cockos.com/showthread.php?p=2010974

then it would allow reusing reascript functions in c++. Would be great but just not implemented and probably never will

Quote:
Originally Posted by Xenakios View Post
- Drawing functions (from Cockos's Lice library) are available for C++, but there are no helper functions in the Reaper API for creating/showing GUI windows and handling their mouse/keyboard/etc events. Juce can of course be used for GUI but it would take some work to allow Lice drawing functions to be used with that. And since Juce has its own drawing functions anyway, it becomes a bit redundant...
I don't really know what Lice does ! anyway it is enough information for me to search more about it.

Thank you!
deeb is offline   Reply With Quote
Old 06-03-2019, 02:55 AM   #88
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by deeb View Post
I don't really know what Lice does
It's the drawing library by Cockos, that Reaper itself uses. The ReaScript functions like gfx.line and gfx.circle are implemented with that.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-03-2019, 10:07 AM   #89
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

thank you Xenakios !
deeb is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.