Rename note to Note
This commit is contained in:
@@ -187,7 +187,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time,
|
||||
cleanObjects();
|
||||
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
Note::quantized( _time,
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
|
||||
@@ -220,7 +220,7 @@ void AutomationPattern::removeValue( const MidiTime & _time,
|
||||
cleanObjects();
|
||||
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
Note::quantized( _time,
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
|
||||
@@ -260,7 +260,7 @@ MidiTime AutomationPattern::setDragValue( const MidiTime & _time, const float _v
|
||||
if( m_dragging == false )
|
||||
{
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
Note::quantized( _time,
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
this->removeValue( newTime );
|
||||
|
||||
@@ -256,7 +256,7 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n )
|
||||
break;
|
||||
}
|
||||
// create copy of base-note
|
||||
note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() );
|
||||
Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() );
|
||||
|
||||
// create sub-note-play-handle, only note is
|
||||
// different
|
||||
@@ -477,7 +477,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
NotePlayHandleManager::acquire( _n->instrumentTrack(),
|
||||
frames_processed,
|
||||
gated_frames,
|
||||
note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ),
|
||||
Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ),
|
||||
_n->getPanning(), _n->detuning() ),
|
||||
_n, -1, NotePlayHandle::OriginArpeggio )
|
||||
);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "note.h"
|
||||
#include "Note.h"
|
||||
#include "DetuningHelper.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
|
||||
note::note( const MidiTime & _length, const MidiTime & _pos,
|
||||
Note::Note( const MidiTime & _length, const MidiTime & _pos,
|
||||
int _key, volume_t _volume, panning_t _panning,
|
||||
DetuningHelper * _detuning ) :
|
||||
m_selected( false ),
|
||||
@@ -63,7 +63,7 @@ note::note( const MidiTime & _length, const MidiTime & _pos,
|
||||
|
||||
|
||||
|
||||
note::note( const note & _note ) :
|
||||
Note::Note( const Note & _note ) :
|
||||
SerializingObject( _note ),
|
||||
m_selected( _note.m_selected ),
|
||||
m_oldKey( _note.m_oldKey ),
|
||||
@@ -86,7 +86,7 @@ note::note( const note & _note ) :
|
||||
|
||||
|
||||
|
||||
note::~note()
|
||||
Note::~Note()
|
||||
{
|
||||
if( m_detuning )
|
||||
{
|
||||
@@ -97,7 +97,7 @@ note::~note()
|
||||
|
||||
|
||||
|
||||
void note::setLength( const MidiTime & _length )
|
||||
void Note::setLength( const MidiTime & _length )
|
||||
{
|
||||
m_length = _length;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void note::setLength( const MidiTime & _length )
|
||||
|
||||
|
||||
|
||||
void note::setPos( const MidiTime & _pos )
|
||||
void Note::setPos( const MidiTime & _pos )
|
||||
{
|
||||
m_pos = _pos;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ void note::setPos( const MidiTime & _pos )
|
||||
|
||||
|
||||
|
||||
void note::setKey( const int _key )
|
||||
void Note::setKey( const int _key )
|
||||
{
|
||||
const int k = qBound( 0, _key, NumKeys );
|
||||
m_key = k;
|
||||
@@ -122,7 +122,7 @@ void note::setKey( const int _key )
|
||||
|
||||
|
||||
|
||||
void note::setVolume( volume_t _volume )
|
||||
void Note::setVolume( volume_t _volume )
|
||||
{
|
||||
const volume_t v = qBound( MinVolume, _volume, MaxVolume );
|
||||
m_volume = v;
|
||||
@@ -131,7 +131,7 @@ void note::setVolume( volume_t _volume )
|
||||
|
||||
|
||||
|
||||
void note::setPanning( panning_t _panning )
|
||||
void Note::setPanning( panning_t _panning )
|
||||
{
|
||||
const panning_t p = qBound( PanningLeft, _panning, PanningRight );
|
||||
m_panning = p;
|
||||
@@ -140,7 +140,7 @@ void note::setPanning( panning_t _panning )
|
||||
|
||||
|
||||
|
||||
MidiTime note::quantized( const MidiTime & _m, const int _q_grid )
|
||||
MidiTime Note::quantized( const MidiTime & _m, const int _q_grid )
|
||||
{
|
||||
float p = ( (float) _m / _q_grid );
|
||||
if( p - floorf( p ) < 0.5f )
|
||||
@@ -153,7 +153,7 @@ MidiTime note::quantized( const MidiTime & _m, const int _q_grid )
|
||||
|
||||
|
||||
|
||||
void note::quantizeLength( const int _q_grid )
|
||||
void Note::quantizeLength( const int _q_grid )
|
||||
{
|
||||
setLength( quantized( length(), _q_grid ) );
|
||||
if( length() == 0 )
|
||||
@@ -165,7 +165,7 @@ void note::quantizeLength( const int _q_grid )
|
||||
|
||||
|
||||
|
||||
void note::quantizePos( const int _q_grid )
|
||||
void Note::quantizePos( const int _q_grid )
|
||||
{
|
||||
setPos( quantized( pos(), _q_grid ) );
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void note::quantizePos( const int _q_grid )
|
||||
|
||||
|
||||
|
||||
void note::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void Note::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "key", m_key );
|
||||
_this.setAttribute( "vol", m_volume );
|
||||
@@ -190,7 +190,7 @@ void note::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void note::loadSettings( const QDomElement & _this )
|
||||
void Note::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
const int oldKey = _this.attribute( "tone" ).toInt() + _this.attribute( "oct" ).toInt() * KeysPerOctave;
|
||||
m_key = qMax( oldKey, _this.attribute( "key" ).toInt() );
|
||||
@@ -209,7 +209,7 @@ void note::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void note::editDetuningPattern()
|
||||
void Note::editDetuningPattern()
|
||||
{
|
||||
createDetuning();
|
||||
m_detuning->automationPattern()->openInAutomationEditor();
|
||||
@@ -218,7 +218,7 @@ void note::editDetuningPattern()
|
||||
|
||||
|
||||
|
||||
void note::createDetuning()
|
||||
void Note::createDetuning()
|
||||
{
|
||||
if( m_detuning == NULL )
|
||||
{
|
||||
@@ -232,7 +232,7 @@ void note::createDetuning()
|
||||
|
||||
|
||||
|
||||
bool note::hasDetuningInfo() const
|
||||
bool Note::hasDetuningInfo() const
|
||||
{
|
||||
return m_detuning && m_detuning->hasAutomation();
|
||||
}
|
||||
@@ -48,12 +48,12 @@ NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) :
|
||||
NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
|
||||
const f_cnt_t _offset,
|
||||
const f_cnt_t _frames,
|
||||
const note& n,
|
||||
const Note& n,
|
||||
NotePlayHandle *parent,
|
||||
int midiEventChannel,
|
||||
Origin origin ) :
|
||||
PlayHandle( TypeNotePlayHandle, _offset ),
|
||||
note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ),
|
||||
Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ),
|
||||
m_pluginData( NULL ),
|
||||
m_filter( NULL ),
|
||||
m_instrumentTrack( instrumentTrack ),
|
||||
@@ -168,7 +168,7 @@ void NotePlayHandle::done()
|
||||
|
||||
void NotePlayHandle::setVolume( volume_t _volume )
|
||||
{
|
||||
note::setVolume( _volume );
|
||||
Note::setVolume( _volume );
|
||||
|
||||
const int baseVelocity = m_instrumentTrack->midiPort()->baseVelocity();
|
||||
|
||||
@@ -180,7 +180,7 @@ void NotePlayHandle::setVolume( volume_t _volume )
|
||||
|
||||
void NotePlayHandle::setPanning( panning_t panning )
|
||||
{
|
||||
note::setPanning( panning );
|
||||
Note::setPanning( panning );
|
||||
|
||||
MidiEvent event( MidiMetaEvent, midiChannel(), midiKey(), panningToMidi( panning ) );
|
||||
event.setMetaEvent( MidiNotePanning );
|
||||
@@ -582,7 +582,7 @@ void NotePlayHandleManager::init()
|
||||
NotePlayHandle * NotePlayHandleManager::acquire( InstrumentTrack* instrumentTrack,
|
||||
const f_cnt_t offset,
|
||||
const f_cnt_t frames,
|
||||
const note& noteToPlay,
|
||||
const Note& noteToPlay,
|
||||
NotePlayHandle* parent,
|
||||
int midiEventChannel,
|
||||
NotePlayHandle::Origin origin )
|
||||
|
||||
@@ -163,7 +163,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
|
||||
m_previewNote = NotePlayHandleManager::acquire(
|
||||
s_previewTC->previewInstrumentTrack(), 0,
|
||||
typeInfo<f_cnt_t>::max() / 2,
|
||||
note( 0, 0, DefaultKey, 100 ) );
|
||||
Note( 0, 0, DefaultKey, 100 ) );
|
||||
|
||||
setAudioPort( s_previewTC->previewInstrumentTrack()->audioPort() );
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ Song::Song() :
|
||||
/* connect( &m_masterPitchModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( masterPitchChanged() ) );*/
|
||||
|
||||
qRegisterMetaType<note>( "note" );
|
||||
qRegisterMetaType<Note>( "note" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "Song.h"
|
||||
#include "MidiPort.h"
|
||||
#include "MidiTime.h"
|
||||
#include "note.h"
|
||||
#include "Note.h"
|
||||
|
||||
|
||||
#ifdef LMMS_HAVE_ALSA
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "MidiClient.h"
|
||||
#include "MidiPort.h"
|
||||
#include "note.h"
|
||||
#include "Note.h"
|
||||
|
||||
|
||||
MidiClient::MidiClient()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "MidiPort.h"
|
||||
#include "note.h"
|
||||
#include "Note.h"
|
||||
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
|
||||
@@ -851,8 +851,8 @@ void PianoRoll::setCurrentPattern( Pattern* newPattern )
|
||||
// make sure to always get informed about the pattern being destroyed
|
||||
connect( m_pattern, SIGNAL( destroyedPattern( Pattern* ) ), this, SLOT( hidePattern( Pattern* ) ) );
|
||||
|
||||
connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOn( const note& ) ), this, SLOT( startRecordNote( const note& ) ) );
|
||||
connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOff( const note& ) ), this, SLOT( finishRecordNote( const note& ) ) );
|
||||
connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOn( const Note& ) ), this, SLOT( startRecordNote( const Note& ) ) );
|
||||
connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOff( const Note& ) ), this, SLOT( finishRecordNote( const Note& ) ) );
|
||||
connect( m_pattern->instrumentTrack()->pianoModel(), SIGNAL( dataChanged() ), this, SLOT( update() ) );
|
||||
|
||||
setWindowTitle( tr( "Piano-Roll - %1" ).arg( m_pattern->name() ) );
|
||||
@@ -931,7 +931,7 @@ void PianoRoll::setBarColor( const QColor & c )
|
||||
|
||||
|
||||
inline void PianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
|
||||
int _width, note * _n, const QColor & noteCol )
|
||||
int _width, Note * _n, const QColor & noteCol )
|
||||
{
|
||||
++_x;
|
||||
++_y;
|
||||
@@ -1017,7 +1017,7 @@ inline void PianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
|
||||
|
||||
|
||||
|
||||
inline void PianoRoll::drawDetuningInfo( QPainter & _p, note * _n, int _x,
|
||||
inline void PianoRoll::drawDetuningInfo( QPainter & _p, Note * _n, int _x,
|
||||
int _y )
|
||||
{
|
||||
int middle_y = _y + KEY_LINE_HEIGHT / 2;
|
||||
@@ -1701,7 +1701,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
// whether this action creates new note(s) or not
|
||||
bool is_new_note = false;
|
||||
|
||||
note * created_new_note = NULL;
|
||||
Note * created_new_note = NULL;
|
||||
// did it reach end of vector because
|
||||
// there's no note??
|
||||
if( it == notes.begin()-1 )
|
||||
@@ -1721,7 +1721,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
MidiTime note_pos( pos_ticks - ( quantization() / 2 ) );
|
||||
MidiTime note_len( newNoteLen() );
|
||||
|
||||
note new_note( note_len, note_pos, key_num );
|
||||
Note new_note( note_len, note_pos, key_num );
|
||||
new_note.setSelected( true );
|
||||
new_note.setPanning( m_lastNotePanning );
|
||||
new_note.setVolume( m_lastNoteVolume );
|
||||
@@ -1741,7 +1741,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
note_pos += note_len;
|
||||
}
|
||||
note new_note( note_len, note_pos, key_num + chord[i] );
|
||||
Note new_note( note_len, note_pos, key_num + chord[i] );
|
||||
new_note.setSelected( true );
|
||||
new_note.setPanning( m_lastNotePanning );
|
||||
new_note.setVolume( m_lastNoteVolume );
|
||||
@@ -1856,14 +1856,14 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
! is_new_note && _me->modifiers() & Qt::ShiftModifier )
|
||||
{
|
||||
// vector to hold new notes until we're through the loop
|
||||
QVector<note> newNotes;
|
||||
QVector<Note> newNotes;
|
||||
it = notes.begin();
|
||||
while( it != notes.end() )
|
||||
{
|
||||
if( ( *it )->selected() )
|
||||
{
|
||||
// copy this note
|
||||
note noteCopy( (note) **it );
|
||||
Note noteCopy( (Note) **it );
|
||||
newNotes.push_back( noteCopy );
|
||||
}
|
||||
++it;
|
||||
@@ -1874,7 +1874,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
//put notes from vector into piano roll
|
||||
for( int i=0; i<newNotes.size(); ++i)
|
||||
{
|
||||
note * newNote = m_pattern->addNote( newNotes[i] );
|
||||
Note * newNote = m_pattern->addNote( newNotes[i] );
|
||||
newNote->setSelected( false );
|
||||
}
|
||||
|
||||
@@ -2000,7 +2000,7 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
|
||||
// go through notes to figure out which one we want to change
|
||||
NoteVector nv;
|
||||
foreach( note * i, notes )
|
||||
foreach( Note * i, notes )
|
||||
{
|
||||
if( i->pos().getTicks() >= ticks_start
|
||||
&& i->pos().getTicks() <= ticks_end
|
||||
@@ -2013,12 +2013,12 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
// make sure we're on a note
|
||||
if( nv.size() > 0 )
|
||||
{
|
||||
note * closest = NULL;
|
||||
Note * closest = NULL;
|
||||
int closest_dist = 9999999;
|
||||
// if we caught multiple notes, find the closest...
|
||||
if( nv.size() > 1 )
|
||||
{
|
||||
foreach( note * i, nv )
|
||||
foreach( Note * i, nv )
|
||||
{
|
||||
const int dist = qAbs( i->pos().getTicks() - ticks_middle );
|
||||
if( dist < closest_dist ) { closest = i; closest_dist = dist; }
|
||||
@@ -2045,7 +2045,7 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void PianoRoll::testPlayNote( note * n )
|
||||
void PianoRoll::testPlayNote( Note * n )
|
||||
{
|
||||
m_lastKey = n->key();
|
||||
|
||||
@@ -2431,7 +2431,7 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
NoteVector::ConstIterator it = notes.begin()+notes.size()-1;
|
||||
for( int i = 0; i < notes.size(); ++i )
|
||||
{
|
||||
note * n = *it;
|
||||
Note * n = *it;
|
||||
if( n->pos().getTicks() >= ticks_start
|
||||
&& n->pos().getTicks() <= ticks_end
|
||||
&& n->length().getTicks() != 0
|
||||
@@ -3512,7 +3512,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
// go through notes to figure out which one we want to change
|
||||
NoteVector nv;
|
||||
foreach( note * i, notes )
|
||||
foreach( Note * i, notes )
|
||||
{
|
||||
if( i->pos().getTicks() >= ticks_start
|
||||
&& i->pos().getTicks() <= ticks_end
|
||||
@@ -3527,7 +3527,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
const int step = _we->delta() > 0 ? 1.0 : -1.0;
|
||||
if( m_noteEditMode == NoteEditVolume )
|
||||
{
|
||||
foreach( note * n, nv )
|
||||
foreach( Note * n, nv )
|
||||
{
|
||||
volume_t vol = tLimit<int>( n->getVolume() + step, MinVolume, MaxVolume );
|
||||
n->setVolume( vol );
|
||||
@@ -3536,7 +3536,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
}
|
||||
else if( m_noteEditMode == NoteEditPanning )
|
||||
{
|
||||
foreach( note * n, nv )
|
||||
foreach( Note * n, nv )
|
||||
{
|
||||
panning_t pan = tLimit<int>( n->getPanning() + step, PanningLeft, PanningRight );
|
||||
n->setPanning( pan );
|
||||
@@ -3738,7 +3738,7 @@ void PianoRoll::stop()
|
||||
|
||||
|
||||
|
||||
void PianoRoll::startRecordNote( const note & _n )
|
||||
void PianoRoll::startRecordNote( const Note & _n )
|
||||
{
|
||||
if( m_recording == true && hasValidPattern() == true &&
|
||||
Engine::getSong()->isPlaying() &&
|
||||
@@ -3752,7 +3752,7 @@ void PianoRoll::startRecordNote( const note & _n )
|
||||
{
|
||||
sub = m_pattern->startPosition();
|
||||
}
|
||||
note n( 1, Engine::getSong()->getPlayPos(
|
||||
Note n( 1, Engine::getSong()->getPlayPos(
|
||||
Engine::getSong()->playMode() ) - sub,
|
||||
_n.key(), _n.getVolume(), _n.getPanning() );
|
||||
if( n.pos() >= 0 )
|
||||
@@ -3765,7 +3765,7 @@ void PianoRoll::startRecordNote( const note & _n )
|
||||
|
||||
|
||||
|
||||
void PianoRoll::finishRecordNote( const note & _n )
|
||||
void PianoRoll::finishRecordNote( const Note & _n )
|
||||
{
|
||||
if( m_recording == true && hasValidPattern() == true &&
|
||||
Engine::getSong()->isPlaying() &&
|
||||
@@ -3774,12 +3774,12 @@ void PianoRoll::finishRecordNote( const note & _n )
|
||||
Engine::getSong()->playMode() ==
|
||||
Song::Mode_PlayPattern ) )
|
||||
{
|
||||
for( QList<note>::Iterator it = m_recordingNotes.begin();
|
||||
for( QList<Note>::Iterator it = m_recordingNotes.begin();
|
||||
it != m_recordingNotes.end(); ++it )
|
||||
{
|
||||
if( it->key() == _n.key() )
|
||||
{
|
||||
note n( _n.length(), it->pos(),
|
||||
Note n( _n.length(), it->pos(),
|
||||
it->key(), it->getVolume(),
|
||||
it->getPanning() );
|
||||
n.quantizeLength( quantization() );
|
||||
@@ -3943,7 +3943,7 @@ void PianoRoll::enterValue( NoteVector* nv )
|
||||
|
||||
if( ok )
|
||||
{
|
||||
foreach( note * n, *nv )
|
||||
foreach( Note * n, *nv )
|
||||
{
|
||||
n->setVolume( new_val );
|
||||
}
|
||||
@@ -3962,7 +3962,7 @@ void PianoRoll::enterValue( NoteVector* nv )
|
||||
|
||||
if( ok )
|
||||
{
|
||||
foreach( note * n, *nv )
|
||||
foreach( Note * n, *nv )
|
||||
{
|
||||
n->setPanning( new_val );
|
||||
}
|
||||
@@ -3983,7 +3983,7 @@ void PianoRoll::copy_to_clipboard( const NoteVector & _notes ) const
|
||||
for( NoteVector::ConstIterator it = _notes.begin(); it != _notes.end();
|
||||
++it )
|
||||
{
|
||||
note clip_note( **it );
|
||||
Note clip_note( **it );
|
||||
clip_note.setPos( clip_note.pos( start_pos ) );
|
||||
clip_note.saveState( dataFile, note_list );
|
||||
}
|
||||
@@ -4058,7 +4058,7 @@ void PianoRoll::pasteNotes()
|
||||
{
|
||||
DataFile dataFile( value.toUtf8() );
|
||||
|
||||
QDomNodeList list = dataFile.elementsByTagName( note::classNodeName() );
|
||||
QDomNodeList list = dataFile.elementsByTagName( Note::classNodeName() );
|
||||
|
||||
// remove selection and select the newly pasted notes
|
||||
clearSelectedNotes();
|
||||
@@ -4071,7 +4071,7 @@ void PianoRoll::pasteNotes()
|
||||
for( int i = 0; !list.item( i ).isNull(); ++i )
|
||||
{
|
||||
// create the note
|
||||
note cur_note;
|
||||
Note cur_note;
|
||||
cur_note.restoreState( list.item( i ).toElement() );
|
||||
cur_note.setPos( cur_note.pos() + m_timeLine->pos() );
|
||||
|
||||
@@ -4278,7 +4278,7 @@ bool PianoRoll::mouseOverNote()
|
||||
|
||||
|
||||
|
||||
note * PianoRoll::noteUnderMouse()
|
||||
Note * PianoRoll::noteUnderMouse()
|
||||
{
|
||||
QPoint pos = mapFromGlobal( QCursor::pos() );
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti
|
||||
{
|
||||
nph = NotePlayHandleManager::acquire( this, offset,
|
||||
typeInfo<f_cnt_t>::max() / 2,
|
||||
note( MidiTime(), MidiTime(), event.key(), event.volume( midiPort()->baseVelocity() ) ),
|
||||
Note( MidiTime(), MidiTime(), event.key(), event.volume( midiPort()->baseVelocity() ) ),
|
||||
NULL, event.channel(),
|
||||
NotePlayHandle::OriginMidiInput );
|
||||
m_notes[event.key()] = nph;
|
||||
@@ -634,7 +634,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames,
|
||||
}
|
||||
}
|
||||
|
||||
note * cur_note;
|
||||
Note * cur_note;
|
||||
while( nit != notes.end() &&
|
||||
( cur_note = *nit )->pos() == cur_start )
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ Pattern::Pattern( const Pattern& other ) :
|
||||
{
|
||||
for( NoteVector::ConstIterator it = other.m_notes.begin(); it != other.m_notes.end(); ++it )
|
||||
{
|
||||
m_notes.push_back( new note( **it ) );
|
||||
m_notes.push_back( new Note( **it ) );
|
||||
}
|
||||
|
||||
init();
|
||||
@@ -167,9 +167,9 @@ MidiTime Pattern::beatPatternLength() const
|
||||
return MidiTime( max_length ).nextFullTact() * MidiTime::ticksPerTact();
|
||||
}
|
||||
|
||||
note * Pattern::addNote( const note & _new_note, const bool _quant_pos )
|
||||
Note * Pattern::addNote( const Note & _new_note, const bool _quant_pos )
|
||||
{
|
||||
note * new_note = new note( _new_note );
|
||||
Note * new_note = new Note( _new_note );
|
||||
if( _quant_pos && Engine::pianoRoll() )
|
||||
{
|
||||
new_note->quantizePos( Engine::pianoRoll()->quantization() );
|
||||
@@ -213,7 +213,7 @@ note * Pattern::addNote( const note & _new_note, const bool _quant_pos )
|
||||
|
||||
|
||||
|
||||
void Pattern::removeNote( const note * _note_to_del )
|
||||
void Pattern::removeNote( const Note * _note_to_del )
|
||||
{
|
||||
instrumentTrack()->lock();
|
||||
NoteVector::Iterator it = m_notes.begin();
|
||||
@@ -240,7 +240,7 @@ void Pattern::removeNote( const note * _note_to_del )
|
||||
|
||||
// returns a pointer to the note at specified step, or NULL if note doesn't exist
|
||||
|
||||
note * Pattern::noteAtStep( int _step )
|
||||
Note * Pattern::noteAtStep( int _step )
|
||||
{
|
||||
for( NoteVector::Iterator it = m_notes.begin(); it != m_notes.end();
|
||||
++it )
|
||||
@@ -254,12 +254,12 @@ note * Pattern::noteAtStep( int _step )
|
||||
}
|
||||
|
||||
|
||||
note * Pattern::rearrangeNote( const note * _note_to_proc,
|
||||
Note * Pattern::rearrangeNote( const Note * _note_to_proc,
|
||||
const bool _quant_pos )
|
||||
{
|
||||
// just rearrange the position of the note by removing it and adding
|
||||
// a copy of it -> addNote inserts it at the correct position
|
||||
note copy_of_note( *_note_to_proc );
|
||||
Note copy_of_note( *_note_to_proc );
|
||||
removeNote( _note_to_proc );
|
||||
|
||||
return addNote( copy_of_note, _quant_pos );
|
||||
@@ -270,7 +270,7 @@ note * Pattern::rearrangeNote( const note * _note_to_proc,
|
||||
void Pattern::rearrangeAllNotes()
|
||||
{
|
||||
// sort notes by start time
|
||||
qSort(m_notes.begin(), m_notes.end(), note::lessThan );
|
||||
qSort(m_notes.begin(), m_notes.end(), Note::lessThan );
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ void Pattern::loadSettings( const QDomElement & _this )
|
||||
if( node.isElement() &&
|
||||
!node.toElement().attribute( "metadata" ).toInt() )
|
||||
{
|
||||
note * n = new note;
|
||||
Note * n = new Note;
|
||||
n->restoreState( node.toElement() );
|
||||
m_notes.push_back( n );
|
||||
}
|
||||
@@ -499,7 +499,7 @@ void Pattern::ensureBeatNotes()
|
||||
}
|
||||
if( found == false )
|
||||
{
|
||||
addNote( note( MidiTime( 0 ), MidiTime( ( i *
|
||||
addNote( Note( MidiTime( 0 ), MidiTime( ( i *
|
||||
MidiTime::ticksPerTact() ) /
|
||||
MidiTime::stepsPerTact() ) ), false );
|
||||
}
|
||||
@@ -773,7 +773,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me )
|
||||
return;
|
||||
}
|
||||
|
||||
note * n = m_pat->noteAtStep( step );
|
||||
Note * n = m_pat->noteAtStep( step );
|
||||
|
||||
// if note at step not found, ensureBeatNotes and try again
|
||||
if( n == NULL )
|
||||
@@ -840,7 +840,7 @@ void PatternView::wheelEvent( QWheelEvent * _we )
|
||||
int vol = 0;
|
||||
int len = 0;
|
||||
|
||||
note * n = m_pat->noteAtStep( step );
|
||||
Note * n = m_pat->noteAtStep( step );
|
||||
if( n != NULL )
|
||||
{
|
||||
vol = n->getVolume();
|
||||
@@ -1083,7 +1083,7 @@ void PatternView::paintEvent( QPaintEvent * )
|
||||
|
||||
for( int it = 0; it < steps; it++ ) // go through all the steps in the beat pattern
|
||||
{
|
||||
note * n = m_pat->noteAtStep( it );
|
||||
Note * n = m_pat->noteAtStep( it );
|
||||
|
||||
// figure out x and y coordinates for step graphic
|
||||
const int x = TCO_BORDER_WIDTH + static_cast<int>( it * w / steps );
|
||||
|
||||
Reference in New Issue
Block a user