Old 06-20-2022, 08:42 PM   #1
patricksalandanan2020
Human being with feelings
 
patricksalandanan2020's Avatar
 
Join Date: Jun 2022
Location: PH
Posts: 2
Default FX plugin Parameter controlled by Midi Keys LUA

Hello guys, sorry im not fluent in english and nocode experience. I hope you understand what I want say. I want to control my reaeq (Band 1) to increment about +/- 1db using my midi keys (C1). I tried using Reacontrolmidi but i cant exact it -/+ 1db so i give up for reacontrolmidi for now. I did my research and combine some LUA but i dont know whats next in this code. or is there a LUA like this or similar?
so the flow was like:
If i press MIDI keys C1
- LUA gonna search for the name "DRUMS MASTER" track then
- gonna search for FX name "DRUMS MASTER EQ" then Focus then
- gonna increment additional 1db of "Band 1"

Quote:
-- cfillion
function getTrackByName(name)
for trackIndex = 0, reaper.CountTracks(0) - 1 do
local track = reaper.GetTrack(0, trackIndex)
local ok, trackName = reaper.GetSetMediaTrackInfo_String(track, 'P_NAME', '', false)

if ok and trackName == name then
return track -- found it! stopping the search here
end
end
end

local track = getTrackByName("DRUMS MASTER")

if track then -- if a track named "DRUMS MASTER" was found
reaper.SetOnlyTrackSelected(track)
end


fx_name = 'DRUMS MASTER EQ'

local track = reaper.GetSelectedTrack(0,0)
if track then
for fx = 0, reaper.TrackFX_GetCount(track)-1 do
local _, name = reaper.TrackFX_GetFXName(track, fx, "")
if name == fx_name then
reaper.TrackFX_Show(track, fx, 3) -- 3 = show as floating.
break
end
end
end


And also if possible this too (but not so important). Instead of editing/renaming all "DRUMS MASTER EQ" in Notepad. Im just gonna rename the File itself instead. "DRUMS MASTER EQ.lua" to "GUITAR MASTER EQ.lua". Like This

Quote:

--[[
* ReaScript Name: Decrease master playrate by 05%
* Author: X-Raym
* Author URI: https://www.extremraym.com
* Repository: GitHub > X-Raym > ReaScripts for Cockos REAPER
* Repository URI: https://github.com/X-Raym/REAPER-ReaScripts
* Licence: GPL v3
* REAPER: 5.0
* Version: 1.0.1
--]]

reaper.Undo_BeginBlock()
local info = debug.getinfo(1,'S');
local val = string.match(info.source, "%d+")
local playrate = reaper.Master_GetPlayRate( project )
reaper.CSurf_OnPlayRateChange( playrate - val / 100 )
reaper.Undo_EndBlock( "Decrease master playrate by " .. val .. "%", -1 )
This is really helpful and comfortable in my workflow if this work.
Thanks guys...
Attached Images
File Type: jpg Untitled.jpg (84.4 KB, 41 views)

Last edited by patricksalandanan2020; 06-20-2022 at 09:46 PM. Reason: Misppeled
patricksalandanan2020 is offline   Reply With Quote
Old 06-20-2022, 10:11 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Thanks !

I suppose in certain configurations something similar can also be done by ReaPack->ReaLearn.

-Michael
mschnell is offline   Reply With Quote
Old 06-20-2022, 11:51 PM   #3
patricksalandanan2020
Human being with feelings
 
patricksalandanan2020's Avatar
 
Join Date: Jun 2022
Location: PH
Posts: 2
Default

Quote:
Originally Posted by mschnell View Post
Thanks !

I suppose in certain configurations something similar can also be done by ReaPack->ReaLearn.

-Michael
oh i miss type Realearn to reamidicontrol, My problem in Realearn im still figuring out how to Float the FX and increment by 1db after pressing the C1 key.
patricksalandanan2020 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 04:06 AM.


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