Commit Graph

27 Commits

Author SHA1 Message Date
Vesa
ad1c6957b0 AutomatableModel: prevent linking of model to itself
There's no need to ever link a model to itself, allowing it can cause weird issues and crashes, plus it's easy to do by accident if you start a ctrl-drag and end it while still on the same widget
2014-06-14 18:36:17 +03:00
Vesa
9742becb81 Fix globalautomationvalueat and coding style 2014-05-21 17:37:30 +03:00
Vesa
aefc9832f8 Initial implementation for two additional methods in AutomatableModel, AutomationPattern:
These methods are used to fetch the automated value of a model at a given MidiTime
These are still untested but that shouldn't be a problem since they aren't actually used by anything yet... but I'll be doing some testing and bugfixing (if needed) for them later.
These will be an important step in making sampletracks eventually be reliably playable from any position, and more generically, being able to reliably convert MidiTime to real time. Of course they can be useful for other things too (not sure what though, yet).
2014-05-15 03:02:42 +03:00
Johannes Lorenz
63f6f2eab6 Final patch for logscales and knob with def ctors. 2014-04-09 13:18:01 +02:00
Johannes Lorenz
3d0ce057d6 Small fixes. Compiling, but stereo linking does still not work (see mailing list). 2014-04-09 12:31:21 +02:00
Johannes Lorenz
2b8e5c3992 Logscales, merged. 2014-04-09 12:31:21 +02:00
Johannes Lorenz
554323dcb6 Current logscales fix. 2014-04-05 09:05:22 +02:00
Johannes Lorenz
1f5ef70d2c Logscales temporary commit. 2014-04-05 08:15:35 +02:00
Tobias Doerffel
7b8eaa6835 Merge remote-tracking branch 'origin/stable-0.4-undo-redo'
Conflicts:
	include/AutomatableModel.h
	include/MidiPort.h
	include/TrackContainerView.h
	include/surround_area.h
	include/track.h
	src/core/AutomatableModel.cpp
	src/core/TrackContainer.cpp
	src/core/note.cpp
	src/core/track.cpp
	src/gui/PianoRoll.cpp
	src/gui/TrackContainerView.cpp
	src/gui/widgets/LcdSpinBox.cpp
2014-03-24 19:37:26 +01:00
Tobias Doerffel
2ab5b1da0c AutomatableModel: always fit value from linked model
When using value from linked model, make sure to fit it into own range
as otherwise this can cause out-of-boundary accesses e.g. in ComboBoxModel.

Closes #505.
2014-03-24 19:21:12 +01:00
Tobias Doerffel
6f5a47342b AutomatableModel: coding style improvements 2014-03-21 10:43:07 +01:00
Vesa
06421005dd AutomatableModel: fix error in loading connected controllers 2014-03-04 23:51:45 +02:00
Tobias Doerffel
8363e262cf AutomatableModel: eliminate return statement
There's no need for the return statement anymore when changing the
branching logic.
2014-03-04 00:05:43 +01:00
Tobias Doerffel
21b5396253 AutomatableModel: load connection settings before automation link
Controller connections got lost in case the control had automation
patterns attached and thus the loadSettings() function returned
prematurely.
2014-03-04 00:05:36 +01:00
Tobias Doerffel
cdb8197c5d AutomatableModel: use nearbyintf() for rounding
For some reason roundf() causes an exception on Win32 when calling with
negative values. This caused LMMS to crash when turning an external MIDI
pitch wheel downwards.

Closes #281.
2014-02-13 01:14:06 +01:00
Tobias Doerffel
f329bccb6b AutomatableModel: remove bogus assigment if step size is 0
No idea why we set value to m_minValue in case the step size is 0. There
shouldn't be models with step size 0 nevertheless.
2014-02-13 01:13:22 +01:00
Tobias Doerffel
8c9778c945 AutomatableModel: do not change init value when adjusting range
This causes e.g. the default value of the pitch model to be changed
when changing the pitch range.
2014-01-26 14:05:22 +01:00
Tobias Doerffel
5540a356f7 AutomatableModel: added centerValue property
The optional centerValue property can be used by views to display the
center somehow. It defaults to minimum value.
2014-01-23 23:35:26 +01:00
Tobias Doerffel
f0d6d44545 AutomatableModel: renamed to controllerConnection() + coding style fixes
Renamed getControllerConnection() to controllerConnection().
2014-01-20 22:11:58 +01:00
Tobias Doerffel
44d0e7a48f AutomatableModel: reset value to default if data is unavailable in loadSettings()
When loading older projects where a particular model did not exist and
thus did not save any data do not load the possibly invalid default data
but reset to default value of model.
2014-01-20 21:26:12 +01:00
Tobias Doerffel
17c1ede50c AutomatableModelView/ContextMenu: option for unlinking all controls
Integrated patch by Rodrigo Rodrigues da Silva which adds an option
to all AutomatableModelView's context menu allowing to unlink all
linked controls.
2014-01-15 23:50:13 +01:00
Tobias Doerffel
a5c3cf6a99 Revised journalling (undo/redo) to record full states instead of changes
Recording single changes of objects or their specific properties is
completely superfluous as we have full implemented state tracking in all
objects already. Therefore use SerializingObject::saveState() and
SerializingObject::restoreState() in order to implement the undo/redo
functionality.

This is just an initial commit and needs some further work (especially
regarding stability). However even things like undo/redo of
addition/removal of Tracks and TrackContentObjects do work already.
2014-01-07 23:48:09 +01:00
Tobias Doerffel
533f086600 AutomatableModel: initialize m_value and m_initValue in constructor
Even though we call setInitValue() in AutomatableModel constructor,
initialize according class members before.
2012-11-26 19:48:37 +01:00
NoiseByNorthwest
0b057ec5df Fixed bugs with magnetic knobs
The problem comes from AutomatableModel::m_initValue wich is not fitted
either in constructor or in setter. Idem for m_value in constructor, imo
this is not enough consistent.

I propose to:
- call fittedValue() in init value setter.
- always call setter to initialize current & init values.
2012-02-13 22:02:03 +01:00
Tobias Doerffel
89eae05a16 Renamed all automation related files and classes to match new coding style
All automation-related files and classes have been renamed to match the
new coding style.
(cherry picked from commit 9b280ffb3e)
2010-08-16 23:40:33 +02:00
Tobias Doerffel
7c16094811 Fixed spelling errors
Fixed some spelling errors found by Lintian while checking the Debian
package of LMMS. Thanks to Patrick Winnertz for pointing out this issue.
(cherry picked from commit 9fd3dacb67)
2010-01-25 23:27:43 +01:00
Tobias Doerffel
1d5cb23385 File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
2009-08-25 01:30:41 +02:00