# Quantize MIDI that have Automation?



## alb13 (Feb 19, 2018)

Hi!
When recording MIDI Strings and Winds we end up with a performance that have lots of modulation.

I often want to quantize this performance, resulting in the MIDI notes being on the grid but the modulation left unaffected (see attached picture).

How do you guys go about this procedure? Is there any DAW that is able to move the modulation simultaneously with the MIDI notes?


----------



## Jerry Growl (Feb 20, 2018)

Hi,

I really hope to find out if there are better ways of doing it, too!

By default automation is obviously not affected by Quantizing. You can select all corresponding controller data and move things manually if you want to micro-manage timings. But if you have a constant timing problem (delay) as result to VI response, it might be best to find an offset timing that works for that instrument.

I'll try to explain:
When you play/record midi (especially from a sample based midi instrument) there is usually a delay (your VI probably has a built-in buffer but many types of instruments also give additional sample based delay, because they have some milliseconds of a preroll, pre-attack or natural fade-in before the tone gets full). Sometimes there is even a midi delay in the response of your midi hardware (keyboard controller) and again inside the interface. Al these very small amounts of delay add up with the response of your DAW (hardware buffer). The sum of all that delay piled up is at the end no longer a marginal amount.

Personally I have a habit of adapting to such a delay while playing. In practice I will be hitting the keys a bit earlier so that the result coming from the speakers sounds 'sync'. So as player I am delay-compensating myself while focusing on the audio playback. This is possibly not the best way of working, but well it works for me. (I think a wise composer perhaps has this offset built in per track depending on the instrument)
As a result when i play freshly recorded tracks without offset I will hear myself being out of sync since I was hitting the keys too soon in order to hear my self 'in sync'.
The reason the playback is out of sync is because part of the delay is now 'handled' by the DAW and compensated for. Best way to do deal with this, is to find how long this general delay error has become, and offset the playback delay (-x ms) in your instrument track to get things as supposed. To find out the exact delay per track would be to record short percussive notes, and compare how much later/sooner the audio recording needs to start in order to be sync (that's gonna be your offset).

I guess if you get the delay problem fixed you will actually have less need of quantizing. And if you do use it, try using 'iterative' quantizing (by percentage).


----------



## EvilDragon (Feb 20, 2018)

A good DAW will allow you to move MIDI CCs along when you move the notes. Not sure if the same would happen during quantize, I guess that depends.


----------



## alb13 (Feb 20, 2018)

EvilDragon said:


> A good DAW will allow you to move MIDI CCs along when you move the notes. Not sure if the same would happen during quantize, I guess that depends.


Thank you! What DAW do you think of?


----------



## EvilDragon (Feb 20, 2018)

I can only speak from perspective of Reaper...


----------



## Xaviez (Feb 20, 2018)

In Reaper you select what to quantize in the Quantize dialog box, so yes it can move CC, but for me it seems to quantize each individual CC bar so if this is how it works, it's hardly useful:


----------



## alb13 (Feb 20, 2018)

EvilDragon said:


> I can only speak from perspective of Reaper...


Incredible! Just what I was looking for
Thanks a lot!


----------



## alb13 (Feb 20, 2018)

Xaviez said:


> In Reaper you select what to quantize in the Quantize dialog box, so yes it can move CC, but for me it seems to quantize each individual CC bar so if this is how it works, it's hardly useful:


Great! Thank you!


----------



## EvilDragon (Feb 20, 2018)

Yeah, I'm not sure how it would quantize CCs any differently than that, honestly. Best just use manual adjustment.


----------



## alb13 (Feb 20, 2018)

Does anyone have experience from Cubase, Logic or Pro Tools?


----------



## Jerry Growl (Feb 20, 2018)

In cubase the CC data will folow the quantizing of notes when selecting "Midi CC" (=>highlighted) in the quantize panel:







Or you can select only the CC data in the Controller lanes and quantize them seperately.


----------



## alb13 (Feb 20, 2018)

Jerry Growl said:


> In cubase the CC data will folow the quantizing of notes when selecting "Midi CC" (=>highlighted) in the quantize panel:
> 
> 
> 
> ...


Wow! Awesome! Thanks


----------



## Xaviez (Feb 20, 2018)

EvilDragon said:


> Yeah, I'm not sure how it would quantize CCs any differently than that, honestly. Best just use manual adjustment.


Well best would be if it could quantize the start point of the selection, I get that it's not much different from moving it manually with snap to grid though.

Edit: Clarification, in my head it makes sense if it would treat CC as just one long note rather than a series of events, so if you make a selection of notes and CC, it would quantize each note according to your settings but the CC selection would be quantized to the first note in the selection only.


----------



## Saxer (Feb 20, 2018)

Doesn't quantizing CC data results in CC data blocks exactly on the grid instead of a time corrected curve? When selecting multiple notes the curve has to be shrinked and stretched along with the note positions. It actually has to work the same way audio time stretching works when quantizing time markers. I don't know any DAW that supports that feature for CC data. Would be very helpful though!


----------



## pmcrockett (Feb 20, 2018)

Saxer said:


> Doesn't quantizing CC data results in CC data blocks exactly on the grid instead of a time corrected curve? When selecting multiple notes the curve has to be shrinked and stretched along with the note positions. It actually has to work the same way audio time stretching works when quantizing time markers. I don't know any DAW that supports that feature for CC data. Would be very helpful though!


I don't know of a DAW that can do this, either, and that specific feature was one of the reasons scripting support was so important to me when I began my move away from Sonar. I have scripts for Reaper set up now that are able to distinguish between overlapping legato notes and shrink/grow the CC data accordingly when I nudge the notes. I even have it set so that the attack isn't modified as aggressively as the sustain, because you can do cool things like that when you're in charge of the code.


----------



## Saxer (Feb 20, 2018)

pmcrockett said:


> I have scripts for Reaper set up now that are able to distinguish between overlapping legato notes and shrink/grow the CC data accordingly when I nudge the notes. I even have it set so that the attack isn't modified as aggressively as the sustain, because you can do cool things like that when you're in charge of the code.


That's very cool if you are able to script! 
How does this scripting work in Reaper? Is it possible to send your song to someone else who has Reaper (and your used Plugins/Libraries) and it will sound the same? Or do you have to export an extra scripting level too that has to be installed first?


----------



## pmcrockett (Feb 21, 2018)

Saxer said:


> That's very cool if you are able to script!
> How does this scripting work in Reaper? Is it possible to send your song to someone else who has Reaper (and your used Plugins/Libraries) and it will sound the same? Or do you have to export an extra scripting level too that has to be installed first?


The script is basically just a set of automatic MIDI edits. So I bind the script to a keyboard command, then when I run it, the script moves the note, evaluates the before and after positions of the note in relation to the surrounding notes, and redraws the CC data that apply to that note. The script only needs to be present to make that particular sequence of edits; it isn't needed to run playback or open/edit/save the project file.


----------



## Saxer (Feb 21, 2018)

Ok, thanks!


----------



## alb13 (Feb 21, 2018)

pmcrockett said:


> The script is basically just a set of automatic MIDI edits. So I bind the script to a keyboard command, then when I run it, the script moves the note, evaluates the before and after positions of the note in relation to the surrounding notes, and redraws the CC data that apply to that note. The script only needs to be present to make that particular sequence of edits; it isn't needed to run playback or open/edit/save the project file.


Would it possible to share this script for us?


----------



## musicjon (Feb 21, 2018)

Logic lets you choose this option. 

In the piano roll it's under Functions>Include Non-Note MIDI Events. This lets you quantize or move CC data with notes.


----------



## spotBuddy (Feb 23, 2018)

In Cubase, changing cc's to Note Expression attaches the cc's to each note they go with. Then you can quantize to your heart's content, and the cc's will still provide the musical performance you want, since the cc's stay in their original location relative to the note. If notes overlap after quantizing, there's another command (I can't remember what it's called) that will trim the note expression so that the data at the end of the overlapping note gets deleted while the data at the start of the new note takes over. As far as i'm concerned, unless you can play really great, anyone using a breath or wind controller should be using Cubase, because of this capability.


----------



## alb13 (Feb 23, 2018)

spotBuddy said:


> In Cubase, changing cc's to Note Expression attaches the cc's to each note they go with. Then you can quantize to your heart's content, and the cc's will still provide the musical performance you want, since the cc's stay in their original location relative to the note. If notes overlap after quantizing, there's another command (I can't remember what it's called) that will trim the note expression so that the data at the end of the overlapping note gets deleted while the data at the start of the new note takes over. As far as i'm concerned, unless you can play really great, anyone using a breath or wind controller should be using Cubase, because of this capability.


Brilliant! Exactly what I was thinking. I am using a Breath Controller and really need this feature.


----------



## Nmargiotta (Feb 23, 2018)

musicjon said:


> Logic lets you choose this option.
> 
> In the piano roll it's under Functions>Include Non-Note MIDI Events. This lets you quantize or move CC data with notes.


How have I been working all this time without that! Thank you for sharing


----------



## samphony (Feb 23, 2018)

musicjon said:


> Logic lets you choose this option.
> 
> In the piano roll it's under Functions>Include Non-Note MIDI Events. This lets you quantize or move CC data with notes.


This!


----------



## pmcrockett (Feb 23, 2018)

alb13 said:


> Would it possible to share this script for us?


I've made a thread for it in the Workflow Tips & DIYs section.


----------

