Old 03-22-2017, 07:39 AM   #1441
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 561
Default select takes by date, time, start offset

Hello, would it be possible to create a script that would select the takes across tracks, from this kind of informations (from file properties)? :
Originator: REAPER
Date: 2017-03-22
Time: 15-12-05
Start offset: 3:33.996

Thank you.

Last edited by Sumalc; 03-22-2017 at 08:55 AM.
Sumalc is online now   Reply With Quote
Old 03-23-2017, 02:38 PM   #1442
mlprod
Human being with feelings
 
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 706
Default

I have a simple script request, if anyone here would like to give it a go?

So XRaym has a script called "Set selcted items fade in fade out lenght". What I would like to achive is a script that automatically fades selected items in and out based on a predefined pixel value. I.e no dialogue box, just editing the value in the script itself if needed.

Achivable?

/M

PS. I always donate to scripters helping out!
mlprod is offline   Reply With Quote
Old 03-23-2017, 02:41 PM   #1443
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,057
Default

@mlprod
I anticipated your needs, as you can see /P
REAPER-ReaScripts/X-Raym_Set selected items fade-in fade-out length.lua at master · X-Raym/REAPER-ReaScripts
You can customize head of this script to have your desired value, and to set the prompt to false. (aka, no dialog box)

It doesn't work with pixel but with seconds.

Thank you for considering a donation, it will really help !
X-Raym is offline   Reply With Quote
Old 03-23-2017, 02:46 PM   #1444
mlprod
Human being with feelings
 
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 706
Default

Quote:
Originally Posted by X-Raym View Post
@mlprod
I anticipated your needs, as you can see /P
REAPER-ReaScripts/X-Raym_Set selected items fade-in fade-out length.lua at master · X-Raym/REAPER-ReaScripts
You can customize head of this script to have your desired value, and to set the prompt to false. (aka, no dialog box)

It doesn't work with pixel but with seconds.

Thank you for considering a donation, it will really help !
I see, nice one!
Possible to edit to pixels? Its sooo dependent on zoom level what suits best you know.
mlprod is offline   Reply With Quote
Old 03-23-2017, 03:08 PM   #1445
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,057
Default

@mlprod
Indeed, it is possible.

I don't plan to release that as a new script as it is a bit too specific, but here is some code to help you mod the script :

What you have to do is to add
Code:
zoom = reaper.GetHZoomLevel()
Somewhere at the top of the script (after user variable definition for eg).

Then, find the Set fades functions and divide the whole value by the zoom level this way
Code:
reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN", value/zoom)
But there is few calculations with fades in seconds inside my script which check for fades overlapping, this may a bit more complicated to deal with, but the part without overlapping, (line 133), it is prety straighforward.

Hope that help !
X-Raym is offline   Reply With Quote
Old 03-23-2017, 03:16 PM   #1446
mlprod
Human being with feelings
 
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 706
Default

Quote:
Originally Posted by X-Raym View Post
@mlprod
Indeed, it is possible.

I don't plan to release that as a new script as it is a bit too specific, but here is some code to help you mod the script :

What you have to do is to add
Code:
zoom = reaper.GetHZoomLevel()
Somewhere at the top of the script (after user variable definition for eg).

Then, find the Set fades functions and divide the whole value by the zoom level this way
Code:
reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN", value/zoom)
But there is few calculations with fades in seconds inside my script which check for fades overlapping, this may a bit more complicated to deal with, but the part without overlapping, (line 133), it is prety straighforward.

Hope that help !
Thanks a lot!
Please pm me your paypal address as your button leads to some non secure stuff that my browser doesnt like.
mlprod is offline   Reply With Quote
Old 03-23-2017, 03:31 PM   #1447
mpb2016
Human being with feelings
 
Join Date: Feb 2016
Posts: 99
Default

Hi!

Im pretty ignorant when it comes to scripting and have a maybe stupid question to all scripting maestros here:

Would it be possible to automatically detect key switches and/or UACC & CC data from a channel with a loaded Kontakt instance?
mpb2016 is offline   Reply With Quote
Old 03-26-2017, 12:03 PM   #1448
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Could someone make a script please?
Let's say i've selected some notes, i want when i run the script only the notes with lowest pitch are selected among those that are already selected. is it possible?

Thanks! I badly need this script....
Viente is offline   Reply With Quote
Old 03-26-2017, 02:50 PM   #1449
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

Quote:
Originally Posted by Viente View Post
Could someone make a script please?
Let's say i've selected some notes, i want when i run the script only the notes with lowest pitch are selected among those that are already selected. is it possible?

Thanks! I badly need this script....
Select only notes with lowest pitch (from selected notes).lua
added to my reapack repo
http://forum.cockos.com/showthread.php?t=186999
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 03-26-2017, 03:30 PM   #1450
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by me2beats View Post
Select only notes with lowest pitch (from selected notes).lua
added to my reapack repo
http://forum.cockos.com/showthread.php?t=186999
Huge thanks! You've saved me a lot of time!
Viente is offline   Reply With Quote
Old 03-26-2017, 03:38 PM   #1451
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Hmm not quite working here, it selects middle note from the chord. Any ideas?
Viente is offline   Reply With Quote
Old 03-26-2017, 03:55 PM   #1452
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

Quote:
Originally Posted by Viente View Post
Hmm not quite working here, it selects middle note from the chord. Any ideas?
can you make a screenshot with arrangement of notes?
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 03-26-2017, 04:03 PM   #1453
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by me2beats View Post
can you make a screenshot with arrangement of notes?
Sure

Viente is offline   Reply With Quote
Old 03-26-2017, 04:12 PM   #1454
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

Quote:
Originally Posted by Viente View Post
Sure
It's strange. Could you share this project file?
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 03-26-2017, 04:26 PM   #1455
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by me2beats View Post
It's strange. Could you share this project file?
Here you go!
Attached Files
File Type: zip Test 1.zip (1.6 KB, 47 views)
Viente is offline   Reply With Quote
Old 03-26-2017, 04:27 PM   #1456
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

Oh I got this bug. wait a minute
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 03-26-2017, 05:08 PM   #1457
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

Quote:
Originally Posted by Viente View Post
Here you go!
Select only notes with lowest pitch (from selected notes)
updated to 1.11
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 03-26-2017, 05:12 PM   #1458
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

It works great! Thanks so much!

I wonder if its difficult to make it select all lower notes in a chord progression?
Viente is offline   Reply With Quote
Old 03-26-2017, 05:41 PM   #1459
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,057
Default

@Viente
There is such script in Kawa script pack already :
kawaCat / ReaScript-M2BPack / wiki / MIDI-Section — Bitbucket
X-Raym is offline   Reply With Quote
Old 04-05-2017, 03:43 PM   #1460
bassdj
Human being with feelings
 
Join Date: Dec 2016
Posts: 11
Default Splitting melody and notes played

Is there a jsfx which makes it possible to put some long chords on one midi track and your melody on another (or on the same track)? The melody would repeat the whole song but the chords determine which notes are actually played.

Looking for this for a while now and did find what I mean as a vst:
https://www.kvraudio.com/product/mel...lyoursound-com

If you look closely at the beginning of the video you can see the melody is played on the same notes the whole time but the chords determine the actual notes.

I think this has huge potential for a fast workflow since you can create one track with the chords which sends it's midi notes to other tracks like your bassline, melody, strings etc. You only need to draw specific notes for melody on each track once. Then just repeat it the whole song. Changing the melody at a later time will be extremely fast to accomplish.

I did find something similar as a jsfx which makes it easy to split rythms and chords. A must have if you like these kind of tools: http://forum.cockos.com/showthread.php?p=1828402
bassdj is offline   Reply With Quote
Old 04-14-2017, 11:36 AM   #1461
wjmwpg
Human being with feelings
 
wjmwpg's Avatar
 
Join Date: Feb 2017
Location: Winnipeg, Manitoba, Canada
Posts: 133
Default

Quote:
Originally Posted by heda View Post
here is a lua script I've made that removes all bypassed FX
you need REAPER 5 and SWS extensions installed.
https://stash.reaper.fm/26131/HeDa_RemoveBypassedFX.lua
This looks great but the links seems to be no longer working . . .
__________________
Switched to Reaper on 19FEB17 after a decade+ on Logic Pro.
wjmwpg is offline   Reply With Quote
Old 05-28-2017, 05:09 PM   #1462
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Is it possible to create a script that insert an audio item from specific WAV sample on the drive?

Let's say i have a sample located at C:\MySamples\Test.wav.

I need a script that automatically create an item at edit cursor position from that sample.

Cheers!
Viente is offline   Reply With Quote
Old 05-28-2017, 06:44 PM   #1463
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 5,552
Default

Quote:
Originally Posted by Viente View Post
Is it possible to create a script that insert an audio item from specific WAV sample on the drive?

Let's say i have a sample located at C:\MySamples\Test.wav.

I need a script that automatically create an item at edit cursor position from that sample.

Cheers!
SWS Resources can do this
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is online now   Reply With Quote
Old 05-28-2017, 10:48 PM   #1464
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,533
Default

Quote:
Originally Posted by Viente View Post
Is it possible to create a script that insert an audio item from specific WAV sample on the drive? Let's say i have a sample located at C:\MySamples\Test.wav.
Code:
file_path = [[C:\MySamples\Test.wav]]
reaper.InsertMedia( file_path, 0 )
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 05-29-2017, 12:58 AM   #1465
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by EpicSounds View Post
SWS Resources can do this
Thanks but I'm trying to replace some functionality from SWS with ReaScript. I want to stay as native and portable as possible.

Quote:
Originally Posted by mpl View Post
Code:
file_path = [[C:\MySamples\Test.wav]]
reaper.InsertMedia( file_path, 0 )
Thank you!
Viente is offline   Reply With Quote
Old 05-29-2017, 01:18 AM   #1466
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Quote:
Originally Posted by mpl View Post
Code:
file_path = [[C:\MySamples\Test.wav]]
reaper.InsertMedia( file_path, 0 )
Is there any way to use a relative path from a REAPER resources folder?

I know I can use reaper.GetResourcePath() but I don't know how to compile a proper string for file_path. Please help.

Let's say my Test.wav is located at "RESOURCEPATH"/Samples/Test.wav

Last edited by Viente; 05-29-2017 at 01:31 AM.
Viente is offline   Reply With Quote
Old 05-29-2017, 01:53 AM   #1467
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,533
Default

Code:
file_path = reaper.GetResourcePath()..'/Samples/Test.wav'
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 05-29-2017, 02:11 AM   #1468
Viente
Human being with feelings
 
Viente's Avatar
 
Join Date: Feb 2012
Posts: 1,972
Default

Thanks Michael! Works perfectly!
Viente is offline   Reply With Quote
Old 06-12-2017, 11:53 AM   #1469
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Posts: 548
Default increment pc to vst to audition synth presets?

Hey is there someone who could write a quick script or js to send program change msg to vst like synth1 to be able to quickly change presets?

The intent here is to trigger a script with shortcut key to change vst preset, by sending program change message to vst. Should work with synths that recognize program change messages. I need this to be able to quickly audition presets to see if they work with project and to quickly try the next or previous if the preset isn't one I like. I do not want to have to export the list of presets anywhere, I don't really care what they are called, I just want to be able to quickly go through many presets.
The next step after would be able to change banks as well...

Thanks.
__________________
KeyMce/GenMce - pc keyboard/midi to Mackie control emulation (built with ahk). Also - an ahk script to build your own midi programs.
flipotto is offline   Reply With Quote
Old 06-24-2017, 11:07 PM   #1470
Chris Hurst Music
Human being with feelings
 
Chris Hurst Music's Avatar
 
Join Date: Mar 2017
Location: Wales, UK
Posts: 68
Default

Does anyone know if it is possible for a script to be written that selects all midi notes on a track with velocities between 21 to 41 for example?

Thanks
__________________
http://www.chrishurstmusic.com
Chris Hurst Music is offline   Reply With Quote
Old 06-25-2017, 01:47 AM   #1471
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,533
Default

Quote:
Originally Posted by Chris Hurst Music View Post
Does anyone know if it is possible for a script to be written that selects all midi notes on a track with velocities between 21 to 41 for example?
Thanks
lua
Code:
  me =  reaper.MIDIEditor_GetActive()
  if me then take = reaper.MIDIEditor_GetTake( me ) end
  if take then 
    for i = 1, ({reaper.MIDI_CountEvts( take )})[2] do
      _, _, m, s, e, c, p, v = reaper.MIDI_GetNote( take, i-1 )
      if v > 28 and v < 41 then
        reaper.MIDI_SetNote( take, i-1, true, m, s, e, c, p, v, true )
      end
    end
  end
  reaper.MIDI_Sort( take )
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 06-25-2017, 02:22 AM   #1472
Chris Hurst Music
Human being with feelings
 
Chris Hurst Music's Avatar
 
Join Date: Mar 2017
Location: Wales, UK
Posts: 68
Default

Quote:
Originally Posted by mpl View Post
lua
Code:
  me =  reaper.MIDIEditor_GetActive()
  if me then take = reaper.MIDIEditor_GetTake( me ) end
  if take then 
    for i = 1, ({reaper.MIDI_CountEvts( take )})[2] do
      _, _, m, s, e, c, p, v = reaper.MIDI_GetNote( take, i-1 )
      if v > 28 and v < 41 then
        reaper.MIDI_SetNote( take, i-1, true, m, s, e, c, p, v, true )
      end
    end
  end
  reaper.MIDI_Sort( take )
Fantastic! Many thanks!
__________________
http://www.chrishurstmusic.com
Chris Hurst Music is offline   Reply With Quote
Old 06-25-2017, 12:39 PM   #1473
Chris Hurst Music
Human being with feelings
 
Chris Hurst Music's Avatar
 
Join Date: Mar 2017
Location: Wales, UK
Posts: 68
Default

New to Reaper and this forum is a goldmine of information on getting the most out of it!

Couple of things I have not been able to find out though, is if it is possible to have a script that deletes all of one type of CC (so a script to delete all CC1 or CC11) on a track?

Also, is there a script that could copy CC1 to CC11 do you know?

Many thanks.

(yes, I have been watching the Junkie XL video where he details his Cubase touch screen!)
__________________
http://www.chrishurstmusic.com
Chris Hurst Music is offline   Reply With Quote
Old 06-25-2017, 02:09 PM   #1474
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,811
Default

SWS/BR: Delete all events in last clicked lane
cfillion is online now   Reply With Quote
Old 06-25-2017, 02:28 PM   #1475
Chris Hurst Music
Human being with feelings
 
Chris Hurst Music's Avatar
 
Join Date: Mar 2017
Location: Wales, UK
Posts: 68
Default

Quote:
Originally Posted by cfillion View Post
SWS/BR: Delete all events in last clicked lane
Great, thank you.
__________________
http://www.chrishurstmusic.com
Chris Hurst Music is offline   Reply With Quote
Old 06-25-2017, 02:42 PM   #1476
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,533
Default

Copy/Paste CC should be somewhere in ReaPack also.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 06-25-2017, 02:49 PM   #1477
Chris Hurst Music
Human being with feelings
 
Chris Hurst Music's Avatar
 
Join Date: Mar 2017
Location: Wales, UK
Posts: 68
Default

Quote:
Originally Posted by mpl View Post
Copy/Paste CC should be somewhere in ReaPack also.

Thanks, I'll do some digging!
__________________
http://www.chrishurstmusic.com
Chris Hurst Music is offline   Reply With Quote
Old 07-10-2017, 09:00 AM   #1478
reddiesel41264
Human being with feelings
 
reddiesel41264's Avatar
 
Join Date: Jan 2012
Location: North East UK
Posts: 492
Default

A plugin to crop videos?
__________________
http://librewave.com - Freedom respecting instruments and effects
http://xtant-audio.com/ - Purveyor of fine sample libraries (and Kontakt scripting tutorials)
reddiesel41264 is offline   Reply With Quote
Old 07-11-2017, 11:46 AM   #1479
kawa_
Human being with feelings
 
kawa_'s Avatar
 
Join Date: Mar 2016
Posts: 117
Default

Hi, I have just wrote video processor script.
though this may be get unexpected result , this script could to crop video.

[screen shot]
https://stash.reaper.fm/31122/VideoP...rop_test01.gif
https://stash.reaper.fm/31123/VideoP...rop_test02.PNG

Code:
//Video Crop Test

//@param2:xPos  'offset X'   0 -1 1
//@param3:yPos  'offset Y'   0 -1 1
//@param5:cropX 'crop X'     0  0 1
//@param6:cropY 'crop Y'     0  0 1
//@param7:cropW 'crop w'     1  0 1
//@param8:cropH 'crop h'     1  0 1
//@param10:isCropType 'Mode' 0  0 1 0.5 1
//====================================================================
img1 = 0;
img2 = input_ismaster() ? -2 : input_track(0);
( img2 > img1 || input_count() == 0 || input_ismaster() )?
(
  img_w = 0;
  img_h = 0;
  gfx_img_info (img1,img_w,img_h);
  //==================================================================
  ( isCropType == 0 )?
  (
    src_x = floor( img_w * cropX);
    src_y = floor( img_h * cropY);
    src_w = floor( img_w * cropW );
    src_h = floor( img_h * cropH );
    
  ):(
    src_x = floor( img_w * cropX *0.5);
    src_y = floor( img_h * cropY *0.5);
    src_w = floor( (img_w -src_x) * cropW -src_x );
    src_h = floor( (img_h -src_y) * cropH -src_y );
  );
  //==================================================================
  dest_x = floor(src_x + project_w *xPos);
  dest_y = floor(src_y + project_h *yPos);
  dest_w = src_w;
  dest_h = src_h;
  
  gfx_blit( img2
          , 0); // aspect
  
  gfx_dest = -1;
  gfx_blit( img1
          , 0 // aspect
          , dest_x , dest_y
          , dest_w , dest_h
          , src_x  , src_y
          , src_w  , src_h
          );           
);
__________________
web | kawaScripts | donate | twitter |

Last edited by kawa_; 07-11-2017 at 11:52 AM.
kawa_ is offline   Reply With Quote
Old 07-20-2017, 06:18 AM   #1480
Audio_Birdi
Human being with feelings
 
Audio_Birdi's Avatar
 
Join Date: Dec 2015
Posts: 49
Default

Hi there,

How would I go about creating a script that unselects / deselects only the first note / event of a pre-existing note selection? Below is a script that selects every 2nd event within a note selection, but i am unsure how to modify it so that it only selects the first note/event within a pre-existing note selection.

Thanks in advance!

Quote:
// Unselects every second selected event. Notes and CC are handled separately. (original by Veto, this version by spk77 - thanks a lot, guys)
// Uses "MIDI_Enum" -functions

Undo_BeginBlock2(0);
function unselectEverySecondEvent()
(
(take = MIDIEditor_GetTake(MIDIEditor_GetActive())) ? (
allEvents = MIDI_CountEvts(take, noteCount, ccCount, sysExCount);

index = -1;
k = 1;
while ((index = MIDI_EnumSelNotes(take, index)) != -1) (
MIDI_GetNote(take, index, isSelected, isMuted, startPpqPos, endPpqPos, channel, pitch, velocity) ? (
k % 2 == 0 ? (
MIDI_SetNote(take, index, 0, isMuted, startPpqPos, endPpqPos, channel, pitch, velocity);
);
k += 1;
);
);

index = -1;
n = 1;
while ((index = MIDI_EnumSelCC(take, index)) != -1) (
MIDI_GetCC(take, index, isSelected, isMuted, PpqPos, type, channel, CCnr, value) ? (
n % 2 == 0 ? (
MIDI_SetCC(take, index, 0, isMuted, PpqPos, type, channel, CCnr, value);
);
n += 1;
);
);
);
);

unselectEverySecondEvent();
Undo_EndBlock2(0,"Unselect every second note/CC",-1);
Audio_Birdi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:25 AM.


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