Old 06-23-2019, 08:56 AM   #721
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Still did not find the solution, same issue even with reaper.JS_WindowMessage_Intercept.

It responds only after second mouse click, just like modifiers

Code:
local reaper_cursors =  {
                          {187,"MOVE"},  -- MOVE
                          {185,"DRAW"},  -- DRAW
                          {417,"EDGE L"},  -- LEFT EDGE
                          {418,"EDGE R"},  -- RIGHT EDGE
                          {184,"FADE L"},  -- FADE RIGHT
                          {105,"FADE R"},   -- FADE LEFT
                        }

function project_mouse_info()
    local cur_cursor = reaper.JS_Mouse_GetCursor()
    for i = 1, #reaper_cursors do
        local cursor = reaper.JS_Mouse_LoadCursor( reaper_cursors[i][1] )
        if cur_cursor == cursor then
          return reaper_cursors[i][2]
        end
    end
end

local detail = project_mouse_info()
if detail == "EDGE L" or detail == "EDGE R" then
              reaper.JS_WindowMessage_Intercept(track_window, "WM_LBUTTONDOWN", false)
            elseif not mouse.detail then
              reaper.JS_WindowMessage_PassThrough(track_window, "WM_LBUTTONDOWN", false)
            end
Anyone has some ideas?Am I doing something wrong?
Sexan is offline   Reply With Quote
Old 06-23-2019, 09:02 AM   #722
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,140
Default

Quote:
Originally Posted by jangoux View Post
I still havent been able to run this script. Getting this now:

Area_51_class.lua:7: unexpected symbol near '<'
That error usually means you downloaded it as HTML (a web page) rather than a Lua script - if memory serves, Safari is particularly frustrating for doing this.
Lokasenna is offline   Reply With Quote
Old 06-23-2019, 10:04 AM   #723
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 372
Default

Quote:
Originally Posted by Lokasenna View Post
That error usually means you downloaded it as HTML (a web page) rather than a Lua script - if memory serves, Safari is particularly frustrating for doing this.
mozilla firefox is guilty too, when downloading from github through context menu -> save Link As..

Saves script file with .lua extension, but inside HTML.
doppelganger is offline   Reply With Quote
Old 06-23-2019, 12:42 PM   #724
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,639
Default

Yeah, very annoying. But to be honest, it is Github that is failing miserably here. They should just provide a simple file download. Instead, I always have to download the whole archive as zip. Huge misconception in design...
__________________
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 06-23-2019, 12:52 PM   #725
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,140
Default

Quote:
Originally Posted by _Stevie_ View Post
Yeah, very annoying. But to be honest, it is Github that is failing miserably here. They should just provide a simple file download. Instead, I always have to download the whole archive as zip. Huge misconception in design...
They are providing a file download - right-click, Save Link As...

It's the browser that's screwing up by just deciding that any link must be an HTML file.
Lokasenna is offline   Reply With Quote
Old 06-23-2019, 12:59 PM   #726
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,639
Default

Really? Ah, well, then pretty much every browser I’m using is screwing up.
Safari, Firefox, Opera.
__________________
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 06-23-2019, 01:07 PM   #727
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,140
Default

Quote:
Originally Posted by _Stevie_ View Post
Really? Ah, well, then pretty much every browser I’m using is screwing up.
Safari, Firefox, Opera.
For Safari, at least, it's been a known bug for years and years that they don't seem to care about fixing.

I don't have a Mac to try with, but on Windows and Linux most browsers' "Save As..." boxes will let you choose the format to save in. If there's an All Files or Plain Text option, picking that and making sure the file is saved with a .lua extension will usually work.
Lokasenna is offline   Reply With Quote
Old 06-23-2019, 01:11 PM   #728
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,140
Default

Also, don't try to download using the links you see when browsing through a repo on Github - those link to Github's file viewer. If that's where you're having trouble, open the file and then use the Raw button at the top-right for a link to the actual file:

Lokasenna is offline   Reply With Quote
Old 06-23-2019, 01:16 PM   #729
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Managed to solve my issue with the help of nappies.

Long story short intercept must be in constant loop (which I did not do ). I thought I can just trigger it with mouse click and that's it, but no
Sexan is offline   Reply With Quote
Old 07-02-2019, 07:59 AM   #730
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Posts: 484
Default

Reboot!
ferropop is online now   Reply With Quote
Old 07-03-2019, 08:25 AM   #731
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

I'm here but I have tournament with my company in few days so we are in preparation mode. There are many updates but many bugs so I wont publish it before I fix them (about 10 days)
Sexan is offline   Reply With Quote
Old 07-03-2019, 08:08 PM   #732
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Posts: 484
Default

Quote:
Originally Posted by Sexan View Post
I'm here but I have tournament with my company in few days so we are in preparation mode. There are many updates but many bugs so I wont publish it before I fix them (about 10 days)
Haha just boosting the thread Sexan, you take the time you need
ferropop is online now   Reply With Quote
Old 07-06-2019, 06:34 AM   #733
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Posts: 557
Default

i have managed to just draw the AS .. but no success with cut paste or move yet.
I am presuming i have note installed some component
While installing the lua package from your github, i opened the RAW lua files and saved them and further loaded them into reaper via Load script command
the files i downloaded are -
Area_51 class, core , functions , input and mouse.
SWS -2.10
Js_api-989
Reaper-5.979/x64
Windows10

Quote:
Error: Area_51_functions.lua:7: bad argument #1 to 'GetMediaItemInfo_Value' (MediaItem expected)

Stack traceback:
Area_51_core.lua:14: in function 'crash'
[C]: in field 'GetMediaItemInfo_Value'
Area_51_functions.lua:7: in function 'move_items_envs'
Area_51_core.lua:440: in function 'zone'
Area_51_class.lua:119: in method 'track'
Area_51_class.lua:178: in function 'Track'
Area_51_class.lua:182: in function 'Draw'
Area_51_core.lua:1030: in function <C:\Users\Sameeruddin\Desktop\Area_51_core.lua:998 >
[C]: in function 'xpcall'
Area_51_core.lua:997: in function <C:\Users\Sameeruddin\Desktop\Area_51_core.lua:996 >

Reaper: 5.979/x64
Platform: Win64

Update- I held the number 1 or 2 key and realised it could drag around the item along the AS , but only when i make the selection beyond the item and drag it from the empty space.
Is it becuase some mouse modifiers are coinciding while clicking and dragging ?.

Last edited by zookthespook; 07-06-2019 at 06:41 AM.
zookthespook is offline   Reply With Quote
Old 07-08-2019, 10:21 AM   #734
JonasHAnd
Human being with feelings
 
Join Date: Apr 2015
Posts: 45
Default

Quote:
Originally Posted by Sexan View Post
I'm here but I have tournament with my company in few days so we are in preparation mode. There are many updates but many bugs so I wont publish it before I fix them (about 10 days)
Hi Sexan,
may I ask, have you looked into the translation to mac any more, I'm still eager to try your script here

Thanks!
JonasHAnd is offline   Reply With Quote
Old 07-08-2019, 02:57 PM   #735
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,639
Default

He's busy with other things and will return as soon as he can.
__________________
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 08-04-2019, 02:55 AM   #736
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Edit...

Last edited by Sexan; 08-04-2019 at 03:48 AM.
Sexan is offline   Reply With Quote
Old 08-04-2019, 04:32 AM   #737
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Hey Sexan.

I haven't seen this demonstrated yet so apologise if it's already in or if it gives you a heart attack as a suggestions but..

Do you think we would be able to have it so if you time select multiple items across tracks that are lots of single items (like a drum beat done as audio items, kick, snare, hi hat etc..)

That we might be able to time select them and then drag one of the sides to intelligently timestretch it all as if it was one audio piece? *hides behind chair waiting for the bomb to drop*

And to top off the craziness.. could there be a modifier option so that we can either only adjust the start of each of these drum hits/items without stretching them or so that we can adjust start and length to coincide with this.

I know it's crazy but been wanting this for ages and would donate a good amount for it!

We have something like this as a script but doesn't have the mouse modifier adjust stuff that would be amazing!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-04-2019, 05:25 AM   #738
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Yeah its doable, can you point me to that script so i can see calculations etc? and implement prototype of using other scripts via data of this one
Sexan is offline   Reply With Quote
Old 08-05-2019, 02:03 AM   #739
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Quote:
Originally Posted by Sexan View Post
Yeah its doable, can you point me to that script so i can see calculations etc? and implement prototype of using other scripts via data of this one
Cool! Will find it.

Would be a powerful thing to have!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-05-2019, 03:11 AM   #740
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

I've found the ones I meant but they are either native or sws ones so might not be easy to see the code for those I guess. Will paste them below anyway so you can see them working at least.

Item: Move and stretch items to fit time selection
This represents fitting the items to the time selection but it will also time stretch each item to make it's size relative to the overall time selection. Definitely one of the functions that would be good to have.


Actually, didn't find the other one that use to do the same as the above one but not stretch the individual items. All it did was move the starts of the items.

Will look again later when got more time to.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-05-2019, 07:31 AM   #741
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

ok but basically stretch all items in area at once? the inteligente part is that all items behave as individual? can you GIF me an example?
Sexan is offline   Reply With Quote
Old 08-05-2019, 09:14 AM   #742
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Stretch items relative to each other using the edge of your time selection but make two options. the first is to stretch items and the second (is to keep items at the same stretch they were at but move their start positions only (see the latter part of the below where I reset them)

__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-05-2019, 09:41 AM   #743
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

I think thats generic transform formula that I've already use for stretching envelopes. Will try it soon ATM polishing track zones
Sexan is offline   Reply With Quote
Old 08-05-2019, 09:47 AM   #744
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Quote:
Originally Posted by Sexan View Post
I think thats generic transform formula that I've already use for stretching envelopes. Will try it soon ATM polishing track zones
Cool!

It's actually mainly for sound design purposes not drums but sme principle.


Being able to quickly and in real time change the relative timing of items over a bunch of tracks is super powerful.

The next trick but probably not for this script is to then allow this to be non linear via a parameter so you can make it bunched up at the start and expand more at the end (like we have for lfo in automation items).

Awesome but probably not doable so happy enough with the first idea! thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-05-2019, 02:17 PM   #745
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Finally managed to make zones work normally... all that mouse here mouse there, mouse last this, mouse last that..... completely new implementation


Since there are "major" changes to API in latest reaper pre and JS_API is not longer working in some parts, I need to change more of the script. But there are manyyy MAAANNNYYY fixes and bugs etc (there is separate branch on my GIT for those who wanna check etc)
new versions requires LATEST reaper dev pre!!

OSX folks will need to wait a bit since one more API is coming soon...

@musisbynumbers tomorrow I will play with your request so we can see and discuss what needs to be done

Last edited by Sexan; 08-05-2019 at 02:23 PM.
Sexan is offline   Reply With Quote
Old 08-06-2019, 12:32 AM   #746
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Quote:
Originally Posted by Sexan View Post
Finally managed to make zones work normally... all that mouse here mouse there, mouse last this, mouse last that..... completely new implementation


Since there are "major" changes to API in latest reaper pre and JS_API is not longer working in some parts, I need to change more of the script. But there are manyyy MAAANNNYYY fixes and bugs etc (there is separate branch on my GIT for those who wanna check etc)
new versions requires LATEST reaper dev pre!!

OSX folks will need to wait a bit since one more API is coming soon...

@musisbynumbers tomorrow I will play with your request so we can see and discuss what needs to be done
That looks amazing. I'm pretty curious how this will actually change the whole workflow.

Many thanks for the great work and idea!
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 08-06-2019, 01:31 AM   #747
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

@musicbynumbers

We can pretty much do anything to items,envelopes...

Here is a pretty horrible showcase, (sorry forgot to remove the title from before)


I can change anything, rate also, but since my math skills is something really special, I just made it move start/end of the items with even more horrible math (I've tried to make it )

So if we have a right formula... it will be good. Maybe if some can help make a script that will do that so we can transfer it here ?
Sexan is offline   Reply With Quote
Old 08-06-2019, 01:34 AM   #748
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 301
Default

Hi Sexan, nice to see that you're back for Area Selection

From your last gif that you show, wouldn't be better if there was a modifier, so that the selected areas would move all together as well,instead of each one seperately only?
Vagelis is offline   Reply With Quote
Old 08-06-2019, 01:44 AM   #749
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

Thats just a matter of adding:
Code:
if ALT do x
if SHIFT do y
if SOME-COMBINATION do y
This was just a showcase for musicbynumbers to see its possible. But i have other things to do/fix on the script so it will be very time consuming ATM to find the calculations for this stretching now. But we will eventually implement this (with some help sooner)

EDIT: you are talking about gif with zones, yeah thats also just adding that code above
Sexan is offline   Reply With Quote
Old 08-06-2019, 01:56 AM   #750
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 301
Default

Yes i was talking about the gif with zones. Thanks
Vagelis is offline   Reply With Quote
Old 08-06-2019, 06:37 AM   #751
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Awesome stuff!

No rush on it and hopefully a math genius can comment here at some point and give you some help. I'll have a think about it myself too

Thanks for considering it! Going to be amazing!

Quote:
Originally Posted by Sexan View Post
@musicbynumbers

We can pretty much do anything to items,envelopes...

Here is a pretty horrible showcase, (sorry forgot to remove the title from before)


I can change anything, rate also, but since my math skills is something really special, I just made it move start/end of the items with even more horrible math (I've tried to make it )

So if we have a right formula... it will be good. Maybe if some can help make a script that will do that so we can transfer it here ?
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-06-2019, 08:07 AM   #752
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,733
Default

Had a quick thought and just to say that the main one would be just moving the items start only and the other version would be moving the start and then time stretching as well.

Maths wise (and I'm no expert either) , but it seems like you need to store the original time selection length and then divide that (for the ratio) by the new time selection length (as it's adjusted). Normalise this to be in the 1 range if needed (so it can be used for both expansion and contraction) and then use this value/ratio to move the start of the item from it's original position by taking the start of the time selection as 0, getting each items start position and multiplying by the time selection difference value (in ratio form)

Something like this! Writing this on the move so will have to think it through properly later!

as for timestretching. This can then just be a ratio change in the item properties to match the new ratio.. need to work that out though.

Probably not helpful stuff here sorry
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 08-12-2019, 11:09 AM   #753
AndrewFalcon
Human being with feelings
 
AndrewFalcon's Avatar
 
Join Date: Dec 2018
Posts: 16
Default

Hey Sexan! I`ve tried you script area51 from github and get this error at start.

Error: Area_51_core.lua:122: attempt to index a nil value (field '?')

Stack traceback:
Area_51_core.lua:14: in function 'crash'
Area_51_core.lua:122: in function 'Status'
Area_51_class.lua:183: in function 'Draw'
Area_51_core.lua:1030: in function <...NEW_TRACKS\Scripts\SEXAN\Area51_24_june\Area_5 1_core.lua:998>
[C]: in function 'xpcall'
Area_51_core.lua:997: in function <...NEW_TRACKS\Scripts\SEXAN\Area51_24_june\Area_5 1_core.lua:996>

Reaper: 5.981+dev0807/x64
Platform: Win64
AndrewFalcon is offline   Reply With Quote
Old 08-28-2019, 04:25 PM   #754
Delucci
Human being with feelings
 
Join Date: May 2017
Posts: 136
Default

So.. any news on this? No rush, I just would like to know
Delucci is online now   Reply With Quote
Old 09-07-2019, 10:19 AM   #755
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 498
Default

I'm also interested...
Travesty is offline   Reply With Quote
Old 09-07-2019, 10:38 AM   #756
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 498
Default

I'm getting the following error:


Area_51_mouse.lua:84: attempt to call a nil value (global 'GetTrackZoneInfo')
Travesty is offline   Reply With Quote
Old 09-08-2019, 02:22 AM   #757
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,441
Default

A lot of work has been done behind the scenes. Found some issues with few functions that require reimplementation so I'm doing that. I'm also working IRL so I do not have time to check in here on forum.

Zones are done, items are moving all over the place
There is issue with track offset function so moving items up and down are wonky (fixing this ATM but it also affects ghost copies so its a big one)
Mouse is restricted to arrange view (lots of fixes here).Now everything is more fluid
Lots of small fixes to drawing stuff
Refactored the way areas are calculated (needed for zones since calculation before was extremely wrong)

This fixes and changes are not yet pushed to git since there was major changes which still need fixes around.+

When this is sorted out then we will go into beta with basic release (move,copy,paste,cut,delete)

Last edited by Sexan; 09-08-2019 at 02:34 AM.
Sexan is offline   Reply With Quote
Old 09-08-2019, 08:52 AM   #758
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 836
Default

Thanks for keeping us posted, Sexan.

Great work!
timothys_monster 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 07:24 PM.


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