when adding new notes in piano-roll via mouse use alignment-border of 80/20 instead of 50/50 which makes piano-roll more usable
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@580 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
20
ChangeLog
20
ChangeLog
@@ -1,3 +1,23 @@
|
||||
2007-11-11 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* include/note.h:
|
||||
* src/core/note.cpp:
|
||||
* src/core/piano_roll.cpp:
|
||||
when adding new notes in piano-roll via mouse use alignment-border of
|
||||
80/20 instead of 50/50 which makes piano-roll more usable
|
||||
|
||||
2007-11-10 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* data/presets/AudioFileProcessor/Erazor.cs.xml:
|
||||
added preset
|
||||
|
||||
* data/locale/de.ts:
|
||||
* data/locale/de.qm:
|
||||
updated German localization-files
|
||||
|
||||
* src/lib/sample_buffer.cpp:
|
||||
fixed file-filter in file-selection-dialog
|
||||
|
||||
2007-10-30 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/note_play_handle.cpp:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.3.0-svn20071030, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.3.0-svn20071030)
|
||||
AC_INIT(lmms, 0.3.0-svn20071111, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.3.0-svn20071111)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
|
||||
@@ -172,7 +172,8 @@ public:
|
||||
}
|
||||
|
||||
static midiTime FASTCALL quantized( const midiTime & _m,
|
||||
const int _q_grid );
|
||||
const int _q_grid,
|
||||
const float _align = 0.5f );
|
||||
|
||||
detuningHelper * detuning( void ) const
|
||||
{
|
||||
|
||||
@@ -177,10 +177,11 @@ void note::setPanning( const panning _panning )
|
||||
|
||||
|
||||
|
||||
midiTime note::quantized( const midiTime & _m, const int _q_grid )
|
||||
midiTime note::quantized( const midiTime & _m, const int _q_grid,
|
||||
const float _align )
|
||||
{
|
||||
float p = ( (float) _m / _q_grid );
|
||||
if( p - floorf( p ) < 0.5f )
|
||||
const float p = ( (float) _m / _q_grid );
|
||||
if( p - floorf( p ) < _align )
|
||||
{
|
||||
return( static_cast<int>( p ) * _q_grid );
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,9 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
pattern::MELODY_PATTERN );
|
||||
|
||||
// then set new note
|
||||
midiTime note_pos( pos_tact_64th );
|
||||
midiTime note_pos( note::quantized(
|
||||
midiTime( pos_tact_64th ),
|
||||
quantization(), 0.8f ) );
|
||||
midiTime note_len( newNoteLen() );
|
||||
|
||||
note new_note( note_len, note_pos,
|
||||
@@ -1371,7 +1373,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
NOTES_PER_OCTAVE) );
|
||||
|
||||
note * created_new_note =
|
||||
m_pattern->addNote( new_note );
|
||||
m_pattern->addNote( new_note, FALSE );
|
||||
|
||||
// reset it so that it can be used for
|
||||
// ops (move, resize) after this
|
||||
|
||||
Reference in New Issue
Block a user