Old 05-14-2010, 12:17 PM   #1
AdamWathan
Human being with feelings
 
AdamWathan's Avatar
 
Join Date: Apr 2008
Location: Cambridge, Ontario
Posts: 2,644
Default Including scripts in keymap files?

Can this be done? What is the best way to send someone a keymap that includes custom scripts and have the scripts function? I'm trying to share a custom keymap but it includes some simple scripts and they don't seem to work for anyone I have sent the file to.

Sorry the n00b question, I'm sure I'm gonna look like a moron here somehow! Haha...

Last edited by AdamWathan; 05-14-2010 at 12:34 PM.
AdamWathan is offline   Reply With Quote
Old 05-14-2010, 12:39 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,913
Default

Quote:
Originally Posted by AdamWathan View Post
Can this be done? What is the best way to send someone a keymap that includes custom scripts and have the scripts function? I'm trying to share a custom keymap but it includes some simple scripts and they don't seem to work for anyone I have sent the file to.

Sorry the n00b question, I'm sure I'm gonna look like a moron here somehow! Haha...
If you mean scripts as in ReaScript scripts, the person you are sending them to has to have the programming language (Python or Perl) installed that the scripts have been written in. Another possibility is that your keymaps use some Reaper extension plugin provided actions, in which case the user will need the extension plugin installed. (SWS extension, probably.)
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 05-14-2010, 12:43 PM   #3
AdamWathan
Human being with feelings
 
AdamWathan's Avatar
 
Join Date: Apr 2008
Location: Cambridge, Ontario
Posts: 2,644
Default

Sorry I should have been more clear! What I in fact did was take some Perl scripts written by another user for toggling between 5 zoom levels and converted them to Python scripts, so I just have these 5 .py files (on OS X in case the extension is different on Win).

How can I go about compiling these Python script text files into something I can actually share without the other user having to individually load all the Python scripts in the actions window and manually assign the keyboard shortcuts?
AdamWathan is offline   Reply With Quote
Old 05-14-2010, 12:55 PM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,913
Default

Quote:
Originally Posted by AdamWathan View Post
Sorry I should have been more clear! What I in fact did was take some Perl scripts written by another user for toggling between 5 zoom levels and converted them to Python scripts, so I just have these 5 .py files (on OS X in case the extension is different on Win).

How can I go about compiling these Python script text files into something I can actually share without the other user having to individually load all the Python scripts in the actions window and manually assign the keyboard shortcuts?
Ah ok, that clears it up. Unfortunately I haven't looked very closely how it all works, so I can't offer any suggestion now how to deploy ReaScripts for use in other user's systems like that.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 05-15-2010, 06:26 PM   #5
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,375
Default

Quote:
Originally Posted by AdamWathan View Post
Sorry I should have been more clear! What I in fact did was take some Perl scripts written by another user for toggling between 5 zoom levels and converted them to Python scripts, so I just have these 5 .py files (on OS X in case the extension is different on Win).

How can I go about compiling these Python script text files into something I can actually share without the other user having to individually load all the Python scripts in the actions window and manually assign the keyboard shortcuts?
I presume you placed them in the Scripts directory.

Well, create a Scripts directory and a KeyMaps directory somewhere, and copy the relevant files in there. Then tell the user on the receiving end to copy the content of those directories to the respective ones in the Reaper library directory(Mac) or Reaper user directory(WinXP & Win7).

That could work. Make sure Python is installed on that users system. A spotlight search or look in the start menu(Win) should clear that up.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 05-16-2010, 12:59 AM   #6
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,311
Default

I would also like to ask the devs if there's any way to have a free Python/Perl compiler coming with Reaper as well. This way no user would need to install Python/Perl separately, and all commands would just work. Hopefully?
EvilDragon is offline   Reply With Quote
Old 05-16-2010, 01:32 AM   #7
jedstar2000
Human being with feelings
 
jedstar2000's Avatar
 
Join Date: Apr 2009
Location: Bristol uk
Posts: 1,006
Default

Quote:
Originally Posted by airon View Post
I presume you placed them in the Scripts directory.

Well, create a Scripts directory and a KeyMaps directory somewhere, and copy the relevant files in there. Then tell the user on the receiving end to copy the content of those directories to the respective ones in the Reaper library directory(Mac) or Reaper user directory(WinXP & Win7).

That could work. Make sure Python is installed on that users system. A spotlight search or look in the start menu(Win) should clear that up.
I think you would still need to load each script independently from within the action menu otherwise they won't appear in the actions list and then load your keymap and everything should be picked up

Watch out for using action id's as these could be different for different installations of reaper.
__________________
...............Reaper the DIY DAW.....................
MultiTrack Editing Macros http://forum.cockos.com/showthread.php?t=50111
Hybrid Theme http://forum.cockos.com/showthread.php?t=131090
jedstar2000 is offline   Reply With Quote
Old 05-16-2010, 02:12 AM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,913
Default

Quote:
Originally Posted by EvilDragon View Post
I would also like to ask the devs if there's any way to have a free Python/Perl compiler coming with Reaper as well. This way no user would need to install Python/Perl separately, and all commands would just work. Hopefully?
Since ReaScript supports both Perl and Python, are you suggesting Cockos would include both Python and Perl in the Reaper installation? That would increase the size of the Reaper installer substantially and still might not work perfectly. Assume for example the writer of some script is relying on some particular quirk of some particular version of Python or Perl, then the language version that was included in Reaper might not work and the user was forced to install them separately anyway.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 05-16-2010, 03:01 AM   #9
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,311
Default

Not the whole fashizzle, just the compilers?

Does "just the compilers" mean they have to include all the include headers as well? ...
EvilDragon is offline   Reply With Quote
Old 05-16-2010, 05:23 AM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,913
Default

Quote:
Originally Posted by EvilDragon View Post
Not the whole fashizzle, just the compilers?

Does "just the compilers" mean they have to include all the include headers as well? ...
Python and Perl would be a lot less useful if they didn't come with their standard libraries to handle stuff like the file system, network, regular expressions etc. Again, the same thing I mentioned above applies : if the script writer depends on any of those functionalities to be present, the user of the script will have to install the whole holabaloo in any case, again rendering the idea of the Cockos provided Python/Perl not so useful, if it was "slimmed down" to just the core interpreter. Admittedly, quite a lot can be done in scripts using just basic arithmetic, loops and the Reaper scripting API, so perhaps it might work OK to some extent.

edit : In any case, if Cockos was actually willing to distribute full Python and Perl with Reaper, I am not against the idea in any way. I just don't see that necessarily happening. Larger install size for Reaper would mean more internet bandwidth costs for Cockos, longer install times for users etc...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 05-16-2010 at 05:35 AM.
Xenakios is offline   Reply With Quote
Old 05-16-2010, 06:45 AM   #11
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,311
Default

Understood.

Yeah, RegExp can be particularly helpful, and I can see filesystem control, file writing/loading etc. can all be really useful when scripting.
EvilDragon is offline   Reply With Quote
Old 05-16-2010, 07:22 AM   #12
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,375
Default

An addon download would take care of that. Isn't Perl built in to OSX anyway ?

So who is going to get started on that ? Do we just pack up one of the distributions, or simply link to it, which I think would be a good idea.

Shouldn't this be in the Resources section of Reaper ?

The resources section is NOT the best design. The extension section basically points to NOTHING the common user is interested in. Extensions ? Where the hell are they ?

If any web designers would enjoy helping Cockos out with a better design for that section, please do. That section hides the content with microscopic text spread all over the page. It's a mix of bad and good.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview
"My ego comes pre-shrunk" - Randy Thom
airon 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 08:02 PM.


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