Changeset 614
- Timestamp:
- 11/02/08 14:57:04 (2 months ago)
- Files:
-
- branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.cpp (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.h (modified) (1 diff)
- branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditorPanel.cpp (modified) (2 diffs)
- branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditorPanel.h (modified) (2 diffs)
- branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp (modified) (8 diffs)
- branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.cpp
r608 r614 322 322 323 323 324 void HydrogenApp::showSampleEditor( QString name, Sample *Sample )324 void HydrogenApp::showSampleEditor( QString name, Sample *Sample ) 325 325 { 326 326 if ( m_pSampleEditor ){ branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.h
r608 r614 74 74 void showAudioEngineInfoForm(); 75 75 void showPlaylistDialog(); 76 void showSampleEditor( QString name, H2Core::Sample *Sample );76 void showSampleEditor( QString name, H2Core::Sample *Sample ); 77 77 78 78 Mixer* getMixer() { return m_pMixer; } branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditorPanel.cpp
r436 r614 59 59 60 60 this->setLayout( vbox ); 61 m_player = 0; 61 62 } 62 63 … … 73 74 { 74 75 m_pInstrumentEditor->selectLayer( nLayer ); 76 m_player = nLayer; 75 77 } 76 78 77 79 80 81 branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditorPanel.h
r377 r614 39 39 40 40 void selectLayer( int nLayer ); 41 42 int getselectedLayer() { 43 return m_player; 44 } 45 41 46 private: 42 47 static InstrumentEditorPanel* m_pInstance; … … 44 49 45 50 InstrumentEditorPanel( QWidget *pParent ); 51 int m_player; 52 46 53 }; 47 54 branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp
r613 r614 24 24 #include "../HydrogenApp.h" 25 25 #include "InstrumentEditor/InstrumentEditor.h" 26 #include "InstrumentEditor/InstrumentEditorPanel.h" 26 27 #include "../widgets/Button.h" 27 28 … … 35 36 #include <hydrogen/sample.h> 36 37 #include <hydrogen/audio_engine.h> 38 #include <hydrogen/hydrogen.h> 37 39 38 40 #include <QModelIndex> … … 122 124 connect( LoopFrameSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( valueChangedLoopFrameSpinBox(int) ) ); 123 125 connect( EndFrameSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( valueChangedEndFrameSpinBox(int) ) ); 126 124 127 } 125 128 … … 200 203 201 204 205 202 206 void SampleEditor::mouseReleaseEvent(QMouseEvent *ev) 203 207 { 204 208 205 209 } 210 211 206 212 207 213 void SampleEditor::returnAllMainWaveDisplayValues() … … 220 226 m_ponewayEnd = true; 221 227 } 228 222 229 223 230 … … 257 264 258 265 266 259 267 void SampleEditor::valueChangedEndFrameSpinBox( int ) 260 268 { … … 273 281 274 282 283 275 284 void SampleEditor::on_verticalzoomSlider_valueChanged( int value ) 276 285 { … … 278 287 m_pSampleAdjustView->setDetailSamplePosition( m_pdetailframe, m_pzoomfactor, m_plineColor ); 279 288 } 289 290 291 292 void SampleEditor::on_PlayPushButton_clicked() 293 { 294 const int selectedlayer = InstrumentEditorPanel::getInstance()->getselectedLayer(); 295 const float pan_L = 0.5f; 296 const float pan_R = 0.5f; 297 const int nLength = -1; 298 const float fPitch = 0.0f; 299 Song *pSong = Hydrogen::get_instance()->getSong(); 300 301 Instrument *pInstr = pSong->get_instrument_list()->get( Hydrogen::get_instance()->getSelectedInstrumentNumber() ); 302 303 Note *pNote = new Note( pInstr, 0, pInstr->get_layer( selectedlayer )->get_end_velocity() - 0.01, pan_L, pan_R, nLength, fPitch); 304 AudioEngine::get_instance()->get_sampler()->note_on(pNote); 305 } branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.h
r613 r614 50 50 public: 51 51 52 SampleEditor( QWidget* pParent, H2Core::Sample *Sample );52 SampleEditor( QWidget* pParent, H2Core::Sample *Sample ); 53 53 ~SampleEditor(); 54 54 … … 67 67 void valueChangedEndFrameSpinBox( int ); 68 68 void on_verticalzoomSlider_valueChanged ( int value ); 69 void on_PlayPushButton_clicked(); 69 70 70 71 private: … … 78 79 */ 79 80 QString m_samplename; 80 H2Core::Sample *m_pSample;81 H2Core::Sample *m_pSample; 81 82 82 83 bool m_sample_is_modified; ///< true if sample is modified
