Merge pull request #396 from diizy/stable-0.4

A bunch of bugfixes
This commit is contained in:
Tobias Doerffel
2014-03-03 09:44:16 +01:00
10 changed files with 58 additions and 22 deletions

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0" />
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100" />
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="0" outputprogram="1" readable="1" />
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" outputprogram="1" readable="1" />
<fxchain numofeffects="7" enabled="1" >
<effect autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1" >
<ladspacontrols port11="72" port01="72" link="1" ports="2" port01link="1" />

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0" />
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100" />
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="0" outputprogram="1" readable="1" />
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" outputprogram="1" readable="1" />
<fxchain numofeffects="6" enabled="1" >
<effect autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1" >
<ladspacontrols port11="72" port01="72" link="1" ports="2" port01link="1" />

View File

@@ -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();

View File

@@ -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 );
}

View File

@@ -22,8 +22,8 @@
*
*/
#ifndef _REMOTE_ZYNADDSUBFX_H
#define _REMOTE_ZYNADDSUBFX_H
#ifndef REMOTE_ZYNADDSUBFX_H
#define REMOTE_ZYNADDSUBFX_H
#include "RemotePlugin.h"

View File

@@ -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();
}

View File

@@ -2,7 +2,7 @@
* ZynAddSubFx.h - ZynAddSubFX-embedding plugin
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
*
* 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 <QtCore/QMap>
#include <QtCore/QMutex>

View File

@@ -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;
}

View File

@@ -29,6 +29,7 @@
#include <QtGui/QPainter>
#include <QtGui/QFontMetrics>
#include <QtGui/QStyleOptionFrameV2>
#include <QtGui/QInputDialog>
#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"

View File

@@ -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() )