-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIDI-based instruments play an octave too low by default #1857
Comments
@softrabbit This is weird, A4 should always be 440hz right? |
Yes as per http://www.phy.mtu.edu/~suits/notefreqs.html A4 is 440hz. On Wed, Mar 11, 2015 at 3:57 PM, Amadeus Folego notifications@github.com
Jonathan Aquilina |
Maybe, but the world doesn't agree. 442 is also highly accepted for orchestras. We can only assume LMMS uses 440? The frequncy on the right image is far lower than 440Hz, though, so it is definitely not an A. |
Well 220 is half 440, so it's A, just one octave below :-). |
Yeah, if we had an integration layer before touching Zyn, this would probably be not an issue. @softrabbit @Sti2nd Can you make a list of intruments that you have found that present this problem for when someone takes this task the person already has something to work with? |
Grepping the plugin sources for IsMidiBased finds these possible victims: Carla, Vestige, ZynAddSubFX (confirmed), OpulenZ (fixed internally). I don't see any code to adjust the octave in Carla or Vestige, both seem to pass on the key number they get, so I'd say they are almost certainly affected. Actual testing to confirm wouldn't hurt, of course. This all comes from LMMS numbering notes internally in a different way from MIDI, look in e.g. |
@softrabbit thanks for the feedback! 👍 |
Just a note for when this is implemented If we change this, It would mean that all existing projects would play an octave different on the effected instruments. This could be worked around, by checking the version when loading the project files. |
@curlymorphic Well remembered, we already present a warning when using older projects on newer versions. The release notes emphasizing this can be helpful. |
LMMS have note range |
Unfortunately this still prevents me from using LMMS (now testing with version 1.2.0). Using my M-AUDIO Keystation 88es, it still interprets it as an octave too low. I was playing around with moving the base note down 12 steps, which makes the lowest note on my 88 key keyboard playable, but on the other hand the highest note is silent. |
unfortunately that renders this otherwise great software almost useless. what a shame. |
Here are some results that I have found while investigating #5139. I repeat them here because this issue is a good fit for them. Mapping/manipulation of MIDI note valuesI found that several MIDI values, e.g. for "Note On" and "Note Off", are manipulated in What's surprising is that for example Triple Oscillator still plays an A4 = 440 Hz (69) instead of an A3 = 220 Hz (57). This means that somewhere the whole thing has to be corrected again. I found out that this more or less happens in the constructor of m_baseNoteModel.setInitValue( DefaultKey ); The value of
In the case of the pressed A4 LMMS can't handle the full note range of MIDI devicesIn if( inEvent.key() < 0 || inEvent.key() >= NumKeys )
{
return;
} If I trigger the lowest note on my MIDI keyboard this corresponds to a "Note On" with a value of 0. Because LMMS subtracts a value of 12 in Put differently: if you had a keyboard with 128 keys for each MIDI value then LMMS would ignore some of them and would likely also not forward them to VSTs which might be interested in the full range. I think LMMS should not manipulate the raw MIDI data and instead should just forward it. It should be left to consumers to decide how to deal with them, i.e. if they want to ignore some of the values. |
@Veratil Nice! What release will this fix appear in? Thanks a lot! |
It will be in 1.3, this mean currently developed release. |
We'll be building a new alpha version this week as well. |
Left: TripleOscillator, one sine wave, coarse tuning 0, 440 Hz
Right: ZynAddSubFX, one sine wave, coarse tuning 0 AFAIK, 220 Hz
Same root note, same note played as the image shows. Both do output the correct note 69 through MIDI out.
(For further evidence, this is how I had to compensate in OpulenZ: https://github.com/LMMS/lmms/blob/master/plugins/opl2/opl2instrument.cpp#L306 )
The text was updated successfully, but these errors were encountered: