Jump to content

The dreaded MIDI Black Hole!


Recommended Posts

I went and did it again.

Every so often, not often enough it seems, for me to remember how to get myself out of it, I create a MIDI Black Hole. A spot in the Piano Roll from which no sound can ever emanate.

There's a note on the grid in the correct place, I can right click on it to get its properties and there's nothing about it that indicates anything weird. I can delete it and re-enter it and still, no sound. I delete the previous note to make sure it's not the note-off screwing things up. If I nudge the note a little late it will happily sound, but then it will sound too late.

It's a cursed spot on the Piano Roll, a place of no velocity, no note value, no sound, just silence. It sucks sound in and none comes out.

But aha! This time I think to look in the Event List, and yes! It shows that in addition to the note I have entered, there is also a Zero Zero at that same start time, appearing right before it in the list. Apparently in the MIDI spec, in the event of such a collision, it's like a 4-way stop, the first note there wins.

So I zoom and I zoom and sure enough, eventually there's a little speck visible at the leading edge of my non-playing note. I delete this and all is normal and no more MIDI Black Hole on my Piano Roll.

I post the above for the amusement and education of anyone who has suffered from the same phenomenon or may in the future.

Also: combing zero-length (and/or zero velocity) notes out of a project seems like a useful task for a CAL script. Does anyone know of such a script or where I might look for one?

Or maybe there's already an easier way to ferret them out than by poring over the Event List, then zooming in and zapping them?

  • Like 3
Link to comment
Share on other sites

29 minutes ago, Starship Krupa said:

Thank you Mark.

Now I just need to figure out what to do with that elegant bit of code!

I've yet to run a CAL script. This will be my first. Good opportunity.

deleteBlackHole.CAL

Put this in your CAL directory (default is C:\Cakewalk Content\Cakewalk Core\CAL Scripts )

Select your clip, then press CTRL+F1 and double click on this CAL script.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Success! Thank you, Mark.

It got all of them but one that has a duration of 0 and a velocity of 80. I can pick it off manually.

For future encounters, I think it will do exactly what I want if it just looks for (== Note.Dur 0), but I have no reference for CAL of course, and I don't want to take chances with a script that deletes notes.😊

Does that pair of ampersands in "(&& (== Note.Vel 0) (== Note.Dur 0))" mean that both of those have to be true in order to execute "(delete)"?

I notice in the other scripts that there are a lot of doubled-up ampersands, but I can't quite figure out what they do.

Link to comment
Share on other sites

The && operator only works on two expressions, which is why they're nested, as there's 3 conditions:

So if you change "(&& (== Note.Vel 0) (== Note.Dur 0))"  to "(== Note.Dur 0)", it should pick out all notes of a duration of zero.

You still need the (== Event.Kind NOTE) as you only want it to affect notes.

So the adjusted code would look like:

(forEachEvent
  (if (&& (== Event.Kind NOTE) (== Note.Dur 0))
      (delete)  
  )
)

  • Thanks 2
Link to comment
Share on other sites

On 3/7/2019 at 4:13 AM, Starship Krupa said:

I create a MIDI Black Hole. A spot in the Piano Roll from which no sound can ever emanate.

Long way around in describing this, but it was a good read, so you're forgiven.

Also, good to read the solution. I might need it someday.

Link to comment
Share on other sites

Funny Craig pointed it out and beat me too it. And yep I have used that dialog I think since Sonar 6?   And for sure it was because of my attempts at recording my Roland GR 50 to make bass parts. It also comes in handy with my Yamaha DTX drums as the hi hat pedal is glitchy. 

 Those pesky hidden notes are always an issue. I get them a lot when I create a midi track from a real bass track with Melodyne.  For me the dead giveaway is  when a note does not sound or cuts out prematurely.  So I grab the dead note and move it up or down to reveal the hidden note.  Zooming in helps if they are that small.  

Link to comment
Share on other sites

50 minutes ago, Cactus Music said:

Cakewalk has very deep MIDI editing and I'm not sure people realize how deep. After all it started life as a midi editor/sequencer so all those original feature, some of them not even really needed anymore, are still there.  

That's probably one of the main reasons I plan to keep it around! Studio One can't do that sh*t!!! ;)

  • Like 1
Link to comment
Share on other sites

17 hours ago, Larry Jones said:

Long way around in describing this, but it was a good read, so you're forgiven.

Thanks. I was having fun, and in good humour, having found a way out.

And thanks to Mark and Craig for the reminders of how many ways there are to hammer MIDI problems in this program.

Link to comment
Share on other sites

8 hours ago, Cactus Music said:

it was because of my attempts at recording my Roland GR 50 to make bass parts. It also comes in handy with my Yamaha DTX drums as the hi hat pedal is glitchy

For me, it's more like:

1. Practice keyboard part until I flow like Liberace sans candelabra

2.  Arm MIDI track

3. Press R

4. Stagger around on keys like a sedated kitten for 3 or 4 takes until I realize it's not going to get any better

5. Quantize

  • Like 1
Link to comment
Share on other sites

48 minutes ago, Starship Krupa said:

For me, it's more like:

1. Practice keyboard part until I flow like Liberace sans candelabra

2.  Arm MIDI track

3. Press R

4. Stagger around on keys like a sedated kitten for 3 or 4 takes until I realize it's not going to get any better

5. Quantize

Ya, that's exactly where hidden notes come from.   

I know real keyboard players don't quantize for this very reason. But my keyboard and drum chops would never be heard in public without the magic of midi cheating like h--l .  Long live midi editing and especially quantizing. 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...