|
|
|
11-03-2019, 09:32 AM
|
#1881
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
@timbralzoom
This is not exactly what you requested, but can still be useful when working on hundreds or thousands of MIDI items:
Transpose selected MIDI items (all takes) to target octave- It transposes selected MIDI takes by octaves, so that the lowest note lands on that certain (user defined) octave
- You can edit the last line to set the target octave
Code:
function get_notes_and_range(take)
local MIDI_notes = {}
local note_min, note_max = 127, 0
local retval, note_cnt = reaper.MIDI_CountEvts(take)
for n=1, note_cnt do
local ret, selected, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote(take, n-1)
MIDI_notes[#MIDI_notes+1] = {selected, muted, startppqpos, endppqpos, chan, pitch, vel}
if pitch < note_min then note_min = pitch end
if pitch > note_max then note_max = pitch end
end
return MIDI_notes, note_min, note_max
end
function transpose_to_octave(octave) -- octave 4 is middle C
octave = octave + 1
local item_cnt = reaper.CountSelectedMediaItems(0)
for i=1, item_cnt do
local item = reaper.GetSelectedMediaItem(0, i-1)
if item then
local take_count = reaper.GetMediaItemNumTakes(item)
for t=1, take_count do
local take = reaper.GetMediaItemTake(item, t-1)
if take and reaper.TakeIsMIDI(take) then
local note_tbl, note_min, note_max = get_notes_and_range(take)
local note_min_transposed = note_min % 12 + octave*12
local pitch_diff = note_min_transposed - note_min
for noteidx=1, #note_tbl do
local n = note_tbl[noteidx]
--boolean reaper.MIDI_SetNote(MediaItem_Take take, integer noteidx, optional boolean selectedIn, optional boolean mutedIn, optional number startppqposIn, optional number endppqposIn, optional number chanIn, optional number pitchIn, optional number velIn, optional boolean noSortIn)
reaper.MIDI_SetNote(take, noteidx-1, n[1], n[2], n[3], n[4], n[5], n[6]+pitch_diff, n[7], false)
end
end
end
end
end
reaper.Undo_OnStateChange("Transpose")
end
transpose_to_octave(4) -- 4 is middle C (5 = middle C + 1 octave etc.)
|
|
|
11-03-2019, 01:35 PM
|
#1882
|
Human being with feelings
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
|
Quote:
Originally Posted by MusoBob
That should be easy enough to make but I think there may already be something that will do that. Try in Reapack.
|
Thank you!
i checked everything i found "Transpose" related .. didn't work.
Quote:
Originally Posted by spk77
@timbralzoom
This is not exactly what you requested, but can still be useful when working on hundreds or thousands of MIDI items:
Transpose selected MIDI items (all takes) to target octave- It transposes selected MIDI takes by octaves, so that the lowest note lands on that certain (user defined) octave
- You can edit the last line to set the target octave
Code:
function get_notes_and_range(take)
local MIDI_notes = {}
local note_min, note_max = 127, 0
local retval, note_cnt = reaper.MIDI_CountEvts(take)
for n=1, note_cnt do
local ret, selected, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote(take, n-1)
MIDI_notes[#MIDI_notes+1] = {selected, muted, startppqpos, endppqpos, chan, pitch, vel}
if pitch < note_min then note_min = pitch end
if pitch > note_max then note_max = pitch end
end
return MIDI_notes, note_min, note_max
end
function transpose_to_octave(octave) -- octave 4 is middle C
octave = octave + 1
local item_cnt = reaper.CountSelectedMediaItems(0)
for i=1, item_cnt do
local item = reaper.GetSelectedMediaItem(0, i-1)
if item then
local take_count = reaper.GetMediaItemNumTakes(item)
for t=1, take_count do
local take = reaper.GetMediaItemTake(item, t-1)
if take and reaper.TakeIsMIDI(take) then
local note_tbl, note_min, note_max = get_notes_and_range(take)
local note_min_transposed = note_min % 12 + octave*12
local pitch_diff = note_min_transposed - note_min
for noteidx=1, #note_tbl do
local n = note_tbl[noteidx]
--boolean reaper.MIDI_SetNote(MediaItem_Take take, integer noteidx, optional boolean selectedIn, optional boolean mutedIn, optional number startppqposIn, optional number endppqposIn, optional number chanIn, optional number pitchIn, optional number velIn, optional boolean noSortIn)
reaper.MIDI_SetNote(take, noteidx-1, n[1], n[2], n[3], n[4], n[5], n[6]+pitch_diff, n[7], false)
end
end
end
end
end
reaper.Undo_OnStateChange("Transpose")
end
transpose_to_octave(4) -- 4 is middle C (5 = middle C + 1 octave etc.)
|
This is exactly does what i was trying to describe!
not in the Midi Editor,
but even better in the Arrangement with the Takes!
Thank you so much!
now i need an email address of yours to send a humble Amazon eGift card .. please PM me.
(paypal still doesn't work here/Turkey)
|
|
|
11-04-2019, 12:59 PM
|
#1883
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by timbralzoom
Thank you so much!
now i need an email address of yours to send a humble Amazon eGift card .. please PM me.
(paypal still doesn't work here/Turkey)
|
Thanks! PM sent.
My pm box has been full for ages...just removed all old messages.
I was inactive for a year and a half, so apologies to those who didn't get any reply!
|
|
|
11-04-2019, 02:20 PM
|
#1884
|
Human being with feelings
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
|
Quote:
Originally Posted by spk77
Thanks! PM sent.
My pm box has been full for ages...just removed all old messages.
I was inactive for a year and a half, so apologies to those who didn't get any reply!
|
i am not using a broom avatar for nothing
joking apart, script is a huge time saver to me,
Thanks a lot !
|
|
|
11-04-2019, 02:29 PM
|
#1885
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by timbralzoom
i am not using a broom avatar for nothing
joking apart, script is a huge time saver to me,
Thanks a lot !
|
Glad it worked and thanks for the gift card!
|
|
|
11-05-2019, 08:16 AM
|
#1886
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
Hi! I'd like to ask if someone could make a script that duplicates selected items or AI at mouse position but to snap the start of the duplicated item at the end of the previous item and the opposite to snap the end of the duplicated item at the start of the next item?
Here's a gif that shows how it is done in FL:
https://imgur.com/NaKJC0Y
The advantage of FL way compared to Reaper(Draw copy), is that you can change the length of each duplication from their edge.
Is there a script that could split the looped items, to the area shown in the next pic, so we could do the same in Reaper?
|
|
|
11-10-2019, 12:58 AM
|
#1887
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Smart tool assigned to keystroke?
I've created several buttons and I can turn them into 'Smart Tools' via a right click on the mouse.
But what I'm trying to figure out now to do is have a keystroke trigger the smart tool.
So far, I haven't been able to find anything in the documentation that describes how to do this?
To explain further... I have a button that I can turn into a smart tool.
I want to assign a keystroke that will trigger that button as a smart tool (not just trigger the button)
Any help would be greatly appreciated.
Thank you!
|
|
|
11-10-2019, 05:37 AM
|
#1888
|
Human being with feelings
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
|
is this possible:
Item: Extend last note length to the end of the item?
for filling the end gap with the last note's length
i hope image explains a bit better
|
|
|
11-10-2019, 07:40 AM
|
#1889
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by LarrySeyer
I've created several buttons and I can turn them into 'Smart Tools' via a right click on the mouse.
But what I'm trying to figure out now to do is have a keystroke trigger the smart tool.
|
You can do that using custom actions.
Create a new custom action, give it a name, e.g., Arm MyScript.
Add action "Action: Arm next action".
Add your script: MyScript.
Click OK.
Set a shortcut key to the new custom action.
|
|
|
11-10-2019, 09:19 AM
|
#1890
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by Edgemeal
You can do that using custom actions.
Create a new custom action, give it a name, e.g., Arm MyScript.
Add action "Action: Arm next action".
Add your script: MyScript.
Click OK.
Set a shortcut key to the new custom action.
|
Thank you for attempting to help but I don’t think that will do what I’m trying to do.
I need to Trigger a particular button into smart tool mode. Not arm a “next” button since there are several buttons and several keystrokes that need this function - all of them different. So a “next” feature will not work.
Any other suggestions?
L
Last edited by LarrySeyer; 11-10-2019 at 09:44 AM.
|
|
|
11-10-2019, 11:10 AM
|
#1891
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by LarrySeyer
Thank you for attempting to help but I don’t think that will do what I’m trying to do.
I need to Trigger a particular button into smart tool mode. Not arm a “next” button since there are several buttons and several keystrokes that need this function - all of them different. So a “next” feature will not work.
Any other suggestions?
L
|
This seems to work, but you have to create a copy of this script (with different "action_id_str") for each of your buttons:
Code:
local action_id_str = "_RSbfc5312090ba047544b89a315793ce5754c95bdd" -- Copy/paste this Command ID from the action list
local sectionname = "" -- empty string for main section actions
local action = reaper.NamedCommandLookup(action_id_str)
local retval, sec = reaper.GetArmedCommand()
if retval == action and sec == sectionname then
action = 0 -- disarm
end
reaper.ArmCommand(action, sectionname)
reaper.defer(function() end) -- no undo point
|
|
|
11-10-2019, 11:19 AM
|
#1892
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by spk77
This seems to work, but you have to create a copy of this script (with different "action_id_str") for each of your buttons:
Code:
local action_id_str = "_RSbfc5312090ba047544b89a315793ce5754c95bdd" -- Copy/paste this Command ID from the action list
local sectionname = "" -- empty string for main section actions
local action = reaper.NamedCommandLookup(action_id_str)
local retval, sec = reaper.GetArmedCommand()
if retval == action and sec == sectionname then
action = 0 -- disarm
end
reaper.ArmCommand(action, sectionname)
reaper.defer(function() end) -- no undo point
|
That works perfectly! Thank you!
BTW, what theme are you using? It looks awesome!
L
|
|
|
11-13-2019, 11:10 AM
|
#1894
|
Human being with feelings
Join Date: Jul 2018
Posts: 4
|
SWS Extensions Update for MacOS 10.15.1 (Catalina)
Does anyone know the ETA for an update that will work with Mac OS Catalina? I did the Mac upgrade and SWS-Extensions are non functioning as is also the latest version of Reaper. I had to downgrade back to MacOS 10.14.6.
Thanks for any feedback. I didn't find any info at sws-extension.org.
|
|
|
11-13-2019, 11:16 AM
|
#1895
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
Quote:
Originally Posted by free2worship
Does anyone know the ETA for an update that will work with Mac OS Catalina? I did the Mac upgrade and SWS-Extensions are non functioning as is also the latest version of Reaper. I had to downgrade back to MacOS 10.14.6.
Thanks for any feedback. I didn't find any info at sws-extension.org.
|
Have a look at this thread (post #8 and #10): https://forum.cockos.com/showthread.php?t=226059
|
|
|
11-15-2019, 10:06 AM
|
#1896
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,180
|
Hi Folks
Is it possible to script an action that starts playback from the left hand visible edge of the currently focussed midi editor window?
Many thanks for any tips
|
|
|
11-21-2019, 03:33 PM
|
#1897
|
Human being with feelings
Join Date: Jan 2019
Location: UK
Posts: 938
|
Hey there!
As my Render To File is bugging out, I'm needing to loop through my hardware chain via track sends/receives.
Could someone help me with a simple script that:
1) Sets the current/selected track Audio Hardware Output to: Output 3 / Output 4 and disables Parent Send
2) Creates a new track using '$track-print' as the name, volume at 0dB, Armed, Monitoring On and Input:Stereo (Input 3 / Input 4).
Happy to donate via PayPal as this would be a big time saver!
|
|
|
11-22-2019, 06:03 AM
|
#1898
|
Human being with feelings
Join Date: Jan 2019
Location: UK
Posts: 938
|
Quote:
Originally Posted by b0se
Hey there!
As my Render To File is bugging out, I'm needing to loop through my hardware chain via track sends/receives.
Could someone help me with a simple script that:
1) Sets the current/selected track Audio Hardware Output to: Output 3 / Output 4 and disables Parent Send
2) Creates a new track using '$track-print' as the name, volume at 0dB, Armed, Monitoring On and Input:Stereo (Input 3 / Input 4).
Happy to donate via PayPal as this would be a big time saver!
|
Never mind, dipped the proverbial toes into scripting and done it. Works a treat.
Code:
-- get selected track ID, add FX, disable parent send
trackCurrent = reaper.GetSelectedTrack(0,0)
val,trackName = reaper.GetTrackName(trackCurrent)
reaper.TrackFX_AddByName(trackCurrent, "VST:NotJustAnotherDither", 0, 1 )
reaper.SetMediaTrackInfo_Value(trackCurrent, "B_MAINSEND", 0)
-- set 3/4 HW output
_, chunk = reaper.GetTrackStateChunk(trackCurrent, '')
chunk = chunk:gsub('MAINSEND','HWOUT 2 0 1 0 0 0 0 -1:U -1\nMAINSEND')
reaper.SetTrackStateChunk(trackCurrent, chunk, false)
-- unarm all tracks
total_tracks = reaper.CountTracks(0)
for i = 0, total_tracks-1 do
track = reaper.GetTrack(0,i)
if reaper.GetMediaTrackInfo_Value(track, "I_RECARM") == 1 then
reaper.SetMediaTrackInfo_Value(track, "I_RECARM", 0)
end
end
-- Cload template and rename
reaper.Main_openProject("/Volumes/SSD/Reaper/KEEP/SBOUT.RTrackTemplate")
trackCurrent = reaper.GetSelectedTrack(0,0)
reaper.GetSetMediaTrackInfo_String(trackCurrent, "P_NAME", trackName..'-SB', true)
Found the HWOUT string via this script mentioned here:
https://forum.cockos.com/showpost.ph...&postcount=659
Also unarms all other tracks as to only record via HW loop, and adds Airwindows NJAD (dither) before hitting the hardware.
|
|
|
12-03-2019, 06:04 AM
|
#1899
|
Human being with feelings
Join Date: Feb 2018
Location: Belgium
Posts: 7
|
Quote:
Originally Posted by spk77
Thanks, it worked!
(I still had to use parameter modulation (for testing): If I move a slider on the ReaControlMIDI, it becomes "last focused FX" and the script doesn't work )
Here's the first attempt:
Lua - Adjust wet parameter of floating and focused track FX.
Code:
function msg(m)
return reaper.ShowConsoleMsg(tostring(m) .. "\n")
end
function adjust_wet_param()
local is_new_value, filename, sectionID, cmdID,mode, resolution, val = reaper.get_action_context()
local retval, track_number, item_number, fx_number = reaper.GetFocusedFX()
if retval == 1 and item_number == -1 then -- this script works only on track FXs
local track = reaper.CSurf_TrackFromID(track_number, false)
local is_open = reaper.TrackFX_GetOpen(track, fx_number)
if not is_open then
return
end
for i=1, reaper.TrackFX_GetNumParams(track, fx_number) do
local ret, param_name = reaper.TrackFX_GetParamName(track, fx_number, i-1, "")
--msg(param_name)
if param_name == "Wet" then
--msg(val/127)
reaper.TrackFX_SetParam(track, fx_number, i-1, val/127)
break
end
end
end
end
reaper.defer(adjust_wet_param)
|
Thats very nice thank you!!! Now I have a button in absolute mode and it toggle between 0 and 100% of a selected FX without glitches. Is it a way I could use this script in order to toggle 0%-100% simultaneously on evrey fxs of the selected tracks? Regards, B
|
|
|
12-11-2019, 08:00 PM
|
#1900
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Wait for MIDI event to record
In Digital Performer, you can set the transport to wait to start recording for a MIDI note to be played before it starts recording.
I'd like to have a script that would do that.
|
|
|
12-11-2019, 08:46 PM
|
#1902
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
|
Thank you but I don’t think that will do what I’m trying to do.
I wanted to start recording if I play ANY note on the midi keyboard. I don’t want to have to press a particular note to start recording. When you’re recording a solo piano via MIDI, many times you break up the recording into smaller parts. You set your cursor where you want the next part of the piano part to go and the machine will wait until you start playing to record. Once you start playing the midi part, it goes into record and places the notes that you play in their proper positions.
|
|
|
12-12-2019, 01:20 AM
|
#1903
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
That just uses a JS Midi FX and reaper.TrackFX_GetParam
you could set it to any note/s input to start recording so if the parameter input > -1 (0-127) then record.
But I'm sure someone would of worked out a way to do it by now.
|
|
|
12-12-2019, 12:46 PM
|
#1904
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Wait for MIDI note to record
Quote:
Originally Posted by MusoBob
That just uses a JS Midi FX and reaper.TrackFX_GetParam
you could set it to any note/s input to start recording so if the parameter input > -1 (0-127) then record.
But I'm sure someone would of worked out a way to do it by now.
|
That’s a little above my pay grade (smiles)
Anyone else have a script that will do this? Or something I can understand as an example for me to work from?
|
|
|
12-12-2019, 02:02 PM
|
#1905
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
This will work but it won't catch the first note so you may have to hit any note to start record first.
I will think more about that, though someone else may have a solution.
Put this in the first track set it to record and monitor midi input and select that track.
https://stash.reaper.fm/v/37404/note-counter.jsfx
midi input start record.lua
Install Lokasenna GUI from ReaPack then run
Set Lokasenna_GUI v2 library path.lua
|
|
|
12-12-2019, 09:27 PM
|
#1906
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Wait for MIDI note to start recording.
Quote:
Originally Posted by MusoBob
This will work but it won't catch the first note so you may have to hit any note to start record first.
I will think more about that, though someone else may have a solution.
Put this in the first track set it to record and monitor midi input and select that track.
https://stash.reaper.fm/v/37404/note-counter.jsfx
midi input start record.lua
Install Lokasenna GUI from ReaPack then run
Set Lokasenna_GUI v2 library path.lua
|
Thank you!
I’ll give this a try.
All the best to you.
Larry
|
|
|
12-13-2019, 06:34 PM
|
#1907
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Wait for MIDI event to record
Quote:
Originally Posted by MusoBob
This will work but it won't catch the first note so you may have to hit any note to start record first.
I will think more about that, though someone else may have a solution.
Put this in the first track set it to record and monitor midi input and select that track.
https://stash.reaper.fm/v/37404/note-counter.jsfx
midi input start record.lua
Install Lokasenna GUI from ReaPack then run
Set Lokasenna_GUI v2 library path.lua
|
OK, I've been experimenting with this script.
It seems to work except for one thing... as soon as the script is run, the transport starts.
I'm trying to get it to not start the transport until a MIDI note is played... but I'm not having any success.
Any ideas?
|
|
|
12-13-2019, 08:30 PM
|
#1908
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
If you click Edit > Script: midi input start record.lua
Ctrl+F then Ctrl+V > if notes_in_num > -1 > Enter
now put this in Msg("notes_in_num "..notes_in_num)
that will show you what note is triggering the record.
Code:
if notes_in_num > -1 and play_state == 0 then
Msg("notes_in_num "..notes_in_num)
reaper.Main_OnCommand(1013, 0) -- Transport: Record
end
the script is reading "lowest note" parameter in the JS Midi
|
|
|
12-13-2019, 08:42 PM
|
#1909
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
If you click Edit > Script: midi input start record.lua
Ctrl+F then Ctrl+V > if notes_in_num > -1 > Enter
now put this in Msg("notes_in_num "..notes_in_num)
that will show you what note is triggering the record.
Code:
if notes_in_num > -1 and play_state == 0 then
Msg("notes_in_num "..notes_in_num)
reaper.Main_OnCommand(1013, 0) -- Transport: Record
end
the script is reading "lowest note" parameter in the JS Midi
|
Ok. Thanks for that.
It appears to be triggering from 0
L
|
|
|
12-13-2019, 08:45 PM
|
#1910
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
try change it to
Code:
if notes_in_num > 0 and play_state == 0 then
|
|
|
12-13-2019, 11:43 PM
|
#1911
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
try change it to
Code:
if notes_in_num > 0 and play_state == 0 then
|
When I do that, it doesn't start at all.
I must be missing something here...
When checking the value of notes_in_num, it is ALWAYS 0.
Seems like that should change when I play a MIDI note, correct?
In it's simplest form it is:
Code:
function watchJsfx()
play_state = reaper.GetPlayState()
seltrack = reaper.GetTrack( 0, 0 )
notes_in = reaper.TrackFX_GetParam(seltrack, 0, 12)
notes_in_num = tonumber(round2(notes_in))
--
if notes_in_num > 0 and play_state == 0 then
reaper.Main_OnCommand(1013, 0) -- Transport: Record
end
end
But notes_in_num is ALWAYS zero... that doesn't seem right.
I can record onto that track using my MIDI keyboard just fine... no issues.
L
|
|
|
12-13-2019, 11:58 PM
|
#1912
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Are any of the sliders changing in the JS note counter ?
|
|
|
12-14-2019, 12:25 AM
|
#1913
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
Are any of the sliders changing in the JS note counter ?
|
I think I may be missing a key component.
You mentioned using "note-counter.jsfx" and putting that on track 1.
However, I can't seem to find anywhere to put that on there. I have the file... I can see it when trying to load it into the actions list. But it's greyed out.
How is that loaded? Input FX?
If so, why is it greyed out when I try to load it?
Sorry to be so dense... but I'm a relative newbee with Reaper.
|
|
|
12-14-2019, 12:34 AM
|
#1914
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Reaper > Options > Show Reaper resource path
put the downloaded note-counter.jsfx into
Effects/MIDI folder
restart Reaper
add FX by clicking the FX button on the track
under JS in the FX browser type note-counter
and add it.
|
|
|
12-14-2019, 12:44 AM
|
#1915
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
Are any of the sliders changing in the JS note counter ?
|
Yes. Now I see the .jsfx plugin. Sorry, I didn't load the plugin.
However, that did not fix the problem.
I've tried -1 and 0 in the if statement and neither works.
Currently, the code is:
Code:
function watchJsfx()
play_state = reaper.GetPlayState()
seltrack = reaper.GetTrack( 0, 0 )
notes_in = reaper.TrackFX_GetParam(seltrack, 0, 12 )
notes_in_num = tonumber(round2(notes_in))
Msg("notes_in_num "..notes_in_num)
if notes_in_num > 0 and play_state == 0 then
reaper.Main_OnCommand(1013, 0) -- Transport: Record
end
end
notes_in_num always shows 0
Sorry this is taking so long.
I really appreciate your help. I can see that it works on your system. (nice GIF btw) It just doesn't work on mine for whatever reason.
L
|
|
|
12-14-2019, 12:45 AM
|
#1916
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
You could get the lua script to insert the track, the JS MIDI FX, set to record and monitor automatically then you set set the midi input device, though you maybe able to set that also ?
|
|
|
12-14-2019, 12:52 AM
|
#1917
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by MusoBob
You could get the lua script to insert the track, the JS MIDI FX, set to record and monitor automatically then you set set the midi input device, though you maybe able to set that also ?
|
I'll have to do some research on that... that would be much better for sure.
BTW, I deleted my original track and created a new track and now it works... must have been the old track.
Thank you again for all of your help!
L
|
|
|
12-14-2019, 12:56 AM
|
#1918
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by LarrySeyer
I'll have to do some research on that... that would be much better for sure.
BTW, I deleted my original track and created a new track and now it works... must have been the old track.
Thank you again for all of your help!
L
|
Spoke too soon...
It worked one time... now it doesn't anymore. Geez.
Seems like there should be a Reaper Transport option for this. DP has had it for over 20 years. Surely someone has created a 'wait for MIDI' function for Reaper's transport?
L
|
|
|
12-14-2019, 01:05 AM
|
#1919
|
Human being with feelings
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
|
Quote:
Originally Posted by LarrySeyer
Spoke too soon...
It worked one time... now it doesn't anymore. Geez.
Seems like there should be a Reaper Transport option for this. DP has had it for over 20 years. Surely someone has created a 'wait for MIDI' function for Reaper's transport?
L
|
Made a video so you can see what I see.
[Video] https://youtu.be/6lxQ3Snj-kg [/Video]
|
|
|
12-14-2019, 01:08 AM
|
#1920
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
The region player I made inserts the track and FX, I can just copy the code from that.
If you got it to work once it will work again just needs sorting out, hang in there.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:25 AM.
|