Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 04-29-2019, 08:01 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default TimeMap2() vs. swing grid (helper functions posted by Justin)

edit:
Created a bug report here.

edit2:
See posts #10, #14 for Justin's helper functions.


=== original post ===

This

Code:
_nextGridPos = reaper.TimeMap2_beatsToTime(0, 0.25, 0)
should, to my understanding, give the position (in time) of the first visible grid line in my project.
It seems to work correctly for non swing grid:




However, when I set a swing grid, and run the script again, the same position is returned and not the actual position of the grid line.



Doesn't this function take swing grid into account or is it a bug in my understanding?

Last edited by nofish; 06-23-2019 at 09:04 AM.
nofish is offline   Reply With Quote
Old 04-29-2019, 08:51 AM   #2
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Ah, so you think TimeMap2_beatsToTime() does not take swing into account?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 04-29-2019, 09:16 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

I'd think so (to my understanding, that's why I'd like to get a confirmation, or not, i.e. if it's a bug), . Which, if so, would explain why BR_GetNext/PreviousGridDiv doesn't work with swing grid currently I think as it uses these API functions.

Last edited by nofish; 04-29-2019 at 09:24 AM.
nofish is offline   Reply With Quote
Old 04-29-2019, 09:24 AM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Ah that would indeed make sense and explain it! I hope the devs read this and can give some insight.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 04-30-2019, 06:32 AM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

Quote:
Originally Posted by _Stevie_ View Post
I hope the devs read this and can give some insight.
For now I'd as well appreciate if a fellow scripter more familiar with this function could give an opinion so I'd know if I should create an 'official' bug report or not. Anyone?
nofish is offline   Reply With Quote
Old 04-30-2019, 06:41 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Yes! Bump
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ 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 05:07 PM.


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