Commit Graph

71 Commits

Author SHA1 Message Date
Tobias Doerffel
752f48f51c Revert "Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ)"
This does not work well if you open an instrument window of a single
streamed instrument, close it afterwards and open an instrument window
of a regular instrument due to widget caching/reuse. We therefore have
to find a better solution which allows dynamically showing/hiding tabs
in the TabWidget class. Until then restore the previous behaviour.

This reverts commit ed29f2b6f6.
2014-03-23 23:44:30 +01:00
pascal
ed29f2b6f6 Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ) 2014-03-18 21:09:32 -04: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
56ee27ed9b Midi: added MidiDefaultVelocity to be used for test notes etc. 2014-03-08 13:22:51 +01:00
Tobias Doerffel
b01f093e37 InstrumentTrack: hide sound shaping widgets for single-streamed instruments
We currently don't apply envelopes/LFOs and filters to single-streamed
instruments, therefore hide the GUI.
2014-03-08 13:17:55 +01:00
Tobias Doerffel
3d0c5e9f48 InstrumentTrack: another explicit for single stream property 2014-03-08 13:15:27 +01:00
Tobias Doerffel
ba324f4aa8 InstrumentTrack: scale output volume by 2 for MIDI-based instruments
As of 0ca3901ab8 MIDI-based instruments are
played at velocity 63 for volume=100%.  In order to get the same output
volume, we need to scale it by 2.
2014-03-08 12:56:40 +01:00
Tobias Doerffel
ae105c22cc InstrumentTrack: explicitely test for single streamed instrument
...instead of implicitely assuming that the instrument is single-streamed
just because it did not pass a NotePlayHandle.
2014-03-08 12:53:57 +01:00
Tobias Doerffel
1c66bb9d66 Instrument: introduced flags to replace virtual property getters
There'll be more and more flags for instruments. Handling them using
virtual and overloaded getter functions doesn't scale well and adds
unneccessary overhead.
2014-03-08 12:47:42 +01:00
Tobias Doerffel
b5c713e0ea Removed traces of old SurroundArea implementation 2014-02-25 00:26:03 +01:00
Vesa
7c585c9dd8 Fix display of too long names in instrument windows 2014-02-24 04:15:01 +02:00
Tobias Doerffel
2591378818 LcdSpinBox: adopt naming style convention 2014-02-20 22:17:28 +01:00
Tobias Doerffel
8b84526dc5 Pattern: removed freeze functionality
Since addition of automation, controllers etc. the freeze functionality
has been rather broken and thus adds no value anymore. In order to not
confuse users with broken functionality, remove it at all.

Closes #345.
2014-02-19 19:07:47 +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
8c06cb60f4 InstrumentTrack: always process silence at least one time
As of commit 1266278229 silent buffers
from InstrumentPlayHandle-driven instruments are ignored. This is a good
thing but can beak PeakController instances attached to e.g. ZynAddSubFX.

Fixes playback of unfa-Spoken.mmpz.
2014-02-06 23:40:50 +01:00
Tobias Doerffel
1266278229 InstrumentTrack: skip processing for IPH-driven instruments when silent
InstrumentPlayHandle-driven instruments (i.e. instruments producing only
one sound stream for all notes) are running all the time even if no notes
are running. The plugin itself usually does not consume much CPU time
while silent but all effects afterwards inside LMMS unneccessarily
consume lots of CPU time for processing silent buffer.

Typical case: a song with lots of instruments like ZynAddSubFX.

With this change, all processing is skipped on silent buffers which
notably decreases CPU load for many projects. All effects in following
effect chains continue to run until they're silent as well.

Closes #267.
2014-02-06 22:59:14 +01:00
Tobias Doerffel
2f0cd8b7c4 InstrumentTrack: load pitch range model before pitch model
As the pitch range model defines the range of the pitch model we have
to load it first so the range of m_pitchModel gets adjusted accordingly.

Closes #272.
2014-02-04 23:45:23 +01:00
Tobias Doerffel
2e7733eaa1 DataFile: renamed from old multimediaProject class + coding style fixes 2014-02-03 21:21:36 +01:00
Wong Cho Ching
edbe8336cc Hide RANGE spinbox when the instrument is not bendable 2014-02-01 10:42:21 +08: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
Tobias Doerffel
ef4f9b1b60 InstrumentTrack: partly revert ad27039b9b
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.
2014-01-26 23:18:59 +01:00
Tobias Doerffel
4b340f7d5f InstrumentTrack: manage MIDI note recording in NotePlayHandle
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.
2014-01-26 16:48:35 +01:00
Tobias Doerffel
7103bb31d6 InstrumentTrack: more coding style improvements 2014-01-26 16:02:35 +01:00
Tobias Doerffel
ad27039b9b InstrumentTrack: removed compat code for loading old projects
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.
2014-01-26 15:56:10 +01:00
Tobias Doerffel
20700b1c71 InstrumentTrack: fixed range for pitch model 2014-01-26 14:22:41 +01:00
Tobias Doerffel
0a5665ae16 InstrumentTrack: send RPN update in updatePitchRange()
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.
2014-01-26 14:07:15 +01:00
Tobias Doerffel
52d2274e19 InstrumentTrack: coding style fixes 2014-01-26 14:07:06 +01:00
Tobias Doerffel
0e00fc6aa1 InstrumentTrack: replaced numbers by newly introduced constants 2014-01-26 14:06:46 +01:00
Tobias Doerffel
4ba5edc32c InstrumentTrack: generally do not forward NoteOn/NoteOff/KeyPressure events
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.
2014-01-26 10:17:10 +01:00
Tobias Doerffel
c5ab13e5c5 InstrumentTrack: check for instrument instance in processOutEvent()
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.
2014-01-26 09:48:15 +01:00
Tobias Doerffel
049951438a Do not pass default time to processInEvent()
We introduced default parameters for MidiTime parameters so there's no
need to construct them manually.
2014-01-26 01:15:43 +01:00
Tobias Doerffel
d2aab11130 InstrumentTrack: work with transposed MIDI event and key in processOutEvent()
In processOutEvent() initialize and use a MidiEvent object with transposed
key as well as the key variable.
2014-01-26 00:38:23 +01:00
Tobias Doerffel
b6e4860fdb InstrumentTrack: do not set state of piano in processInEvent()
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.
2014-01-26 00:33:51 +01:00
Tobias Doerffel
1fddc81c04 InstrumentTrack: removed option for disabling activity indicators
Probably never used by anyone and just makes code unneccessarily complex.
2014-01-26 00:25:32 +01:00
Tobias Doerffel
7d395c00fa InstrumentTrack: removed option for disabling PianoView visual feedback
Probably never used by anyone and just makes code unneccessarily complex.
2014-01-26 00:19:16 +01:00
Tobias Doerffel
3a827f061f Reworked MIDI event handling in InstrumentTrack and renamed MIDI classes
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.
2014-01-26 00:08:12 +01:00
Tobias Doerffel
ec45c381c3 Renamed instrument function classes and instances
Arpeggiator got InstrumentFunctionArpeggio and ChordCreator got
InstrumentFunctionNoteStacking. All related views and instances have
been renamed for better consistency.
2014-01-25 01:27:28 +01:00
Tobias Doerffel
c6b7ccd9f7 InstrumentFunctionViews: manage widgets using layouts 2014-01-25 01:10:47 +01:00
Tobias Doerffel
7b4aaa6dfa Merge pull request #98 from Lukas-W/stable-0.4-iss90
Update file open/save dialogs
2014-01-24 14:56:23 -08:00
Lukas W
2e7bfe17e6 Update code to use FileInfo instead of QFileInfo
Also removed all blocks similar to
```
#if QT_VERSION >= 0x040806
	filedialog.setOption( QFileDialog::DontUseCustomDirectoryIcons );
#endif
```
as this now takes place in the new subclass's constructor.
2014-01-24 15:37:41 +01:00
Tobias Doerffel
e9347ade61 InstrumentTrack: set center values for pitch and panning 2014-01-23 23:36:32 +01:00
Tobias Doerffel
68fd7edfd8 InstrumentTrack: shorter label for FX channel spinbox 2014-01-22 22:57:19 +01:00
Tobias Doerffel
aaad405f99 UI: increased font sizes
As texts were not readable on high resolution screens the font size for
many widgets has been changed.

Closes #82.
2014-01-22 22:55:20 +01:00
Tobias Doerffel
adfb85c15f InstrumentTrack: set minimum size for save settings button
Set minimum size of 32x32 pixels for an appropriate appearance.
2014-01-19 23:25:24 +01:00
Vesa
ab5ecfee8f Update to fx fader knob, changed fade_button (the blinky thing in instrument tracks) to comply with palette 2014-01-18 16:36:26 +02:00
Tobias Doerffel
3841e05427 InstrumentTrack: added pitch range spinbox 2014-01-18 13:40:40 +01:00
Tobias Doerffel
1f52feae8a InstrumentTrackView: manage general settings widget using layouts 2014-01-18 13:38:35 +01:00
Tobias Doerffel
f2590c24df Replaced [S/U]int[8/16/32] with types from stdint.h or plain integers 2014-01-18 02:56:38 +01:00
Hannu Haahti
5849157435 Changed "Default preset" to the actual plugin name 2014-01-16 18:11:03 +02:00