Next big coding style update - this time all PlayHandle classes are
affected. Functions like done() and released() were renamed to
isFinished() and isReleased().
Even though there are probably not many old projects out there, at least
old presets didn't load properly anymore as of ad27039b9b.
Fix this by reintroducing compat code.
If a note is played via MIDI (e.g. with infinite frame count) and arpeggio
is enabled the NotePlayHandle never got deleted as framesLeft() always
returned a big value even after release.
Closes#169.
We must not record notes when receiving external MidiNoteOff events
as e.g. the sustain pedal still might be pressed. State tracking for
features like these is done inside NotePlayHandle so move the recording-
related signal emission from InstrumentTrack to NotePlayHandle.
Closes#168.
We should not need compat code for project files < 0.4.x anymore.
Anybody who wants to load project files made before 2008 is advised to
open them in LMMS 0.4.x first and save them so they get upgraded.
When changing the pitch range all we can do for MIDI is to update the
MIDI pitch bend sensitivity RPN even though this is only supported by
some MIDI instruments.
Closes#129.
As undo/redo are not working properly at the moment, do not expose
according menu items to the user. This will be fixed in upcoming releases.
Closes#152.
If we receive MidiNoteOn, MidiNoteOff or MidiKeyPressure events we always
kind of handle them in processInEvent() so do not forward them to the
instrument.
This fixes a freeze when loading VST plugins as PianoView::focusOutEvent()
tried to send MIDI events to the not yet completely loaded and thus locked
VST plugin.
Closes#160.
There are situations where processOutEvent() is being called while
loading instrument track settings e.g. when loading the pitch model
whose dataChanged() signal is connected to InstrumentTrack::updatePitch()
which in turn calls processOutEvent(). At this time we do not have an
instrument instance and therefore have to skip processing.
Closes#164.
As processInEvent() is responsible for starting/stopping notes, we do
not have to set the state of the piano. This is done in processOutEvents()
already.
The MIDI event handling in InstrumentTrack was complex and buggy. It has
been simplified now such that processInEvent() tries to handle note on,
note off and key pressure events. The actions taken should result in
equivalent calls to processOutEvent() by NotePlayHandle instances. The
processOutEvent() function sends according MIDI events to the attached
instruments. All unhandled MIDI events are directly forwarded to the
instrument in processInEvent().
It's possible that some corner-cases are not handled yet with the new code
and we have regressions now.
Furthermore renamed midiTime/midiEvent to MidiTime/MidiEvent to match
coding style.
Closes#72.