bugfixes and some small new features
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@89 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
89
ChangeLog
89
ChangeLog
@@ -1,18 +1,93 @@
|
||||
2006-02-22 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
* configure.in:
|
||||
* Makefile.am:
|
||||
* src/lmms_single_source.cpp:
|
||||
added support for compiling LMMS from one source file which often
|
||||
results in a better/more optimized executable
|
||||
|
||||
* include/note.h:
|
||||
* include/piano_roll.h:
|
||||
* src/core/note.cpp:
|
||||
* src/core/piano_roll.cpp:
|
||||
- simple quantization-support
|
||||
- fixed lengths for drawing notes can be selected in piano-roll
|
||||
|
||||
* resources/black_key.png:
|
||||
* resources/black_key_pressed.png:
|
||||
* resources/pr_black_key.png:
|
||||
* resources/pr_white_key_big.png:
|
||||
* resources/pr_white_key_small.png:
|
||||
* resources/white_key.png:
|
||||
* resources/white_key_pressed.png:
|
||||
replaced by new graphics
|
||||
|
||||
* src/core/engine.cpp:
|
||||
delete piano-roll after song-editor and bb-editor as patterns being
|
||||
destroyed still depend on it
|
||||
|
||||
2006-02-21 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
* src/tracks/channel_track.cpp:
|
||||
do not lock mutex in processOutEvent() as it causes a deadlock when
|
||||
having channel-activity-indicators enabled
|
||||
|
||||
* include/midi_mapper.h
|
||||
* include/project_notes.h:
|
||||
* src/lib/sample_buffer.cpp:
|
||||
* src/midi/midi_file.cpp:
|
||||
* src/midi/midi_mapper.cpp:
|
||||
* src/widgets/project_notes.cpp:
|
||||
misc fixes for being able to compile LMMS from one source-file
|
||||
|
||||
* include/automatable_object.h:
|
||||
* include/knob.h:
|
||||
* include/lcd_spinbox.h:
|
||||
* include/led_checkbox.h:
|
||||
* src/widgets/knob.cpp:
|
||||
* src/widgets/led_checkbox.cpp:
|
||||
* src/widgets/lcd_spinbox.cpp:
|
||||
introduced template-class automatableObject for central value-
|
||||
manipulation, range-checking etc. and made some classes (e.g. knob,
|
||||
ledCheckBox, lcdCheckBox) derive from it - preparations for full
|
||||
automation-support in LMMS
|
||||
|
||||
* Makefile.am:
|
||||
do not strip executable when installing as it makes even basic debugging
|
||||
impossible
|
||||
|
||||
2006-02-20 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
* src/widgets/combobox.cpp:
|
||||
* src/widgets/knob.cpp:
|
||||
* src/widgets/led_checkbox.cpp:
|
||||
draw shadowed text
|
||||
|
||||
* include/mixer.h:
|
||||
* src/core/arp_and_chords_tab_widget.cpp:
|
||||
* src/core/mixer.cpp:
|
||||
better xrun-detection and -handling (still not perfect)
|
||||
|
||||
* include/mixer.h:
|
||||
* src/tracks/channel_track.cpp:
|
||||
fixed critical bug which made LMMS crash if xruns were detected and
|
||||
notes were discarded by mixer and therefore deleted twice
|
||||
|
||||
2006-02-19 Andreas Brandmaier <andreas/at/brandmaier.de>
|
||||
|
||||
* plugins/organic/organic.cpp
|
||||
* plugins/organic/organic.h
|
||||
* presets/Organic
|
||||
* presets/Bitinvader
|
||||
* plugins/organic/organic.cpp:
|
||||
* plugins/organic/organic.h:
|
||||
* presets/Organic:
|
||||
* presets/Bitinvader:
|
||||
added waveshape knob
|
||||
changed distortion method from clipping to foldback
|
||||
renamed and added presets for Organic and BitInvader
|
||||
|
||||
2006-02-18 Andreas Brandmaier <andreas/at/brandmaier.de>
|
||||
|
||||
* plugins/organic/organic.cpp
|
||||
* plugins/organic/organic.h
|
||||
* presets/Organic
|
||||
* plugins/organic/organic.cpp:
|
||||
* plugins/organic/organic.h:
|
||||
* presets/Organic:
|
||||
added new plugin synthesizer plugin organic and some presets
|
||||
|
||||
2006-02-09 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
@@ -4,9 +4,9 @@ dist-hook:
|
||||
rm -rf `find $(distdir) -name \*.moc`
|
||||
|
||||
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir) ; \
|
||||
strip lmms
|
||||
#install-exec-hook:
|
||||
# cd $(DESTDIR)$(bindir) ; \
|
||||
# strip lmms
|
||||
|
||||
|
||||
if HAVE_RPM
|
||||
@@ -188,6 +188,7 @@ lmms_SOURCES = \
|
||||
$(srcdir)/src/widgets/tool_button.cpp \
|
||||
$(srcdir)/src/widgets/tooltip.cpp \
|
||||
$(srcdir)/src/widgets/visualization_widget.cpp \
|
||||
$(srcdir)/src/lmms_single_source.cpp \
|
||||
$(srcdir)/include/pch.h \
|
||||
$(srcdir)/include/debug.h \
|
||||
$(srcdir)/include/main_window.h \
|
||||
@@ -294,6 +295,7 @@ lmms_SOURCES = \
|
||||
$(srcdir)/include/combobox.h \
|
||||
$(srcdir)/include/rubberband.h \
|
||||
$(srcdir)/include/base64.h \
|
||||
$(srcdir)/include/automatable_object.h \
|
||||
$(srcdir)/include/qxembed.h
|
||||
|
||||
|
||||
|
||||
1
TODO
1
TODO
@@ -1,5 +1,6 @@
|
||||
to be done as soon as possible:
|
||||
|
||||
- KNOB-setValue!!!
|
||||
- separate GUI and data/sound-processing-code
|
||||
- fix qtimer-problem /channel-activity-LEDs
|
||||
- make color-scheme switchable: LMMS / user
|
||||
|
||||
19
configure.in
19
configure.in
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.1.4-cvs20060209, tobydox/at/users/dot/sourceforge/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060209)
|
||||
AC_INIT(lmms, 0.1.4-cvs20060222, tobydox/at/users/dot/sourceforge/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060222)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -330,6 +330,21 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# check whether to disable single-source-compile
|
||||
AC_MSG_CHECKING([whether to disable single-source-compile])
|
||||
# AH_TEMPLATE(SINGLE_SOURCE_COMPILE, [Define if you want to enable single-source-compile.])
|
||||
AC_ARG_ENABLE([ssc],
|
||||
AS_HELP_STRING([--disable-ssc],
|
||||
[disable single-source-compile]), NO_SSC="true")
|
||||
if test ! "x$NO_SSC" = "xtrue" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
# AC_DEFINE(SINGLE_SOURCE_COMPILE)
|
||||
CXXFLAGS="$CXXFLAGS -DSINGLE_SOURCE_COMPILE"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# check whether compiler of current platform supports attribute regparm(x)
|
||||
AC_MSG_CHECKING([whether we can use function-attribute regparm(x) on current platform])
|
||||
|
||||
198
include/automatable_object.h
Executable file
198
include/automatable_object.h
Executable file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
* automatable_object.h - declaration of class automatableObject
|
||||
*
|
||||
* Copyright (c) 2006 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _AUTOMATABLE_OBJECT_H
|
||||
#define _AUTOMATABLE_OBJECT_H
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
template<typename T>
|
||||
class automatableObject
|
||||
{
|
||||
public:
|
||||
automatableObject( const T _val = 0, const T _min = 0,
|
||||
const T _max = 0, const T _step = 1 ) :
|
||||
m_value( _val ),
|
||||
m_minValue( _min ),
|
||||
m_maxValue( _max ),
|
||||
m_step( _step )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~automatableObject()
|
||||
{
|
||||
}
|
||||
|
||||
static inline T minRelStep( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
static inline T defaultRelStep( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
static inline T minEps( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
|
||||
inline virtual T value( void ) const
|
||||
{
|
||||
return( m_value );
|
||||
}
|
||||
|
||||
inline virtual T minValue( void ) const
|
||||
{
|
||||
return( m_minValue );
|
||||
}
|
||||
|
||||
inline virtual T maxValue( void ) const
|
||||
{
|
||||
return( m_maxValue );
|
||||
}
|
||||
|
||||
inline virtual T step( void ) const
|
||||
{
|
||||
return( m_step );
|
||||
}
|
||||
|
||||
|
||||
inline virtual void setValue( const T _value )
|
||||
{
|
||||
m_value = tLimit<T>( _value, minValue(), maxValue() );
|
||||
if( m_step != 0 )
|
||||
{
|
||||
m_value = static_cast<T>( floorf( m_value / m_step ) *
|
||||
m_step );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_value = m_minValue;
|
||||
}
|
||||
|
||||
// correct rounding error at the border
|
||||
if( tAbs<T>( m_value - m_maxValue ) < minEps() *
|
||||
tAbs<T>( m_step ) )
|
||||
{
|
||||
m_value = m_maxValue;
|
||||
}
|
||||
|
||||
// correct rounding error if value = 0
|
||||
if( tAbs<T>( m_value ) < minEps() * tAbs<T>( m_step ) )
|
||||
{
|
||||
m_value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline virtual void incValue( int _steps )
|
||||
{
|
||||
setValue( m_value + _steps * m_step );
|
||||
}
|
||||
|
||||
inline virtual void setRange( const T _min, const T _max,
|
||||
const T _step = 0 )
|
||||
{
|
||||
m_minValue = _min;
|
||||
m_maxValue = _max;
|
||||
setStep( _step );
|
||||
if( m_minValue > m_maxValue )
|
||||
{
|
||||
qSwap<T>( m_minValue, m_maxValue );
|
||||
}
|
||||
// re-adjust value
|
||||
setValue( value() );
|
||||
}
|
||||
|
||||
inline virtual void setStep( const T _step )
|
||||
{
|
||||
/*
|
||||
const T intv = maxValue() - minValue();
|
||||
|
||||
if( _step == 0 )
|
||||
{
|
||||
m_step = intv * defaultRelStep();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ( intv > 0 ) && ( _step < 0 ) || ( intv < 0 ) &&
|
||||
( _step > 0 ) )
|
||||
{
|
||||
m_step = -_step;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_step = _step;
|
||||
}
|
||||
if( tAbs<T>( m_step ) <
|
||||
tAbs<T>( minRelStep() * intv ) )
|
||||
{
|
||||
m_step = minRelStep() * intv;
|
||||
}
|
||||
}*/
|
||||
m_step = _step;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
T m_minValue;
|
||||
T m_maxValue;
|
||||
T m_step;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline float automatableObject<float>::minRelStep( void )
|
||||
{
|
||||
return( 1.0e-10 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline float automatableObject<float>::defaultRelStep( void )
|
||||
{
|
||||
return( 1.0e-2 );
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline float automatableObject<float>::minEps( void )
|
||||
{
|
||||
return( 1.0e-10 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* group_box.h - LMMS-groupbox
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -48,7 +48,7 @@ class groupBox : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
groupBox( const QString & _caption, QWidget * _parent );
|
||||
~groupBox();
|
||||
virtual ~groupBox();
|
||||
|
||||
bool isActive( void ) const
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
class instrumentPlayHandle : public playHandle
|
||||
{
|
||||
public:
|
||||
inline instrumentPlayHandle( instrument * _instrument ) FASTCALL :
|
||||
inline instrumentPlayHandle( instrument * _instrument ) :
|
||||
playHandle( INSTRUMENT_PLAY_HANDLE, _instrument->eng() ),
|
||||
m_instrument( _instrument )
|
||||
{
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
@@ -58,7 +59,8 @@ enum knobTypes
|
||||
|
||||
|
||||
|
||||
class knob : public QWidget, public engineObject
|
||||
class knob : public QWidget, public engineObject,
|
||||
public automatableObject<float>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -73,10 +75,18 @@ public:
|
||||
|
||||
void setTotalAngle( float _angle );
|
||||
|
||||
void setRange( float _vmin, float _vmax, float _vstep = 0.0,
|
||||
int _pagesize = 1 );
|
||||
inline void setInitValue( const float _val )
|
||||
{
|
||||
m_initValue = _val;
|
||||
setValue( _val );
|
||||
}
|
||||
|
||||
inline float value( void ) const
|
||||
virtual void setValue( const float _x );
|
||||
|
||||
virtual void setRange( const float _min, const float _max,
|
||||
const float _step = 0.0 );
|
||||
|
||||
/* inline float value( void ) const
|
||||
{
|
||||
return( m_value );
|
||||
}
|
||||
@@ -90,19 +100,19 @@ public:
|
||||
inline float minValue( void ) const
|
||||
{
|
||||
return( m_minValue );
|
||||
}
|
||||
}*/
|
||||
|
||||
inline void incPages( int _n_pages )
|
||||
/* inline void incPages( int _n_pages )
|
||||
{
|
||||
setNewValue( m_value + float( _n_pages ) * m_pageSize, 1 );
|
||||
}
|
||||
setNewValue( value() + float( _n_pages ) * m_pageSize, 1 );
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void setValue( float _val, bool _is_init_value = FALSE );
|
||||
/* void setValue( float _val, bool _is_init_value = FALSE );
|
||||
void fitValue( float _val );
|
||||
void incValue( int _steps );
|
||||
void incValue( int _steps );*/
|
||||
void reset( void );
|
||||
void copyValue( void );
|
||||
void pasteValue( void );
|
||||
@@ -148,7 +158,6 @@ protected:
|
||||
|
||||
void buttonReleased( void );
|
||||
|
||||
void setNewValue( float _x, bool _align = FALSE );
|
||||
|
||||
|
||||
static float s_copiedValue;
|
||||
@@ -160,6 +169,7 @@ protected:
|
||||
bool m_buttonPressed;
|
||||
|
||||
|
||||
float m_pageSize;
|
||||
float m_angle;
|
||||
float m_totalAngle;
|
||||
|
||||
@@ -170,14 +180,6 @@ protected:
|
||||
QString m_label;
|
||||
|
||||
|
||||
float m_minValue;
|
||||
float m_maxValue;
|
||||
float m_step;
|
||||
float m_pageSize;
|
||||
float m_value;
|
||||
float m_exactValue;
|
||||
float m_exactPrevValue;
|
||||
float m_prevValue;
|
||||
float m_initValue;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -41,22 +41,25 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
|
||||
class lcdSpinBox : public QWidget
|
||||
class lcdSpinBox : public QWidget, public automatableObject<int>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lcdSpinBox( int _min, int _max, int _num_digits, QWidget * _parent );
|
||||
virtual ~lcdSpinBox();
|
||||
|
||||
void setStep( int _step );
|
||||
virtual void setStep( const int _step );
|
||||
|
||||
inline int value( void ) const
|
||||
/* inline int value( void ) const
|
||||
{
|
||||
return( m_number->intValue() );
|
||||
}
|
||||
}*/
|
||||
|
||||
void setLabel( const QString & _txt );
|
||||
|
||||
@@ -67,7 +70,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
void setValue( int _value );
|
||||
virtual void setValue( const int _value );
|
||||
virtual void setEnabled( bool _on );
|
||||
|
||||
|
||||
@@ -81,10 +84,10 @@ protected:
|
||||
private:
|
||||
QMap<int, QString> m_textForValue;
|
||||
|
||||
int m_value;
|
||||
/* int m_value;
|
||||
int m_minValue;
|
||||
int m_maxValue;
|
||||
int m_step;
|
||||
int m_step;*/
|
||||
|
||||
QLCDNumber * m_number;
|
||||
QLabel * m_label;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* led_checkbox.h - class ledCheckBox, an improved QCheckBox
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -39,10 +39,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
|
||||
|
||||
class ledCheckBox : public QWidget
|
||||
class ledCheckBox : public QWidget, public automatableObject<bool>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -58,7 +61,7 @@ public:
|
||||
|
||||
inline bool isChecked( void ) const
|
||||
{
|
||||
return( m_checked );
|
||||
return( value() );
|
||||
}
|
||||
|
||||
inline const QString & text( void )
|
||||
@@ -81,7 +84,6 @@ private:
|
||||
QPixmap * m_ledOnPixmap;
|
||||
QPixmap * m_ledOffPixmap;
|
||||
|
||||
bool m_checked;
|
||||
QString m_text;
|
||||
|
||||
signals:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_mapper.h - MIDI-mapper for any midiDevice
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "midi.h"
|
||||
|
||||
const Uint8 MIDI_PROGRAMS = 128;
|
||||
const Uint8 MIDI_KEYS = 128;
|
||||
const Uint8 MIDI_CHANNELS = 16;
|
||||
|
||||
|
||||
class midiMapper
|
||||
{
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
|
||||
QPair<Uint8, QString> m_patchMap[MIDI_PROGRAMS];
|
||||
QPair<Uint8, QString> m_drumsetKeyMap[MIDI_KEYS];
|
||||
Uint8 m_channelMap[MIDI_CHANNELS];
|
||||
Uint8 m_channelMap[MIDI_CHANNEL_COUNT];
|
||||
Uint8 m_drumsetChannel;
|
||||
Uint8 m_drumsetPatch;
|
||||
|
||||
|
||||
@@ -161,16 +161,18 @@ public:
|
||||
|
||||
|
||||
// play-handle stuff
|
||||
inline void addPlayHandle( playHandle * _ph )
|
||||
inline bool addPlayHandle( playHandle * _ph )
|
||||
{
|
||||
if( criticalXRuns() == FALSE )
|
||||
{
|
||||
m_playHandles.push_back( _ph );
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
delete _ph;
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
inline void removePlayHandle( playHandle * _ph )
|
||||
|
||||
@@ -101,11 +101,13 @@ public:
|
||||
|
||||
void FASTCALL setLength( const midiTime & _length );
|
||||
void FASTCALL setPos( const midiTime & _pos );
|
||||
void FASTCALL setTone( tones _tone = C );
|
||||
void FASTCALL setOctave( octaves _octave = DEFAULT_OCTAVE );
|
||||
void FASTCALL setKey( int _key );
|
||||
void FASTCALL setVolume( volume _volume = DEFAULT_VOLUME );
|
||||
void FASTCALL setPanning( panning _panning = DEFAULT_PANNING );
|
||||
void FASTCALL setTone( const tones _tone = C );
|
||||
void FASTCALL setOctave( const octaves _octave = DEFAULT_OCTAVE );
|
||||
void FASTCALL setKey( const int _key );
|
||||
void FASTCALL setVolume( const volume _volume = DEFAULT_VOLUME );
|
||||
void FASTCALL setPanning( const panning _panning = DEFAULT_PANNING );
|
||||
void FASTCALL quantizeLength( const int _q_grid );
|
||||
void FASTCALL quantizePos( const int _q_grid );
|
||||
|
||||
inline midiTime endPos( void ) const
|
||||
{
|
||||
@@ -162,6 +164,8 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
midiTime FASTCALL quantized( const midiTime & _m, const int _q_grid );
|
||||
|
||||
tones m_tone;
|
||||
octaves m_octave;
|
||||
volume m_volume;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
notePlayHandle( channelTrack * _chnl_trk, const f_cnt_t _frames_ahead,
|
||||
const f_cnt_t _frames, note * _n,
|
||||
const bool _arp_note = FALSE ) FASTCALL;
|
||||
const bool _arp_note = FALSE );
|
||||
virtual ~notePlayHandle();
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,8 @@ public:
|
||||
return( m_pattern != NULL );
|
||||
}
|
||||
|
||||
int quantization( void ) const;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void update( void );
|
||||
@@ -165,6 +167,8 @@ private:
|
||||
pianoRoll( const pianoRoll & );
|
||||
virtual ~pianoRoll();
|
||||
|
||||
midiTime newNoteLen( void ) const;
|
||||
|
||||
|
||||
static QPixmap * s_whiteKeyBigPm;
|
||||
static QPixmap * s_whiteKeySmallPm;
|
||||
@@ -193,6 +197,8 @@ private:
|
||||
toolButton * m_pasteButton;
|
||||
|
||||
comboBox * m_zoomingComboBox;
|
||||
comboBox * m_quantizeComboBox;
|
||||
comboBox * m_noteLenComboBox;
|
||||
|
||||
QPixmap m_paintPixmap;
|
||||
bool m_cursorInside;
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
PRESET_PREVIEW_PLAY_HANDLE
|
||||
} ;
|
||||
|
||||
inline playHandle( const types _type, engine * _engine ) FASTCALL :
|
||||
playHandle( const types _type, engine * _engine ) :
|
||||
engineObject( _engine ),
|
||||
m_type( _type )
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ class presetPreviewPlayHandle : public playHandle
|
||||
{
|
||||
public:
|
||||
presetPreviewPlayHandle( const QString & _preset_file,
|
||||
engine * _engine ) FASTCALL;
|
||||
engine * _engine );
|
||||
virtual ~presetPreviewPlayHandle();
|
||||
|
||||
virtual void play( void );
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#else
|
||||
|
||||
#include <qmainwindow.h>
|
||||
#define textColor color
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,9 +37,8 @@ class audioPort;
|
||||
class samplePlayHandle : public playHandle
|
||||
{
|
||||
public:
|
||||
samplePlayHandle( const QString & _sample_file, engine * _engine )
|
||||
FASTCALL;
|
||||
samplePlayHandle( sampleBuffer * _sample_buffer ) FASTCALL;
|
||||
samplePlayHandle( const QString & _sample_file, engine * _engine );
|
||||
samplePlayHandle( sampleBuffer * _sample_buffer );
|
||||
virtual ~samplePlayHandle();
|
||||
|
||||
virtual void play( void );
|
||||
|
||||
9
lmms.1
9
lmms.1
@@ -2,7 +2,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH LMMS 1 "February 01, 2006"
|
||||
.TH LMMS 1 "February 20, 2006"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@@ -30,9 +30,9 @@ lmms \- software for easy music-production
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
.B LMMS
|
||||
aims to be a free alternative to popular (but commercial and closed- source) programs like FruityLoops, Cubase and Logic giving you the ability of producing music with your computer by creating cool loops, synthesizing and mixing sounds, arranging samples, having fun with your MIDI-keyboard and much more...
|
||||
aims to be a free alternative to popular (but commercial and closed-source) programs such as FL Studio, Cubase and Logic giving you the ability of producing music with your computer by creating cool loops, synthesizing and mixing sounds, arranging samples, having fun with your MIDI-keyboard and much more...
|
||||
|
||||
LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/ sample-/song-/effect-management) and those of powerful instrument-plugins and samplers in a modern, user-friendly and easy to use graphical user-interface.
|
||||
LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/sample-/song-/effect-management) and those of powerful instrument-plugins and samplers in a modern, user-friendly and easy to use graphical user-interface.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP "\fB\-r, --render\fP \fIfile\fP
|
||||
@@ -45,5 +45,4 @@ Specify format of render-output where \fIformat\fP is either 'wav' or 'ogg'
|
||||
lmms was written by Tobias Doerffel and others. See AUTHORS for details.
|
||||
.PP
|
||||
This manual page was written by Florian Ragwitz <rafl@debian.org> and
|
||||
Tobias Doerffel <tobydox@users.sf.net>, for the Debian project (but may be
|
||||
used by others).
|
||||
Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>, for the Debian project (but may be used by others).
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "string_pair_drag.h"
|
||||
#include "mmp.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
@@ -171,7 +172,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
|
||||
m_ampKnob = new knob( knobDark_28, this, tr( "Amplify" ), eng() );
|
||||
m_ampKnob->setRange( 0, 500, 1.0f );
|
||||
m_ampKnob->move( 6, 114 );
|
||||
m_ampKnob->setValue( 100.0f, TRUE );
|
||||
m_ampKnob->setInitValue( 100.0f );
|
||||
m_ampKnob->setHintText( tr( "Amplify:" )+" ", "%" );
|
||||
m_ampKnob->setLabel( tr( "AMP" ) );
|
||||
connect( m_ampKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
@@ -190,7 +191,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
|
||||
eng() );
|
||||
m_startKnob->setRange( 0.0f, 1.0f, 0.00001f );
|
||||
m_startKnob->move( 46, 114 );
|
||||
m_startKnob->setValue( 0.0f, TRUE );
|
||||
m_startKnob->setInitValue( 0.0f );
|
||||
m_startKnob->setHintText( tr( "Startpoint:" )+" ", "" );
|
||||
m_startKnob->setLabel( tr( "START" ) );
|
||||
connect( m_startKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
@@ -209,7 +210,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
|
||||
m_endKnob = new knob( knobDark_28, this, tr( "End of sample" ), eng() );
|
||||
m_endKnob->setRange( 0.0f, 1.0f, 0.00001f );
|
||||
m_endKnob->move( 84, 114 );
|
||||
m_endKnob->setValue( 1.0f, TRUE );
|
||||
m_endKnob->setInitValue( 1.0f );
|
||||
m_endKnob->setHintText( tr( "Endpoint:" )+" ", "" );
|
||||
m_endKnob->setLabel( tr( "END" ) );
|
||||
connect( m_endKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
|
||||
@@ -67,9 +67,10 @@ using namespace std;
|
||||
#include "song_editor.h"
|
||||
#include "oscillator.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "embed.cpp"
|
||||
#include "base64.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -193,7 +194,7 @@ bitInvader::bitInvader( channelTrack * _channel_track ) :
|
||||
m_sampleLengthKnob = new knob( knobDark_28, this, tr( "Samplelength" ),
|
||||
eng() );
|
||||
m_sampleLengthKnob->setRange( 8, 128, 1 );
|
||||
m_sampleLengthKnob->setValue( 128, TRUE );
|
||||
m_sampleLengthKnob->setInitValue( 128 );
|
||||
m_sampleLengthKnob->move( 10, 120 );
|
||||
m_sampleLengthKnob->setHintText( tr( "Sample Length" ) + " ", "" );
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ using namespace std;
|
||||
#include "song_editor.h"
|
||||
#include "oscillator.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "embed.cpp"
|
||||
#include "base64.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -120,7 +122,7 @@ organicInstrument::organicInstrument( channelTrack * _channel_track ) :
|
||||
"Osc %1 waveform" ).arg( i+1 ), eng() );
|
||||
m_osc[i].oscKnob->move( 25+i*20, 90 );
|
||||
m_osc[i].oscKnob->setRange( 0.0f, 5.0f, 0.25f );
|
||||
m_osc[i].oscKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].oscKnob->setInitValue( 0.0f );
|
||||
m_osc[i].oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg(
|
||||
i+1 ) + " ", "%" );
|
||||
|
||||
@@ -133,7 +135,7 @@ organicInstrument::organicInstrument( channelTrack * _channel_track ) :
|
||||
"Osc %1 volume" ).arg( i+1 ), eng() );
|
||||
m_osc[i].volKnob->move( 25+i*20, 110 );
|
||||
m_osc[i].volKnob->setRange( 0, 100, 1.0f );
|
||||
m_osc[i].volKnob->setValue( 100, TRUE );
|
||||
m_osc[i].volKnob->setInitValue( 100 );
|
||||
m_osc[i].volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
i+1 ) + " ", "%" );
|
||||
|
||||
@@ -142,7 +144,7 @@ organicInstrument::organicInstrument( channelTrack * _channel_track ) :
|
||||
tr( "Osc %1 panning" ).arg( i + 1 ), eng() );
|
||||
m_osc[i].panKnob->move( 25+i*20, 130 );
|
||||
m_osc[i].panKnob->setRange( PANNING_LEFT, PANNING_RIGHT, 1.0f );
|
||||
m_osc[i].panKnob->setValue( DEFAULT_PANNING, TRUE );
|
||||
m_osc[i].panKnob->setInitValue( DEFAULT_PANNING );
|
||||
m_osc[i].panKnob->setHintText( tr("Osc %1 panning:").arg( i+1 )
|
||||
+ " ", "" );
|
||||
|
||||
@@ -152,7 +154,7 @@ organicInstrument::organicInstrument( channelTrack * _channel_track ) :
|
||||
eng() );
|
||||
m_osc[i].detuneKnob->move( 25+i*20, 150 );
|
||||
m_osc[i].detuneKnob->setRange( -100.0f, 100.0f, 1.0f );
|
||||
m_osc[i].detuneKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].detuneKnob->setInitValue( 0.0f );
|
||||
m_osc[i].detuneKnob->setHintText( tr( "Osc %1 fine detuning "
|
||||
"left:" ).arg( i + 1 )
|
||||
+ " ", " " +
|
||||
@@ -164,18 +166,17 @@ organicInstrument::organicInstrument( channelTrack * _channel_track ) :
|
||||
|
||||
// setup knob for FX1
|
||||
fx1Knob = new knob( knobGreen_17, this,
|
||||
tr( "FX1" ),
|
||||
eng() );
|
||||
tr( "FX1" ), eng() );
|
||||
fx1Knob->move( 20, 200 );
|
||||
fx1Knob->setRange( 0.0f, 0.99f, 0.01f );
|
||||
fx1Knob->setValue( 0.0f, TRUE );
|
||||
fx1Knob->setInitValue( 0.0f);
|
||||
|
||||
// setup volume-knob
|
||||
volKnob = new knob( knobGreen_17, this, tr(
|
||||
"Osc %1 volume" ).arg( 1 ), eng() );
|
||||
volKnob->move( 50, 200 );
|
||||
volKnob->setRange( 0, 200, 1.0f );
|
||||
volKnob->setValue( 100, TRUE );
|
||||
volKnob->setInitValue( 100 );
|
||||
volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
1 ) + " ", "%" );
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "buffer_allocator.h"
|
||||
#include "knob.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
@@ -75,14 +76,14 @@ pluckedStringSynth::pluckedStringSynth( channelTrack * _channel_track ) :
|
||||
m_pickKnob = new knob( knobDark_28, this, tr( "Pick position" ),
|
||||
eng() );
|
||||
m_pickKnob->setRange( 0.0f, 0.5f, 0.005f );
|
||||
m_pickKnob->setValue( 0.0f, TRUE );
|
||||
m_pickKnob->setInitValue( 0.0f );
|
||||
m_pickKnob->move( 86, 134 );
|
||||
m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" );
|
||||
|
||||
m_pickupKnob = new knob( knobDark_28, this, tr( "Pickup position" ),
|
||||
eng() );
|
||||
m_pickupKnob->setRange( 0.0f, 0.5f, 0.005f );
|
||||
m_pickupKnob->setValue( 0.05f, TRUE );
|
||||
m_pickupKnob->setInitValue( 0.05f );
|
||||
m_pickupKnob->move( 138, 134 );
|
||||
m_pickupKnob->setHintText( tr( "Pickup position:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "tooltip.h"
|
||||
#include "sample_buffer.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
@@ -268,7 +269,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
"Osc %1 volume" ).arg( i+1 ), eng() );
|
||||
m_osc[i].volKnob->move( 6, 104+i*50 );
|
||||
m_osc[i].volKnob->setRange( MIN_VOLUME, MAX_VOLUME, 1.0f );
|
||||
m_osc[i].volKnob->setValue( DEFAULT_VOLUME / 3, TRUE );
|
||||
m_osc[i].volKnob->setInitValue( DEFAULT_VOLUME / 3 );
|
||||
m_osc[i].volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
|
||||
i+1 ) + " ", "%" );
|
||||
#ifdef QT4
|
||||
@@ -287,7 +288,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
tr( "Osc %1 panning" ).arg( i + 1 ), eng() );
|
||||
m_osc[i].panKnob->move( 33, 104+i*50 );
|
||||
m_osc[i].panKnob->setRange( PANNING_LEFT, PANNING_RIGHT, 1.0f );
|
||||
m_osc[i].panKnob->setValue( DEFAULT_PANNING, TRUE );
|
||||
m_osc[i].panKnob->setInitValue( DEFAULT_PANNING );
|
||||
m_osc[i].panKnob->setHintText( tr("Osc %1 panning:").arg( i+1 )
|
||||
+ " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -307,7 +308,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
m_osc[i].coarseKnob->move( 66, 104 + i * 50 );
|
||||
m_osc[i].coarseKnob->setRange( -2 * NOTES_PER_OCTAVE,
|
||||
2 * NOTES_PER_OCTAVE, 1.0f );
|
||||
m_osc[i].coarseKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].coarseKnob->setInitValue( 0.0f );
|
||||
m_osc[i].coarseKnob->setHintText( tr( "Osc %1 coarse detuning:"
|
||||
).arg( i + 1 ) + " ",
|
||||
" " + tr( "semitones" ) );
|
||||
@@ -328,7 +329,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
eng() );
|
||||
m_osc[i].fineLKnob->move( 90, 104 + i * 50 );
|
||||
m_osc[i].fineLKnob->setRange( -100.0f, 100.0f, 1.0f );
|
||||
m_osc[i].fineLKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].fineLKnob->setInitValue( 0.0f );
|
||||
m_osc[i].fineLKnob->setHintText( tr( "Osc %1 fine detuning "
|
||||
"left:" ).arg( i + 1 )
|
||||
+ " ", " " +
|
||||
@@ -350,7 +351,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
).arg( i + 1 ), eng() );
|
||||
m_osc[i].fineRKnob->move( 110, 104 + i * 50 );
|
||||
m_osc[i].fineRKnob->setRange( -100.0f, 100.0f, 1.0f );
|
||||
m_osc[i].fineRKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].fineRKnob->setInitValue( 0.0f );
|
||||
m_osc[i].fineRKnob->setHintText( tr( "Osc %1 fine detuning "
|
||||
"right:").arg( i + 1 ) +
|
||||
" ", " " + tr( "cents" ) );
|
||||
@@ -372,7 +373,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
eng() );
|
||||
m_osc[i].phaseOffsetKnob->move( 142, 104 + i * 50 );
|
||||
m_osc[i].phaseOffsetKnob->setRange( 0.0f, 360.0f, 1.0f );
|
||||
m_osc[i].phaseOffsetKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].phaseOffsetKnob->setInitValue( 0.0f );
|
||||
m_osc[i].phaseOffsetKnob->setHintText( tr( "Osc %1 phase-"
|
||||
"offset:" ).
|
||||
arg( i + 1 ) +
|
||||
@@ -399,7 +400,7 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
|
||||
m_osc[i].stereoPhaseDetuningKnob->move( 166, 104 + i * 50 );
|
||||
m_osc[i].stereoPhaseDetuningKnob->setRange( 0.0f, 360.0f,
|
||||
1.0f );
|
||||
m_osc[i].stereoPhaseDetuningKnob->setValue( 0.0f, TRUE );
|
||||
m_osc[i].stereoPhaseDetuningKnob->setInitValue( 0.0f );
|
||||
m_osc[i].stereoPhaseDetuningKnob->setHintText( tr("Osc %1 "
|
||||
"stereo phase-"
|
||||
"detuning:" ).
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "song_editor.h"
|
||||
#include "lvsl_client.h"
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
resources/note.png
Normal file
BIN
resources/note.png
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
resources/quantize.png
Normal file
BIN
resources/quantize.png
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_alsa.cpp - device-class which implements ALSA-PCM-output
|
||||
*
|
||||
@@ -488,3 +490,5 @@ void audioALSA::setupWidget::saveSettings( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_device.cpp - base-class for audio-devices used by LMMS-mixer
|
||||
*
|
||||
@@ -333,3 +335,5 @@ void FASTCALL audioDevice::clearS16Buffer( int_sample_t * _outbuf,
|
||||
memset( _outbuf, 0, _frames * channels() * BYTES_PER_INT_SAMPLE );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_file_device.cpp - base-class for audio-device-classes which write
|
||||
* their output into a file
|
||||
@@ -105,3 +107,5 @@ void audioFileDevice::seekToBegin( void )
|
||||
m_outputFile.seek( 0 );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_file_ogg.cpp - audio-device which encodes wave-stream and writes it
|
||||
* into an OGG-file. This is used for song-export.
|
||||
@@ -257,3 +259,5 @@ void audioFileOgg::finishEncoding( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_file_wave.cpp - audio-device which encodes wave-stream and writes it
|
||||
* into a WAVE-file. This is used for song-export.
|
||||
@@ -120,3 +122,5 @@ void audioFileWave::finishEncoding( void )
|
||||
writeData( &m_waveFileHeader, sizeof( m_waveFileHeader ) );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_jack.cpp - support for JACK-transport
|
||||
*
|
||||
@@ -476,4 +478,6 @@ void audioJACK::setupWidget::saveSettings( void )
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_oss.cpp - device-class that implements OSS-PCM-output
|
||||
*
|
||||
@@ -383,3 +385,5 @@ void audioOSS::setupWidget::saveSettings( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_port.cpp - base-class for objects providing sound at a port
|
||||
*
|
||||
@@ -102,3 +104,5 @@ void audioPort::setName( const QString & _name )
|
||||
eng()->getMixer()->audioDev()->renamePort( this );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_sample_recorder.cpp - device-class that implements recording
|
||||
* surround-audio-buffers into RAM, maybe later
|
||||
@@ -113,3 +115,5 @@ void audioSampleRecorder::writeBuffer( const surroundSampleFrame * _ab,
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* audio_sdl.cpp - device-class that performs PCM-output via SDL
|
||||
*
|
||||
@@ -184,4 +186,6 @@ void audioSDL::setupWidget::saveSettings( void )
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* about_dialog.cpp - implementation of about-dialog
|
||||
*
|
||||
@@ -149,3 +151,5 @@ void aboutDialog::resizeEvent( QResizeEvent * _re )
|
||||
|
||||
#include "about_dialog.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* arp_and_chords_tab_widget.cpp - widget for use in arp/chord-tab of
|
||||
* channel-window
|
||||
@@ -224,8 +226,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
m_chordRangeKnob = new knob( knobBright_26, m_chordsGroupBox,
|
||||
tr( "Chord range" ), eng() );
|
||||
m_chordRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
m_chordRangeKnob->setRange( 1.0, 9.0, 1.0 );
|
||||
m_chordRangeKnob->setValue( 1.0, TRUE );
|
||||
m_chordRangeKnob->setRange( 1.0f, 9.0f, 1.0f );
|
||||
m_chordRangeKnob->setInitValue( 1.0f );
|
||||
m_chordRangeKnob->move( 164, 24 );
|
||||
m_chordRangeKnob->setHintText( tr( "Chord range:" ) + " ", " " +
|
||||
tr( "octave(s)" ) );
|
||||
@@ -276,8 +278,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
m_arpRangeKnob = new knob( knobBright_26, m_arpGroupBox,
|
||||
tr( "Arpeggio range" ), eng() );
|
||||
m_arpRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
m_arpRangeKnob->setRange( 1.0, 9.0, 1.0 );
|
||||
m_arpRangeKnob->setValue( 1.0, TRUE );
|
||||
m_arpRangeKnob->setRange( 1.0f, 9.0f, 1.0f );
|
||||
m_arpRangeKnob->setInitValue( 1.0f );
|
||||
m_arpRangeKnob->move( 164, 24 );
|
||||
m_arpRangeKnob->setHintText( tr( "Arpeggio range:" ) + " ", " " +
|
||||
tr( "octave(s)" ) );
|
||||
@@ -293,8 +295,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
m_arpTimeKnob = new tempoSyncKnob( knobBright_26, m_arpGroupBox,
|
||||
tr( "Arpeggio time" ), eng() );
|
||||
m_arpTimeKnob->setLabel( tr( "TIME" ) );
|
||||
m_arpTimeKnob->setRange( 10.0, 1000.0, 1.0 );
|
||||
m_arpTimeKnob->setValue( 100.0, TRUE );
|
||||
m_arpTimeKnob->setRange( 10.0f, 1000.0f, 1.0f );
|
||||
m_arpTimeKnob->setInitValue( 100.0f );
|
||||
m_arpTimeKnob->move( 164, 70 );
|
||||
m_arpTimeKnob->setHintText( tr( "Arpeggio time:" ) + " ", " " +
|
||||
tr( "ms" ) );
|
||||
@@ -310,8 +312,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
|
||||
m_arpGateKnob = new knob( knobBright_26, m_arpGroupBox,
|
||||
tr( "Arpeggio gate" ), eng() );
|
||||
m_arpGateKnob->setLabel( tr( "GATE" ) );
|
||||
m_arpGateKnob->setRange( 1.0, 200.0, 1.0 );
|
||||
m_arpGateKnob->setValue( 100.0, TRUE );
|
||||
m_arpGateKnob->setRange( 1.0f, 200.0f, 1.0f );
|
||||
m_arpGateKnob->setInitValue( 100.0f );
|
||||
m_arpGateKnob->move( 204, 70 );
|
||||
m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ) + " ", tr( "%" ) );
|
||||
#ifdef QT4
|
||||
@@ -595,7 +597,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
|
||||
// range-checking
|
||||
if( sub_note_key >= NOTES_PER_OCTAVE * OCTAVES ||
|
||||
sub_note_key < 0 )
|
||||
sub_note_key < 0 || eng()->getMixer()->criticalXRuns() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -766,3 +768,5 @@ void arpAndChordsTabWidget::arpRandomToggled( bool _on )
|
||||
|
||||
#include "arp_and_chords_tab_widget.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* bb_editor.cpp - basic main-window for editing of beats and basslines
|
||||
*
|
||||
@@ -82,7 +84,7 @@ bbEditor::bbEditor( engine * _engine ) :
|
||||
|
||||
|
||||
setWindowIcon( embed::getIconPixmap( "bb_track" ) );
|
||||
setWindowTitle( tr( "Beat+Bassline Editor" ) );
|
||||
setWindowTitle( tr( "Beat+Baseline Editor" ) );
|
||||
setMinimumWidth( TRACK_OP_WIDTH + DEFAULT_SETTINGS_WIDGET_WIDTH +
|
||||
BBE_PPT + 2 * TCO_BORDER_WIDTH +
|
||||
DEFAULT_SCROLLBAR_SIZE );
|
||||
@@ -477,3 +479,5 @@ void bbEditor::swapBB( csize _bb1, csize _bb2 )
|
||||
|
||||
#include "bb_editor.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* config_mgr.cpp - implementation of class configManager
|
||||
*
|
||||
@@ -932,3 +934,5 @@ void configManager::processFilesRecursively( const QString & _src_dir,
|
||||
|
||||
#include "config_mgr.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* engine.cpp - implementation of LMMS' engine-system
|
||||
*
|
||||
@@ -61,9 +63,9 @@ engine::~engine()
|
||||
{
|
||||
m_mixer->stopProcessing();
|
||||
delete m_projectNotes;
|
||||
delete m_pianoRoll;
|
||||
delete m_songEditor;
|
||||
delete m_bbEditor;
|
||||
delete m_pianoRoll;
|
||||
|
||||
presetPreviewPlayHandle::cleanUp( this );
|
||||
|
||||
@@ -92,3 +94,5 @@ engineObject::~engineObject()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* envelope_and_lfo_widget.cpp - widget which is m_used by envelope/lfo/filter-
|
||||
* tab of channel-window
|
||||
@@ -145,7 +147,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
eng() );
|
||||
m_predelayKnob->setLabel( tr( "DEL" ) );
|
||||
m_predelayKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_predelayKnob->setValue( 0.0, TRUE );
|
||||
m_predelayKnob->setInitValue( 0.0 );
|
||||
m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y );
|
||||
m_predelayKnob->setHintText( tr( "Predelay:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -163,7 +165,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
eng() );
|
||||
m_attackKnob->setLabel( tr( "ATT" ) );
|
||||
m_attackKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_attackKnob->setValue( 0.0, TRUE );
|
||||
m_attackKnob->setInitValue( 0.0 );
|
||||
m_attackKnob->move( ATTACK_KNOB_X, ENV_KNOBS_Y );
|
||||
m_attackKnob->setHintText( tr( "Attack:" )+" ", "" );
|
||||
#ifdef QT4
|
||||
@@ -182,7 +184,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
m_holdKnob = new knob( knobBright_26, this, tr( "Hold-time" ), eng() );
|
||||
m_holdKnob->setLabel( tr( "HOLD" ) );
|
||||
m_holdKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_holdKnob->setValue( 0.5, TRUE );
|
||||
m_holdKnob->setInitValue( 0.5 );
|
||||
m_holdKnob->move( HOLD_KNOB_X, ENV_KNOBS_Y );
|
||||
m_holdKnob->setHintText( tr( "Hold:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -201,7 +203,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
eng() );
|
||||
m_decayKnob->setLabel( tr( "DEC" ) );
|
||||
m_decayKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_decayKnob->setValue( 0.5, TRUE );
|
||||
m_decayKnob->setInitValue( 0.5 );
|
||||
m_decayKnob->move( DECAY_KNOB_X, ENV_KNOBS_Y );
|
||||
m_decayKnob->setHintText( tr( "Decay:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -221,7 +223,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
eng() );
|
||||
m_sustainKnob->setLabel( tr( "SUST" ) );
|
||||
m_sustainKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_sustainKnob->setValue( 0.5, TRUE );
|
||||
m_sustainKnob->setInitValue( 0.5 );
|
||||
m_sustainKnob->move( SUSTAIN_KNOB_X, ENV_KNOBS_Y );
|
||||
m_sustainKnob->setHintText( tr( "Sustain:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -240,7 +242,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
eng() );
|
||||
m_releaseKnob->setLabel( tr( "REL" ) );
|
||||
m_releaseKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_releaseKnob->setValue( 0.1, TRUE );
|
||||
m_releaseKnob->setInitValue( 0.1 );
|
||||
m_releaseKnob->move( RELEASE_KNOB_X, ENV_KNOBS_Y );
|
||||
m_releaseKnob->setHintText( tr( "Release:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -260,7 +262,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "Modulation amount" ), eng() );
|
||||
m_amountKnob->setLabel( tr( "AMT" ) );
|
||||
m_amountKnob->setRange( -1.0, 1.0, 0.005 );
|
||||
m_amountKnob->setValue( 0.0, TRUE );
|
||||
m_amountKnob->setInitValue( 0.0 );
|
||||
m_amountKnob->move( AMOUNT_KNOB_X, ENV_GRAPH_Y );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -281,7 +283,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "LFO-predelay-time" ), eng() );
|
||||
m_lfoPredelayKnob->setLabel( tr( "DEL" ) );
|
||||
m_lfoPredelayKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_lfoPredelayKnob->setValue( 0.0, TRUE );
|
||||
m_lfoPredelayKnob->setInitValue( 0.0 );
|
||||
m_lfoPredelayKnob->move( LFO_PREDELAY_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoPredelayKnob->setHintText( tr( "LFO-predelay:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -299,7 +301,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "LFO-attack-time" ), eng() );
|
||||
m_lfoAttackKnob->setLabel( tr( "ATT" ) );
|
||||
m_lfoAttackKnob->setRange( 0.0, 1.0, 0.001 );
|
||||
m_lfoAttackKnob->setValue( 0.0, TRUE );
|
||||
m_lfoAttackKnob->setInitValue( 0.0 );
|
||||
m_lfoAttackKnob->move( LFO_ATTACK_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoAttackKnob->setHintText( tr( "LFO-attack:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -317,7 +319,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "LFO-speed" ), eng(), 20000.0 );
|
||||
m_lfoSpeedKnob->setLabel( tr( "SPD" ) );
|
||||
m_lfoSpeedKnob->setRange( 0.01, 1.0, 0.0001 );
|
||||
m_lfoSpeedKnob->setValue( 0.1, TRUE );
|
||||
m_lfoSpeedKnob->setInitValue( 0.1 );
|
||||
m_lfoSpeedKnob->move( LFO_SPEED_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO-speed:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -335,7 +337,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "LFO-modulation-amount" ), eng() );
|
||||
m_lfoAmountKnob->setLabel( tr( "AMT" ) );
|
||||
m_lfoAmountKnob->setRange( -1.0, 1.0, 0.005 );
|
||||
m_lfoAmountKnob->setValue( 0.0, TRUE );
|
||||
m_lfoAmountKnob->setInitValue( 0.0 );
|
||||
m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y );
|
||||
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
@@ -1217,3 +1219,5 @@ void envelopeAndLFOWidget::lfoUserWaveCh( bool _on )
|
||||
|
||||
#include "envelope_and_lfo_widget.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* envelope_tab_widget.cpp - widget for use in envelope/lfo/filter-tab of
|
||||
* channel-window
|
||||
@@ -178,7 +180,7 @@ envelopeTabWidget::envelopeTabWidget( channelTrack * _channel_track ) :
|
||||
m_filterCutKnob->setLabel( tr( "CUTOFF" ) );
|
||||
m_filterCutKnob->setRange( 0.0, 16000.0, 1.0 );
|
||||
m_filterCutKnob->move( 140, 18 );
|
||||
m_filterCutKnob->setValue( 16000.0, TRUE );
|
||||
m_filterCutKnob->setInitValue( 16000.0 );
|
||||
m_filterCutKnob->setHintText( tr( "cutoff-frequency:" ) + " ", " " +
|
||||
tr( "Hz" ) );
|
||||
#ifdef QT4
|
||||
@@ -198,7 +200,7 @@ envelopeTabWidget::envelopeTabWidget( channelTrack * _channel_track ) :
|
||||
m_filterResKnob->setLabel( tr( "Q/RESO" ) );
|
||||
m_filterResKnob->setRange( 0.01, 10.0, 0.01 );
|
||||
m_filterResKnob->move( 190, 18 );
|
||||
m_filterResKnob->setValue( 0.5, TRUE );
|
||||
m_filterResKnob->setInitValue( 0.5 );
|
||||
m_filterResKnob->setHintText( tr( "Q/Resonance:" ) + " ", "" );
|
||||
#ifdef QT4
|
||||
m_filterResKnob->setWhatsThis(
|
||||
@@ -617,3 +619,5 @@ return res;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* export_project_dialog.cpp - implementation of dialog for exporting project
|
||||
*
|
||||
@@ -469,3 +471,5 @@ void exportProjectDialog::finishProjectExport( void )
|
||||
|
||||
#include "export_project_dialog.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* file_browser.cpp - implementation of the project-, preset- and
|
||||
* sample-file-browser
|
||||
@@ -830,3 +832,5 @@ void fileItem::determineFileType( void )
|
||||
|
||||
#include "file_browser.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* instrument.cpp - base-class for all instrument-plugins (synths, samplers etc)
|
||||
*
|
||||
@@ -97,3 +99,5 @@ instrument * instrument::instantiate( const QString & _plugin_name,
|
||||
return( new dummyInstrument( _channel_track ) );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* main.cpp - just main.cpp which is starting up app...
|
||||
*
|
||||
@@ -256,3 +258,5 @@ int main( int argc, char * * argv )
|
||||
return( app.exec() );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* main_window.cpp - implementation of LMMS-main-window
|
||||
*
|
||||
@@ -315,7 +317,7 @@ void mainWindow::finalize( void )
|
||||
// window-toolbar
|
||||
toolButton * bb_editor_window = new toolButton(
|
||||
embed::getIconPixmap( "bb_track" ),
|
||||
tr( "Show/hide Beat+Bassline Editor" ) +
|
||||
tr( "Show/hide Beat+Baseline Editor" ) +
|
||||
" (F6)",
|
||||
this, SLOT( toggleBBEditorWin() ),
|
||||
m_toolBar );
|
||||
@@ -326,10 +328,10 @@ void mainWindow::finalize( void )
|
||||
QWhatsThis::add( bb_editor_window,
|
||||
#endif
|
||||
tr( "By pressing this button, you can show or hide the "
|
||||
"Beat+Bassline Editor. The Beat+Bassline Editor is "
|
||||
"Beat+Baseline Editor. The Beat+Baesline Editor is "
|
||||
"needed for setting beats, opening, adding and "
|
||||
"removing channels, cutting, copying and pasting "
|
||||
"beat- and bassline-patterns and other things like "
|
||||
"beat- and baseline-patterns and other things like "
|
||||
"that." ) );
|
||||
|
||||
|
||||
@@ -503,7 +505,8 @@ void mainWindow::finalize( void )
|
||||
if( !configManager::inst()->value( "app", "configured" ).toInt() )
|
||||
{
|
||||
// no, so show it that user can setup everything
|
||||
setupDialog( eng() ).exec();
|
||||
setupDialog sd( eng() );
|
||||
sd.exec();
|
||||
configManager::inst()->setValue( "app", "configured", "1" );
|
||||
}
|
||||
// look whether mixer could use a audio-interface beside audioDummy
|
||||
@@ -704,7 +707,8 @@ bool mainWindow::saveProjectAs( void )
|
||||
|
||||
void mainWindow::showSettingsDialog( void )
|
||||
{
|
||||
setupDialog( eng() ).exec();
|
||||
setupDialog sd( eng() );
|
||||
sd.exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -862,3 +866,5 @@ void mainWindow::keyReleaseEvent( QKeyEvent * _ke )
|
||||
|
||||
#include "main_window.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_tab_widget.cpp - tab-widget in channel-track-window for setting up
|
||||
* MIDI-related stuff
|
||||
@@ -613,3 +615,5 @@ void midiTabWidget::activatedWriteablePort( QAction * ) { }
|
||||
|
||||
#include "midi_tab_widget.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* mixer.cpp - audio-device-independent mixer for LMMS
|
||||
*
|
||||
@@ -137,7 +139,7 @@ void mixer::stopProcessing( void )
|
||||
|
||||
bool mixer::criticalXRuns( void ) const
|
||||
{
|
||||
return( ( m_cpuLoad >= 98 &&
|
||||
return( ( m_cpuLoad >= 99 &&
|
||||
eng()->getSongEditor()->realTimeTask() == TRUE ) );
|
||||
}
|
||||
|
||||
@@ -239,7 +241,8 @@ const surroundSampleFrame * mixer::renderNextBuffer( void )
|
||||
|
||||
const float new_cpu_load = timer.elapsed() / 10000.0f * sampleRate() /
|
||||
m_framesPerAudioBuffer;
|
||||
m_cpuLoad = tLimit( (int) ( new_cpu_load + m_cpuLoad ) / 2, 0, 100 );
|
||||
m_cpuLoad = tLimit( (int) ( new_cpu_load * 0.1f + m_cpuLoad * 0.9f ), 0,
|
||||
100 );
|
||||
|
||||
return( m_curBuf );
|
||||
}
|
||||
@@ -578,3 +581,5 @@ void mixer::processBuffer( const surroundSampleFrame * _buf,
|
||||
|
||||
#include "mixer.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* name_label.cpp - implementation of class nameLabel, a label which
|
||||
* is renamable by double-clicking it
|
||||
@@ -268,6 +270,10 @@ void nameLabel::paintEvent( QPaintEvent * )
|
||||
x += 4 + pm.width();
|
||||
}
|
||||
|
||||
p.setPen( QColor( 16, 16, 16 ) );
|
||||
p.drawText( x+1, height() / 2 + p.fontMetrics().height() / 2 - 3,
|
||||
text() );
|
||||
|
||||
p.setPen( QColor( 0, 224, 0 ) );
|
||||
bbTrack * bbt = bbTrack::findBBTrack(
|
||||
eng()->getBBEditor()->currentBB(), eng() );
|
||||
@@ -290,3 +296,5 @@ void nameLabel::paintEvent( QPaintEvent * )
|
||||
|
||||
#include "name_label.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* note.cpp - implementation of class note
|
||||
*
|
||||
@@ -35,6 +37,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "note.h"
|
||||
@@ -83,7 +86,7 @@ void note::setPos( const midiTime & _pos )
|
||||
|
||||
|
||||
|
||||
void note::setTone( tones _tone )
|
||||
void note::setTone( const tones _tone )
|
||||
{
|
||||
if( _tone >= C && _tone <= H )
|
||||
{
|
||||
@@ -101,7 +104,7 @@ void note::setTone( tones _tone )
|
||||
|
||||
|
||||
|
||||
void note::setOctave( octaves _octave )
|
||||
void note::setOctave( const octaves _octave )
|
||||
{
|
||||
if( _octave >= MIN_OCTAVE && _octave <= MAX_OCTAVE )
|
||||
{
|
||||
@@ -119,7 +122,7 @@ void note::setOctave( octaves _octave )
|
||||
|
||||
|
||||
|
||||
void note::setKey( int _key )
|
||||
void note::setKey( const int _key )
|
||||
{
|
||||
setTone( static_cast<tones>( _key % NOTES_PER_OCTAVE ) );
|
||||
setOctave( static_cast<octaves>( _key / NOTES_PER_OCTAVE ) );
|
||||
@@ -128,7 +131,7 @@ void note::setKey( int _key )
|
||||
|
||||
|
||||
|
||||
void note::setVolume( volume _volume )
|
||||
void note::setVolume( const volume _volume )
|
||||
{
|
||||
if( _volume <= MAX_VOLUME )
|
||||
{
|
||||
@@ -146,7 +149,7 @@ void note::setVolume( volume _volume )
|
||||
|
||||
|
||||
|
||||
void note::setPanning( panning _panning )
|
||||
void note::setPanning( const panning _panning )
|
||||
{
|
||||
if( _panning >= PANNING_LEFT && _panning <= PANNING_RIGHT )
|
||||
{
|
||||
@@ -155,7 +158,7 @@ void note::setPanning( panning _panning )
|
||||
#ifdef LMMS_DEBUG
|
||||
else
|
||||
{
|
||||
printf ("Paning out of range (note::set_panning)\n");
|
||||
printf( "Paning out of range (note::setPanning)\n" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -163,6 +166,39 @@ void note::setPanning( panning _panning )
|
||||
|
||||
|
||||
|
||||
inline midiTime note::quantized( const midiTime & _m, const int _q_grid )
|
||||
{
|
||||
float p = ( (float) _m / _q_grid );
|
||||
if( p - floorf( p ) < 0.5f )
|
||||
{
|
||||
return( static_cast<int>( p ) * _q_grid );
|
||||
}
|
||||
return( static_cast<int>( p + 1 ) * _q_grid );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void note::quantizeLength( const int _q_grid )
|
||||
{
|
||||
setLength( quantized( length(), _q_grid ) );
|
||||
if( length() == 0 )
|
||||
{
|
||||
setLength( _q_grid );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void note::quantizePos( const int _q_grid )
|
||||
{
|
||||
setPos( quantized( pos(), _q_grid ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void note::saveSettings( QDomDocument & _doc, QDomElement & _parent )
|
||||
{
|
||||
QDomElement note_de = _doc.createElement( "note" );
|
||||
@@ -188,3 +224,8 @@ void note::loadSettings( const QDomElement & _this )
|
||||
m_pos = _this.attribute( "pos" ).toInt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* note_play_handle.cpp - implementation of class notePlayHandle, part of
|
||||
* play-engine
|
||||
@@ -381,3 +383,5 @@ bool notePlayHandle::operator==( const notePlayHandle & _nph ) const
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* piano_roll.cpp - implementation of piano-roll which is used for actual
|
||||
* writing of melodies
|
||||
@@ -391,7 +393,6 @@ pianoRoll::pianoRoll( engine * _engine ) :
|
||||
// setup zooming-stuff
|
||||
m_zoomingComboBox = new comboBox( m_toolBar );
|
||||
m_zoomingComboBox->setFixedSize( 80, 22 );
|
||||
m_zoomingComboBox->move( 580, 4 );
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
m_zoomingComboBox->addItem( QString::number( 25 *
|
||||
@@ -404,6 +405,38 @@ pianoRoll::pianoRoll( engine * _engine ) :
|
||||
this, SLOT( zoomingChanged( const QString & ) ) );
|
||||
|
||||
|
||||
// setup quantize-stuff
|
||||
QLabel * quantize_lbl = new QLabel( m_toolBar );
|
||||
quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) );
|
||||
|
||||
m_quantizeComboBox = new comboBox( m_toolBar );
|
||||
m_quantizeComboBox->setFixedSize( 60, 22 );
|
||||
for( int i = 0; i < 7; ++i )
|
||||
{
|
||||
m_quantizeComboBox->addItem( "1/" + QString::number(
|
||||
static_cast<int>( powf( 2.0f, i ) ) ) );
|
||||
}
|
||||
m_quantizeComboBox->setCurrentIndex( m_quantizeComboBox->findText(
|
||||
"1/16" ) );
|
||||
|
||||
// setup note-len-stuff
|
||||
QLabel * note_len_lbl = new QLabel( m_toolBar );
|
||||
note_len_lbl->setPixmap( embed::getIconPixmap( "note" ) );
|
||||
|
||||
m_noteLenComboBox = new comboBox( m_toolBar );
|
||||
m_noteLenComboBox->setFixedSize( 120, 22 );
|
||||
m_noteLenComboBox->addItem( tr( "Last note" ),
|
||||
embed::getIconPixmap( "edit_draw" ) );
|
||||
const QString pixmaps[] = { "whole", "half", "quarter", "eighth",
|
||||
"sixteenth", "thirtysecond" } ;
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
m_noteLenComboBox->addItem( "1/" + QString::number(
|
||||
static_cast<int>( powf( 2.0f, i ) ) ),
|
||||
embed::getIconPixmap( "note_" + pixmaps[i] ) );
|
||||
}
|
||||
m_noteLenComboBox->setCurrentIndex( 0 );
|
||||
|
||||
|
||||
tb_layout->addSpacing( 5 );
|
||||
tb_layout->addWidget( m_playButton );
|
||||
@@ -422,8 +455,16 @@ pianoRoll::pianoRoll( engine * _engine ) :
|
||||
m_timeLine->addToolButtons( m_toolBar );
|
||||
tb_layout->addSpacing( 15 );
|
||||
tb_layout->addWidget( zoom_lbl );
|
||||
tb_layout->addSpacing( 5 );
|
||||
tb_layout->addSpacing( 4 );
|
||||
tb_layout->addWidget( m_zoomingComboBox );
|
||||
tb_layout->addSpacing( 10 );
|
||||
tb_layout->addWidget( quantize_lbl );
|
||||
tb_layout->addSpacing( 4 );
|
||||
tb_layout->addWidget( m_quantizeComboBox );
|
||||
tb_layout->addSpacing( 10 );
|
||||
tb_layout->addWidget( note_len_lbl );
|
||||
tb_layout->addSpacing( 4 );
|
||||
tb_layout->addWidget( m_noteLenComboBox );
|
||||
tb_layout->addStretch();
|
||||
|
||||
// setup our actual window
|
||||
@@ -1178,7 +1219,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
// then set new note
|
||||
midiTime note_pos( pos_tact_64th );
|
||||
midiTime note_len( m_lenOfNewNotes );
|
||||
midiTime note_len( newNoteLen() );
|
||||
|
||||
note new_note( note_len, note_pos,
|
||||
(tones)( key_num %
|
||||
@@ -1472,8 +1513,10 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
{
|
||||
tact_64th_diff = 1;
|
||||
}
|
||||
m_lenOfNewNotes = midiTime( tact_64th_diff );
|
||||
m_currentNote->setLength( m_lenOfNewNotes );
|
||||
m_currentNote->setLength( midiTime(
|
||||
tact_64th_diff ) );
|
||||
m_currentNote->quantizeLength( quantization() );
|
||||
m_lenOfNewNotes = m_currentNote->length();
|
||||
m_pattern->update();
|
||||
}
|
||||
|
||||
@@ -2075,6 +2118,7 @@ void pianoRoll::recordNote( const note & _n )
|
||||
note n( _n );
|
||||
n.setPos( eng()->getSongEditor()->getPlayPos(
|
||||
songEditor::PLAY_PATTERN ) - n.length() );
|
||||
n.quantizeLength( quantization() );
|
||||
#ifndef QT4
|
||||
qApp->lock();
|
||||
#endif
|
||||
@@ -2430,5 +2474,30 @@ void pianoRoll::zoomingChanged( const QString & _zfac )
|
||||
|
||||
|
||||
|
||||
int pianoRoll::quantization( void ) const
|
||||
{
|
||||
return( 64 / m_quantizeComboBox->currentText().right(
|
||||
m_quantizeComboBox->currentText().length() -
|
||||
2 ).toInt() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
midiTime pianoRoll::newNoteLen( void ) const
|
||||
{
|
||||
if( m_noteLenComboBox->currentIndex() == 0 )
|
||||
{
|
||||
return( m_lenOfNewNotes );
|
||||
}
|
||||
return( 64 / m_noteLenComboBox->currentText().right(
|
||||
m_noteLenComboBox->currentText().length() -
|
||||
2 ).toInt() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "piano_roll.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* piano_widget.cpp - implementation of piano-widget used in channel-window
|
||||
* for testing channel
|
||||
@@ -68,10 +70,10 @@ QPixmap * pianoWidget::s_blackKeyPressedPm = NULL;
|
||||
|
||||
|
||||
const int PIANO_BASE = 11;
|
||||
const int WHITE_KEY_WIDTH = 10;
|
||||
const int BLACK_KEY_WIDTH = 8;
|
||||
const int WHITE_KEY_HEIGHT = 57;
|
||||
const int BLACK_KEY_HEIGHT = 38;
|
||||
const int PW_WHITE_KEY_WIDTH = 10;
|
||||
const int PW_BLACK_KEY_WIDTH = 8;
|
||||
const int PW_WHITE_KEY_HEIGHT = 57;
|
||||
const int PW_BLACK_KEY_HEIGHT = 38;
|
||||
const int LABEL_TEXT_SIZE = 7;
|
||||
|
||||
|
||||
@@ -127,7 +129,8 @@ pianoWidget::pianoWidget (channelTrack * _parent ) :
|
||||
OCTAVE_3 * WHITE_KEYS_PER_OCTAVE,
|
||||
Qt::Horizontal, this );
|
||||
#endif
|
||||
m_pianoScroll->setGeometry( 0, PIANO_BASE+WHITE_KEY_HEIGHT, 250, 16 );
|
||||
m_pianoScroll->setGeometry( 0, PIANO_BASE + PW_WHITE_KEY_HEIGHT, 250,
|
||||
16 );
|
||||
// ...and connect it to this widget...
|
||||
connect( m_pianoScroll, SIGNAL( valueChanged( int ) ), this,
|
||||
SLOT( pianoScrolled( int ) ) );
|
||||
@@ -152,7 +155,7 @@ pianoWidget::~pianoWidget()
|
||||
int pianoWidget::getKeyFromMouse( const QPoint & _p )
|
||||
{
|
||||
|
||||
int key_num = (int)( (float) _p.x() / (float) WHITE_KEY_WIDTH );
|
||||
int key_num = (int)( (float) _p.x() / (float) PW_WHITE_KEY_WIDTH );
|
||||
|
||||
for( int i = 0; i <= key_num; ++i )
|
||||
{
|
||||
@@ -167,23 +170,25 @@ int pianoWidget::getKeyFromMouse( const QPoint & _p )
|
||||
key_num += m_startOctave * NOTES_PER_OCTAVE + m_startTone;
|
||||
|
||||
// is it a black key?
|
||||
if( _p.y() < PIANO_BASE + BLACK_KEY_HEIGHT )
|
||||
if( _p.y() < PIANO_BASE + PW_BLACK_KEY_HEIGHT )
|
||||
{
|
||||
// then do extra checking whether the mouse-cursor is over
|
||||
// a black key
|
||||
if( key_num > 0 &&
|
||||
KEY_ORDER[( key_num - 1 ) % NOTES_PER_OCTAVE] ==
|
||||
BLACK_KEY &&
|
||||
_p.x() % WHITE_KEY_WIDTH <= ( WHITE_KEY_WIDTH / 2 ) -
|
||||
( BLACK_KEY_WIDTH / 2 ) )
|
||||
_p.x() % PW_WHITE_KEY_WIDTH <=
|
||||
( PW_WHITE_KEY_WIDTH / 2 ) -
|
||||
( PW_BLACK_KEY_WIDTH / 2 ) )
|
||||
{
|
||||
--key_num;
|
||||
}
|
||||
if( key_num < NOTES_PER_OCTAVE * OCTAVES - 1 &&
|
||||
KEY_ORDER[( key_num + 1 ) % NOTES_PER_OCTAVE] ==
|
||||
BLACK_KEY &&
|
||||
_p.x() % WHITE_KEY_WIDTH >=
|
||||
( WHITE_KEY_WIDTH - BLACK_KEY_WIDTH / 2 ) )
|
||||
_p.x() % PW_WHITE_KEY_WIDTH >=
|
||||
( PW_WHITE_KEY_WIDTH -
|
||||
PW_BLACK_KEY_WIDTH / 2 ) )
|
||||
{
|
||||
++key_num;
|
||||
}
|
||||
@@ -223,7 +228,7 @@ void pianoWidget::mousePressEvent( QMouseEvent * _me )
|
||||
volume vol = (volume)( ( float ) y_diff /
|
||||
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] ==
|
||||
WHITE_KEY ) ?
|
||||
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) *
|
||||
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) *
|
||||
(float) DEFAULT_VOLUME);
|
||||
if( y_diff < 0 )
|
||||
{
|
||||
@@ -232,7 +237,7 @@ void pianoWidget::mousePressEvent( QMouseEvent * _me )
|
||||
else if( y_diff > ( ( KEY_ORDER[key_num %
|
||||
NOTES_PER_OCTAVE] ==
|
||||
WHITE_KEY ) ?
|
||||
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) )
|
||||
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) )
|
||||
{
|
||||
vol = DEFAULT_VOLUME;
|
||||
}
|
||||
@@ -284,7 +289,7 @@ void pianoWidget::mouseMoveEvent( QMouseEvent * _me )
|
||||
int y_diff = _me->pos().y() - PIANO_BASE;
|
||||
volume vol = (volume)( (float) y_diff /
|
||||
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] == WHITE_KEY ) ?
|
||||
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) *
|
||||
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) *
|
||||
(float)DEFAULT_VOLUME );
|
||||
// maybe the user moved the mouse-cursor above or under the
|
||||
// piano-widget while holding left button so check that and
|
||||
@@ -295,7 +300,7 @@ void pianoWidget::mouseMoveEvent( QMouseEvent * _me )
|
||||
}
|
||||
else if( y_diff >
|
||||
( ( KEY_ORDER[key_num % NOTES_PER_OCTAVE] == WHITE_KEY ) ?
|
||||
WHITE_KEY_HEIGHT : BLACK_KEY_HEIGHT ) )
|
||||
PW_WHITE_KEY_HEIGHT : PW_BLACK_KEY_HEIGHT ) )
|
||||
{
|
||||
vol = DEFAULT_VOLUME;
|
||||
}
|
||||
@@ -454,7 +459,7 @@ int pianoWidget::getKeyX( int _key_num )
|
||||
int k = m_startOctave*NOTES_PER_OCTAVE + m_startTone;
|
||||
if( _key_num < k )
|
||||
{
|
||||
return( ( _key_num - k ) * WHITE_KEY_WIDTH / 2 );
|
||||
return( ( _key_num - k ) * PW_WHITE_KEY_WIDTH / 2 );
|
||||
}
|
||||
|
||||
int x = 0;
|
||||
@@ -467,22 +472,22 @@ int pianoWidget::getKeyX( int _key_num )
|
||||
++white_cnt;
|
||||
if( white_cnt > 1 )
|
||||
{
|
||||
x += WHITE_KEY_WIDTH;
|
||||
x += PW_WHITE_KEY_WIDTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
x += WHITE_KEY_WIDTH/2;
|
||||
x += PW_WHITE_KEY_WIDTH/2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
white_cnt = 0;
|
||||
x += WHITE_KEY_WIDTH/2;
|
||||
x += PW_WHITE_KEY_WIDTH/2;
|
||||
}
|
||||
++k;
|
||||
}
|
||||
|
||||
x -= WHITE_KEY_WIDTH / 2;
|
||||
x -= PW_WHITE_KEY_WIDTH / 2;
|
||||
|
||||
return( x );
|
||||
|
||||
@@ -497,7 +502,7 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
QPainter p( this );
|
||||
#else
|
||||
// create pixmap for whole widget
|
||||
QPixmap pm( rect().size() );//width(), PIANO_BASE+WHITE_KEY_HEIGHT);
|
||||
QPixmap pm( rect().size() );//width(), PIANO_BASE+PW_WHITE_KEY_HEIGHT);
|
||||
// and a painter for it
|
||||
QPainter p( &pm, this );
|
||||
#endif
|
||||
@@ -522,14 +527,14 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
m_channelTrack->baseOctave() * NOTES_PER_OCTAVE;
|
||||
if( KEY_ORDER[base_key % NOTES_PER_OCTAVE] == WHITE_KEY )
|
||||
{
|
||||
p.fillRect( QRect( getKeyX( base_key ), 1, WHITE_KEY_WIDTH-1,
|
||||
p.fillRect( QRect( getKeyX( base_key ), 1, PW_WHITE_KEY_WIDTH-1,
|
||||
PIANO_BASE-2 ),
|
||||
QColor( 0xFF, 0xBB, 0x00 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.fillRect( QRect( getKeyX( base_key ) + 1, 1,
|
||||
BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ),
|
||||
PW_BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ),
|
||||
QColor( 0xFF, 0xBB, 0x00 ) );
|
||||
}
|
||||
|
||||
@@ -555,13 +560,13 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
p.drawPixmap( x, PIANO_BASE, *s_whiteKeyPm );
|
||||
}
|
||||
|
||||
x += WHITE_KEY_WIDTH;
|
||||
x += PW_WHITE_KEY_WIDTH;
|
||||
|
||||
if( (tones) (cur_key%NOTES_PER_OCTAVE) == C )
|
||||
{
|
||||
// label key of note C with "C" and number of current
|
||||
// octave
|
||||
p.drawText( x - WHITE_KEY_WIDTH, LABEL_TEXT_SIZE + 2,
|
||||
p.drawText( x - PW_WHITE_KEY_WIDTH, LABEL_TEXT_SIZE + 2,
|
||||
QString( "C" ) + QString::number(
|
||||
cur_key / NOTES_PER_OCTAVE, 10 ) );
|
||||
}
|
||||
@@ -579,12 +584,12 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
{
|
||||
if( m_pressedKeys[s_key] == TRUE )
|
||||
{
|
||||
p.drawPixmap( 0 - WHITE_KEY_WIDTH / 2, PIANO_BASE,
|
||||
p.drawPixmap( 0 - PW_WHITE_KEY_WIDTH / 2, PIANO_BASE,
|
||||
*s_blackKeyPressedPm );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.drawPixmap( 0 - WHITE_KEY_WIDTH / 2, PIANO_BASE,
|
||||
p.drawPixmap( 0 - PW_WHITE_KEY_WIDTH / 2, PIANO_BASE,
|
||||
*s_blackKeyPm );
|
||||
}
|
||||
}
|
||||
@@ -598,16 +603,16 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
// state of current key
|
||||
if( m_pressedKeys[cur_key] == TRUE )
|
||||
{
|
||||
p.drawPixmap( x + WHITE_KEY_WIDTH / 2,
|
||||
p.drawPixmap( x + PW_WHITE_KEY_WIDTH / 2,
|
||||
PIANO_BASE,
|
||||
*s_blackKeyPressedPm );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.drawPixmap( x + WHITE_KEY_WIDTH / 2,
|
||||
p.drawPixmap( x + PW_WHITE_KEY_WIDTH / 2,
|
||||
PIANO_BASE, *s_blackKeyPm );
|
||||
}
|
||||
x += WHITE_KEY_WIDTH;
|
||||
x += PW_WHITE_KEY_WIDTH;
|
||||
white_cnt = 0;
|
||||
}
|
||||
else
|
||||
@@ -617,7 +622,7 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
++white_cnt;
|
||||
if( white_cnt > 1 )
|
||||
{
|
||||
x += WHITE_KEY_WIDTH;
|
||||
x += PW_WHITE_KEY_WIDTH;
|
||||
}
|
||||
}
|
||||
++cur_key;
|
||||
@@ -632,3 +637,5 @@ void pianoWidget::paintEvent( QPaintEvent * )
|
||||
|
||||
#include "piano_widget.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* plugin.cpp - implementation of plugin-class including plugin-loader
|
||||
*
|
||||
@@ -244,3 +246,5 @@ void plugin::getDescriptorsOfAvailPlugins( vvector<descriptor> & _plugin_descs )
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* plugin_browser.cpp - implementation of the plugin-browser
|
||||
*
|
||||
@@ -67,7 +69,7 @@ pluginBrowser::pluginBrowser( QWidget * _parent, engine * _engine ) :
|
||||
|
||||
QLabel * hint = new QLabel( tr( "You can drag an instrument-plugin "
|
||||
"into either the Song-Editor, the "
|
||||
"Beat+Bassline Editor or just into a "
|
||||
"Beat+Baseline Editor or just into a "
|
||||
"channel-window or on the "
|
||||
"corresponding channel-button." ),
|
||||
m_view );
|
||||
@@ -268,3 +270,5 @@ void pluginDescWidget::mouseReleaseEvent( QMouseEvent * _me )
|
||||
|
||||
#include "plugin_browser.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* preset_preview_play_handle.cpp - implementation of class
|
||||
* presetPreviewPlayHandle
|
||||
@@ -227,3 +229,5 @@ constNotePlayHandleVector presetPreviewPlayHandle::nphsOfChannelTrack(
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* sample_play_handle.cpp - implementation of class samplePlayHandle
|
||||
*
|
||||
@@ -107,3 +109,5 @@ f_cnt_t samplePlayHandle::totalFrames( void ) const
|
||||
return( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* setup_dialog.cpp - dialog for setting up LMMS
|
||||
*
|
||||
@@ -869,3 +871,5 @@ void setupDialog::displayMIDIHelp( void )
|
||||
|
||||
#include "setup_dialog.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* song_editor.cpp - basic window for editing song
|
||||
*
|
||||
@@ -240,7 +242,7 @@ songEditor::songEditor( engine * _engine ) :
|
||||
SLOT( masterPitchChanged( int ) ) );
|
||||
connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this,
|
||||
SLOT( masterPitchPressed() ) );
|
||||
connect( m_masterPitchSlider, SIGNAL (sliderMoved( int) ), this,
|
||||
connect( m_masterPitchSlider, SIGNAL( sliderMoved( int ) ), this,
|
||||
SLOT( masterPitchMoved( int ) ) );
|
||||
connect( m_masterPitchSlider, SIGNAL( sliderReleased() ), this,
|
||||
SLOT( masterPitchReleased() ) );
|
||||
@@ -1665,3 +1667,5 @@ void songEditor::loadSettings( const QDomElement & _this )
|
||||
|
||||
#include "song_editor.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* surround_area.cpp - a widget for setting position of a channel +
|
||||
* calculation of volume for each speaker
|
||||
@@ -241,3 +243,5 @@ void surroundArea::mouseReleaseEvent( QMouseEvent * )
|
||||
|
||||
#include "surround_area.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* timeline.cpp - class timeLine, representing a time-line with position marker
|
||||
*
|
||||
@@ -401,3 +403,5 @@ void timeLine::mouseReleaseEvent( QMouseEvent * _me )
|
||||
|
||||
#include "timeline.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* track.cpp - implementation of classes concerning tracks -> neccessary for
|
||||
* all track-like objects (beat/bassline, sample-track...)
|
||||
@@ -1284,7 +1286,9 @@ track * FASTCALL track::create( trackTypes _tt, trackContainer * _tc )
|
||||
default: break;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LMMS
|
||||
assert( t != NULL );
|
||||
#endif
|
||||
|
||||
// allow mixer to continue
|
||||
_tc->eng()->getMixer()->play();
|
||||
@@ -1494,3 +1498,5 @@ void FASTCALL track::swapPositionOfTCOs( csize _tco_num1, csize _tco_num2 )
|
||||
|
||||
#include "track.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* track_container.cpp - implementation of base-class for all track-containers
|
||||
* like Song-Editor, BB-Editor...
|
||||
@@ -583,3 +585,5 @@ void trackContainer::scrollArea::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
#undef setValue
|
||||
#undef maximum
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* base64.cpp - namespace base64 with methods for encoding/decoding binary data
|
||||
* to/from base64
|
||||
@@ -165,3 +167,5 @@ void decode( const QString & _b64, char * * _data, int * _size )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* buffer_allocator.cpp - namespace bufferAllocator providing routines for own
|
||||
* optimized memory-management for audio-buffers
|
||||
@@ -224,3 +226,5 @@ void bufferAllocator::disableAutoCleanup( bool _disabled )
|
||||
s_autoCleanupDisabled = _disabled;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* clipboard.cpp - the clipboard for patterns, notes etc.
|
||||
*
|
||||
@@ -57,3 +59,5 @@ namespace clipboard
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* embed.cpp - misc stuff for using embedded resources (linked into binary)
|
||||
*
|
||||
@@ -134,3 +136,5 @@ void loadTranslation( const QString & _tname )
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* ladspa_manager.cpp - a class to manage loading and instantiation
|
||||
* of ladspa plugins
|
||||
@@ -917,3 +919,5 @@ void FASTCALL ladspaManager::cleanup( const ladspaKey & _plugin,
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* mmp.cpp - implementation of class multimediaProject
|
||||
*
|
||||
@@ -301,3 +303,5 @@ QString multimediaProject::typeName( projectTypes _project_type )
|
||||
return( s_types[UNKNOWN].m_name );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* oscillator.cpp - implementation of powerful oscillator-class
|
||||
*
|
||||
@@ -156,10 +158,11 @@ void x::updateSync( sampleFrame * _ab, const fpab_t _frames, \
|
||||
class x : public oscillator \
|
||||
{ \
|
||||
public: \
|
||||
x( const modulationAlgos modulation_algo, const float _freq, \
|
||||
inline x( const modulationAlgos modulation_algo, \
|
||||
const float _freq, \
|
||||
const Sint16 _phase_offset, const float _volume_factor, \
|
||||
const sample_rate_t _sample_rate, \
|
||||
oscillator * _sub_osc ) FASTCALL : \
|
||||
oscillator * _sub_osc ) : \
|
||||
oscillator( modulation_algo, _freq, _phase_offset, \
|
||||
_volume_factor, _sample_rate, _sub_osc ) \
|
||||
{ \
|
||||
@@ -269,3 +272,5 @@ void oscillator::recalcOscCoeff( const float additional_phase_offset )
|
||||
--m_sample;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* sample_buffer.cpp - container-class sampleBuffer
|
||||
*
|
||||
@@ -93,7 +95,6 @@
|
||||
|
||||
#define write writeBlock
|
||||
#define read readBlock
|
||||
#define seek at
|
||||
#define pos at
|
||||
|
||||
#endif
|
||||
@@ -1463,9 +1464,10 @@ void sampleBuffer::deleteResamplingData( void * * _ptr )
|
||||
|
||||
#undef write
|
||||
#undef read
|
||||
#undef seek
|
||||
#undef pos
|
||||
|
||||
|
||||
#include "sample_buffer.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* string_pair_drag.cpp - class stringPairDrag which provides general support
|
||||
* for drag'n'drop of string-pairs and which is the base
|
||||
@@ -127,3 +129,5 @@ QString stringPairDrag::decodeValue( QDropEvent * _de )
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
85
src/lmms_single_source.cpp
Normal file
85
src/lmms_single_source.cpp
Normal file
@@ -0,0 +1,85 @@
|
||||
#ifdef SINGLE_SOURCE_COMPILE
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "src/lib/string_pair_drag.cpp"
|
||||
#include "src/lib/buffer_allocator.cpp"
|
||||
#include "src/lib/embed.cpp"
|
||||
#include "src/lib/base64.cpp"
|
||||
#include "src/lib/mmp.cpp"
|
||||
#include "src/lib/ladspa_manager.cpp"
|
||||
#include "src/lib/oscillator.cpp"
|
||||
#include "src/lib/clipboard.cpp"
|
||||
#include "src/lib/sample_buffer.cpp"
|
||||
#include "src/core/config_mgr.cpp"
|
||||
#include "src/core/envelope_and_lfo_widget.cpp"
|
||||
#include "src/core/song_editor.cpp"
|
||||
#include "src/core/note.cpp"
|
||||
#include "src/core/sample_play_handle.cpp"
|
||||
#include "src/core/piano_roll.cpp"
|
||||
#include "src/core/arp_and_chords_tab_widget.cpp"
|
||||
#include "src/core/about_dialog.cpp"
|
||||
#include "src/core/instrument.cpp"
|
||||
#include "src/core/main.cpp"
|
||||
#include "src/core/timeline.cpp"
|
||||
#include "src/core/note_play_handle.cpp"
|
||||
#include "src/core/plugin.cpp"
|
||||
#include "src/core/export_project_dialog.cpp"
|
||||
#include "src/core/main_window.cpp"
|
||||
#include "src/core/engine.cpp"
|
||||
#include "src/core/plugin_browser.cpp"
|
||||
#include "src/core/setup_dialog.cpp"
|
||||
#include "src/core/bb_editor.cpp"
|
||||
#include "src/core/envelope_tab_widget.cpp"
|
||||
#include "src/core/mixer.cpp"
|
||||
#include "src/core/piano_widget.cpp"
|
||||
#include "src/core/name_label.cpp"
|
||||
#include "src/core/preset_preview_play_handle.cpp"
|
||||
#include "src/core/track_container.cpp"
|
||||
#include "src/core/track.cpp"
|
||||
#include "src/core/file_browser.cpp"
|
||||
#include "src/core/surround_area.cpp"
|
||||
#include "src/core/midi_tab_widget.cpp"
|
||||
#include "src/midi/midi_alsa_seq.cpp"
|
||||
#include "src/midi/midi_oss.cpp"
|
||||
#include "src/midi/midi_file.cpp"
|
||||
#include "src/midi/midi_port.cpp"
|
||||
#include "src/midi/midi_client.cpp"
|
||||
#include "src/midi/midi_mapper.cpp"
|
||||
#include "src/midi/midi_alsa_raw.cpp"
|
||||
#include "src/audio/audio_oss.cpp"
|
||||
#include "src/audio/audio_file_device.cpp"
|
||||
#include "src/audio/audio_alsa.cpp"
|
||||
#include "src/audio/audio_sdl.cpp"
|
||||
#include "src/audio/audio_port.cpp"
|
||||
#include "src/audio/audio_device.cpp"
|
||||
#include "src/audio/audio_jack.cpp"
|
||||
#include "src/audio/audio_file_ogg.cpp"
|
||||
#include "src/audio/audio_sample_recorder.cpp"
|
||||
#include "src/audio/audio_file_wave.cpp"
|
||||
#include "src/lmms_single_source.cpp"
|
||||
#include "src/tracks/pattern.cpp"
|
||||
#include "src/tracks/bb_track.cpp"
|
||||
#include "src/tracks/channel_track.cpp"
|
||||
#include "src/tracks/sample_track.cpp"
|
||||
#include "src/widgets/project_notes.cpp"
|
||||
#include "src/widgets/led_checkbox.cpp"
|
||||
#include "src/widgets/knob.cpp"
|
||||
#include "src/widgets/pixmap_button.cpp"
|
||||
#include "src/widgets/qxembed.cpp"
|
||||
#include "src/widgets/group_box.cpp"
|
||||
#include "src/widgets/tab_bar.cpp"
|
||||
#include "src/widgets/kmultitabbar.cpp"
|
||||
#include "src/widgets/tab_widget.cpp"
|
||||
#include "src/widgets/combobox.cpp"
|
||||
#include "src/widgets/rubberband.cpp"
|
||||
#include "src/widgets/cpuload_widget.cpp"
|
||||
#include "src/widgets/side_bar_widget.cpp"
|
||||
#include "src/widgets/visualization_widget.cpp"
|
||||
#include "src/widgets/text_float.cpp"
|
||||
#include "src/widgets/tool_button.cpp"
|
||||
#include "src/widgets/rename_dialog.cpp"
|
||||
#include "src/widgets/fade_button.cpp"
|
||||
#include "src/widgets/tempo_sync_knob.cpp"
|
||||
#include "src/widgets/tooltip.cpp"
|
||||
#include "src/widgets/nstate_button.cpp"
|
||||
#include "src/widgets/lcd_spinbox.cpp"
|
||||
#endif
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_alsa_raw.cpp - midi-client for RawMIDI via ALSA
|
||||
*
|
||||
@@ -230,3 +232,5 @@ void midiALSARaw::setupWidget::saveSettings( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_alsa_seq.cpp - ALSA-sequencer-client
|
||||
*
|
||||
@@ -627,3 +629,5 @@ void midiALSASeq::setupWidget::saveSettings( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_client.cpp - base-class for MIDI-clients like ALSA-sequencer-client
|
||||
*
|
||||
@@ -375,3 +377,5 @@ Uint8 midiClientRaw::eventLength( const Uint8 _event )
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_mapper.cpp - MIDI-mapper for any midiDevice
|
||||
*
|
||||
@@ -52,7 +54,7 @@ midiMapper::midiMapper( const QString & _map ) :
|
||||
{
|
||||
m_drumsetKeyMap[i].first = i;
|
||||
}
|
||||
for( Uint8 i = 0; i < MIDI_CHANNELS; ++i )
|
||||
for( Uint8 i = 0; i < MIDI_CHANNEL_COUNT; ++i )
|
||||
{
|
||||
m_channelMap[i] = i;
|
||||
}
|
||||
@@ -233,7 +235,7 @@ void midiMapper::readChannelMap( QFile & _f )
|
||||
Uint8 mch = line.section( '=', 1, 1 ).mid( 1 ).
|
||||
section( ' ', 0, 0 ).
|
||||
toInt();
|
||||
if( ch < MIDI_CHANNELS && mch < MIDI_CHANNELS )
|
||||
if( ch < MIDI_CHANNEL_COUNT && mch < MIDI_CHANNEL_COUNT )
|
||||
{
|
||||
m_channelMap[ch] = mch;
|
||||
if( line.contains( QRegExp( "Keymap *\"Drumset\"" ) ) )
|
||||
@@ -255,3 +257,5 @@ void midiMapper::readChannelMap( QFile & _f )
|
||||
|
||||
#undef indexOf
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_oss.cpp - OSS-raw-midi-client
|
||||
*
|
||||
@@ -173,3 +175,5 @@ void midiOSS::setupWidget::saveSettings( void )
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* midi_port.cpp - abstraction of MIDI-ports which are part of LMMS's MIDI-
|
||||
* sequencing system
|
||||
@@ -92,3 +94,5 @@ void midiPort::processOutEvent( const midiEvent & _me, const midiTime & _time )
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* bb_track.cpp - implementation of class bbTrack and bbTCO
|
||||
*
|
||||
@@ -88,14 +90,14 @@ void bbTCO::constructContextMenu( QMenu * _cm )
|
||||
{
|
||||
#ifdef QT4
|
||||
QAction * a = new QAction( embed::getIconPixmap( "bb_track" ),
|
||||
tr( "Open in Beat+Bassline-Editor" ),
|
||||
tr( "Open in Beat+Baseline-Editor" ),
|
||||
_cm );
|
||||
_cm->insertAction( _cm->actions()[0], a );
|
||||
connect( a, SIGNAL( triggered( bool ) ), this,
|
||||
SLOT( openInBBEditor( bool ) ) );
|
||||
#else
|
||||
_cm->insertItem( embed::getIconPixmap( "bb_track" ),
|
||||
tr( "Open in Beat+Bassline-Editor" ),
|
||||
tr( "Open in Beat+Baseline-Editor" ),
|
||||
this, SLOT( openInBBEditor() ),
|
||||
0, -1, 0 );
|
||||
#endif
|
||||
@@ -291,7 +293,7 @@ bbTrack::bbTrack( trackContainer * _tc ) :
|
||||
csize bbNum = s_infoMap.size();
|
||||
s_infoMap[this] = bbNum;
|
||||
|
||||
m_trackLabel = new nameLabel( tr( "Beat/Bassline %1" ).arg( bbNum ),
|
||||
m_trackLabel = new nameLabel( tr( "Beat/Baseline %1" ).arg( bbNum ),
|
||||
getTrackSettingsWidget(), eng() );
|
||||
m_trackLabel->setPixmap( embed::getIconPixmap( "bb_track" ) );
|
||||
m_trackLabel->setGeometry( 1, 1, DEFAULT_SETTINGS_WIDGET_WIDTH - 2,
|
||||
@@ -517,3 +519,5 @@ void bbTrack::clickedTrackLabel( void )
|
||||
|
||||
#include "bb_track.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* pattern.cpp - implementation of class pattern which holds notes
|
||||
*
|
||||
@@ -229,6 +231,7 @@ midiTime pattern::length( void ) const
|
||||
note * pattern::addNote( const note & _new_note )
|
||||
{
|
||||
note * new_note = new note( _new_note );
|
||||
new_note->quantizePos( eng()->getPianoRoll()->quantization() );
|
||||
|
||||
if( m_notes.size() == 0 || m_notes.back()->pos() <= new_note->pos() )
|
||||
{
|
||||
@@ -1342,3 +1345,5 @@ void patternFreezeThread::run( void )
|
||||
|
||||
#include "pattern.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* sample_track.cpp - implementation of class sampleTrack, a track which
|
||||
* provides arrangement of samples
|
||||
@@ -474,3 +476,5 @@ void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
|
||||
#include "sample_track.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* combobox.cpp - implementation of LMMS-combobox
|
||||
*
|
||||
@@ -230,7 +232,6 @@ void comboBox::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
if( m_items.size() > 0 )
|
||||
{
|
||||
p.setPen( QColor( 224, 224, 224 ) );
|
||||
p.setFont( font() );
|
||||
p.setClipRect( QRect( 5, 2, width() - CB_ARROW_BTN_WIDTH - 8,
|
||||
height() - 2 ) );
|
||||
@@ -241,6 +242,10 @@ void comboBox::paintEvent( QPaintEvent * _pe )
|
||||
p.drawPixmap( tx, 3, item_pm );
|
||||
tx += item_pm.width() + 2;
|
||||
}
|
||||
p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( tx+1, p.fontMetrics().height()+1,
|
||||
m_items[currentIndex()].first );
|
||||
p.setPen( QColor( 224, 224, 224 ) );
|
||||
p.drawText( tx, p.fontMetrics().height(),
|
||||
m_items[currentIndex()].first );
|
||||
}
|
||||
@@ -293,3 +298,5 @@ void comboBox::setItem( int _item )
|
||||
|
||||
#include "combobox.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* cpuload_widget.cpp - widget for displaying CPU-load (partly based on
|
||||
* Hydrogen's CPU-load-widget)
|
||||
@@ -117,3 +119,5 @@ void cpuloadWidget::updateCpuLoad()
|
||||
|
||||
#include "cpuload_widget.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* fade_button.cpp - implementation of fade-button
|
||||
*
|
||||
@@ -139,3 +141,5 @@ void fadeButton::nextState( void )
|
||||
|
||||
#include "fade_button.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* group_box.cpp - groupbox for LMMS
|
||||
*
|
||||
@@ -68,6 +70,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
|
||||
s_ledBg = new QPixmap( embed::getIconPixmap(
|
||||
"groupbox_led_bg" ) );
|
||||
}
|
||||
|
||||
updatePixmap();
|
||||
|
||||
m_led = new pixmapButton( this );
|
||||
@@ -239,3 +242,5 @@ void groupBox::updatePixmap( void )
|
||||
|
||||
#include "group_box.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -1689,3 +1691,5 @@ buttonList * KMultiTabBar::buttons() {return &m_buttons;}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* knob.cpp - powerful knob-widget
|
||||
*
|
||||
* This file is based on the knob-widget of the Qwt Widget Library from
|
||||
* Josef Wilgen
|
||||
* This file is partly based on the knob-widget of the Qwt Widget Library by
|
||||
* Josef Wilgen.
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -80,10 +82,6 @@
|
||||
|
||||
|
||||
|
||||
static double MinRelStep = 1.0e-10;
|
||||
static double DefaultRelStep = 1.0e-2;
|
||||
static double MinEps = 1.0e-10;
|
||||
|
||||
|
||||
float knob::s_copiedValue = 0.0f;
|
||||
textFloat * knob::s_textFloat = NULL;
|
||||
@@ -98,6 +96,7 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
|
||||
#endif
|
||||
),
|
||||
engineObject( _engine ),
|
||||
automatableObject<float>(),
|
||||
m_mouseOffset( 0.0f ),
|
||||
m_buttonPressed( FALSE ),
|
||||
m_angle( 0.0f ),
|
||||
@@ -105,12 +104,6 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
|
||||
m_hintTextBeforeValue( "" ),
|
||||
m_hintTextAfterValue( "" ),
|
||||
m_label( "" ),
|
||||
m_minValue( 0.0f ),
|
||||
m_maxValue( 100.0f ),
|
||||
m_value( 0.0f ),
|
||||
m_exactValue( 0.0f ),
|
||||
m_exactPrevValue( 0.0f ),
|
||||
m_prevValue( 0.0f ),
|
||||
m_initValue( 0.0f )
|
||||
{
|
||||
if( s_textFloat == NULL )
|
||||
@@ -274,11 +267,11 @@ float knob::getValue( const QPoint & _p )
|
||||
|
||||
const float arc = atan2( -dx, dy ) * 180.0 / M_PI;
|
||||
|
||||
float new_value = 0.5 * ( m_minValue + m_maxValue ) +
|
||||
arc * ( m_maxValue - m_minValue ) /
|
||||
float new_value = 0.5 * ( minValue() + maxValue() ) +
|
||||
arc * ( maxValue() - minValue() ) /
|
||||
m_totalAngle;
|
||||
|
||||
const float oneTurn = tAbs<float>( m_maxValue - m_minValue ) *
|
||||
const float oneTurn = tAbs<float>( maxValue() - minValue() ) *
|
||||
360.0 / m_totalAngle;
|
||||
const float eqValue = value() + m_mouseOffset;
|
||||
|
||||
@@ -329,14 +322,14 @@ void knob::recalcAngle( void )
|
||||
//
|
||||
// calculate the angle corresponding to the value
|
||||
//
|
||||
if( m_maxValue == m_minValue )
|
||||
if( maxValue() == minValue() )
|
||||
{
|
||||
m_angle = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_angle = ( value() - 0.5 * ( m_minValue + m_maxValue ) ) /
|
||||
( m_maxValue - m_minValue ) * m_totalAngle;
|
||||
m_angle = ( value() - 0.5 * ( minValue() + maxValue() ) ) /
|
||||
( maxValue() - minValue() ) * m_totalAngle;
|
||||
m_angle = static_cast<int>( m_angle ) % 360;
|
||||
}
|
||||
}
|
||||
@@ -529,9 +522,13 @@ void knob::paintEvent( QPaintEvent * _me )
|
||||
if( m_label != "" )
|
||||
{
|
||||
p.setFont( pointSize<6>( p.font() ) );
|
||||
p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( width() / 2 -
|
||||
p.fontMetrics().width( m_label ) / 2 + 1,
|
||||
height() - 1, m_label );
|
||||
p.setPen( QColor( 255, 255, 255 ) );
|
||||
p.drawText( width() / 2 -
|
||||
QFontMetrics( p.font() ).width( m_label ) / 2,
|
||||
p.fontMetrics().width( m_label ) / 2,
|
||||
height() - 2, m_label );
|
||||
}
|
||||
#ifndef QT4
|
||||
@@ -570,22 +567,15 @@ void knob::wheelEvent( QWheelEvent * _we )
|
||||
QPoint( m_knobPixmap->width() + 2, 0 ) );
|
||||
s_textFloat->setVisibilityTimeOut( 1000 );
|
||||
|
||||
if( value() != m_prevValue )
|
||||
{
|
||||
emit sliderMoved( value() );
|
||||
}
|
||||
emit sliderMoved( value() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//! Emits a valueChanged() signal if necessary
|
||||
void knob::buttonReleased( void )
|
||||
{
|
||||
if( value() != m_prevValue )
|
||||
{
|
||||
emit valueChanged( value() );
|
||||
}
|
||||
emit valueChanged( value() );
|
||||
}
|
||||
|
||||
|
||||
@@ -600,26 +590,25 @@ void knob::setPosition( const QPoint & _p )
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue( m_value - getValue( _p ) );
|
||||
setValue( value() - getValue( _p ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void knob::setValue( float _val, bool _is_init_value )
|
||||
void knob::setValue( const float _x )
|
||||
{
|
||||
if( _is_init_value )
|
||||
const float prev_value = value();
|
||||
automatableObject<float>::setValue( _x );
|
||||
if( prev_value != value() )
|
||||
{
|
||||
m_initValue = _val;
|
||||
valueChange();
|
||||
}
|
||||
|
||||
setNewValue( _val, TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void knob::fitValue( float _val )
|
||||
{
|
||||
setValue( _val );
|
||||
@@ -632,49 +621,26 @@ void knob::incValue( int _steps )
|
||||
{
|
||||
setValue( m_value + float( _steps ) * m_step );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
void knob::setRange( float _vmin, float _vmax, float _vstep, int _page_size )
|
||||
void knob::setRange( const float _min, const float _max, const float _step )
|
||||
{
|
||||
int rchg = ( ( m_maxValue != _vmax ) || ( m_minValue != _vmin ) );
|
||||
bool rchg = ( ( maxValue() != _max ) || ( minValue() != _min ) );
|
||||
automatableObject<float>::setRange( _min, _max, _step );
|
||||
|
||||
if( rchg )
|
||||
{
|
||||
m_minValue = _vmin;
|
||||
m_maxValue = _vmax;
|
||||
}
|
||||
m_pageSize = tMax<float>( ( maxValue() - minValue() ) / 100.0f,
|
||||
step() );
|
||||
|
||||
//
|
||||
// look if the step width has an acceptable
|
||||
// value or otherwise change it.
|
||||
//
|
||||
setStep( _vstep );
|
||||
|
||||
//
|
||||
// limit page size
|
||||
//
|
||||
/* m_pageSize = tLimit( pageSize, 0, int( tAbs<float>( ( m_maxValue -
|
||||
m_minValue ) / m_step ) ) ); */
|
||||
m_pageSize = tMax<float>( ( m_maxValue - m_minValue ) / 100.0f,
|
||||
m_step );
|
||||
|
||||
//
|
||||
// If the value lies out of the range, it
|
||||
// will be changed. Note that it will not be adjusted to
|
||||
// the new step width.
|
||||
setNewValue( m_value, FALSE );
|
||||
|
||||
// call notifier after the step width has been
|
||||
// adjusted.
|
||||
// call notifier after the step width has been adjusted.
|
||||
if( rchg )
|
||||
{
|
||||
rangeChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
void knob::setNewValue( float _x, bool _align )
|
||||
@@ -753,7 +719,7 @@ void knob::setStep( float _vstep )
|
||||
m_step = newStep;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -851,3 +817,5 @@ void knob::displayHelp( void )
|
||||
#ifndef QT4
|
||||
#undef addSeparator
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef SINGLE_SOURCE_COMPILE
|
||||
|
||||
/*
|
||||
* lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -49,9 +51,7 @@
|
||||
lcdSpinBox::lcdSpinBox( int _min, int _max, int _num_digits,
|
||||
QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
m_minValue( _min ),
|
||||
m_maxValue( _max ),
|
||||
m_step( 1 ),
|
||||
automatableObject<int>( 0, _min, _max ),
|
||||
m_label( NULL ),
|
||||
m_origMousePos()
|
||||
{
|
||||
@@ -77,22 +77,22 @@ lcdSpinBox::~lcdSpinBox()
|
||||
|
||||
|
||||
|
||||
void lcdSpinBox::setStep( int _step )
|
||||
|
||||
void lcdSpinBox::setStep( const int _step )
|
||||
{
|
||||
m_step = tMax( _step, 1 );
|
||||
automatableObject<int>::setStep( tMax( _step, 1 ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void lcdSpinBox::setValue( int _value )
|
||||
void lcdSpinBox::setValue( const int _value )
|
||||
{
|
||||
_value = ( ( tLimit( _value, m_minValue, m_maxValue ) - m_minValue ) /
|
||||
m_step ) * m_step + m_minValue;
|
||||
QString s = m_textForValue[_value];
|
||||
automatableObject<int>::setValue( _value );
|
||||
QString s = m_textForValue[value()];
|
||||
if( s == "" )
|
||||
{
|
||||
s = QString::number( _value );
|
||||
s = QString::number( value() );
|
||||
while( (int) s.length() < m_number->numDigits() )
|
||||
{
|
||||
s = "0" + s;
|
||||
@@ -169,7 +169,7 @@ void lcdSpinBox::mouseMoveEvent( QMouseEvent * _me )
|
||||
int dy = _me->globalY() - m_origMousePos.y();
|
||||
if( dy > 1 || dy < -1 )
|
||||
{
|
||||
setValue( value() - dy / 2 * m_step );
|
||||
setValue( value() - dy / 2 * step() );
|
||||
emit valueChanged( value() );
|
||||
QCursor::setPos( m_origMousePos );
|
||||
}
|
||||
@@ -191,7 +191,7 @@ void lcdSpinBox::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void lcdSpinBox::wheelEvent( QWheelEvent * _we )
|
||||
{
|
||||
_we->accept();
|
||||
setValue( value() + ( ( _we->delta() > 0 ) ? 1 : -1 ) * m_step );
|
||||
setValue( value() + ( ( _we->delta() > 0 ) ? 1 : -1 ) * step() );
|
||||
emit valueChanged( value() );
|
||||
}
|
||||
|
||||
@@ -200,3 +200,5 @@ void lcdSpinBox::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
#include "lcd_spinbox.moc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user