made note-detuning-automation work by making automationPatterns also work without a parent-track and writing a generic inlineAutomation-class
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1185 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -49,6 +49,10 @@ public:
|
||||
automationPattern( const automationPattern & _pat_to_copy );
|
||||
virtual ~automationPattern();
|
||||
|
||||
inline void addObject( automatableModel * _obj )
|
||||
{
|
||||
m_objects += _obj;
|
||||
}
|
||||
|
||||
const automatableModel * firstObject( void );
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* detuning_helper.h - detuning automation helper
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,29 +27,32 @@
|
||||
#ifndef _DETUNING_HELPER_H
|
||||
#define _DETUNING_HELPER_H
|
||||
|
||||
|
||||
#include "automatable_model.h"
|
||||
#include "shared_object.h"
|
||||
#include "automation_editor.h"
|
||||
#include "inline_automation.h"
|
||||
|
||||
|
||||
class detuningHelper : public floatModel, public sharedObject
|
||||
class detuningHelper : public inlineAutomation
|
||||
{
|
||||
public:
|
||||
detuningHelper( void ) :
|
||||
floatModel(),
|
||||
sharedObject()
|
||||
inlineAutomation()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~detuningHelper()
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
return( automationEditor::tr( "Note detuning" ) );
|
||||
return( tr( "Note detuning" ) );
|
||||
}
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "detuning" );
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
73
include/inline_automation.h
Normal file
73
include/inline_automation.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* inline_automation.h - class for automating something "inline"
|
||||
*
|
||||
* Copyright (c) 2008 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _INLINE_AUTOMATION_H
|
||||
#define _INLINE_AUTOMATION_H
|
||||
|
||||
#include "automation_pattern.h"
|
||||
#include "shared_object.h"
|
||||
|
||||
|
||||
class inlineAutomation : public floatModel, public sharedObject
|
||||
{
|
||||
public:
|
||||
inlineAutomation( void ) :
|
||||
floatModel(),
|
||||
sharedObject(),
|
||||
m_autoPattern( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~inlineAutomation()
|
||||
{
|
||||
delete m_autoPattern;
|
||||
}
|
||||
|
||||
inline bool hasAutomationPattern( void ) const
|
||||
{
|
||||
return( m_autoPattern != NULL );
|
||||
}
|
||||
|
||||
automationPattern * getAutomationPattern( void )
|
||||
{
|
||||
if( m_autoPattern == NULL )
|
||||
{
|
||||
m_autoPattern = new automationPattern( NULL );
|
||||
m_autoPattern->addObject( this );
|
||||
}
|
||||
return( m_autoPattern );
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
|
||||
private:
|
||||
automationPattern * m_autoPattern;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -319,7 +319,7 @@ private:
|
||||
|
||||
float m_frequency;
|
||||
|
||||
baseDetuning * m_base_detuning;
|
||||
baseDetuning * m_baseDetuning;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user