LMMS
Loading...
Searching...
No Matches
SampleTrack.h
Go to the documentation of this file.
1/*
2 * SampleTrack.h - class SampleTrack, a track which provides arrangement of samples
3 *
4 * Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_SAMPLE_TRACK_H
26#define LMMS_SAMPLE_TRACK_H
27
28#include "AudioBusHandle.h"
29#include "Track.h"
30
31
32namespace lmms
33{
34
35namespace gui
36{
37
38class SampleTrackView;
40
41} // namespace gui
42
43
44class SampleTrack : public Track
45{
46 Q_OBJECT
47public:
49 ~SampleTrack() override;
50
51 bool play( const TimePos & _start, const f_cnt_t _frames,
52 const f_cnt_t _frame_base, int _clip_num = -1 ) override;
54 Clip* createClip(const TimePos & pos) override;
55
56
57 void saveTrackSpecificSettings(QDomDocument& doc, QDomElement& parent, bool presetMode) override;
58 void loadTrackSpecificSettings( const QDomElement & _this ) override;
59
61 {
62 return &m_mixerChannelModel;
63 }
64
66 {
67 return &m_audioBusHandle;
68 }
69
70 QString nodeName() const override
71 {
72 return "sampletrack";
73 }
74
75 bool isPlaying()
76 {
77 return m_isPlaying;
78 }
79
80 void setPlaying(bool playing)
81 {
82 if (m_isPlaying != playing) { emit playingChanged(); }
83 m_isPlaying = playing;
84 }
85
86signals:
88
89public slots:
90 void updateClips();
91 void setPlayingClips( bool isPlaying );
92 void updateMixerChannel();
93
94private:
100
101
102
105
106} ;
107
108
109} // namespace lmms
110
111#endif // LMMS_SAMPLE_TRACK_H
Job between PlayHandle and MixerChannel.
Definition AudioBusHandle.h:55
Definition Clip.h:50
Definition AutomatableModel.h:463
Definition AutomatableModel.h:481
IntModel * mixerChannelModel()
Definition SampleTrack.h:60
void updateClips()
Definition SampleTrack.cpp:225
bool play(const TimePos &_start, const f_cnt_t _frames, const f_cnt_t _frame_base, int _clip_num=-1) override
Definition SampleTrack.cpp:73
bool m_isPlaying
Definition SampleTrack.h:99
gui::TrackView * createView(gui::TrackContainerView *tcv) override
Definition SampleTrack.cpp:172
SampleTrack(TrackContainer *tc)
Definition SampleTrack.cpp:47
void setPlaying(bool playing)
Definition SampleTrack.h:80
AudioBusHandle m_audioBusHandle
Definition SampleTrack.h:98
QString nodeName() const override
Definition SampleTrack.h:70
IntModel m_mixerChannelModel
Definition SampleTrack.h:97
void setPlayingClips(bool isPlaying)
Definition SampleTrack.cpp:234
~SampleTrack() override
Definition SampleTrack.cpp:65
void loadTrackSpecificSettings(const QDomElement &_this) override
Definition SampleTrack.cpp:201
void saveTrackSpecificSettings(QDomDocument &doc, QDomElement &parent, bool presetMode) override
Definition SampleTrack.cpp:190
Clip * createClip(const TimePos &pos) override
Definition SampleTrack.cpp:180
bool isPlaying()
Definition SampleTrack.h:75
void updateMixerChannel()
Definition SampleTrack.cpp:247
FloatModel m_panningModel
Definition SampleTrack.h:96
FloatModel m_volumeModel
Definition SampleTrack.h:95
AudioBusHandle * audioBusHandle()
Definition SampleTrack.h:65
Definition TimePos.h:68
Definition TrackContainer.h:49
Track(Type type, TrackContainer *tc)
Create a new (empty) track object.
Definition Track.cpp:59
Definition SampleTrackView.h:45
Definition SampleTrackWindow.h:47
Definition TrackContainerView.h:71
Definition TrackView.h:60
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43