Re-import MIDI file, strange quantization

This forum is for discussing Reason. Questions, answers, ideas, and opinions... all apply.
Post Reply
User avatar
Boombastix
Competition Winner
Posts: 1929
Joined: 18 May 2018
Location: Bay Area, CA

31 May 2020

So, I recorded some mod wheel data in a Note lane, thinking I could export it and use it in my template and future songs.
Just some 1/4 note LFO sending a sine via loopMIDI.
There are not any settings in the Export Midi menu so I just used that.

But when I bring it back in from my HD, it shows that everything has steps, like some quantization. Seems it does the quantization more or less on a 1/256 interval or 1/128th interval, but not perfectly on grid. Or about 30 ticks resolution, but I did see some a 10 tick resolution.

Since my plan was to make a few LFO types and then time stretch when needed, this does not work when they get quantized.

Is this a know phenomena (bug)?
LFO.jpg
LFO.jpg (55.32 KiB) Viewed 1428 times
10% off at Waves with link: https://www.waves.com/r/6gh2b0
Disclaimer - I get 10% as well.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

31 May 2020

First question - why export it at all, why not just save or copy/paste as is to a new file as your template? This would totally avoid the issue you're seeing!
Also, I use IAC on a Mac (built in) to convert CV to automation (if that's what you're trying to do).
Selig Audio, LLC

User avatar
orthodox
RE Developer
Posts: 2286
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

31 May 2020

Boombastix wrote:
31 May 2020
Is this a know phenomena (bug)?
Yes, It is a known thing. OS midi stream is inaccurate.
Boombastix wrote:
31 May 2020
Since my plan was to make a few LFO types and then time stretch when needed, this does not work when they get quantized.
I used to use external scripts to generate my CV curves as midi files.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

01 Jun 2020

Update - I just did some tests using MIDI Output Device and IAC for loop back (via Easy MIDI inputs). Interesting results:
Buffer size affects resolution (assuming you've selected minimum automation cleanup), with higher buffers producing lower resolution. Also, "Render audio using audio card buffer size setting" can also affect resolution, sometimes requiring a buffer change after selecting to see the results.
With a few tests you can likely improve the quality of the results - try it and report back to see if you're seeing the same thing or not!
[edit: high buffer settings produced very odd results, not sure what's going on - data all over the place!]
Selig Audio, LLC

User avatar
Boombastix
Competition Winner
Posts: 1929
Joined: 18 May 2018
Location: Bay Area, CA

06 Jun 2020

selig wrote:
31 May 2020
First question - why export it at all, why not just save or copy/paste as is to a new file as your template? This would totally avoid the issue you're seeing!
Also, I use IAC on a Mac (built in) to convert CV to automation (if that's what you're trying to do).
Well, if I have more than one template, and then later make new automation clips. Seems easier to mange them as named midi files in a folder. Also, when opening up older songs if I just want to add a newly made clip. I'm thinking of managing them as presets. But, I do consider to add and update templates as well, if nothing else works well.
10% off at Waves with link: https://www.waves.com/r/6gh2b0
Disclaimer - I get 10% as well.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

06 Jun 2020

orthodox wrote:
31 May 2020
Boombastix wrote:
31 May 2020
Is this a know phenomena (bug)?
Yes, It is a known thing. OS midi stream is inaccurate.
Boombastix wrote:
31 May 2020
Since my plan was to make a few LFO types and then time stretch when needed, this does not work when they get quantized.
I used to use external scripts to generate my CV curves as midi files.
He's not streaming, he's exporting, which in theory SHOULD be the highest quality possible, right?
The external scrips idea is very interesting!
Selig Audio, LLC

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

06 Jun 2020

Boombastix wrote:
06 Jun 2020
selig wrote:
31 May 2020
First question - why export it at all, why not just save or copy/paste as is to a new file as your template? This would totally avoid the issue you're seeing!
Also, I use IAC on a Mac (built in) to convert CV to automation (if that's what you're trying to do).
Well, if I have more than one template, and then later make new automation clips. Seems easier to mange them as named midi files in a folder. Also, when opening up older songs if I just want to add a newly made clip. I'm thinking of managing them as presets. But, I do consider to add and update templates as well, if nothing else works well.
OK, I understand now - wish Reason could draw automation in basic waveform shapes as many other DAWs have done for years…
I posted above about how different buffer settings greatly affected the MIDI data using IAC to generate automation clips. It shouldn't be any different but maybe the same things is happening on export (I'll do some testing).
Selig Audio, LLC

User avatar
orthodox
RE Developer
Posts: 2286
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

06 Jun 2020

selig wrote:
06 Jun 2020
He's not streaming, he's exporting, which in theory SHOULD be the highest quality possible, right?
I thought the quantization occurred on recording, because loopMidi was mentioned. That thing uses OS midi streaming.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

06 Jun 2020

Just did some quick testing. All MIDI is quantized (upon export?), since MIDI doesn't support vectors. I can't see any difference with different buffer settings on export as I did with streaming. Streaming actually produced a higher resolution data file, and exporting that data along with the original vector produced MIDI data at the same (lower) rate. Meaning, exporting to MIDI seems to reduce all data to the same rate, which is determined by unknown factors.

I "believe" this is actually not quantizing on the time scale, which is indicated by uneven spacing between data points in my tests and the OPs tests. What I AM seeing, is quantizing in the level (vertical) axis, because there are only 127 steps available in MIDI. If you scroll through the data of an imported ramp, you'll see two of the same level points, one after the other, with each "pair" of data points increasing exactly by "1", which produces a "stair step" result. I'm not sure why the data is "held" for each level, because if it didn't generate that second data point of the same level you would have relatively smooth results (with half the data points to boot).
Selig Audio, LLC

User avatar
ljekio
Posts: 962
Joined: 21 Jan 2015

06 Jun 2020

orthodox wrote:
06 Jun 2020
selig wrote:
06 Jun 2020
He's not streaming, he's exporting, which in theory SHOULD be the highest quality possible, right?
I thought the quantization occurred on recording, because loopMidi was mentioned. That thing uses OS midi streaming.
True.
I had similar problems with recording curves and here on the forum was my old topic about this.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

06 Jun 2020

Boombastix wrote:
06 Jun 2020
selig wrote:
31 May 2020
First question - why export it at all, why not just save or copy/paste as is to a new file as your template? This would totally avoid the issue you're seeing!
Also, I use IAC on a Mac (built in) to convert CV to automation (if that's what you're trying to do).
Well, if I have more than one template, and then later make new automation clips. Seems easier to mange them as named midi files in a folder. Also, when opening up older songs if I just want to add a newly made clip. I'm thinking of managing them as presets. But, I do consider to add and update templates as well, if nothing else works well.
Upon further thinking and explorations…
With that goal in mind, you really would be better off drawing them as vectors in clips and saving them all in a single song file which you would then keep handy to copy paste into current songs. That way you keep full resolution, AND you take advantage of the "curve" function of automation instead of using/generating tons of automation data points.
Selig Audio, LLC

User avatar
Boombastix
Competition Winner
Posts: 1929
Joined: 18 May 2018
Location: Bay Area, CA

06 Jun 2020

I'm not at the computer atm. I wonder if this is an export or import issue though.

Did anyone import an automation curve from a script or other DAW, alternatively tried to import the Reason exported clip into another DAW?

Not a big deal, just wondering which step is causing the problem.
10% off at Waves with link: https://www.waves.com/r/6gh2b0
Disclaimer - I get 10% as well.

User avatar
ljekio
Posts: 962
Joined: 21 Jan 2015

07 Jun 2020

Boombastix wrote:
06 Jun 2020
I'm not at the computer atm. I wonder if this is an export or import issue though.

Did anyone import an automation curve from a script or other DAW, alternatively tried to import the Reason exported clip into another DAW?

Not a big deal, just wondering which step is causing the problem.
viewtopic.php?f=4&t=7495057

If I record that lfo to Reaper, all curves wrote correctly.
If I imported midi file with sharpen curves, in Reason it opened correctly.
Problem with record automation in Reason.

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

07 Jun 2020

ljekio wrote:
07 Jun 2020
Boombastix wrote:
06 Jun 2020
I'm not at the computer atm. I wonder if this is an export or import issue though.

Did anyone import an automation curve from a script or other DAW, alternatively tried to import the Reason exported clip into another DAW?

Not a big deal, just wondering which step is causing the problem.
viewtopic.php?f=4&t=7495057

If I record that lfo to Reaper, all curves wrote correctly.
If I imported midi file with sharpen curves, in Reason it opened correctly.
Problem with record automation in Reason.
(I posted in your thread as well)
No problem here with recording automation in Reason from CV. There is a relationship to buffer size that's odd:

But there's plenty of resolution being recorded:
Selig Audio, LLC

User avatar
ljekio
Posts: 962
Joined: 21 Jan 2015

07 Jun 2020

selig wrote:
07 Jun 2020
(I posted in your thread as well)
No problem here with recording automation in Reason from CV. There is a relationship to buffer size that's odd:
Selig, what your setup?
Try please lfo with fast rates, like 1/8 and 1/16
Relationship to buffer size that's odd, but main problem lays in discrete of record midi CC.
2020-06-07_16-59-31.jpg
2020-06-07_16-59-31.jpg (25.92 KiB) Viewed 1229 times
96000 hz and 64 samples o buffer

User avatar
selig
RE Developer
Posts: 11739
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

11 Jun 2020

ljekio wrote:
07 Jun 2020
selig wrote:
07 Jun 2020
(I posted in your thread as well)
No problem here with recording automation in Reason from CV. There is a relationship to buffer size that's odd:
Selig, what your setup?
Try please lfo with fast rates, like 1/8 and 1/16
Relationship to buffer size that's odd, but main problem lays in discrete of record midi CC.

2020-06-07_16-59-31.jpg

96000 hz and 64 samples o buffer
Setup is simple - the default MIDI Out Device (MOD) connects to the IAC bus on a Mac.
Steps:
Create a MOD and a Pulsar, connect a CV out of Pulsar to the Mod Wheel (or other) CV input on a MOD, then create a second MOD and hit record - that's it! (for bi polar source, ALSO set the first MOD mod wheel to 63).

If the goal is to create MIDI clips as the OP states, you would want to record slower rates for higher resolution - but I'll record 1/8 and 1/16 sines from Pulsar (at 120 BPM I presume?) and see what happens.

UPDATE: of course, the faster MIDI rates don't give good results, as expected. But also, MIDI exported by Reason and Logic is pretty much identical. If I export from Reason into Logic, then export back to Reason it looks the same. Same for generating in Logic and exporting to Reason and back to Logic. So at least between these two apps, there is no difference in how they export MIDI data AFAICT.

Maybe there are some other tests to perform?
Selig Audio, LLC

User avatar
Boombastix
Competition Winner
Posts: 1929
Joined: 18 May 2018
Location: Bay Area, CA

11 Jun 2020

selig wrote:
11 Jun 2020
Setup is simple - the default MIDI Out Device (MOD) connects to the IAC bus on a Mac.
Steps:
Create a MOD and a Pulsar, connect a CV out of Pulsar to the Mod Wheel (or other) CV input on a MOD, then create a second MOD and hit record - that's it! (for bi polar source, ALSO set the first MOD mod wheel to 63).

If the goal is to create MIDI clips as the OP states, you would want to record slower rates for higher resolution - but I'll record 1/8 and 1/16 sines from Pulsar (at 120 BPM I presume?) and see what happens.

UPDATE: of course, the faster MIDI rates don't give good results, as expected. But also, MIDI exported by Reason and Logic is pretty much identical. If I export from Reason into Logic, then export back to Reason it looks the same. Same for generating in Logic and exporting to Reason and back to Logic. So at least between these two apps, there is no difference in how they export MIDI data AFAICT.

Maybe there are some other tests to perform?
Thanks for this, very useful.
Let me see if I got this right: Any clip that get exported out from Logic imports fine into Reason (no quantize). And did you also confirm that exporting from Reason and importing back, NOT via/including Logic, gives you the quantize I showed in the first post?
If so, that is really odd.
10% off at Waves with link: https://www.waves.com/r/6gh2b0
Disclaimer - I get 10% as well.

User avatar
ljekio
Posts: 962
Joined: 21 Jan 2015

12 Jun 2020

Boombastix wrote:
11 Jun 2020

Let me see if I got this right: Any clip that get exported out from Logic imports fine into Reason (no quantize)
viewtopic.php?f=4&t=7495057&p=506157#p506157

Post Reply
  • Information
  • Who is online

    Users browsing this forum: tarsiidea and 30 guests