diff --git a/data/presets/TripleOscillator/Erazzor.xpf b/data/presets/TripleOscillator/Erazzor.xpf
index 4a5c174bc..95e7d1a89 100644
--- a/data/presets/TripleOscillator/Erazzor.xpf
+++ b/data/presets/TripleOscillator/Erazzor.xpf
@@ -14,7 +14,7 @@
-
+
diff --git a/data/presets/TripleOscillator/SEGuitar.xpf b/data/presets/TripleOscillator/SEGuitar.xpf
index bd6ec8df8..9fe6f8ded 100644
--- a/data/presets/TripleOscillator/SEGuitar.xpf
+++ b/data/presets/TripleOscillator/SEGuitar.xpf
@@ -14,7 +14,7 @@
-
+
diff --git a/include/LcdSpinBox.h b/include/LcdSpinBox.h
index a827b17cb..c95bad443 100644
--- a/include/LcdSpinBox.h
+++ b/include/LcdSpinBox.h
@@ -23,8 +23,8 @@
*/
-#ifndef _LCD_SPINBOX_H
-#define _LCD_SPINBOX_H
+#ifndef LCD_SPINBOX_H
+#define LCD_SPINBOX_H
#include "LcdWidget.h"
#include "AutomatableModelView.h"
@@ -70,12 +70,13 @@ protected:
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
virtual void wheelEvent( QWheelEvent * _we );
+ virtual void mouseDoubleClickEvent( QMouseEvent * _me );
private:
bool m_mouseMoving;
QPoint m_origMousePos;
int m_displayOffset;
-
+ void enterValue();
signals:
void manualChange();
diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp
index a64f19b5a..27cd287da 100644
--- a/plugins/sfxr/sfxr.cpp
+++ b/plugins/sfxr/sfxr.cpp
@@ -481,7 +481,10 @@ void sfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffe
delete[] pitchedBuffer;
- instrumentTrack()->processAudioBuffer( _working_buffer, frameNum, NULL );
+ applyRelease( _working_buffer, _n );
+
+ instrumentTrack()->processAudioBuffer( _working_buffer, frameNum, _n );
+
}
diff --git a/plugins/zynaddsubfx/RemoteZynAddSubFx.h b/plugins/zynaddsubfx/RemoteZynAddSubFx.h
index a5eb91a38..3abd0c494 100644
--- a/plugins/zynaddsubfx/RemoteZynAddSubFx.h
+++ b/plugins/zynaddsubfx/RemoteZynAddSubFx.h
@@ -22,8 +22,8 @@
*
*/
-#ifndef _REMOTE_ZYNADDSUBFX_H
-#define _REMOTE_ZYNADDSUBFX_H
+#ifndef REMOTE_ZYNADDSUBFX_H
+#define REMOTE_ZYNADDSUBFX_H
#include "RemotePlugin.h"
diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp
index 02808a63b..57f65b82a 100644
--- a/plugins/zynaddsubfx/ZynAddSubFx.cpp
+++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp
@@ -423,6 +423,9 @@ void ZynAddSubFxInstrument::initPlugin()
QSTR_TO_STDSTR(
QString( configManager::inst()->factoryPresetsDir() +
QDir::separator() + "ZynAddSubFX" ) ) ) );
+
+ m_remotePlugin->updateSampleRate( engine::mixer()->processingSampleRate() );
+
m_remotePlugin->showUI();
m_remotePlugin->unlock();
}
@@ -432,6 +435,7 @@ void ZynAddSubFxInstrument::initPlugin()
m_plugin->setSampleRate( engine::mixer()->processingSampleRate() );
m_plugin->setBufferSize( engine::mixer()->framesPerPeriod() );
}
+
m_pluginMutex.unlock();
}
diff --git a/plugins/zynaddsubfx/ZynAddSubFx.h b/plugins/zynaddsubfx/ZynAddSubFx.h
index ed65d24f5..27154cff1 100644
--- a/plugins/zynaddsubfx/ZynAddSubFx.h
+++ b/plugins/zynaddsubfx/ZynAddSubFx.h
@@ -2,7 +2,7 @@
* ZynAddSubFx.h - ZynAddSubFX-embedding plugin
*
* Copyright (c) 2008-2010 Tobias Doerffel
- *
+ *
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -22,8 +22,8 @@
*
*/
-#ifndef _ZYNADDSUBFX_H
-#define _ZYNADDSUBFX_H
+#ifndef ZYNADDSUBFX_H
+#define ZYNADDSUBFX_H
#include
#include
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
index 2fe92f918..125c5efd2 100644
--- a/src/gui/MainWindow.cpp
+++ b/src/gui/MainWindow.cpp
@@ -42,7 +42,7 @@
#include "piano_roll.h"
#include "embed.h"
#include "engine.h"
-#include "FxMixerView.h"
+#include "FxMixerView.h"
#include "InstrumentTrack.h"
#include "PianoView.h"
#include "about_dialog.h"
@@ -143,7 +143,7 @@ MainWindow::MainWindow( void ) :
// Load background
QString bgArtwork = configManager::inst()->backgroundArtwork();
- QImage bgImage;
+ QImage bgImage;
if( !bgArtwork.isEmpty() )
{
bgImage = QImage( bgArtwork );
@@ -228,7 +228,7 @@ void MainWindow::finalize( void )
project_menu->addAction( embed::getIconPixmap( "project_open" ),
tr( "&Open..." ),
this, SLOT( openProject() ),
- Qt::CTRL + Qt::Key_O );
+ Qt::CTRL + Qt::Key_O );
m_recentlyOpenedProjectsMenu = project_menu->addMenu(
embed::getIconPixmap( "project_open_recent" ),
@@ -356,28 +356,28 @@ void MainWindow::finalize( void )
project_new_from_template->setMenu( m_templatesMenu );
project_new_from_template->setPopupMode( toolButton::InstantPopup );
- toolButton * project_open = new toolButton(
+ toolButton * project_open = new toolButton(
embed::getIconPixmap( "project_open" ),
tr( "Open existing project" ),
this, SLOT( openProject() ),
m_toolBar );
- toolButton * project_open_recent = new toolButton(
+ toolButton * project_open_recent = new toolButton(
embed::getIconPixmap( "project_open_recent" ),
tr( "Recently opened project" ),
this, SLOT( emptySlot() ), m_toolBar );
project_open_recent->setMenu( m_recentlyOpenedProjectsMenu );
project_open_recent->setPopupMode( toolButton::InstantPopup );
- toolButton * project_save = new toolButton(
+ toolButton * project_save = new toolButton(
embed::getIconPixmap( "project_save" ),
tr( "Save current project" ),
this, SLOT( saveProject() ),
m_toolBar );
- toolButton * project_export = new toolButton(
+ toolButton * project_export = new toolButton(
embed::getIconPixmap( "project_export" ),
tr( "Export current project" ),
engine::getSong(),
@@ -461,7 +461,7 @@ void MainWindow::finalize( void )
this, SLOT( toggleFxMixerWin() ),
m_toolBar );
fx_mixer_window->setShortcut( Qt::Key_F9 );
- fx_mixer_window->setWhatsThis(
+ fx_mixer_window->setWhatsThis(
tr( "Click here to show or hide the "
"FX Mixer. The FX Mixer is a very powerful tool "
"for managing effects for your song. You can insert "
@@ -616,7 +616,7 @@ void MainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
{
_w = _w->parentWidget();
}
-
+
_de.setAttribute( "x", _w->x() );
_de.setAttribute( "y", _w->y() );
_de.setAttribute( "visible", _w->isVisible() );
@@ -788,7 +788,9 @@ bool MainWindow::saveProjectAsNewVersion( void )
}
else
{
- VersionedSaveDialog::changeFileNameVersion( fileName, true );
+ do VersionedSaveDialog::changeFileNameVersion( fileName, true );
+ while ( QFile( fileName ).exists() );
+
engine::getSong()->guiSaveProjectAs( fileName );
return true;
}
diff --git a/src/gui/widgets/LcdSpinBox.cpp b/src/gui/widgets/LcdSpinBox.cpp
index a94c86435..3c638c5d5 100644
--- a/src/gui/widgets/LcdSpinBox.cpp
+++ b/src/gui/widgets/LcdSpinBox.cpp
@@ -29,6 +29,7 @@
#include
#include
#include
+#include
#include "LcdSpinBox.h"
#include "caption_menu.h"
@@ -119,6 +120,8 @@ void LcdSpinBox::mouseMoveEvent( QMouseEvent* event )
if( m_mouseMoving )
{
int dy = event->globalY() - m_origMousePos.y();
+ if( engine::mainWindow()->isShiftPressed() )
+ dy = qBound( -4, dy/4, 4 );
if( dy > 1 || dy < -1 )
{
model()->setInitValue( model()->value() -
@@ -156,7 +159,30 @@ void LcdSpinBox::wheelEvent( QWheelEvent * _we )
emit manualChange();
}
+void LcdSpinBox::mouseDoubleClickEvent( QMouseEvent * )
+{
+ enterValue();
+}
+void LcdSpinBox::enterValue()
+{
+ bool ok;
+ int new_val;
+
+ new_val = QInputDialog::getInt(
+ this, windowTitle(),
+ tr( "Please enter a new value between %1 and %2:" ).
+ arg( model()->minValue() ).
+ arg( model()->maxValue() ),
+ model()->value(),
+ model()->minValue(),
+ model()->maxValue(), 4, &ok );
+
+ if( ok )
+ {
+ model()->setValue( new_val );
+ }
+}
#include "moc_LcdSpinBox.cxx"
diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp
index ec83a21ba..074f32813 100644
--- a/src/gui/widgets/knob.cpp
+++ b/src/gui/widgets/knob.cpp
@@ -392,7 +392,7 @@ float knob::getValue( const QPoint & _p )
float value;
// arcane mathemagicks for calculating knob movement
- value = ( ( _p.y() + _p.y() * qMin( qAbs( _p.y() / 2 ), 6 ) ) ) / 10.0f;
+ value = ( ( _p.y() + _p.y() * qMin( qAbs( _p.y() / 2.5f ), 6.0f ) ) ) / 12.0f;
// if shift pressed we want slower movement
if( engine::mainWindow()->isShiftPressed() )