Compare commits

...

11 Commits

Author SHA1 Message Date
Tobias Doerffel
05f1b45ab7 Made 0.4.15 release
Bumped version number to 0.4.15 in CMakeLists.txt, README and lmms.rc.in.
2013-06-11 17:46:42 +02:00
Tobias Doerffel
7eafca807b AudioFileWave: do not use UTF-8 filenames on Windows
As libsndfile does not seem to have an UTF8-compatible implementation
on Windows we have to pass the filename as local 8 bit encoding in order
to make the file written properly.

Closes #530.
2013-06-11 16:29:58 +02:00
Tobias Doerffel
0aaed00cc1 AutomationPattern: initialize with current value of first object
When attaching a control object to an AutomationPattern initialize the
value at position 0 with the current value of the control object.

This is similiar to the behaviour found in LMMS < 0.4.14 and has been
reintroduced as requested by some users.

Closes #535.
2013-06-11 14:50:51 +02:00
Tobias Doerffel
f83b9b04a3 AutomationPattern: removed unused member variable
The variable m_hasAutomation is not required anymore and thus can be
dropped.
2013-06-11 14:50:27 +02:00
Tobias Doerffel
005f2dde50 InstrumentFunctions/ChordCreator: fixed major pentatonic
The last key of the major pentatonic chord was wrong and has been fixed.

Thanks to Mike804 for reporting the issue.

Closes #538.
2013-06-11 13:48:58 +02:00
Tobias Doerffel
d4478461a3 AudioFileOgg: test for properly opened output file
Do not pretend things gone right if output file could not be opened
for some reason.

Closes #539.
2013-06-11 13:38:07 +02:00
Tobias Doerffel
4bdc94c608 AudioFileWave: test for properly opened output file
Do not pretend things gone right if output file could not be opened
for some reason.

Closes #539.
2013-06-11 13:37:07 +02:00
Tobias Doerffel
44c37775a4 Sf2Player: preserve custom track name when loading settings
Commit a184bc039e introduced a regression
which causes a custom track name not being preserved when loading
setings.

Closes #534.
2013-06-11 13:25:18 +02:00
Raine M. Ekman
8e2ec9e48f AudioFileProcessor: Make AFP cursor configurable
Add possibility to turn off playback cursor in AFP. Might be good
for weaker systems.

Closes Patch #40.
2013-06-11 13:19:00 +02:00
Raine M. Ekman
0f3851d597 AudioFileProcessor: fix crash with reversed samples
AudioFileProcessorWaveView::slideSampleByFrames() gets called before the
knobs are created and/or after they are destroyed if the sample is
reversed. Added checks for nonexistant knobs.

Closes Patch #41 and Bug #525.
2013-06-11 13:18:05 +02:00
Tobias Doerffel
e29de773b3 InstrumentTrack: fix freeze when forwarding MIDI events to instrument
In commit a3abcdb2e0 we introduced
multitimbral MIDI support. However the new code path causes the mixer
not being unlocked at exit and thus causes a freeze of LMMS.

Thanks to nuio for pointing out this issue and providing a patch.

Closes #532.
2013-05-01 21:51:37 +02:00
15 changed files with 77 additions and 41 deletions

View File

@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "4")
SET(VERSION_PATCH "14")
SET(VERSION_PATCH "15")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)

2
README
View File

@@ -1,4 +1,4 @@
Linux MultiMedia Studio 0.4.14
Linux MultiMedia Studio 0.4.15
===============================
Copyright (c) 2004-2013 by LMMS-developers

View File

@@ -71,7 +71,7 @@ public:
inline bool hasAutomation() const
{
return m_hasAutomation;
return m_timeMap.isEmpty() == false;
}
float valueAt( const midiTime & _time ) const;

View File

@@ -109,6 +109,7 @@ private slots:
void toggleOneInstrumentTrackWindow( bool _enabled );
void toggleCompactTrackButtons( bool _enabled );
void toggleSyncVSTPlugins( bool _enabled );
void toggleAnimateAFP( bool _enabled );
private:
@@ -158,6 +159,7 @@ private:
bool m_oneInstrumentTrackWindow;
bool m_compactTrackButtons;
bool m_syncVSTPlugins;
bool m_animateAFP;
typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
typedef QMap<QString, MidiClient::setupWidget *> MswMap;

View File

@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,14,0
FILEVERSION 0,4,15,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP

View File

@@ -522,7 +522,8 @@ AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _
m_endKnob( 0 ),
m_isDragging( false ),
m_reversed( false ),
m_framesPlayed( 0 )
m_framesPlayed( 0 ),
m_animation(configManager::inst()->value("ui", "animateafp").toInt())
{
setFixedSize( _w, _h );
setMouseTracking( true );
@@ -701,7 +702,7 @@ void AudioFileProcessorWaveView::paintEvent( QPaintEvent * _pe )
QColor( 255, 255, 0, 70 )
);
if( m_framesPlayed )
if( m_framesPlayed && m_animation)
{
const int played_width_px = m_framesPlayed
/ double( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() )
@@ -932,8 +933,12 @@ void AudioFileProcessorWaveView::slideSampleByFrames( f_cnt_t _frames )
return;
}
const double v = double( _frames ) / m_sampleBuffer.frames();
m_startKnob->slideBy( v, false );
m_endKnob->slideBy( v, false );
if(m_startKnob) {
m_startKnob->slideBy( v, false );
}
if(m_endKnob) {
m_endKnob->slideBy( v, false );
}
}

View File

@@ -91,7 +91,6 @@ private:
BoolModel m_reverseModel;
BoolModel m_loopModel;
friend class AudioFileProcessorView;
} ;
@@ -235,7 +234,7 @@ private:
draggingType m_draggingType;
bool m_reversed;
f_cnt_t m_framesPlayed;
bool m_animation;
public:
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );

View File

@@ -228,7 +228,7 @@ void sf2Instrument::saveSettings( QDomDocument & _doc, QDomElement & _this )
void sf2Instrument::loadSettings( const QDomElement & _this )
{
openFile( _this.attribute( "src" ) );
openFile( _this.attribute( "src" ), false );
m_patchNum.loadSettings( _this, "patch" );
m_bankNum.loadSettings( _this, "bank" );
@@ -329,7 +329,7 @@ void sf2Instrument::freeFont()
void sf2Instrument::openFile( const QString & _sf2File )
void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName )
{
emit fileLoading();
@@ -390,7 +390,10 @@ void sf2Instrument::openFile( const QString & _sf2File )
delete[] sf2Ascii;
instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
if( updateTrackName )
{
instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
}
}

View File

@@ -2,7 +2,7 @@
* sf2_player.h - a soundfont2 player using fluidSynth
*
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2009-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -91,7 +91,7 @@ public:
public slots:
void openFile( const QString & _sf2File );
void openFile( const QString & _sf2File, bool updateTrackName = true );
void updatePatch();
void updateSampleRate();

View File

@@ -41,8 +41,7 @@
AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) :
trackContentObject( _auto_track ),
m_autoTrack( _auto_track ),
m_objects(),
m_hasAutomation( false )
m_objects()
{
changeLength( midiTime( 1, 0 ) );
}
@@ -53,8 +52,7 @@ AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) :
AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) :
trackContentObject( _pat_to_copy.m_autoTrack ),
m_autoTrack( _pat_to_copy.m_autoTrack ),
m_objects( _pat_to_copy.m_objects ),
m_hasAutomation( _pat_to_copy.m_hasAutomation )
m_objects( _pat_to_copy.m_objects )
{
for( timeMap::const_iterator it = _pat_to_copy.m_timeMap.begin();
it != _pat_to_copy.m_timeMap.end(); ++it )
@@ -99,7 +97,15 @@ void AutomationPattern::addObject( AutomatableModel * _obj, bool _search_dup )
if( addIt )
{
// been empty before?
if( m_objects.isEmpty() && hasAutomation() == false )
{
// then initialize default value
putValue( 0, _obj->value<float>(), false );
}
m_objects += _obj;
connect( _obj, SIGNAL( destroyed( jo_id_t ) ),
this, SLOT( objectDestroyed( jo_id_t ) ),
Qt::DirectConnection );
@@ -154,8 +160,6 @@ midiTime AutomationPattern::putValue( const midiTime & _time,
m_timeMap[newTime] = _value;
m_hasAutomation = true;
// we need to maximize our length in case we're part of a hidden
// automation track as the user can't resize this pattern
if( getTrack() && getTrack()->type() == track::HiddenAutomationTrack )
@@ -183,11 +187,6 @@ void AutomationPattern::removeValue( const midiTime & _time )
changeLength( length() );
}
if( m_timeMap.isEmpty() )
{
m_hasAutomation = false;
}
emit dataChanged();
}
@@ -277,8 +276,6 @@ void AutomationPattern::loadSettings( const QDomElement & _this )
}
}
m_hasAutomation = m_timeMap.size() > 0;
int len = _this.attribute( "len" ).toInt();
if( len <= 0 )
{
@@ -353,7 +350,7 @@ bool AutomationPattern::isAutomated( const AutomatableModel * _m )
{
const AutomationPattern * a =
dynamic_cast<const AutomationPattern *>( *j );
if( a && a->m_hasAutomation )
if( a && a->hasAutomation() )
{
for( objectVector::const_iterator k = a->m_objects.begin();
k != a->m_objects.end(); ++k )

View File

@@ -113,7 +113,7 @@ ChordCreator::ChordTable::Init ChordCreator::ChordTable::s_initTable[] =
{ QT_TRANSLATE_NOOP( "ChordCreator", "Melodic minor" ), { 0, 2, 3, 5, 7, 9, 11, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Whole tone" ), { 0, 2, 4, 6, 8, 10, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Diminished" ), { 0, 2, 3, 5, 6, 8, 9, 11, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Major pentatonic" ), { 0, 2, 4, 7, 10, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Major pentatonic" ), { 0, 2, 4, 7, 9, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Minor pentatonic" ), { 0, 3, 5, 7, 10, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Jap in sen" ), { 0, 1, 5, 7, 10, -1 } },
{ QT_TRANSLATE_NOOP( "ChordCreator", "Major bebop" ), { 0, 2, 4, 5, 7, 8, 9, 11, -1 } },

View File

@@ -5,7 +5,7 @@
* This file is based on encode.c from vorbis-tools-source, for more information
* see below.
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -49,7 +49,7 @@ AudioFileOgg::AudioFileOgg( const sample_rate_t _sample_rate,
_nom_bitrate, _min_bitrate, _max_bitrate,
_depth, _mixer )
{
m_ok = _success_ful = startEncoding();
m_ok = _success_ful = outputFileOpened() && startEncoding();
}

View File

@@ -2,7 +2,7 @@
* AudioFileWave.cpp - audio-device which encodes wave-stream and writes it
* into a WAVE-file. This is used for song-export.
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -38,9 +38,10 @@ AudioFileWave::AudioFileWave( const sample_rate_t _sample_rate,
mixer * _mixer ) :
AudioFileDevice( _sample_rate, _channels, _file, _use_vbr,
_nom_bitrate, _min_bitrate, _max_bitrate,
_depth, _mixer )
_depth, _mixer ),
m_sf( NULL )
{
_success_ful = startEncoding();
_success_ful = outputFileOpened() && startEncoding();
}
@@ -68,7 +69,13 @@ bool AudioFileWave::startEncoding()
case 16:
default: m_si.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; break;
}
m_sf = sf_open( outputFile().toUtf8().constData(), SFM_WRITE, &m_si );
m_sf = sf_open(
#ifdef LMMS_BUILD_WIN32
outputFile().toLocal8Bit().constData(),
#else
outputFile().toUtf8().constData(),
#endif
SFM_WRITE, &m_si );
sf_set_string ( m_sf, SF_STR_SOFTWARE, "LMMS" );
return true;
}
@@ -110,6 +117,9 @@ void AudioFileWave::writeBuffer( const surroundSampleFrame * _ab,
void AudioFileWave::finishEncoding()
{
sf_close( m_sf );
if( m_sf )
{
sf_close( m_sf );
}
}

View File

@@ -1,7 +1,7 @@
/*
* setup_dialog.cpp - dialog for setting up LMMS
*
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -119,7 +119,9 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
m_compactTrackButtons( configManager::inst()->value( "ui",
"compacttrackbuttons" ).toInt() ),
m_syncVSTPlugins( configManager::inst()->value( "ui",
"syncvstplugins" ).toInt() )
"syncvstplugins" ).toInt() ),
m_animateAFP(configManager::inst()->value( "ui",
"animateafp").toInt() )
{
setWindowIcon( embed::getIconPixmap( "setup_general" ) );
setWindowTitle( tr( "Setup LMMS" ) );
@@ -476,7 +478,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
tabWidget * ui_fx_tw = new tabWidget( tr( "UI effects vs. "
"performance" ).toUpper(),
performance );
ui_fx_tw->setFixedHeight( 100 );
ui_fx_tw->setFixedHeight( 120 );
ledCheckBox * disable_ch_act_ind = new ledCheckBox(
tr( "Disable channel activity indicators" ),
@@ -511,6 +513,15 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
this, SLOT( toggleAutoSave( bool ) ) );
ledCheckBox * animAFP = new ledCheckBox(
tr( "Show playback cursor in AudioFileProcessor" ),
ui_fx_tw );
animAFP->move( 10, 100 );
animAFP->setChecked( m_animateAFP );
connect( animAFP, SIGNAL( toggled( bool ) ),
this, SLOT( toggleAnimateAFP( bool ) ) );
perf_layout->addWidget( ui_fx_tw );
perf_layout->addStretch();
@@ -787,6 +798,9 @@ void setupDialog::accept()
QString::number( m_compactTrackButtons ) );
configManager::inst()->setValue( "ui", "syncvstplugins",
QString::number( m_syncVSTPlugins ) );
configManager::inst()->setValue( "ui", "animateafp",
QString::number( m_animateAFP ) );
configManager::inst()->setWorkingDir( m_workingDir );
configManager::inst()->setVSTDir( m_vstDir );
@@ -974,6 +988,11 @@ void setupDialog::toggleSyncVSTPlugins( bool _enabled )
m_syncVSTPlugins = _enabled;
}
void setupDialog::toggleAnimateAFP( bool _enabled )
{
m_animateAFP = _enabled;
}

View File

@@ -2,7 +2,7 @@
* InstrumentTrack.cpp - implementation of instrument-track-class
* (window + data-structures)
*
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -230,6 +230,7 @@ void InstrumentTrack::processInEvent( const midiEvent & _me,
midiPort()->realOutputChannel() < 0 */ )
{
m_instrument->handleMidiEvent( _me, _time );
engine::getMixer()->unlock();
return;
}