Old 04-15-2019, 06:50 AM   #81
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

I need pure envelope height. I have global heights, thats why when envelope is opened AS stretches across it also. I need a way to calculate env height when its on default size (which is returned as 0)
Sexan is offline   Reply With Quote
Old 04-15-2019, 06:51 AM   #82
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

Check my edited post for another possible way.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 06:55 AM   #83
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,207
Default

Quote:
Originally Posted by X-Raym View Post
I think everyone at least once use a "split a time selection edges" actions and realize he split all the items on all tracks EDIT(or at least some others but the rigth one) because he forget to select the right items before. This is error is just not possible with area selection, as you don't need to have tracks or items selected to show the Area of action. You see instantly the area of action. No selection consideration required (for better or for worse, but at least for "different").
That would be awesome, I thought by now (3 years later) I'd have finally gotten the hang of splitting items, but I still make that same mistake over and over!

@ Sexan, Best of luck with the script, looks promising!
Edgemeal is offline   Reply With Quote
Old 04-15-2019, 07:01 AM   #84
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

@Sexan, he gets the envelope height from the chunk:

Code:
local function GetTotalEnvLaneHeight(tracks)
  local totalheight = 0
  local totalenv_cnt = 0
  for guid, track in pairs(tracks) do
    if guid ~= "cnt" then
      local count = reaper.CountTrackEnvelopes( track )
      totalenv_cnt = totalenv_cnt + count
      if count > 0 then
        for i = 0, count-1 do
          local env = reaper.GetTrackEnvelope( track, i )
          local _, chunk = reaper.GetEnvelopeStateChunk( env, "", false )
          local height = tonumber(string.match(chunk, "LANEHEIGHT (%d+) "))
          if height == 0 then
            if not string.match(chunk, "TEMPOENVEX") then -- do not count Tempo Env
              height = defaultheight -- default track/lane height
              defheightenv[#defheightenv+1] = env
            end
          end 
          totalheight = totalheight + height
        end
      end
      if track == master then totalenv_cnt = totalenv_cnt - 1 end -- do not count Tempo Map
    end
  end
  return totalheight, totalenv_cnt
end
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 07:04 AM   #85
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

@Stevie thank you, will check that out
Sexan is offline   Reply With Quote
Old 04-15-2019, 07:05 AM   #86
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

Fingers crossed
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 07:10 AM   #87
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

nop , he uses default track height if chunk returns 0 we are all in same issue
Sexan is offline   Reply With Quote
Old 04-15-2019, 07:21 AM   #88
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

Ah damn it!
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 08:04 AM   #89
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 103
Default

Sexan maybe find envelope lane height by JS window functions? JS_Window_SetPosition can resize any windows if it need.Just idea.
nappies is offline   Reply With Quote
Old 04-15-2019, 09:34 AM   #90
strachupl
Human being with feelings
 
strachupl's Avatar
 
Join Date: Jan 2013
Posts: 365
Default

Win7
I installed new Reaper portable x32, installed sws, installed reapack and all repositories, copied your 2 versions of script and this time I cant even launch it.




Code:
Areasel.lua:2: attempt to call a nil value (field 'JS_LICE_CreateBitmap')

Code:
areasel2.lua:4: attempt to call a nil value (field 'JS_Window_Find')

I will wait till beta or something because I can't make it work.
__________________
The truth is not in the middle but exactly where it is.
strachupl is offline   Reply With Quote
Old 04-15-2019, 09:34 AM   #91
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

platform ? Win, OsX, linux?

Quote:
Originally Posted by nappies View Post
Sexan maybe find envelope lane height by JS window functions?
Is there any example how to use that?
Sexan is offline   Reply With Quote
Old 04-15-2019, 10:08 AM   #92
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 103
Default

Sexan, It was already in your code, as you found track window, you can also find Envelope window:

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


env =  reaper.GetSelectedEnvelope(0)


main_wnd = reaper.GetMainHwnd()
retval, found = reaper.JS_Window_ListAllChild(main_wnd)
msg(env)
for adr in found:gmatch("%w+") do
      local handl = reaper.JS_Window_HandleFromAddress(tonumber(adr))
      if reaper.JS_Window_GetLongPtr(handl, "USER") == env then 
        
        retval, left, top, right, bottom = reaper.JS_Window_GetRect(handl) 
        
        msg(bottom-top) break
        
      end
    end
nappies is offline   Reply With Quote
Old 04-15-2019, 10:11 AM   #93
Embass
Human being with feelings
 
Embass's Avatar
 
Join Date: Jan 2014
Posts: 347
Default

You can get envelope h this way:

1.Load script to action list and assign shortcut.
2.Position mouse and press shortcut.

script:
https://drive.google.com/file/d/1m8g...ew?usp=sharing

preview gif:
https://drive.google.com/file/d/1gbn...ew?usp=sharing


-- tested on windows 7 only
Embass is offline   Reply With Quote
Old 04-15-2019, 10:14 AM   #94
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

Quote:
Originally Posted by nappies View Post
Sexan, It was already in your code, as you found track window, you can also find Envelope window:
Sorry, I've meant what to enter like env "ENV" "env" "0X314" etc
Sexan is offline   Reply With Quote
Old 04-15-2019, 10:25 AM   #95
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,843
Default

maybe https://forum.cockos.com/showthread.php?t=208882?
nofish is offline   Reply With Quote
Old 04-15-2019, 10:35 AM   #96
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

@nappies Thank you very much! this is working
Sexan is offline   Reply With Quote
Old 04-15-2019, 11:01 AM   #97
Embass
Human being with feelings
 
Embass's Avatar
 
Join Date: Jan 2014
Posts: 347
Default

I'm working on area selection too. My area selection based on empty items.
You can do basic things like move, copy, cut etc..

Area selection preview:
https://drive.google.com/file/d/1D3i...ew?usp=sharing

coming soon..
Embass is offline   Reply With Quote
Old 04-15-2019, 11:07 AM   #98
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

Cool!!! You have custom manipulation code (copy,delete etc) or just group ungroup items that are under AS ?
Sexan is offline   Reply With Quote
Old 04-15-2019, 11:28 AM   #99
Embass
Human being with feelings
 
Embass's Avatar
 
Join Date: Jan 2014
Posts: 347
Default

On area selection change script sets time selection to area selection and selects media items in time selection. So you can use native actions like these.

Item: Copy selected area of items
Item: Cut selected area of items
Item: Duplicate selected area of items
Item: Remove selected area of items
Item: Trim items to selected area

Also i will develop more area selection related actions myself..
Embass is offline   Reply With Quote
Old 04-15-2019, 12:47 PM   #100
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

OMG guys, you rock, how I love this community
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 12:56 PM   #101
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,218
Default

so cool! my face is like _Stevie_'s avatar now
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 04-15-2019, 01:03 PM   #102
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,771
Default

Hahahaha !

IMHO: The most revolutionary Reaper Script from 2019, yet.
vanhaze is offline   Reply With Quote
Old 04-15-2019, 01:52 PM   #103
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,865
Default

@Embass
What ! Another area selection system !



And it use temporary empty items ?? clever :P That makes it easily pluggable withnatives actions like ripple editing etc....


I'm curious to see more of this.
X-Raym is offline   Reply With Quote
Old 04-15-2019, 01:56 PM   #104
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,771
Default

A reason for not being available in ReaPack (yet), just on Github ?

Seems to me easier to provide it via ReaPack, so a new version is easily detected in ReaPack and downloaded within Reaper.

Or am i talking b*llshit ??
vanhaze is offline   Reply With Quote
Old 04-15-2019, 02:01 PM   #105
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,437
Default

Quote:
Originally Posted by heda View Post
so cool! my face is like _Stevie_'s avatar now
Hahaha!
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-15-2019, 02:23 PM   #106
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

dudes I'm working really Rea_LLLLYYY hard on this bad boy... I know excitement is in the air but when the CORE is done it will be on ReaPack.... Oh and btw you will shit your pants when you see next gif

EDIT: Well f... it

Deeeeep down in my heart I know Schwa is proud!

Last edited by Sexan; 04-15-2019 at 04:40 PM.
Sexan is offline   Reply With Quote
Old 04-15-2019, 02:37 PM   #107
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,029
Default

Stellar stuff, guys!


Pardon me for saying though, if a few scripters can do it like this, what in the Earth prevents Justin and Schwa to just do it natively...?
EvilDragon is offline   Reply With Quote
Old 04-15-2019, 03:19 PM   #108
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,865
Default

Quote:
you will shit your pants when you see next gif
Is that how you express your excitement ? ^^


Quote:
what in the Earth prevents Justin and Schwa to just do it natively...?
Priority I guess !
X-Raym is offline   Reply With Quote
Old 04-15-2019, 03:22 PM   #109
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 549
Default

Quote:
Originally Posted by EvilDragon View Post
Stellar stuff, guys!


Pardon me for saying though, if a few scripters can do it like this, what in the Earth prevents Justin and Schwa to just do it natively...?

It does seem like a massive omission
todd_r is offline   Reply With Quote
Old 04-15-2019, 10:46 PM   #110
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,620
Default

@ benf : Non mais je sais que c'est qu'un script, je trouve juste ça dommage de gaspiller du temps et du talent pour ça.

J'ai l'impression de regarder Bernard Pacaud essayer de reproduire un Big Mac sous prétexte que comme ça se vend bien chez Mac Do, ça doit être bien.

Je ne dis pas que ça ne peut pas être pratique dans certains cas particuliers, mais franchement, t'as vraiment besoin de ça?

Et puis surtout, ce qui me dérange, c'est qu'il y'a des plus en plus d'utilisateurs qui viennent d'autres DAW avec la certitude que leur façon de faire est là bonne et que donc, RPR doit s'adapter parce que bon, tu comprends, eux ils savent ce que c'est un DAW de pro.

Je collabore de plus en plus avec d'autres producteurs/ingé son et je suis effaré de constater qu'en 2019, un nombre non négligeable de Professionnels bossent encore comme en 2004...

Ça pourrait ne pas être un problème, mais quand certains facturent 300€ la journée et qu'ils travaillent super lentement parce qu"ils refusent de remettre en question leurs habitudes et façon de voir les choses, ça laisse songeur sur l'avenir de la profession. Et le plis ironique, c'est que ce sont ceux la qui vont se plaindre qu'ils vont devoir mettre la clé sous la porte parce que, tu comprends, l'industrie à changée.

Édit : le terme que tu cherches pour me qualifier la maintenant est :"connard". Je sais, et j'assume
Reno.thestraws is offline   Reply With Quote
Old 04-15-2019, 11:01 PM   #111
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,771
Default

Quote:
Originally Posted by EvilDragon View Post
Stellar stuff, guys!


Pardon me for saying though, if a few scripters can do it like this, what in the Earth prevents Justin and Schwa to just do it natively...?
Exactly my same thought ED.
vanhaze is offline   Reply With Quote
Old 04-15-2019, 11:50 PM   #112
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 344
Default

Quote:
Originally Posted by EvilDragon View Post
Stellar stuff, guys!


Pardon me for saying though, if a few scripters can do it like this, what in the Earth prevents Justin and Schwa to just do it natively...?
Maybe devs don't think, it's needed? because there's enough of tools, which can do area selection to some extent.

i think, the hardest part will be with copy/move, there's alot of corner cases with envelopes, AI, regions, moving to other tracks with fx envelopes, etc. Wish you luck, Sexan!
doppelganger is offline   Reply With Quote
Old 04-16-2019, 04:32 AM   #113
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default



Now if I press delete it would break the forum , so I will leave that to you... soon

Last edited by Sexan; 04-16-2019 at 04:59 AM.
Sexan is offline   Reply With Quote
Old 04-16-2019, 04:40 AM   #114
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: Germoney
Posts: 620
Default

Awesome dude!
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [Filther: Thread|Github|Reapack] | [More JSFX: Thread|Reapack]
sai'ke is offline   Reply With Quote
Old 04-16-2019, 05:45 AM   #115
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 181
Default

Are you kidding me!? Thats area selection and edit multiple envelope points in different lanes simultaneously!

You just ascended to the Scripters Olympus
reapero is offline   Reply With Quote
Old 04-16-2019, 06:23 AM   #116
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,620
Default

Quote:
Originally Posted by reapero View Post
Thats area selection and edit multiple envelope points in different lanes simultaneously!
If only we could get some kind of automation items that do this...
Reno.thestraws is offline   Reply With Quote
Old 04-16-2019, 06:47 AM   #117
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Posts: 544
Default

Quote:
Originally Posted by Reno.thestraws View Post
If only we could get some kind of automation items that do this...
If only we could get you to leave this thread and stop your ranting...
Klangfarben is offline   Reply With Quote
Old 04-16-2019, 06:58 AM   #118
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,202
Default

Thank you Sexan! it's quite amazing! you are brave ! i still didn't try but just by looking and just in case ... i would like to throw some ideas or thoughts that i am sure you are aware, but just in case:

- Make the ranges fallow grid setting so that example: if grid is on bar , .. range selections follow this rule and dimension.

- maybe make a way so the infomation gathered by your script can be consumed by other scripts... basically a Lib, so that all the ranges available in each tracks can be reused by third parties .. todo whatever craziness : )

Also things like:
- Area selection -> Insert AIs
- Area selection -> Duplicate (AI and/or MI)
- Area selection -> Duplicate pooled (AI and/or MI)
- Area selection -> Select contained items(AI and/or MI)
- Area selection -> Select exclusively contained items (AI and/or MI)
- Area selection -> Glue (AI and/or MI)
- Area selection -> Group (AI and/or MI)
- Area selection -> Delete (AI and/or MI)

Last edited by deeb; 04-16-2019 at 07:06 AM.
deeb is offline   Reply With Quote
Old 04-16-2019, 07:10 AM   #119
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,416
Default

grid is already implemented, if snap is on the ranges are returned in snap.

I'am making this in mind to other stuff to use. Not sure what you guys think I'm doing but its veeeeeeeeery simple. You make range it stores that range along with tracks or envelopes were dragged over. Then it looks :
1. Do we have range? yes
2. where is that range? on xy track or envelope
3. This stuff in that range wanna do something with them? Probably

The voodoo stuff is just drawing helper on screen

In short: The script already spits out that information, thats why there is separate function script along that uses that information to do normal and weird stuff to items/envelopes etc

Last edited by Sexan; 04-16-2019 at 07:36 AM.
Sexan is offline   Reply With Quote
Old 04-16-2019, 07:51 AM   #120
Bri1
Banned
 
Join Date: Dec 2016
Location: England
Posts: 2,432
Default

yesyes
Bri1 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:06 PM.


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