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

Reply
 
Thread Tools Display Modes
Old 10-14-2019, 01:12 PM   #1
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default ReaScript question (Lua): Get track FX data from active MIDI editor

I'm trying to write a script that would reference the track's FX chain from a selected MIDI item in the MIDI editor. I'm sure it's possible, but I'm a bit lost referencing the ReaScript API.

It seems that I would need to use reaper.MIDIEditor_GetActive() as a parameter for reaper.MIDIEditor_GetTake(), but I'm lost after that. Is there a way to identify the track and therefore the track FX from the returned take value in reaper.MIDIEditor_GetTake?
pcartwright is offline   Reply With Quote
Old 10-14-2019, 01:39 PM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Code:
local editor = reaper.MIDIEditor_GetActive()
local take = reaper.MIDIEditor_GetTake(editor)
local track = reaper.GetMediaItemTake_Track(take)
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 10-14-2019, 06:42 PM   #3
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default

Duh'... of course

Thanks!
pcartwright 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 03:11 PM.


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