Old 01-09-2014, 03:44 AM   #1
mistertate
Human being with feelings
 
Join Date: Jan 2014
Posts: 4
Default Best way to edit the MIDI chunk

Hello all and thanks in advance for any reply: quite a bit of a ReaScript noob here.

Let's say I needed to delete a MIDI note via ReaScript. Is there any better/safer way to do that by getting the MIDI chunk, exploding it, deleting the note on and off events, changing the note on event for the following note to account for the new offset, putting the chunk back together and overwriting it?

I'm asking because I would need to edit/delete many MIDI notes in a track and the process seems cumbersome and potentially destructive if any of my calculations to re-serialize all MIDI events are wrong. I suppose what I'm asking is if there's an already coded library/script that treats MIDI events like single objects (with length instead of 2 events, note on and note off) and then takes care of updating what's needed in the MIDI chunk.

Again, thanks for any help!
mistertate is offline   Reply With Quote
Old 01-09-2014, 04:11 AM   #2
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

AFAIK editing the chunk is the only way to do it, unfortunately.
EvilDragon is online now   Reply With Quote
Old 01-09-2014, 05:03 AM   #3
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Get SWS, install it and then check ReaScript html documentation for functions prefixed with FNG. Nice set of tools for dealing with MIDI made by Fingers!
Breeder is offline   Reply With Quote
Old 01-09-2014, 06:05 AM   #4
mistertate
Human being with feelings
 
Join Date: Jan 2014
Posts: 4
Default

Quote:
Originally Posted by Breeder View Post
Get SWS, install it and then check ReaScript html documentation for functions prefixed with FNG. Nice set of tools for dealing with MIDI made by Fingers!
Thanks, I had already taken a look into this but I can't you anything after I believe v4.25 because MIDI notes get all out of place. I'll probably open a new thread for that while I'm at it.

Anyway, let's say I can use v4.33, I don't see a function to remove a MIDI note. I see an FNG_AddMidiNote but no function to remove. Am I missing it or is there no function for that?
mistertate is offline   Reply With Quote
Old 01-09-2014, 02:04 PM   #5
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

It seems there isn't. May I suggest you put all your bug reports and feature requests on SWS issue tracker, so they don't go unnoticed.
Breeder is offline   Reply With Quote
Old 01-17-2014, 04:02 AM   #6
frediuncle
Human being with feelings
 
Join Date: Jan 2014
Posts: 1
Default

Anyway, let's say I can use v4.33, I don't see a function to remove a MIDI note. I see an FNG_AddMidiNote but no function to remove. Am I missing it or is there no function for that?
frediuncle 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 06:29 AM.


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