pitch bend conversion?

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
michelez
Posts: 44
Joined: Mon Feb 16, 2015 7:45 pm

pitch bend conversion?

Post by michelez » Mon Jul 27, 2020 2:28 pm

Hi,

I am experiencing less than accurate pitch conversions from midicents when I just scale the fractional part of a non-tempered midi value to 0-127.
In other words: if my midicent value is 7234 then fract(7234/100)= 0.34, if I use [scale 0. 1. 0 127] and use this value for pitchbend I get wrong results.
I tried to understand the conversion happening in [bach.ezmidiplay]; I see a [scale 0 200 64 127] to get pitchbend values but I am not sure this take care of it (the patch is pretty complicated...).
Can somebody help me get the right conversion?

Thanks,

Michele

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: pitch bend conversion?

Post by danieleghisi » Tue Jul 28, 2020 6:42 pm

Hi, bach.ezmidiplay only takes care of pitch bend for standard n-TET depending on your tonedivision (e.g. 8-tones)

If you want finer subdivision, you need to take care of it yourself, you can use [bach.playkeys cents] to get the cents, then you can get the difference in cents, scale it to whatever you like and use either [bendout] or [xbendout].

Hope this helps!
Daniele

rioh
Posts: 1
Joined: Sun Sep 12, 2021 9:33 pm

Re: pitch bend conversion?

Post by rioh » Sun Sep 12, 2021 9:42 pm

Hi! I am dealing with a similar issue and unfortunately feel way out of my depth haha.

I'm trying to get the midicents value from bach.playkeys cents to convert into a pitchbend format that midiformat (@ highres 2) can understand so I can get playback from a vst with semi-accurate microtonal pitchbend. I'm having troubles knowing what values to scale to what and what kind of calculation I'll need to get these results. The response helps a lot but I'm afraid I need a little bit more of an explanation.

Thank you!

Post Reply