'Off beat' beat notes to MelodyPattern
This commit is contained in:
@@ -88,7 +88,7 @@ public:
|
||||
{
|
||||
return m_patternType;
|
||||
}
|
||||
|
||||
void checkType();
|
||||
|
||||
// next/previous track based on position in the containing track
|
||||
Pattern * previousPattern() const;
|
||||
@@ -132,7 +132,6 @@ private:
|
||||
MidiTime beatPatternLength() const;
|
||||
|
||||
void setType( PatternTypes _new_pattern_type );
|
||||
void checkType();
|
||||
|
||||
void resizeToFirstTrack();
|
||||
|
||||
|
||||
@@ -2472,6 +2472,11 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl )
|
||||
|
||||
note->setPos( MidiTime( pos_ticks ) );
|
||||
note->setKey( key_num );
|
||||
// If dragging beat notes check if pattern should be MelodyPattern
|
||||
if( note->length() < 0 )
|
||||
{
|
||||
m_pattern->checkType();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +369,9 @@ void Pattern::checkType()
|
||||
NoteVector::Iterator it = m_notes.begin();
|
||||
while( it != m_notes.end() )
|
||||
{
|
||||
if( ( *it )->length() > 0 )
|
||||
if( ( *it )->length() > 0 ||
|
||||
( *it )->pos() % ( MidiTime::ticksPerTact() /
|
||||
MidiTime::stepsPerTact() ) )
|
||||
{
|
||||
setType( MelodyPattern );
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user