MCPcopy Create free account
hub / github.com/LMMS/lmms / addNote

Method addNote

src/tracks/Pattern.cpp:207–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205
206
207Note * Pattern::addNote( const Note & _new_note, const bool _quant_pos )
208{
209 Note * new_note = new Note( _new_note );
210 if( _quant_pos && gui->pianoRoll() )
211 {
212 new_note->quantizePos( gui->pianoRoll()->quantization() );
213 }
214
215 instrumentTrack()->lock();
216 m_notes.insert(std::upper_bound(m_notes.begin(), m_notes.end(), new_note, Note::lessThan), new_note);
217 instrumentTrack()->unlock();
218
219 checkType();
220 updateLength();
221
222 emit dataChanged();
223
224 return new_note;
225}
226
227
228

Callers 5

mousePressEventMethod · 0.45
finishRecordNoteMethod · 0.45
pasteNotesMethod · 0.45
quantizeNotesMethod · 0.45
testInlineAutomationMethod · 0.45

Calls 8

quantizePosMethod · 0.80
quantizationMethod · 0.80
insertMethod · 0.80
instrumentTrackFunction · 0.50
lockMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
unlockMethod · 0.45

Tested by 1

testInlineAutomationMethod · 0.36