From 1ef530bde258a3136ca870ca80ac35ff5d95af5c Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 23 Feb 2006 11:14:15 +0000 Subject: [PATCH] bugfixes and some small new features git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@89 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 89 +++++++- Makefile.am | 8 +- TODO | 1 + configure.in | 19 +- include/automatable_object.h | 198 ++++++++++++++++++ include/group_box.h | 4 +- include/instrument_play_handle.h | 2 +- include/knob.h | 40 ++-- include/lcd_spinbox.h | 17 +- include/led_checkbox.h | 10 +- include/midi_mapper.h | 8 +- include/mixer.h | 4 +- include/note.h | 14 +- include/note_play_handle.h | 2 +- include/piano_roll.h | 6 + include/play_handle.h | 2 +- include/preset_preview_play_handle.h | 2 +- include/project_notes.h | 1 + include/sample_play_handle.h | 5 +- lmms.1 | 9 +- .../audio_file_processor.cpp | 7 +- plugins/bit_invader/bit_invader.cpp | 5 +- plugins/organic/organic.cpp | 19 +- .../plucked_string_synth.cpp | 5 +- .../triple_oscillator/triple_oscillator.cpp | 15 +- plugins/vestige/vestige.cpp | 1 + resources/black_key.png | Bin 479 -> 462 bytes resources/black_key_pressed.png | Bin 459 -> 432 bytes resources/note.png | Bin 0 -> 1005 bytes resources/pr_black_key.png | Bin 669 -> 569 bytes resources/pr_white_key_big.png | Bin 504 -> 523 bytes resources/pr_white_key_small.png | Bin 358 -> 390 bytes resources/quantize.png | Bin 0 -> 1052 bytes resources/white_key.png | Bin 242 -> 202 bytes resources/white_key_pressed.png | Bin 442 -> 243 bytes src/audio/audio_alsa.cpp | 4 + src/audio/audio_device.cpp | 4 + src/audio/audio_file_device.cpp | 4 + src/audio/audio_file_ogg.cpp | 4 + src/audio/audio_file_wave.cpp | 4 + src/audio/audio_jack.cpp | 4 + src/audio/audio_oss.cpp | 4 + src/audio/audio_port.cpp | 4 + src/audio/audio_sample_recorder.cpp | 4 + src/audio/audio_sdl.cpp | 4 + src/core/about_dialog.cpp | 4 + src/core/arp_and_chords_tab_widget.cpp | 22 +- src/core/bb_editor.cpp | 6 +- src/core/config_mgr.cpp | 4 + src/core/engine.cpp | 6 +- src/core/envelope_and_lfo_widget.cpp | 26 ++- src/core/envelope_tab_widget.cpp | 8 +- src/core/export_project_dialog.cpp | 4 + src/core/file_browser.cpp | 4 + src/core/instrument.cpp | 4 + src/core/main.cpp | 4 + src/core/main_window.cpp | 16 +- src/core/midi_tab_widget.cpp | 4 + src/core/mixer.cpp | 9 +- src/core/name_label.cpp | 8 + src/core/note.cpp | 53 ++++- src/core/note_play_handle.cpp | 4 + src/core/piano_roll.cpp | 79 ++++++- src/core/piano_widget.cpp | 69 +++--- src/core/plugin.cpp | 4 + src/core/plugin_browser.cpp | 6 +- src/core/preset_preview_play_handle.cpp | 4 + src/core/sample_play_handle.cpp | 4 + src/core/setup_dialog.cpp | 4 + src/core/song_editor.cpp | 6 +- src/core/surround_area.cpp | 4 + src/core/timeline.cpp | 4 + src/core/track.cpp | 6 + src/core/track_container.cpp | 4 + src/lib/base64.cpp | 4 + src/lib/buffer_allocator.cpp | 4 + src/lib/clipboard.cpp | 4 + src/lib/embed.cpp | 4 + src/lib/ladspa_manager.cpp | 4 + src/lib/mmp.cpp | 4 + src/lib/oscillator.cpp | 9 +- src/lib/sample_buffer.cpp | 6 +- src/lib/string_pair_drag.cpp | 4 + src/lmms_single_source.cpp | 85 ++++++++ src/midi/midi_alsa_raw.cpp | 4 + src/midi/midi_alsa_seq.cpp | 4 + src/midi/midi_client.cpp | 4 + src/midi/midi_mapper.cpp | 8 +- src/midi/midi_oss.cpp | 4 + src/midi/midi_port.cpp | 4 + src/tracks/bb_track.cpp | 10 +- src/tracks/pattern.cpp | 5 + src/tracks/sample_track.cpp | 4 + src/widgets/combobox.cpp | 9 +- src/widgets/cpuload_widget.cpp | 4 + src/widgets/fade_button.cpp | 4 + src/widgets/group_box.cpp | 5 + src/widgets/kmultitabbar.cpp | 4 + src/widgets/knob.cpp | 104 ++++----- src/widgets/lcd_spinbox.cpp | 28 +-- src/widgets/led_checkbox.cpp | 15 +- src/widgets/nstate_button.cpp | 4 + src/widgets/pixmap_button.cpp | 4 + src/widgets/project_notes.cpp | 6 +- src/widgets/qxembed.cpp | 4 + src/widgets/rename_dialog.cpp | 4 + src/widgets/rubberband.cpp | 4 + src/widgets/side_bar_widget.cpp | 4 + src/widgets/tab_bar.cpp | 4 + src/widgets/tab_widget.cpp | 4 + src/widgets/tempo_sync_knob.cpp | 7 +- src/widgets/text_float.cpp | 4 + src/widgets/tool_button.cpp | 4 + src/widgets/tooltip.cpp | 4 + src/widgets/visualization_widget.cpp | 4 + 115 files changed, 1059 insertions(+), 263 deletions(-) create mode 100755 include/automatable_object.h create mode 100644 resources/note.png create mode 100644 resources/quantize.png create mode 100644 src/lmms_single_source.cpp diff --git a/ChangeLog b/ChangeLog index 4e9a32d7d2..8482e66664 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,93 @@ +2006-02-22 Tobias Doerffel + + * 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 + + * 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 + + * 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 - * 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 - * 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 diff --git a/Makefile.am b/Makefile.am index 08e8957454..3cce1d2a97 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/TODO b/TODO index 40e55d733b..f6921f5810 100644 --- a/TODO +++ b/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 diff --git a/configure.in b/configure.in index d400359498..fc87a7d829 100644 --- a/configure.in +++ b/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]) diff --git a/include/automatable_object.h b/include/automatable_object.h new file mode 100755 index 0000000000..4f96a9740f --- /dev/null +++ b/include/automatable_object.h @@ -0,0 +1,198 @@ +/* + * automatable_object.h - declaration of class automatableObject + * + * Copyright (c) 2006 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * 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 + +#include "templates.h" + +template +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( _value, minValue(), maxValue() ); + if( m_step != 0 ) + { + m_value = static_cast( floorf( m_value / m_step ) * + m_step ); + } + else + { + m_value = m_minValue; + } + + // correct rounding error at the border + if( tAbs( m_value - m_maxValue ) < minEps() * + tAbs( m_step ) ) + { + m_value = m_maxValue; + } + + // correct rounding error if value = 0 + if( tAbs( m_value ) < minEps() * tAbs( 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( 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( m_step ) < + tAbs( 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::minRelStep( void ) +{ + return( 1.0e-10 ); +} + + + +template<> +inline float automatableObject::defaultRelStep( void ) +{ + return( 1.0e-2 ); +} + + +template<> +inline float automatableObject::minEps( void ) +{ + return( 1.0e-10 ); +} + + + + +#endif + diff --git a/include/group_box.h b/include/group_box.h index e033e8a582..af14dcab14 100644 --- a/include/group_box.h +++ b/include/group_box.h @@ -1,7 +1,7 @@ /* * group_box.h - LMMS-groupbox * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2006 Tobias Doerffel * * 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 { diff --git a/include/instrument_play_handle.h b/include/instrument_play_handle.h index 834e96483d..4e0147e9e9 100644 --- a/include/instrument_play_handle.h +++ b/include/instrument_play_handle.h @@ -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 ) { diff --git a/include/knob.h b/include/knob.h index 8b186639f9..f1596faff3 100644 --- a/include/knob.h +++ b/include/knob.h @@ -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 { 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; } ; diff --git a/include/lcd_spinbox.h b/include/lcd_spinbox.h index 09838803b1..97ea2c16f5 100644 --- a/include/lcd_spinbox.h +++ b/include/lcd_spinbox.h @@ -41,22 +41,25 @@ #endif +#include "automatable_object.h" + + class QLabel; -class lcdSpinBox : public QWidget +class lcdSpinBox : public QWidget, public automatableObject { 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 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; diff --git a/include/led_checkbox.h b/include/led_checkbox.h index 5e648715b0..07d1670b74 100644 --- a/include/led_checkbox.h +++ b/include/led_checkbox.h @@ -1,7 +1,7 @@ /* * led_checkbox.h - class ledCheckBox, an improved QCheckBox * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2006 Tobias Doerffel * * 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 { 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: diff --git a/include/midi_mapper.h b/include/midi_mapper.h index de66fbbd82..a96d3a8870 100644 --- a/include/midi_mapper.h +++ b/include/midi_mapper.h @@ -1,7 +1,7 @@ /* * midi_mapper.h - MIDI-mapper for any midiDevice * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2006 Tobias Doerffel * * 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 m_patchMap[MIDI_PROGRAMS]; QPair m_drumsetKeyMap[MIDI_KEYS]; - Uint8 m_channelMap[MIDI_CHANNELS]; + Uint8 m_channelMap[MIDI_CHANNEL_COUNT]; Uint8 m_drumsetChannel; Uint8 m_drumsetPatch; diff --git a/include/mixer.h b/include/mixer.h index 624530b4cb..b113d2aa8c 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -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 ) diff --git a/include/note.h b/include/note.h index a236716d78..c710bdd36f 100644 --- a/include/note.h +++ b/include/note.h @@ -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; diff --git a/include/note_play_handle.h b/include/note_play_handle.h index b8b5abc5e4..d6c8c1f96f 100644 --- a/include/note_play_handle.h +++ b/include/note_play_handle.h @@ -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(); diff --git a/include/piano_roll.h b/include/piano_roll.h index 139ac2f44d..2c23465faa 100644 --- a/include/piano_roll.h +++ b/include/piano_roll.h @@ -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; diff --git a/include/play_handle.h b/include/play_handle.h index 9e3a5ad280..fb271844cc 100644 --- a/include/play_handle.h +++ b/include/play_handle.h @@ -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 ) { diff --git a/include/preset_preview_play_handle.h b/include/preset_preview_play_handle.h index 7dfa8f94f8..1ea11eeb5e 100644 --- a/include/preset_preview_play_handle.h +++ b/include/preset_preview_play_handle.h @@ -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 ); diff --git a/include/project_notes.h b/include/project_notes.h index 893cfb317d..496622aec0 100644 --- a/include/project_notes.h +++ b/include/project_notes.h @@ -35,6 +35,7 @@ #else #include +#define textColor color #endif diff --git a/include/sample_play_handle.h b/include/sample_play_handle.h index 049659f0a5..2a55fe7112 100644 --- a/include/sample_play_handle.h +++ b/include/sample_play_handle.h @@ -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 ); diff --git a/lmms.1 b/lmms.1 index 398cea0bcb..b2940de7a3 100644 --- a/lmms.1 +++ b/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\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 and -Tobias Doerffel , for the Debian project (but may be -used by others). +Tobias Doerffel , for the Debian project (but may be used by others). diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 6ae7593184..80db32c99c 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -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, diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 0576a4657f..dded118eb6 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -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" ) + " ", "" ); diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index b81304652f..336d9f79bc 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -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 ) + " ", "%" ); diff --git a/plugins/plucked_string_synth/plucked_string_synth.cpp b/plugins/plucked_string_synth/plucked_string_synth.cpp index 80a7d7358a..8258d63b81 100644 --- a/plugins/plucked_string_synth/plucked_string_synth.cpp +++ b/plugins/plucked_string_synth/plucked_string_synth.cpp @@ -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 diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 3c8ea9cf11..0555ee93a2 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -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:" ). diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 775b3907bd..0b722313d9 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -62,6 +62,7 @@ #include "song_editor.h" #include "lvsl_client.h" +#undef SINGLE_SOURCE_COMPILE #include "embed.cpp" diff --git a/resources/black_key.png b/resources/black_key.png index c6350945692e1089c7576c4af2727cddf95cd84e..8576bf1fc940437c17497167ef9c5a5c0351e2ec 100644 GIT binary patch delta 369 zcmV-%0gnFP1I`1GJ_^$Xkd0NB_xAdynYQp`+5pPDWrWSWpTxU2<~Gm67U&f!X~Y-k15l z8GtgXU^?BN0qiL$nL{!%^q-QTW2`nkkue z)LT#OGD2Snx5Eh6$v8c({UF?QAv6D6MPAgp>^O?WB4_6pOw%c8nxfPmr6Az#rKv$TG6Z( z+@zai5+^AgT%^#obnVio=+n6A3$)OoOV{F>QA#1;AWm7l9opPBR%1E{{oz1v&d2}X zbGQI4q-Jk!?=0ZzVti$hngyYNyyai_j!7J05}8Qy{ysgb{P(b4h+M8 zke_m39LLONGuIf8$GgGBV!`Xnvug|ngB)1NKGHO$NEJ%z@8D*$DF-U0jvQ^RE$8?j z!R_^I59dJ7^U66M36xs7J9;KK>?k4xK>%6~M~eu`R1Z65Rd`3OHO81v&=2-MGvD_S z5sWctQ!So4i#EoTix!dn!)UFYTOp`zl)@O}YUePGR`_d0)>`*J=V-0P_xI@e~i$vSz-J_^R5;7kls`+vFc^oQ_Ie*y} zT`Kev0!$INWg1rGwDPYCE_zE;iUdkqBLUA@GLx$?wfC z2>}>0+)@`;Hww@rJUg%Q2Vm?0rvOq)#NIwtOm-(#dJMdJ)ogk+C7#6^41$24p+PBs zC5w}VF8IFa29qRV^}N!BD2lqlG)+l1Yh8E`!y4#TNl_I17A}_YuRx_#tmd&61o5Y002ovPDHLkV1gkBoiP9a delta 366 zcmV-!0g?W&1Iq)DJ_^(Z1P~oN7Z|W6kw`3mLPhLXLy)Y6QgABWy7+7QH~b&|i!Lr50;P_2b1+jE(;>~Z(U^oz?FR?n@jkrYy~l9? zeWab7_`>qsk{9FfE{gFOcqFW2IcQD2hTd%kI3`B0|C8W@AQ*WN--LZ z*zI=Kb-&*i!7vP2E|(`sCzA>B`Z)^=+yWh-`?W5CC*T1{fDhpH6LtD!>cEh7asU7T M07*qoM6N<$f=+0zn*aa+ diff --git a/resources/note.png b/resources/note.png new file mode 100644 index 0000000000000000000000000000000000000000..c0fc912552b72eda16281288902b5e58126a950b GIT binary patch literal 1005 zcmV3L_Yz9CFnF00WIlL_t(Y$E}r3ZyQw}2n&eo+AfU~+bMQ%I_|g`&kPHu5Q35nA4j^YxjN5z&w0-sa1wFac#{tRKi~x< z9EQu$t!L?tpN)UI>|cIL|3?1_3kqle7XL#C&M|yt>54VGJZts7*PGw~r+@&U?4`!# z2rxkO{K)x4+ZC71k-C{-MVDHvow!v5Db{m)n#!OkpzEGw2$R zjvovPht7CLJa4RqSD(?7`VTy$zP)wM6vQ|=etdi^t7Vxh&C%7?g(*yWygdwc4=DqY zf#usb0bbzv>7mo7lGP-a-?^MyXkG9wdzR(&W}3W}$EWykg_M{z3L@JbBo95S@Qg|^2_xPzm?PcDvKoE+&HK}Z5236MYtfgud0v?;E>do{tw zybmk@)yJ;cYX+kI_4cVt@k_6U{b6cWjT$vnOQmMjs8S_o<_I)5DLMDvB3)M1_i0`XJXm* z%!icujIHf49Jxp>sOe-aNm(kBF*BHo2~Bpz5|E<7N934h9+O+ZkHGp)1K#c;iT(63 z$rOh;i60LJCKWU?RQZ}!7P-wP_kblJ31n>rjsU`b#QK2<5V8l@0BUxn1z^QKW#Hj% b$pL-?!_QX-*&R`q00000NkvXXu0mjfLYB&* literal 0 HcmV?d00001 diff --git a/resources/pr_black_key.png b/resources/pr_black_key.png index dcfe295898c02792391af859b2466cc9d079ed73..86930716e8308b7e5921e3eb28c045440bbacac4 100644 GIT binary patch delta 481 zcmV<70UrLH1-S%}Bat;53f2M^3@s;%I~Y-sS}T76ut`KgR7l6oma%SAF%*Ws<6}W5 zl9HgPRcK(EWAPnB$|+HNp**|xi&*? zlU%7FCTdHTkIwNq=htuRw*`1d+~bQps=E*)vYnSZBuT>OPak*f!QlbUIh=DONkYHh zXEc8rk)|nGmi@Jms$$h*)L@K3RTtB$MXh30QELk^RmGTjjuC^16zW#06^`BDf{F2{(=-L(`sx~hC_#?L;|17_C(mY4 zf;|6uo`W6naJ~H9#t3rwYq(%?dT~LVAP0W~09t!{9KSz~^G51{ccdJfEhdjP)y XVCJg7yr5Q-00000NkvXXu0mjfaEIX> delta 579 zcmV-J0=)gX1f2ztBMt^)OGiWi{{a60|De66kslul)CB?)G%`vL3_OuYD}Mq4NklP3yw1RtNRD$4aye?X8r5o*APAzH95>JNBERQ(&#8c@06!ry^6uN>$%1@?df_z9em_Sm)1 R%31&b002ovPDHLkV1j_O8LI#Q diff --git a/resources/pr_white_key_big.png b/resources/pr_white_key_big.png index 424e8a8c4f4bf68cd5f7d76901bdd598574a8963..5bb2824777112400e39bed9fcdf314c17a562988 100644 GIT binary patch delta 458 zcmV;*0X6>k1B(QZBP9uNNLh0L01FZT01FZU(%pXi00007bV*G`2i5`>3^FD$W+qvY zS}cEpNklPWbzge$WGi&d^+B|rM zi9H|!pt5&kzjYg-p3|GJks}!(0q6i*=#lmfh1DLAX&?? zdSG}73DeBF)S}_6ypC%A^v$nGXPQnA|hf1fe0udCHxy%YlI5GtXY3% z;j4?Dz~{bg+x9>T1zJ37k{YTKC4;|eRIjLp$}U$ws)W?_yNGxKPpfrZ*C{Hms;)!d ziK>!@+Mqkt04|Um8j*hy0?*s6bIucZSS$kMK|I47R=S7pA_u2BAg75rxK%3qce@XN zfO2_t9lx)6F&iH-{7~)Y#{$Pn?IIe#iB6T&Z+QoDM(k^*0000007*qoM6N<$f@s0U AXaE2J delta 412 zcmV;N0b~A)1o#7xBM$~*OGiWi{{a60|De66laU}E3e*Jx2^lDc_K6RXNGyL{Nklf#v4E{uTqOM)~U_4jeq8WQvGH_gnUI!29<#MG3se|}&1av5NN_zPQBg>Md z&&XgCfUibC@S(j1MhXDz%QCGOnU+E4b_?*h+htjn=Xt9A)5m8QaCi){MAb4REdYdN z@L(@f5izY9T8`uKs6tEN<@J9}XYZq$Bz}#tdk_LeQJfJN=e=?Q{X8uJB0>ZZNFY&W z?h;NA6@=JG=9pazlDXQtRsvyhf#pbW<%mn*0z2yV25tmy1Y&NxKlqHAqs#h#%%c*L z|5ZZkKUt&zk_1FVM0#HDh2{4F;~Q{AHk-{r;QdrpRW%V6qPIrvF>`cp^Mee5%urU# zAOxIqS}ZAmr{}$Mj)jG7$fjvbc<#_^)W+A01-}YHpe)O}u3G}z?RK1{$<^;NbDy-z z#@@gTg{uC;;m}^0?(QG_>KvEv?9TZbA;>XN7w#Jog7>ty2;_?Z0000x7eouFjY*Fy53gD91ge`+tI@|{ znIx0xG|SS+()oI0ommHxtSjqYDmhPl*Xlta&ohe*@Zs><1Pn~q2^jO?6$sU%U(!N< zg8nn`ufR`Npobw2dyMwbLXBgzgC2No1v=Qmx4y_aC}0F&wcYIx`_|_qB}b4IN1_Ch zfOug^63gc{Nngu15hU(3&8h_AICf5KWY!ZYi7o<1N@U?JC|nAx)_7<`6l(8Jry~FZ vU^p5#+P(TKxDZZyOH||E*9tfQ19JuxqLNc4RKOMX00000NkvXXu0mjfUfF}9 delta 264 zcmV+j0r&of1LgvdJ_^(X84wsFp|AiKkw`3m-AP12RCwC$S4$4UAP{{tJ&9X4-jKs^ zpB@0~!f4`xgbSDf7bMsKt)>B5iElw>n1Nw_nU(=~k~J1F3{snRhMwqHYm;=$uEsD7 zoO3B<@A&ie=5BWeri5qLAwHhPfpHui(c#BY)&a&?Z3iltEbBn78f~P6DukoC9{6W- zpsfsS(8PITwm}I6Cig!UK4f73W1;LItB}ARz~%l>N+rJ~jWGfJ%?iLDjBm*DZYky4 z0U^ZPD;>PZgNXbN5e51I0#UBmYpnq=0Ego#`43N8h7v|vF100X>9L_t(Y$HkRjNMv;s$3J)OIBIL| zs-=>e3b6xiiAxVHY^;SKzu)$jA(EQ-OaBbOSE{=Yb1>K;U8~li9J)&(6-S0lmOeKq;WP2|jRmZ~6WHF<>0{ z6nF|aqr58x9sp`1k;vzNKaypM-|rs;UIwZGk2{PDwi1iQ5-Te!J|GG#06zhDfo&iQ z>;fD4e162X(KL;=wzf0CY2YEi>n1pDE753lSB1C^M1eJ653n5P3%Oiw)(H>@1S)|? z)MFRB2~OEcGMNO}2R0SSt_vK1NF=iETvt|B7Au@8pwvx}w-sI2y=rZ!E3ppCy!Q6? z11V`)mZ+jDzb69Aves<9wzjqeC;&OY1jLoj8bCusL#-1dkx1;TIw-#93Pfbi)|;A| z%DrB%t}0V=IsP7SB@_zjrfELy+*n##${tz8J3BjXI_sdbvvUS`SLL-&Iq`G)0u^Zg=?``?Cne@({C8Y3O9H>9^dtNJhy=xz&k*beXVXO3WY*VtE;QO z$iI}Kp`ky#UhgpQs*3o~)~x|$H8nNo!r|~&$z*c(m|>F{7#O%~7=~&8>+bIU26)Nt zMcNSwT4XvfSR9XJU*20W?yRJH1&cIX9FFH6exk`aotH?^!epYqYO+{9xzCVFE;CJmlMzp4ge2T2tF%nJHVRLF-uD+}y-TMof W@!&3<;KXGB0000tGk@On zv0`GBPMD*oi(`nz>ExVOFB1>2#qFusm~fCujE}F6U*0ak%b8`S#D}K9mvETrwKP)B mrlMi1S`&kto}i%3F2niDJIockgw4B1@$N!l8Q}{d3jdeyx7qzp{l%2x zv}o~XQ-qdI@xKwpoRDPT2muG}7rZ?#x%HY}Q8`b?#K+wKHj6I*yJ_xqpc@!GUHx3v IIVCg!03f(PO#lD@ diff --git a/resources/white_key_pressed.png b/resources/white_key_pressed.png index 4832392f4235a2d1f1b41b7c2a12d5e892a68ff2..05b8927b7a849033a0c4aaa6ac2bda8d1e6a3a89 100644 GIT binary patch delta 169 zcmV;a09OCH1M>lpD;*I401FWTe`H^g00007bV*G`2i5`>3F%d1zf#KgofrC+^z#lXP8#DEu!N|P)7|Ns9{-Gfdy zE)`JS6i5>`oOVtl94wT%e6afaKY<)dX@m~HKxLsQj}g$#0=FAdx1a$=UMVT^%Txe* Xn~eGPzbRn=0000zq}TN*0U=p<%ZZi{N1Yqpi<+)%EJ8B>Sdnj=jc9z97}wJh!Z*hxDn z`(f-`%8N9aWgos^yGieyKP!ukea60)=Cb3uu0({0ec#K|2>|mv!?*SU1>;fx68?>b P00000NkvXXu0mjfTM?^< diff --git a/src/audio/audio_alsa.cpp b/src/audio/audio_alsa.cpp index a8d3c32b11..1459a2df88 100644 --- a/src/audio/audio_alsa.cpp +++ b/src/audio/audio_alsa.cpp @@ -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 diff --git a/src/audio/audio_device.cpp b/src/audio/audio_device.cpp index 5b3bd4dd40..5a1327e177 100644 --- a/src/audio/audio_device.cpp +++ b/src/audio/audio_device.cpp @@ -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 diff --git a/src/audio/audio_file_device.cpp b/src/audio/audio_file_device.cpp index 371b50ea2b..8d317e2faf 100644 --- a/src/audio/audio_file_device.cpp +++ b/src/audio/audio_file_device.cpp @@ -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 diff --git a/src/audio/audio_file_ogg.cpp b/src/audio/audio_file_ogg.cpp index ad9d920131..e4f8f0996f 100644 --- a/src/audio/audio_file_ogg.cpp +++ b/src/audio/audio_file_ogg.cpp @@ -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 diff --git a/src/audio/audio_file_wave.cpp b/src/audio/audio_file_wave.cpp index b3aa08f035..d120e6782e 100644 --- a/src/audio/audio_file_wave.cpp +++ b/src/audio/audio_file_wave.cpp @@ -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 diff --git a/src/audio/audio_jack.cpp b/src/audio/audio_jack.cpp index 190a18953e..143d874ecd 100644 --- a/src/audio/audio_jack.cpp +++ b/src/audio/audio_jack.cpp @@ -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 diff --git a/src/audio/audio_oss.cpp b/src/audio/audio_oss.cpp index 64a046dbbb..a0f6fd81f0 100644 --- a/src/audio/audio_oss.cpp +++ b/src/audio/audio_oss.cpp @@ -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 diff --git a/src/audio/audio_port.cpp b/src/audio/audio_port.cpp index 879d60f2d7..e1e8983436 100644 --- a/src/audio/audio_port.cpp +++ b/src/audio/audio_port.cpp @@ -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 diff --git a/src/audio/audio_sample_recorder.cpp b/src/audio/audio_sample_recorder.cpp index 3111389b1f..0725f13d6d 100644 --- a/src/audio/audio_sample_recorder.cpp +++ b/src/audio/audio_sample_recorder.cpp @@ -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 diff --git a/src/audio/audio_sdl.cpp b/src/audio/audio_sdl.cpp index 87353799e1..fe2e42e806 100644 --- a/src/audio/audio_sdl.cpp +++ b/src/audio/audio_sdl.cpp @@ -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 diff --git a/src/core/about_dialog.cpp b/src/core/about_dialog.cpp index a6ac795006..9ab694675f 100644 --- a/src/core/about_dialog.cpp +++ b/src/core/about_dialog.cpp @@ -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 diff --git a/src/core/arp_and_chords_tab_widget.cpp b/src/core/arp_and_chords_tab_widget.cpp index e8d472c244..4528af7c88 100644 --- a/src/core/arp_and_chords_tab_widget.cpp +++ b/src/core/arp_and_chords_tab_widget.cpp @@ -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 diff --git a/src/core/bb_editor.cpp b/src/core/bb_editor.cpp index b4d9b1c6b5..b87b70dd53 100644 --- a/src/core/bb_editor.cpp +++ b/src/core/bb_editor.cpp @@ -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 diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index 7c8c9a06df..d0f8694e9c 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -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 diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 7423a70885..a94e8643d2 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -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 diff --git a/src/core/envelope_and_lfo_widget.cpp b/src/core/envelope_and_lfo_widget.cpp index 4a5cd51065..27f0a8a258 100644 --- a/src/core/envelope_and_lfo_widget.cpp +++ b/src/core/envelope_and_lfo_widget.cpp @@ -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 diff --git a/src/core/envelope_tab_widget.cpp b/src/core/envelope_tab_widget.cpp index 0a1f93a9fa..e532c01073 100644 --- a/src/core/envelope_tab_widget.cpp +++ b/src/core/envelope_tab_widget.cpp @@ -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 diff --git a/src/core/export_project_dialog.cpp b/src/core/export_project_dialog.cpp index 92e98e7bce..18adc227f4 100644 --- a/src/core/export_project_dialog.cpp +++ b/src/core/export_project_dialog.cpp @@ -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 diff --git a/src/core/file_browser.cpp b/src/core/file_browser.cpp index 3796e9b867..50b284bb15 100644 --- a/src/core/file_browser.cpp +++ b/src/core/file_browser.cpp @@ -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 diff --git a/src/core/instrument.cpp b/src/core/instrument.cpp index 237c77b3db..ba384cc696 100644 --- a/src/core/instrument.cpp +++ b/src/core/instrument.cpp @@ -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 diff --git a/src/core/main.cpp b/src/core/main.cpp index 9b56285f6a..f1acc81696 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -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 diff --git a/src/core/main_window.cpp b/src/core/main_window.cpp index e776e4a5aa..f92fdda529 100644 --- a/src/core/main_window.cpp +++ b/src/core/main_window.cpp @@ -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 diff --git a/src/core/midi_tab_widget.cpp b/src/core/midi_tab_widget.cpp index 40af4f3f18..4fc010e3cb 100644 --- a/src/core/midi_tab_widget.cpp +++ b/src/core/midi_tab_widget.cpp @@ -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 diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp index 52a3f5113b..921c5e5513 100644 --- a/src/core/mixer.cpp +++ b/src/core/mixer.cpp @@ -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 diff --git a/src/core/name_label.cpp b/src/core/name_label.cpp index 766a01b1eb..39d0109960 100644 --- a/src/core/name_label.cpp +++ b/src/core/name_label.cpp @@ -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 diff --git a/src/core/note.cpp b/src/core/note.cpp index fdf0d3b975..e79c5c332a 100644 --- a/src/core/note.cpp +++ b/src/core/note.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * note.cpp - implementation of class note * @@ -35,6 +37,7 @@ #endif +#include #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( _key % NOTES_PER_OCTAVE ) ); setOctave( static_cast( _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( p ) * _q_grid ); + } + return( static_cast( 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 diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index c7ce4ff62c..ff0f0a190d 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -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 diff --git a/src/core/piano_roll.cpp b/src/core/piano_roll.cpp index 22b7331d40..5b230ed767 100644 --- a/src/core/piano_roll.cpp +++ b/src/core/piano_roll.cpp @@ -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( 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( 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 diff --git a/src/core/piano_widget.cpp b/src/core/piano_widget.cpp index 599a3048dc..5e83d206f3 100644 --- a/src/core/piano_widget.cpp +++ b/src/core/piano_widget.cpp @@ -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 diff --git a/src/core/plugin.cpp b/src/core/plugin.cpp index 12a08c571d..8a82df13a1 100644 --- a/src/core/plugin.cpp +++ b/src/core/plugin.cpp @@ -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 & _plugin_descs ) + +#endif diff --git a/src/core/plugin_browser.cpp b/src/core/plugin_browser.cpp index ca8dc2f0ea..ad8339147e 100644 --- a/src/core/plugin_browser.cpp +++ b/src/core/plugin_browser.cpp @@ -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 diff --git a/src/core/preset_preview_play_handle.cpp b/src/core/preset_preview_play_handle.cpp index 650dfce69f..a68acd9f16 100644 --- a/src/core/preset_preview_play_handle.cpp +++ b/src/core/preset_preview_play_handle.cpp @@ -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 diff --git a/src/core/sample_play_handle.cpp b/src/core/sample_play_handle.cpp index 96f64ec0f0..dfa76939ed 100644 --- a/src/core/sample_play_handle.cpp +++ b/src/core/sample_play_handle.cpp @@ -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 diff --git a/src/core/setup_dialog.cpp b/src/core/setup_dialog.cpp index 81d8999554..2ae46a100d 100644 --- a/src/core/setup_dialog.cpp +++ b/src/core/setup_dialog.cpp @@ -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 diff --git a/src/core/song_editor.cpp b/src/core/song_editor.cpp index 9acb663341..dd568abdf1 100644 --- a/src/core/song_editor.cpp +++ b/src/core/song_editor.cpp @@ -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 diff --git a/src/core/surround_area.cpp b/src/core/surround_area.cpp index dc42dfd335..2d87d9d464 100644 --- a/src/core/surround_area.cpp +++ b/src/core/surround_area.cpp @@ -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 diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index 3df38bbd93..7773a8bc78 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -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 diff --git a/src/core/track.cpp b/src/core/track.cpp index e58a21e782..8d587fd733 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -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 diff --git a/src/core/track_container.cpp b/src/core/track_container.cpp index 4358cdcf84..04ab9cd8a4 100644 --- a/src/core/track_container.cpp +++ b/src/core/track_container.cpp @@ -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 diff --git a/src/lib/base64.cpp b/src/lib/base64.cpp index dd658c260a..85745f15be 100644 --- a/src/lib/base64.cpp +++ b/src/lib/base64.cpp @@ -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 diff --git a/src/lib/buffer_allocator.cpp b/src/lib/buffer_allocator.cpp index 7639a7f836..48b0ba86c9 100644 --- a/src/lib/buffer_allocator.cpp +++ b/src/lib/buffer_allocator.cpp @@ -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 diff --git a/src/lib/clipboard.cpp b/src/lib/clipboard.cpp index 88f998fd34..c8388bd77d 100644 --- a/src/lib/clipboard.cpp +++ b/src/lib/clipboard.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * clipboard.cpp - the clipboard for patterns, notes etc. * @@ -57,3 +59,5 @@ namespace clipboard } ; + +#endif diff --git a/src/lib/embed.cpp b/src/lib/embed.cpp index de8da7c4c6..cdce07c88d 100644 --- a/src/lib/embed.cpp +++ b/src/lib/embed.cpp @@ -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 diff --git a/src/lib/ladspa_manager.cpp b/src/lib/ladspa_manager.cpp index 0780ae91b7..c60a84713c 100644 --- a/src/lib/ladspa_manager.cpp +++ b/src/lib/ladspa_manager.cpp @@ -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 diff --git a/src/lib/mmp.cpp b/src/lib/mmp.cpp index ac35821e4e..e78b7bca05 100644 --- a/src/lib/mmp.cpp +++ b/src/lib/mmp.cpp @@ -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 diff --git a/src/lib/oscillator.cpp b/src/lib/oscillator.cpp index 3886ac5cd3..786de0732f 100644 --- a/src/lib/oscillator.cpp +++ b/src/lib/oscillator.cpp @@ -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 diff --git a/src/lib/sample_buffer.cpp b/src/lib/sample_buffer.cpp index 22379802c7..5d6ad95335 100644 --- a/src/lib/sample_buffer.cpp +++ b/src/lib/sample_buffer.cpp @@ -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 diff --git a/src/lib/string_pair_drag.cpp b/src/lib/string_pair_drag.cpp index 7aeb17c147..486a7c1728 100644 --- a/src/lib/string_pair_drag.cpp +++ b/src/lib/string_pair_drag.cpp @@ -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 diff --git a/src/lmms_single_source.cpp b/src/lmms_single_source.cpp new file mode 100644 index 0000000000..22e4196649 --- /dev/null +++ b/src/lmms_single_source.cpp @@ -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 diff --git a/src/midi/midi_alsa_raw.cpp b/src/midi/midi_alsa_raw.cpp index 98647f1150..218dc77dbc 100644 --- a/src/midi/midi_alsa_raw.cpp +++ b/src/midi/midi_alsa_raw.cpp @@ -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 diff --git a/src/midi/midi_alsa_seq.cpp b/src/midi/midi_alsa_seq.cpp index 8a30e2c0d5..fa2a3e2e4a 100644 --- a/src/midi/midi_alsa_seq.cpp +++ b/src/midi/midi_alsa_seq.cpp @@ -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 diff --git a/src/midi/midi_client.cpp b/src/midi/midi_client.cpp index ebcf1f894b..383f143043 100644 --- a/src/midi/midi_client.cpp +++ b/src/midi/midi_client.cpp @@ -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 diff --git a/src/midi/midi_mapper.cpp b/src/midi/midi_mapper.cpp index d50109af83..1b5aac4559 100644 --- a/src/midi/midi_mapper.cpp +++ b/src/midi/midi_mapper.cpp @@ -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 diff --git a/src/midi/midi_oss.cpp b/src/midi/midi_oss.cpp index 1dcea6ab0e..b6837f4476 100644 --- a/src/midi/midi_oss.cpp +++ b/src/midi/midi_oss.cpp @@ -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 diff --git a/src/midi/midi_port.cpp b/src/midi/midi_port.cpp index 6039c4c06c..0922316590 100644 --- a/src/midi/midi_port.cpp +++ b/src/midi/midi_port.cpp @@ -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 diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 1f265d38ec..15433a94cc 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -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 diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 4b130a7039..822ba62bae 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -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 diff --git a/src/tracks/sample_track.cpp b/src/tracks/sample_track.cpp index 761166d21c..893a381bae 100644 --- a/src/tracks/sample_track.cpp +++ b/src/tracks/sample_track.cpp @@ -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 diff --git a/src/widgets/combobox.cpp b/src/widgets/combobox.cpp index 9586d07667..1b15999b6e 100644 --- a/src/widgets/combobox.cpp +++ b/src/widgets/combobox.cpp @@ -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 diff --git a/src/widgets/cpuload_widget.cpp b/src/widgets/cpuload_widget.cpp index e4660f917a..81a07d8bce 100644 --- a/src/widgets/cpuload_widget.cpp +++ b/src/widgets/cpuload_widget.cpp @@ -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 diff --git a/src/widgets/fade_button.cpp b/src/widgets/fade_button.cpp index cecf5d8557..e1fa131b78 100644 --- a/src/widgets/fade_button.cpp +++ b/src/widgets/fade_button.cpp @@ -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 diff --git a/src/widgets/group_box.cpp b/src/widgets/group_box.cpp index 4f2b146e92..a85149da84 100644 --- a/src/widgets/group_box.cpp +++ b/src/widgets/group_box.cpp @@ -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 diff --git a/src/widgets/kmultitabbar.cpp b/src/widgets/kmultitabbar.cpp index ed06e09e65..1e585844a2 100644 --- a/src/widgets/kmultitabbar.cpp +++ b/src/widgets/kmultitabbar.cpp @@ -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 diff --git a/src/widgets/knob.cpp b/src/widgets/knob.cpp index a83e7863bf..b7452a0ddf 100644 --- a/src/widgets/knob.cpp +++ b/src/widgets/knob.cpp @@ -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 * @@ -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(), 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( m_maxValue - m_minValue ) * + const float oneTurn = tAbs( 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( 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::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::setRange( _min, _max, _step ); - if( rchg ) - { - m_minValue = _vmin; - m_maxValue = _vmax; - } + m_pageSize = tMax( ( 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( ( m_maxValue - - m_minValue ) / m_step ) ) ); */ - m_pageSize = tMax( ( 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 diff --git a/src/widgets/lcd_spinbox.cpp b/src/widgets/lcd_spinbox.cpp index b2e91a16c7..1424edcecb 100644 --- a/src/widgets/lcd_spinbox.cpp +++ b/src/widgets/lcd_spinbox.cpp @@ -1,7 +1,9 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2006 Tobias Doerffel * * 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( 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::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::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 diff --git a/src/widgets/led_checkbox.cpp b/src/widgets/led_checkbox.cpp index ed2e876bc9..d59c4965fb 100644 --- a/src/widgets/led_checkbox.cpp +++ b/src/widgets/led_checkbox.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * led_checkbox.cpp - class ledCheckBox, an improved QCheckBox * @@ -55,7 +57,7 @@ static const QString names[ledCheckBox::TOTAL_COLORS] = ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, ledColors _color ) : QWidget( _parent ), - m_checked( FALSE ), + automatableObject( FALSE, TRUE, FALSE ), m_text( _text ) { if( _color >= TOTAL_COLORS || _color < YELLOW ) @@ -104,9 +106,9 @@ void ledCheckBox::mousePressEvent( QMouseEvent * _me ) void ledCheckBox::toggle( void ) { - m_checked = !m_checked; + setValue( !value() ); update(); - emit( toggled( m_checked ) ); + emit( toggled( value() ) ); } @@ -120,7 +122,7 @@ void ledCheckBox::setChecked( bool _on ) } else { - emit( toggled( m_checked ) ); + emit( toggled( value() ) ); } } @@ -148,6 +150,9 @@ void ledCheckBox::paintEvent( QPaintEvent * ) p.drawPixmap( 0, 0, *m_ledOffPixmap ); } + p.setPen( QColor( 64, 64, 64 ) ); + p.drawText( m_ledOffPixmap->width() + 3, 9, text() ); + p.setPen( QColor( 255, 255, 255 ) ); p.drawText( m_ledOffPixmap->width() + 2, 8, text() ); #ifndef QT4 @@ -159,3 +164,5 @@ void ledCheckBox::paintEvent( QPaintEvent * ) #include "led_checkbox.moc" + +#endif diff --git a/src/widgets/nstate_button.cpp b/src/widgets/nstate_button.cpp index 0a25c6c68d..e9ee707415 100644 --- a/src/widgets/nstate_button.cpp +++ b/src/widgets/nstate_button.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * nstate_button.cpp - implementation of n-state-button * @@ -109,3 +111,5 @@ void nStateButton::mousePressEvent( QMouseEvent * _me ) #include "nstate_button.moc" + +#endif diff --git a/src/widgets/pixmap_button.cpp b/src/widgets/pixmap_button.cpp index 36d3ca06ec..2e7ffbad7c 100644 --- a/src/widgets/pixmap_button.cpp +++ b/src/widgets/pixmap_button.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * pixmap_button.cpp - implementation of pixmap-button (often used as "themed" * checkboxes/radiobuttons etc) @@ -171,3 +173,5 @@ void pixmapButton::setBgGraphic( const QPixmap & _pm ) #include "pixmap_button.moc" + +#endif diff --git a/src/widgets/project_notes.cpp b/src/widgets/project_notes.cpp index 6de8105fc8..1595755a98 100644 --- a/src/widgets/project_notes.cpp +++ b/src/widgets/project_notes.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * project_notes.cpp - implementation of project-notes-editor * @@ -58,7 +60,6 @@ #define setFontFamily setFamily #define setFontPointSize setPointSize #define setTextColor setColor -#define textColor color #define setHtml setText #define toHtml text @@ -597,8 +598,9 @@ void projectNotes::loadSettings( const QDomElement & _this ) #undef setFontItalic #undef setFontFamily #undef setFontPointSize -#undef textColor #undef setTextColor #undef setHtml #undef toHtml + +#endif diff --git a/src/widgets/qxembed.cpp b/src/widgets/qxembed.cpp index 0fd885aa74..8378abff01 100644 --- a/src/widgets/qxembed.cpp +++ b/src/widgets/qxembed.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /**************************************************************************** Implementation of QXEmbed class @@ -1362,3 +1364,5 @@ void QXEmbed::reparent( QWidget * parent, WFlags f, const QPoint & p, bool showI #include "qxembed.moc" #endif #endif // Q_WS_X11 + +#endif diff --git a/src/widgets/rename_dialog.cpp b/src/widgets/rename_dialog.cpp index 05e66e43f9..1e6c2fda62 100644 --- a/src/widgets/rename_dialog.cpp +++ b/src/widgets/rename_dialog.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * rename_dialog.cpp - implementation of dialog for renaming something * @@ -88,3 +90,5 @@ void renameDialog::textChanged( const QString & _new_string ) #include "rename_dialog.moc" + +#endif diff --git a/src/widgets/rubberband.cpp b/src/widgets/rubberband.cpp index 3b4e238d6d..e1b147ae20 100644 --- a/src/widgets/rubberband.cpp +++ b/src/widgets/rubberband.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper * for Qt4 @@ -161,3 +163,5 @@ vvector rubberBand::selectableObjects( void ) const #include "rubberband.moc" + +#endif diff --git a/src/widgets/side_bar_widget.cpp b/src/widgets/side_bar_widget.cpp index 33dfc55479..52af32bf7b 100644 --- a/src/widgets/side_bar_widget.cpp +++ b/src/widgets/side_bar_widget.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * side_bar_widget.cpp - implementation of base-widget for side-bar * @@ -123,3 +125,5 @@ void sideBarWidget::resizeEvent( QResizeEvent * ) #include "side_bar.moc" #include "side_bar_widget.moc" + +#endif diff --git a/src/widgets/tab_bar.cpp b/src/widgets/tab_bar.cpp index 90ae6c84c6..2b864b963b 100644 --- a/src/widgets/tab_bar.cpp +++ b/src/widgets/tab_bar.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * tab_bar.cpp - implementation of tab-bar * @@ -260,3 +262,5 @@ bool tabBar::allHidden( void ) #include "tab_bar.moc" #include "tab_button.moc" + +#endif diff --git a/src/widgets/tab_widget.cpp b/src/widgets/tab_widget.cpp index 0d1411d8dd..ad8f03123a 100644 --- a/src/widgets/tab_widget.cpp +++ b/src/widgets/tab_widget.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * tabwidget.cpp - tabwidget for LMMS * @@ -244,3 +246,5 @@ void tabWidget::wheelEvent( QWheelEvent * _we ) #include "tab_widget.moc" + +#endif diff --git a/src/widgets/tempo_sync_knob.cpp b/src/widgets/tempo_sync_knob.cpp index 68fa72eb2a..b286eb9f49 100644 --- a/src/widgets/tempo_sync_knob.cpp +++ b/src/widgets/tempo_sync_knob.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * tempo_sync_knob.cpp - adds bpm to ms conversion for knob class * @@ -294,8 +296,7 @@ void tempoSyncKnob::calculateTempoSyncTime( bpm_t _bpm ) ": invalid tempoSyncMode" ); break; } - setValue( 60000.0 / ( _bpm * conversionFactor * m_scale ), - FALSE ); + setValue( 60000.0 / ( _bpm * conversionFactor * m_scale ) ); } else { @@ -391,3 +392,5 @@ void tempoSyncKnob::setSyncIcon( const QPixmap & _new_icon ) #include "tempo_sync_knob.moc" + +#endif diff --git a/src/widgets/text_float.cpp b/src/widgets/text_float.cpp index 77849797c8..eb9b81afec 100644 --- a/src/widgets/text_float.cpp +++ b/src/widgets/text_float.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * text_float.cpp - class textFloat, a floating text-label * @@ -280,3 +282,5 @@ void textFloat::updateSize( void ) #undef setParent + +#endif diff --git a/src/widgets/tool_button.cpp b/src/widgets/tool_button.cpp index 7313ff639d..e3247b2f52 100644 --- a/src/widgets/tool_button.cpp +++ b/src/widgets/tool_button.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * tool_button.cpp - implementation of LMMS-tool-button for common (cool) look * @@ -102,3 +104,5 @@ void toolButton::toggledBool( bool _on ) #include "tool_button.moc" + +#endif diff --git a/src/widgets/tooltip.cpp b/src/widgets/tooltip.cpp index b78ebe76c4..f3a1ab19cd 100644 --- a/src/widgets/tooltip.cpp +++ b/src/widgets/tooltip.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * tooltip.cpp - namespace toolTip, a tooltip-wrapper for LMMS * @@ -51,3 +53,5 @@ void toolTip::add( QWidget * _w, const QString & _txt ) } } + +#endif diff --git a/src/widgets/visualization_widget.cpp b/src/widgets/visualization_widget.cpp index 7109c0e661..e764eb3c6c 100644 --- a/src/widgets/visualization_widget.cpp +++ b/src/widgets/visualization_widget.cpp @@ -1,3 +1,5 @@ +#ifndef SINGLE_SOURCE_COMPILE + /* * visualization_widget.cpp - widget for visualization of sound-data * @@ -216,3 +218,5 @@ void visualizationWidget::mousePressEvent( QMouseEvent * _me ) #include "visualization_widget.moc" + +#endif