├── .github └── FUNDING.yml ├── .gitignore ├── Color ├── X-Raym_Display color of selected tracks items and takes in the console.eel ├── X-Raym_Select items with same color as mouse context (or first selected item) on selected tracks.lua ├── X-Raym_Set selected takes or items color from their visible color.eel ├── X-Raym_Set selected tracks and takes color from HEX value.lua ├── X-Raym_Set selected tracks and takes color.eel └── X-Raym_Set selected tracks items and takes color from mouse context.lua ├── Cursor ├── X-Raym_Automatically set edit cursor pos at mouse position if mouse over ruler.lua ├── X-Raym_Go to start of next region.lua ├── X-Raym_Go to start of previous region (strict).lua ├── X-Raym_Go to start of previous region.lua ├── X-Raym_Move edit cursor to end of region under play or edit cursor and play.eel ├── X-Raym_Move edit cursor to end of region under play or edit cursor.eel ├── X-Raym_Move edit cursor to first selected item snap offset.lua ├── X-Raym_Move edit cursor to next frame.lua ├── X-Raym_Move edit cursor to previous frame.lua ├── X-Raym_Move edit cursor to start of region under play or edit cursor and play.eel └── X-Raym_Move edit cursor to start of region under play or edit cursor.eel ├── Custom Actions └── TextItems.ReaperKeyMap ├── Envelopes ├── Across Tracks │ ├── X-Raym_Copy visible armed envelope of last touched track and paste to selected tracks.lua │ ├── X-Raym_Copy visible armed envelope points in time selection of last touched track and insert in selected tracks.lua │ └── X-Raym_Merge visible armed envelopes of selected track to selected tracks VCA like).lua ├── Automation Items │ ├── X-Raym_Delete automation items in time selection.lua │ └── X-Raym_Select all automation items below length threshold on selected tracks.lua ├── On Tracks │ ├── X-Raym_Add envelope point on edit cursor position from next point value.lua │ ├── X-Raym_Add envelope point on edit cursor position from previous point value.lua │ ├── X-Raym_Add envelope point on next point position from previous point value.lua │ ├── X-Raym_Add envelope point on previous point position from next point value.lua │ ├── X-Raym_Add envelope points at regular interval and set all points to linear.lua │ ├── X-Raym_Add envelope points at time selection edges from X to Y preserving edges on choosen envelopes.lua │ ├── X-Raym_Add envelope points at time selection edges from XdB to XdB preserving edges on Volume envelope.lua │ ├── X-Raym_Add envelope points at time selection edges from center to center preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from center to max preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from center to max.lua │ ├── X-Raym_Add envelope points at time selection edges from center to min preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from center to min.lua │ ├── X-Raym_Add envelope points at time selection edges from max to center preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from max to center.lua │ ├── X-Raym_Add envelope points at time selection edges from max to max preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from max to min preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from max to min.lua │ ├── X-Raym_Add envelope points at time selection edges from min to center preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from min to center.lua │ ├── X-Raym_Add envelope points at time selection edges from min to max preserving edges.lua │ ├── X-Raym_Add envelope points at time selection edges from min to max.lua │ ├── X-Raym_Add envelope points at time selection edges from min to min preserving edges.lua │ ├── X-Raym_Add point on envelopes at edit cursor with center value.lua │ ├── X-Raym_Add point on envelopes at edit cursor with max value.lua │ ├── X-Raym_Add point on envelopes at edit cursor with min value.lua │ ├── X-Raym_Add point on envelopes at edit cursor.lua │ ├── X-Raym_Add points before and after selected points.lua │ ├── X-Raym_Add points on envelopes at markers.lua │ ├── X-Raym_Add points on envelopes at regions start.lua │ ├── X-Raym_Add points on envelopes at regions.lua │ ├── X-Raym_Clean inactive and hidden envelopes.lua │ ├── X-Raym_Copy envelope points in time selection and paste at edit cursor preserving destination edges.lua │ ├── X-Raym_Copy envelope points in time selection and paste at edit cursor.lua │ ├── X-Raym_Copy envelope values at edit cursor and insert at time selection.lua │ ├── X-Raym_Copy envelope values at edit cursor and paste at time selection.lua │ ├── X-Raym_Delete envelope points at cursor position.lua │ ├── X-Raym_Delete envelope points below consecutive threshold (envelope smoother).lua │ ├── X-Raym_Delete envelope points preserving edges if time selection.lua │ ├── X-Raym_Delete envelope points.lua │ ├── X-Raym_Delete selected points on selected tracks visible armed envelope.lua │ ├── X-Raym_Hide envelope and set it as inactive.lua │ ├── X-Raym_Invert envelope points selection.lua │ ├── X-Raym_Invert envelope points values preserving edges if time selection.lua │ ├── X-Raym_Invert envelope points values.lua │ ├── X-Raym_Quantize envelope points.lua │ ├── X-Raym_Replace envelope points by linear points at regular interval.lua │ ├── X-Raym_Reset envelope with default value.lua │ ├── X-Raym_Reset envelope with value at edit cursor.lua │ ├── X-Raym_Reset envelope with value estimated by regular intervals.lua │ ├── X-Raym_Reset selected envelope points to center default value.lua │ ├── X-Raym_Select envelope points in visible armed envelope of selected tracks.lua │ ├── X-Raym_Select redundant envelope points.lua │ ├── X-Raym_Set envelope as active and armed.lua │ ├── X-Raym_Set flat points value in time selection preserving edges if time selection.lua │ ├── X-Raym_Set flat points value in time selection.lua │ ├── X-Raym_Set or Offset envelope points preserving edges if time selection.lua │ ├── X-Raym_Set or Offset envelope points value.lua │ ├── X-Raym_Set selected tracks parameters values with envelopes values at edit cursor.lua │ ├── X-Raym_Toggle certain envelopes properties.lua │ ├── X-Raym_Toggle envelope fader scaling.lua │ ├── X-Raym_Toggle envelopes active state property.lua │ └── X-Raym_Trim selected tracks parameters values with envelopes values at edit cursor.lua ├── Takes │ ├── X-Raym_Apply selected items pitch offset to their pitch envelope and reset.lua │ ├── X-Raym_Create take pitch envelope (random points - with GUI).eel │ ├── X-Raym_Offset selected items pitch envelope.lua │ ├── X-Raym_Pan active takes randomly (normal distribution) with GUI - OneSeed.eel │ ├── X-Raym_Pan active takes randomly (normal distribution)_OneSeed.eel │ ├── spk77_Create take pan envelope from take pan.eel │ ├── spk77_Pan active takes randomly (normal distribution) with GUI.eel │ └── spk77_Pan active takes randomly (normal distribution).eel ├── X-Raym_Clear all track automation envelope latches (background).lua ├── X-Raym_Fade out master envelope at each selected items end.lua ├── X-Raym_Move edit cursor to next envelope point.lua ├── X-Raym_Move edit cursor to previous envelope point.lua ├── X-Raym_Randomize selected envelope points value.lua ├── X-Raym_Round selected envelope points value.eel ├── X-Raym_Select envelope point at edit cursor.lua ├── X-Raym_Set or Offset selected envelope points value.lua ├── X-Raym_Set selected envelope points value from value at edit cursor.lua └── X-Raym_Unselect envelope point at edit cursor.lua ├── FX ├── X-Raym_Bypass inactive take FX of selected items.lua ├── X-Raym_Insert named FX on selected tracks.lua ├── X-Raym_Leave open only focused FX and minimize the others.lua ├── X-Raym_List installed FX according to their installation order_ReaImGui.lua ├── X-Raym_Propagate last focused FX parameters values but bypass to similarly named FX on child tracks (real-time).lua ├── X-Raym_Screenshot FX on selected tracks.lua ├── X-Raym_Set Color RGB paramaters of named FX to its track color.lua ├── X-Raym_Set FX name offline on all tracks.lua ├── X-Raym_Set FX name offline on selected tracks.lua ├── X-Raym_Set FX name online on all tracks.lua ├── X-Raym_Set inactive take FX of selected items offline.lua ├── X-Raym_Set selected tracks FX parameter value from last focused FX last touch parameter.lua ├── X-Raym_Set selected tracks FX parameters values from last focused FX (real-time) (all instances).lua ├── X-Raym_Set selected tracks FX parameters values from last focused FX (real-time).lua ├── X-Raym_Set selected tracks FX parameters values from last focused FX.lua ├── X-Raym_Toggle JS Pitch Shifter and Reapitch on selected tracks according to record arm.lua ├── X-Raym_Toggle all FX except those with (ON) and (OFF) suffixes.eel ├── X-Raym_Toggle focused FX chain panel.lua └── X-Raym_Toggle selected tracks FX except those with (ON) and (OFF) suffixes.lua ├── Functions ├── X-Raym_Functions - console debug messages.eel ├── spk77_class.lua ├── spk77_slider class.lua ├── spk_slider_class.eel ├── utf8.lua └── utf8data.lua ├── Items Editing ├── X-Raym_Align selected items across tracks.lua ├── X-Raym_Convert selected looped items into independent items.eel ├── X-Raym_Convert selected looped items into items and pooled midi.eel ├── X-Raym_Copy selected items and paste at mouse position.lua ├── X-Raym_Create empty items on selected tracks from selected midi takes notes.lua ├── X-Raym_Create seamless loops from selected items sections inside time selection.lua ├── X-Raym_Delete selected items and ripple edit adjacent items.lua ├── X-Raym_Delete selected items sections in time selection if cursor enter time selection and ripple new items.lua ├── X-Raym_Expand first selected item per track to end of last selected ones and delete inbetween ones.lua ├── X-Raym_Expand first selected item to next item end.lua ├── X-Raym_Expand item under mouse to next item end.lua ├── X-Raym_Expand left edge of item under mouse to edit cursor keeping snap offset position and apply to other selected items.eel ├── X-Raym_Expand selected items left edge to the previous item position if close enough.lua ├── X-Raym_Expand selected items length to start and end of their source.eel ├── X-Raym_Expand selected items length to the next item position if close enough.lua ├── X-Raym_Explode multi channel items on two tracks without render (stereo).lua ├── X-Raym_Explode selected items on tracks below.lua ├── X-Raym_Glue selected items independently.eel ├── X-Raym_Implode selected items on same track into takes preserving position.lua ├── X-Raym_Move item position of item under mouse to edit cursor according to ripple state preserving end.eel ├── X-Raym_Move item position of item under mouse to edit cursor according to ripple state.eel ├── X-Raym_Move items to start preserving groups timing relative positions.lua ├── X-Raym_Move left edge and content of item under mouse to edit cursor according to ripple state.eel ├── X-Raym_Move left edge of item under mouse to edit cursor according to ripple state.eel ├── X-Raym_Move right edge and content of item under mouse to edit cursor according to ripple state.eel ├── X-Raym_Move right edge of item under mouse to edit cursor according to ripple state.eel ├── X-Raym_Move selected items on first selected tracks.lua ├── X-Raym_Move selected items position left according to their snap offset.lua ├── X-Raym_Move selected items position right according to their snap offset.lua ├── X-Raym_Move selected items to end of previous items on all visible tracks.lua ├── X-Raym_Move selected items to first track with same color.lua ├── X-Raym_Move selected items to next item on all visible tracks.lua ├── X-Raym_Move selected items to next item on their track.lua ├── X-Raym_Move selected items up to the top visible track.lua ├── X-Raym_Multiply selected items length by two avoiding overlapping with next item.eel ├── X-Raym_Paste items-tracks and snap items if selected and snap enabled.lua ├── X-Raym_Prevent items overlapping on selected items tracks (shuffle edit)_background.lua ├── X-Raym_Quantize selected items edges at grid unit inside them if possible.lua ├── X-Raym_Quantize selected items start and end to closest frame inside them.lua ├── X-Raym_Quantize selected items start and end to closest frame.lua ├── X-Raym_Quantize selected items to closest marker position.lua ├── X-Raym_Quantize selected items to closest region start.lua ├── X-Raym_Quantize selected items to next marker position.lua ├── X-Raym_Quantize selected items to previous marker position.lua ├── X-Raym_Remove item under mouse (restoring fades).lua ├── X-Raym_Replace similar MIDI takes by pools.lua ├── X-Raym_Set item under mouse start and end to items selection.lua ├── X-Raym_Set selected takes playrate keeping snap offset position and adjusting length.lua ├── X-Raym_Shift selected takes source audio content position randomly.lua ├── X-Raym_Shuffle order of selected items columns keeping snap offset positions and parent tracks.lua ├── X-Raym_Shuffle order of selected items keeping snap offset positions and parent tracks.lua ├── X-Raym_Snap selected items to region or marker with same name as their active take.lua ├── X-Raym_Snap selected items to the previous item end on their track.eel ├── X-Raym_Sort selected items columns order by item names alphabetically keeping snap offset positions per track.lua ├── X-Raym_Sort selected items columns order by item notes alphabetically keeping snap offset positions per tracks.lua ├── X-Raym_Sort selected items order by item notes alphabetically keeping snap offset positions per tracks.lua ├── X-Raym_Sort selected items order by takes names alphabetically keeping snap offset positions per tracks.lua ├── X-Raym_Split first selected item at edit carret position in SWS notes window.lua ├── X-Raym_Split selected items according to items on selected tracks and delete new items at spaces.lua ├── X-Raym_Split selected items according to items on selected tracks and keep new items at spaces.lua ├── X-Raym_Split selected items according to items on selected tracks.lua ├── X-Raym_Split selected items at regions.lua ├── X-Raym_Split selected items at their take markers positions.lua ├── X-Raym_Split selected items every X seconds intervals.lua ├── X-Raym_Split selected items into X equal length parts.lua ├── X-Raym_Stretch selected items with new length.lua ├── X-Raym_Stutter edit selected media items.lua ├── X-Raym_Trim items by common time section in selection columns.lua ├── X-Raym_Trim left edge of item under mouse or the next one to mouse cursor without changing fade-in end.lua ├── X-Raym_Trim left edge of item under mouse or the next one to mouse cursor.lua ├── X-Raym_Trim left edge of item under mouse or the next one without changing fade-in end.lua ├── X-Raym_Trim left edge of item under mouse to edit cursor without changing fade-in end.eel ├── X-Raym_Trim left edge of selected items to first transient.lua ├── X-Raym_Trim right edge of item under mouse or the previous one to mouse cursor without changing fade-out start.lua ├── X-Raym_Trim right edge of item under mouse or the previous one to mouse cursor.lua ├── X-Raym_Trim right edge of item under mouse to edit cursor without changing fade-out start.eel ├── X-Raym_Trim right edge of selected items to last transient.lua ├── X-Raym_Trim selected items at first and last transient.lua ├── X-Raym_Unloop selected items.lua ├── X-Raym_mpl_Expand selected takes length and rate to edit cursor and propagate to other item in selection.eel ├── spk77_Glue selected items preserving names.eel └── spk77_Quantize items to grid using item snap offset.eel ├── Items Properties ├── Viente_X-Raym_BPM Converter.lua ├── X-Raym_Add all items left to selected items to items selection.lua ├── X-Raym_Add all items on selected track into item selection.lua ├── X-Raym_Add all items right to selected items to items selection.lua ├── X-Raym_Add empty source take to selected items.lua ├── X-Raym_Add named and colored take markers to selected takes at play cursor position.lua ├── X-Raym_Add new MIDI take to selected items.lua ├── X-Raym_Add stretch markers to selected items at grid divisions.eel ├── X-Raym_Add stretch markers to selected items at tempo markers.eel ├── X-Raym_Add take markers from project markers to selected takes.lua ├── X-Raym_Apply selected active takes volume to their items volume.lua ├── X-Raym_Apply selected items volume to their takes.lua ├── X-Raym_Apply volume of previous item on track to selected items.lua ├── X-Raym_Color selected items according to their MIDI content.lua ├── X-Raym_Color selected items according to their source file name.lua ├── X-Raym_Color selected items from regions at their middle position.lua ├── X-Raym_Color selected items from regions.lua ├── X-Raym_Copy first selected item volume value into clipboard.lua ├── X-Raym_Copy selected items active take names as CSV to clipboard.lua ├── X-Raym_Copy selected items colors as CSV to clipboard.lua ├── X-Raym_Copy selected items notes as CSV to clipboard.lua ├── X-Raym_Copy selected items positions as CSV to clipboard.lua ├── X-Raym_Crossfade selected items across tracks.lua ├── X-Raym_Delete take markers outside of selected items boundaries.lua ├── X-Raym_Display TagLib metadatas of first selected item active take.lua ├── X-Raym_Display list of selected media items active take names in the console.lua ├── X-Raym_Display sum of length of selected media items in the console.lua ├── X-Raym_Exclude items with or without fades from selection.lua ├── X-Raym_Export selected items as tab-delimited regions CSV.lua ├── X-Raym_Group selected items according to their order in selection per track.lua ├── X-Raym_Group selected items vertically by position.lua ├── X-Raym_Invert tracks (reverse vertically) of selected items.lua ├── X-Raym_Keep selected items with X channels only.lua ├── X-Raym_Keep selected only X items randomly.lua ├── X-Raym_Keep selected only active takes audio under or over peak volume threshold.lua ├── X-Raym_List all audio takes paths in the console.lua ├── X-Raym_Move selected items snap offset to next cue.lua ├── X-Raym_Move selected items snap offset to previous cue.lua ├── X-Raym_Move selected items to named tracks_ReaImGui.lua ├── X-Raym_Multiply selected items rate by X and adjust length.lua ├── X-Raym_Nudge active takes volume randomly (normal distribution) with GUI.eel ├── X-Raym_Nudge selected items volume +0.1db.eel ├── X-Raym_Nudge selected items volume +0.5db.eel ├── X-Raym_Nudge selected items volume -0.1db.eel ├── X-Raym_Nudge selected items volume -0.5db.eel ├── X-Raym_Offset selected items active take pan left -5% .lua ├── X-Raym_Offset selected items active take pan right 5%.lua ├── X-Raym_Offset selected items volume by their track fader value.lua ├── X-Raym_Offset selected media items source positions by snap offset length.lua ├── X-Raym_Pan selected takes from -x to +x.eel ├── X-Raym_Pan selected takes from left to right.eel ├── X-Raym_Pan selected takes from right to left.eel ├── X-Raym_Paste clipboard content into selected items notes.lua ├── X-Raym_Paste value in clipboard as selected items volume.lua ├── X-Raym_Propagate items selection to all similary-named active takes on track.lua ├── X-Raym_Propagate selected items FX to all items with same active take name.lua ├── X-Raym_Randomize take pitch (normal distribution with GUI).eel ├── X-Raym_Randomize take playback rate (normal distribution).eel ├── X-Raym_Randomize take playback rate.eel ├── X-Raym_Remove selected items images.lua ├── X-Raym_Rename first selected item take and associated MIDI pools.lua ├── X-Raym_Rename selected items active take from multiline clipboard content.lua ├── X-Raym_Rename selected items active takes from REAPER MIDI notes to Kontakt notes.lua ├── X-Raym_Rename selected items with clipboard content.lua ├── X-Raym_Rename selected takes from CSV input.lua ├── X-Raym_Rename selected takes from regions.lua ├── X-Raym_Reset item snap offset.eel ├── X-Raym_Reset selected items active take source start offset according to media source preferred position.lua ├── X-Raym_Reset selected items active take stretch markers position.lua ├── X-Raym_Reset selected items auto-fades.lua ├── X-Raym_Reset stretch marker under mouse position.lua ├── X-Raym_Reset take playback rate from snap offset.eel ├── X-Raym_Round selected items volume - one decimal.eel ├── X-Raym_Search and replace in selected active takes names.lua ├── X-Raym_Search and replace in selected items takes names.lua ├── X-Raym_Select all items below length threshold on selected tracks.lua ├── X-Raym_Select all items in current region at edit cursor.lua ├── X-Raym_Select item under mouse automatically (background).lua ├── X-Raym_Select items under play cursor_background.lua ├── X-Raym_Select items with same source as first selected item.lua ├── X-Raym_Set item under mouse snap offset at mouse cursor position.lua ├── X-Raym_Set item under mouse snap offset value to selected items.lua ├── X-Raym_Set or offset selected takes pan.lua ├── X-Raym_Set or offset selected takes rate by semitone adjusting item length and fades and clearing preserve pitch.lua ├── X-Raym_Set selected audio takes gain by columns according to takes average RMS.lua ├── X-Raym_Set selected audio takes gain by columns according to takes max peak.lua ├── X-Raym_Set selected item active takes to random colors.lua ├── X-Raym_Set selected items active take sources offline.lua ├── X-Raym_Set selected items active take sources online.lua ├── X-Raym_Set selected items fade-in fade-out length.lua ├── X-Raym_Set selected items fade-in to snap offset.lua ├── X-Raym_Set selected items fade-out to snap offset.lua ├── X-Raym_Set selected items inactive takes sources offline.lua ├── X-Raym_Set selected items inactive takes sources online.lua ├── X-Raym_Set selected items notes from multiline clipboard content.lua ├── X-Raym_Set selected items notes to their current region name.lua ├── X-Raym_Set selected items sources TagLib metadatas.lua ├── X-Raym_Set selected items take names by columns according to track under mouse or first track with selected items.lua ├── X-Raym_Set selected takes volume from -x to +x.eel ├── X-Raym_Set sequential mono channel modes on selected items.lua ├── X-Raym_Smooth selected items stretch markers transitions by adjusting slope and right rate (including last marker).lua ├── X-Raym_Smooth selected items stretch markers transitions by adjusting slope and right rate.lua ├── X-Raym_Snap closest stretch marker to mouse position.lua ├── X-Raym_Snap selected items non-auto fades to closest grid line.lua ├── X-Raym_Snap stretch marker under mouse to closest grid line.lua ├── X-Raym_Snap stretch marker under mouse to edit cursor.lua ├── X-Raym_Swap selected items fades.lua ├── X-Raym_Take FX list_ReaImGui.lua ├── X-Raym_Toggle selected active takes reverse arround their snap offset.lua ├── X-Raym_Toggle selected active takes reverse preserving snap offset.lua ├── X-Raym_Toggle selected items active take sources online-offline.lua ├── X-Raym_Toggle selected items inactive takes sources online-offline.lua ├── X-Raym_Uppercase first letter of selected items notes.lua ├── mpl_X-Raym_Unlock selected items for 5 seconds.lua ├── timatkins_Set selected items active take according to take under mouse colour.lua └── tritonality_X-Raym_Cubase_Style_SelectTrack_On_ItemSelect.lua ├── JSFX ├── MIDI │ ├── Images │ │ ├── bongos.png │ │ ├── cabasa.png │ │ ├── congas.png │ │ ├── cowbell.png │ │ ├── cowbell_more.png │ │ ├── cymbal_large.png │ │ ├── cymbal_small.png │ │ ├── hihat.png │ │ ├── kick.png │ │ ├── maracas.png │ │ ├── ride_bell.png │ │ ├── ride_rim.png │ │ ├── snare_top.png │ │ ├── tamborine.png │ │ └── tom.png │ ├── MIDINoteImages │ │ ├── NONE.txt │ │ └── mt-power-drum-kit.txt │ ├── X-Raym_16 pads MIDI Notes Map.jsfx │ ├── X-Raym_16 pads MIDI Notes Map.jsfx.rpl │ ├── X-Raym_Last MIDI event monitor.jsfx │ ├── X-Raym_MIDI Aftertouch eater.jsfx │ ├── X-Raym_MIDI CC Channel Router.jsfx │ ├── X-Raym_MIDI CC Mapper (-24 +24 range).jsfx │ ├── X-Raym_MIDI CC Mapper (scale).jsfx │ ├── X-Raym_MIDI note generator.jsfx │ ├── X-Raym_MIDI notes octave transpose shift.jsfx │ ├── X-Raym_MIDI notes sequence from CSV file.jsfx │ ├── X-Raym_MIDI single note map.jsfx │ ├── X-Raym_Note On under X velocity to Note Off.jsfx │ └── X-Raym_Note to CC.jsfx ├── X-Raym_4 Mono channels switcher.jsfx ├── X-Raym_4 Stereo channels switcher.jsfx ├── X-Raym_Mute on loop.jsfx ├── X-Raym_Silence meter.jsfx ├── X-Raym_Tap tempo.jsfx └── X-Raym_Tone generator with playstate.jsfx ├── LICENSE ├── MIDI Editor ├── FnA_Select-Unselect notes in grid over mouse.eel ├── FnA_Select-Unselect notes in grid under mouse.eel ├── X-Raym_Add 10 to selected notes velocity.eel ├── X-Raym_Add a MIDI marker named Page at edit cursor.lua ├── X-Raym_Automatically select notes under play cursor_background.lua ├── X-Raym_Duplicate selected notes as fifth and octave triads.lua ├── X-Raym_Duplicate selected notes as fifth.lua ├── X-Raym_Duplicate selected notes as fourth.lua ├── X-Raym_Export active take in MIDI editor as CSV of notes and velocity.lua ├── X-Raym_Insert CC linear ramp events between selected ones if consecutive.lua ├── X-Raym_Insert MIDI lyrics event under each selected notes.lua ├── X-Raym_Insert MIDI notes at project markers.lua ├── X-Raym_Insert and-or edit project marker at current position.lua ├── X-Raym_Insert new MIDI item from MIDI editor active take track and time selection.lua ├── X-Raym_Insert sysex events at time selection.lua ├── X-Raym_Move selected notes to pitch under mouse.lua ├── X-Raym_Mute selected notes in open MIDI take randomly.lua ├── X-Raym_Remove project marker at current position.lua ├── X-Raym_Repeat notes selection pattern from time selection to next notes.lua ├── X-Raym_Select all MIDI notes and events right of mouse.eel ├── X-Raym_Select only MIDI notes above active note row pitch cursor.lua ├── X-Raym_Select only MIDI notes below active note row pitch cursor.lua ├── X-Raym_Select-Unselect all MIDI notes over mouse based on grid.eel ├── X-Raym_Select-Unselect all MIDI notes over mouse.eel ├── X-Raym_Select-Unselect all MIDI notes under mouse based on grid.eel ├── X-Raym_Select-Unselect all MIDI notes under mouse.eel ├── X-Raym_Select-Unselect all MIDI notes with same pitch left of the mouse.lua ├── X-Raym_Select-Unselect all MIDI notes with same pitch right of the mouse.lua ├── X-Raym_Select-Unselect highest MIDI notes in active take.eel ├── X-Raym_Select-Unselect lowest MIDI notes in active take.eel ├── X-Raym_Set selected notes velocity to 100.eel ├── X-Raym_Shift MIDI lyrics events message after edit cursor to one event on the left.lua ├── X-Raym_Shift MIDI lyrics events message after edit cursor to one event on the right.lua ├── X-Raym_Snap edit cursor to closest MIDI editor grid line.lua ├── X-Raym_Split selected MIDI notes half in 2 notes.lua ├── X-Raym_Toggle mute track with take in MIDI editor.lua ├── X-Raym_Trim MIDI note under mouse end to edit cursor and ripple edit.lua └── X-Raym_Trim MIDI note under mouse start to edit cursor and ripple edit.lua ├── MIDI ├── X-Raym_Export first selected MIDI item as CSound file.lua ├── X-Raym_Insert MIDI note in selected items active take.lua ├── X-Raym_MIDI Lyrics karaoke viewer for Ultrastar_GUI.lua └── X-Raym_Remove selected items MIDI CC events lanes where all events are equal to 0.lua ├── Media Explorer ├── X-Raym_Focus arrange view.lua ├── X-Raym_Play-Stop arrange view from media explorer context.lua ├── X-Raym_Preview media explorer and play-stop project arrange view simultaneously.lua ├── X-Raym_Reset media explorer volume to 0dB.lua ├── X-Raym_Set media explorer volume down a bit.lua ├── X-Raym_Set media explorer volume up a bit.lua └── X-Raym_Stop media explorer.lua ├── Menus and Toolbars └── TextItems.ReaperMenu ├── Project ├── X-Raym_Open most recent project.lua ├── X-Raym_Save all open project tabs.lua └── X-Raym_Save project and keep only X backups.lua ├── README.md ├── Razor Edit └── X-Raym_Set selected tracks razor edit area to time selection.lua ├── Regions ├── X-Raym_Add all regions to render queue individually.lua ├── X-Raym_Add envelope markers from selected envelope points.lua ├── X-Raym_Add italic markup to current region name.eel ├── X-Raym_Add musical notes to current region name.eel ├── X-Raym_Color current region or regions in time selection randomly with same color.lua ├── X-Raym_Color current region or regions in time selection randomly.lua ├── X-Raym_Convert current region or regions in time selection to markers.lua ├── X-Raym_Convert last marker or marker in time selection to regions.lua ├── X-Raym_Convert tempo and time signature markers into project markers.lua ├── X-Raym_Create markers at selected items snap offset.lua ├── X-Raym_Create named marker X seconds after last item end.lua ├── X-Raym_Create named marker from selected items position.lua ├── X-Raym_Create project markers from selected takes markers.lua ├── X-Raym_Create project regions from selected takes markers.lua ├── X-Raym_Create regions from selected items notes and color.lua ├── X-Raym_Create regions from selected takes and from track name.eel ├── X-Raym_Export markers and regions as Davinci Resolve EDL file.lua ├── X-Raym_Export markers and regions as tab-delimited CSV file.lua ├── X-Raym_Export markers as YouTube timecode for video description.lua ├── X-Raym_Export regions as file.lua ├── X-Raym_Import markers and regions from tab-delimited CSV file.lua ├── X-Raym_Insert markers at grid lines in time selection (named and colored with regions).lua ├── X-Raym_Insert markers at grid lines in time selection.lua ├── X-Raym_Insert or update start and end marker from time selection.lua ├── X-Raym_Merge consecutive regions as dialog lines.eel ├── X-Raym_Merge consecutive regions with same name.eel ├── X-Raym_Merge overlapping regions with same name.eel ├── X-Raym_Merge region under cursor and the next one.eel ├── X-Raym_Regions clock.lua ├── X-Raym_Search and replace in markers names.lua ├── X-Raym_Search and replace in regions names.lua ├── X-Raym_Set closest edge of closest region to edit cursor.lua ├── X-Raym_Split region under cursor.eel ├── X-Raym_Swap regions names and subtitles notes.lua ├── X-Raym_Swap regions names and subtitles preserving break lines.lua └── X-Raym_Uppercase first letter or each regions.lua ├── Subprojects └── X-Raym_snooks_Explode selected subprojects to child tracks.lua ├── Templates └── Script Preset │ ├── README.md │ ├── X-Raym_Parent script of preset script_template.lua │ └── X-Raym_Preset script_template.lua ├── Tempo and Time Signature ├── X-Raym_Delete all tempo markers.eel ├── X-Raym_Insert time signature markers from selected items.eel ├── X-Raym_Round all tempo markers BPM.lua ├── X-Raym_Set selected tempo envelope points value.lua ├── X-Raym_Tap tempo.lua └── michaeltonight_daxliniere_X-Raym_Display notes length at edit cursor.lua ├── Text Items and Item Notes ├── Conversion │ ├── X-Raym_Convert selected audio item notes into source TagLib comments.lua │ ├── X-Raym_Convert selected audio take sources TagLib comments to item notes.lua │ ├── X-Raym_Convert selected item notes to take name.lua │ ├── X-Raym_Convert selected takes name to item notes.lua │ ├── X-Raym_Swap selected item notes and take name preserving break lines.lua │ └── X-Raym_Swap selected item notes and take name.lua ├── Creation │ ├── X-Raym_Create one text item on first selected track from last selected items notes.lua │ ├── X-Raym_Create one text item on first selected track from selected items notes.lua │ ├── X-Raym_Create one text item on first selected track from selected items.lua │ ├── X-Raym_Create one text item with dialog dash on first selected track from selected items notes.lua │ ├── X-Raym_Create text items on first selected track from grid lines division in time selection (named and colored with regions).lua │ ├── X-Raym_Create text items on first selected track from markers.lua │ ├── X-Raym_Create text items on first selected track from regions subtitles.lua │ ├── X-Raym_Create text items on first selected track from regions.lua │ ├── X-Raym_Create text items on first selected track from selected items groups.lua │ ├── X-Raym_Create text items on first selected track from selected items notes.lua │ ├── X-Raym_Create text items on first selected track from selected takes name.lua │ ├── X-Raym_Merge consecutive and short text items on selected tracks by pair with color.lua │ ├── X-Raym_Merge consecutive and short text items on selected tracks by pair with dialog dash.lua │ ├── X-Raym_Merge overlapping and consecutive similar text items on selected tracks.lua │ ├── X-Raym_Merge selected text items notes adding dialog dash.lua │ ├── X-Raym_Merge selected text items notes adding new line.lua │ ├── X-Raym_Merge selected text items notes adding space.lua │ └── X-Raym_Merge selected text items notes.lua ├── Formatting │ ├── X-Raym_Add background color markup to selected items notes.lua │ ├── X-Raym_Add bold markup to selected items notes.lua │ ├── X-Raym_Add font color markup to selected items notes.lua │ ├── X-Raym_Add italic markup to selected items notes.lua │ ├── X-Raym_Add musical notes to selected items notes.lua │ ├── X-Raym_Add text to selected items notes (Items Notes Processor).lua │ ├── X-Raym_Add underline markup to selected items notes.lua │ ├── X-Raym_Delete all HTML markup from selected items notes.lua │ ├── X-Raym_Delete background color markup from selected items notes.lua │ ├── X-Raym_Delete bold markup from selected items notes.lua │ ├── X-Raym_Delete breaklines markup from selected items notes.lua │ ├── X-Raym_Delete font color markup from selected items notes.lua │ ├── X-Raym_Delete italic markup from selected items notes.lua │ ├── X-Raym_Delete musical notes from selected items notes.lua │ ├── X-Raym_Delete selected items notes.lua │ ├── X-Raym_Delete underline markup from selected items notes.lua │ ├── X-Raym_Insert multiple lines lorem ipsum to selected items notes.lua │ ├── X-Raym_Insert single line lorem ipsum to selected items notes.lua │ ├── X-Raym_Lowercase selected items notes.lua │ ├── X-Raym_Search and replace in selected items notes.lua │ └── X-Raym_Uppercase selected items notes.lua └── Subtitles │ └── X-Raym_Export items notes from tracks or items selection as SRT subtitles file.lua ├── Theme ├── X-Raym_Theme auto-refresher (background).lua └── X-Raym_Theme color tweaker_ReaImGui.lua ├── Track Properties ├── X-Raym_Change last touched track layout_background.lua ├── X-Raym_Display first selected track width and height.lua ├── X-Raym_Display selected track pan compensated by width.eel ├── X-Raym_Import tracks from file.lua ├── X-Raym_Insert one new child track for each selected tracks.lua ├── X-Raym_Invert master track stereo left right width.eel ├── X-Raym_Invert selected tracks pan.eel ├── X-Raym_Invert selected tracks stereo left right width.eel ├── X-Raym_Move selected tracks down on visible track list.lua ├── X-Raym_Move selected tracks down to the bottom on visible track list.lua ├── X-Raym_Move selected tracks up on visible track list.lua ├── X-Raym_Move selected tracks up to the top of the visible track list.lua ├── X-Raym_Mute selected tracks unmuting unselected ones or unmute if already muted.lua ├── X-Raym_Rename and recolor tracks created by Vordio from a Premiere Pro XML export.lua ├── X-Raym_Rename selected track sends based on their source track name.lua ├── X-Raym_Rename selected tracks with counter for child tracks and uppercase for parent tracks.lua ├── X-Raym_Rename tracks with first VSTi and its preset name.lua ├── X-Raym_Rename tracks with first VSTi preset name.lua ├── X-Raym_Reset all tracks to default TCP height.lua ├── X-Raym_Restore all tracks visibility.lua ├── X-Raym_Restore selected tracks parameters grouping.lua ├── X-Raym_Round selected tracks pan.eel ├── X-Raym_Save all tracks visibility.lua ├── X-Raym_Save selected tracks parameters grouping.lua ├── X-Raym_Scroll vertically to track by name and select it.lua ├── X-Raym_Search and replace in selected tracks names.lua ├── X-Raym_Select all rec armed tracks and unselect the others.eel ├── X-Raym_Select next visible track only with conditional solo exclusive.eel ├── X-Raym_Select only tracks of selected items.lua ├── X-Raym_Select only tracks with Latch automation mode.lua ├── X-Raym_Select only tracks with Read automation mode.lua ├── X-Raym_Select only tracks with Touch automation mode.lua ├── X-Raym_Select only tracks with Trim automation mode.lua ├── X-Raym_Select only tracks with Write automation mode.lua ├── X-Raym_Select previous visible track only with conditional solo exclusive.eel ├── X-Raym_Select reference tracks.lua ├── X-Raym_Select track under mouse parent track.lua ├── X-Raym_Select track under mouse top level parent track.lua ├── X-Raym_Select tracks with certain words in their SWS notes.lua ├── X-Raym_Select tracks with dual pan mode.lua ├── X-Raym_Set or offset selected tracks volume pan and width value.lua ├── X-Raym_Set parents tracks names to uppercase and childs ones to camelcase.lua ├── X-Raym_Set selected tracks as reference tracks.lua ├── X-Raym_Set selected tracks channels number.lua ├── X-Raym_Set selected tracks record input to X.lua ├── X-Raym_Set track under mouse as last touched.lua ├── X-Raym_Set visible only tracks with items under play or edit cursor_background.lua ├── X-Raym_Solo exclusive selected tracks.eel ├── X-Raym_Solo in place exclusive selected tracks.eel ├── X-Raym_Solo selected tracks unsoloing unselected ones or unsolo if already solo.lua ├── X-Raym_Sort all tracks alphabetically.lua ├── X-Raym_Sort selected tracks order according to their first item positions.lua ├── X-Raym_Toggle selected tracks solo (no undo).lua ├── X-Raym_Toggle solo exclusive reference tracks.lua ├── X-Raym_Toggle solo reference tracks.lua ├── X-Raym_Toggle track compact state between normal and tiny children - Copie.eel ├── X-Raym_Toggle track compact state between normal and tiny children.eel ├── X-Raym_Unhide - set visible tracks with items.lua └── X-Raym_Unselect tracks with certain words in their SWS notes.lua ├── Transport ├── X-Raym_Decrease master playrate by 05%.lua ├── X-Raym_Decrease master playrate by 10%.lua ├── X-Raym_Increase master playrate by 05%.lua ├── X-Raym_Increase master playrate by 10%.lua ├── X-Raym_Increase-Decrease master playrate by x%.lua ├── X-Raym_Name selected tracks with their track layout.lua ├── X-Raym_Play first selected item once from first snap offset position.lua ├── X-Raym_Play from mouse cursor position and solo track under mouse for the duration - and select track.lua ├── X-Raym_Play from mouse cursor position and solo track under mouse parent and select track.lua ├── X-Raym_Play selected items once from first snap offset position.lua ├── X-Raym_Record or stop and rename newly created items with clipboard content.lua ├── X-Raym_Set master playrate to 150%.lua ├── X-Raym_Set master playrate to 200%.lua ├── X-Raym_Set master playrate to 25%.lua ├── X-Raym_Set master playrate to 30%.lua ├── X-Raym_Set master playrate to 40%.lua ├── X-Raym_Set master playrate to 50%.lua ├── X-Raym_Set master playrate to 60%.lua ├── X-Raym_Set master playrate to 70%.lua ├── X-Raym_Set master playrate to 75%.lua ├── X-Raym_Set master playrate to 80%.lua ├── X-Raym_Set master playrate to 90%.lua ├── X-Raym_Set master playrate to x%.lua ├── X-Raym_Snap edit cursor to nearest grid if snap is enabled.lua ├── X-Raym_Solo exclusive track under mouse and play.lua ├── X-Raym_Solo in place exclusive track under mouse and play.lua └── X-Raym_Toggle play from mouse cursor position and solo track under mouse for the duration - and select track.lua ├── Various ├── X-Raym_Change last touched track layout_background.lua ├── X-Raym_Change transport theme element background color according to ripple state.lua ├── X-Raym_Click at X Y screen position relative to focused window.lua ├── X-Raym_Click at X Y screen position.lua ├── X-Raym_Copy filtered action names list to clipboard.lua ├── X-Raym_Detect selected and master tracks clips - peaks over 0dB - position.lua ├── X-Raym_Display script infos in the console.lua ├── X-Raym_Double click over item action with zoom to content if MIDI take.lua ├── X-Raym_Duplicate lines in clipboard content.lua ├── X-Raym_Export first selected track MIDI as UltraStar txt file.lua ├── X-Raym_Focus SWS Notes window.lua ├── X-Raym_Generate a combination of three random words to clipboard.lua ├── X-Raym_Import UltraStar txt.lua ├── X-Raym_Insert UltraStar lyrics from project to items MIDI notes on first selected track.lua ├── X-Raym_Insert UltraStar lyrics from project to items MIDI notes on first selected track_background.lua ├── X-Raym_Insert empty space at edit cursor (popup).lua ├── X-Raym_Intercept spacebar key_background.lua ├── X-Raym_Lua pattern viewer_ReaImGui.lua ├── X-Raym_Move edit cursor to time 0 or to project start.lua ├── X-Raym_Open project folder in explorer or finder.lua ├── X-Raym_Open render folder in explorer or finder.lua ├── X-Raym_Remove content of time selection preserving time selection and relative play cursor in place.eel ├── X-Raym_Render selected tracks individually through master.lua ├── X-Raym_Reset audio and MIDI devices.lua ├── X-Raym_Ripple check.eel ├── X-Raym_Save mouse cursor X Y screen position relative to focused window.lua ├── X-Raym_Save mouse cursor X Y screen position.lua ├── X-Raym_Set SWS Notes window font size.lua ├── X-Raym_Set SWS global startup action extstate value to Off.lua ├── X-Raym_Set SWS global startup action extstate value to On.lua ├── X-Raym_Set SWS project startup action extstate value to Off.lua ├── X-Raym_Set SWS project startup action extstate value to On.lua ├── X-Raym_Set UltraStar project metadata.lua ├── X-Raym_Set take item track region marker color_functions.lua ├── X-Raym_State chunk editor_ReaImGui.lua ├── X-Raym_Toggle Sonarworks SoundID monitor FX instance Calibration state.lua ├── X-Raym_Toggle Sonarworks SoundID monitor FX instance Speakers and Headphones presets.lua ├── X-Raym_XR ReaImGui Themer_ReaImGui.lua └── spk77_X-Raym_Play and recording clock.eel ├── View ├── X-Raym_Find and go to next items on selected tracks with input text as notes.lua ├── X-Raym_Focus media explorer.lua ├── X-Raym_Go and zoom to next selected item without losing selection.lua ├── X-Raym_Go and zoom to previous selected item without losing selection.lua ├── X-Raym_Offset play cursor continous play position.eel ├── X-Raym_Scroll arrange view if mouse reaches reaper window edges.lua ├── X-Raym_Scroll arrange view if mouse reaches screen edges.lua ├── X-Raym_Scroll vertically down a little bit.lua ├── X-Raym_Scroll vertically to first selected track.lua ├── X-Raym_Scroll vertically up a little bit.lua ├── X-Raym_Toggle video window full screen.lua ├── X-Raym_Toggle video window opacity.lua └── X-Raym_Zoom to region at edit cursor.lua ├── Web Interfaces ├── X-Raym_Convert Lyrics track items notes for dedicated web browser interface.lua ├── X-Raym_Convert first selected track items notes for scrolling web browser interface.lua ├── X-Raym_Convert region names for dedicated web browser interface.lua ├── X-Raym_Convert region subtitles for dedicated web browser interface.lua ├── X-Raym_Lyrics.html ├── X-Raym_Lyrics.www ├── X-Raym_Scrolling Lyrics.html └── X-Raym_Scrolling Lyrics.www └── index.xml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://www.paypal.me/extremraym 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Packages # 2 | ############ 3 | # it's better to unpack these files and commit the raw source 4 | # git has its own built in compression methods 5 | *.7z 6 | *.dmg 7 | *.gz 8 | *.iso 9 | *.jar 10 | *.rar 11 | *.tar 12 | *.zip 13 | 14 | # OS generated files # 15 | ###################### 16 | .DS_Store 17 | .DS_Store? 18 | ._* 19 | .Spotlight-V100 20 | .Trashes 21 | ehthumbs.db 22 | Thumbs.db 23 | .vscode/settings.json 24 | -------------------------------------------------------------------------------- /Cursor/X-Raym_Automatically set edit cursor pos at mouse position if mouse over ruler.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Automatically set edit cursor pos at mouse position if mouse over ruler 3 | * Screenshot: https://i.imgur.com/UUECQNl.gifv 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Scripts: Transport (various) 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 11 | * REAPER: 5.0 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2019-12-12) 18 | + Initial Release 19 | --]] 20 | 21 | -- Set ToolBar Button State 22 | function SetButtonState( set ) 23 | if not set then set = 0 end 24 | local is_new_value, filename, sec, cmd, mode, resolution, val = reaper.get_action_context() 25 | local state = reaper.GetToggleCommandStateEx( sec, cmd ) 26 | reaper.SetToggleCommandState( sec, cmd, set ) -- Set ON 27 | reaper.RefreshToolbar2( sec, cmd ) 28 | end 29 | 30 | 31 | -- Main Function (which loop in background) 32 | function main() 33 | 34 | local window, segment, details = reaper.BR_GetMouseCursorContext() 35 | 36 | if segment == 'timeline' then 37 | local pos = reaper.BR_PositionAtMouseCursor( true ) 38 | reaper.SetEditCurPos( pos, false, false ) 39 | end 40 | 41 | reaper.defer( main ) 42 | 43 | end 44 | 45 | -- RUN 46 | SetButtonState( 1 ) 47 | main() 48 | reaper.atexit( SetButtonState ) 49 | -------------------------------------------------------------------------------- /Cursor/X-Raym_Go to start of next region.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Go to start of next region 3 | * About: Move edit or play cursor to next region. Move view and seek play. 4 | * Instructions: Place edit cursor inside a region. Use it. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Transport (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-11-27) 19 | + Initial Release 20 | --]] 21 | 22 | 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | edit_pos = reaper.GetCursorPosition() 29 | 30 | play = reaper.GetPlayState() 31 | if play > 0 then 32 | pos = reaper.GetPlayPosition() 33 | else 34 | pos = edit_pos 35 | end 36 | 37 | i=0 38 | repeat 39 | iRetval, bIsrgnOut, iPosOut, iRgnendOut, sNameOut, iMarkrgnindexnumberOut, iColorOur = reaper.EnumProjectMarkers3(0,i) 40 | if iRetval >= 1 then 41 | if bIsrgnOut == true and iPosOut > pos then 42 | -- ACTION ON REGIONS HERE 43 | reaper.SetEditCurPos(iPosOut,true,true) -- moveview and seekplay 44 | break 45 | end 46 | i = i+1 47 | end 48 | until iRetval == 0 49 | 50 | reaper.Undo_EndBlock("Move edit or play cursor to start of next region", -1) -- End of the undo block. Leave it at the bottom of your main function. 51 | end 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) -------------------------------------------------------------------------------- /Cursor/X-Raym_Go to start of previous region.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Go to start of previous region 3 | * About: Move edit or play cursor to previous region. Move view and seek play. 4 | * Instructions: Place edit cursor inside a region. Use it. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Transport (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-11-27) 19 | + Initial Release 20 | --]] 21 | 22 | 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | edit_pos = reaper.GetCursorPosition() 29 | 30 | play = reaper.GetPlayState() 31 | if play > 0 then 32 | pos = reaper.GetPlayPosition() 33 | else 34 | pos = edit_pos 35 | end 36 | 37 | count_markers_regions, count_markersOut, count_regionsOut = reaper.CountProjectMarkers(0) 38 | 39 | i=1 40 | repeat 41 | iRetval, bIsrgnOut, iPosOut, iRgnendOut, sNameOut, iMarkrgnindexnumberOut, iColorOur = reaper.EnumProjectMarkers3(0,count_markers_regions-i) 42 | if iRetval >= 1 then 43 | if bIsrgnOut == true and iPosOut < pos then 44 | -- ACTION ON REGIONS HERE 45 | reaper.SetEditCurPos(iPosOut,true,true) -- moveview and seekplay 46 | break 47 | end 48 | i = i+1 49 | end 50 | until iRetval == 0 51 | 52 | reaper.Undo_EndBlock("Go to start of previous region", -1) -- End of the undo block. Leave it at the bottom of your main function. 53 | end 54 | 55 | main() -- Execute your main function 56 | 57 | reaper.UpdateArrange() -- Update the arrangement (often needed) -------------------------------------------------------------------------------- /Cursor/X-Raym_Move edit cursor to first selected item snap offset.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move edit cursor to first selected item snap offset 3 | * About: Move edit or play cursor to next region. Move view and seek play. 4 | * Instructions: Place edit cursor inside a region. Use it. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Transport (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-12-14) 19 | + Initial Release 20 | --]] 21 | 22 | -- USER CONFIG AREA ----- 23 | move_view = false -- false, true 24 | ------------------------- 25 | 26 | 27 | function main() 28 | 29 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 30 | 31 | item_pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") 32 | 33 | item_snap = reaper.GetMediaItemInfo_Value(item, "D_SNAPOFFSET") 34 | 35 | pos = item_pos + item_snap 36 | 37 | reaper.SetEditCurPos(pos, move_view, false) 38 | 39 | reaper.Undo_EndBlock("Move edit cursor to first selected item snap offset", -1) -- End of the undo block. Leave it at the bottom of your main function. 40 | end 41 | 42 | item = reaper.GetSelectedMediaItem(0, 0) 43 | 44 | if item ~= nil then 45 | 46 | main() -- Execute your main function 47 | reaper.UpdateArrange() -- Update the arrangement (often needed) 48 | 49 | end -------------------------------------------------------------------------------- /Cursor/X-Raym_Move edit cursor to next frame.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move edit cursor to next frame 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Forum Thread: Scripts: Transport (various) 8 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 9 | * REAPER: 5.0 10 | * Version: 1.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.1 (2022-08-23) 16 | # Fix rounding issue 17 | * v1.0 (2016-01-04) 18 | + Initial Release 19 | --]] 20 | 21 | function Msg(val) 22 | reaper.ShowConsoleMsg(tostring(val) .. "\n") 23 | end 24 | 25 | function RoundToX(number, interval) 26 | return math.floor( number/interval) * interval 27 | end 28 | 29 | function main() 30 | 31 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 32 | 33 | frameRate, dropFrameOut = reaper.TimeMap_curFrameRate(0) 34 | 35 | frame_duration = 1/frameRate 36 | 37 | cur_pos = reaper.GetCursorPosition() 38 | 39 | -- MODIFY INFOS 40 | pos_quantized = RoundToX(cur_pos + frame_duration + 0.000000000001, frame_duration) 41 | -- Msg(cur_pos .. "\t" .. pos_quantized) 42 | 43 | reaper.SetEditCurPos(pos_quantized, true, true) 44 | 45 | reaper.Undo_EndBlock("Move edit cursor to next frame", -1) -- End of the undo block. Leave it at the bottom of your main function. 46 | 47 | end 48 | 49 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 50 | 51 | main() -- Execute your main function 52 | 53 | reaper.PreventUIRefresh(-1) 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | -------------------------------------------------------------------------------- /Cursor/X-Raym_Move edit cursor to previous frame.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move edit cursor to previous frame 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Forum Thread: Scripts: Transport (various) 8 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1601342 9 | * REAPER: 5.0 10 | * Version: 1.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.1 (2022-08-23) 16 | # Fix rounding issue 17 | * v1.0 (2016-01-04) 18 | + Initial Release 19 | --]] 20 | 21 | function RoundToX(number, interval) 22 | return math.ceil(number/interval) * interval 23 | end 24 | 25 | function main() 26 | 27 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 28 | 29 | frameRate, dropFrameOut = reaper.TimeMap_curFrameRate(0) 30 | 31 | frame_duration = 1/frameRate 32 | 33 | cur_pos = reaper.GetCursorPosition() 34 | 35 | -- MODIFY INFOS 36 | pos_quantized = RoundToX(cur_pos - frame_duration - 0.000000000001, frame_duration) 37 | 38 | reaper.SetEditCurPos(pos_quantized, true, true) 39 | 40 | reaper.Undo_EndBlock("Move edit cursor to previous frame", -1) -- End of the undo block. Leave it at the bottom of your main function. 41 | 42 | end 43 | 44 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 45 | 46 | main() -- Execute your main function 47 | 48 | reaper.PreventUIRefresh(-1) 49 | 50 | reaper.UpdateArrange() -- Update the arrangement (often needed) 51 | -------------------------------------------------------------------------------- /Custom Actions/TextItems.ReaperKeyMap: -------------------------------------------------------------------------------- 1 | ACT 1 0 "37eca78e78fdf042ae173d4cc0ba60f0" "Custom: Export subtitle track" 40042 40635 40289 _SWS_SELUNMUTEDITEMS2 _RSd014a501abdd7b451fe9c37eb18bc9e0c5ac0a0c 2 | ACT 1 0 "6685de38e0081a4090db62dbffa5d171" "Custom: Go to next item" _RS8eae3648033a52df9dea7dabba90fe00db8d3ff0 40417 40290 3 | ACT 1 0 "16f9294d4543f3499946cd967bd5370d" "Custom: Go to next item, Play" _RS8eae3648033a52df9dea7dabba90fe00db8d3ff0 40417 40290 1007 4 | ACT 1 0 "5c61e90b0a432b489660908590afefb8" "Custom: Go to previous item" _RS8eae3648033a52df9dea7dabba90fe00db8d3ff0 40416 40290 5 | ACT 1 0 "33f82385550f034a868f8284a4a00e96" "Custom: Go to previous item, Play" _RS8eae3648033a52df9dea7dabba90fe00db8d3ff0 40416 40290 1007 6 | ACT 1 0 "a19e04266d3ce94da9d3acf98b677a16" "Custom: Insert Empty Items" _BR_SAVE_CURSOR_POS_SLOT_1 40626 41110 40914 40142 40635 _BR_RESTORE_CURSOR_POS_SLOT_1 7 | -------------------------------------------------------------------------------- /Envelopes/X-Raym_Clear all track automation envelope latches (background).lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Clear all track automation envelope latches (background) 3 | * About: Workarround for JSFX not writting value if track is in Touch mode and play is stopped 4 | * Author: X-Raym 5 | * Author URI: http://extremraym.com 6 | * Repository: GitHub > X-Raym > EEL Scripts for Cockos REAPER 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Writing automation in touch mode with JSFX GUIs doesn't work properly 10 | * Forum Thread https://forum.cockos.com/showthread.php?t=242479 11 | * REAPER: 6.0 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2023-12-13) 18 | + Initial Release 19 | --]] 20 | 21 | -- Set ToolBar Button State 22 | function SetButtonState( set ) 23 | local is_new_value, filename, sec, cmd, mode, resolution, val = reaper.get_action_context() 24 | reaper.SetToggleCommandState( sec, cmd, set or 0 ) 25 | reaper.RefreshToolbar2( sec, cmd ) 26 | end 27 | 28 | -- Main Function (which loop in background) 29 | function Main() 30 | time = reaper.time_precise() 31 | if time - last_time > 0.3 then 32 | reaper.Main_OnCommand( 42025, 0 ) -- Automation: Clear all track envelope latches 33 | last_time = time 34 | end 35 | reaper.defer( Main ) 36 | end 37 | 38 | -- RUN 39 | last_time = reaper.time_precise() 40 | SetButtonState( 1 ) 41 | Main() 42 | reaper.atexit( SetButtonState ) 43 | -------------------------------------------------------------------------------- /FX/X-Raym_Insert named FX on selected tracks.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Insert named FX on selected tracks 3 | * About: Insert FX on selected tracks. FX name is can be edited within the script code. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | --]] 12 | 13 | -- USER CONFIG AREA ------------------------------------------------------ 14 | 15 | -- Use Preset Script for safe moding or to create a new action with your own values 16 | -- https://github.com/X-Raym/REAPER-ReaScripts/tree/master/Templates/Script%20Preset 17 | 18 | -- Typical global variables names. This will be out global variables which could be altered in the preset file. 19 | FX = "ReaEQ" 20 | 21 | -------------------------------------------------- END OF USER CONFIG AREA 22 | 23 | function Init() 24 | reaper.Undo_BeginBlock() 25 | 26 | TrackIdx = 0 27 | TrackCount = reaper.CountSelectedTracks(0) 28 | while TrackIdx < TrackCount do 29 | track = reaper.GetSelectedTrack(0, TrackIdx) 30 | fxIdx = reaper.TrackFX_AddByName( track, FX, false, -1 ) 31 | -- fxIdx = reaper.TrackFX_GetByName (track, FX, true) 32 | isOpen = reaper.TrackFX_GetOpen(track, fxIdx) 33 | if isOpen ==0 then 34 | isOpen = 1 35 | else 36 | isOpen = 0 37 | end 38 | reaper.TrackFX_SetOpen(track, fxIdx, isOpen) 39 | TrackIdx =TrackIdx+1 40 | end 41 | 42 | reaper.Undo_EndBlock("Insert " .. ReaEQ .. "Plugin selected tracks",-1) 43 | end 44 | 45 | if preset_file_init then 46 | Init() 47 | end -------------------------------------------------------------------------------- /FX/X-Raym_Leave open only focused FX and minimize the others.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Leave open only focused FX and minimize the others 3 | * Instructions: Touch an FX param. Run. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: [REQ]: minimize all FX windows but the selected or last (added) one 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=165547 11 | * REAPER: 5.0 RC 14b 12 | * Version: 1.0.1 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2015-08-26) 18 | + Initial Release 19 | --]] 20 | 21 | function Msg(text) 22 | reaper.ShowConsoleMsg(tostring(text).."\n") 23 | end 24 | 25 | function Main() 26 | 27 | reaper.Undo_BeginBlock() 28 | 29 | retval, focused_fx_track, focused_item_fx, focused_fx_id = reaper.GetFocusedFX() 30 | 31 | focused_fx_track_id = focused_fx_track - 1 32 | 33 | Msg("focused_fx_track_id = "..focused_fx_track_id) 34 | Msg("focused_fx_id = "..focused_fx_id) 35 | 36 | if retval then 37 | 38 | for i = 0, reaper.CountTracks(0) - 1 do 39 | 40 | track = reaper.GetTrack(0, i) 41 | 42 | for j = 0, reaper.TrackFX_GetCount(track) - 1 do 43 | 44 | --fx_open = reaper.TrackFX_GetOpen(track, j) 45 | 46 | if j == focused_fx_id and i == focused_fx_track_id then 47 | 48 | Msg(j.." ~= "..(focused_fx_id) .." and "..i.." ~= ".. focused_fx_track_id) 49 | 50 | reaper.TrackFX_SetOpen(track, j, true) 51 | 52 | else 53 | 54 | reaper.TrackFX_SetOpen(track, j, false) 55 | 56 | end 57 | 58 | end 59 | 60 | end 61 | 62 | end 63 | 64 | reaper.Undo_EndBlock("Leave open only focused FX and minimize the others",-1) 65 | 66 | end 67 | 68 | Main() 69 | -------------------------------------------------------------------------------- /Functions/spk77_class.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Class 3 | * Instructions: 4 | * Author: spk77 5 | * Author URI: 6 | * Repository: 7 | * Repository URI: 8 | * Licence: GPL v3 9 | * Forum Thread: 10 | * Forum Thread URI: 11 | * REAPER: 5.0 12 | * Version: 1.0 13 | * Main: False 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-03-03) 19 | + Initial release 20 | --]] 21 | 22 | ------------- "class.lua" is copied from http://lua-users.org/wiki/SimpleLuaClasses ----------- 23 | 24 | -- class.lua 25 | -- Compatible with Lua 5.1 (not 5.0). 26 | function class(base, init) 27 | local c = {} -- a new class instance 28 | if not init and type(base) == 'function' then 29 | init = base 30 | base = nil 31 | elseif type(base) == 'table' then 32 | -- our new class is a shallow copy of the base class! 33 | for i,v in pairs(base) do 34 | c[i] = v 35 | end 36 | c._base = base 37 | end 38 | -- the class will be the metatable for all its objects, 39 | -- and they will look up their methods in it. 40 | c.__index = c 41 | 42 | -- expose a constructor which can be called by () 43 | local mt = {} 44 | mt.__call = function(class_tbl, ...) 45 | local obj = {} 46 | setmetatable(obj,c) 47 | if init then 48 | init(obj,...) 49 | else 50 | -- make sure that any stuff from the base class is initialized! 51 | if base and base.init then 52 | base.init(obj, ...) 53 | end 54 | end 55 | return obj 56 | end 57 | c.init = init 58 | c.is_a = function(self, klass) 59 | local m = getmetatable(self) 60 | while m do 61 | if m == klass then return true end 62 | m = m._base 63 | end 64 | return false 65 | end 66 | setmetatable(c, mt) 67 | return c 68 | end 69 | ---------------------------------------------------------------------------------------- 70 | -------------------------------------------------------------------------------- /Items Editing/X-Raym_Move selected items position left according to their snap offset.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move selected items position left according to their snap offset 3 | * Instructions: Select items. Run. 4 | * Screenshot: http://i.giphy.com/xTka01QdCUzcfyqtna.gif 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Items Editing (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=163363 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-12-14) 19 | + Initial Release 20 | --]] 21 | 22 | sel_item = {} 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | -- SAVE SELECTION 29 | for i = 1, count_sel_items do 30 | 31 | sel_item[i] = reaper.GetSelectedMediaItem(0, i - 1) 32 | 33 | end 34 | 35 | 36 | -- MOVE SELECTION 37 | for w = 1, #sel_item do 38 | 39 | sel_item_pos = reaper.GetMediaItemInfo_Value(sel_item[w], "D_POSITION") 40 | sel_item_snap = reaper.GetMediaItemInfo_Value(sel_item[w], "D_SNAPOFFSET") 41 | 42 | reaper.SetMediaItemInfo_Value(sel_item[w], "D_POSITION", sel_item_pos - sel_item_snap) 43 | 44 | end 45 | 46 | reaper.Undo_EndBlock("Move selected items position left according to their snap offset", -1) -- End of the undo block. Leave it at the bottom of your main function. 47 | 48 | end 49 | 50 | count_sel_items = reaper.CountSelectedMediaItems(0) 51 | 52 | if count_sel_items > 0 then 53 | 54 | reaper.PreventUIRefresh(1) 55 | 56 | main() -- Execute your main function 57 | 58 | reaper.UpdateArrange() -- Update the arrangement (often needed) 59 | 60 | reaper.PreventUIRefresh(-1) 61 | 62 | end 63 | -------------------------------------------------------------------------------- /Items Editing/X-Raym_Move selected items position right according to their snap offset.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move selected items position right according to their snap offset 3 | * About: Useful if an action use snap offset for snapping but you prefer item position. 4 | * Instructions: Select items. Run. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Items Editing (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=163363 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2017-08-11) 19 | + Initial Release 20 | --]] 21 | 22 | sel_item = {} 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | -- SAVE SELECTION 29 | for i = 1, count_sel_items do 30 | 31 | sel_item[i] = reaper.GetSelectedMediaItem(0, i - 1) 32 | 33 | end 34 | 35 | 36 | -- MOVE SELECTION 37 | for w = 1, #sel_item do 38 | 39 | sel_item_pos = reaper.GetMediaItemInfo_Value(sel_item[w], "D_POSITION") 40 | sel_item_snap = reaper.GetMediaItemInfo_Value(sel_item[w], "D_SNAPOFFSET") 41 | 42 | reaper.SetMediaItemInfo_Value(sel_item[w], "D_POSITION", sel_item_pos + sel_item_snap) 43 | 44 | end 45 | 46 | reaper.Undo_EndBlock("Move selected items position right according to their snap offset", -1) -- End of the undo block. Leave it at the bottom of your main function. 47 | 48 | end 49 | 50 | count_sel_items = reaper.CountSelectedMediaItems(0) 51 | 52 | if count_sel_items > 0 then 53 | 54 | reaper.PreventUIRefresh(1) 55 | 56 | main() -- Execute your main function 57 | 58 | reaper.UpdateArrange() -- Update the arrangement (often needed) 59 | 60 | reaper.PreventUIRefresh(-1) 61 | 62 | end 63 | -------------------------------------------------------------------------------- /Items Editing/X-Raym_Move selected items up to the top visible track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move selected items up to the top visible track 3 | * Instructions: Select items. Run. 4 | * Screenshot: https://i.imgur.com/UNdnR4C.gifv 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Items Editing (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=163363 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2018-09-30) 19 | + Initial Release 20 | --]] 21 | 22 | sel_item = {} 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | for i = 0, count_tracks - 1 do 29 | track = reaper.GetTrack( 0, i ) 30 | visible = reaper.IsTrackVisible(track, false) 31 | if visible then break end 32 | end 33 | 34 | if not visible then return end 35 | 36 | -- SAVE SELECTION 37 | for i = 1, count_sel_items do 38 | 39 | sel_item[i] = reaper.GetSelectedMediaItem(0, i - 1) 40 | 41 | end 42 | 43 | 44 | -- MOVE SELECTION 45 | for w = 1, #sel_item do 46 | 47 | reaper.MoveMediaItemToTrack( sel_item[w], track ) 48 | 49 | end 50 | 51 | reaper.Undo_EndBlock("Move selected items position right according to their snap offset", -1) -- End of the undo block. Leave it at the bottom of your main function. 52 | 53 | end 54 | 55 | count_sel_items = reaper.CountSelectedMediaItems(0) 56 | count_tracks = reaper.CountTracks(0) 57 | 58 | if count_sel_items > 0 and count_tracks > 0 then 59 | 60 | reaper.PreventUIRefresh(1) 61 | 62 | main() -- Execute your main function 63 | 64 | reaper.UpdateArrange() -- Update the arrangement (often needed) 65 | 66 | reaper.PreventUIRefresh(-1) 67 | 68 | end 69 | -------------------------------------------------------------------------------- /Items Editing/X-Raym_Paste items-tracks and snap items if selected and snap enabled.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Paste items-tracks and snap items if selected and snap enabled 3 | * About: Workarround REAPER paste MIDI item timing bug 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: BUG: MIDI items not pasted correctly to grid 10 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=286926 11 | * REAPER: 7.0 12 | * Version: 1.1 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.1 (2024-11-24) 18 | # Only snap MIDI items 19 | * v1.0 (2024-11-20) 20 | + Initial Release 21 | --]] 22 | 23 | -- Save item selection 24 | function SaveSelectedItems(t) 25 | local t = t or {} 26 | for i = 0, reaper.CountSelectedMediaItems(0)-1 do 27 | t[i+1] = reaper.GetSelectedMediaItem(0, i) 28 | end 29 | return t 30 | end 31 | 32 | function RestoreSelectedItems( items ) 33 | reaper.SelectAllMediaItems(0, false) 34 | for i, item in ipairs( items ) do 35 | reaper.SetMediaItemSelected( item, true ) 36 | end 37 | end 38 | 39 | reaper.Undo_BeginBlock() 40 | reaper.PreventUIRefresh(1) 41 | reaper.Main_OnCommand( 42398, 0 ) -- Item: Paste items/tracks 42 | if reaper.GetToggleCommandState(1157) and reaper.CountSelectedMediaItems(0) > 0 then 43 | init_sel_items = SaveSelectedItems() 44 | for i, item in ipairs( init_sel_items ) do 45 | local take = reaper.GetActiveTake(item) 46 | if not take or not reaper.TakeIsMIDI(take) then 47 | reaper.SetMediaItemSelected(item, false) 48 | end 49 | end 50 | reaper.Main_OnCommand( reaper.NamedCommandLookup( "_SWS_QUANTITESTART2"), 0 ) -- SWS: Quantize item's start to grid (keep length) 51 | RestoreSelectedItems( init_sel_items ) 52 | end 53 | reaper.Undo_EndBlock( "Item: Paste items/tracks", -1 ) 54 | reaper.PreventUIRefresh(1) -------------------------------------------------------------------------------- /Items Properties/X-Raym_Add all items left to selected items to items selection.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add all items left to selected items to items selection 3 | * Screenshot: https://i.imgur.com/vBqRybO.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2021-02-16) 15 | + Initial Release 16 | --]] 17 | 18 | -- Save item selection 19 | function SaveSelectedItems (table) 20 | for i = 0, reaper.CountSelectedMediaItems(0)-1 do 21 | table[i+1] = reaper.GetSelectedMediaItem(0, i) 22 | end 23 | end 24 | 25 | function Main() 26 | 27 | local track_ids ={} 28 | for i = #init_sel_items, 1, -1 do 29 | local item = init_sel_items[i] 30 | local track = reaper.GetMediaItem_Track(item) 31 | local track_id = reaper.GetMediaTrackInfo_Value(track, "IP_TRACKNUMBER") 32 | if not track_ids[track_id] then 33 | track_ids[track_id] = true 34 | local track_count_items = reaper.GetTrackNumMediaItems(track) 35 | local item_id = reaper.GetMediaItemInfo_Value(item, "IP_ITEMNUMBER") 36 | for j = 0, item_id - 1 do 37 | local track_item = reaper.GetTrackMediaItem(track, j ) 38 | reaper.SetMediaItemSelected(track_item, 1) 39 | end 40 | end 41 | end 42 | 43 | end 44 | 45 | count_sel_items = reaper.CountSelectedMediaItems(0) 46 | 47 | if count_sel_items > 0 then 48 | reaper.PreventUIRefresh(1) 49 | 50 | reaper.Undo_BeginBlock() 51 | 52 | init_sel_items = {} 53 | SaveSelectedItems(init_sel_items) 54 | 55 | Main() 56 | 57 | reaper.UpdateArrange() 58 | 59 | reaper.Undo_EndBlock("Add all left right to selected items to items selection", 0) 60 | 61 | reaper.PreventUIRefresh(1) 62 | end 63 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Add all items on selected track into item selection.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add all items on selected track into item selection 3 | * About: Add all items on selected track into item selection 4 | * Instructions: Select tracks. Use it. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: ReaScript: Select all items on selected tracks 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1489411 12 | * Version: 1.0 13 | * Version Date: 2015-02-27 14 | * REAPER: 5.0 pre 11 15 | --]] 16 | 17 | --[[ 18 | * Changelog: 19 | * v1.1 (2015-03-05) 20 | + Rename 21 | * v1.0 (2015-02-27) 22 | + Initial Release 23 | --]] 24 | 25 | function selected_items_on_tracks() 26 | 27 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 28 | 29 | -- LOOP TRHOUGH SELECTED TRACKS 30 | 31 | selected_tracks_count = reaper.CountSelectedTracks(0) 32 | 33 | for i = 0, selected_tracks_count-1 do 34 | -- GET THE TRACK 35 | track_sel = reaper.GetSelectedTrack(0, i) -- Get selected track i 36 | 37 | item_num = reaper.CountTrackMediaItems(track_sel) 38 | 39 | -- ACTIONS 40 | for j = 0, item_num-1 do 41 | item = reaper.GetTrackMediaItem(track_sel, j) 42 | reaper.SetMediaItemSelected(item, 1) 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | 48 | reaper.Undo_EndBlock("Select all items on selected tracks", 0) -- End of the undo block. Leave it at the bottom of your main function. 49 | 50 | end 51 | 52 | 53 | 54 | selected_items_on_tracks() -- Execute your main function 55 | 56 | reaper.UpdateArrange() -- Update the arrangement (often needed) 57 | 58 | 59 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Add all items right to selected items to items selection.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add all items right to selected items to items selection 3 | * Screenshot: https://i.imgur.com/vBqRybO.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2021-02-16) 15 | + Initial Release 16 | --]] 17 | 18 | -- Save item selection 19 | function SaveSelectedItems (table) 20 | for i = 0, reaper.CountSelectedMediaItems(0)-1 do 21 | table[i+1] = reaper.GetSelectedMediaItem(0, i) 22 | end 23 | end 24 | 25 | function Main() 26 | 27 | local track_ids ={} 28 | for i, item in ipairs(init_sel_items) do 29 | local track = reaper.GetMediaItem_Track(item) 30 | local track_id = reaper.GetMediaTrackInfo_Value(track, "IP_TRACKNUMBER") 31 | if not track_ids[track_id] then 32 | track_ids[track_id] = true 33 | local track_count_items = reaper.GetTrackNumMediaItems(track) 34 | local item_id = reaper.GetMediaItemInfo_Value(item, "IP_ITEMNUMBER") 35 | for j = item_id, track_count_items - 1 do 36 | local track_item = reaper.GetTrackMediaItem(track, j ) 37 | reaper.SetMediaItemSelected(track_item, 1) 38 | end 39 | end 40 | end 41 | 42 | end 43 | 44 | count_sel_items = reaper.CountSelectedMediaItems(0) 45 | 46 | if count_sel_items > 0 then 47 | reaper.PreventUIRefresh(1) 48 | 49 | reaper.Undo_BeginBlock() 50 | 51 | init_sel_items = {} 52 | SaveSelectedItems(init_sel_items) 53 | 54 | Main() 55 | 56 | reaper.UpdateArrange() 57 | 58 | reaper.Undo_EndBlock("Add all items right to selected items to items selection", 0) 59 | 60 | reaper.PreventUIRefresh(1) 61 | end 62 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Add empty source take to selected items.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add empty source take to selected items 3 | * About: Useful to put take markers on an empty items without using MIDI items 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 pre 36 10 | * Version: 1.0.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0.1 (2023-01-24) 16 | # Better undo 17 | * v1.0 (2020-04-29) 18 | + Initial Release 19 | --]] 20 | 21 | function main() 22 | 23 | -- LOOP THROUGH SELECTED ITEMS 24 | 25 | selected_items_count = reaper.CountSelectedMediaItems(0) 26 | 27 | -- INITIALIZE loop through selected items 28 | for i = 0, selected_items_count-1 do 29 | 30 | -- GET ITEMS 31 | item = reaper.GetSelectedMediaItem(0, i) -- Get selected item i 32 | 33 | reaper.AddTakeToMediaItem(item) 34 | 35 | end -- ENDLOOP through selected items 36 | 37 | reaper.Undo_OnStateChange("Add empty source take to selected items") 38 | 39 | end 40 | 41 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 42 | 43 | main() -- Execute your main function 44 | 45 | reaper.UpdateArrange() -- Update the arrangement (often needed) 46 | 47 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. 48 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Apply volume of previous item on track to selected items.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Apply volume of previous item on track to selected item 3 | * About: A very nice way to set item volume for dialog editing. 4 | * Instructions: Select items. Run. 5 | * Screenshot: http://i.giphy.com/xTiTnBqy5MgtePvLLG.gif 6 | * Author: X-Raym 7 | * Author URI: https://www.extremraym.com 8 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 9 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 10 | * Licence: GPL v3 11 | * Forum Thread: Nudge selected items volume 12 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=152009 13 | * REAPER: 5.0 14 | * Version: 1.0 15 | --]] 16 | 17 | --[[ 18 | * Changelog: 19 | * v1.0 (2015-10-02) 20 | + Initial Release 21 | --]] 22 | 23 | function main() 24 | 25 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 26 | 27 | for i = 0, count_sel_items - 1 do 28 | 29 | item = reaper.GetSelectedMediaItem(0, i) 30 | 31 | track = reaper.GetMediaItem_Track(item) 32 | 33 | item_id = reaper.GetMediaItemInfo_Value(item, "IP_ITEMNUMBER") 34 | 35 | prev_item = reaper.GetTrackMediaItem(track, item_id - 1) 36 | 37 | if prev_item ~= nil then 38 | 39 | prev_item_vol = reaper.GetMediaItemInfo_Value(prev_item, "D_VOL") 40 | 41 | reaper.SetMediaItemInfo_Value(item, "D_VOL", prev_item_vol) 42 | 43 | end 44 | 45 | 46 | end 47 | 48 | reaper.Undo_EndBlock("Apply volume of previous item on track to selected item", -1) -- End of the undo block. Leave it at the bottom of your main function. 49 | 50 | end 51 | 52 | count_sel_items = reaper.CountSelectedMediaItems(0) 53 | if count_sel_items > 0 then 54 | reaper.PreventUIRefresh(1) 55 | 56 | main() -- Execute your main function 57 | 58 | reaper.UpdateArrange() -- Update the arrangement (often needed) 59 | 60 | reaper.PreventUIRefresh(-1) 61 | end -------------------------------------------------------------------------------- /Items Properties/X-Raym_Copy first selected item volume value into clipboard.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Copy first selected item volume value into clipboard 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Version: 1.0 9 | --]] 10 | 11 | --[[ 12 | * Changelog: 13 | * v1.0 (2022-04-21) 14 | + Initial Release 15 | --]] 16 | 17 | function dBFromVal(val) return 20*math.log(val, 10) end 18 | 19 | if not reaper.CF_SetClipboard then 20 | reaper.ShowMessageBox( 'Please Install last SWS extension.', 'Missing Dependency', 0 ) 21 | return false 22 | end 23 | 24 | item = reaper.GetSelectedMediaItem(0, 0) 25 | if not item then return false end 26 | 27 | item_vol = reaper.GetMediaItemInfo_Value(item, "D_VOL") 28 | reaper.CF_SetClipboard(item_vol) 29 | 30 | mouse_x, mouse_y = reaper.GetMousePosition() 31 | reaper.TrackCtl_SetToolTip("Item volume copied to clipboard\n" .. dBFromVal(item_vol) .. "dB", mouse_x + 17, mouse_y + 17, false) 32 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Copy selected items colors as CSV to clipboard.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Copy selected items colors as CSV to clipboard 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2022-01-12) 15 | + Initial Release 16 | --]] 17 | 18 | -- USER CONFIG AREA --------------------------------------- 19 | 20 | sep = "," 21 | 22 | -------------------------------- END OF USER CONFIG AREA -- 23 | 24 | function rgbToHex(r, g, b) 25 | return string.format("#%0.2X%0.2X%0.2X", r, g, b) 26 | end 27 | 28 | count_sel_items = reaper.CountSelectedMediaItems(0) 29 | if count_sel_items == 0 then return false end 30 | 31 | reaper.PreventUIRefresh(1) 32 | 33 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 34 | 35 | colors = {} 36 | for i = 0, count_sel_items - 1 do 37 | item = reaper.GetSelectedMediaItem(0, i) 38 | take = reaper.GetActiveTake( item ) 39 | if take then 40 | color = reaper.GetDisplayedMediaItemColor2( item, take ) 41 | else 42 | color = reaper.GetDisplayedMediaItemColor( item ) 43 | end 44 | color_hex = rgbToHex( reaper.ColorFromNative(color) ) 45 | table.insert( colors, color_hex ) 46 | end 47 | 48 | clipboard = table.concat( colors, sep ) 49 | 50 | reaper.CF_SetClipboard( clipboard ) 51 | 52 | mouse_x, mouse_y = reaper.GetMousePosition() 53 | reaper.TrackCtl_SetToolTip("Colors copied to clipboard", mouse_x + 17, mouse_y + 17, false) 54 | 55 | reaper.Undo_EndBlock("Copy selected items colors as CSV to clipboard", - 1) -- End of the undo block. Leave it at the bottom of your main function. 56 | 57 | reaper.PreventUIRefresh(-1) 58 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Copy selected items notes as CSV to clipboard.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Copy selected items notes as CSV to clipboard 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2022-03-08) 15 | + Initial Release 16 | --]] 17 | 18 | -- USER CONFIG AREA --------------------------------------- 19 | 20 | sep = "\n" 21 | 22 | -------------------------------- END OF USER CONFIG AREA -- 23 | 24 | function Main() 25 | 26 | t = {} 27 | for i = 0, count_sel_items - 1 do 28 | local item = reaper.GetSelectedMediaItem(0, i) 29 | local retval, notes = reaper.GetSetMediaItemInfo_String(item, "P_NOTES", "", false) 30 | table.insert( t, notes ) 31 | end 32 | 33 | clipboard = table.concat( t, sep ) 34 | 35 | reaper.CF_SetClipboard( clipboard ) 36 | 37 | mouse_x, mouse_y = reaper.GetMousePosition() 38 | reaper.TrackCtl_SetToolTip("Item notes copied to clipboard", mouse_x + 17, mouse_y + 17, false) 39 | 40 | end 41 | 42 | function Init() 43 | count_sel_items = reaper.CountSelectedMediaItems(0) 44 | if count_sel_items == 0 then return false end 45 | 46 | reaper.PreventUIRefresh(1) 47 | 48 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 49 | 50 | Main() 51 | 52 | reaper.Undo_EndBlock("Copy selected items notes as CSV to clipboard", - 1) -- End of the undo block. Leave it at the bottom of your main function. 53 | 54 | reaper.PreventUIRefresh(-1) 55 | end 56 | 57 | if not preset_file_init then 58 | Init() 59 | end 60 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Copy selected items positions as CSV to clipboard.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Copy selected items positions as CSV to clipboard 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2022-04-11) 15 | + Initial Release 16 | --]] 17 | 18 | -- USER CONFIG AREA --------------------------------------- 19 | 20 | sep = "\t" 21 | 22 | timecode_format = 5 -- https://www.extremraym.com/cloud/reascript-doc/#format_timestr_pos 23 | 24 | -------------------------------- END OF USER CONFIG AREA -- 25 | 26 | function Main() 27 | 28 | t = {} 29 | for i = 0, count_sel_items - 1 do 30 | local item = reaper.GetSelectedMediaItem(0, i) 31 | local item_pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") 32 | item_pos = reaper.format_timestr_pos( item_pos, "", timecode_format ) 33 | table.insert( t, item_pos ) 34 | end 35 | 36 | clipboard = table.concat( t, sep ) 37 | 38 | reaper.CF_SetClipboard( clipboard ) 39 | 40 | mouse_x, mouse_y = reaper.GetMousePosition() 41 | reaper.TrackCtl_SetToolTip("Item positions copied to clipboard", mouse_x + 17, mouse_y + 17, false) 42 | 43 | end 44 | 45 | function Init() 46 | count_sel_items = reaper.CountSelectedMediaItems(0) 47 | if count_sel_items == 0 then return false end 48 | 49 | reaper.PreventUIRefresh(1) 50 | 51 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 52 | 53 | Main() 54 | 55 | reaper.Undo_EndBlock("Copy selected items positions as CSV to clipboard", - 1) -- End of the undo block. Leave it at the bottom of your main function. 56 | 57 | reaper.PreventUIRefresh(-1) 58 | end 59 | 60 | if not preset_file_init then 61 | Init() 62 | end 63 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Display list of selected media items active take names in the console.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Display list of selected media items active take names in the console 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2018-04-03) 15 | + Initial release 16 | --]] 17 | 18 | -- For Dax 19 | 20 | -- USER CONFIG AREA ----------------------------------------------------------- 21 | 22 | console = true -- true/false: display debug messages in the console 23 | 24 | ------------------------------------------------------- END OF USER CONFIG AREA 25 | 26 | -- UTILITIES ------------------------------------------------------------- 27 | 28 | local reaper = reaper 29 | 30 | -- Display a message in the console for debugging 31 | function Msg(value) 32 | if console then 33 | reaper.ShowConsoleMsg(tostring(value) .. "\n") 34 | end 35 | end 36 | 37 | --------------------------------------------------------- END OF UTILITIES 38 | 39 | -- Main function 40 | function Main() 41 | 42 | -- See if there is items selected 43 | count_sel_items = reaper.CountSelectedMediaItems(0) 44 | 45 | reaper.ClearConsole() 46 | 47 | for i = 0, count_sel_items - 1 do 48 | 49 | local item = reaper.GetSelectedMediaItem( 0, i ) 50 | local take = reaper.GetActiveTake( item ) 51 | if take then 52 | local name = reaper.GetTakeName( take ) 53 | Msg( name ) 54 | end 55 | 56 | end 57 | 58 | end 59 | 60 | -- INIT 61 | reaper.defer(Main) 62 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Display sum of length of selected media items in the console.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Display sum of length of selected media items in the console 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Licence: GPL v3 6 | * REAPER: 5.0 7 | * Version: 1.0 8 | --]] 9 | 10 | --[[ 11 | * Changelog: 12 | * v1.0 (2018-10-10) 13 | + Initial release 14 | --]] 15 | 16 | -- For Dax 17 | 18 | -- USER CONFIG AREA ----------------------------------------------------------- 19 | 20 | console = true -- true/false: display debug messages in the console 21 | 22 | ------------------------------------------------------- END OF USER CONFIG AREA 23 | 24 | -- UTILITIES ------------------------------------------------------------- 25 | 26 | local reaper = reaper 27 | 28 | -- Display a message in the console for debugging 29 | function Msg(value) 30 | if console then 31 | reaper.ShowConsoleMsg(tostring(value) .. "\n") 32 | end 33 | end 34 | 35 | --------------------------------------------------------- END OF UTILITIES 36 | 37 | -- Main function 38 | function Main() 39 | 40 | -- See if there is items selected 41 | count_sel_items = reaper.CountSelectedMediaItems(0) 42 | 43 | reaper.ClearConsole() 44 | 45 | local len_sum = 0 46 | 47 | for i = 0, count_sel_items - 1 do 48 | 49 | local item = reaper.GetSelectedMediaItem( 0, i ) 50 | len_sum = len_sum + reaper.GetMediaItemInfo_Value( item, "D_LENGTH" ) 51 | 52 | end 53 | 54 | Msg("Number of items selected: ") 55 | Msg( count_sel_items ) 56 | Msg("") 57 | 58 | Msg("Total length sum (h:m:s.ms)") 59 | Msg( reaper.format_timestr(len_sum, 5 ) ) 60 | Msg("") 61 | 62 | Msg("Average length by item (h:m:s.ms)") 63 | Msg( reaper.format_timestr(len_sum / count_sel_items, 5) ) 64 | Msg("") 65 | 66 | end 67 | 68 | -- INIT 69 | reaper.defer(Main) 70 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Nudge selected items volume +0.1db.eel: -------------------------------------------------------------------------------- 1 | // Nudge selected items Vol +0.1db 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 16-12-2014 9 | // Version : 1.0 10 | // Version Date : 16-12-2014 11 | 12 | function nudge_item_vol() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | 18 | NudgeAmount = +0.1; // You can modify this 19 | 20 | OldVol=GetMediaItemInfo_Value(item, "D_VOL"); 21 | OldVolDB=20*(log10(OldVol)); 22 | 23 | NewVol=OldVolDB+NudgeAmount; 24 | 25 | NewVol >= 24 ? ( 26 | NewVol = 24 27 | ) : ( 28 | NewVol = NewVol; 29 | ); 30 | 31 | NewVolGain=exp(NewVol*0.115129254); 32 | 33 | SetMediaItemInfo_Value(item, "D_VOL", NewVolGain); 34 | ); 35 | i += 1; 36 | ); 37 | UpdateArrange(); 38 | Undo_OnStateChange("Nudge Item Vol +1"); 39 | ); 40 | 41 | nudge_item_vol(); 42 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Nudge selected items volume +0.5db.eel: -------------------------------------------------------------------------------- 1 | // Nudge selected items Vol +0.5db 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 16-12-2014 9 | // Version : 1.0 10 | // Version Date : 16-12-2014 11 | 12 | function nudge_item_vol() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | 18 | NudgeAmount = +0.5; // You can modify this 19 | 20 | OldVol=GetMediaItemInfo_Value(item, "D_VOL"); 21 | OldVolDB=20*(log10(OldVol)); 22 | 23 | NewVol=OldVolDB+NudgeAmount; 24 | 25 | NewVol >= 24 ? ( 26 | NewVol = 24 27 | ) : ( 28 | NewVol = NewVol; 29 | ); 30 | 31 | NewVolGain=exp(NewVol*0.115129254); 32 | 33 | SetMediaItemInfo_Value(item, "D_VOL", NewVolGain); 34 | ); 35 | i += 1; 36 | ); 37 | UpdateArrange(); 38 | Undo_OnStateChange("Nudge Item Vol +1"); 39 | ); 40 | 41 | nudge_item_vol(); 42 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Nudge selected items volume -0.1db.eel: -------------------------------------------------------------------------------- 1 | // Nudge selected items Vol -0.1db 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 16-12-2014 9 | // Version : 1.0 10 | // Version Date : 16-12-2014 11 | 12 | function nudge_item_vol() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | 18 | NudgeAmount = -0.1; // You can modify this 19 | 20 | OldVol=GetMediaItemInfo_Value(item, "D_VOL"); 21 | OldVolDB=20*(log10(OldVol)); 22 | 23 | NewVol=OldVolDB+NudgeAmount; 24 | 25 | NewVol >= 24 ? ( 26 | NewVol = 24 27 | ) : ( 28 | NewVol = NewVol; 29 | ); 30 | 31 | NewVolGain=exp(NewVol*0.115129254); 32 | 33 | SetMediaItemInfo_Value(item, "D_VOL", NewVolGain); 34 | ); 35 | i += 1; 36 | ); 37 | UpdateArrange(); 38 | Undo_OnStateChange("Nudge Item Vol +1"); 39 | ); 40 | 41 | nudge_item_vol(); 42 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Nudge selected items volume -0.5db.eel: -------------------------------------------------------------------------------- 1 | // Nudge selected items Vol -0.5db 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 16-12-2014 9 | // Version : 1.0 10 | // Version Date : 16-12-2014 11 | 12 | function nudge_item_vol() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | 18 | NudgeAmount = -0.5; // You can modify this 19 | 20 | OldVol=GetMediaItemInfo_Value(item, "D_VOL"); 21 | OldVolDB=20*(log10(OldVol)); 22 | 23 | NewVol=OldVolDB+NudgeAmount; 24 | 25 | NewVol >= 24 ? ( 26 | NewVol = 24 27 | ) : ( 28 | NewVol = NewVol; 29 | ); 30 | 31 | NewVolGain=exp(NewVol*0.115129254); 32 | 33 | SetMediaItemInfo_Value(item, "D_VOL", NewVolGain); 34 | ); 35 | i += 1; 36 | ); 37 | UpdateArrange(); 38 | Undo_OnStateChange("Nudge Item Vol +1"); 39 | ); 40 | 41 | nudge_item_vol(); 42 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Offset selected items volume by their track fader value.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Offset selected items volume by their track fader value 3 | * Screenshot: https://i.imgur.com/OwhWpbn.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2021-30-04) 16 | + Initial Release 17 | --]] 18 | 19 | function dBFromVal(val) return 20*math.log(val, 10) end 20 | function ValFromdB(dB_val) return 10^(dB_val/20) end 21 | 22 | function Main() 23 | 24 | for i = 0, count_sel_items - 1 do 25 | 26 | local item = reaper.GetSelectedMediaItem(0, i) 27 | local take = reaper.GetActiveTake(item) 28 | 29 | if take and not reaper.TakeIsMIDI(take) then 30 | 31 | local track = reaper.GetMediaItemTrack ( item ) 32 | local track_vol = reaper.GetMediaTrackInfo_Value(track, "D_VOL") 33 | local item_vol = reaper.GetMediaItemInfo_Value(item, "D_VOL") 34 | 35 | local new_val = ValFromdB(dBFromVal(track_vol) + dBFromVal(item_vol)) 36 | 37 | reaper.SetMediaItemInfo_Value(item, "D_VOL", new_val) 38 | 39 | end 40 | 41 | 42 | end 43 | 44 | end 45 | 46 | count_sel_items = reaper.CountSelectedMediaItems(0) 47 | if count_sel_items > 0 then 48 | reaper.PreventUIRefresh(1) 49 | 50 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 51 | 52 | Main() -- Execute your main function 53 | 54 | reaper.Undo_EndBlock("Offset selected items volume by their track fader value", -1) -- End of the undo block. Leave it at the bottom of your main function. 55 | 56 | reaper.UpdateArrange() -- Update the arrangement (often needed) 57 | 58 | reaper.PreventUIRefresh(-1) 59 | end 60 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Paste clipboard content into selected items notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Paste clipboard content into selected items notes 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Items Properties (various) 9 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=195520 10 | * REAPER: 5.0 11 | * Version: 1.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2020-04-23) 17 | + Initial Release 18 | --]] 19 | 20 | reaper.PreventUIRefresh(1) 21 | 22 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 23 | 24 | clipboard = reaper.CF_GetClipboard('') 25 | 26 | if clipboard ~= "" then 27 | for i = 0, reaper.CountSelectedMediaItems(0) - 1 do 28 | item = reaper.GetSelectedMediaItem(0, i) 29 | reaper.ULT_SetMediaItemNote( item, clipboard ) 30 | end 31 | end 32 | 33 | reaper.UpdateArrange() 34 | 35 | reaper.Undo_EndBlock("Paste clipboard content into selected items notes", - 1) -- End of the undo block. Leave it at the bottom of your main function. 36 | 37 | reaper.PreventUIRefresh(-1) 38 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Rename first selected item take and associated MIDI pools.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Rename first selected item take and associated MIDI pools 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2022-03-08) 15 | + Initial Release 16 | --]] 17 | 18 | function Msg( val ) 19 | if console then 20 | reaper.ShowConsoleMsg(tostring(val) .. "\n") 21 | end 22 | end 23 | 24 | function Main() 25 | 26 | name = reaper.GetTakeName( sel_take ) 27 | 28 | count_items = reaper.CountMediaItems( 0 ) 29 | z = 0 30 | for i = 0, count_items - 1 do 31 | local item = reaper.GetMediaItem(0,i) 32 | local take = reaper.GetActiveTake( item ) 33 | if take and reaper.TakeIsMIDI( take ) then 34 | retval, pool_guid = reaper.BR_GetMidiTakePoolGUID( take ) 35 | if retval and pool_guid == sel_pool_guid then 36 | z = z + 1 37 | reaper.GetSetMediaItemTakeInfo_String( take, "P_NAME", name .. " " .. z, true) 38 | end 39 | end 40 | end 41 | 42 | end 43 | 44 | -- RUN 45 | 46 | sel_item = reaper.GetSelectedMediaItem(0,0) 47 | if not sel_item then return end 48 | 49 | sel_take = reaper.GetActiveTake( sel_item ) 50 | if not sel_take or not reaper.TakeIsMIDI( sel_take ) then return end 51 | 52 | retval, sel_pool_guid = reaper.BR_GetMidiTakePoolGUID( sel_take ) 53 | if not retval then return end 54 | 55 | reaper.PreventUIRefresh(1) 56 | 57 | reaper.Undo_BeginBlock() 58 | 59 | Main() 60 | 61 | reaper.Undo_BeginBlock("Rename first selected item take and associated MIDI pools") 62 | 63 | reaper.UpdateArrange() 64 | 65 | reaper.PreventUIRefresh(-1) 66 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Rename selected items with clipboard content.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Rename selected items with clipboard content 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Items Properties (various) 9 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=195520 10 | * REAPER: 5.0 11 | * Version: 1.0.1 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0.1 (2017-09-21) 17 | # Title 18 | * v1.0 (2017-09-21) 19 | + Initial Release 20 | --]] 21 | 22 | reaper.PreventUIRefresh(1) 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | clipboard = reaper.CF_GetClipboard('') 27 | 28 | if clipboard ~= "" then 29 | for i = 0, reaper.CountSelectedMediaItems(0) - 1 do 30 | local take = reaper.GetActiveTake( reaper.GetSelectedMediaItem(0, i) ) 31 | if take then 32 | reaper.GetSetMediaItemTakeInfo_String(take, "P_NAME", clipboard, true) 33 | end 34 | end 35 | end 36 | 37 | reaper.Undo_EndBlock("Rename selected takes from regions", - 1) -- End of the undo block. Leave it at the bottom of your main function. 38 | 39 | reaper.PreventUIRefresh(-1) -------------------------------------------------------------------------------- /Items Properties/X-Raym_Reset item snap offset.eel: -------------------------------------------------------------------------------- 1 | // Reset item snap offset 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 15-12-2014 9 | // Version : 1.0 10 | // Version Date : 15-12-2014 11 | 12 | function reset_item_snap_offset() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | Value = 0; 18 | SetMediaItemInfo_Value(item, "D_SNAPOFFSET", Value); 19 | ); 20 | i += 1; 21 | ); 22 | UpdateArrange(); 23 | Undo_OnStateChange("Reset item snap offset"); 24 | ); 25 | 26 | reset_item_snap_offset(); 27 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Reset selected items auto-fades.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Reset selected items auto-fades 3 | * Instructions: Select items. Run. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Script: Scripts: Item Fades (various) 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1538659 11 | * REAPER: 5.0 pre 36 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2015-09-29) 18 | + Initial Release 19 | --]] 20 | 21 | function main() 22 | 23 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 24 | 25 | -- LOOP THROUGH SELECTED ITEMS 26 | 27 | selected_items_count = reaper.CountSelectedMediaItems(0) 28 | 29 | -- INITIALIZE loop through selected items 30 | for i = 0, selected_items_count-1 do 31 | 32 | -- GET ITEMS 33 | item = reaper.GetSelectedMediaItem(0, i) -- Get selected item i 34 | 35 | -- GET INFOS 36 | reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN_AUTO", 0) 37 | reaper.SetMediaItemInfo_Value(item, "D_FADEOUTLEN_AUTO", 0) 38 | 39 | end -- ENDLOOP through selected items 40 | 41 | reaper.Undo_EndBlock("Reset selected items auto-fades", -1) -- End of the undo block. Leave it at the bottom of your main function. 42 | 43 | end 44 | 45 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 46 | 47 | main() -- Execute your main function 48 | 49 | reaper.UpdateArrange() -- Update the arrangement (often needed) 50 | 51 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Items Properties/X-Raym_Round selected items volume - one decimal.eel: -------------------------------------------------------------------------------- 1 | // Round selected items volume - one decimal 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 16-12-2014 9 | // Version : 1.0 10 | // Version Date : 16-12-2014 11 | 12 | function nudge_item_vol() local(i, item) 13 | ( 14 | i = 0; 15 | loop(CountSelectedMediaItems(0), 16 | (item = GetSelectedMediaItem(0, i)) ? ( 17 | 18 | OldVol=GetMediaItemInfo_Value(item, "D_VOL"); 19 | OldVolDB=20*(log10(OldVol)); 20 | 21 | NewVolDB=floor((OldVolDB + 0.05) * 10) / 10; 22 | NewVolGain=exp(NewVolDB*0.115129254); 23 | 24 | SetMediaItemInfo_Value(item, "D_VOL", NewVolGain); 25 | ); 26 | i += 1; 27 | ); 28 | UpdateArrange(); 29 | Undo_OnStateChange("Nudge Item Vol +1"); 30 | ); 31 | 32 | nudge_item_vol(); 33 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Set selected items fade-out to snap offset.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set selected items fade-out to snap offset 3 | * Instructions: Select items. Run. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Script: Scripts: Item Fades (various) 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1538659 11 | * REAPER: 5.0 pre 36 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2015-06-26) 18 | + Initial Release 19 | --]] 20 | 21 | 22 | 23 | function main() 24 | 25 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 26 | 27 | -- LOOP THROUGH SELECTED ITEMS 28 | 29 | selected_items_count = reaper.CountSelectedMediaItems(0) 30 | 31 | -- INITIALIZE loop through selected items 32 | for i = 0, selected_items_count-1 do 33 | -- GET ITEMS 34 | item = reaper.GetSelectedMediaItem(0, i) -- Get selected item i 35 | 36 | -- GET INFOS 37 | item_len = reaper.GetMediaItemInfo_Value(item, "D_LENGTH") 38 | item_snap = reaper.GetMediaItemInfo_Value(item, "D_SNAPOFFSET") 39 | 40 | fadein_len = reaper.GetMediaItemInfo_Value(item, "D_FADEINLEN") 41 | 42 | if fadein_len >= item_snap then reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN", item_snap) end 43 | 44 | -- SET INFOS 45 | reaper.SetMediaItemInfo_Value(item, "D_FADEOUTLEN", item_len - item_snap) -- Set the value to the parameter 46 | end -- ENDLOOP through selected items 47 | 48 | reaper.Undo_EndBlock("Set selected items fade-out to snap offset", -1) -- End of the undo block. Leave it at the bottom of your main function. 49 | 50 | end 51 | 52 | main() -- Execute your main function 53 | 54 | reaper.UpdateArrange() -- Update the arrangement (often needed) -------------------------------------------------------------------------------- /Items Properties/X-Raym_Set selected items notes to their current region name.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set selected items notes to their current region name 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Items Properties (various) 9 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=195520 10 | * REAPER: 5.0 11 | * Version: 1.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2020-09-20) 17 | + Initial Release 18 | --]] 19 | 20 | reaper.PreventUIRefresh(1) 21 | 22 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 23 | 24 | for i = 0, reaper.CountSelectedMediaItems(0) - 1 do 25 | item = reaper.GetSelectedMediaItem(0, i) 26 | pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") 27 | markeridx, regionidx = reaper.GetLastMarkerAndCurRegion( proj, pos ) 28 | if regionidx > - 1 then 29 | local retval, isrgn, pos, rgnend, name, markrgnindexnumber, color = reaper.EnumProjectMarkers3( 0, regionidx ) 30 | reaper.ULT_SetMediaItemNote( item, name ) 31 | end 32 | end 33 | 34 | reaper.UpdateArrange() 35 | 36 | reaper.Undo_EndBlock("Set selected items notes to their current region name", - 1) -- End of the undo block. Leave it at the bottom of your main function. 37 | 38 | reaper.PreventUIRefresh(-1) 39 | -------------------------------------------------------------------------------- /Items Properties/X-Raym_Set sequential mono channel modes on selected items.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set sequential mono channel modes on selected items 3 | * About: It sets each to next number. So first item will be channel 1, next channel 2, etc 4 | * Instructions: Select items. Run. 5 | * Screenshot: http://i.imgur.com/KTapWKU.gif 6 | * Author: X-Raym 7 | * Author URI: https://www.extremraym.com 8 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 9 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 10 | * Licence: GPL v3 11 | * Forum Thread: Scripts: Items Properties (various) 12 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1574814 13 | * REAPER: 5.0 14 | * Version: 1.0.1 15 | --]] 16 | 17 | --[[ 18 | * Changelog: 19 | * v1.0.1 (2017-08-29) 20 | # Title 21 | * v1.0 (2017-08-29) 22 | + Initial Release 23 | --]] 24 | 25 | reaper.PreventUIRefresh(1) 26 | 27 | reaper.Undo_BeginBlock() 28 | 29 | for i = 0, reaper.CountSelectedMediaItems(0) - 1 do 30 | local item = reaper.GetSelectedMediaItem(0,i) 31 | local take = reaper.GetActiveTake(item) 32 | if take then 33 | reaper.SetMediaItemTakeInfo_Value(take, "I_CHANMODE", i+3) 34 | end 35 | end 36 | 37 | reaper.Undo_EndBlock("Set sequential mono channel modes on selected items", -1) 38 | 39 | reaper.UpdateArrange() 40 | 41 | reaper.PreventUIRefresh(-1) -------------------------------------------------------------------------------- /Items Properties/X-Raym_Uppercase first letter of selected items notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Uppercase first letter of selected items notes 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 2.0 10 | * Provides: 11 | * [nomain] ../Functions/utf8.lua 12 | * [nomain] ../Functions/utf8data.lua 13 | ]] 14 | 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2019-12-12) 19 | + Initial Release 20 | ]] 21 | 22 | local info = debug.getinfo(1,'S'); 23 | script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] 24 | dofile(script_path .. "../Functions/utf8.lua") 25 | dofile(script_path .. "../Functions/utf8data.lua") 26 | 27 | function main() 28 | 29 | reaper.Undo_BeginBlock() -- Begin undo group 30 | 31 | 32 | for i = 0, count_sel_items - 1 do 33 | 34 | item = reaper.GetSelectedMediaItem( 0, i) 35 | notes = reaper.ULT_GetMediaItemNote( item ) 36 | reaper.ULT_SetMediaItemNote( item, utf8upper( utf8.sub(notes, 0, 1) ) .. utf8.sub(notes, 2, utf8.len(notes) ) ) 37 | 38 | end 39 | 40 | reaper.Undo_EndBlock("Uppercase first letter of selected items notes", -1) -- End undo group 41 | 42 | end 43 | 44 | -- RUN 45 | 46 | count_sel_items = reaper.CountSelectedMediaItems( 0 ) 47 | 48 | if count_sel_items > 0 then 49 | 50 | reaper.PreventUIRefresh(1) 51 | 52 | main() 53 | 54 | reaper.UpdateArrange() 55 | 56 | reaper.PreventUIRefresh(-1) 57 | 58 | end 59 | -------------------------------------------------------------------------------- /Items Properties/mpl_X-Raym_Unlock selected items for 5 seconds.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Unlock selected items for 5 seconds 3 | * About: A way to temporary unlock an item. 4 | * Instructions: Select item. Run. Wait. 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: unlock for a given time 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=162188 12 | * REAPER: 5.0 pre 15 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-06-15) 19 | + Initial Release 20 | --]] 21 | 22 | time = 5 -- time in seconds you need for pause 23 | time1 = reaper.time_precise() 24 | 25 | function timer() 26 | time2 = reaper.time_precise() 27 | if time2 - time1 < time then 28 | 29 | reaper.defer(timer) 30 | else 31 | reaper.atexit(unlock) -- stop running script and run unlock 32 | end 33 | end 34 | 35 | function unlock() 36 | reaper.Main_OnCommand(40579, 0) 37 | reaper.Main_OnCommand(40582, 0) 38 | end 39 | 40 | -- PERFORM: 41 | 42 | -- 1. Toggle locking 43 | reaper.Main_OnCommand(40579, 0) 44 | reaper.Main_OnCommand(40582, 0) 45 | reaper.UpdateArrange() 46 | 47 | -- 2. Run 48 | timer() 49 | -------------------------------------------------------------------------------- /JSFX/MIDI/Images/bongos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/bongos.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/cabasa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/cabasa.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/congas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/congas.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/cowbell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/cowbell.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/cowbell_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/cowbell_more.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/cymbal_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/cymbal_large.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/cymbal_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/cymbal_small.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/hihat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/hihat.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/kick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/kick.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/maracas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/maracas.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/ride_bell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/ride_bell.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/ride_rim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/ride_rim.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/snare_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/snare_top.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/tamborine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/tamborine.png -------------------------------------------------------------------------------- /JSFX/MIDI/Images/tom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/Images/tom.png -------------------------------------------------------------------------------- /JSFX/MIDI/MIDINoteImages/NONE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/X-Raym/REAPER-ReaScripts/ba9a670f54d5d3b68d7cfb7a2667187cce7b5a3b/JSFX/MIDI/MIDINoteImages/NONE.txt -------------------------------------------------------------------------------- /JSFX/MIDI/MIDINoteImages/mt-power-drum-kit.txt: -------------------------------------------------------------------------------- 1 | 35 kick.png 2 | 36 kick.png 3 | 37 snare_top.png 4 | 38 snare_top.png 5 | 39 snare_top.png 6 | 40 snare_top.png 7 | 41 tom.png 8 | 42 hihat.png 9 | 43 tom.png 10 | 44 hihat.png 11 | 45 tom.png 12 | 46 hihat.png 13 | 47 tom.png 14 | 48 tom.png 15 | 49 cymbal_large.png 16 | 50 tom.png 17 | 51 ride_rim.png 18 | 52 cymbal_small.png 19 | 53 ride_bell.png 20 | 55 cymbal_small.png 21 | 57 cymbal_large.png -------------------------------------------------------------------------------- /JSFX/MIDI/X-Raym_Last MIDI event monitor.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: Last MIDI event monitor 3 | Utility tool for reaper.get_action_context channel support 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Licence: GPL v3 7 | * REAPER: 5.0 8 | * Version: 1.0 9 | */ 10 | 11 | /** 12 | * Changelog: 13 | * v1.0 (2018-10-22) 14 | + Initial Release 15 | */ 16 | 17 | desc:Last MIDI event monitor 18 | 19 | slider1:1<1,16,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Channel 20 | 21 | 22 | //////////////////////////////////////////////////////////////////////////////// 23 | @init 24 | statNoteOn = $x90; 25 | statNoteOff = $x80; 26 | 27 | //////////////////////////////////////////////////////////////////////////////// 28 | @block 29 | 30 | while 31 | ( 32 | 33 | midirecv(offset,msg1,note,vel) ? 34 | ( 35 | // Extract message type and channel 36 | // status = msg1 & $xF0; 37 | channel = msg1 & $x0F; 38 | 39 | slider1 = channel; 40 | sliderchange( 1 ); 41 | 42 | midisend(offset,msg1,note,vel); // Not a note, pass thru 43 | 44 | 1; // Force loop to continue until all messages have been processed 45 | 46 | ); 47 | 48 | ); 49 | -------------------------------------------------------------------------------- /JSFX/MIDI/X-Raym_MIDI Aftertouch eater.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: MIDI Aftertouch eater 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Links: 6 | Forum Thread http://forum.cockos.com/showthread.php?t=181105 7 | * Donation: http://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * Version: 1.0 10 | */ 11 | 12 | /** 13 | * Changelog: 14 | * v1.0 (2025-01-04) 15 | + Initial release 16 | */ 17 | 18 | desc:MIDI Aftertouch eater 19 | 20 | @init 21 | 22 | @block 23 | 24 | while ( midirecv(offset,msg1,note,vel) ) ( 25 | status = msg1 & $xF0; 26 | status != $xA0 && status != $xD0 ? ( 27 | midisend( offset, msg1, note, vel ); 28 | ); 29 | 1; 30 | ); 31 | -------------------------------------------------------------------------------- /JSFX/MIDI/X-Raym_MIDI note generator.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: Note Generator 3 | * About: Press play. 4 | * Screenshot: https://i.imgur.com/zCVSnMk.gifv 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Donation: http://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | */ 12 | 13 | /** 14 | * Changelog: 15 | * v1.0 (2020-01-21) 16 | + Initial Release 17 | */ 18 | 19 | desc:Note Generator 20 | 21 | slider1:1<0,100,0.1>Rate (Hz) 22 | slider2:0<0,127,1>Note Min 23 | slider3:127<0,127,1>Note Max 24 | slider4:0<0,127,1>Vel Min 25 | slider5:127<0,127,1>Vel Max 26 | //slider6:0<0,127,1>Note Length // This would need buffer for each note value 27 | 28 | @init 29 | // Globals 30 | buffer = 0; 31 | last_note = 0; 32 | 33 | // Defs 34 | statNoteOn = $x90; 35 | statNoteOff = $x80; 36 | 37 | // Return one random integer between two numbers 38 | function random( val1, val2 ) local( range ) ( 39 | range = abs(val1 - val2); 40 | min(val1, val2) + rand( range ); 41 | ); 42 | 43 | @sample 44 | play_state != 0 ?( 45 | count += 1; 46 | count >= srate / slider1 ? ( 47 | midisend(0, statNoteOff & $xF0;, last_note, 0 ); // End of previous note 48 | last_note = random(slider2, slider3); 49 | midisend(0, statNoteOn & $xF0;, last_note, random( slider4, slider5 ) ); // Start of new note 50 | count = 0; 51 | ); 52 | ); -------------------------------------------------------------------------------- /JSFX/MIDI/X-Raym_MIDI single note map.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: MIDI single note map 3 | * About: Quickly remap a MIDI note 4 | * Screenshot: https://monosnap.com/image/HtvY0eslYZ72Hl6K0Nb8cf7psJPTJp.png 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Donation: http://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | */ 12 | 13 | /** 14 | * Changelog: 15 | * v1.0 (2018-11-11) 16 | + Initial Release 17 | */ 18 | 19 | desc:MIDI single note map 20 | 21 | slider1:0<0,16,1{Any,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Input Channel 22 | 23 | slider10:36<0,127,1>Note IN 24 | slider11:36<0,127,1>Note OUT 25 | 26 | 27 | //////////////////////////////////////////////////////////////////////////////// 28 | @init 29 | statNoteOn = $x90; 30 | statNoteOff = $x80; 31 | afterTouch = $xA0; 32 | 33 | //////////////////////////////////////////////////////////////////////////////// 34 | @slider 35 | inChannel = slider1 - 1; 36 | 37 | //////////////////////////////////////////////////////////////////////////////// 38 | @block 39 | 40 | while 41 | ( 42 | 43 | midirecv(offset,msg1,note,vel) ? 44 | ( 45 | 46 | // Extract message type and channel 47 | status = msg1 & $xF0; 48 | channel = msg1 & $x0F; 49 | 50 | // Is it on our channel? 51 | channel == inChannel || inChannel == -1 ? 52 | ( 53 | 54 | // Is it a note event? 55 | status == statNoteOn || status == statNoteOff || status == afterTouch ? 56 | ( 57 | 58 | // If note is in Makey Makey MIDI Range 59 | note == slider10 ? ( 60 | 61 | note = slider( 11 ); // Get Note Out 62 | 63 | ); 64 | 65 | ); 66 | 67 | ); 68 | 69 | midisend(offset, msg1, note, vel); 70 | 71 | 1; // Force loop to continue until all messages have been processed 72 | 73 | ); 74 | 75 | ); 76 | -------------------------------------------------------------------------------- /JSFX/MIDI/X-Raym_Note On under X velocity to Note Off.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: Note On under X velocity to Note Off 3 | * About: Converts Notes On to Note Off 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Links: 7 | Forum Thread http://forum.cockos.com/showthread.php?t=181105 8 | Screenshot https://monosnap.com/file/jSODyOpFNH9W4VxgBW6dByhlGfnAKS.png 9 | * Donation: http://www.extremraym.com/en/donation 10 | * Licence: GPL v3 11 | * REAPER: 5.0 12 | * Version: 1.0.1 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1.0.1 (2025-01-04) 18 | + NoteOn is only vel > 0 19 | * v1.0 (2017-11-19) 20 | + Initial Release 21 | */ 22 | 23 | desc:Note On under X velocity to Note Off 24 | 25 | slider1:0<0,16,1{Any,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Input Channel 26 | 27 | slider3:0<0,127,1>Velocity Threshold 28 | 29 | //////////////////////////////////////////////////////////////////////////////// 30 | @init 31 | statNoteOn = $x90; 32 | statNoteOff = $x80; 33 | 34 | 35 | //////////////////////////////////////////////////////////////////////////////// 36 | @slider 37 | inChannel = slider1 - 1; 38 | 39 | //////////////////////////////////////////////////////////////////////////////// 40 | @block 41 | 42 | while 43 | ( 44 | 45 | midirecv(offset,msg1,note,vel) ? 46 | ( 47 | 48 | // Extract message type and channel 49 | status = msg1 & $xF0; 50 | channel = msg1 & $x0F; 51 | 52 | // Is it on our channel? 53 | channel == inChannel || inChannel == -1 ? 54 | ( 55 | 56 | // Is it a note event? 57 | status == statNoteOn && vel > 0 ? 58 | ( 59 | 60 | // If note is good 61 | vel <= slider3 ? ( 62 | 63 | vel = 0; 64 | msg1 = statNoteOff; 65 | 66 | ); 67 | 68 | ); 69 | 70 | ); 71 | 72 | midisend(offset,msg1,note,vel); 73 | 74 | 1; // Force loop to continue until all messages have been processed 75 | 76 | ); 77 | 78 | ); 79 | -------------------------------------------------------------------------------- /JSFX/X-Raym_4 Mono channels switcher.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: 4 Mono channels switcher 3 | * About: Select one mono channel as source and one as destination, it will mute the other. Useful in a multi-send set-up, where the source track send only one mono channel to 4 different tracks (or less). 4 | * Screenshot: https://i.imgur.com/rMIDGk2.gif 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Donation: http://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | */ 12 | 13 | /** 14 | * Changelog: 15 | * v1.0 (2022-05-26) 16 | + Initial Release 17 | */ 18 | 19 | desc:4 Mono channels switcher 20 | 21 | slider3:0<0,3,1{A,B,C,D}>Input source 22 | 23 | slider10:0<0,3,1{A,B,C,D}>Output source 24 | 25 | @slider 26 | 27 | ch1 = slider10 == 0 ? 1 : 0; 28 | ch2 = slider10 == 1 ? 1 : 0; 29 | ch3 = slider10 == 2 ? 1 : 0; 30 | ch4 = slider10 == 3 ? 1 : 0; 31 | 32 | @sample 33 | spl0_init = spl(slider3); 34 | spl0 = spl0_init * ch1; 35 | spl1 = spl0_init * ch2; 36 | spl2 = spl0_init * ch3; 37 | spl3 = spl0_init * ch4; 38 | -------------------------------------------------------------------------------- /JSFX/X-Raym_4 Stereo channels switcher.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: 4 Stereo channels switcher 3 | * About: Select one stereo channel as source and one as destination, it will mute the other. Useful in a multi-send set-up, where the source track send only one stereo channel to 4 different tracks (or less). 4 | * Screenshot: https://i.imgur.com/rMIDGk2.gif 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Donation: http://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | */ 12 | 13 | /** 14 | * Changelog: 15 | * v1.0 (2022-07-29) 16 | + Initial Release 17 | */ 18 | 19 | desc:4 stereo channels switcher 20 | 21 | slider3:0<0,3,1{A,B,C,D}>Input source 22 | 23 | slider10:0<0,3,1{A,B,C,D}>Output source 24 | 25 | @slider 26 | 27 | ch1 = slider10 == 0 ? 1 : 0; 28 | ch2 = slider10 == 1 ? 1 : 0; 29 | ch3 = slider10 == 2 ? 1 : 0; 30 | ch4 = slider10 == 3 ? 1 : 0; 31 | 32 | @sample 33 | spla_init = spl(slider3 * 2 + 1); 34 | splb_init = spl(slider3 * 2 + 1); 35 | spl0 = spla_init * ch1; 36 | spl1 = splb_init * ch1; 37 | spl2 = spla_init * ch2; 38 | spl3 = splb_init * ch2; 39 | spl4 = spla_init * ch3; 40 | spl5 = splb_init * ch3; 41 | spl6 = spla_init * ch4; 42 | spl7 = splb_init * ch4; 43 | -------------------------------------------------------------------------------- /JSFX/X-Raym_Mute on loop.jsfx: -------------------------------------------------------------------------------- 1 | /** 2 | * JSFX Name: Mute on loop 3 | * Screenshot: https://i.imgur.com/DQvMHTP.gif 4 | * About: Mute all audio when the play cursor start looping. Note: this will also mute if you put play cursor before its current position while playing (no way to check if play cursor goes before because of looping or not). 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Donation: https://www.extremraym.com/en/donation 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | */ 12 | 13 | /** 14 | * Changelog: 15 | * v1.0.1 (2023-04-01) 16 | + GFX for TCP/MCP embed 17 | * v1.0 (2023-03-15) 18 | + Initial Release 19 | */ 20 | 21 | desc:Mute on loop 22 | 23 | slider1:0<0,1,1{Unmuted,Muted}>State 24 | 25 | @gfx 160 40 26 | gfx_r = 0.5; gfx_g = 0.5; gfx_b = 0.5; 27 | gfx_rect( 0, 0, gfx_w, gfx_h ); 28 | 29 | slider1 == 1 ? ( 30 | gfx_r = 0; gfx_g = 0; gfx_b = 0; 31 | gfx_rect( 0, 0, gfx_w, gfx_h ); 32 | ); 33 | 34 | 35 | @sample 36 | slider1 == 0 && play_state > 0 && play_position < last_pos ?( 37 | slider1 = 1; 38 | ); 39 | 40 | slider1 == 1 ? ( 41 | channel = -1; 42 | loop(num_ch, channel += 1; 43 | spl(channel) = 0; 44 | slider1 = 1; 45 | slider_automate(1); 46 | ); 47 | ); 48 | 49 | play_state == 0 ? slider1 = 0; 50 | 51 | last_pos = play_position; -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Add 10 to selected notes velocity.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Select-Unselect lowest MIDI notes in active take 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: 9 | * Forum Thread URI: 10 | * REAPER: 5.0 11 | * Version: 1.0 12 | */ 13 | 14 | /** 15 | * Changelog: 16 | * v1.0 (2015-04-08) 17 | + Initial release 18 | */ 19 | 20 | take = MIDIEditor_GetTake(MIDIEditor_GetActive()); // GET TAKE IN MIDI EDITOR 21 | MIDI_CountEvts(take, notes, ccs, sysex);// COUNT MIDI NOTES 22 | j = 0; // INIT 23 | loop(notes, // EXECUTE THE ACTION BASED ON NUMBER OF NOTES 24 | MIDI_GetNote(take, j, sel, muted, start, end, chan, pitch, vel); // GET NOTE J 25 | sel == 1 ? ( // IF NOTE IS SELECTED 26 | vel = vel + 10; // Optionnal calc based en vel 27 | MIDI_SetNote(take, j, sel, muted, start, end, chan, pitch, vel); // SET NOTE J 28 | ); // END IF NOTE IS SELECTED 29 | j += 1; // INCREMENT 30 | ); // END OF LOOP 31 | 32 | UpdateArrange(); 33 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Add a MIDI marker named Page at edit cursor.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add a MIDI marker named Page at edit cursor 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: 9 | * Forum Thread URI: 10 | * REAPER: 5.0 11 | * Version: 1.0.1 12 | --]] 13 | 14 | --[[ 15 | * v1.0 ( 2016-06-04 ) 16 | + Initial Beta 17 | --]] 18 | 19 | --// DEBUG //-- 20 | function Msg( value ) 21 | if console then 22 | reaper.ShowConsoleMsg( tostring( value ) .. "\n" ) 23 | end 24 | end 25 | 26 | function Main( take ) 27 | 28 | edit_cur = reaper.GetCursorPosition() 29 | 30 | edit_cur_ppq = reaper.MIDI_GetPPQPosFromProjTime( take, edit_cur ) 31 | 32 | reaper.MIDI_InsertTextSysexEvt( take, true, false, edit_cur_ppq, 6, "Page" ) 33 | 34 | reaper.MIDI_Sort( take ) 35 | 36 | end 37 | 38 | --------------------------------------------------------------------------------------------------- 39 | --// INIT //-- 40 | --if console then reaper.ClearConsole() end 41 | active_midi_editor = reaper.MIDIEditor_GetActive() 42 | take = reaper.MIDIEditor_GetTake( active_midi_editor) 43 | 44 | if take then -- IF MIDI EDITOR 45 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 46 | Main( take ) 47 | reaper.Undo_EndBlock("Advanced MIDI Humanization", 0) -- End of the undo block. Leave it at the bottom of your main function. 48 | end 49 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Insert and-or edit project marker at current position.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Insert and-or edit project marker at current position 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2023-02-12) 15 | + Initial Release 16 | --]] 17 | 18 | reaper.Main_OnCommand( 40171, 0 ) -- Markers: Insert and/or edit marker at current position 19 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Insert new MIDI item from MIDI editor active take track and time selection.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Insert new MIDI item from MIDI editor active take track and time selection 3 | * Screenshot: https://i.imgur.com/EtzVfGF.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | --]] 12 | 13 | --[[ 14 | * v1.0 ( 2023-08-07 ) 15 | + Initial Beta 16 | --]] 17 | 18 | -- USER CONFIG AREA --------------------------------------- 19 | 20 | re_open_midi_editor = false 21 | 22 | -------------------------------- END OF USER CONFIG AREA -- 23 | 24 | undo_text = "Insert new MIDI item from MIDI editor active take track and time selection" 25 | 26 | take = reaper.MIDIEditor_GetTake( reaper.MIDIEditor_GetActive() ) 27 | if not take then return false end 28 | 29 | item = reaper.GetMediaItemTake_Item( take ) 30 | track = reaper.GetMediaItemTrack( item ) 31 | 32 | time_start, time_end = reaper.GetSet_LoopTimeRange2( 0, false, false, 0, 0, false ) 33 | if time_start == time_end then return end 34 | 35 | reaper.Undo_BeginBlock() 36 | 37 | new_item = reaper.CreateNewMIDIItemInProj( track, time_start, time_end, nil ) 38 | 39 | reaper.SelectAllMediaItems( 0, false ) 40 | reaper.SetMediaItemSelected( new_item, true ) 41 | 42 | if re_open_midi_editor then 43 | reaper.Main_OnCommand(40153,0)--Item: Open in built-in MIDI editor (set default behavior in preferences) 44 | end 45 | 46 | reaper.Undo_EndBlock( undo_text, 0 ) 47 | 48 | reaper.UpdateTimeline() 49 | 50 | reaper.UpdateArrange() 51 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Remove project marker at current position.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Remove project marker at current position 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2023-02-12) 15 | + Initial Release 16 | --]] 17 | 18 | reaper.Main_OnCommand( 40613, 0 ) -- Markers: Delete marker near cursor 19 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Set selected notes velocity to 100.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Set selected notes velocity to 100 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: 9 | * Forum Thread URI: 10 | * REAPER: 5.0 11 | * Version: 1.0 12 | **/ 13 | 14 | /** 15 | * Changelog: 16 | * v1.0 (2016-03-05) 17 | + Initial release 18 | **/ 19 | 20 | take = MIDIEditor_GetTake(MIDIEditor_GetActive()); // GET TAKE IN MIDI EDITOR 21 | MIDI_CountEvts(take, notes, ccs, sysex);// COUNT MIDI NOTES 22 | j = 0; // INIT 23 | loop(notes, // EXECUTE THE ACTION BASED ON NUMBER OF NOTES 24 | MIDI_GetNote(take, j, sel, muted, start, end, chan, pitch, vel); // GET NOTE J 25 | sel == 1 ? ( // IF NOTE IS SELECTED 26 | vel = 100; // Optionnal calc based en vel 27 | MIDI_SetNote(take, j, sel, muted, start, end, chan, pitch, vel); // SET NOTE J 28 | ); // END IF NOTE IS SELECTED 29 | j += 1; // INCREMENT 30 | ); // END OF LOOP 31 | 32 | UpdateArrange(); 33 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Shift MIDI lyrics events message after edit cursor to one event on the left.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Insert sysex events at time selection 3 | * Screenshot: https://i.imgur.com/bzhSa2O.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2023-02-12) 16 | + Initial Release 17 | --]] 18 | 19 | midi_editor = reaper.MIDIEditor_GetActive() 20 | if not midi_editor then return end 21 | 22 | take = reaper.MIDIEditor_GetTake( midi_editor ) 23 | if not take then return end 24 | 25 | retval, notes, cc, evts = reaper.MIDI_CountEvts( take ) 26 | if evts == 0 then return end 27 | 28 | edit_cursor = reaper.GetCursorPosition() 29 | edit_cur_pos_ppq = reaper.MIDI_GetPPQPosFromProjTime( take, edit_cursor ) 30 | 31 | texts = {} 32 | for i = 0, evts - 1 do 33 | local retval, selected, muted, ppqpos, type, msg = reaper.MIDI_GetTextSysexEvt( take, i ) 34 | texts[i] = msg 35 | end 36 | 37 | reaper.Undo_BeginBlock() 38 | for i = 0, evts - 1 do 39 | local retval, selected, muted, ppqpos, type, msg = reaper.MIDI_GetTextSysexEvt( take, i ) 40 | if ppqpos >= edit_cur_pos_ppq then 41 | if texts[i+1] then 42 | reaper.MIDI_SetTextSysexEvt( take, i, selected, mute, ppqpos, type, texts[i+1], false ) 43 | end 44 | end 45 | end 46 | reaper.Undo_EndBlock("Shift MIDI lyrics events message after edit cursor to one event on the left", -1) 47 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Shift MIDI lyrics events message after edit cursor to one event on the right.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Insert sysex events at time selection 3 | * Screenshot: https://i.imgur.com/bzhSa2O.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2023-02-12) 16 | + Initial Release 17 | --]] 18 | 19 | midi_editor = reaper.MIDIEditor_GetActive() 20 | if not midi_editor then return end 21 | 22 | take = reaper.MIDIEditor_GetTake( midi_editor ) 23 | if not take then return end 24 | 25 | retval, notes, cc, evts = reaper.MIDI_CountEvts( take ) 26 | if evts == 0 then return end 27 | 28 | edit_cursor = reaper.GetCursorPosition() 29 | edit_cur_pos_ppq = reaper.MIDI_GetPPQPosFromProjTime( take, edit_cursor ) 30 | 31 | texts = {} 32 | for i = 0, evts - 1 do 33 | local retval, selected, muted, ppqpos, type, msg = reaper.MIDI_GetTextSysexEvt( take, i ) 34 | texts[i] = msg 35 | end 36 | 37 | reaper.Undo_BeginBlock() 38 | for i = 0, evts - 1 do 39 | local retval, selected, muted, ppqpos, type, msg = reaper.MIDI_GetTextSysexEvt( take, i ) 40 | if ppqpos >= edit_cur_pos_ppq then 41 | reaper.MIDI_SetTextSysexEvt( take, i, selected, mute, ppqpos, type, (not has_done and "_") or texts[i-1], false ) 42 | has_done = true 43 | end 44 | end 45 | reaper.Undo_EndBlock("Shift MIDI lyrics events message after edit cursor to one event on the left", -1) 46 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Snap edit cursor to closest MIDI editor grid line.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Snap edit cursor to closest MIDI editor grid line 3 | * Screenshot: https://i.imgur.com/EBjhma4.gif 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Scripts: MIDI (Various) 10 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=187555 11 | * REAPER: 5.0 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * v1.0 (2024-11-13) 17 | + Initial Release 18 | --]] 19 | 20 | midi_editor = reaper.MIDIEditor_GetActive() 21 | if not midi_editor then return end 22 | 23 | function Main() 24 | midi_editor_section = 32060 25 | snap = reaper.GetToggleCommandStateEx( midi_editor_section, 1014 ) 26 | if snap == 0 then 27 | reaper.MIDIEditor_OnCommand(midi_editor, 1014) 28 | end 29 | 30 | cur_pos = reaper.GetCursorPosition() 31 | 32 | reaper.MIDIEditor_OnCommand(midi_editor, 40048) 33 | rigth_cur_pos = reaper.GetCursorPosition() 34 | 35 | reaper.MIDIEditor_OnCommand(midi_editor, 40047) 36 | left_cur_pos = reaper.GetCursorPosition() 37 | 38 | if left_cur_pos == cur_pos then 39 | reaper.SetEditCurPos( cur_pos, false, false ) 40 | elseif rigth_cur_pos - cur_pos < cur_pos - left_cur_pos then 41 | --reaper.SetEditCurPos( rigth_cur_pos, false, false ) 42 | reaper.MIDIEditor_OnCommand(midi_editor, 40048) -- TRICK: this way we prevent one frame visual cursor jump 43 | else 44 | reaper.SetEditCurPos( left_cur_pos, false, false ) 45 | end 46 | 47 | if snap == 0 then 48 | reaper.MIDIEditor_OnCommand(midi_editor, 1014) 49 | end 50 | end 51 | 52 | reaper.PreventUIRefresh(1) 53 | Main() 54 | reaper.PreventUIRefresh(-1) 55 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Split selected MIDI notes half in 2 notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Split selected MIDI notes half in 2 notes 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 6.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2024-03-06) 15 | + Initial Release 16 | --]] 17 | 18 | local reaper = reaper 19 | 20 | function Process( take ) 21 | local _,notes = reaper.MIDI_CountEvts(take) 22 | reaper.MIDI_DisableSort( take ) 23 | for i = notes -1, 0, -1 do 24 | local _, sel, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote(take, i) 25 | if sel then 26 | local len = (endppqpos - startppqpos) / 2 27 | reaper.MIDI_SetNote(take, i, sel, muted, startppqpos, startppqpos + len, chan, pitch, val) 28 | reaper.MIDI_InsertNote( take, sel, muted, startppqpos + len, endppqpos, chan, pitch, vel, true ) 29 | end 30 | end 31 | reaper.MIDI_Sort( take ) 32 | end 33 | 34 | -- Main Function 35 | function Main() 36 | 37 | active_midi_editor = reaper.MIDIEditor_GetActive() 38 | 39 | if active_midi_editor then 40 | local i = 0 41 | local take 42 | repeat 43 | take = reaper.MIDIEditor_EnumTakes( active_midi_editor, i, true ) 44 | if take then 45 | Process( take ) 46 | end 47 | i = i + 1 48 | until not take 49 | end 50 | 51 | end 52 | 53 | -- RUN 54 | reaper.PreventUIRefresh(1) 55 | reaper.Undo_BeginBlock() 56 | Main() 57 | reaper.Undo_EndBlock("Split selected MIDI notes half in 2 notes", -1) 58 | reaper.UpdateArrange() 59 | reaper.PreventUIRefresh(-1) 60 | -------------------------------------------------------------------------------- /MIDI Editor/X-Raym_Toggle mute track with take in MIDI editor.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Toggle mute track with take in MIDI editor 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Licence: GPL v3 6 | * REAPER: 5.0 7 | * Version: 1.0 8 | --]] 9 | 10 | --[[ 11 | * Changelog: 12 | * v1.0 (2022-04-18) 13 | + Initial Release 14 | --]] 15 | 16 | take = reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()) 17 | if not take then return end 18 | 19 | track = reaper.GetMediaItemTake_Track(take) 20 | 21 | reaper.Undo_BeginBlock() 22 | 23 | track_mute = reaper.GetMediaTrackInfo_Value(track, 'B_MUTE') 24 | track_mute = track_mute == 1 and 0 or 1 25 | reaper.SetMediaTrackInfo_Value(track, 'B_MUTE', track_mute) 26 | 27 | reaper.Undo_EndBlock('Toggle mute track with take in MIDI editor', -1) 28 | -------------------------------------------------------------------------------- /Media Explorer/X-Raym_Focus arrange view.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Focus arrange view 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | * Provides: [main=mediaexplorer] . 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2020-12-17) 16 | + Initial Release 17 | --]] 18 | 19 | function Open_URL(url) 20 | if not OS then local OS = reaper.GetOS() end 21 | if OS=="OSX32" or OS=="OSX64" then 22 | os.execute("start \"\" \"".. url .. "\"") 23 | else 24 | os.execute("start ".. url) 25 | end 26 | end 27 | 28 | function CheckSWS() 29 | if reaper.NamedCommandLookup("_BR_VERSION_CHECK") == 0 then 30 | local retval = reaper.ShowMessageBox("SWS extension is required by this script.\nHowever, it doesn't seem to be present for this REAPER installation.\n\nDo you want to download it now ?", "Warning", 1) 31 | if retval == 1 then 32 | Open_URL("http://www.sws-extension.org/download/pre-release/") 33 | end 34 | else 35 | return true 36 | end 37 | end 38 | 39 | sws = CheckSWS() 40 | 41 | if sws then 42 | reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_FOCUS_ARRANGE_WND"), 0) -- Preview: Play/stop 43 | end 44 | -------------------------------------------------------------------------------- /Media Explorer/X-Raym_Play-Stop arrange view from media explorer context.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Play-Stop arrange view from media explorer context 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.3 10 | * Provides: [main=mediaexplorer] . 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2020-12-17) 16 | + Initial Release 17 | --]] 18 | 19 | reaper.Main_OnCommand(40044, 0) -- Preview: Play/stop 20 | -------------------------------------------------------------------------------- /Media Explorer/X-Raym_Preview media explorer and play-stop project arrange view simultaneously.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Preview media explorer and play-stop project arrange view simultaneously 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | * Provides: [main=mediaexplorer] . 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0.1 (2023-08-30) 16 | # More efficient GetMediaExplorer function 17 | * v1.0 (2020-12-17) 18 | + Initial Release 19 | --]] 20 | 21 | function GetMediaExplorerHWND() -- thx ultraschall! 22 | local state = reaper.GetToggleCommandState( 50124 ) 23 | if state ~= 0 then return reaper.OpenMediaExplorer( "", false ) end 24 | end 25 | 26 | if not reaper.JS_Window_ArrayFind then 27 | reaper.ShowConsoleMsg('Please Install js_ReaScriptAPI extension.\nhttps://forum.cockos.com/showthread.php?t=212174\n') 28 | else 29 | hwnd = GetMediaExplorerHWND() 30 | 31 | if hwnd then 32 | reaper.JS_Window_OnCommand(hwnd, tonumber(40024)) -- Preview: Play/stop 33 | reaper.Main_OnCommand(40044, 0) -- Preview: Play/stop 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /Media Explorer/X-Raym_Reset media explorer volume to 0dB.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Reset media explorer volume to 0dB 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.3 10 | * Provides: [main=mediaexplorer] . 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0.3 (2023-08-30) 16 | # More efficient GetMediaExplorer function 17 | * v1.0 (2020-12-17) 18 | + Initial Release 19 | --]] 20 | 21 | reaper.ClearConsole() 22 | 23 | function Msg(val) 24 | reaper.ShowConsoleMsg(tostring(val).."\n") 25 | end 26 | 27 | function GetMediaExplorerHWND() -- thx ultraschall! 28 | local state = reaper.GetToggleCommandState( 50124 ) 29 | if state ~= 0 then return reaper.OpenMediaExplorer( "", false ) end 30 | end 31 | 32 | function Main(hwnd) 33 | retval, list = reaper.JS_Window_ListAllChild( hwnd ) 34 | for adr in list:gmatch("%w+") do 35 | elm_hwnd = reaper.JS_Window_HandleFromAddress( adr ) 36 | title = reaper.JS_Window_GetTitle( elm_hwnd ) 37 | if title == "vol" then 38 | reaper.JS_WindowMessage_Send( elm_hwnd, "WM_LBUTTONDBLCLK", 0,0, 0, 0) 39 | break 40 | end 41 | end 42 | end 43 | 44 | if not reaper.JS_WindowMessage_Send then 45 | reaper.ShowConsoleMsg('Please Install js_ReaScriptAPI extension.\nhttps://forum.cockos.com/showthread.php?t=212174\n') 46 | else 47 | hwnd = GetMediaExplorerHWND() 48 | 49 | if hwnd then 50 | Main(hwnd) 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /Media Explorer/X-Raym_Stop media explorer.lua: -------------------------------------------------------------------------------- 1 | dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua") 2 | 3 | if not (ultraschall and ultraschall.CopyMediaItemToDestinationTrack and ultraschall.AddItemSpectralEdit) then 4 | reaper.ShowConsoleMsg("Please Install Ultraschall API via Reapack\nhttps://raw.githubusercontent.com/Ultraschall/ultraschall-lua-api-for-reaper/master/ultraschall_api_index.xml") 5 | return false 6 | end 7 | 8 | ultraschall.MediaExplorer_OnCommand(1010) --Preview: Pause 9 | -------------------------------------------------------------------------------- /Menus and Toolbars/TextItems.ReaperMenu: -------------------------------------------------------------------------------- 1 | [Floating toolbar 16] 2 | icon_0=toolbar_window_tab_list.png 3 | icon_1=toolbar_tool_pencil_draw.png 4 | icon_3=toolbar_misc_speech_note.png 5 | icon_5=toolbar_misc_back_left_previous_more.png 6 | icon_6=toolbar_misc_back_left_previous.png 7 | icon_7=toolbar_undo.png 8 | icon_8=toolbar_misc_right_forward_next.png 9 | icon_9=toolbar_misc_right_forward_next_more.png 10 | icon_11=toolbar_midi_lengthen_note_grid_unit.png 11 | icon_13=toolbar_item_selected_snap.png 12 | icon_14=toolbar_item_right_edge_grow.png 13 | icon_15=toolbar_project_save_as_new_disk.png 14 | item_0=_RS73564e9d3add2b79b05aa1713eedc00de35b6e12 Script: HeDa_ Notes Reader (R5).eel 15 | item_1=_S&M_ITEMNOTES Edit TXT 16 | item_2=-1 17 | item_3=_RS7aa3b5042624744c80340f51f85274b4a57c6c46 Create text items on first selected track from selected items notes 18 | item_4=-1 19 | item_5=_33f82385550f034a868f8284a4a00e96 Custom: Go to previous item, Play 20 | item_6=_5c61e90b0a432b489660908590afefb8 Custom: Go to previous item 21 | item_7=_XEN_PREF_STOPATENDLOOP Xenakios/SWS: Toggle stop playback at end of time selection 22 | item_8=_6685de38e0081a4090db62dbffa5d171 Custom: Go to next item 23 | item_9=_16f9294d4543f3499946cd967bd5370d Custom: Go to next item, Play 24 | item_10=-1 25 | item_11=_6c2c987f5de1b84fb2e31b518c0baec1 Exp Item 26 | item_12=-1 27 | item_13=_RSd5d245ee09524d1ca3be936153da509efd52d7ec Snap Frame 28 | item_14=_RS8bd94945a3d8160a8015dc1d005580c3a563b0fb Expand selected items length to the next item position if close enough 29 | item_15=_37eca78e78fdf042ae173d4cc0ba60f0 Custom: Export subtitle track 30 | 31 | -------------------------------------------------------------------------------- /Project/X-Raym_Open most recent project.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Open most recent project 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0.1 (2022-07-30) 15 | # maxrecent taken into account 16 | --]] 17 | 18 | function DisplayTooltip(message) 19 | local x, y = reaper.GetMousePosition() 20 | reaper.TrackCtl_SetToolTip( tostring(message), x+17, y+17, false ) 21 | end 22 | 23 | function Msg( val ) 24 | reaper.ShowConsoleMsg( tostring(val)..'\n' ) 25 | end 26 | 27 | reaper.ClearConsole() 28 | 29 | -- based on ReaScript name: Open recent projects in new tab by BuyOne 30 | -- collect recent project paths 31 | recent_pojs = {} 32 | for line in io.lines(reaper.get_ini_file()) do 33 | if line:match('maxrecent=(%d+)') then -- we check max cause if max was higher at some point, there may still be some residual .rpp reference which are not replaced. 34 | maxrecent = tonumber( line:match('maxrecent=(%d+)') ) 35 | end 36 | if line == '[Recent]' then 37 | found = true 38 | elseif found and line:match('%[.-%]') and line ~= '[Recent]' then 39 | break 40 | end 41 | 42 | if found and line ~= '[Recent]' then -- collect paths excluding the section name 43 | local id = tonumber( line:match( 'recent(%d+)=' ) ) 44 | if id then 45 | if not maxrecent or id <= maxrecent then 46 | recent_pojs[id] = line:gsub('recent%d+=','') 47 | end 48 | end -- or line:match('=(.+)') // strip away the key 49 | end 50 | 51 | end 52 | 53 | if #recent_pojs == 0 then return end 54 | 55 | if reaper.file_exists( recent_pojs[#recent_pojs] ) then 56 | reaper.Main_openProject( recent_pojs[#recent_pojs] ) 57 | else 58 | DisplayTooltip( recent_pojs[#recent_pojs] .. "\nFile not found." ) 59 | end 60 | -------------------------------------------------------------------------------- /Project/X-Raym_Save all open project tabs.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Save all open project tabs 3 | * About: Mod of Script: TJF Save all open dirty projects.lua, but marking all projets dirty within the loop 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2024-12-06) 16 | + Initial Release 17 | --]] 18 | 19 | reaper.PreventUIRefresh(1) 20 | 21 | local cur_proj = reaper.EnumProjects( -1) 22 | 23 | local projIdx = 0 24 | local proj, _ = reaper.EnumProjects( projIdx) 25 | 26 | 27 | while proj ~= nil 28 | do 29 | reaper.MarkProjectDirty( proj ) -- X-Raym mod here 30 | if reaper.IsProjectDirty( proj ) > 0 then reaper.Main_SaveProject( proj, false ) end 31 | 32 | projIdx = projIdx + 1 33 | proj, _ = reaper.EnumProjects( projIdx) 34 | end 35 | 36 | reaper.SelectProjectInstance(cur_proj) 37 | 38 | reaper.PreventUIRefresh(-1) -------------------------------------------------------------------------------- /Razor Edit/X-Raym_Set selected tracks razor edit area to time selection.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set selected tracks razor edit area to time selection 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | ]] 11 | 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2022-04-02) 16 | + Initial Release 17 | ]] 18 | 19 | function Msg( val ) 20 | reaper.ShowConsoleMsg( tostring( val ) .. "\n" ) 21 | end 22 | 23 | reaper.ClearConsole() 24 | 25 | time_start, time_end = reaper.GetSet_LoopTimeRange( false, false, 0, 0, false ) 26 | if time_start == time_end then return false end 27 | 28 | count_sel_tracks = reaper.CountSelectedTracks( 0 ) 29 | count_tracks = reaper.CountTracks( 0 ) 30 | 31 | reaper.PreventUIRefresh( 1 ) 32 | 33 | reaper.Undo_BeginBlock() 34 | 35 | for i = 0, count_tracks - 1 do 36 | local track = reaper.GetTrack( 0, i ) 37 | if count_sel_tracks == 0 or reaper.IsTrackSelected( track ) then 38 | local razor_str = time_start .. " " .. time_end .. ' ""' 39 | local retval, stringNeedBig = reaper.GetSetMediaTrackInfo_String( track, "P_RAZOREDITS", razor_str, true ) 40 | end 41 | end 42 | 43 | reaper.Undo_BeginBlock( "Set selected tracks razor edit area to time selection", -1 ) 44 | 45 | reaper.UpdateArrange() 46 | 47 | reaper.PreventUIRefresh( 1 ) 48 | -------------------------------------------------------------------------------- /Regions/X-Raym_Add all regions to render queue individually.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Add all regions to render queue individually 3 | * Instructions: Set render to region matrix (you need to select one track to close the window). Run the action. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Links: 10 | Script Request: Render Region Matrix (stopping in between regions) http://forum.cockos.com/showthread.php?t=193188 11 | Screenshot http://i.imgur.com/nKc09wL.gif 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2017-06-23) 19 | + Initial Release 20 | --]] 21 | 22 | -- GET MASTER TRACK 23 | master_track = reaper.GetMasterTrack( 0 ) 24 | 25 | -- TRACKS 26 | count_tracks = reaper.CountTracks( 0 ) 27 | 28 | -- CLEARN RENDER MATRIX 29 | i=0 30 | repeat 31 | iRetval, bIsrgn, iPos, iRgnend, sName, iIndex, iColor = reaper.EnumProjectMarkers3(0,i) 32 | if iRetval >= 1 then 33 | if bIsrgn == true then 34 | 35 | reaper.SetRegionRenderMatrix( 0, iIndex, master_track, -1 ) 36 | 37 | for j = 0 , count_tracks - 1 do 38 | 39 | track = reaper.GetTrack( 0, j ) 40 | reaper.SetRegionRenderMatrix( 0, iIndex, track, -1 ) 41 | 42 | end 43 | 44 | end 45 | i = i+1 46 | end 47 | until iRetval == 0 48 | 49 | -- LOOP THROUGH REGIONS 50 | i=0 51 | repeat 52 | iRetval, bIsrgn, iPos, iRgnend, sName, iIndex, iColor = reaper.EnumProjectMarkers3(0,i) 53 | if iRetval >= 1 then 54 | if bIsrgn == true then 55 | 56 | reaper.SetRegionRenderMatrix( 0, iIndex, master_track, 1 ) 57 | reaper.Main_OnCommand( 41823, 0 ) -- Add to render queue with last settings 58 | reaper.SetRegionRenderMatrix( 0, iIndex, master_track, -1 ) 59 | 60 | end 61 | i = i+1 62 | end 63 | until iRetval == 0 -------------------------------------------------------------------------------- /Regions/X-Raym_Add envelope markers from selected envelope points.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript: Add envelope markers from selected envelope points 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.3 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2021-12-23) 15 | + Initial Release 16 | --]] 17 | 18 | env = reaper.GetSelectedTrackEnvelope(0) 19 | 20 | if not env then return false end 21 | 22 | count_env_points = reaper.CountEnvelopePoints(env) 23 | 24 | for i = 0, count_env_points do 25 | local retval, time, value, shape, tension, selected = reaper.GetEnvelopePoint( env, i ) 26 | if selected then 27 | reaper.AddProjectMarker(0, false, time, 0, value, -1) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /Regions/X-Raym_Add italic markup to current region name.eel: -------------------------------------------------------------------------------- 1 | // Add italic markup to current region name 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 13-01-2015 9 | // Version : 1.1 10 | // Version Date : 19-01-2015 11 | // Required : Reaper 4.76 12 | 13 | // ----- DEBUGGING ====> 14 | @import ../Functions/X-Raym_Functions - console debug messages.eel 15 | 16 | debug = 0; // 0 => No console. 1 => Display console messages for debugging. 17 | clean = 0; // 0 => No console cleaning before every script execution. 1 => Console cleaning before every script execution. 18 | 19 | msg_clean(); 20 | // <==== DEBUGGING ----- 21 | 22 | function add_musical_notes_to_region() 23 | ( 24 | msg_s("=====>"); 25 | msg_s("INSTRUCTIONS : Be sure to have the cursor inside a region."); 26 | msg_s("-----"); 27 | 28 | time = GetCursorPosition(); 29 | msg_s("Cursor Position:"); 30 | msg_f(time); 31 | msg_s("-----"); 32 | 33 | GetLastMarkerAndCurRegion(NULL, time, markeridxOut, regionidxOut); 34 | EnumProjectMarkers(regionidxOut, isRegion_b, currentRegionStart_d, currentRegionEnd_d, #name_str, currentRegionID_int); 35 | currentRegionName = #name_str; 36 | currentRegionName_str = sprintf(#dest3, "%s", currentRegionName); 37 | 38 | italicStart = ""; 39 | italicEnd = ""; 40 | merged_name = sprintf(#dest, "%s%s%s", italicStart, currentRegionName_str, italicEnd); 41 | 42 | SetProjectMarker(currentRegionID_int, 1, currentRegionStart_d, currentRegionEnd_d, merged_name); 43 | 44 | ); 45 | 46 | add_musical_notes_to_region(); 47 | -------------------------------------------------------------------------------- /Regions/X-Raym_Add musical notes to current region name.eel: -------------------------------------------------------------------------------- 1 | // Add musical notes to current region name 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 13-01-2015 9 | // Version : 1.1 10 | // Version Date : 19-01-2015 11 | // Required : Reaper 4.76 12 | 13 | // ----- DEBUGGING ====> 14 | @import ../Functions/X-Raym_Functions - console debug messages.eel 15 | 16 | debug = 0; // 0 => No console. 1 => Display console messages for debugging. 17 | clean = 0; // 0 => No console cleaning before every script execution. 1 => Console cleaning before every script execution. 18 | 19 | msg_clean(); 20 | // <==== DEBUGGING ----- 21 | 22 | function add_musical_notes_to_region() 23 | ( 24 | msg_s("=====>"); 25 | msg_s("INSTRUCTIONS : Be sure to have the cursor inside a region."); 26 | msg_s("-----"); 27 | 28 | time = GetCursorPosition(); 29 | msg_s("Cursor Position:"); 30 | msg_f(time); 31 | msg_s("-----"); 32 | 33 | GetLastMarkerAndCurRegion(NULL, time, markeridxOut, regionidxOut); 34 | EnumProjectMarkers(regionidxOut, isRegion_b, currentRegionStart_d, currentRegionEnd_d, #name_str, currentRegionID_int); 35 | currentRegionName = #name_str; 36 | currentRegionName_str = sprintf(#dest3, "%s", currentRegionName); 37 | 38 | musicalNote = "♪"; 39 | separator = " "; 40 | merged_name = sprintf(#dest, "%s%s%s%s%s", musicalNote, separator, currentRegionName_str, separator, musicalNote); 41 | 42 | SetProjectMarker(currentRegionID_int, 1, currentRegionStart_d, currentRegionEnd_d, merged_name); 43 | 44 | ); 45 | 46 | add_musical_notes_to_region(); -------------------------------------------------------------------------------- /Regions/X-Raym_Create named marker X seconds after last item end.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Create named marker X seconds after last item end 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2019-11-07) 15 | + Initial Release 16 | --]] 17 | 18 | name = "" 19 | offset = 10 20 | 21 | function main() 22 | 23 | count_sel_items = reaper.CountSelectedMediaItems(0) 24 | 25 | if count_sel_items > 0 then 26 | 27 | -- GET ITEMS 28 | item = reaper.GetSelectedMediaItem(0, count_sel_items-1) -- Get selected item i 29 | 30 | item_pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION") 31 | item_len = reaper.GetMediaItemInfo_Value(item, "D_LENGTH") 32 | 33 | take = reaper.GetActiveTake(item) 34 | if take == nil then 35 | item_color = reaper.GetDisplayedMediaItemColor(item) 36 | else 37 | item_color = reaper.GetDisplayedMediaItemColor2(item, take) 38 | end 39 | 40 | snap = item_pos + item_len + offset 41 | reaper.AddProjectMarker2(0, false, snap, 0, name, -1, item_color) 42 | 43 | end -- ENDLOOP through selected items 44 | 45 | end 46 | 47 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 48 | 49 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 50 | 51 | main() -- Execute your main function 52 | 53 | reaper.Undo_EndBlock("Create named marker X seconds after last item end", -1) -- End of the undo block. Leave it at the bottom of your main function. 54 | 55 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. 56 | 57 | reaper.UpdateArrange() -- Update the arrangement (often needed) 58 | -------------------------------------------------------------------------------- /Regions/X-Raym_Split region under cursor.eel: -------------------------------------------------------------------------------- 1 | // Split region under cursor 2 | // EEL Script for Reaper 3 | // Author : X-Raym 4 | // Author URI : https://www.extremraym.com 5 | // Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | // Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts 7 | // Licence : GPL v3 8 | // Release Date : 04-01-2015 9 | // Version : 1.2 10 | // Version Date : 22-12-2017 11 | // Required : Reaper 4.76 12 | 13 | function split_two_regions() 14 | ( 15 | 16 | CountProjectMarkers(NULL, num_markersOut, num_regionsOut); 17 | desired_region_id = num_regionsOut; 18 | 19 | time = GetCursorPosition(); 20 | 21 | GetLastMarkerAndCurRegion(NULL, time, markeridxOut, regionidxOut); 22 | 23 | EnumProjectMarkers3(0, regionidxOut, isrgn, RegionStart_d, RegionEnd_d, #name_str, markrgnIndexNumber_int, color_int); 24 | 25 | time < RegionEnd_d ? 26 | 27 | SetProjectMarker3( 0, markrgnIndexNumber_int, 1, RegionStart_d, time, #name_str, color_int); 28 | 29 | AddProjectMarker2( 0, 1, time, RegionEnd_d, #name_str, desired_region_id, color_int); 30 | 31 | ); 32 | 33 | split_two_regions(); 34 | -------------------------------------------------------------------------------- /Regions/X-Raym_Swap regions names and subtitles preserving break lines.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Swap regions names and subtitles preserving break lines 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | ]] 11 | 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2022-02-20) 16 | + Initial Release 17 | ]] 18 | 19 | function main() 20 | 21 | -- LOOP IN REGIONS 22 | i=0 23 | repeat 24 | 25 | retval, isrgn, pos, rgnend, name, markrgnindex, color = reaper.EnumProjectMarkers3(0, i) 26 | notes = reaper.NF_GetSWSMarkerRegionSub( i ) 27 | 28 | notes = notes:gsub("\n", "
") 29 | name = name:gsub("
", "\n") 30 | 31 | reaper.NF_SetSWSMarkerRegionSub( name,i ) 32 | if notes and notes ~= "" then 33 | reaper.SetProjectMarker3( 0, markrgnindex, isrgn, pos, rgnend, notes, color ) 34 | else 35 | reaper.SetProjectMarker4( 0, markrgnindex, isrgn, pos, rgnend, notes, color, 1 ) -- Clear region name: https://forums.cockos.com/showthread.php?p=1888945 36 | end 37 | 38 | 39 | i = i+1 40 | until retval == 0 -- end loop regions and markers 41 | 42 | end 43 | 44 | -- RUN 45 | if not reaper.ULT_SetMediaItemNote then 46 | reaper.ShowConsoleMsg("SWS extension is required by this script.\nHowever, it doesn't seem to be present for this REAPER installation.\n\nDownload it here:\nhttp://www.sws-extension.org/download/") 47 | return false 48 | end 49 | 50 | reaper.PreventUIRefresh(1) 51 | 52 | reaper.Undo_BeginBlock() -- Begin undo group 53 | 54 | main() 55 | 56 | reaper.Undo_EndBlock("Swap regions names and subtitles preserving break lines", -1) -- End undo group 57 | 58 | reaper.TrackList_AdjustWindows(false) 59 | 60 | reaper.PreventUIRefresh(-1) 61 | 62 | 63 | -------------------------------------------------------------------------------- /Regions/X-Raym_Uppercase first letter or each regions.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set parents tracks names to uppercase and childs ones to camelcase 3 | * About: A way to reveal Parents and Childs tracks by their name 4 | * Screenshot: http://i.giphy.com/l41lMgnQVFZp2qfjW.gif 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Tracks Names (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1581214 12 | * REAPER: 5.0 13 | * Version: 2.0 14 | * Provides: 15 | * [nomain] ../Functions/utf8.lua 16 | * [nomain] ../Functions/utf8data.lua 17 | ]] 18 | 19 | 20 | --[[ 21 | * Changelog: 22 | * v2.0 (2019-03-01) 23 | + UTF-8 support 24 | * v1.0 (2015-10-07) 25 | + Initial Release 26 | ]] 27 | 28 | local info = debug.getinfo(1,'S'); 29 | script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] 30 | dofile(script_path .. "../Functions/utf8.lua") 31 | dofile(script_path .. "../Functions/utf8data.lua") 32 | 33 | function main() 34 | 35 | reaper.Undo_BeginBlock() -- Begin undo group 36 | 37 | 38 | -- LOOP IN REGIONS 39 | i=0 40 | repeat 41 | 42 | retval, isrgn, pos, rgnend, name, markrgnindex, color = reaper.EnumProjectMarkers3(0, i) 43 | 44 | 45 | name = utf8upper( utf8.sub(name, 0, 1) ) .. utf8.sub(name, 2, utf8.len(name) ) 46 | reaper.SetProjectMarker3( 0,markrgnindex, isrgn, pos, rgnend, name, color ) 47 | 48 | 49 | i = i+1 50 | 51 | until retval == 0 -- end loop regions and markers 52 | 53 | reaper.Undo_EndBlock("Set parents tracks names to uppercase and childs ones to camelcase", -1) -- End undo group 54 | 55 | end 56 | 57 | -- RUN 58 | 59 | 60 | reaper.PreventUIRefresh(1) 61 | 62 | main() 63 | 64 | reaper.TrackList_AdjustWindows(false) 65 | 66 | reaper.PreventUIRefresh(-1) 67 | 68 | 69 | -------------------------------------------------------------------------------- /Templates/Script Preset/X-Raym_Parent script of preset script_template.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Parent script of preset script 3 | * About: For devs 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.3 10 | * Provides: 11 | * [nomain] . 12 | * [nomain] README.md 13 | --]] 14 | 15 | -- USER CONFIG AREA ------------------------------------------------------ 16 | 17 | -- Use Preset Script for safe moding or to create a new action with your own values 18 | -- https://github.com/X-Raym/REAPER-ReaScripts/tree/master/Templates/Script%20Preset 19 | 20 | -- Typical global variables names. This will be out global variables which could be altered in the preset file. 21 | popup = false 22 | console = false 23 | 24 | link = "https://github.com/X-Raym/REAPER-ReaScripts/Templates/Script%20Preset/README.md" 25 | 26 | -------------------------------------------------- END OF USER CONFIG AREA 27 | function Open_URL(url) 28 | local OS = OS or reaper.GetOS() 29 | if OS=="OSX32" or OS=="OSX64" then 30 | os.execute("open ".. url) 31 | else 32 | os.execute("start \"\" \"".. url .. "\"") 33 | end 34 | end 35 | 36 | function Init() -- The Init function of the script. 37 | local retval = reaper.MB( "This script is a template.\nDo you want to open the doc?", "Info", 1) 38 | if retval == 1 then 39 | Open_URL( link ) 40 | end 41 | end 42 | 43 | if not preset_file_init then -- If the file is run directly, it will execute Init(), else it will wait for Init() to be called explicitely from the preset scripts (usually after having modified some global variable states). 44 | Init() 45 | end 46 | -------------------------------------------------------------------------------- /Tempo and Time Signature/X-Raym_Delete all tempo markers.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Delete all tempo markers 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Feature Action: Clear Tempo Envelope. 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1514132 10 | * REAPER: 5 pre 17 11 | * Version: 1.1 12 | */ 13 | 14 | /** 15 | * Changelog: 16 | * v1.1 (2017-05-30) 17 | # Various fixes (Thanks MPL !) 18 | * v1.0 (2015-04-24) 19 | + Initial Release 20 | */ 21 | 22 | // ----- DEBUGGING ====> 23 | /*@import ../Functions/X-Raym_Functions - console debug messages.eel 24 | 25 | debug = 1; // 0 => No console. 1 => Display console messages for debugging. 26 | clean = 1; // 0 => No console cleaning before every script execution. 1 => Console cleaning before every script execution. 27 | 28 | msg_clean();*/ 29 | // <==== DEBUGGING ----- 30 | 31 | function main() // local (i, j, item, take, track) 32 | ( 33 | Undo_BeginBlock(); // Begining of the undo block. Leave it at the top of your main function. 34 | count_tempo_markers = CountTempoTimeSigMarkers(0); 35 | i = count_tempo_markers; 36 | loop(count_tempo_markers, 37 | DeleteTempoTimeSigMarker(0, i); 38 | i-=1; 39 | ); 40 | 41 | // YOUR CODE ABOVE 42 | 43 | Undo_EndBlock("Delete all tempo markers", 0); // End of the undo block. Leave it at the bottom of your main function. 44 | ); 45 | 46 | //msg_start(); // Display characters in the console to show you the begining of the script execution. 47 | 48 | main(); // Execute your main function 49 | 50 | UpdateArrange(); // Update the arrangement (often needed) 51 | UpdateTimeline() 52 | //msg_end(); // Display characters in the console to show you the end of the script execution. 53 | -------------------------------------------------------------------------------- /Tempo and Time Signature/X-Raym_Round all tempo markers BPM.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Round all tempo markers BPM 3 | * About: Tempo markers imported from another app at 109.98 BPM instead of 110? This script is for you! 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | ]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2017-07-16) 16 | + Update 17 | * v0.9 (2016-11-16) 18 | + Initial Release 19 | ]] 20 | 21 | reaper.PreventUIRefresh(1) 22 | 23 | reaper.Undo_BeginBlock() 24 | 25 | for ptidx = 0, reaper.CountTempoTimeSigMarkers( 0 ) - 1 do 26 | local retval, timepos, measurepos, beatpos, bpm, timesig_num, timesig_denom, lineartempo = reaper.GetTempoTimeSigMarker( 0, ptidx ) 27 | --TIMEPOS HAVE TO BE ADJUSTED 28 | bpm = math.floor( bpm + 0.5 ) 29 | reaper.SetTempoTimeSigMarker( 0, ptidx, timepos, measurepos, beatpos, bpm, timesig_num, timesig_denom, lineartempo ) 30 | end 31 | 32 | reaper.UpdateArrange() 33 | reaper.UpdateTimeline() 34 | 35 | reaper.Undo_EndBlock( "Round all tempo markers BPM", -1 ) 36 | 37 | reaper.PreventUIRefresh(-1) 38 | -------------------------------------------------------------------------------- /Text Items and Item Notes/Formatting/X-Raym_Delete selected items notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Delete selected items notes 3 | * About: Delete selected items notes 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts (LUA): Text Items Formatting Actions (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?t=156757 12 | * REAPER: 5.0 pre 15 13 | * Extensions: SWS/S&M 2.7.3 #0 14 | * Version: 1.1 15 | --]] 16 | 17 | --[[ 18 | * Changelog: 19 | * v1.1 (2015-07-29) 20 | # Better Set Notes 21 | * v1.0 (2015-03-03) 22 | + Initial Release 23 | --]] 24 | 25 | 26 | function delete() 27 | 28 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 29 | 30 | 31 | -- LOOP THROUGH SELECTED ITEMS 32 | selected_items_count = reaper.CountSelectedMediaItems(0) 33 | 34 | -- INITIALIZE loop through selected items 35 | for i = 0, selected_items_count-1 do 36 | -- GET ITEMS 37 | item = reaper.GetSelectedMediaItem(0, i) -- Get selected item i 38 | 39 | -- MODIFY NOTES 40 | note = "" 41 | 42 | -- SET NOTES 43 | reaper.ULT_SetMediaItemNote(item, note) 44 | 45 | 46 | end -- ENDLOOP through selected items 47 | 48 | reaper.Undo_EndBlock("Delete selected items notes", 0) -- End of the undo block. Leave it at the bottom of your main function. 49 | 50 | end 51 | 52 | 53 | 54 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 55 | 56 | delete() -- Execute your main function 57 | 58 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. 59 | 60 | reaper.UpdateArrange() -- Update the arrangement (often needed) 61 | 62 | -------------------------------------------------------------------------------- /Text Items and Item Notes/Formatting/X-Raym_Lowercase selected items notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Lowercase selected items notes 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | ]] 11 | 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2023-03-02) 16 | + Initial Release 17 | ]] 18 | 19 | local info = debug.getinfo(1,'S'); 20 | script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] 21 | dofile(script_path .. "../../Functions/utf8.lua") 22 | dofile(script_path .. "../../Functions/utf8data.lua") 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begin undo group 27 | 28 | 29 | for i = 0, count_sel_items - 1 do 30 | 31 | item = reaper.GetSelectedMediaItem( 0, i) 32 | notes = reaper.ULT_GetMediaItemNote( item ) 33 | reaper.ULT_SetMediaItemNote( item, utf8lower( notes ) ) 34 | 35 | end 36 | 37 | reaper.Undo_EndBlock("Lowercase selected items notes", -1) -- End undo group 38 | 39 | end 40 | 41 | -- RUN 42 | 43 | count_sel_items = reaper.CountSelectedMediaItems( 0 ) 44 | 45 | if count_sel_items > 0 then 46 | 47 | reaper.PreventUIRefresh(1) 48 | 49 | main() 50 | 51 | reaper.UpdateArrange() 52 | 53 | reaper.PreventUIRefresh(-1) 54 | 55 | end 56 | -------------------------------------------------------------------------------- /Text Items and Item Notes/Formatting/X-Raym_Uppercase selected items notes.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Uppercase selected items notes 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 2.0.3 10 | ]] 11 | 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2022-02-08) 16 | + Initial Release 17 | ]] 18 | 19 | local info = debug.getinfo(1,'S'); 20 | script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] 21 | dofile(script_path .. "../../Functions/utf8.lua") 22 | dofile(script_path .. "../../Functions/utf8data.lua") 23 | 24 | function main() 25 | 26 | reaper.Undo_BeginBlock() -- Begin undo group 27 | 28 | 29 | for i = 0, count_sel_items - 1 do 30 | 31 | item = reaper.GetSelectedMediaItem( 0, i) 32 | notes = reaper.ULT_GetMediaItemNote( item ) 33 | reaper.ULT_SetMediaItemNote( item, utf8upper( notes ) ) 34 | 35 | end 36 | 37 | reaper.Undo_EndBlock("Uppercase selected items notes", -1) -- End undo group 38 | 39 | end 40 | 41 | -- RUN 42 | 43 | count_sel_items = reaper.CountSelectedMediaItems( 0 ) 44 | 45 | if count_sel_items > 0 then 46 | 47 | reaper.PreventUIRefresh(1) 48 | 49 | main() 50 | 51 | reaper.UpdateArrange() 52 | 53 | reaper.PreventUIRefresh(-1) 54 | 55 | end 56 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Invert master track stereo left right width.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Invert master track stereo left right width 3 | * About: Invert selected track pan (don't support enveloppe). 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Script: Invert selected tracks pan 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1482050#post1482050 11 | * REAPER: 4.76 12 | * Version: 1.0 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1.0 (2015-05-30) 18 | + Initial Release 19 | */ 20 | 21 | // ----- DEBUGGING ====> 22 | /*@import ../Functions/X-Raym_Functions - console debug messages.eel 23 | 24 | debug = 0; // 0 => No console. 1 => Display console messages for debugging. 25 | clean = 0; // 0 => No console cleaning before every script execution. 1 => Console cleaning before every script execution. 26 | 27 | msg_clean();*/ 28 | // <==== DEBUGGING ----- 29 | 30 | function main() // local (i, j, item, take, track) 31 | ( 32 | Undo_BeginBlock(); // Begining of the undo block. Leave it at the top of your main function. 33 | 34 | track = GetMasterTrack(0); 35 | width_initial = GetMediaTrackInfo_Value(track, "D_WIDTH"); 36 | width_output = - width_initial; 37 | SetMediaTrackInfo_Value(track, "D_WIDTH", width_output); 38 | 39 | Undo_EndBlock("Invert master track stereo left right width", 0); // End of the undo block. Leave it at the bottom of your main function. 40 | ); 41 | 42 | //msg_start(); // Display characters in the console to show you the begining of the script execution. 43 | 44 | PreventUIRefresh(1); 45 | 46 | main(); // Execute your main function 47 | 48 | UpdateArrange(); // Update the arrangement (often needed) 49 | 50 | PreventUIRefresh(-1); 51 | //msg_end(); // Display characters in the console to show you the end of the script execution. 52 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Rename selected track sends based on their source track name.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Rename selected track sends based on their source track name 3 | * Instructions: Select tracks. Run. 4 | * About: Sponored by Dan Stanley 5 | * Screenshot: https://i.imgur.com/RXSUmi6.gifv 6 | * Author: X-Raym 7 | * Author URI: https://www.extremraym.com 8 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 9 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 10 | * Licence: GPL v3 11 | * Forum Thread: Scripts: Track Properties (various) 12 | * Forum Thread URI: https://forum.cockos.com/showthread.php?t=166157 13 | * Extensions: SWS 2.9.6 14 | * Version: 1.0 15 | --]] 16 | 17 | --[[ 18 | * Changelog: 19 | * v1.0 (2018-06-06) 20 | + Initial Release 21 | --]] 22 | 23 | -- ------ USER CONFIG AREA =====> 24 | 25 | sep = " - " 26 | 27 | -- <===== USER CONFIG AREA ------ 28 | 29 | function main() 30 | 31 | for i = 0, tracks_count - 1 do 32 | local track = reaper.GetSelectedTrack(0, i) 33 | local track_name_retval, track_name = reaper.GetSetMediaTrackInfo_String(track, "P_NAME", '', false) 34 | local num_send = reaper.GetTrackNumSends( track, 0 ) 35 | for j = 0, num_send - 1 do 36 | local send_track = reaper.BR_GetMediaTrackSendInfo_Track( track, 0, j, 1 ) 37 | local _, send_track_name = reaper.GetSetMediaTrackInfo_String(send_track, "P_NAME", track_name .. sep .. (j + 1), true) 38 | end 39 | end 40 | 41 | end 42 | 43 | -- INIT 44 | tracks_count = reaper.CountSelectedTracks(0) 45 | 46 | if tracks_count > 0 then 47 | 48 | reaper.PreventUIRefresh(1) 49 | 50 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 51 | 52 | main() 53 | 54 | reaper.Undo_EndBlock("Rename selected track sends based on their source track name", -1) -- End of the undo block. Leave it at the bottom of your main function. 55 | 56 | reaper.PreventUIRefresh(-1) 57 | 58 | end 59 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Reset all tracks to default TCP height.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Reset all tracks to last global TCP height 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Track Selection (various) 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 10 | * REAPER: 5.0 11 | * Version: 1.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2016-02-11) 17 | + Initial Release 18 | --]] 19 | 20 | 21 | function main() 22 | 23 | -- LOOP TRHOUGH SELECTED TRACKS 24 | for i = 0, tracks_count - 1 do 25 | -- GET THE TRACK 26 | local track = reaper.GetTrack(0, i) -- Get selected track i 27 | 28 | reaper.SetMediaTrackInfo_Value(track, "I_HEIGHTOVERRIDE", 0) 29 | 30 | end -- ENDLOOP through selected tracks 31 | 32 | end 33 | 34 | 35 | -- INIT 36 | 37 | tracks_count = reaper.CountTracks(0) 38 | 39 | if tracks_count > 0 then 40 | 41 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 42 | 43 | reaper.PreventUIRefresh(1) 44 | 45 | main() -- Execute your main function 46 | 47 | reaper.TrackList_AdjustWindows(true) -- Update the arrangement (often needed) 48 | 49 | reaper.UpdateArrange() 50 | 51 | reaper.PreventUIRefresh(-1) 52 | 53 | reaper.Undo_EndBlock("Reset all tracks to last global TCP height", -1) -- End of the undo block. Leave it at the bottom of your main function. 54 | 55 | end 56 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Save all tracks visibility.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Save all tracks visibility 3 | * About: A script to save tracks visibility. Use the restore version of this script after. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Scripts: Track Selection (various) 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 11 | * REAPER: 5.0 12 | * Version: 2.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v2.0 (2019-04-26) 18 | # Use track GUID to avoid lots of bugs with track reordering, addition, etc... 19 | * v1.0 (2016-01-28) 20 | + Initial Release 21 | --]] 22 | 23 | function main() 24 | 25 | -- Delete Previous Save 26 | reaper.SetProjExtState(0, "Track_Visibility", "", "", "") 27 | 28 | -- Loop in Tracks 29 | for i = 0, count_tracks - 1 do 30 | 31 | local track = reaper.GetTrack(0, i) 32 | 33 | guid = reaper.GetTrackGUID( track ) 34 | 35 | tcp_visibility = reaper.GetMediaTrackInfo_Value(track, "B_SHOWINTCP") 36 | mcp_visibility = reaper.GetMediaTrackInfo_Value(track, "B_SHOWINMIXER") 37 | 38 | tcp_visibility = math.floor(tcp_visibility) 39 | mcp_visibility = math.floor(mcp_visibility) 40 | 41 | reaper.SetProjExtState(0, "Track_Visibility", guid, tcp_visibility .. "," .. mcp_visibility) 42 | 43 | end 44 | 45 | end 46 | 47 | count_tracks = reaper.CountTracks(0) 48 | 49 | if count_tracks > 0 then 50 | reaper.defer(main) 51 | end 52 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select next visible track only with conditional solo exclusive.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Select next visible track only with conditional solo exclusive 3 | * Instructions: Run. Run again to stop it. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: 10 | * Forum Thread URI: 11 | * REAPER: 5 pre 21 12 | * Version: 1 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1 (2015-04-18) 18 | + Initial release 19 | */ 20 | 21 | function solo() local(track, i) ( 22 | 23 | new_track = GetLastTouchedTrack(); 24 | SetMediaTrackInfo_Value(GetLastTouchedTrack(), "I_SOLO", 1); 25 | 26 | i=0; 27 | loop(CountTracks(0), 28 | track = GetTrack(0, i); 29 | track != new_track ? ( 30 | SetMediaTrackInfo_Value(track, "I_SOLO", 0); 31 | ); 32 | i+=1; 33 | ); 34 | ); 35 | 36 | function next() ( 37 | GetMediaTrackInfo_Value(GetLastTouchedTrack(), "I_SOLO") == 0 ? ( 38 | Main_OnCommand(40285, 0); 39 | ):( 40 | Main_OnCommand(40285, 0); 41 | solo(); 42 | ); 43 | ); 44 | 45 | Undo_BeginBlock(); 46 | PreventUIRefresh(1); 47 | next(); 48 | PreventUIRefresh(-1); 49 | Undo_EndBlock("Select next visible track only with conditional solo exclusive", -1); -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select only tracks with Latch automation mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select only tracks with Latch automation mode 3 | * About: A template script for REAPER ReaScript. 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Track Selection (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-09-07) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_AUTOMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 4 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | else 40 | 41 | reaper.SetTrackSelected(track, false) 42 | 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | reaper.Undo_EndBlock("Select only tracks with Latch automation mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 48 | 49 | end 50 | 51 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | 57 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select only tracks with Read automation mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select only tracks with Read automation mode 3 | * About: A template script for REAPER ReaScript. 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Track Selection (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-09-07) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_AUTOMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 1 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | else 40 | 41 | reaper.SetTrackSelected(track, false) 42 | 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | reaper.Undo_EndBlock("Select only tracks with Read automation mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 48 | 49 | end 50 | 51 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | 57 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select only tracks with Touch automation mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select only tracks with Touch automation mode 3 | * About: A template script for REAPER ReaScript. 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Track Selection (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-09-07) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_AUTOMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 2 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | else 40 | 41 | reaper.SetTrackSelected(track, false) 42 | 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | reaper.Undo_EndBlock("Select only tracks with Touch automation mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 48 | 49 | end 50 | 51 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | 57 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select only tracks with Trim automation mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select only tracks with Trim automation mode 3 | * About: A template script for REAPER ReaScript. 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Track Selection (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-09-07) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_AUTOMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 0 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | else 40 | 41 | reaper.SetTrackSelected(track, false) 42 | 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | reaper.Undo_EndBlock("Select only tracks with Trim automation mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 48 | 49 | end 50 | 51 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | 57 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select only tracks with Write automation mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select only tracks with Write automation mode 3 | * About: A template script for REAPER ReaScript. 4 | * Instructions: Here is how to use it. (optional) 5 | * Author: X-Raym 6 | * Author URI: https://www.extremraym.com 7 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 8 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 9 | * Licence: GPL v3 10 | * Forum Thread: Scripts: Track Selection (various) 11 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 12 | * REAPER: 5.0 13 | * Version: 1.0 14 | --]] 15 | 16 | --[[ 17 | * Changelog: 18 | * v1.0 (2015-09-07) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_AUTOMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 3 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | else 40 | 41 | reaper.SetTrackSelected(track, false) 42 | 43 | end 44 | 45 | end -- ENDLOOP through selected tracks 46 | 47 | reaper.Undo_EndBlock("Select only tracks with Write automation mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 48 | 49 | end 50 | 51 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 52 | 53 | main() -- Execute your main function 54 | 55 | reaper.UpdateArrange() -- Update the arrangement (often needed) 56 | 57 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select previous visible track only with conditional solo exclusive.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Select previous visible track only with conditional solo exclusive 3 | * Instructions: Run. Run again to stop it. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: 10 | * Forum Thread URI: 11 | * REAPER: 5 pre 21 12 | * Version: 1 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1 (2015-04-18) 18 | + Initial release 19 | */ 20 | 21 | function solo() local(track, i) ( 22 | 23 | new_track = GetLastTouchedTrack(); 24 | SetMediaTrackInfo_Value(GetLastTouchedTrack(), "I_SOLO", 1); 25 | 26 | i=0; 27 | loop(CountTracks(0), 28 | track = GetTrack(0, i); 29 | track != new_track ? ( 30 | SetMediaTrackInfo_Value(track, "I_SOLO", 0); 31 | ); 32 | i+=1; 33 | ); 34 | ); 35 | 36 | function previous() ( 37 | GetMediaTrackInfo_Value(GetLastTouchedTrack(), "I_SOLO") == 0 ? ( 38 | Main_OnCommand(40286, 0); 39 | ):( 40 | Main_OnCommand(40286, 0); 41 | solo(); 42 | ); 43 | ); 44 | 45 | Undo_BeginBlock(); 46 | PreventUIRefresh(1); 47 | previous(); 48 | PreventUIRefresh(-1); 49 | Undo_EndBlock("Select previous visible track only with conditional solo exclusive", -1); -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select reference tracks.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select reference tracks 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2024-03-13) 15 | + Initial release 16 | --]] 17 | 18 | undo_text = "Select reference tracks" 19 | select_exclusive = true 20 | 21 | function Main() 22 | for i = 0, count_all_tracks - 1 do 23 | local track = reaper.GetTrack(0, i) 24 | local retval, state = reaper.GetSetMediaTrackInfo_String( track, "P_EXT:XR_REF", "", false ) 25 | if select_exclusive and state ~= "REF" then 26 | reaper.SetTrackSelected( track, false ) 27 | end 28 | if state == "REF" then 29 | reaper.SetTrackSelected( track, true ) 30 | end 31 | end 32 | end 33 | 34 | function Init() 35 | count_all_tracks = reaper.CountTracks( 0 ) 36 | if count_all_tracks == 0 then return end 37 | 38 | reaper.PreventUIRefresh( 1 ) 39 | 40 | reaper.Undo_BeginBlock() 41 | 42 | Main() 43 | 44 | reaper.TrackList_AdjustWindows( false ) 45 | 46 | reaper.Undo_EndBlock( undo_text, 0 ) 47 | 48 | reaper.PreventUIRefresh( - 1 ) 49 | end 50 | 51 | if not preset_file_init then 52 | Init() 53 | end 54 | 55 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select track under mouse parent track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select track under mouse top level parent track 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Track Selection (various) 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 10 | * REAPER: 5.0 11 | * Version: 2.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2019-06-23) 17 | + Initial Release 18 | --]] 19 | 20 | function main() 21 | track, pos = reaper.BR_TrackAtMouseCursor() 22 | if track then 23 | parent = reaper.GetParentTrack( track ) 24 | if parent then 25 | reaper.SetOnlyTrackSelected( parent ) 26 | else 27 | reaper.SetOnlyTrackSelected( track ) 28 | end 29 | end 30 | end 31 | main() 32 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select track under mouse top level parent track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select track under mouse top level parent track 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Track Selection (various) 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 10 | * REAPER: 5.0 11 | * Version: 2.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2019-06-23) 17 | + Initial Release 18 | --]] 19 | 20 | function GetTopLevelParentTrack( track ) 21 | local parent = reaper.GetParentTrack( track ) 22 | if parent then 23 | track = GetTopLevelParentTrack( parent ) 24 | end 25 | return track 26 | end 27 | 28 | function main() 29 | track, pos = reaper.BR_TrackAtMouseCursor() 30 | if track then 31 | top_parent = GetTopLevelParentTrack( track ) 32 | reaper.SetOnlyTrackSelected( top_parent ) 33 | end 34 | end 35 | 36 | main() 37 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Select tracks with dual pan mode.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Select tracks with dual pan mode 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Track Selection (various) 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 10 | * REAPER: 5.0 11 | * Version: 1.0.1 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0.1 (2019-11-12) 17 | # Don't unselect other tracks 18 | * v1.0 (2019-11-12) 19 | + Initial Release 20 | --]] 21 | 22 | function main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | count_tracks = reaper.CountTracks(0) 27 | 28 | for i = 0, count_tracks - 1 do 29 | -- GET ITEMS 30 | track = reaper.GetTrack(0, i) 31 | 32 | track_mode = reaper.GetMediaTrackInfo_Value(track, "I_PANMODE") 33 | --(0=trim/off, 1=read, 2=touch, 3=write, 4=latch 34 | 35 | if track_mode == 6 then 36 | 37 | reaper.SetTrackSelected(track, true) 38 | 39 | end 40 | 41 | end -- ENDLOOP through selected tracks 42 | 43 | reaper.Undo_EndBlock("Select tracks with dual pan mode", -1) -- End of the undo block. Leave it at the bottom of your main function. 44 | 45 | end 46 | 47 | reaper.PreventUIRefresh(1) -- Prevent UI refreshing. Uncomment it only if the script works. 48 | 49 | main() -- Execute your main function 50 | 51 | reaper.UpdateArrange() -- Update the arrangement (often needed) 52 | 53 | reaper.PreventUIRefresh(-1) -- Restore UI Refresh. Uncomment it only if the script works. 54 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Set selected tracks as reference tracks.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set selected tracks as reference tracks 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2024-03-13) 15 | + Initial release 16 | --]] 17 | 18 | undo_text = "Set selected tracks as reference tracks" 19 | 20 | function Tooltip(message) -- DisplayTooltip() already taken by the GUI version 21 | local x, y = reaper.GetMousePosition() 22 | reaper.TrackCtl_SetToolTip( tostring(message), x+17, y+17, false ) 23 | end 24 | 25 | function Main() 26 | local names = {} 27 | for i = 0, count_all_tracks - 1 do 28 | local track = reaper.GetTrack(0, i) 29 | local state = "" 30 | if reaper.IsTrackSelected( track ) then 31 | state = "REF" 32 | local retval, name = reaper.GetTrackName(track) 33 | table.insert( names, i+1 .. ". " .. name ) 34 | end 35 | local retval, str = reaper.GetSetMediaTrackInfo_String( track, "P_EXT:XR_REF", state, true ) 36 | end 37 | 38 | count_sel_tracks = reaper.CountSelectedTracks( 0 ) 39 | if count_sel_tracks == 0 then 40 | Tooltip("Reference tracks unset") 41 | else 42 | Tooltip("Reference tracks:\n" .. table.concat( names, "\n") ) 43 | end 44 | end 45 | 46 | function Init() 47 | count_all_tracks = reaper.CountTracks( 0 ) 48 | if count_all_tracks == 0 then return end 49 | 50 | reaper.PreventUIRefresh( 1 ) 51 | 52 | reaper.Undo_BeginBlock() 53 | 54 | Main() 55 | 56 | reaper.TrackList_AdjustWindows( false ) 57 | 58 | reaper.Undo_EndBlock( undo_text, 0 ) 59 | 60 | reaper.PreventUIRefresh( - 1 ) 61 | end 62 | 63 | if not preset_file_init then 64 | Init() 65 | end 66 | 67 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Set track under mouse as last touched.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set track under mouse as last touched 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Track Selection (various) 9 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 10 | * REAPER: 5.0 11 | * Version: 2.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2021-03-10) 17 | + Initial Release 18 | --]] 19 | 20 | -- SAVE INITIAL TRACKS SELECTION 21 | init_sel_tracks = {} 22 | local function SaveSelectedTracks (table) 23 | for i = 0, reaper.CountSelectedTracks(0)-1 do 24 | table[i+1] = reaper.GetSelectedTrack(0, i) 25 | end 26 | end 27 | 28 | -- RESTORE INITIAL TRACKS SELECTION 29 | local function RestoreSelectedTracks (table) 30 | reaper.Main_OnCommand( 40297 , 0) -- Track: Unselect all tracks 31 | for _, track in ipairs(table) do 32 | reaper.SetTrackSelected(track, true) 33 | end 34 | end 35 | 36 | function main() 37 | track, pos = reaper.BR_TrackAtMouseCursor() 38 | if track then 39 | reaper.SetOnlyTrackSelected( track ) -- this set last touched 40 | end 41 | end 42 | 43 | reaper.PreventUIRefresh(1) 44 | SaveSelectedTracks(init_sel_tracks) 45 | 46 | main() -- Execute your main function 47 | 48 | RestoreSelectedTracks(init_sel_tracks) 49 | reaper.UpdateArrange() -- Update the arrangement (often needed) 50 | reaper.PreventUIRefresh(-1) 51 | 52 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Solo exclusive selected tracks.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Solo exclusive selected tracks 3 | * Instructions: Run. Run again to stop it. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: 10 | * Forum Thread URI: 11 | * REAPER: 5 pre 21 12 | * Version: 1 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1 (2015-04-16) 18 | + Initial release 19 | */ 20 | 21 | function solo() local(track, i) ( 22 | i=0; 23 | loop(CountSelectedTracks(0), 24 | SetMediaTrackInfo_Value(GetSelectedTrack(0, i), "I_SOLO", 1); 25 | i+=1; 26 | ); 27 | 28 | i=0; 29 | loop(CountTracks(0), 30 | track = GetTrack(0, i); 31 | IsTrackSelected(track) == 0 ? ( 32 | SetMediaTrackInfo_Value(track, "I_SOLO", 0); 33 | ); 34 | i+=1; 35 | ); 36 | ); 37 | 38 | Undo_BeginBlock(); 39 | PreventUIRefresh(1); 40 | solo(); 41 | PreventUIRefresh(-1); 42 | Undo_EndBlock("Solo exclusive selected tracks", -1); -------------------------------------------------------------------------------- /Track Properties/X-Raym_Solo in place exclusive selected tracks.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Solo in place exclusive selected tracks 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | */ 11 | 12 | /** 13 | * Changelog: 14 | * v1.0 (2024-07-23) 15 | + Initial release 16 | */ 17 | 18 | function solo() local(track, i) ( 19 | i=0; 20 | loop(CountSelectedTracks(0), 21 | SetMediaTrackInfo_Value(GetSelectedTrack(0, i), "I_SOLO", 2); 22 | i+=1; 23 | ); 24 | 25 | i=0; 26 | loop(CountTracks(0), 27 | track = GetTrack(0, i); 28 | IsTrackSelected(track) == 0 ? ( 29 | SetMediaTrackInfo_Value(track, "I_SOLO", 0); 30 | ); 31 | i+=1; 32 | ); 33 | ); 34 | 35 | Undo_BeginBlock(); 36 | PreventUIRefresh(1); 37 | solo(); 38 | PreventUIRefresh(-1); 39 | Undo_EndBlock("Solo in place exclusive selected tracks", -1); -------------------------------------------------------------------------------- /Track Properties/X-Raym_Toggle selected tracks solo (no undo).lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Toggle selected tracks solo (no undo) 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2021-02-06) 16 | + Initial Release 17 | --]] 18 | 19 | function Main() 20 | reaper.PreventUIRefresh(1) 21 | count_sel_tracks = reaper.CountSelectedTracks(0) 22 | 23 | for i = 0, count_sel_tracks - 1 do 24 | local track = reaper.GetSelectedTrack(0,i) 25 | local solo = reaper.GetMediaTrackInfo_Value(track, "I_SOLO") 26 | if solo == 0 then solo = 1 else solo = 0 end 27 | reaper.SetMediaTrackInfo_Value(track, "I_SOLO",solo) 28 | end 29 | reaper.TrackList_AdjustWindows(false) 30 | reaper.UpdateArrange() 31 | reaper.PreventUIRefresh(-1) 32 | end 33 | reaper.defer(Main) 34 | -------------------------------------------------------------------------------- /Track Properties/X-Raym_Unhide - set visible tracks with items.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Unhide - set visible tracks with items 3 | * Instructions: https://i.imgur.com/qWRVINF.gifv 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: Scripts: Track Selection (various) 10 | * Forum Thread URI: http://forum.cockos.com/showthread.php?p=1569551 11 | * REAPER: 5.0 12 | * Version: 1.0 13 | --]] 14 | 15 | --[[ 16 | * Changelog: 17 | * v1.0 (2018-05-02) 18 | + Initial Release 19 | --]] 20 | 21 | tcp = true 22 | mcp = true 23 | 24 | console = false 25 | 26 | function Msg(variable) 27 | if console == true then 28 | reaper.ShowConsoleMsg(tostring(variable).."\n") 29 | end 30 | end 31 | 32 | function Main() 33 | 34 | -- Loop in Tracks 35 | for i = 0, count_tracks - 1 do 36 | 37 | local track = reaper.GetTrack(0, i) 38 | 39 | local num_items = reaper.CountTrackMediaItems( track ) 40 | 41 | if num_items > 0 then 42 | local tcp_visibility = reaper.GetMediaTrackInfo_Value(track, "B_SHOWINTCP") 43 | local mcp_visibility = reaper.GetMediaTrackInfo_Value(track, "B_SHOWINMIXER") 44 | console = true 45 | 46 | if tcp_visibility == 0 and tcp then reaper.SetMediaTrackInfo_Value(track, "B_SHOWINTCP", 1) end 47 | if mcp_visibility == 0 and mcp then reaper.SetMediaTrackInfo_Value(track, "B_SHOWINMIXER", 1) end 48 | end 49 | 50 | end 51 | 52 | end 53 | 54 | count_tracks = reaper.CountTracks(0) 55 | 56 | if count_tracks > 0 then 57 | reaper.PreventUIRefresh(1) 58 | reaper.Undo_BeginBlock() 59 | Main() 60 | reaper.TrackList_AdjustWindows(false) 61 | reaper.UpdateArrange() 62 | reaper.Undo_EndBlock('Unhide - set visible tracks with items', -1) 63 | reaper.PreventUIRefresh(-1) 64 | end 65 | -------------------------------------------------------------------------------- /Transport/X-Raym_Decrease master playrate by 05%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Decrease master playrate by 05% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | local playrate = reaper.Master_GetPlayRate( project ) 16 | reaper.CSurf_OnPlayRateChange( playrate - val / 100 ) 17 | reaper.Undo_EndBlock( "Decrease master playrate by " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Decrease master playrate by 10%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Decrease master playrate by 10% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | local playrate = reaper.Master_GetPlayRate( project ) 16 | reaper.CSurf_OnPlayRateChange( playrate - val / 100 ) 17 | reaper.Undo_EndBlock( "Decrease master playrate by " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Increase master playrate by 05%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Increase master playrate by 05% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | local playrate = reaper.Master_GetPlayRate( project ) 16 | reaper.CSurf_OnPlayRateChange( playrate + val / 100 ) 17 | reaper.Undo_EndBlock( "Increase master playrate by " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Increase master playrate by 10%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Increase master playrate by 10% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | local playrate = reaper.Master_GetPlayRate( project ) 16 | reaper.CSurf_OnPlayRateChange( playrate + val / 100 ) 17 | reaper.Undo_EndBlock( "Increase master playrate by " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Increase-Decrease master playrate by x%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Increase-Decrease master playrate by x% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | local info = debug.getinfo(1,'S'); 13 | local retval, val = reaper.GetUserInputs("Increase-Decrease master playrate by...", 1, "Speed (%)", "100") 14 | if retval then 15 | val = tonumber( val ) 16 | if val then 17 | reaper.Undo_BeginBlock() 18 | local playrate = reaper.Master_GetPlayRate( project ) 19 | reaper.CSurf_OnPlayRateChange( playrate + val / 100 ) 20 | reaper.Undo_EndBlock( "Increase-Decrease master playrate by " .. val .. "%", -1 ) 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /Transport/X-Raym_Name selected tracks with their track layout.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Name selected tracks with their track layout 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2021-05-31) 15 | # Initial release 16 | --]] 17 | 18 | reaper.PreventUIRefresh(1) 19 | reaper.Undo_BeginBlock() 20 | count_sel_tracks = reaper.CountSelectedTracks(0) 21 | for i = 0, count_sel_tracks - 1 do 22 | track = reaper.GetSelectedTrack(0,i) 23 | retval, layout = reaper.GetSetMediaTrackInfo_String( track, "P_TCP_LAYOUT", "", false ) 24 | name = layout .. " - " .. reaper.GetMediaTrackInfo_Value(track, "I_PANMODE") 25 | retval, str = reaper.GetSetMediaTrackInfo_String( track, "P_NAME", name, true ) 26 | end 27 | reaper.Undo_EndBlock("Name selected tracks with their track layout", -1) 28 | reaper.PreventUIRefresh(-1) -------------------------------------------------------------------------------- /Transport/X-Raym_Play from mouse cursor position and solo track under mouse for the duration - and select track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Play from mouse cursor position and solo track under mouse for the duration - and select track 3 | * About: Just like the SWS action (which it runs), but with no undo and select track under mouse. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | --]] 12 | 13 | function main() 14 | reaper.PreventUIRefresh(1) 15 | track, pos = reaper.BR_TrackAtMouseCursor() 16 | if track then 17 | if reaper.GetPlayState() > 0 then 18 | reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_TOGGLE_PLAY_MOUSE_SOLO_TRACK"),-1) 19 | end 20 | reaper.Main_OnCommand(40340, 0) 21 | reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_TOGGLE_PLAY_MOUSE_SOLO_TRACK"),-1) 22 | reaper.SetOnlyTrackSelected( track ) 23 | end 24 | reaper.PreventUIRefresh(-1) 25 | end 26 | 27 | if not reaper.BR_TrackAtMouseCursor then 28 | reaper.ShowMessageBox("Please install SWS extension", "Warning", 1) 29 | else 30 | reaper.defer(main) 31 | end 32 | 33 | -------------------------------------------------------------------------------- /Transport/X-Raym_Play from mouse cursor position and solo track under mouse parent and select track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Play from mouse cursor position and solo track under mouse for the duration - and select track 3 | * About: Just like the SWS action (which it runs), but with no undo and select track under mouse. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.2 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.2 (2019-07-14) 16 | + Snap to grid 17 | # no SWS dependency 18 | --]] 19 | 20 | function PlayFromMouse() 21 | local pos_init = reaper.GetCursorPosition() 22 | reaper.SetEditCurPos( pos, false, false ) 23 | reaper.OnPlayButton() 24 | reaper.SetEditCurPos( pos_init, false, false ) 25 | reaper.PreventUIRefresh(-1) 26 | end 27 | 28 | function main() 29 | reaper.PreventUIRefresh(1) 30 | track, context, pos = reaper.BR_TrackAtMouseCursor() 31 | if reaper.GetToggleCommandState( 1157 ) then 32 | pos = reaper.SnapToGrid( 0, pos ) 33 | end 34 | if track then 35 | parent = reaper.GetParentTrack( track ) 36 | if not parent then parent = track end 37 | count_tracks = reaper.CountTracks() 38 | for i = 0, count_tracks - 1 do 39 | reaper.SetMediaTrackInfo_Value( reaper.GetTrack(0,i), "I_SOLO", 0) 40 | end 41 | 42 | reaper.SetMediaTrackInfo_Value( parent, "I_SOLO", 1) 43 | reaper.SetOnlyTrackSelected( parent ) 44 | PlayFromMouse() 45 | end 46 | reaper.PreventUIRefresh(-1) 47 | end 48 | 49 | if not reaper.BR_TrackAtMouseCursor then 50 | reaper.ShowMessageBox("Please install SWS extension", "Warning", 1) 51 | else 52 | reaper.defer(main) 53 | end 54 | 55 | -------------------------------------------------------------------------------- /Transport/X-Raym_Record or stop and rename newly created items with clipboard content.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Record or stop and rename newly created items with clipboard content 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * Forum Thread: Scripts: Transport (various) 9 | * Forum Thread URI: https://forums.cockos.com/showthread.php?t=189701 10 | * REAPER: 5.0 11 | * Version: 1.0.1 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0.1 (2018-09-27) 17 | # Pause fix 18 | * v1.0 (2018-09-26) 19 | + Initial Release 20 | --]] 21 | 22 | function Main() 23 | 24 | play_state = reaper.GetPlayState() 25 | 26 | if play_state == 5 and reaper.CF_GetClipboard then -- Need SWS 27 | 28 | reaper.Main_OnCommand( 1013,0 ) -- Transport: Record 29 | 30 | clipboard = reaper.CF_GetClipboard('') 31 | 32 | if clipboard ~= "" then 33 | for i = 0, reaper.CountSelectedMediaItems(0) - 1 do 34 | local take = reaper.GetActiveTake( reaper.GetSelectedMediaItem(0, i) ) 35 | if take then 36 | reaper.GetSetMediaItemTakeInfo_String(take, "P_NAME", clipboard, true) 37 | end 38 | end 39 | end 40 | reaper.Main_OnCommand( 40073, 0 ) -- Transport: Play/pause 41 | reaper.Main_OnCommand( 1016, 0 ) -- Transport: Stop 42 | else 43 | reaper.Main_OnCommand( 1013,0 ) -- Transport: Record 44 | end 45 | 46 | end 47 | 48 | reaper.defer(Main) 49 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 150%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 150% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 200%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 200% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 25%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 25% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 30%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 30% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 40%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 40% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 50%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 50% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 60%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 60% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 70%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 70% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 75%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 75% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 80%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 80% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to 90%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to 90% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | reaper.Undo_BeginBlock() 13 | local info = debug.getinfo(1,'S'); 14 | local val = string.match(info.source, "%d+") 15 | 16 | reaper.CSurf_OnPlayRateChange( val / 100 ) 17 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 18 | -------------------------------------------------------------------------------- /Transport/X-Raym_Set master playrate to x%.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set master playrate to x% 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | local info = debug.getinfo(1,'S'); 13 | local retval, val = reaper.GetUserInputs("Set master playrate to...", 1, "Speed (%)", "100") 14 | if retval then 15 | val = tonumber( val ) 16 | if val then 17 | reaper.Undo_BeginBlock() 18 | reaper.CSurf_OnPlayRateChange( val / 100 ) 19 | reaper.Undo_EndBlock( "Set master playrate to " .. val .. "%", -1 ) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /Transport/X-Raym_Snap edit cursor to nearest grid if snap is enabled.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Snap edit cursor to nearest grid if snap is enabled 3 | * About: For custom action usage 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2019-07-14) 16 | + Initial release 17 | --]] 18 | 19 | function Main() 20 | local pos = reaper.GetCursorPosition() 21 | if reaper.GetToggleCommandState( 1157 ) then 22 | pos = reaper.SnapToGrid( 0, pos ) 23 | reaper.SetEditCurPos( pos, false, false ) 24 | end 25 | end 26 | 27 | Main() 28 | 29 | -------------------------------------------------------------------------------- /Transport/X-Raym_Solo exclusive track under mouse and play.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Solo exclusive track under mouse and play 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.2 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.2 (2019-07-14) 15 | + Snap to grid 16 | # no SWS dependency 17 | * v1.1 (2019-06-26) 18 | # Only check any track solo if needed 19 | * v1.0 (2019-06-26) 20 | + Initial Release 21 | --]] 22 | 23 | function Main() 24 | reaper.PreventUIRefresh(1) 25 | local solo_state = 1 26 | local track, context, pos = reaper.BR_TrackAtMouseCursor() 27 | if track then 28 | local solo = reaper.GetMediaTrackInfo_Value(track, "I_SOLO") 29 | if solo ~= solo_state then 30 | reaper.SetMediaTrackInfo_Value(track, "I_SOLO", solo_state) 31 | reaper.SetOnlyTrackSelected( track ) 32 | --if reaper.AnyTrackSolo() then 33 | local count_track = reaper.CountTracks(0) 34 | for i = 0, count_track - 1 do 35 | local tr = reaper.GetTrack(0,i) 36 | if tr ~= track and reaper.GetMediaTrackInfo_Value(tr, "I_SOLO") ~=0 then 37 | reaper.SetMediaTrackInfo_Value(tr, "I_SOLO", 0) 38 | end 39 | end 40 | --end 41 | end 42 | --reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_PLAY_MOUSECURSOR"),0) -- SWS/BR: Play from mouse cursor position 43 | if reaper.GetToggleCommandState( 1157 ) then 44 | pos = reaper.SnapToGrid( 0, pos ) 45 | end 46 | local pos_init = reaper.GetCursorPosition() 47 | reaper.SetEditCurPos( pos, false, false ) 48 | reaper.OnPlayButton() 49 | reaper.SetEditCurPos( pos_init, false, false ) 50 | reaper.PreventUIRefresh(-1) 51 | end 52 | end 53 | 54 | reaper.defer(Main) 55 | -------------------------------------------------------------------------------- /Transport/X-Raym_Solo in place exclusive track under mouse and play.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Solo in place exclusive track under mouse and play 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.2 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.2 (2019-07-14) 15 | + Snap to grid 16 | # no SWS dependency 17 | * v1.1 (2019-06-26) 18 | # Only check any track solo if needed 19 | * v1.0 (2019-06-26) 20 | + Initial Release 21 | --]] 22 | 23 | function Main() 24 | reaper.PreventUIRefresh(1) 25 | solo_state = 2 26 | local track, context, pos = reaper.BR_TrackAtMouseCursor() 27 | if track then 28 | local solo = reaper.GetMediaTrackInfo_Value(track, "I_SOLO") 29 | if solo ~= solo_state then 30 | reaper.SetMediaTrackInfo_Value(track, "I_SOLO", solo_state) 31 | reaper.SetOnlyTrackSelected( track ) 32 | --if reaper.AnyTrackSolo( 0 ) then 33 | local count_track = reaper.CountTracks(0) 34 | for i = 0, count_track - 1 do 35 | local tr = reaper.GetTrack(0,i) 36 | if tr ~= track and reaper.GetMediaTrackInfo_Value(tr, "I_SOLO") ~=0 then 37 | reaper.SetMediaTrackInfo_Value(tr, "I_SOLO", 0) 38 | end 39 | end 40 | --end 41 | end 42 | --reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_PLAY_MOUSECURSOR"),0) -- SWS/BR: Play from mouse cursor position 43 | if reaper.GetToggleCommandState( 1157 ) then 44 | pos = reaper.SnapToGrid( 0, pos ) 45 | end 46 | local pos_init = reaper.GetCursorPosition() 47 | reaper.SetEditCurPos( pos, false, false ) 48 | reaper.OnPlayButton() 49 | reaper.SetEditCurPos( pos_init, false, false ) 50 | reaper.PreventUIRefresh(-1) 51 | end 52 | end 53 | 54 | reaper.defer(Main) 55 | -------------------------------------------------------------------------------- /Transport/X-Raym_Toggle play from mouse cursor position and solo track under mouse for the duration - and select track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Toggle play from mouse cursor position and solo track under mouse for the duration - and select track 3 | * About: Just like the SWS action (which it runs), but with no undo and select track under mouse. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | --]] 12 | 13 | function main() 14 | 15 | track, pos = reaper.BR_TrackAtMouseCursor() 16 | if track then 17 | reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_TOGGLE_PLAY_MOUSE_SOLO_TRACK"),-1) 18 | reaper.SetOnlyTrackSelected( track ) 19 | end 20 | 21 | end 22 | 23 | if not reaper.BR_TrackAtMouseCursor then 24 | reaper.ShowMessageBox("Please install SWS extension", "Warning", 1) 25 | else 26 | reaper.defer(main) 27 | end 28 | 29 | -------------------------------------------------------------------------------- /Various/X-Raym_Copy filtered action names list to clipboard.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Copy filtered action names list to clipboard 3 | * About: Copy actions names to clipboard if they pass the filter. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 6.0 10 | * Version: 1.1 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.1 (2023-01-24) 16 | + Prevent duplicates 17 | + Sort table 18 | * v1.0 (2022-12-14) 19 | + Initial Release 20 | --]] 21 | 22 | contexts = { ["Main"] = 0, ["Main (alt recording)"]=100, ["MIDI Editor"] = 32060, ["MIDI Event List Editor"] = 32061, ["MIDI Inline Editor"] = 32062, ["Media Explorer"] = 32063 } 23 | 24 | lines = {} 25 | 26 | function Msg( val ) 27 | reaper.ShowConsoleMsg( tostring( val ) .. "\n" ) 28 | end 29 | 30 | function GetTableOfSortedKeys( t ) 31 | if not t or type(t) ~= "table" then return end 32 | local keys = {} 33 | for k, v in pairs( t ) do 34 | table.insert( keys, k ) 35 | end 36 | table.sort( keys ) 37 | return keys 38 | end 39 | 40 | function Main() 41 | for k, v in pairs( contexts ) do 42 | local i = 0 43 | repeat 44 | local retval, name = reaper.CF_EnumerateActions( v, i ) 45 | -- Filter actions starting with "beta_" or having "test" in their name 46 | if retval > 0 and not name:lower():find("beta_") and not name:lower():find("test") then 47 | lines[name] = true 48 | end 49 | i = i + 1 50 | until retval <= 0 51 | end 52 | 53 | reaper.CF_SetClipboard( table.concat( GetTableOfSortedKeys(lines), "\n" ) ) 54 | end 55 | 56 | if not reaper.CF_GetClipboard then 57 | reaper.ShowMessageBox( 'Please Install last SWS extension.', 'Missing Dependency', 0 ) 58 | return false 59 | end 60 | 61 | reaper.defer(Main) 62 | -------------------------------------------------------------------------------- /Various/X-Raym_Focus SWS Notes window.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Focus SWS Notes window 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2019-12-12) 15 | + Initial Release 16 | --]] 17 | 18 | local sws_notes_hwnd = reaper.JS_Window_Find( "Notes", true ) 19 | if sws_notes_hwnd then 20 | local sws_notes_edit_hwnd = reaper.JS_Window_FindChildByID(sws_notes_hwnd, 1096) 21 | if not sws_notes_edit_hwnd then return end 22 | reaper.JS_Window_SetFocus( sws_notes_edit_hwnd ) 23 | end 24 | -------------------------------------------------------------------------------- /Various/X-Raym_Intercept spacebar key_background.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Intercept spacebar key 3 | * About: Prevent usage of spacebar key while running (typically, to prevent end of recording). Scope is wide, it can deactivate spacebar on unwanted window. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 6.0 10 | * Version: 1.0 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2022-10-27) 16 | + Initial Release 17 | --]] 18 | 19 | 20 | keyCode = 0x20 -- SPACE -- https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes 21 | 22 | -- Set ToolBar Button State 23 | function SetButtonState( set ) 24 | local is_new_value, filename, sec, cmd, mode, resolution, val = reaper.get_action_context() 25 | reaper.SetToggleCommandState( sec, cmd, set or 0 ) 26 | reaper.RefreshToolbar2( sec, cmd ) 27 | end 28 | 29 | function Exit() 30 | SetButtonState() 31 | reaper.JS_VKeys_Intercept( keyCode, -1 ) 32 | end 33 | 34 | 35 | -- Main Function (which loop in background) 36 | function Main() 37 | 38 | if not first_run then 39 | reaper.JS_VKeys_Intercept( keyCode, 1 ) 40 | first_run = true 41 | end 42 | 43 | reaper.defer( Main ) 44 | 45 | end 46 | 47 | 48 | 49 | -- RUN 50 | SetButtonState( 1 ) 51 | Main() 52 | reaper.atexit( Exit ) 53 | -------------------------------------------------------------------------------- /Various/X-Raym_Move edit cursor to time 0 or to project start.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Move edit cursor to time 0 or to project start 3 | * About: Move edit cursor to time 0 if project start is negative or null. Move edit cursor to project start if project start is > 0. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Version: 2.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v2.0 (2022-01-30) 15 | + More accurate 16 | * v1.0 (2015-02-28) 17 | + Initial Release 18 | + Thanks to benf for the help on format_timestr_pos 19 | + Thanks to spk77 for his Clock.eel script 20 | --]] 21 | 22 | function Main() 23 | 24 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 25 | 26 | if reaper.GetPlayState() == 0 or reaper.GetPlayState == 2 then 27 | 28 | offset = reaper.GetProjectTimeOffset( 0, false ) 29 | 30 | reaper.SetEditCurPos( -offset, 1, 0 ) 31 | end 32 | 33 | reaper.Undo_EndBlock("Move edit cursor to time 0 or to project start", 0) -- End of the undo block. Leave it at the bottom of your main function. 34 | 35 | end 36 | 37 | Main() -- Execute your main function 38 | 39 | reaper.UpdateArrange() -- Update the arrangement (often needed) 40 | 41 | 42 | -------------------------------------------------------------------------------- /Various/X-Raym_Remove content of time selection preserving time selection and relative play cursor in place.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Remove content of time selection preserving time sleection and relative play cursor in place 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Reposotory: GitHub > X-Raym > EEL Scripts for Cockos REAPER 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 4.76 9 | * Version: 1.0.1 10 | */ 11 | 12 | /** 13 | * Changelog: 14 | * v1.0 (2015-06-07) 15 | + Initial Release 16 | */ 17 | 18 | GetSet_LoopTimeRange2(0, 0, 0, start_time, end_time, 0); 19 | duration = end_time - start_time; 20 | cur_pos=GetCursorPosition(); 21 | PreventUIRefresh(1); 22 | GetPlayPosition2() > end_time ?( 23 | Main_OnCommand(40201, 0); 24 | time = GetPlayPosition2Ex(0); 25 | SetEditCurPos2(0, time - duration, 0, 1); 26 | SetEditCurPos2(0, cur_pos, 0, 0); 27 | ):( 28 | Main_OnCommand(40201, 0); 29 | ); 30 | GetSet_LoopTimeRange2(0, 1, 0, start_time, end_time, 0); 31 | PreventUIRefresh(-1); 32 | -------------------------------------------------------------------------------- /Various/X-Raym_Reset audio and MIDI devices.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Reset audio and MIDI devices 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2024-02-07) 15 | + Initial release 16 | --]] 17 | 18 | -- This is a non defer version of Script: mpl_Reset audio and MIDI devices.lua 19 | 20 | reaper.Audio_Quit() 21 | reaper.Audio_Init() -------------------------------------------------------------------------------- /Various/X-Raym_Ripple check.eel: -------------------------------------------------------------------------------- 1 | /** 2 | * ReaScript Name: Ripple check 3 | * About: Check the state of the ripple editing mod. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * Forum Thread: 10 | * Forum Thread URI: 11 | * REAPER: 5.0 12 | * Version: 1.0 13 | */ 14 | 15 | /** 16 | * Changelog: 17 | * v1.0 (2015-03-23) 18 | + Initial release 19 | */ 20 | 21 | function MsgD(text, variable) 22 | ( 23 | ShowConsoleMsg(text); 24 | sprintf(str, "%d", variable); 25 | ShowConsoleMsg(str); 26 | ShowConsoleMsg("\n"); 27 | ); 28 | 29 | function MsgF(text, variable) 30 | ( 31 | ShowConsoleMsg(text); 32 | sprintf(str, "%f", variable); 33 | ShowConsoleMsg(str); 34 | ShowConsoleMsg("\n"); 35 | ); 36 | 37 | 38 | ShowConsoleMsg(""); 39 | 40 | all = GetToggleCommandState(40311); 41 | MsgD("All=", all); 42 | one = GetToggleCommandState(40310); 43 | MsgD("One=", one); 44 | all == 0 && one == 0 ?( 45 | ShowConsoleMsg("No Ripple\n"); 46 | ):( 47 | ShowConsoleMsg("Ripple\n"); 48 | ); 49 | 50 | 51 | ripple = extension_api("SNM_GetIntConfigVar", "ripplelockmode", -666); 52 | ripple2 = extension_api("SNM_GetDoubleConfigVar", "ripplelockmode", -666); 53 | test = extension_api("SNM_GetDoubleConfigVar", "dlmfnskljfhnkshfkse", -666); 54 | MsgD("SNM_int=", ripple); 55 | MsgF("SNM_float=", ripple2); 56 | MsgF("Err_value=", test); -------------------------------------------------------------------------------- /Various/X-Raym_Save mouse cursor X Y screen position.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Save mouse cursor X Y screen position 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.1 10 | * MetaPackage: true 11 | * Provides: 12 | * [main] . > X-Raym_Save mouse cursor X Y screen position_slot 1.lua 13 | * [main] . > X-Raym_Save mouse cursor X Y screen position_slot 2.lua 14 | * [main] . > X-Raym_Save mouse cursor X Y screen position_slot 3.lua 15 | * [main] . > X-Raym_Save mouse cursor X Y screen position_slot 4.lua 16 | --]] 17 | 18 | ext_name = "XR_MousePositions" 19 | 20 | script_name = ({reaper.get_action_context()})[2]:match("([^/\\_]+)%.lua$") 21 | 22 | slot = script_name:match("slot (%d+)") 23 | if slot then 24 | slot = tonumber(slot) 25 | if slot then slot = math.max(math.min(32, slot), 1) else slot = 1 end 26 | else 27 | slot = 1 28 | end 29 | 30 | if not reaper.JS_Window_GetFocus then 31 | reaper.MB('Please Install js_ReaScriptAPI extension.\nhttps://forum.cockos.com/showthread.php?t=212174\n', "Error", 1) 32 | return false 33 | end 34 | 35 | function DisplayTooltip(message) 36 | local x, y = reaper.GetMousePosition() 37 | reaper.TrackCtl_SetToolTip( message, x+17, y+17, false ) 38 | end 39 | 40 | function Init() 41 | x, y = reaper.GetMousePosition() 42 | retval_x, x = reaper.SetExtState(ext_name, "x" .. slot, x, true) 43 | retval_y, y = reaper.SetExtState(ext_name, "y" .. slot, y, true) 44 | DisplayTooltip("Mouse position saved to slot " .. slot .. ".") 45 | end 46 | 47 | if not preset_file_init then 48 | Init() 49 | end 50 | -------------------------------------------------------------------------------- /Various/X-Raym_Set SWS Notes window font size.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set SWS Notes window font size 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 7.0 9 | * Version: 1.0.1 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0.0 (2025-05-28) 15 | + Initial Release 16 | --]] 17 | 18 | if not reaper.BR_Win32_GetPrivateProfileString then 19 | reaper.MB("SWS extension is required by this script.\nPlease download it on http://www.sws-extension.org/", "Warning", 0) 20 | end 21 | 22 | local os_sep = package.config:sub(1,1) 23 | sm_ini = reaper.GetResourcePath() .. os_sep .. "S&M.ini" 24 | -- 25 | retval, value = reaper.BR_Win32_GetPrivateProfileString( "Notes", "Fontsize", "", sm_ini ) 26 | if not retval or value == "" then return end 27 | 28 | retval, retval_csv = reaper.GetUserInputs( "SWS Notes Window Font Size", 1, "Font size? (default=14)", value) 29 | if not retval or not tonumber(retval_csv) or tonumber(retval_csv) <= 0 then return end 30 | 31 | reaper.BR_Win32_WritePrivateProfileString( "Notes", "Fontsize", math.ceil(tonumber(retval_csv)), sm_ini ) 32 | 33 | reaper.MB( "Toggle Wrap Text via right click on S&M Notes window twice to refresh font size.", "Success", 0 ) 34 | -------------------------------------------------------------------------------- /Various/X-Raym_Set SWS global startup action extstate value to Off.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: X-Raym_Set SWS global startup action extstate value to Off 3 | * About: Put this action at start of your SWS Global startup action, to allow other scripts to check if they are being run from this. 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts/ 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.1 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.1 (2024-11-14) 15 | # Remove defer. No need to put it in reverse in global startup action anymore. 16 | * v1.0 (2021-12-05) 17 | + Initial Release 18 | --]] 19 | 20 | ext_name = "XR_SWSGlobalStartupAction" 21 | ext_key = "IsRunning" 22 | console = false 23 | 24 | function Msg(val) 25 | reaper.ShowConsoleMsg(tostring(val).."\n") 26 | end 27 | 28 | function Main() 29 | reaper.DeleteExtState( ext_name, ext_key, true ) 30 | if console then 31 | value = reaper.GetExtState(ext_name, ext_key) 32 | if value == "" then value = "false" end 33 | Msg("SWS Global startup action = " .. value) 34 | end 35 | end 36 | Main() 37 | -------------------------------------------------------------------------------- /Various/X-Raym_Set SWS global startup action extstate value to On.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: X-Raym_Set SWS global startup action extstate value to On 3 | * About: Put this action at start of your SWS Global startup action, to allow other scripts to check if they are being run from this. 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts/ 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.1 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.1 (2024-11-14) 15 | # Remove defer. No need to put it in reverse in global startup action anymore. 16 | * v1.0 (2021-12-05) 17 | + Initial Release 18 | --]] 19 | 20 | 21 | ext_name = "XR_SWSGlobalStartupAction" 22 | ext_key = "IsRunning" 23 | console = off 24 | 25 | function Msg(val) 26 | reaper.ShowConsoleMsg(tostring(val).."\n") 27 | end 28 | 29 | function Main() 30 | reaper.SetExtState( ext_name, ext_key, "true", false ) 31 | if console then 32 | value = reaper.GetExtState(ext_name, ext_key) 33 | if value == "" then value = "false" end 34 | Msg("SWS Global startup action = " .. value) 35 | end 36 | end 37 | 38 | Main() 39 | -------------------------------------------------------------------------------- /Various/X-Raym_Set SWS project startup action extstate value to Off.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set SWS project startup action extstate value to Off 3 | * About: Put this action at start of your SWS Project startup action, to allow other scripts to check if they are being run from this. 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts/ 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | ext_name = "XR_SWSProjectStartupAction" 13 | ext_key = "IsRunning" 14 | console = false 15 | 16 | function Msg(val) 17 | reaper.ShowConsoleMsg(tostring(val).."\n") 18 | end 19 | 20 | function Main() 21 | reaper.SetProjExtState( 0, ext_name, ext_key, "" ) 22 | if console then 23 | retval, value = reaper.GetProjExtState(0, ext_name, ext_key) 24 | if value == "" then value = "false" end 25 | Msg("SWS Project startup action = " .. value) 26 | end 27 | end 28 | 29 | reaper.defer(Main) 30 | -------------------------------------------------------------------------------- /Various/X-Raym_Set SWS project startup action extstate value to On.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Set SWS project startup action extstate value to On 3 | * About: Put this action at start of your SWS Project startup action, to allow other scripts to check if they are being run from this. 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts/ 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | ext_name = "XR_SWSProjectStartupAction" 13 | ext_key = "IsRunning" 14 | console = false 15 | 16 | function Msg(val) 17 | reaper.ShowConsoleMsg(tostring(val).."\n") 18 | end 19 | 20 | function Main() 21 | reaper.SetProjExtState( 0, ext_name, ext_key, "" ) 22 | if console then 23 | retval, value = reaper.GetProjExtState(0, ext_name, ext_key) 24 | if value == "" then value = "false" end 25 | Msg("SWS Project startup action = " .. value) 26 | end 27 | end 28 | 29 | reaper.defer(Main) 30 | -------------------------------------------------------------------------------- /View/X-Raym_Focus media explorer.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Focus media explorer 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0.2 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0.2 (2023-08-30) 15 | # More efficient GetMediaExplorer function 16 | * v1.0.1 (2020-12-17) 17 | # Docked support 18 | * v1.0 (2020-12-17) 19 | + Initial Release 20 | --]] 21 | 22 | function GetMediaExplorerHWND() -- thx ultraschall! 23 | local state = reaper.GetToggleCommandState( 50124 ) 24 | if state ~= 0 then return reaper.OpenMediaExplorer( "", false ) end 25 | end 26 | 27 | if not reaper.JS_Window_SetFocus then 28 | reaper.ShowConsoleMsg('Please Install js_ReaScriptAPI extension.\nhttps://forum.cockos.com/showthread.php?t=212174\n') 29 | else 30 | hwnd = GetMediaExplorerHWND() 31 | 32 | if hwnd then 33 | 34 | reaper.JS_Window_SetFocus( hwnd ) 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /View/X-Raym_Scroll vertically down a little bit.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Scroll vertically down a little bit 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | function Main() 13 | reaper.CSurf_OnScroll( 0, 1 ) 14 | end 15 | 16 | reaper.defer(Main) -------------------------------------------------------------------------------- /View/X-Raym_Scroll vertically to first selected track.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Scroll vertically to first selected track 3 | * About: Alternative to native Track: Vertical scroll selected tracks into view, but scroll to top instead 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 10 | * Version: 1.0 11 | --]] 12 | 13 | --[[ 14 | * Changelog: 15 | * v1.0 (2022-11-19) 16 | + Initial Release 17 | --]] 18 | 19 | if not reaper.JS_Window_FindChildByID then 20 | reaper.ShowMessageBox( 'Please install or update js_ReaScriptAPI extension, available via Reapack.', 'Missing Dependency', 0) 21 | end 22 | 23 | function ScrollTrackToTop( track ) 24 | -- NOTE: No check for visibility, cause not needed for now 25 | 26 | reaper.PreventUIRefresh( 1 ) 27 | 28 | local track_tcpy = reaper.GetMediaTrackInfo_Value( track, "I_TCPY" ) 29 | 30 | local mainHWND = reaper.GetMainHwnd() 31 | local windowHWND = reaper.JS_Window_FindChildByID(mainHWND, 1000) 32 | local scroll_retval, scroll_position, scroll_pageSize, scroll_min, scroll_max, scroll_trackPos = reaper.JS_Window_GetScrollInfo( windowHWND, "v" ) 33 | reaper.JS_Window_SetScrollPos( windowHWND, "v", track_tcpy + scroll_position ) 34 | 35 | reaper.PreventUIRefresh( -1 ) 36 | 37 | end 38 | 39 | 40 | function Init() 41 | track = reaper.GetSelectedTrack( 0, 0) 42 | if not track then return end 43 | 44 | ScrollTrackToTop( track ) 45 | end 46 | 47 | reaper.defer(Init) 48 | -------------------------------------------------------------------------------- /View/X-Raym_Scroll vertically up a little bit.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Scroll vertically up a little bit 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | function Main() 13 | reaper.CSurf_OnScroll( 0, -1 ) 14 | end 15 | 16 | reaper.defer(Main) -------------------------------------------------------------------------------- /View/X-Raym_Toggle video window full screen.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Toggle video window full screen 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2020-12-13) 15 | # Initial release 16 | --]] 17 | 18 | function Msg(val) 19 | reaper.ShowConsoleMsg(tostring(val).."\n") 20 | end 21 | 22 | if not reaper.JS_Window_SetOpacity then 23 | Msg("Please install JS_ReaScript REAPER extension, available in Reapack extension, under ReaTeam Extensions repository.") 24 | return 25 | end 26 | 27 | function GetWindow(name) 28 | local title = reaper.JS_Localize(name, "common") 29 | local arr = reaper.new_array({}, 1024) 30 | reaper.JS_Window_ArrayFind(title, true, arr) 31 | local adr = arr.table() 32 | for j = 1, #adr do 33 | local hwnd = reaper.JS_Window_HandleFromAddress(adr[j]) 34 | -- verify window by checking if it also has a specific child. 35 | --if reaper.JS_Window_FindChildByID(hwnd, 1045) then -- 1045:ID of volume control in media explorer. 36 | return hwnd 37 | --end 38 | end 39 | end 40 | 41 | hwnd = GetWindow("Video Window") 42 | if hwnd then 43 | --tval, val = reaper.BR_Win32_GetPrivateProfileString( "reaper_video", "fullscreen", "", reaper.get_ini_file() ) 44 | reaper.JS_WindowMessage_Send(hwnd, "WM_LBUTTONDBLCLK", 1,1,0,0) 45 | end 46 | -------------------------------------------------------------------------------- /View/X-Raym_Toggle video window opacity.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Toggle video window opacity 3 | * Author: X-Raym 4 | * Author URI: https://www.extremraym.com 5 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 6 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 7 | * Licence: GPL v3 8 | * REAPER: 5.0 9 | * Version: 1.0 10 | --]] 11 | 12 | --[[ 13 | * Changelog: 14 | * v1.0 (2020-12-13) 15 | # Initial release 16 | --]] 17 | 18 | -- USER CONFIG AREA ---------------- 19 | 20 | opacity_default = 0.5 21 | 22 | ------------------------------------ 23 | 24 | function Msg(val) 25 | reaper.ShowConsoleMsg(tostring(val).."\n") 26 | end 27 | 28 | if not reaper.JS_Window_SetOpacity then 29 | Msg("Please install JS_ReaScript REAPER extension, available in Reapack extension, under ReaTeam Extensions repository.") 30 | return 31 | end 32 | 33 | function GetWindow(name) 34 | local title = reaper.JS_Localize(name, "common") 35 | local arr = reaper.new_array({}, 1024) 36 | reaper.JS_Window_ArrayFind(title, true, arr) 37 | local adr = arr.table() 38 | for j = 1, #adr do 39 | local hwnd = reaper.JS_Window_HandleFromAddress(adr[j]) 40 | -- verify window by checking if it also has a specific child. 41 | --if reaper.JS_Window_FindChildByID(hwnd, 1045) then -- 1045:ID of volume control in media explorer. 42 | return hwnd 43 | --end 44 | end 45 | end 46 | 47 | section = "XR_VideoWindowOpacity" 48 | key = "toggle" 49 | 50 | hwnd = GetWindow("Video Window") 51 | if hwnd then 52 | 53 | if reaper.HasExtState( section, key ) then -- Workarround cause there is no get opacity 54 | opacity = tonumber( reaper.GetExtState( section, key ) ) 55 | else 56 | opacity = 1 57 | end 58 | 59 | if opacity == 1 then 60 | opacity = opacity_default 61 | else 62 | opacity = 1 63 | end 64 | reaper.JS_Window_SetOpacity( hwnd, "ALPHA", opacity ) 65 | reaper.SetExtState( section, key, opacity, true ) 66 | end 67 | -------------------------------------------------------------------------------- /View/X-Raym_Zoom to region at edit cursor.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | * ReaScript Name: Zoom to region at edit cursor 3 | * Instructions: Place cursor inside a region. Run. 4 | * Author: X-Raym 5 | * Author URI: https://www.extremraym.com 6 | * Repository: GitHub > X-Raym > REAPER-ReaScripts 7 | * Repository URI: https://github.com/X-Raym/REAPER-ReaScripts 8 | * Licence: GPL v3 9 | * REAPER: 5.0 pre 32 10 | * Extensions: SWS/S&M 2.7.1 11 | * Version: 1.0 12 | --]] 13 | 14 | --[[ 15 | * Changelog: 16 | * v1.0 (2015-05-19) 17 | + Initial Release 18 | --]] 19 | 20 | function main() 21 | 22 | markeridx, regionidx = reaper.GetLastMarkerAndCurRegion(0, reaper.GetCursorPosition()) 23 | 24 | if regionidx ~= nil then 25 | 26 | reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function. 27 | 28 | iRetval, bIsrgnOut, iPosOut, iRgnendOut, sNameOut, iMarkrgnindexnumberOut, iColorOur = reaper.EnumProjectMarkers3(0,regionidx) 29 | reaper.BR_SetArrangeView(0, iPosOut, iRgnendOut) 30 | 31 | reaper.Undo_EndBlock("Zoom to region at edit cursor", -1) -- End of the undo block. Leave it at the bottom of your main function. 32 | 33 | end 34 | 35 | end 36 | 37 | 38 | main() -- Execute your main function 39 | 40 | 41 | reaper.UpdateArrange() -- Update the arrangement (often needed) 42 | 43 | 44 | -------------------------------------------------------------------------------- /Web Interfaces/X-Raym_Lyrics.www: -------------------------------------------------------------------------------- 1 | @description Lyrics Web Interface 2 | @author X-Raym 3 | @version 1.4.1 4 | @screenshot https://i.imgur.com/o6DcxsG.gif 5 | @provides X-Raym_Lyrics.html 6 | @changelog 7 | Black background 8 | List display improvements -------------------------------------------------------------------------------- /Web Interfaces/X-Raym_Scrolling Lyrics.www: -------------------------------------------------------------------------------- 1 | @description Scrolling Lyrics Web Interface 2 | @author X-Raym 3 | @version 1.0.3 4 | @screenshot https://i.imgur.com/z2Rv2cL.gif 5 | @provides X-Raym_Scrolling Lyrics.html 6 | @changelog 7 | Black background mode with ?vignette query 8 | List display improvements 9 | Click lyrics to move edit cursor in REAPER --------------------------------------------------------------------------------