|
|
|
03-22-2017, 07:39 AM
|
#1441
|
Human being with feelings
Join Date: Oct 2009
Location: France
Posts: 743
|
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.
|
|
|
03-23-2017, 02:38 PM
|
#1442
|
Human being with feelings
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 1,343
|
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!
|
|
|
03-23-2017, 02:46 PM
|
#1444
|
Human being with feelings
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 1,343
|
Quote:
Originally Posted by X-Raym
|
I see, nice one!
Possible to edit to pixels? Its sooo dependent on zoom level what suits best you know.
|
|
|
03-23-2017, 03:08 PM
|
#1445
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@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 !
|
|
|
03-23-2017, 03:16 PM
|
#1446
|
Human being with feelings
Join Date: Jul 2015
Location: Stockholm, Sweden
Posts: 1,343
|
Quote:
Originally Posted by X-Raym
@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.
|
|
|
03-23-2017, 03:31 PM
|
#1447
|
Human being with feelings
Join Date: Feb 2016
Posts: 99
|
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?
|
|
|
03-26-2017, 12:03 PM
|
#1448
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
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....
|
|
|
03-26-2017, 02:50 PM
|
#1449
|
Human being with feelings
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
|
Quote:
Originally Posted by Viente
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
|
|
|
03-26-2017, 03:30 PM
|
#1450
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by me2beats
|
Huge thanks! You've saved me a lot of time!
|
|
|
03-26-2017, 03:38 PM
|
#1451
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Hmm not quite working here, it selects middle note from the chord. Any ideas?
|
|
|
03-26-2017, 03:55 PM
|
#1452
|
Human being with feelings
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
|
Quote:
Originally Posted by Viente
Hmm not quite working here, it selects middle note from the chord. Any ideas?
|
can you make a screenshot with arrangement of notes?
|
|
|
03-26-2017, 04:03 PM
|
#1453
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by me2beats
can you make a screenshot with arrangement of notes?
|
Sure
|
|
|
03-26-2017, 04:12 PM
|
#1454
|
Human being with feelings
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
|
Quote:
Originally Posted by Viente
Sure
|
It's strange. Could you share this project file?
|
|
|
03-26-2017, 04:26 PM
|
#1455
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by me2beats
It's strange. Could you share this project file?
|
Here you go!
|
|
|
03-26-2017, 04:27 PM
|
#1456
|
Human being with feelings
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
|
Oh I got this bug. wait a minute
|
|
|
03-26-2017, 05:08 PM
|
#1457
|
Human being with feelings
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
|
Quote:
Originally Posted by Viente
Here you go!
|
Select only notes with lowest pitch (from selected notes)
updated to 1.11
|
|
|
03-26-2017, 05:12 PM
|
#1458
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
It works great! Thanks so much!
I wonder if its difficult to make it select all lower notes in a chord progression?
|
|
|
03-26-2017, 05:41 PM
|
#1459
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
|
|
|
04-05-2017, 03:43 PM
|
#1460
|
Human being with feelings
Join Date: Dec 2016
Posts: 11
|
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
|
|
|
04-14-2017, 11:36 AM
|
#1461
|
Human being with feelings
Join Date: Feb 2017
Location: Winnipeg, Manitoba, Canada
Posts: 183
|
Quote:
Originally Posted by heda
|
This looks great but the links seems to be no longer working . . .
__________________
Switched to Reaper on 19FEB17 after a decade+ on Logic Pro.
|
|
|
05-28-2017, 05:09 PM
|
#1462
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
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!
|
|
|
05-28-2017, 06:44 PM
|
#1463
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,570
|
Quote:
Originally Posted by Viente
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
|
|
|
05-28-2017, 10:48 PM
|
#1464
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Quote:
Originally Posted by Viente
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 )
|
|
|
05-29-2017, 12:58 AM
|
#1465
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by EpicSounds
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
Code:
file_path = [[C:\MySamples\Test.wav]]
reaper.InsertMedia( file_path, 0 )
|
Thank you!
|
|
|
05-29-2017, 01:18 AM
|
#1466
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by mpl
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.
|
|
|
05-29-2017, 01:53 AM
|
#1467
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Code:
file_path = reaper.GetResourcePath()..'/Samples/Test.wav'
|
|
|
05-29-2017, 02:11 AM
|
#1468
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Thanks Michael! Works perfectly!
|
|
|
06-12-2017, 11:53 AM
|
#1469
|
Human being with feelings
Join Date: Feb 2007
Location: VA
Posts: 885
|
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.
|
|
|
06-24-2017, 11:07 PM
|
#1470
|
Human being with feelings
Join Date: Mar 2017
Location: Wales, UK
Posts: 75
|
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
|
|
|
06-25-2017, 01:47 AM
|
#1471
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Quote:
Originally Posted by Chris Hurst Music
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 )
|
|
|
06-25-2017, 02:22 AM
|
#1472
|
Human being with feelings
Join Date: Mar 2017
Location: Wales, UK
Posts: 75
|
Quote:
Originally Posted by mpl
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!
|
|
|
06-25-2017, 12:39 PM
|
#1473
|
Human being with feelings
Join Date: Mar 2017
Location: Wales, UK
Posts: 75
|
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!)
|
|
|
06-25-2017, 02:09 PM
|
#1474
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
SWS/BR: Delete all events in last clicked lane
|
|
|
06-25-2017, 02:28 PM
|
#1475
|
Human being with feelings
Join Date: Mar 2017
Location: Wales, UK
Posts: 75
|
Quote:
Originally Posted by cfillion
SWS/BR: Delete all events in last clicked lane
|
Great, thank you.
|
|
|
06-25-2017, 02:42 PM
|
#1476
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Copy/Paste CC should be somewhere in ReaPack also.
|
|
|
06-25-2017, 02:49 PM
|
#1477
|
Human being with feelings
Join Date: Mar 2017
Location: Wales, UK
Posts: 75
|
Quote:
Originally Posted by mpl
Copy/Paste CC should be somewhere in ReaPack also.
|
Thanks, I'll do some digging!
|
|
|
07-10-2017, 09:00 AM
|
#1478
|
Human being with feelings
Join Date: Jan 2012
Location: North East UK
Posts: 493
|
A plugin to crop videos?
|
|
|
07-11-2017, 11:46 AM
|
#1479
|
Human being with feelings
Join Date: Mar 2016
Posts: 117
|
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
);
);
Last edited by kawa_; 07-11-2017 at 11:52 AM.
|
|
|
07-20-2017, 06:18 AM
|
#1480
|
Human being with feelings
Join Date: Dec 2015
Posts: 73
|
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);
|
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:09 PM.
|