Add proportional scrolling to the song editor, piano roll and automation editor. Proportional scrolling means that if for example a certain measure is on the right side of the song editor then it will take a certain number of mouse wheel moves to get it to the left side of the editor. It is the same number of wheel moves regardless of the zoom level.
* Added lines in between bars
* Changed bar lines to follow snap size
* Changed default zoom and quantization value
* Added constants for line widths
* Added QSS configuration for new grid line colors
* Tied line widths to QSS properties
* Changed default quantization to 1/4
* Removed clear() from destructor model
* Removed destructor in ComboBoxModel.h
* Changed member set/get functions to pass by value
* Updated signal connection with newer syntax
Many, many years ago (93a456c), high quality mode was merely disabled after it was noted that it can be problematic rather than being completely removed. Remove it from the codebase so we can get rid of some code and clean things up a bit.
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
* Update ringbuffer submodule to fix includes
* Remove cyclic includes
* Remove Qt include prefixes
* Include C++ versions of C headers
E.g.: assert.h -> cassert
* Move CLIP_BORDER_WIDTH into ClipView
This allows to remove includes to TrackView.h in ClipView cpp files.
* Elliminate useless includes
This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):
```
include-what-you-use;
-Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
-Xiwyu;--keep=*/xmmintrin.h;
-Xiwyu;--keep=*/lmmsconfig.h;
-Xiwyu;--keep=*/weak_libjack.h;
-Xiwyu;--keep=*/sys/*;
-Xiwyu;--keep=*/debug.h;
-Xiwyu;--keep=*/SDL/*;
-Xiwyu;--keep=*/alsa/*;
-Xiwyu;--keep=*/FL/x.h;
-Xiwyu;--keep=*/MidiApple.h;
-Xiwyu;--keep=*/MidiWinMM.h;
-Xiwyu;--keep=*/AudioSoundIo.h
```
* Fixup: Remove empty #if-#ifdef pairs
* Remove LMMS_HAVE_STD(LIB|INT)_H
* Rebase BaraMGB's Knife
Co-authored-by: Steffen Baranowsky <BaraMGB@freenet.de>
* Draw marker
* Refactoring and shift mode
* Allow resizing
* Add Icon
* Fix stuck marker on RMB, remove unnecessary cast
* Remove redundant line, more const
* Fix
* Review fixes
* Only perform split logic for SampleTCO
* Add unquantizedModHeld function
* missed one
* Don't use copy/paste
* Don't use copy/paste
* More git troubles
* Fix undo
* git dammit
* Cleaner solution?
* Set cursor, add copy assignment to SampleBuffer
* Add TODO comment
* Make it build
* Fixes from review
* Make splitTCO virtual
* Make splitTCO more generic
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
* Prevent resizing of MIDI clips in knife mode
* Fix move/resize and rework box select via ctrl
* Apply suggestions from code review.
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
* Don't show inaccurate/useless/empty text float in knife mode
* Addresses Github review
- Fixes a typo where QWidget::mousePressEvent was being called
inside mouseReleaseEvent.
- Avoids unnecessarily disabling journalling on the Split
action, since it doesn't require it.
* Revert format changes in Track
* Revert format changes in Track.h
* Revert formatting changes in Track.cpp
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
* Rework PianoRoll paintEvent + some extras
* Split out PositionLine class to own file
* Refactor PianoRoll Q_PROPERTYs
* Reduce code by using Q_PROPERTY's MEMBER function and removing getter/setter functions
After looking at the getters and setters, they did nothing different than what direct
access would allow. Nothing outside of PianoRoll used the public functions as well.
Considering these factors we can reduce the number of functions by 2x the number of
Q_PROPERTIES, and go with direct access instead.
* Remove need for keyboard pixmaps
With the recent change to allow zooming vertically, aligning pixmaps is a PITA. Since
we have themes which can take brushes and colors, it would be simpler to take a solid
color or a gradient with some extra style properties to resize the keys and text colors.
While it will slightly be a downgrade from pixmaps since they can be anything really,
this will allow us to customize the piano roll further moving forward.
* Added the ability to update margins for TimeLineWidget and StepRecorderWidget
These take a X coordinate, which was hardcoded to WHITE_KEY_WIDTH, and never looked
back. Now we can adjust on the fly if we need to. Currently this just allows us to
shift the left margin to the style-defined white key width.
* Fix phantom pixmaps when PianoRoll not focused
* Update PositionLine class changes related to #5543
* src/gui/editors/SongEditor.cpp
* Gradient can be toggled and color can be changed.
* Made playback line (and tail) transparent to mouse clicks
* Gradient disappears when paused/stopped; tail length depends on zoom
* Fixes bug where gradient appears when a pattern is played; style corrections
* Cleaned up code
* Rename m_zoomLevels to s_zoomLevels
* Finalising code
* Make positionLine class independent of parent zooming model
* Edit a bug fix to make it more efficient
* Rename m_x and finalise positionLine code
* Rename m_x and finalise positionLine changes
* Rename X to playHeadPos
* New default behavior: Preserves offsets when moving clips, resizes in fixed increments.
* Adds shift + drag: Snaps move start position (like current behavior) or end position (new),
based on which is closest to the real position. When moving a selection,
the grabbed clip snaps into position and the rest move relative to it.
* Adds alt + drag: Allows fine adjustment of a clip's position or size,
as an alternative to ctrl + drag.
* Adds a Q dropdown in the song editor to allow finer or coarser snapping (8 bars to 1/16th bar)
* Adds a proportional snap toggle. When enabled, snapping size/Q adjusts based on zoom,
and a label appears showing the current snap size. This is disabled by default.
* Horizontal mouse-wheel zooming. Ensure zoom center is always on the current mouse position.
* Horizontal zoom using mouse wheel center on the mouse position. For the SongEditor too.
* Wheel center on the Automation editor too.
* play sampletracks from any song position
* take care of TCO length
* TCOs shouldn't be updated when SE window is resized
* take care of zooming level
* takes care on all song position changes and mute/solo tracks now
* playes the sample only within the buffer limits
* takes care of time signature changes
* some minor code improvements (zapashcanon)
* loopback one tick earlier
* minor code changes
* get rid off clicks by resize and scrolling song editor
* removes playhandle by remove TCO
* minor bugs on manipulating TCOs in Song Editor
* update on add sample by playing
* white spaces 1
* Fix missing scroll back on stop in Song Editor
* Fix missing scroll back on stop in Song Editor
* Avoid scrolling the Song Editor when scrolling is disabled.
* Handle the smooth scroll in scroll back
* Remove leading underscore from fonction parameters name
* Put back spaces around parameters (Removed by mistake)