Mercurial > hg > svapp
changeset 347:b3609adae921 tony_integration
Merge from tonioni branch
author | Chris Cannam |
---|---|
date | Wed, 07 May 2014 15:12:35 +0100 |
parents | 0e4332efcc7d (diff) 63dec7dc11cc (current diff) |
children | f8e1ca25dd80 |
files | framework/MainWindowBase.cpp framework/MainWindowBase.h |
diffstat | 6 files changed, 30 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Thu Apr 03 08:51:30 2014 +0100 +++ b/audioio/AudioGenerator.cpp Wed May 07 15:12:35 2014 +0100 @@ -551,7 +551,7 @@ on.pan = pan; #ifdef DEBUG_AUDIO_GENERATOR - cout << "mixModel [clip]: adding note at frame " << noteFrame << ", frame offset " << on.frameOffset << " frequency " << on.frequency << endl; + cout << "mixModel [clip]: adding note at frame " << noteFrame << ", frame offset " << on.frameOffset << " frequency " << on.frequency << ", level " << on.level << endl; #endif starts.push_back(on);
--- a/audioio/ClipMixer.cpp Thu Apr 03 08:51:30 2014 +0100 +++ b/audioio/ClipMixer.cpp Wed May 07 15:12:35 2014 +0100 @@ -135,7 +135,7 @@ foreach (NoteStart note, m_playing) { for (int c = 0; c < m_channels; ++c) { - levels[c] = gain; + levels[c] = note.level * gain; } if (note.pan != 0.0 && m_channels == 2) { levels[0] *= 1.0 - note.pan;
--- a/audioio/PlaySpeedRangeMapper.cpp Thu Apr 03 08:51:30 2014 +0100 +++ b/audioio/PlaySpeedRangeMapper.cpp Wed May 07 15:12:35 2014 +0100 @@ -34,6 +34,13 @@ } int +PlaySpeedRangeMapper::getPositionForValueUnclamped(float value) const +{ + // We don't really provide this + return getPositionForValue(value); +} + +int PlaySpeedRangeMapper::getPositionForFactor(float factor) const { bool slow = (factor > 1.0); @@ -65,6 +72,13 @@ } float +PlaySpeedRangeMapper::getValueForPositionUnclamped(int position) const +{ + // We don't really provide this + return getValueForPosition(position); +} + +float PlaySpeedRangeMapper::getValueForFactor(float factor) const { float pc;
--- a/audioio/PlaySpeedRangeMapper.h Thu Apr 03 08:51:30 2014 +0100 +++ b/audioio/PlaySpeedRangeMapper.h Wed May 07 15:12:35 2014 +0100 @@ -24,7 +24,10 @@ PlaySpeedRangeMapper(int minpos, int maxpos); virtual int getPositionForValue(float value) const; + virtual int getPositionForValueUnclamped(float value) const; + virtual float getValueForPosition(int position) const; + virtual float getValueForPositionUnclamped(int position) const; int getPositionForFactor(float factor) const; float getValueForFactor(float factor) const;
--- a/framework/MainWindowBase.cpp Thu Apr 03 08:51:30 2014 +0100 +++ b/framework/MainWindowBase.cpp Wed May 07 15:12:35 2014 +0100 @@ -134,7 +134,6 @@ #endif MainWindowBase::MainWindowBase(bool withAudioOutput, - bool withOSCSupport, bool withMIDIInput) : m_document(0), m_paneStack(0), @@ -255,12 +254,6 @@ if (withMIDIInput) { m_midiInput = new MIDIInput(QApplication::applicationName(), this); } - - if (withOSCSupport) { - m_oscQueueStarter = new OSCQueueStarter(this); - connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); - m_oscQueueStarter->start(); - } } MainWindowBase::~MainWindowBase() @@ -271,6 +264,7 @@ delete m_playSource; delete m_viewManager; delete m_oscQueue; + delete m_oscQueueStarter; delete m_midiInput; Profiles::getInstance()->dump(); } @@ -286,6 +280,14 @@ } void +MainWindowBase::startOSCQueue() +{ + m_oscQueueStarter = new OSCQueueStarter(this); + connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); + m_oscQueueStarter->start(); +} + +void MainWindowBase::oscReady() { if (m_oscQueue && m_oscQueue->isOK()) {
--- a/framework/MainWindowBase.h Thu Apr 03 08:51:30 2014 +0100 +++ b/framework/MainWindowBase.h Wed May 07 15:12:35 2014 +0100 @@ -75,7 +75,7 @@ Q_OBJECT public: - MainWindowBase(bool withAudioOutput, bool withOSCSupport, bool withMIDIInput); + MainWindowBase(bool withAudioOutput, bool withMIDIInput); virtual ~MainWindowBase(); enum AudioFileOpenMode { @@ -311,6 +311,7 @@ OSCQueue *m_oscQueue; OSCQueueStarter *m_oscQueueStarter; + void startOSCQueue(); MIDIInput *m_midiInput;