# HG changeset patch # User Chris Cannam # Date 1399471955 -3600 # Node ID b3609adae9215ffb8d936fadc432d3bd6cc0fab2 # Parent 0e4332efcc7dc8fee2706b4c84f1d9eee4c61462# Parent 63dec7dc11cc9edf74770268bf617619c4f5b3c8 Merge from tonioni branch diff -r 63dec7dc11cc -r b3609adae921 audioio/AudioGenerator.cpp --- 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); diff -r 63dec7dc11cc -r b3609adae921 audioio/ClipMixer.cpp --- 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; diff -r 63dec7dc11cc -r b3609adae921 audioio/PlaySpeedRangeMapper.cpp --- 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; diff -r 63dec7dc11cc -r b3609adae921 audioio/PlaySpeedRangeMapper.h --- 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; diff -r 63dec7dc11cc -r b3609adae921 framework/MainWindowBase.cpp --- 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()) { diff -r 63dec7dc11cc -r b3609adae921 framework/MainWindowBase.h --- 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;