Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 12-31-2018, 01:06 PM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,463
Default API: GetEnvelopePointEx() timeOut breaks if no start edge point

This script should give time of first envelope point in AI.
Works ok if there's the start edge point present, but when I delete it, it returns 'impossible' (outside of AI) value.

Code:
reaper.ClearConsole()

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

track = reaper.GetSelectedTrack(0,0)
env =  reaper.GetTrackEnvelope(track, 0)
retval, time, value, shape, tension, selected = reaper.GetEnvelopePointEx(env, 0, 0)

msg(time)


ruler is set to seconds
R5.95

edit:
It seems if the start edge point is missing the returned time value gets relative to AI start?, is this intended behaviour?

edit2:
Yes, seems to get relative indeed.


Last edited by nofish; 12-31-2018 at 01:26 PM.
nofish is offline   Reply With Quote
Old 02-15-2019, 12:48 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,463
Default

bump...
nofish 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:14 PM.


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