|
lmms
Cross-platform music production software
|
#include <NotePlayHandle.h>
Classes | |
| class | BaseDetuning |
Public Types | |
| enum class | Origin { MidiClip , MidiInput , NoteStacking , Arpeggio } |
| Public Types inherited from lmms::PlayHandle | |
| enum class | Type { NotePlayHandle = 0x01 , InstrumentPlayHandle = 0x02 , SamplePlayHandle = 0x04 , PresetPreviewHandle = 0x08 } |
| using | Types = Flags<Type> |
| Public Types inherited from lmms::ThreadableJob | |
| enum class | ProcessingState : int { Unstarted , Queued , InProgress , Done } |
| Public Types inherited from lmms::Note | |
| enum class | Type { Regular = 0 , Step } |
| enum class | ParameterType { Detuning = 0 } |
| Types of per-note automation. Currently only detuning/pitch bending is supported. More... | |
Public Member Functions | |
| NotePlayHandle (InstrumentTrack *instrumentTrack, const f_cnt_t offset, const f_cnt_t frames, const Note ¬eToPlay, NotePlayHandle *parent=nullptr, int midiEventChannel=-1, Origin origin=Origin::MidiClip) | |
| ~NotePlayHandle () override | |
| void * | operator new (size_t size, void *p) |
| void | setVolume (volume_t volume) override |
| void | setPanning (panning_t panning) override |
| int | midiKey () const |
| int | midiChannel () const |
| f_cnt_t | noteOffset () const |
| const float & | frequency () const |
| float | unpitchedFrequency () const |
| float | currentDetuning () const |
| Get the current per-note detuning for this note. | |
| void | play (SampleFrame *buffer) override |
| bool | isFinished () const override |
| f_cnt_t | framesLeft () const |
| f_cnt_t | framesLeftForCurrentPeriod () const |
| bool | isFromTrack (const Track *_track) const override |
| void | noteOff (const f_cnt_t offset=0) |
| f_cnt_t | framesBeforeRelease () const |
| f_cnt_t | releaseFramesDone () const |
| f_cnt_t | actualReleaseFramesToDo () const |
| f_cnt_t | frames () const |
| void | setFrames (const f_cnt_t _frames) |
| bool | isReleased () const |
| bool | isReleaseStarted () const |
| f_cnt_t | totalFramesPlayed () const |
| float | volumeLevel (const f_cnt_t frame) |
| const InstrumentTrack * | instrumentTrack () const |
| InstrumentTrack * | instrumentTrack () |
| bool | hasParent () const |
| Origin | origin () const |
| bool | isMasterNote () const |
| void | setMasterNote () |
| bool | isMuted () const |
| void | mute () |
| int | index () const |
| bool | operator== (const NotePlayHandle &_nph) const |
| bool | isPatternTrackMuted () |
| void | setPatternTrack (Track *t) |
| void | processTimePos (const TimePos &time, float pitchValue, bool isRecording) |
| void | resize (const bpm_t newTempo) |
| void | setSongGlobalParentOffset (const TimePos &offset) |
| const TimePos & | songGlobalParentOffset () const |
| void | setFrequencyUpdate () |
| Public Member Functions inherited from lmms::PlayHandle | |
| PlayHandle (const Type type, f_cnt_t offset=0) | |
| PlayHandle & | operator= (PlayHandle &p) |
| virtual | ~PlayHandle () |
| virtual bool | affinityMatters () const |
| const QThread * | affinity () const |
| Type | type () const |
| void | doProcessing () override |
| bool | requiresProcessing () const override |
| void | lock () |
| void | unlock () |
| bool | tryLock () |
| f_cnt_t | offset () const |
| void | setOffset (f_cnt_t _offset) |
| bool | usesBuffer () const |
| void | setUsesBuffer (const bool b) |
| AudioBusHandle * | audioBusHandle () |
| void | setAudioBusHandle (AudioBusHandle *busHandle) |
| void | releaseBuffer () |
| SampleFrame * | buffer () |
| Public Member Functions inherited from lmms::ThreadableJob | |
| ThreadableJob () | |
| ProcessingState | state () const |
| void | reset () |
| void | queue () |
| void | done () |
| void | process () |
| Public Member Functions inherited from lmms::Note | |
| Note (const TimePos &length=TimePos(0), const TimePos &pos=TimePos(0), int key=DefaultKey, volume_t volume=DefaultVolume, panning_t panning=DefaultPanning, std::shared_ptr< DetuningHelper > detuning=nullptr) | |
| Note (const Note ¬e) | |
| ~Note () override | |
| Note & | operator= (const Note ¬e) |
| Note * | clone () const |
| Performs a deep copy and returns an owning raw pointer. | |
| Type | type () const |
| void | setType (Type t) |
| AutomationClip * | parameterCurve (ParameterType paramType) |
| void | setSelected (const bool selected) |
| void | setOldKey (const int oldKey) |
| void | setOldPos (const TimePos &oldPos) |
| void | setOldLength (const TimePos &oldLength) |
| void | setIsPlaying (const bool isPlaying) |
| void | setLength (const TimePos &length) |
| void | setPos (const TimePos &pos) |
| void | setKey (const int key) |
| void | quantizeLength (const int qGrid) |
| void | quantizePos (const int qGrid) |
| bool | selected () const |
| int | oldKey () const |
| TimePos | oldPos () const |
| TimePos | oldLength () const |
| bool | isPlaying () const |
| TimePos | endPos () const |
| const TimePos & | length () const |
| const TimePos & | pos () const |
| TimePos | pos (TimePos basePos) const |
| int | key () const |
| volume_t | getVolume () const |
| int | midiVelocity (int midiBaseVelocity) const |
| panning_t | getPanning () const |
| QString | nodeName () const override |
| const std::shared_ptr< DetuningHelper > & | detuning () const |
| bool | hasDetuningInfo () const |
| bool | withinRange (int tickStart, int tickEnd) const |
| void | createDetuning () |
| Public Member Functions inherited from lmms::SerializingObject | |
| SerializingObject () | |
| virtual | ~SerializingObject () |
| virtual QDomElement | saveState (QDomDocument &_doc, QDomElement &_parent) |
| virtual void | restoreState (const QDomElement &_this) |
| void | setHook (SerializingObjectHook *_hook) |
| SerializingObjectHook * | hook () |
Static Public Member Functions | |
| static ConstNotePlayHandleList | nphsOfInstrumentTrack (const InstrumentTrack *Track, bool allPlayHandles=false) |
| Static Public Member Functions inherited from lmms::Note | |
| static bool | lessThan (const Note *lhs, const Note *rhs) |
| static QString | classNodeName () |
| static TimePos | quantized (const TimePos &m, const int qGrid) |
Public Attributes | |
| void * | m_pluginData |
| std::unique_ptr< BasicFilters<> > | m_filter |
| f_cnt_t | m_fadeInLength |
Private Member Functions | |
| void | updateFrequency () |
Private Attributes | |
| InstrumentTrack * | m_instrumentTrack |
| f_cnt_t | m_frames |
| f_cnt_t | m_totalFramesPlayed |
| f_cnt_t | m_framesBeforeRelease |
| f_cnt_t | m_releaseFramesToDo |
| f_cnt_t | m_releaseFramesDone |
| NotePlayHandleList | m_subNotes |
| volatile bool | m_released |
| bool | m_releaseStarted |
| bool | m_hasMidiNote |
| bool | m_hasParent |
| NotePlayHandle * | m_parent |
| bool | m_hadChildren |
| bool | m_muted |
| Track * | m_patternTrack |
| bpm_t | m_origTempo |
| f_cnt_t | m_origFrames |
| int | m_origBaseNote |
| float | m_frequency |
| float | m_unpitchedFrequency |
| BaseDetuning * | m_baseDetuning |
| TimePos | m_songGlobalParentOffset |
| int | m_midiChannel |
| Origin | m_origin |
| bool | m_frequencyNeedsUpdate |
Additional Inherited Members | |
| Static Public Attributes inherited from lmms::PlayHandle | |
| static constexpr std::size_t | MaxNumber = 1024 |
| Protected Member Functions inherited from lmms::Note | |
| void | saveSettings (QDomDocument &doc, QDomElement &parent) override |
| void | loadSettings (const QDomElement &_this) override |
| Protected Attributes inherited from lmms::ThreadableJob | |
| std::atomic< ProcessingState > | m_state |
|
strong |
| lmms::NotePlayHandle::NotePlayHandle | ( | InstrumentTrack * | instrumentTrack, |
| const f_cnt_t | offset, | ||
| const f_cnt_t | frames, | ||
| const Note & | noteToPlay, | ||
| NotePlayHandle * | parent = nullptr, | ||
| int | midiEventChannel = -1, | ||
| Origin | origin = Origin::MidiClip ) |
|
override |
| f_cnt_t lmms::NotePlayHandle::actualReleaseFramesToDo | ( | ) | const |
Returns the number of frames to be played after release according to the release times in the envelopes
|
inline |
Get the current per-note detuning for this note.
|
inline |
Returns total numbers of frames to play (including release frames)
|
inline |
Returns number of frames to be played until the note is going to be released
| f_cnt_t lmms::NotePlayHandle::framesLeft | ( | ) | const |
Returns number of frames left for playback
| f_cnt_t lmms::NotePlayHandle::framesLeftForCurrentPeriod | ( | ) | const |
Returns how many frames have to be rendered in current period
|
inline |
|
inline |
Returns whether note has a parent, e.g. is not part of an arpeggio or a chord
| int lmms::NotePlayHandle::index | ( | ) | const |
Returns index of NotePlayHandle in vector of note-play-handles belonging to this instrument track - used by arpeggiator. Ignores child note-play-handles, returns -1 when called on one
|
inline |
Returns instrument track which is being played by this handle
|
inline |
Returns instrument track which is being played by this handle (const version)
|
inlineoverridevirtual |
Returns whether playback of note is finished and thus handle can be deleted
Implements lmms::PlayHandle.
|
overridevirtual |
Returns whether the play handle plays on a certain track
Implements lmms::PlayHandle.
|
inline |
Returns whether note has children
|
inline |
Returns whether note is muted
|
inline |
Returns whether NotePlayHandle belongs to pattern track and pattern track is muted
|
inline |
Returns whether note was released
|
inline |
|
inline |
| int lmms::NotePlayHandle::midiKey | ( | ) | const |
| void lmms::NotePlayHandle::mute | ( | ) |
Mutes playback of note
| void lmms::NotePlayHandle::noteOff | ( | const f_cnt_t | offset = 0 | ) |
Releases the note (and plays release frames)
|
inline |
convenience function that returns offset for the first period and zero otherwise, used by instruments to handle the offset: instruments have to check this property and add the correct number of empty frames in the beginning of the period
|
static |
Returns list of note-play-handles belonging to given instrument track. If allPlayHandles = true, also released note-play-handles and children are returned
|
inline |
| bool lmms::NotePlayHandle::operator== | ( | const NotePlayHandle & | _nph | ) | const |
Returns whether given NotePlayHandle instance is equal to *this
|
inline |
Returns origin of note
|
overridevirtual |
Renders one chunk using the attached instrument into the buffer
Implements lmms::PlayHandle.
| void lmms::NotePlayHandle::processTimePos | ( | const TimePos & | time, |
| float | pitchValue, | ||
| bool | isRecording ) |
Process note detuning automation
|
inline |
Returns how many frames were played since release
| void lmms::NotePlayHandle::resize | ( | const bpm_t | newTempo | ) |
Updates total length (m_frames) depending on a new tempo
| void lmms::NotePlayHandle::setFrames | ( | const f_cnt_t | _frames | ) |
Sets the total number of frames to play (including release frames)
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from lmms::Note.
|
inline |
Sets attached pattern track
|
inline |
Set song-global offset (relative to containing MIDI clip) in order to properly perform the note detuning
|
overridevirtual |
Reimplemented from lmms::Note.
|
inline |
Returns song-global offset
|
inline |
Returns total numbers of frames played so far
|
inline |
Returns frequency without pitch wheel influence
|
private |
| float lmms::NotePlayHandle::volumeLevel | ( | const f_cnt_t | frame | ) |
Returns volume level at given frame (envelope/LFO)
|
private |
| f_cnt_t lmms::NotePlayHandle::m_fadeInLength |
| std::unique_ptr<BasicFilters<> > lmms::NotePlayHandle::m_filter |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void* lmms::NotePlayHandle::m_pluginData |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |