Trim MIDI event length

Cheers, thanks a lot guys. I really appreciate all you help.
So I made a macro based on vic_france’s suggestion.
The macro now looks like this:

Edit - Open Key Editor
Edit - Select All
Transport - Locators to Selection
File - Close
Edit - Split Loop
Edit - Select All on Tracks
Process Project Logical Editor - Delete empty parts

Works like a charm!

Great! :slight_smile:

I’ve been looking for something like this for some time,
I got all the lines working in my macro, except the last line
Process Project Logical Editor - Delete empty parts

I don’t have anything like that in the Process L+project Logical Editor section.

I’m using cubase 7.5.

Well, Opening 7.06 here and the Process Project Logical editor section have WAY MORE options than my 7.5!

Really strange. Any idea what’s going on?

Here is my 7.5 Screen! I’ve also trashed 7.5 preferences but nothing changed.

You’re on Mac, right?..
In the Finder, select your Cubase 7.5 app, then “Show Package Contents” (either from the right-click context menu, or from the “Actions” tab at the top of the Finder window).
Navigate to Contents>presets>Project Logical Editor (where you should find all the presets intact).
Also open your Cubase 7.5 Preferences folder, and navigate to the corresponding presets subfolder.
Copy from the Package Contents into it everything that is missing. (you might like to also verify the other presets subfolders while you are at it :wink: )

You rock, vic_france!

It worked!

Copied from c7 User/Lib/Preferences to c7.5 user/lib/Preferences and it worked! :smiley:

thx man!

Just to help out others in case they need it:
I had the same problem as pgstudio. But I am using windows 8 so I had to copy everything inside the “presets” folder (C:\Program Files\Steinberg\Cubase 7.5\Presets) to (C:\Users\Username\AppData\Roaming\Steinberg\Cubase 7.5_64\Presets)

I just realized, after upgrading to Cubase Pro 8, that “delete empty parts” in the project logical editor is not working if there is sustain data on the MIDI track because the Logical Editor understands this as “part not empty” I guess…

Since I am playing piano a lot I always use the sustain pedal. Is there a way to make “delete empty parts” ignore the sustain?

I need whole note chords for arpeggiators and such so I record them then quantize them with whole notes AND set it to quantize the end so they the notes will be made 4 beats long.

You could do that with any size, if you needed eighth notes or whatever.

Could be done for a selection of notes.

I don’t think I got the relevance here. I think you are talking about something a bit different here…

Can I ask how you arrive at a MIDI Part that is empty apart from the sustain pedal? (I mean, why isn’t that pedal data part of the previous Part, that, presumably, contains the notes that were intended to be sustained?).

Thanks for asking. Well… as I wrote in a previous post I use the following macro to “trim” the MIDI events I have recorded:

The problem now is that since there is sustain data on the events, the “Process Project Logical Editor - Delete empty parts” wont delete them. Does this make sense?

So I end up with this instead:
http://goo.gl/Z4yrKX

I have just tried your macro, and there is indeed something going wrong (the macro itself seems perfect :wink: )…
It would appear that when using the function “Split Loop” (whether via a macro or directly), when there is a CC# event at the Right Locator, that CC# event is deemed to be after the Right Locator. (in other words… not your fault at all… I’d even go so far as to say… a bug! :wink: ).
So, I have managed to concoct something that will advance the pedal off data by one tick, so that the last one remains inside the range before splitting (and, hopefully, any other pedal off events…which will also get advanced by one tick, unfortunately, shouldn’t make any appreciable difference to the rest of the performance**). You need to create a Logical Editor Preset (NB… Logical Editor, not Project Logical Editor :wink: ), then add that Preset to your macro, immediately after the line “Transport - Locators to Selection”.

[Important] Also, make sure that in Preferences>Editing>MIDI, that “Split MIDI Controllers” is not checkmarked.

Here’s the Logical Editor Preset…

Upper Section…
Type Is___Equal___Controller___And
Value 1___Equal___64___And
Value 2___Equal___0

Lower Section…
Position___Subtract___0.00.00.001 PPQ

Function = “Transform”.

Save the Logical Editor Preset, with an easily recognisable name, e.g. “Advance Pedal Off”,
then edit your macro so that after the line “Transport - Locators to Selection”, you insert “Process Logical Preset - Advance Pedal Off”, followed by the remainder of your existing macro.

Anyways, it’s a bug, and not your fault :wink:.


**
I didn’t think it would be worth the extra effort to try to isolate just that last pedal off event, but you might want to try having a go at that, one evening when the TV is lousy :wink:.

I was thinking OP wanted to trim midi notes.

Have to read closer, sorry.

or get glasses.

Thanks so much for the effort. I really appreciate it.
It’s still not working though. I triple checked to make sure I did everything right. I end up with the same result and I think it’s because the subtraction is relative (every recording is different) so it’s not going to adjust the sustain outside the event, which means the PLE is not going to delete that part (because it’s not empty).

It seems like Cubase has changed in the way the PLE detects empty parts, because I didn’t use to have this problem.

Now… I was thinking if there was only a way to detect empty parts regardless of the sustain or controller data. That would help a lot.

Also is there any way of applying the Project Logical Editor to a selected track only?

Just trying to look for alternatives but, I am not overconfident with the PLE :confused:

Finally! :smiley: I made it! I had to do everything different, using names as a basis for what should be deleted and not. I had to use one custom Logical Editor and three Project Logical Editors though…

So the macro is now as follows:
Edit - Open Key Editor
Process Logical Preset - Select All Notes [1]
Transport - Locators to Selection
Transport - Locate Selection
File - Close
Process Project Logical Editor - Rename selected to removable [2]
Edit - Split Loop
Edit - Select Events under Cursor
Process Project Logical Editor - Rename selected to keeping**[3]**
Process Project Logical Editor - Remove removable [4]

[1] Process Logical Preset - Select All Notes:
Top window:
Type Is - Equal - Note
Function - Delete

[2] Process Project Logical Editor - Rename selected to removable:
Top Window:
Property - Property is set - Event is selected
Bottom window:
Name - Replace - Removable
Function: Transform

[3] Process Project Logical Editor - Rename selected to keeping:
Top Window:
Property - Property is set - Event is selected
Bottom window:
Name - Replace - keeping
Function: Transform

[4] Process Project Logical Editor - Remove removable:
Top window:
Media type is - Equal - MIDI - And
Name - Equal - removable
Function: Delete


It took me hours to figure this out really. I had to go through like 5 other theories first but it was definitely worth it. The only thing I have to keep in mind now is not to accidentally name anything “removable” or “keeping” hehe :smiley:

A MIDI Part is either empty or it isn’t :wink:
If it hasn’t deleted a Part (in this instance) it is because there is still a Pedal Off event at the start of the Part. Like I said, having selected all the events (of which, the last event is probably going to be the last Pedal Off event), and used "Locators to Selection, the “Split Loop” function unfortunately considers that last Pedal Off to be outside the loop (so it now belongs to the beginning of the Part after the split, which then becomes of course, ipso facto, no longer empty).
(I’ll have to go check whether it behaved the same in Cubase 7.5… seeing as you say it used to work o.k.)
[EDIT] I’ve just checked, and it behaves exactly the same way in Cubase 7.5.30 [/EDIT]

Anyways, I tried the above, and it works (I wouldn’t have posted it otherwise :wink: ).
Did you make sure that “Split Controllers” was uncheckmarked in Preferences (because if not, it would place a duplicate of the CC# event after the split anyways :wink: )?

For the PLE to act on just a selected track, the PLE Preset would have to include the lines “Container___Equal___Track”, and “Property___ Is Selected”.

I did check that the Split Controllers was off. I made sure that everything was set up as you said. The only thing that was different this time was the actual recording.

Thanks! I could probably simplify the process with this but I think I have had enough for one day dow haha.

Just wanted to THANK YOU for this! This is huge for me!

Just to make make a tiny correction

“[1] Process Logical Preset - Select All Notes:
Top window:
Type Is - Equal - Note
Function - Delete”

In the end should be Select instead of Delete :slight_smile: It’s working great in C10.5.

Regards!