Old 04-01-2015, 02:10 PM   #1
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default Is there a script for custom envelope patterns ?

Dear Reapers,

I was wondering if there is a script that allows me to automatically draw envelope patterns within a Time Selection for a focussed Envelope.

So the script would let me choose between (for example) : sine wave, square wave, triangle, sawtooth and noise - patterns.
Also, it would let me choose the "density", like 1 cycle per grid resolution.

I am aware of Parameter modulation with LFO, but my request would be faster in workflow.

Hope to hear from you !
vanhaze is offline   Reply With Quote
Old 04-01-2015, 03:31 PM   #2
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Xenakios was working in a great one for REAPER 5.
http://forum.cockos.com/showthread.php?t=153348
heda is offline   Reply With Quote
Old 04-01-2015, 03:53 PM   #3
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Great ! Thank you Heda, for pointing me !

Looking forward to release !
vanhaze is offline   Reply With Quote
Old 04-01-2015, 04:31 PM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by vanhaze View Post
Great ! Thank you Heda, for pointing me !

Looking forward to release !
I've neglected working on this but it looks like the final Reaper 5 release isn't going to happen too soon anyway... (I will want it working for myself too, so the script will be released eventually.)
__________________
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 04-01-2015, 04:40 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by Xenakios
the script will be released eventually.
This would be awesome

It would be very nice in project and...
I deeply want to see the source code haha
X-Raym is offline   Reply With Quote
Old 04-02-2015, 08:26 AM   #6
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by X-Raym View Post
This would be awesome

It would be very nice in project and...
I deeply want to see the source code haha
The current source code :

https://bitbucket.org/xenakios/reape....lua?at=master

Not really ready for end users to play with...So no support from me to get it working at this point.
__________________
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 04-02-2015, 08:38 AM   #7
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Quote:
Originally Posted by Xenakios View Post
The current source code :

https://bitbucket.org/xenakios/reape....lua?at=master

Not really ready for end users to play with...So no support from me to get it working at this point.
Only 200 lines, damn it...I think schwa was right when he spoke so highly of Lua
Breeder is offline   Reply With Quote
Old 04-02-2015, 08:52 AM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Breeder View Post
Only 200 lines, damn it...I think schwa was right when he spoke so highly of Lua
It would probably be 50 lines shorter if I actually knew what I was doing with Lua...
__________________
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 04-02-2015, 09:21 AM   #9
calebcharles
Human being with feelings
 
calebcharles's Avatar
 
Join Date: Nov 2010
Location: St. Paul, MN
Posts: 13
Default

Quote:
Originally Posted by Xenakios View Post
The current source code :

https://bitbucket.org/xenakios/reape....lua?at=master

Not really ready for end users to play with...So no support from me to get it working at this point.
That's not going to stop me from fiddling. This is all so much fun to play with, thank you!
calebcharles is offline   Reply With Quote
Old 04-02-2015, 09:45 AM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Xenakios
Quote:
if I actually knew what I was doing with Lua
It seems that you already know it

It is very very nice, thank you for sharing ! Can't wait to see how you will make it evolve :P

For fun,
Here a nice pattern I made in few clicks, using the reduce number of point action, default shape to bezier, and different bezier tension for top and bottom point :
X-Raym is offline   Reply With Quote
Old 04-02-2015, 06:34 PM   #11
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Updated source :

https://bitbucket.org/xenakios/reape....lua?at=master

The major obstacle for this not working for end users is how it tries to load the fader thumb image from a hardcoded path that is not going to exist...(The fader png image file itself is one of the images that comes with Reaper though, so it shouldn't be impossible to make the script use that somehow, I hope...)
__________________
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 04-02-2015, 11:34 PM   #12
calebcharles
Human being with feelings
 
calebcharles's Avatar
 
Join Date: Nov 2010
Location: St. Paul, MN
Posts: 13
Default

Quote:
Originally Posted by Xenakios View Post
Updated source :

https://bitbucket.org/xenakios/reape....lua?at=master

The major obstacle for this not working for end users is how it tries to load the fader thumb image from a hardcoded path that is not going to exist...(The fader png image file itself is one of the images that comes with Reaper though, so it shouldn't be impossible to make the script use that somehow, I hope...)
I copied the png to my own hard coded path, copied that and pasted it into the gfx.loadimg quote. I did have to change the backslashes to forward slashed to make it work, however.
calebcharles is offline   Reply With Quote
Old 04-03-2015, 02:52 AM   #13
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,597
Default

Quote:
Originally Posted by Xenakios View Post
Updated source :

https://bitbucket.org/xenakios/reape....lua?at=master

The major obstacle for this not working for end users is how it tries to load the fader thumb image from a hardcoded path that is not going to exist...(The fader png image file itself is one of the images that comes with Reaper though, so it shouldn't be impossible to make the script use that somehow, I hope...)
spk77 got that sorted out in his WIP Track Inspector Script you can check that out
Sexan is offline   Reply With Quote
Old 04-03-2015, 03:15 AM   #14
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Sexan View Post
spk77 got that sorted out in his WIP Track Inspector Script you can check that out
I have made very big changes to that script, but here's how the importing/"image file loading" is solved at the moment (should work on both pc and mac):

It works if all files (images, functions, classes etc.) are in the same folder. Copy/paste the blue text for testing
Code:
.
.
.

function msg(m)
  return reaper.ShowConsoleMsg(tostring(m) .. "\n")
end


function get_script_path()
  local info = debug.getinfo(1,'S');
  local script_path = info.source:match[[^@?(.*[\/])[^\/]-$]]
  return script_path
end


-- get "script path"
local script_path = get_script_path()
msg(script_path)

-- modify "package.path"
package.path = package.path .. ";" .. script_path .. "?.lua"
msg(package.path)


-- Import files ("classes", functions etc.)-----------------
require "class" -- import "base class"
local Slider = require "slider class" -- import "slider class"
local Pr = require "Reaper project" -- import "Project class"
local Track = require "Reaper track" -- import "Track class"

-- /////////////////////////////////////////////////////////


-- image_table (add more knobs here)
local image_file_table = {
            {image_path = script_path .. "SPK77 test knob 01 64x64.png", fr_count = 128},
            {image_path = script_path .. "Hopi sweep knob 01 32x32.png", fr_count = 108},     -- 3456 x 32 pixels (108 frames)
            {image_path = script_path .. "Hopi sweep knob 01 64x64.png", fr_count = 128},     -- 8192 x 64 pixels
            {image_path = script_path .. "Hopi sweep knob 02 64x64.png", fr_count = 128},     -- 8192 x 64 pixels
            {image_path = script_path .. "Hopi sweep knob 03 64x64.png", fr_count = 128},     -- 8192 x 64 pixels
            {image_path = script_path .. "Hopi sweep knob 05 32x32.png", fr_count = 128},
            {image_path = script_path .. "Hopi sweep knob 03 (modded by SPK77) 32x32.png", fr_count = 128}
          }
.
.
.
spk77 is offline   Reply With Quote
Old 04-03-2015, 04:08 AM   #15
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by spk77 View Post
I have made very big changes to that script, but here's how the importing/"image file loading" is solved at the moment (should work on both pc and mac):
Thanks for solving this!

(I am now considering if I should just draw the fader thumb in the code and not use the png file at all, though...)
__________________
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 04-03-2015, 08:45 AM   #16
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Preliminary public version available :

http://forum.cockos.com/showpost.php...0&postcount=87
__________________
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
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:21 PM.


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