hydrogen 1.2.3
SampleEditor.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (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
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef SAMPLEEDITOR_H
24#define SAMPLEEDITOR_H
25
26#include "ui_SampleEditor_UI.h"
28
29#include <QDialog>
30#include <core/Object.h>
32#include <core/Basics/Song.h>
33#include <core/Basics/Sample.h>
35
36
40
44
45class SampleEditor : public QDialog, public Ui_SampleEditor_UI, public H2Core::Object<SampleEditor>
46{
48 Q_OBJECT
49 public:
50
51 SampleEditor( QWidget* pParent, int nSelectedComponent, int nSelectedLayer, QString nSampleFilename );
53
54 void setSampleName( QString name);
55 bool getCloseQuestion();
58 void setUnclean();
59 void setClean();
60
61 //this values come from the real sample to restore a frm song loaded sample
63
64 private slots:
66 void valueChangedProcessingTypeComboBox( const QString );
67 void valueChangedrubberComboBox( const QString );
68 void valueChangedrubberbandCsettingscomboBox( const QString );
69 void valueChangedpitchdoubleSpinBox( double );
77 void on_verticalzoomSlider_valueChanged ( int value );
80
81
82
83 private:
84
85 std::shared_ptr<H2Core::Sample> retrieveSample() const;
86
87 void openDisplays();
88 void getAllFrameInfos();
92 void createNewLayer();
95 void testpTimer();
96 void checkRatioSettings();
97
98 virtual void closeEvent(QCloseEvent *event) override;
99 virtual void mouseReleaseEvent(QMouseEvent *ev) override;
100
104
105 std::shared_ptr<H2Core::Sample> m_pSampleFromFile;
109
110 double m_divider;
114
121
122 unsigned long m_nRealtimeFrameEnd;
124 unsigned m_nSlframes;
126 QTimer *m_pTimer;
129 float m_fRatio;
132};
133
134
135#endif
#define H2_OBJECT(name)
Definition Object.h:224
set of loop configuration flags
Definition Sample.h:78
set of rubberband configuration flags
Definition Sample.h:110
This dialog is used to preview audiofiles.
void updateTargetsamplePositionRuler()
void updateMainsamplePositionRuler()
MainSampleWaveDisplay * m_pMainSampleWaveDisplay
bool returnAllMainWaveDisplayValues()
float m_fZoomfactor
unsigned * m_pPositionsRulerPath
std::shared_ptr< H2Core::Sample > m_pSampleFromFile
void valueChangedLoopFrameSpinBox(int)
QString m_sLineColor
void getAllLocalFrameInfos()
std::shared_ptr< H2Core::Sample > retrieveSample() const
void returnAllTargetDisplayValues()
void createPositionsRulerPath()
H2Core::Sample::Loops __loops
void setAllSampleProps()
unsigned long m_nRealtimeFrameEndForTarget
void valueChangedProcessingTypeComboBox(const QString)
QTimer * m_pTargetDisplayTimer
QTimer * m_pTimer
bool getCloseQuestion()
void getAllFrameInfos()
bool m_bSampleEditorClean
void createNewLayer()
void setSamplelengthFrames()
bool m_bSampleIsModified
true if sample is modified
unsigned m_nSlframes
QString m_sSampleName
void setSampleName(QString name)
int m_nSelectedComponent
void valueChangedrubberComboBox(const QString)
virtual void closeEvent(QCloseEvent *event) override
void on_PrevChangesPushButton_clicked()
void on_PlayPushButton_clicked()
H2Core::Sample::Rubberband __rubberband
void valueChangedrubberbandCsettingscomboBox(const QString)
virtual void mouseReleaseEvent(QMouseEvent *ev) override
TargetWaveDisplay * m_pTargetSampleView
unsigned m_pDetailFrame
void checkRatioSettings()
SampleEditor(QWidget *pParent, int nSelectedComponent, int nSelectedLayer, QString nSampleFilename)
void valueChangedEndFrameSpinBox(int)
unsigned m_nSamplerate
void testPositionsSpinBoxes()
void on_verticalzoomSlider_valueChanged(int value)
void valueChangedStartFrameSpinBox(int)
void on_ClosePushButton_clicked()
void valueChangedpitchdoubleSpinBox(double)
void on_PlayOrigPushButton_clicked()
void valueChangedLoopCountSpinBox(int)
DetailWaveDisplay * m_pSampleAdjustView
unsigned long m_nRealtimeFrameEnd