Commit Graph

14 Commits

Author SHA1 Message Date
Vesa
270af579b8 Revision of handling of frameoffset for NPH, SPH
Change in handling of frameoffset for multistreamed instruments and sampletracks.
- Instead of holding the offset for the lifetime of the playhandle, negate the offset in the first period
- Multistream-instruments require some small changes: they have to now check for the offset and accordingly leave empty space in the start of the period (already done in this commit)
- There are possibly optimizations that can be done later
- This change is necessary so that we can have sample-exact models, and sample-exact vol/pan knobs for all instruments. Earlier multistream instruments were always rendering some frames ahead-of-time, so applying sample-exact data for them would have been impossible, since we don't have the future-values yet...
2014-06-29 23:13:00 +03:00
Vesa
0f03219c93 Fix stuck notes on notestacking
Fixes #865. Added a check so we don't add subnotes to a note that is already released (can happen with very short midinotes, eg. sliding the mouse accross the gui piano).
I also added a mutex to incoming midievent handling in instrumenttrack. Not sure if strictly necessary, but seems like this would prevent problems in the long run.
Also fixed a glitch in noteplayhandle where silent master notes got stuck playing indefinitely ( isMasternote() returns true even if the nph just hadChildren, so it never gets ended if it did - instead we check if we still have subnotes).
2014-06-19 00:30:48 +03:00
Vesa
d1eb9886fd Make that 4: Fix stuck midi notes on changing master pitch 2014-06-14 14:37:07 +03:00
Vesa
3f19478b87 Further safeguards needed... 2014-06-14 14:37:07 +03:00
Vesa
a172783cd0 3-in-1 bugfix special
Fixes bugs: #568, #289 and the incorrect timing for midi-noteoffs (see mailing list)
2014-06-14 14:37:07 +03:00
Vesa
06be5bba82 Make MIDI timing sample-accurate
- currently only affects Vestige
- no idea whether this can also be used for Zyn and OpulenZ, I'm not sure if Zyn has any kind of mechanism for communicating frame offset to the synth, as for OpulenZ, @softrabbit would know the answer better
- basically, I made it happen by simply adding an extra parameter in the processMidi{In|Out} functions, which is 0 by default, and made the necessary changes in instrumentTrack and nph to utilize it
- I based this against 1.1 because I didn't think it's a very big change, and I don't see much possibility for things going wrong here, since we're basically just using the existing functionality in Vestige (there already was a frame offset being communicated to the remote plugin, just that it was always set to 0). However, if @tobydox thinks this is better to bump up to 1.2, I can rebase it for master...
2014-06-04 04:23:16 +03:00
Tobias Doerffel
6650dd356d NotePlayHandle, InstrumentFunctions: reworked stacking and arpeggio handling
Instead of having various flags for realizing the arpeggion functionality
use a more generic approach here using the recently introduced "origin"
property.
2014-03-26 11:40:32 +01:00
Tobias Doerffel
5e2d299360 MidiPort: introduced internal base velocity property
In order to keep compatibility with projects created with LMMS < 1.0.0
we maintain a property specifying the base velocity (i.e. the velocity
sent to MIDI-based instruments at volume=100%). For new projects this
always will be 64 while compat code enforces a value of 127 for old
projects.

We can also think about hiding the new groupbox in order to hide
complexity from the user.

Closes #430.
2014-03-17 22:30:52 +01:00
Tobias Doerffel
9eafca3615 Note, NotePlayHandle: no default arguments for setVolume() and setPanning() 2014-02-25 00:27:11 +01:00
Tobias Doerffel
7db99cc04c NotePlayHandle: coding style fixes 2014-02-24 23:29:01 +01:00
Tobias Doerffel
b28b00ff23 NotePlayHandle: emit midiNoteOff() signal in noteOff()
Instead of emitting InstrumentTrack::midiNoteOff() in destructor of
NotePlayHandle do this where it actually happens -> noteOff().

Fixes length of recorded notes when there's e.g. a long release.

Closes #378.
2014-02-24 23:24:11 +01:00
Tobias Doerffel
7e680abf13 InstrumentTrack, NotePlayHandle: ignore volume of InstrumentTrack for MIDI events
The volume of an InstrumentTrack is applied separately when post-processing
the audio buffer and is not related to MIDI processing. It therefore should
not be included into MIDI velocity calculation.

Closes #301.
2014-02-13 01:35:49 +01:00
Tobias Doerffel
9852cb9a57 NotePlayHandle, InstrumentTrack: removed obsolete singerbot support
The singerbot plugin doesn't exist anymore and thus any support in the
code base just adds complexity and confusion, therefore remove it.
2014-01-29 23:56:07 +01:00
Tobias Doerffel
ca0e413fd3 Renamed PlayHandle classes and some functions with bool return values
Next big coding style update - this time all PlayHandle classes are
affected. Functions like done() and released() were renamed to
isFinished() and isReleased().
2014-01-29 23:54:47 +01:00