Commit Graph

80 Commits

Author SHA1 Message Date
Tobias Doerffel
31e712a675 PianoRoll: fixed typo leading to big white key at wrong position when pressed 2014-01-14 23:36:27 +01:00
Tobias Doerffel
df76921226 PianoRoll: always use the PianoModel for note on/off + other improvements 2014-01-14 23:34:49 +01:00
Tobias Doerffel
7e4db63de5 PianoRoll: coding style improvements 2014-01-14 23:19:37 +01:00
Tobias Doerffel
c40b8350ef Piano: refactored class to be usable without friend classes 2014-01-14 23:12:43 +01:00
tobydox
340789c191 Merge pull request #17 from bhattigurjot/stable-0.4
PianoRoll: added support for pressed keys
2014-01-14 13:52:46 -08:00
Tobias Doerffel
4e5507a30a TrackContainer, TrackContainerView: adopted coding style
Renamed file and class names.
2014-01-14 17:39:02 +01:00
Gurjot Singh
d4a2e33bf5 adds piano_roll key presses 2014-01-14 21:58:43 +05:30
Tobias Doerffel
e8190dc01e Merge remote-tracking branch 'ranft/notelabels-2' into stable-0.4 2014-01-09 23:23:34 +01:00
Tobias Doerffel
c0c10cf9d8 Merge remote-tracking branch 'origin/stable-0.4-test' into stable-0.4
Conflicts:
	include/song.h
	src/core/song.cpp
2014-01-07 23:04:21 +01:00
Ruediger Ranft
dc86474589 Added an option do en/disable the note labels. 2013-10-27 17:05:18 +01:00
Ruediger Ranft
f63600b3fe Added the drawing of the note names. 2013-10-15 20:43:29 +02:00
Raine M. Ekman
d43eb46d81 PianoRoll: fix crash when trying to mark octave chord 2013-09-13 22:43:20 +02:00
Raine M. Ekman
02db2fbd2f Piano roll: fix scale marking algorithm and improve rendering
A patch to fix the scale marking algorithm and possibly improve on the
looks

Closes #3493928.
2012-05-20 18:50:27 +02:00
Alexandre Almeida
c60e7ba8d1 Song, SongEditor, BB-Editor, Piano-Roll: correction of play button problems
Initial implementation of corrected play buttons in individual editor
windows.
2012-05-20 18:25:28 +02:00
Tobias Doerffel
5662ef9d44 PianoRoll: fix minimum and initial width
The PR window always had a too small initial size. Fix this by setting
a proper minimum width and set initial width to this value as well.
2012-02-02 20:24:30 +01:00
NoiseByNorthwest
59242adadc Piano-roll: bypass fixed initial width of the window
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-02-01 16:58:24 +01:00
NoiseByNorthwest
a6ae31a08e Piano-roll: scale & arpeggio combobox + micro refactoring of ChordCreator::Chord
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-02-01 16:58:24 +01:00
NoiseByNorthwest
0fc20dffd3 Add tone marking feature
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2012-01-29 19:42:23 +01:00
NoiseByNorthwest
b3b290f6dd Piano-roll: preserve melody when resizing a note by holding shift 2012-01-26 19:06:34 +01:00
NoiseByNorthwest
7f63351ca6 Piano-roll: remove from selection feature (shift + left-click) 2012-01-26 19:06:34 +01:00
Tobias Doerffel
a9717c0cc3 NotePlayHandle: send correct MidiNoteOff events if base note changed
When changing an InstrumentTrack's base note while NotePlayHandles are
active, they will send a wrong MidiNoteOff event due to the masterKey()
translation in InstrumentTrack::processOutEvent().

Therefore in NotePlayHandle remember the original base note value and
add the difference between original and current base note to the value
returned by NotePlayHandle::key(). Fixes hanging notes in MIDI-based
instruments such as ZynAddSubFX.

Furthermore some coding style improvements.

Closes #3146975.
2010-12-31 13:23:08 +01:00
Tobias Doerffel
3ae2b40eec InstrumentTrackView: added one-window-mode + global piano focus
Added a one-window-mode which allows to have only one instrument track
window open at a time. The content of this window is replaced each time
you open a different track.

Furthermore added global reception and forwarding of key events to the
piano widget of the top-most instrument track window. This for example
enables the user to play test sounds while tweaking some effects in a
different subwindow.
(cherry picked from commit 93681760d2)
2010-10-05 11:25:43 +02:00
Tobias Doerffel
8ebdee61f6 PianoRoll: respect stacking order of notes
Notes are always drawn on-top of each other starting from the left
to the right. However the behaviour when clicking notes was reverse,
which made it quite hard to edit notes sometimes. Now the top most
note is edited/selected/moved/resized if notes overlay.

Closes #2808603.
(cherry picked from comit 28eb7e00bf)
2010-08-24 18:47:39 +02:00
Tobias Doerffel
3a79dc1741 PianoRoll: allow chaning volume and panning of step notes
There's no reason to not allow changing volume and panning of step notes
in PianoRoll. Therefore simply check whether the length is not equal to
zero (which might be disabled step notes) instead of checking for length
being greater than zero.

Closes #2836799.
(cherry picked from commit 8286c1031d)
2010-08-19 00:17:41 +02:00
Tobias Doerffel
4e3072137b PianoRoll: fixed messed up editing modes when pressing Ctrl
There were some bugs when pressing Ctrl while in SelectMode. Fix this
by always setting m_ctrlMode and m_editMode in keyPressEvent() when
Ctrl was pressed.

Closes #2854958 and #2836576.
(cherry picked from commit 46c20bdcbd)
2010-08-18 23:58:49 +02: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
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
Tobias Doerffel
d536d851a4 PianoRoll: removed duplicate function call in testPlayNote()
There's no need to send a MidiNotePanning event twice in
PianoRoll::testPlayNote(). Removed the duplicate function call.
(cherry picked from commit 4cdcd1a670)
2009-08-05 17:19:59 +02:00
Tobias Doerffel
d555db6109 PianoRoll: switch back to draw note after pasting notes
When pasing notes via Ctrl+V somehow the edit-tool was left in an
undefined state. Therefore explicitely switch back to draw mode so
user can move pasted notes (closes #2808607).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cf7539caaf)
2009-07-07 10:49:09 +02:00
Tobias Doerffel
c222c062c5 PianoRoll: fixed crash with detune tool
When clicking at an invalid position with the detune tool, LMMS could
crash as an invalid iterator was referenced (closes #2808589).

Furthermore renamed PianoRoll::ModeOpen to PianoRoll::ModeEditDetuning.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 9ca93040de)
2009-06-18 23:33:21 +02:00
Tobias Doerffel
7a632277b8 Renamed type noteVector to NoteVector
Renamed type noteVector to NoteVector as well as ::iterator to
::Iterator and ::const_iterator to ::ConstIterator.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit e12476f79c)
2009-06-18 23:32:32 +02:00
Tobias Doerffel
57c4a5abc5 MultimediaProject: splitted constructor for loading either file or data
The old constructor treated the string argument either as filename or
as raw XML data, depending on 2nd parameter. This is a mess and quickly
leads to confusion.

Now we have two constructors taking either a filename as string or a
QByteArray with XML data. Loading actual data has been separated into
MultimediaProject::loadData( const QByteArray & ).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 5a00ebd360)
2009-06-11 01:16:30 +02:00
Tobias Doerffel
5cd54b3f20 PianoRoll: removed unused variable
Removed unused variable volumeHandles in
PianoRoll::computeSelectedNotes(bool) which as a side-effect also fixes

/usr/include/qt4/QtCore/qvector.h: In member function ‘void PianoRoll::computeSelectedNotes(bool)’:
/usr/include/qt4/QtCore/qvector.h:421: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
/usr/include/qt4/QtCore/qvector.h:114: note: initialized from here
(cherry picked from commit 24353ca248)
2009-05-16 17:02:02 +02:00
Tobias Doerffel
e0a26a35fc PianoRoll: do not make notes disappear under certain circumstances
When starting LMMS, loading an existing project and opening a pattern
with notes inside in piano roll, moving single notes showed unexpected
behaviour, i.e. the according note has been moved somewhere unreachable.

I tracked this down to a missing initialization of m_moveBoundary*
variables. Adding a few lines fixes the issue (closes #2632909).
(cherry picked from commit efb335cea7)
2009-04-17 15:13:44 +02:00
Tobias Doerffel
0edc0db7bd PianoView/PianoRoll: fixed keycodes for OS X
This patch enables the usage of PC keyboard for playing instrument piano
or piano roll on OS X by evaluating nativeVirtualKey rather than
nativeScanCode.
(cherry picked from commit 6f0388be7c)
2009-04-16 10:46:54 +02:00
Tobias Doerffel
ec07aef5ac Fixed various types to be suffixed with "_t".
This commit ensures that all defined data types in include/lmms_basics.h are
suffxed with "_t" to keep consistency as well as to fix issues on systems
with older STL/libstdc++.
(cherry picked from commit 7449c4f731)
2009-03-15 21:50:38 +01:00
Tobias Doerffel
625c947d7a move timeLine marker in Piano Roll and autoscroll when recording while playing song (closes #2486334) (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2054 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-19 14:27:42 +00:00
Tobias Doerffel
264ad268ba more record-accompany fixes (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2052 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-19 13:57:22 +00:00
Tobias Doerffel
c720c1f4c8 stable backport:
fixed various bugs regarding recording:
* once recording has been started, stop it as soon as playMode of song changes or similiar things happen (closes #2486341)
* fixed broken record-accompany in most use-cases other than using record-while-playing-song by also tracking NoteOn events and 
remember current play position to use
the correct note postitions on NoteOff events (play position might have wrapped around in the meantime due to looppoints or end 
of BB track) (closes #2486299, #2486203)



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2048 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-19 13:39:42 +00:00
Tobias Doerffel
84f3ecf76b ensure, cursor is never NULL when painting it in paintEvent()
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@2021 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-12 22:53:07 +00:00
Tobias Doerffel
aa575bca83 fixed bug: you can use shift+left to move notes past the beginning (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1997 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-05 09:06:58 +00:00
Tobias Doerffel
fb25a51b5f changed modifier detection from mainWindow::isCtrlPressed etc to Qt framework detection. Fixes a bunch of little glitches and enables horizontal scroll wheels (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1949 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-12-17 11:51:27 +00:00
Tobias Doerffel
1381709a58 set OpaquePaintEvent attribute for all widgets where suitable (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1836 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-11-11 08:48:12 +00:00
Tobias Doerffel
19800a6971 fixed autoscroll feature in piano-roll (closes #2204508)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1813 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-29 08:48:33 +00:00
Tobias Doerffel
b38addd9c7 do not crash when pressing right mouse button while moving a note with left mouse button
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1744 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-04 23:25:18 +00:00
Tobias Doerffel
796c1af534 fixed typo
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1740 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-04 23:21:25 +00:00
Tobias Doerffel
fce25dc625 fixed a bunch warnings and remarks issued by Intel Compiler
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1722 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-02 11:48:59 +00:00
Tobias Doerffel
9d49857dd4 play preview notes also while playing (closes #2089399)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1711 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-25 20:51:58 +00:00
Tobias Doerffel
dea184a993 fixed quantization when moving selected notes (closes #2118371)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1643 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-20 13:19:16 +00:00
Paul Giblock
baf274fac4 Add new piano-roll shortcuts to trunk
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1623 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-17 08:15:06 +00:00