Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 07-09-2020, 12:27 AM   #1
joeyx
Human being with feelings
 
joeyx's Avatar
 
Join Date: Dec 2017
Location: Los Angeles and San Francisco
Posts: 56
Default MIDI Editor Script: Insert/Delete specific pitch at edit cursor?

Anyone know of an action or pair of actions that could insert and delete one specific pitch at the edit cursor in the MIDI Editor? Not to delete all same pitches in midi item...

Deletion Example:

You have already moved edit cursor to Bar 1, Beat 1. Two pitches appear, C1 and C2. Action selects and deletes only C1.

Insertion Example:

You have already moved edit cursor to Bar 1, Beat 1. Two pitches appear, C1 and C2. Action inserts C3 according to grid length.

Being able to specify the target pitch is obviously important. Maybe less obvious would be to save each pitch as it's own script. i.e. Insert C1, Insert C#1, Insert D1 etc....Delete C1, Delete C#1, Delete D1 etc.

Thanks!
joeyx is offline   Reply With Quote
Old 07-09-2020, 12:50 AM   #2
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,009
Default

Quote:
Originally Posted by joeyx View Post
Two pitches appear
what do you mean by that?
daniellumertz is online now   Reply With Quote
Old 07-09-2020, 08:49 AM   #3
joeyx
Human being with feelings
 
joeyx's Avatar
 
Join Date: Dec 2017
Location: Los Angeles and San Francisco
Posts: 56
Default

At Bar 1, Beat 1, both C1 and C2 have been entered in the midi editor. I.e. they appear because they’ve been entered. They are two pitches, one octave apart...

If you were to open the midi editor, set grid length to anything you like, and then use mouse to enter a C1 and a C2 at Bar 1, beat 1, you would see this illustrated.

Not sure I can use words to explain it any further...

Quote:
Originally Posted by daniellumertz View Post
what do you mean by that?
joeyx is offline   Reply With Quote
Old 07-09-2020, 09:09 AM   #4
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,009
Default

ok so basically what you want is a bunch of actions to delete an specific pitch( you would have one for each pitch(unless you want the action to have some user input/GUI)) that start at edit cursor?


well it is easy to make a script for that, the thing why? why would you need that, maybe there is better solutions and actions


there are somethings that I don't get still like
Quote:
Originally Posted by joeyx View Post
You have already moved edit cursor to Bar 1, Beat 1. Two pitches appear, C1 and C2. Action inserts C3 according to grid length.
What the notes C1 and C2 that are in the midi item have to do with the inserted one with the script?

Maybe this will help you https://forum.cockos.com/showthread.php?t=235833
check obogz script if you are trying to make an way to step input and delete midi notes via actions.

sorry if I still misunderstood you
daniellumertz is online now   Reply With Quote
Old 07-09-2020, 09:50 AM   #5
joeyx
Human being with feelings
 
joeyx's Avatar
 
Join Date: Dec 2017
Location: Los Angeles and San Francisco
Posts: 56
Default

Ultimately, I would be using this action as part of a cycle action to work alongside TouchOSC so that I could create a 16 step beat sequencer using toggle buttons. I have another thread here that talks about this and links to a video of what I'm trying to achieve with Reaper and TouchOSC.

https://forum.cockos.com/showthread.php?t=239430

The video is worth 1,000,000 words in terms of illustrating the goal...

The unique cycle action I'm thinking of to assign to each toggle button inside TouchOSC would look something like this:

- Restore edit cursor position, slot 01 (save position as bar 0, beat 1 using the related save action)

- Step input: Insert pitch x in first grid unit to right of edit cursor(this is the script I think I need, or something that does the same thing)

-----Step------

- Restore edit cursor position, slot 01

- Edit: Delete pitch x in first grid unit to right of edit cursor (this doesn't exist yet AFAIK)

If there is an easier way you know of to achieve the type of beat sequencing touch functionality that is demonstrated in the video, I would be VERY HAPPY to know

Ideally, we'd be able to have a touch version of Sequencer Megababy, but maybe that's just wishful thinking at this point?

In any case, the above cycle action and manually assigning these pitch-specific cycle actions to toggle buttons from TouchOSC is the only way I'm seeing to make this happen. Again, I would be curious to see any more efficient ways of achieving this - and I'm sure there are some!!




Quote:
Originally Posted by daniellumertz View Post
ok so basically what you want is a bunch of actions to delete an specific pitch( you would have one for each pitch(unless you want the action to have some user input/GUI)) that start at edit cursor?


well it is easy to make a script for that, the thing why? why would you need that, maybe there is better solutions and actions


there are somethings that I don't get still like

What the notes C1 and C2 that are in the midi item have to do with the inserted one with the script?

Maybe this will help you https://forum.cockos.com/showthread.php?t=235833
check obogz script if you are trying to make an way to step input and delete midi notes via actions.

sorry if I still misunderstood you
joeyx is offline   Reply With Quote
Old 07-12-2020, 12:21 PM   #6
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,009
Default

sorry the delay, I'm kinda in a rush but at the same time dragging with some personal things....

so cool video, he mentioned he did in PD, I used some time ago it is cool to program, MAX also can be helpfull.

I dont know if the idea to make a bunch of script to insert notes at specifc times positions would be the right one, I can try to make one and you see if it is what you want you can duplicate to make the others. When I find some spare time I will try.

But I think an more elegant solution (and easier/flexible) would be to use a step sequencer (like megababy) but that accepts MIDI to input the steps. I never programmed the JSFX but I think is more than doable to edit megababy to accept midi to fill the steps, then make an map in the touch osc, I think this would be a better solution.

There may be already some vst / jsfx that do that so, some reasearch for that would be good before....


As I said I'm in some rush else I could give it a closer look, as it is good project !

Maybe someone that knows jsfx here in the forum....
EDIT:
You could also ask him his patch as pd is freewere then route the midi from PD to Reaper
Have not tried but found this http://www.geekasaurusrex.net/page/V...l-Surface.aspx

Last edited by daniellumertz; 07-12-2020 at 12:45 PM.
daniellumertz is online now   Reply With Quote
Old 07-12-2020, 02:00 PM   #7
joeyx
Human being with feelings
 
joeyx's Avatar
 
Join Date: Dec 2017
Location: Los Angeles and San Francisco
Posts: 56
Default

Quote:
Originally Posted by daniellumertz View Post

But I think an more elegant solution (and easier/flexible) would be to use a step sequencer (like megababy) but that accepts MIDI to input the steps. I never programmed the JSFX but I think is more than doable to edit megababy to accept midi to fill the steps, then make an map in the touch osc, I think this would be a better solution.
Yes, this would be the ideal solution! Megababy is already great as it is and I think you can control all the parameters except for the steps if using a control surface.

I guess that begs the next question: Anyone out there know how to get megababy to accept MIDI or OSC to toggle its steps on/off?
joeyx is offline   Reply With Quote
Old 07-12-2020, 04:15 PM   #8
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,009
Default

Quote:
Originally Posted by joeyx View Post
Yes, this would be the ideal solution! Megababy is already great as it is and I think you can control all the parameters except for the steps if using a control surface.

I guess that begs the next question: Anyone out there know how to get megababy to accept MIDI or OSC to toggle its steps on/off?
I suggest create an topic in the script area of this forum with this last question and the video
daniellumertz is online now   Reply With Quote
Old 07-12-2020, 10:53 PM   #9
joeyx
Human being with feelings
 
joeyx's Avatar
 
Join Date: Dec 2017
Location: Los Angeles and San Francisco
Posts: 56
Default

Quote:
Originally Posted by daniellumertz View Post
I suggest create an topic in the script area of this forum with this last question and the video
New thread started:

https://forum.cockos.com/showthread....71#post2318371

Thanks Daniel!
joeyx 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 02:05 PM.


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