I am playing in a band with real instruments
Our pitch is at 442 Hz.
I wonder if it is possible to change zynthian’s pitch.
I reckon, every application has its own mechanism?
Or is it possible to have a midi filter that changes the pitch wheel values constantly?
I found a logarithmic function in the internet.
"The relation between the Hz value and the Pitchwheel value isn’t a linear function, but rather a logarithmic function.
For a tuning in [A = x Hz] the Pitchwheel value is
8192 * ln(x/440) / ln(2)
For [A = 420 Hz] you get a Pitchwheel value of -550."
It’s not an easy task what you want. If you only want to offset the scale, then the “Pitch Bending” method could be implemented, but there are other tempering systems, different from logarithmic, and here the things get a little bit more complex, as it depends strongly on every synth engine:
ZynAddSubFX is easy to “tune”. No problem with it.
LinuxSampler: AFAIK, you should re-tune the SFZ/GIG files. Perhaps there is some script by there …
Others => Perhaps the only general way is the Pich Bending method, but you have to know that Pitch Bending is applied to all active notes in a MIDI channel, so you can offset your scale, but not to use a different tempering system from logarithmic.
I didn’t find a midi transpose for micro pitching.
But AM pitchshifter does the job. There is a little bug though. If I want to pitch to 442, I have to enter 1.005, the pitch is changed, but the number that is displayed is 1.00. steve@plugin.org.uk is not available anymore, who was responsible for the plugin.
I hope, we can do the numberformat change ourselves.
Ahh - that looks nice. But every (tone-generator-)plugin has to understand and react to this MIDI message. I think it’s not implemented in the most plugins…
When playing with flautists & violins and that kind of low life it’s really a must…
I’ve sat throu’ too many concerts with the classical guitars at 440 & and orchestra off oboe at 442 . . .
It’s probably as much as a standard as we’ll see so it makes a good starting point.
at least its the start of a single choke point for the concept until something better comes along.
mididings is really great!! Now that the “Maker Faires season” have finished, i can dedicate some neurons to think about how to implement the MIDI router … but first, i need 2-3 days of home-working and family-caring
I just uploaded the changes for the new “MIDI-tuning” feature. You only have to “Update Software” from the admin menu.
You can adjust the tuning of your Zynthian Box in the webconf tool, setting the frecuency for the middle A from 392 to 492 Hz (+/- 1 tone). This is not a “scale transposing” feature but a “fine tuning” feature. Some people love to play with middle A in 432 Hz … jejeje!
As discussed in this thread, the trick is done by using “Pitch Bending” messages. One pitchbending message is sent after every note-on. Perhaps is more than needed, but it works very well
The feature works perfectly in the next engines:
ZynAddSubFX
FluidSynth
LinuxSampler
But it doesn’t work in these others:
setBfree => This engine doesn’t capture pitchbending messages. I will try other way …
MOD-UI => I’ve to figure how to inject the pitchbending message into MOD-UI flow …
Regarding the maths, i used this expression to calculate the PitchBending:
PitchBend=int(8192 * (1+6*(ln(Freq/440) / ln(2)))
It’s slighty different that the expression proposed by @mheidt. I toke it from here:
First, ttymidi is only for standard MIDI-IN. USB-MIDI doesn’t flow thru ttymidi.
Second, ttymidi is 3rd party code and we should fork it. I prefer to avoid this.
Zyncoder is not a bad place, although currently, the name “zyncoder” doesn’t fit, and the code should be splited/modularized.