Rename note to Note

This commit is contained in:
Lukas W
2014-11-26 01:14:52 +01:00
parent e045f1dd19
commit aaeb5216ad
27 changed files with 116 additions and 116 deletions

View File

@@ -206,8 +206,8 @@ public:
signals:
void instrumentChanged();
void newNote();
void midiNoteOn( const note& );
void midiNoteOff( const note& );
void midiNoteOn( const Note& );
void midiNoteOff( const Note& );
void nameChanged();

View File

@@ -53,7 +53,7 @@
#include "lmms_basics.h"
#include "note.h"
#include "Note.h"
#include "fifo_buffer.h"
#include "MixerProfiler.h"

View File

@@ -1,5 +1,5 @@
/*
* note.h - declaration of class note which contains all informations about a
* Note.h - declaration of class note which contains all informations about a
* note + definitions of several constants and enums
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
@@ -78,17 +78,17 @@ const float MaxDetuning = 4 * 12.0f;
class EXPORT note : public SerializingObject
class EXPORT Note : public SerializingObject
{
public:
note( const MidiTime & _length = MidiTime( 0 ),
Note( const MidiTime & _length = MidiTime( 0 ),
const MidiTime & _pos = MidiTime( 0 ),
int key = DefaultKey,
volume_t _volume = DefaultVolume,
panning_t _panning = DefaultPanning,
DetuningHelper * _detuning = NULL );
note( const note & _note );
virtual ~note();
Note( const Note & _note );
virtual ~Note();
// used by GUI
inline void setSelected( const bool _selected ){ m_selected = _selected; }
@@ -112,7 +112,7 @@ public:
void quantizeLength( const int _q_grid );
void quantizePos( const int _q_grid );
static inline bool lessThan( note * &lhs, note * &rhs )
static inline bool lessThan( Note * &lhs, Note * &rhs )
{
// function to compare two notes - must be called explictly when
// using qSort
@@ -234,7 +234,7 @@ private:
} ;
typedef QVector<note *> NoteVector;
typedef QVector<Note *> NoteVector;
#endif

View File

@@ -27,7 +27,7 @@
#define NOTE_PLAY_HANDLE_H
#include "lmmsconfig.h"
#include "note.h"
#include "Note.h"
#include "PlayHandle.h"
#include "Track.h"
#include "MemoryManager.h"
@@ -42,7 +42,7 @@ typedef QList<NotePlayHandle *> NotePlayHandleList;
typedef QList<const NotePlayHandle *> ConstNotePlayHandleList;
class EXPORT NotePlayHandle : public PlayHandle, public note
class EXPORT NotePlayHandle : public PlayHandle, public Note
{
MM_OPERATORS
public:
@@ -63,7 +63,7 @@ public:
NotePlayHandle( InstrumentTrack* instrumentTrack,
const f_cnt_t offset,
const f_cnt_t frames,
const note& noteToPlay,
const Note& noteToPlay,
NotePlayHandle* parent = NULL,
int midiEventChannel = -1,
Origin origin = OriginPattern );
@@ -326,7 +326,7 @@ public:
static NotePlayHandle * acquire( InstrumentTrack* instrumentTrack,
const f_cnt_t offset,
const f_cnt_t frames,
const note& noteToPlay,
const Note& noteToPlay,
NotePlayHandle* parent = NULL,
int midiEventChannel = -1,
NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern );

View File

@@ -33,7 +33,7 @@
#include <QPixmap>
#include "note.h"
#include "Note.h"
#include "Track.h"
@@ -67,13 +67,13 @@ public:
MidiTime beatPatternLength() const;
// note management
note * addNote( const note & _new_note, const bool _quant_pos = true );
Note * addNote( const Note & _new_note, const bool _quant_pos = true );
void removeNote( const note * _note_to_del );
void removeNote( const Note * _note_to_del );
note * noteAtStep( int _step );
Note * noteAtStep( int _step );
note * rearrangeNote( const note * _note_to_proc,
Note * rearrangeNote( const Note * _note_to_proc,
const bool _quant_pos = true );
void rearrangeAllNotes();
void clearNotes();

View File

@@ -25,7 +25,7 @@
#ifndef PIANO_H
#define PIANO_H
#include "note.h"
#include "Note.h"
#include "Model.h"
class InstrumentTrack;

View File

@@ -32,7 +32,7 @@
#include "ComboBoxModel.h"
#include "SerializingObject.h"
#include "note.h"
#include "Note.h"
#include "lmms_basics.h"
#include "Song.h"
#include "tooltip.h"
@@ -123,7 +123,7 @@ protected:
int getKey( int _y ) const;
static inline void drawNoteRect( QPainter & _p, int _x, int _y,
int _width, note * _n, const QColor & noteCol );
int _width, Note * _n, const QColor & noteCol );
void removeSelection();
void selectAll();
void getSelectedNotes( NoteVector & _selected_notes );
@@ -137,8 +137,8 @@ protected slots:
void recordAccompany();
void stop();
void startRecordNote( const note & _n );
void finishRecordNote( const note & _n );
void startRecordNote( const Note & _n );
void finishRecordNote( const Note & _n );
void horScrolled( int _new_pos );
void verScrolled( int _new_pos );
@@ -232,7 +232,7 @@ private:
void shiftSemiTone(int amount);
bool isSelection() const;
int selectionCount() const;
void testPlayNote( note * n );
void testPlayNote( Note * n );
void testPlayKey( int _key, int _vol, int _pan );
void pauseTestNotes( bool _pause = true );
@@ -300,9 +300,9 @@ private:
MidiTime m_currentPosition;
bool m_recording;
QList<note> m_recordingNotes;
QList<Note> m_recordingNotes;
note * m_currentNote;
Note * m_currentNote;
actions m_action;
noteEditMode m_noteEditMode;
@@ -355,9 +355,9 @@ private:
void copy_to_clipboard( const NoteVector & _notes ) const;
void drawDetuningInfo( QPainter & _p, note * _n, int _x, int _y );
void drawDetuningInfo( QPainter & _p, Note * _n, int _x, int _y );
bool mouseOverNote();
note * noteUnderMouse();
Note * noteUnderMouse();
// turn a selection rectangle into selected notes
void computeSelectedNotes( bool shift );

View File

@@ -12,7 +12,7 @@
#include "Engine.h"
#include "Instrument.h"
#include "InstrumentTrack.h"
#include "note.h"
#include "Note.h"
#include "Pattern.h"
#include "Track.h"
#include "bb_track.h"
@@ -271,7 +271,7 @@ bool HydrogenImport::readSong()
int i = pattern_count - 1 + nbb;
pattern_id[sName] = pattern_count - 1;
Pattern*p = dynamic_cast<Pattern*>( drum_track[instrId]->getTCO( i ) );
note n;
Note n;
n.setPos( nPosition );
if ( (nPosition + 48) <= nSize )
{

View File

@@ -244,7 +244,7 @@ public:
}
void addNote( note & n )
void addNote( Note & n )
{
if( !p || n.pos() > lastEnd + DefaultTicksPerTact )
{
@@ -378,7 +378,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
smfMidiChannel * ch = chs[evt->chan].create( tc );
Alg_note_ptr noteEvt = dynamic_cast<Alg_note_ptr>( evt );
note n( noteEvt->get_duration() * ticksPerBeat,
Note n( noteEvt->get_duration() * ticksPerBeat,
noteEvt->get_start_time() * ticksPerBeat,
noteEvt->get_identifier() - 12,
noteEvt->get_loud());

View File

@@ -414,7 +414,7 @@ struct FL_Channel : public FL_Plugin
int fxChannel;
int layerParent;
typedef QList<QPair<int, note> > noteVector;
typedef QList<QPair<int, Note> > noteVector;
noteVector notes;
QList<int> dots;
@@ -1313,7 +1313,7 @@ if( p.currentEffectChannel <= NumFLFxChannels )
8 ) );
pos /= (4*ppq) / DefaultTicksPerTact;
len /= (4*ppq) / DefaultTicksPerTact;
note n( len, pos, key, vol * 100 / 128,
Note n( len, pos, key, vol * 100 / 128,
pan*200 / 128 - 100 );
if( ch < p.numChannels )
{

View File

@@ -30,7 +30,7 @@
#include <QVector>
#include "ImportFilter.h"
#include "note.h"
#include "Note.h"

View File

@@ -168,7 +168,7 @@ public:
private:
void processNote( NotePlayHandle * n );
void initNote(lb302Note *note);
void initNote(lb302Note *Note);
void initSlide();
private:

View File

@@ -34,7 +34,7 @@
#include "Instrument.h"
#include "InstrumentView.h"
#include "note.h"
#include "Note.h"
#include "knob.h"
#include "AutomatableModel.h"

View File

@@ -26,7 +26,7 @@
#define LOCAL_ZYNADDSUBFX_H
#include "MidiEvent.h"
#include "note.h"
#include "Note.h"
class Master;
class NulEngine;

View File

@@ -30,7 +30,7 @@
#include <queue>
#define BUILD_REMOTE_PLUGIN_CLIENT
#include "note.h"
#include "Note.h"
#include "RemotePlugin.h"
#include "RemoteZynAddSubFx.h"
#include "LocalZynAddSubFx.h"

View File

@@ -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 );

View File

@@ -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 )
);

View File

@@ -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();
}

View File

@@ -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 )

View File

@@ -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() );

View File

@@ -112,7 +112,7 @@ Song::Song() :
/* connect( &m_masterPitchModel, SIGNAL( dataChanged() ),
this, SLOT( masterPitchChanged() ) );*/
qRegisterMetaType<note>( "note" );
qRegisterMetaType<Note>( "note" );
}

View File

@@ -32,7 +32,7 @@
#include "Song.h"
#include "MidiPort.h"
#include "MidiTime.h"
#include "note.h"
#include "Note.h"
#ifdef LMMS_HAVE_ALSA

View File

@@ -25,7 +25,7 @@
#include "MidiClient.h"
#include "MidiPort.h"
#include "note.h"
#include "Note.h"
MidiClient::MidiClient()

View File

@@ -30,7 +30,7 @@
#include "Engine.h"
#include "gui_templates.h"
#include "MidiPort.h"
#include "note.h"
#include "Note.h"
#ifdef LMMS_BUILD_WIN32

View File

@@ -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() );

View File

@@ -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 )
{

View File

@@ -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 );