Old 01-05-2020, 07:15 AM   #1
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default Lua Scripts - Cakewalk CAL

Hey guys. Here are some CAKEWALK CAL-like Lua scripts. For friends who use a lot of mouse operations, I think it should be of some help.

The following script works based on Ticks(PPQ). If you use other time formats, it is recommended to change the time format to Measures.Beats.MIDI_ticks.

Thank you!

zaibuyidao_Bank Program Select.lua -- Insert Program, enter Bank


zaibuyidao_Humanize Velocity.lua -- Humanize Velocity


zaibuyidao_Insert Auto CC Shape.lua -- Automatic expression by CC Shape


zaibuyidao_Insert Bend.lua -- Guitar Bending (Enter a multiple of 128)


zaibuyidao_Insert CC Events 1 (For Selected Notes).lua -- Select the note to insert a CC event, a value.


zaibuyidao_Insert CC Events 2 (For Selected Notes).lua -- Select the note to insert the CC event, two values.(Demonstrated piano sustain pedal)


zaibuyidao_Insert Pitch Bend (Semitone).lua -- Insert semitones in the range of -12 to 12. Enter 1 to get a value of 683, enter 2 to get a value of 1366, and so on.


zaibuyidao_Insert Pitch Bend.lua -- Insert pitch bend, ranging from -8192 to 8191.


zaibuyidao_Insert Random CC Events.lua -- Insert random CC event at cursor position


zaibuyidao_Insert Vibrato.lua -- Insert Vibrato at cursor position


zaibuyidao_Insert Wah.lua -- Insert Wah at the cursor position


zaibuyidao_Linear Ramp CC Events.lua -- Linear Ramp CC Events,The CC value is increased from low to high on each note.


zaibuyidao_Notes Become Pitch Bend.lua -- Automatic pitch bend By Notes


---

01 - Script requires SWS extension support
Code:
https://www.sws-extension.org/
02 - How install - use ReaPack:
Code:
https://reapack.com/
Link to my repository must be added manually:
Code:
https://github.com/zaibuyidao/ReaScripts/raw/master/index.xml
03 - MIDI Ediror: Options
Code:
Options -> Time format for ruler, transoprt, event properties -> Measures.Beats.MIDI_ticks
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)

Last edited by zaibuyidao; 03-05-2020 at 09:34 AM.
zaibuyidao is online now   Reply With Quote
Old 01-05-2020, 07:16 AM   #2
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

zaibuyidao_Select Note.lua -- Select notes, engraving Cakewalk's Event Filter.


zaibuyidao_Select Wheel.lua -- Select pitch bend, engraving Cakewalk's Event Filter.


zaibuyidao_Select Control.lua -- Select CC events, engraving Cakewalk's Event Filter.


zaibuyidao_Set CC Value.lua -- Set CC value


zaibuyidao_Set Note Length.lua -- Set note length


zaibuyidao_Slide -.lua & Slide +.lua -- Nudge notes at intervals of 10 Ticks


zaibuyidao_Slide In.lua -- Pitch bend slide in, need to set time selection


zaibuyidao_Slide Out.lua -- Pitch bend slide out, need to set time selection


zaibuyidao_Split Notes.lua -- Enter Tick value to split notes


zaibuyidao_Random CC Value.lua -- Random CC value


zaibuyidao_Random Velocity.lua -- Random velocity


zaibuyidao_Trim Note Right Edge.lua -- Increase or decrease the length of the right edge of the note
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)

Last edited by zaibuyidao; 03-05-2020 at 09:27 AM.
zaibuyidao is online now   Reply With Quote
Old 01-05-2020, 08:40 AM   #3
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
Default

Wah they seems really cool! I'm going to try them out, thanks!!

Edit: btw would it be possible to add a knob or fader to control the values instead of typing them?

Last edited by Vagelis; 01-05-2020 at 08:45 AM.
Vagelis is online now   Reply With Quote
Old 01-05-2020, 09:13 AM   #4
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
Default

I got this error when i tried to download from Reapack.

Vagelis is online now   Reply With Quote
Old 01-06-2020, 07:16 AM   #5
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Quote:
Originally Posted by Vagelis View Post
I got this error when i tried to download from Reapack.

You need to copy the url's address, not its text.
Ozman is offline   Reply With Quote
Old 03-05-2020, 09:08 AM   #6
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Updated several scripts:

zaibuyidao_Scale Velocity (Enhanced Version).lua -- Scale Velocity 2 in 1 to replicate Cakewalk's Scale Velocity function.
0 Default Scale velocity
1 Use percentage


zaibuyidao_Length (Enhanced Version).lua -- Length tool 3-in-1, engraving Cakewalk's Length function.
0 Start time + Durations
1 Start time
2 Durations


zaibuyidao_Duplicate Events (Within Time Selection).lua -- Duplicate events, automatic creation of time selection ranges to extend boundaries


zaibuyidao_Copy Selected Rhythm.lua -- Copy Selected Rhythm
zaibuyidao_Paste Selected Rhythm.lua -- Paste Selected Rhythm


zaibuyidao_Copy Selected Arpeggio.lua -- Copy Selected Arpeggio
zaibuyidao_Paste Selected Arpeggio.lua -- Paste Selected Arpeggio


zaibuyidao_Chord Inversion.lua -- Chord inversion up and down


zaibuyidao_Chord Inversion (Start Base).lua -- Chord inversion (Start Base) up and down


zaibuyidao_Rhythm Layer Selection.lua -- Rhythm layer selection (Support reverse selection)


zaibuyidao_Strum Velocity Decrement.lua -- Strum Velocity Decrement


zaibuyidao_Quantize (Enhanced Edition).lua -- Quantization tool 3-in-1. Entering a Tick value for quantization is particularly suitable for quantizing dense CC data.
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)
zaibuyidao is online now   Reply With Quote
Old 03-05-2020, 08:15 PM   #7
cool
Human being with feelings
 
Join Date: Dec 2017
Location: Sunny Siberian Islands
Posts: 957
Default

Thanks for the coolest scripts!
I found a couple of bugs: when copying a rhythm, the paste does not work correctly, the pattern sets to the beginning of the measure. Similar behavior when copying / pasting arpeggios.
Gif:

cool is offline   Reply With Quote
Old 03-06-2020, 12:58 PM   #8
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by cool View Post
Thanks for the coolest scripts!
I found a couple of bugs: when copying a rhythm, the paste does not work correctly, the pattern sets to the beginning of the measure. Similar behavior when copying / pasting arpeggios.
Yes, it was originally pasted based on the measure. Now that the bug is fixed, you can download the update in ReaPack.
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)
zaibuyidao is online now   Reply With Quote
Old 03-06-2020, 08:22 PM   #9
cool
Human being with feelings
 
Join Date: Dec 2017
Location: Sunny Siberian Islands
Posts: 957
Default

Quote:
Originally Posted by zaibuyidao View Post
Yes, it was originally pasted based on the measure. Now that the bug is fixed, you can download the update in ReaPack.
Thank you, works great!
cool is offline   Reply With Quote
Old 03-07-2020, 12:31 PM   #10
Reflected
Human being with feelings
 
Reflected's Avatar
 
Join Date: Jul 2009
Posts: 3,294
Default

Amazing!
gonna try.
Reflected is online now   Reply With Quote
Old 07-26-2020, 12:50 PM   #11
SNJUK2
Human being with feelings
 
SNJUK2's Avatar
 
Join Date: Feb 2017
Location: Zhytomyr,Ukraine
Posts: 449
Default

Hi Like your scripts Have a question

I work with action markers ,but they not work in Midi Editor section
I copy script Script: zaibuyidao_Random Velocity.lua
to Main section
It's work ,but only if Media Explorer is open
if close - Random Velocity.lua:29: bad argument #1 to 'MIDI_CountEvts' (MediaItem_Take expected)
is it possible fix it?


Thanks!

Last edited by SNJUK2; 07-27-2020 at 04:37 AM.
SNJUK2 is offline   Reply With Quote
Old 07-27-2020, 06:42 AM   #12
Reflected
Human being with feelings
 
Reflected's Avatar
 
Join Date: Jul 2009
Posts: 3,294
Default

Cool
***Gotta Check These***
Reflected is online now   Reply With Quote
Old 07-27-2020, 03:53 PM   #13
Chimpscookie
Human being with feelings
 
Join Date: Sep 2019
Posts: 175
Default

Very useful tools indeed. I'm already using them. Thanks, zaibuyidao.
Chimpscookie is offline   Reply With Quote
Old 07-28-2020, 10:17 AM   #14
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by SNJUK2 View Post
I work with action markers ,but they not work in Midi Editor section
Which [action markers] are you using? I am not sure about the script you mentioned.

Quote:
Originally Posted by SNJUK2 View Post
if close - Random Velocity.lua:29: bad argument #1 to 'MIDI_CountEvts' (MediaItem_Take expected)
[Script: zaibuyidao_Random Velocity.lua] does not support use in the [Main Section], it is only available in [MIDI Editor]. Therefore, if it is used under [Main Section], there will be problems. I just added the code, and now it can be used on the [Main Section]. You can try to update it in ReaPack.
zaibuyidao is online now   Reply With Quote
Old 07-28-2020, 10:22 AM   #15
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by Chimpscookie View Post
Very useful tools indeed. I'm already using them. Thanks, zaibuyidao.
Thanks!
zaibuyidao is online now   Reply With Quote
Old 07-28-2020, 01:36 PM   #16
SNJUK2
Human being with feelings
 
SNJUK2's Avatar
 
Join Date: Feb 2017
Location: Zhytomyr,Ukraine
Posts: 449
Default

Thank you Script work perfect
SNJUK2 is offline   Reply With Quote
Old 07-31-2020, 04:49 AM   #17
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Hi, thanks for the scripts. I've tried some and in inversion scripts I have noticed you do not take notation into consideration. As you delete and create new notes, notation gets lost on deletion.
bFooz is offline   Reply With Quote
Old 08-07-2020, 05:05 AM   #18
Reflected
Human being with feelings
 
Reflected's Avatar
 
Join Date: Jul 2009
Posts: 3,294
Default

zaibuyidao_Notes Become Pitch Bend.lua:69: attempt to perform arithmetic on a nil value (local 'value')


steps:

1 arm action
2 selecting notes
3 crash
Reflected is online now   Reply With Quote
Old 08-07-2020, 08:58 AM   #19
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by Reflected View Post
zaibuyidao_Notes Become Pitch Bend.lua:69: attempt to perform arithmetic on a nil value (local 'value')
Thanks for the feedback. Because the note processed by this script can only be one octave at most, it will be invalid if it exceeds it, because the maximum pitch bend range is -8192 through 8191. I have fixed the error message and will update to ReaPack in two days.
zaibuyidao is online now   Reply With Quote
Old 08-07-2020, 09:14 AM   #20
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by bFooz View Post
As you delete and create new notes, notation gets lost on deletion.
Hello. I don't usually work in [Notation] mode, so I may have overlooked something. I just tested it and it seems to be working fine. To use inversion scripts, you need to select the note in advance. If you delete or create a note at this time, the selected state will be lost and you need to reselect it.
zaibuyidao is online now   Reply With Quote
Old 08-07-2020, 09:35 AM   #21
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Quote:
Originally Posted by zaibuyidao View Post
Hello. I don't usually work in [Notation] mode, so I may have overlooked something. I just tested it and it seems to be working fine. To use inversion scripts, you need to select the note in advance. If you delete or create a note at this time, the selected state will be lost and you need to reselect it.
Thanks for the reply. Here's a gif to illustrate the issue:



In my own scripts, I find a note and set it to a new value, whether it's pitch or anything else. This way all accompanying (current and future, known or unknown) data is preserved without any additional work by the script.
bFooz is offline   Reply With Quote
Old 08-11-2020, 08:44 PM   #22
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by bFooz View Post
In my own scripts, I find a note and set it to a new value, whether it's pitch or anything else. This way all accompanying (current and future, known or unknown) data is preserved without any additional work by the script.
I figured out the problem you said. Because the selected note will be deleted and a new note will be recreated. This problem may not be solved.

I will continue to pay attention to this issue, thank you for your reply.
zaibuyidao is online now   Reply With Quote
Old 02-11-2022, 09:33 AM   #23
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by bFooz View Post
Thanks for the reply. Here's a gif to illustrate the issue:



In my own scripts, I find a note and set it to a new value, whether it's pitch or anything else. This way all accompanying (current and future, known or unknown) data is preserved without any additional work by the script.
Hi, bFooz. You try these three (Fast) scripts:

Script: zaibuyidao_Chord Inversion (Fast).lua
Script: zaibuyidao_Chord Inversion +01 (Fast).lua
Script: zaibuyidao_Chord Inversion -01 (Fast).lua

I think the problem is solved.
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)
zaibuyidao is online now   Reply With Quote
Old 02-19-2022, 02:21 AM   #24
SoaSchas
Human being with feelings
 
Join Date: May 2020
Posts: 12
Default

Hello. Thanks for making these awesome scripts. They basically added every feature I always wanted for reapers midi editor.
Only one thing.
When using copy/paste selected arpeggio. it would be nice if it would be continously.
Like lets say I have one 2 measure arpeggio pattern, and want to paste it on 2 one measure long chords. At the moment it applys the full pattern to every chord.
I know its possible to copy every measure seperately, but this would speed things even more up.
SoaSchas is offline   Reply With Quote
Old 01-09-2023, 06:07 AM   #25
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
Default

Hi there! Didn't know where to post for a specific script of yours, but just used one of your scripts (called zaibuyidao_Random Notes Position (Customize).lua) and i think i found a bug. When I'm running it multiple times to get different variations, the length of the notes is changing as shown in the gif below.



Could this be improved somehow so that the length of the notes is staying always intact? Thanks!
Vagelis is online now   Reply With Quote
Old 09-05-2023, 10:43 PM   #26
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by SoaSchas View Post
Like lets say I have one 2 measure arpeggio pattern, and want to paste it on 2 one measure long chords. At the moment it applys the full pattern to every chord.
If I'm not mistaken, by "2 measure arpeggio pattern", are you referring to two different chord progressions with distinct note arrangements?
Perhaps you can paste in conjunction with selecting notes based on whether the measure is odd or even. Please see the demonstration:


Below are the scripts for selecting notes in specified measures:
zaibuyidao_Select Notes In Odd Measures.lua
zaibuyidao_Select Notes In Even Measures.lua
zaibuyidao_Toggle Select Notes in Measure Groups.lua
zaibuyidao_Toggle Select Notes in Measure Groups (Before).lua
zaibuyidao_Toggle Select Notes in Measure Groups (After).lua
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)
zaibuyidao is online now   Reply With Quote
Old 09-05-2023, 10:48 PM   #27
zaibuyidao
Human being with feelings
 
Join Date: Jan 2020
Location: Amoy
Posts: 179
Default

Quote:
Originally Posted by Vagelis View Post
Hi there! Didn't know where to post for a specific script of yours, but just used one of your scripts (called zaibuyidao_Random Notes Position (Customize).lua) and i think i found a bug. When I'm running it multiple times to get different variations, the length of the notes is changing as shown in the gif below.



Could this be improved somehow so that the length of the notes is staying always intact? Thanks!
Yes, this script has some issues; errors occur when notes overlap. I have rewritten a set of scripts for random notes. I hope they will be helpful to you.
__________________
Hi, the pronunciation of my English name is "TSAI PU YI TAO".
Game Sound Effects Tag Searcher | New Articulation Map
zaibuyidao ReaScripts | ReaPack Repository (right-click and copy index URL)
zaibuyidao is online now   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:58 AM.


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