diff --git a/ChangeLog b/ChangeLog index 36b308dc2..6a8c3659b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,58 @@ +2007-08-19 Tobias Doerffel + + * data/locale/de.ts: + * data/locale/de.qm: + updated German localization-file + + * Makefile.am: + fixed command for updating TS-files + + * include/config_mgr.h: + * include/main_window.h: + * src/core/config_mgr.cpp: + * src/core/main_window.cpp: + added support for "Recently opened files"-menu + + * src/core/main_window.cpp: + - cleanups + - limit x-coordinate of a widget to be >= 0 in + mainWindow::restoreWidgetState( ... ) - fixes bug with appearently + inacccessible title-bars of piano-roll, song-editor etc. after + loading project + + * include/config_mgr.h: + * src/core/engine.cpp: + also destroy config-manager at engine::destroy() + + * src/audio/audio_jack.cpp: + added define for support for per-track audio-ports - almost works + except that the buffers of the audio-port are already cleared again at + the time the callback fills the buffers - will need an additional + buffer in audio-ports or something like that + + * src/core/mixer.cpp: + * src/lib/journalling_object.cpp: + * src/lib/project_journal.cpp: + * src/widgets/knob.cpp: + removed debug-out + + * plugins/patman/patman.cpp: + set directory of sample-selection-dialog to /usr/share/midi/freepats + if it exists + + * plugins/Makefile.am: + * plugins/vibed/vibed.cpp: + * lib/src/mmp.cpp: + replaced obsolete PluckedStringSynth with Vibed + + * plugins/Makefile.am: + removed Polyb302 from build as the same results can be achieved either + via (improved and maintained) LB302 or TripleOsc+filter - Polyb302 + just increases redundancy and adds extra maintainance-work + + * plugins/stk/mallets/mallets.cpp: + do not crash if Stk-files are missing + 2007-08-18 Tobias Doerffel * plugins/lb302/lb302.cpp: diff --git a/Makefile.am b/Makefile.am index 168e2ab07..4b203de3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) $(MOC) -o $@ $< %.ts: - $(LUPDATE) $(lmms_SOURCES) `find plugins/ -type f -name *.cpp` -ts data/locale/$@ + $(LUPDATE) $(lmms_SOURCES) `find plugins/ -type f -name "*.cpp"` -ts data/locale/$@ %.qm: %.ts $(LRELEASE) $< diff --git a/data/locale/de.qm b/data/locale/de.qm index 400f8c6ae..bad42b187 100644 Binary files a/data/locale/de.qm and b/data/locale/de.qm differ diff --git a/data/locale/de.ts b/data/locale/de.ts index 7a8186bed..9934dc967 100644 --- a/data/locale/de.ts +++ b/data/locale/de.ts @@ -3,7 +3,54 @@ QObject Note detuning - Noten-Verstimmung + Noten-Verstimmung + + + + QWidget + + Name: + Name: + + + Maker: + Hersteller: + + + Copyright: + Copyright: + + + Requires Real Time: + Benötigt Echtzeit: + + + Yes + Ja + + + No + + + + Real Time Capable: + Echtzeitfähig: + + + In Place Broken: + + + + Channels In: + Eingangs-Kanäle: + + + Channels Out: + Ausgangs-Kanäle: + + + File: + Datei: @@ -50,10 +97,22 @@ Wenn Sie an der Übersetzung von LMMS in eine andere Sprache interessiert sind o Copyright (c) 2004-2006 LMMS-Developers http://lmms.sourceforge.net - LMMS - Ein leistungsfähiges Synthesizer-Studio + LMMS - Ein leistungsfähiges Synthesizer-Studio Copyright (c) 2004-2006 LMMS-Entwickler +http://lmms.sourceforge.net + + + LMMS - A powerful synthesizer-studio + +Copyright (c) 2004-2007 LMMS-Developers + +http://lmms.sourceforge.net + LMMS - Ein leistungsfähiges Synthesizer-Studio + +Copyright (c) 2004-2007 LMMS-Entwickler + http://lmms.sourceforge.net @@ -649,6 +708,10 @@ http://lmms.sourceforge.net END ENDE + + Loop + Wiederholen + automatableButton @@ -790,6 +853,49 @@ http://lmms.sourceforge.net If you click here, move-mode will be activated. In this mode you can move the values you selected in select-mode. You can also press 'Shift+M' on your keyboard to activate this mode. Wenn Sie hier klicken, wird der Auswahl-Verschieben-Modus aktiviert. In diesem Modus können Sie die markierten Werte verschieben. Sie können auch 'Umschalt+M' auf Ihrer Tastatur drücken, um diesen Modus zu aktivieren. + + Note detuning + Noten-Verstimmung + + + + bassBoosterControlDialog + + Frequency + Frequenz + + + FREQ + FREQ + + + Frequency: + Frequenz: + + + Gain + Gain + + + GAIN + GAIN + + + Gain: + Gain: + + + Ratio + Rate + + + RATIO + RATE + + + Ratio: + Rate: + bbEditor @@ -1153,6 +1259,13 @@ installiert sind. Soll der Einrichtungsassistent jetzt gestartet werden?LMMS-Arbeitsverzeichnis wählen + + effectList + + Description + Beschreibung + + effectSelectDialog @@ -1793,6 +1906,69 @@ Stellen Sie sicher, dass Sie Schreibzugriff auf die gewählte Datei/Gerät haben FX + + kickerInstrument + + Start frequency + Startfrequenz + + + START + START + + + Start frequency: + Startfrequenz: + + + End frequency + Endfrequenz + + + END + ENDE + + + End frequency: + Endfrequenz: + + + Decay + Abfallzeit + + + DECAY + ABFALL + + + Decay: + Abfallzeit (decay): + + + Distortion + Verzerrung + + + DIST + DIST + + + Distortion: + Verzerrung: + + + Gain + Gain + + + GAIN + GAIN + + + Gain: + Gain: + + knob @@ -1964,51 +2140,245 @@ Double clicking any of the plugins will bring up information on the ports.ladspaSubPluginDescriptionWidget Description - Beschreibung + Beschreibung Name: - Name: + Name: Maker: - Hersteller: + Hersteller: Copyright: - Copyright: + Copyright: Requires Real Time: Yes - Benötigt Echtzeit: ja + Benötigt Echtzeit: ja Requires Real Time: No - Benötigt Echtzeit: nein + Benötigt Echtzeit: nein Real Time Capable: Yes - Echtzeitfähig: ja + Echtzeitfähig: ja Real Time Capable: No - Echtzeitfähig: nein - - - In Place Broken: Yes - - - - In Place Broken: No - + Echtzeitfähig: nein Channels In: - Eingangs-Kanäle: + Eingangs-Kanäle: Channels Out: - Ausgangs-Kanäle: + Ausgangs-Kanäle: + + + + lb302Synth + + VCF Cutoff Frequency + VCF-Kennfrequenz + + + Cutoff Freq: + Kennfrequenz: + + + CUT + FREQ + + + VCF Resonance + VCF-Resonanz + + + Resonance: + Resonanz: + + + RES + RES + + + VCF Envelope Mod + VCF-Hüllkurvenintensität + + + Env Mod: + Hüllkurven-Modulation: + + + ENV MOD + + + + VCF Envelope Decay + VCF-Hüllkurvenabfallzeit + + + Decay: + Abfallzeit (decay): + + + DEC + DEC + + + Slide + + + + Accent + Betonung + + + Dead + Tot + + + 303-es-que, 24dB/octave, 3 pole filter + + + + Slide Decay + Slide-Abfallzeit + + + Slide Decay: + Slide-Abfallzeit: + + + SLIDE + + + + Fine detuning of the VCO. Ranged between -100 and 100 centes. + Feinverstimmung des VCOs. Bereich zwischen -100 und 100 Cents. + + + VCO Fine Detuning: + VCO Feinverstimmung: + + + DETUNE + + + + Distortion + Verzerrung + + + DIST: + Verzerrung: + + + DIST + + + + Waveform + Wellenform + + + WAVE: + Wellenform: + + + WAVE + WELLE + + + Sawtooth + Sägezahn + + + Inverted Sawtooth + Invertierter Sägezahn + + + Triangle + Dreieck + + + Square + Rechteck + + + Rounded Square + Abgerundetes Reckteck + + + Moog + Moog + + + + lb303Synth + + VCF Cutoff Frequency + VCF-Kennfrequenz + + + Cutoff Freq: + Kennfreq.: + + + VCF Resonance + VCF-Resonanz + + + Resonance: + Resonanz: + + + VCF Envelope Mod + VCF-Hüllkurvenintensität + + + VCF Envelope Decay + VCF-Hüllkurvenabfallzeit + + + Decay: + Abfallzeit (decay): + + + Accent + Betonung + + + Dead + Tot + + + Slide Decay + Slide-Abfallzeit + + + Slide Decay: + Slide-Abfallzeit: + + + Waveform + Wellenform + + + Fine detuning of the VCO. Ranged between -100 and 100 centes. + Feinverstimmung des VCOs. Bereich zwischen -100 und 100 Cents. + + + VCO Fine Detuning: + VCO Feinverstimmung: + + + Distortion + Verzerrung @@ -2037,6 +2407,19 @@ Double clicking any of the plugins will bring up information on the ports.--- Distributions-Dateien --- + + liveTool + + This tool is intended to be used in live performances, though you can use it for music production as well. +The following keys will work only if this window is active. +The spacebar toggles play and pause in the Song Editor. +F1-F10 keys mute the first 10 instruments in the Beat+Baseline Editor. + Dieses Werkzeug ist für die Verwendung in Live-Auftritten gedacht, allerdings können Sie es natürlich auch für die Musikproduktion verwenden. +Die folgenden Tasten funktionieren nur, wenn dieses Fenster im Vordergrund ist. +Leertaste wechselt zwischen Abspielen und Pause im Song-Editor. +F1-F10 schalten die ersten 10 Instrumente im Beat+Bassline-Editor stumm bzw. wieder zurück. + + mainWindow @@ -2133,11 +2516,11 @@ Double clicking any of the plugins will bring up information on the ports. Import file - Datei importieren + Datei importieren E&xport - E&xportieren + E&xportieren &Quit @@ -2235,7 +2618,7 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS. LADSPA Plugins... - LADSPA-Plugins... + LADSPA-Plugins... MultiMedia Project (*.mmp *.mmpz *.xml) @@ -2245,6 +2628,26 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.MultiMedia Project (*.mmp *.mmpz);;MultiMedia Project Template (*.mpt) MultiMedia Projekt (*.mmp *.mmpz);;MultiMedia Projekt-Vorlage (*.mpt) + + &Tools + &Werkzeuge + + + Online help + Online-Hilfe + + + Recently opened projects + Zuletzt geöffnete Projekte + + + Import... + Importieren... + + + E&xport... + E&xportieren... + mallets @@ -2440,6 +2843,14 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.Tibetan Bowl Tibetanische Schüssel + + Missing files + Fehlende Dateien + + + Your Stk-installation seems to be incomplete. Please make sure the full Stk-package is installed! + Ihre Stk-Installation scheint unvollständig zu sein. Bitte stellen Sie sicher, dass das volle Stk-Paket installiert ist! + meterDialog @@ -2601,6 +3012,53 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.Würfeln + + patmanSynth + + Open other patch + Andere Patch-Datei öffnen + + + Click here to open another patch-file. Loop and Tune settings are not reset. + Klicken Sie hier, um eine andere Patch-Datei zu laden. Wiederholungs- und Stimmungseinstellungen werden nicht zurückgesetzt. + + + Loop + Wiederholen + + + Loop mode + Modus beim Wiederholen + + + Here you can toggle the Loop mode. If enabled, PatMan will use the loop information available in the file. + Hier können Sie den Wiederholen-Modus (de-)aktivieren. Wenn aktiviert, verwendet PatMan die in der Datei verfügbaren Informationen zum Wiederholen. + + + Tune + Stimmung + + + Tune mode + Stimmungsmodus + + + Here you can toggle the Tune mode. If enabled, PatMan will tune the sample to match the note's frequency. + Hier können Sie den Stimmungs-Modus (de-)aktivieren. Wenn aktiviert, wird der Klang automatisch an die Frequenz der Note angepasst. + + + No file selected + Keine Datei ausgewählt + + + Open patch file + Patch-Datei öffnen + + + Patch-Files (*.pat) + Patch-Dateien (*.pat) + + pattern @@ -2671,11 +3129,11 @@ Lautstärke eines Steps kann mit Mausrad geändert werden Pattern muted - Pattern stummgeschaltet + Pattern stummgeschaltet The track this pattern belongs to or the pattern itself is currently muted therefore freezing makes no sense! Do you still want to continue? - Die Spur, zu der dieser Pattern gehört oder dieser Pattern selbst sind derzeit stummgeschaltet, weshalb das Einfrieren keinen Sinn ergibt. Wollen Sie trotzdem fortfahren? + Die Spur, zu der dieser Pattern gehört oder dieser Pattern selbst sind derzeit stummgeschaltet, weshalb das Einfrieren keinen Sinn ergibt. Wollen Sie trotzdem fortfahren? @@ -2890,7 +3348,7 @@ Lautstärke eines Steps kann mit Mausrad geändert werden Rough & Dirty Wavetable Synthesizer. - + Einfacher & roher Wavetable-Synthesizer. You can drag an instrument-plugin into either the Song-Editor, the Beat+Baseline Editor or just into a channel-window or on the corresponding channel-button. @@ -2928,6 +3386,26 @@ Lautstärke eines Steps kann mit Mausrad geändert werden plugin for using arbitrary VST-effects inside LMMS. Plugin um beliebige VST-Effekte in LMMS nutzen zu können. + + Incomplete monophonic immitation tb303 + Unvollständiger monophonischer TB303-Klon + + + versatile kick- & bassdrum-synthesizer + Vielfältiger Kick- & Bassdrum-Synthesizer + + + GUS-compatible patch instrument + GUS-kompatibles Patch-Instrument + + + Singer bot to add some basic vocals + Künstlicher Sänger für ein paar einfache Vokale + + + Tool for live performance + Werkzeug für Live-Auftritte + projectNotes @@ -3104,7 +3582,7 @@ Lautstärke eines Steps kann mit Mausrad geändert werden Controls - Eigensch. + Regler Effect plugins function as a chained series of effects where the signal will be processed from top to bottom. @@ -3199,12 +3677,20 @@ Wenn es mit anderer VST-software unter Linux funktioniert, kontaktieren Sie bitt All Audio-Files (*.wav *.ogg *.flac *.voc *.aif *.aiff *.au *.raw) - Alle Audio-Dateien (*.wav *.ogg *.flac *.voc *.aif *.aiff *.au *.raw) + Alle Audio-Dateien (*.wav *.ogg *.flac *.voc *.aif *.aiff *.au *.raw) FLAC-Files (*.flac) FLAC-Dateien (*.flac) + + All Audio-Files (*.wav *.ogg *.flac *.spx *.voc *.aif *.aiff *.au *.raw) + Alle Audio-Dateien (*.wav *.ogg *.flac *.spx *.voc *.aif *.aiff *.au *.raw) + + + SPEEX-Files (*.spx) + SPEEX-Dateien (*.spx) + sampleTCO @@ -3410,7 +3896,7 @@ Latenz: %2 ms SMP-level - SMP-Level + SMP-Level If you have a machine with more then one processor (e.g. dual-core systems) you should use a parallelizing-level above 1 which means that LMMS will try to split up sound-processing into several threads which should should be run on several cores by the underlaying operating-system. @@ -4377,15 +4863,15 @@ Die LED rechts unterhalb der Wellenform gibt an, ob die Saite aktiviert ist.vstSubPluginDescriptionWidget Description - Beschreibung + Beschreibung Name: - Name: + Name: File: - Datei: + Datei: diff --git a/data/projects/misc/mystic.mmp b/data/projects/misc/mystic.mmp index 9f7069629..64073eba8 100644 --- a/data/projects/misc/mystic.mmp +++ b/data/projects/misc/mystic.mmp @@ -1,129 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + +

Some mystic gis-minor sounds...

]]>
-
-
+ + + diff --git a/include/config_mgr.h b/include/config_mgr.h index ec6346bf1..fa57c9123 100644 --- a/include/config_mgr.h +++ b/include/config_mgr.h @@ -169,6 +169,13 @@ public: } #endif + inline const QStringList & recentlyOpenedProjects( void ) const + { + return( m_recentlyOpenedProjects ); + } + + void addRecentlyOpenedProject( const QString & _file ); + const QString & value( const QString & _class, const QString & _attribute ) const; void setValue( const QString & _class, const QString & _attribute, @@ -227,6 +234,8 @@ private: #ifdef HAVE_STK_H QString m_stkDir; #endif + QStringList m_recentlyOpenedProjects; + typedef vvector > stringPairVector; typedef QMap settingsMap; @@ -257,6 +266,9 @@ private: QHBoxLayout * m_mainLayout; QVBoxLayout * m_contentLayout; + + friend class engine; + } ; #endif diff --git a/include/main_window.h b/include/main_window.h index 6f883e82d..dad08d7d6 100644 --- a/include/main_window.h +++ b/include/main_window.h @@ -110,14 +110,15 @@ public slots: } void createNewProject( void ); void createNewProjectFromTemplate( QAction * _idx ); - void createNewProjectFromTemplate( int _idx ); + void createNewProjectFromTemplate( int _id ); void openProject( void ); + void updateRecentlyOpenedProjectsMenu( void ); + void openRecentlyOpenedProject( int ); bool saveProject( void ); bool saveProjectAs( void ); void showSettingsDialog( void ); void aboutLMMS( void ); void help( void ); -// void ladspaPluginBrowser( void ); void toggleAutomationEditorWin( void ); void toggleBBEditorWin( void ); void toggleSongEditorWin( void ); @@ -151,6 +152,7 @@ private: QGridLayout * m_toolBarLayout; QMenu * m_templatesMenu; + QMenu * m_recentlyOpenedProjectsMenu; int m_custom_templates_count; struct keyModifiers diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 815e5b710..6a851ee47 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -26,8 +26,6 @@ SUBDIRS = \ midi_import \ organic \ patman \ - plucked_string_synth \ - polyb302 \ $(SINGERBOT_DIR) \ $(STK_DIR) \ triple_oscillator \ diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 3081b1219..46a58e9ef 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -372,7 +372,15 @@ void patmanSynth::openFile( void ) if( m_patchFile == "" ) { - ofd.setDirectory( configManager::inst()->userSamplesDir() ); + if( QDir( "/usr/share/midi/freepats" ).exists() ) + { + ofd.setDirectory( "/usr/share/midi/freepats" ); + } + else + { + ofd.setDirectory( + configManager::inst()->userSamplesDir() ); + } } else if( QFileInfo( m_patchFile ).isRelative() ) { diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index f2ef32b56..4e40bd58e 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -32,6 +32,8 @@ #else #include +#include +#include #endif @@ -70,24 +72,40 @@ plugin::descriptor malletsstk_plugin_descriptor = } -mallets::mallets( instrumentTrack * _channel_track ) : - instrument( _channel_track, &malletsstk_plugin_descriptor ) +mallets::mallets( instrumentTrack * _instrument_track ) : + instrument( _instrument_track, &malletsstk_plugin_descriptor ), + m_filesMissing( TRUE ) { - m_modalBarWidget = setupModalBarControls( this, _channel_track ); + m_filesMissing = + !QDir( configManager::inst()->stkDir() ).exists() || + !QFileInfo( configManager::inst()->stkDir()+QDir::separator() + + "sinewave.raw" ).exists(); +#if 0 + // for some reason this crashes...??? + if( m_filesMissing ) + { + QMessageBox::information( 0, tr( "Missing files" ), + tr( "Your Stk-installation seems to be " + "incomplete. Please make sure " + "the full Stk-package is installed!" ), + QMessageBox::Ok ); + } +#endif + m_modalBarWidget = setupModalBarControls( this, _instrument_track ); setWidgetBackground( m_modalBarWidget, "artwork" ); - m_tubeBellWidget = setupTubeBellControls( this, _channel_track ); + m_tubeBellWidget = setupTubeBellControls( this, _instrument_track ); setWidgetBackground( m_tubeBellWidget, "artwork" ); m_tubeBellWidget->hide(); - m_bandedWGWidget = setupBandedWGControls( this, _channel_track ); + m_bandedWGWidget = setupBandedWGControls( this, _instrument_track ); setWidgetBackground( m_bandedWGWidget, "artwork" ); m_bandedWGWidget->hide(); - m_presets = setupPresets( this, _channel_track ); + m_presets = setupPresets( this, _instrument_track ); m_spread = new knob( knobBright_26, this, tr( "Spread" ), - _channel_track ); + _instrument_track ); m_spread->setLabel( tr( "Spread" ) ); m_spread->setRange( 0, 255, 1 ); m_spread->setInitValue( 0 ); @@ -390,6 +408,11 @@ QString mallets::nodeName( void ) const void mallets::playNote( notePlayHandle * _n, bool ) { + if( m_filesMissing ) + { + return; + } + int p = m_presets->value(); const float freq = _n->frequency(); diff --git a/plugins/stk/mallets/mallets.h b/plugins/stk/mallets/mallets.h index 2e3de34c8..5a6d41703 100644 --- a/plugins/stk/mallets/mallets.h +++ b/plugins/stk/mallets/mallets.h @@ -172,7 +172,9 @@ private: vvector m_scalers; sampleFrame * m_buffer; -}; + bool m_filesMissing; + +} ; #endif diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 3a0cb6494..635ac0f98 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -480,7 +480,8 @@ void vibed::loadSettings( const QDomElement & _this ) name = "active" + QString::number( i ); m_editors[i]->setOn( _this.attribute( name ).toInt() ); - if( m_editors[i]->isOn() ) + if( m_editors[i]->isOn() && + _this.hasAttribute( "volume" + QString::number( i ) ) ) { name = "volume" + QString::number( i ); m_volumeKnobs[i]->loadSettings( _this, name ); diff --git a/src/audio/audio_jack.cpp b/src/audio/audio_jack.cpp index 1f65dc8b2..a27d0f22d 100644 --- a/src/audio/audio_jack.cpp +++ b/src/audio/audio_jack.cpp @@ -279,8 +279,8 @@ void audioJACK::stopProcessing( void ) void audioJACK::registerPort( audioPort * _port ) { - return; -/* // make sure, port is not already registered +#ifdef AUDIO_PORT_SUPPORT + // make sure, port is not already registered unregisterPort( _port ); const QString name[2] = { _port->name() + " L", _port->name() + " R" } ; @@ -296,7 +296,8 @@ void audioJACK::registerPort( audioPort * _port ) #endif JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 ); - }*/ + } +#endif } @@ -304,8 +305,8 @@ void audioJACK::registerPort( audioPort * _port ) void audioJACK::unregisterPort( audioPort * _port ) { - return; -/* if( m_portMap.contains( _port ) ) +#ifdef AUDIO_PORT_SUPPORT + if( m_portMap.contains( _port ) ) { for( Uint8 ch = 0; ch < DEFAULT_CHANNELS; ++ch ) { @@ -316,7 +317,8 @@ void audioJACK::unregisterPort( audioPort * _port ) } } m_portMap.erase( m_portMap.find( _port ) ); - }*/ + } +#endif } @@ -324,8 +326,8 @@ void audioJACK::unregisterPort( audioPort * _port ) void audioJACK::renamePort( audioPort * _port ) { - return; -/* if( m_portMap.contains( _port ) ) +#ifdef AUDIO_PORT_SUPPORT + if( m_portMap.contains( _port ) ) { const QString name[2] = { _port->name() + " L", _port->name() + " R" }; @@ -340,7 +342,8 @@ void audioJACK::renamePort( audioPort * _port ) #endif ) ; } - }*/ + } +#endif } @@ -368,12 +371,13 @@ int audioJACK::processCallback( jack_nframes_t _nframes, void * _udata ) _this->m_outputPorts[chnl], _nframes ); } -/* const Uint32 frames = tMin( _nframes, - getMixer()->framesPerPeriod() ); +#ifdef AUDIO_PORT_SUPPORT + const Uint32 frames = tMin( _nframes, + _this->getMixer()->framesPerPeriod() ); for( jackPortMap::iterator it = _this->m_portMap.begin(); it != _this->m_portMap.end(); ++it ) { - for( Uint8 ch = 0; ch < DEFAULT_CHANNELS; ++ch ) + for( Uint8 ch = 0; ch < _this->channels(); ++ch ) { if( it.data().ports[ch] == NULL ) { @@ -385,10 +389,11 @@ int audioJACK::processCallback( jack_nframes_t _nframes, void * _udata ) _nframes ); for( Uint32 frame = 0; frame < frames; ++frame ) { - buf[frame] = it.key()->firstBuffer()[ch][frame]; + buf[frame] = it.key()->firstBuffer()[frame][ch]; } } - }*/ + } +#endif jack_nframes_t done = 0; while( done < _nframes && _this->m_stopped == FALSE ) @@ -465,7 +470,7 @@ audioJACK::setupWidget::setupWidget( QWidget * _parent ) : audioDevice::setupWidget( audioJACK::name(), _parent ) { QString cn = configManager::inst()->value( "audiojack", "clientname" ); - if( cn == "" ) + if( cn.isEmpty() ) { cn = "lmms"; } diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index 698cbd0cc..76037bd20 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -729,6 +729,25 @@ void configManager::addPage( QWidget * _w, const QString & _title ) +void configManager::addRecentlyOpenedProject( const QString & _file ) +{ + if( m_recentlyOpenedProjects.size() > 15 ) + { + m_recentlyOpenedProjects.remove( + m_recentlyOpenedProjects.last() ); + } + QStringList::iterator it; + while( ( it = m_recentlyOpenedProjects.find( _file ) ) != + m_recentlyOpenedProjects.end() ) + { + m_recentlyOpenedProjects.remove( it ); + } + m_recentlyOpenedProjects.push_front( _file ); +} + + + + const QString & configManager::value( const QString & _class, const QString & _attribute ) const { @@ -845,6 +864,22 @@ bool configManager::loadConfigFile( void ) } m_settings[node.nodeName()] = attr; } + else if( node.nodeName() == "recentfiles" ) + { + m_recentlyOpenedProjects.clear(); + QDomNode n = node.firstChild(); + while( !n.isNull() ) + { + if( n.isElement() && + n.toElement().hasAttributes() ) + { + m_recentlyOpenedProjects << + n.toElement(). + attribute( "path" ); + } + n = n.nextSibling(); + } + } node = node.nextSibling(); } @@ -965,6 +1000,17 @@ void configManager::saveConfigFile( void ) lmms_config.appendChild( n ); } + QDomElement recent_files = doc.createElement( "recentfiles" ); + + for( QStringList::iterator it = m_recentlyOpenedProjects.begin(); + it != m_recentlyOpenedProjects.end(); ++it ) + { + QDomElement n = doc.createElement( "file" ); + n.setAttribute( "path", *it ); + recent_files.appendChild( n ); + } + lmms_config.appendChild( recent_files ); + #if QT_VERSION >= 0x030100 QString xml = "\n" + doc.toString( 2 ); #else diff --git a/src/core/engine.cpp b/src/core/engine.cpp index fc0bbd997..d5efa4559 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -27,6 +27,7 @@ #include "automation_editor.h" #include "bb_editor.h" +#include "config_mgr.h" #include "project_journal.h" #include "engine.h" #include "main_window.h" @@ -118,6 +119,8 @@ void engine::destroy( void ) delete s_projectJournal; s_projectJournal = NULL; s_mainWindow = NULL; + + delete configManager::inst(); } diff --git a/src/core/main_window.cpp b/src/core/main_window.cpp index 7671ec5c9..961922057 100644 --- a/src/core/main_window.cpp +++ b/src/core/main_window.cpp @@ -81,6 +81,7 @@ #include "tool_button.h" #include "project_journal.h" #include "automation_editor.h" +#include "templates.h" #if QT_VERSION >= 0x030100 @@ -98,6 +99,7 @@ mainWindow::mainWindow( void ) : ), m_workspace( NULL ), m_templatesMenu( NULL ), + m_recentlyOpenedProjectsMenu( NULL ), m_tools_menu( NULL ) { #ifdef QT4 @@ -217,20 +219,7 @@ mainWindow::mainWindow( void ) : mainWindow::~mainWindow() { -/* // first make sure, there're no mixing/audio-device-threads any more - engine::getMixer()->stopProcessing(); - - // destroy editors with all their children - delete engine::getSongEditor(); - delete engine::getBBEditor(); - - - - // destroy mixer - delete engine::getMixer(); - - // destroy config-manager (which automatically saves config-file) -*/ + // destroy engine which will do further cleanups etc. engine::destroy(); } @@ -436,6 +425,10 @@ void mainWindow::finalize( void ) m_toolBarLayout->setColumnStretch( 100, 1 ); + m_recentlyOpenedProjectsMenu = new QMenu( NULL ); + connect( m_recentlyOpenedProjectsMenu, SIGNAL( activated( int ) ), + this, SLOT( openRecentlyOpenedProject( int ) ) ); + updateRecentlyOpenedProjectsMenu(); // project-popup-menu QMenu * project_menu = new QMenu( this ); @@ -454,6 +447,10 @@ void mainWindow::finalize( void ) this, SLOT( openProject() ), Qt::CTRL + Qt::Key_O ); + project_menu->addAction( embed::getIconPixmap( "project_open" ), + tr( "Recently opened projects" ), + m_recentlyOpenedProjectsMenu ); + project_menu->addAction( embed::getIconPixmap( "project_save" ), tr( "&Save" ), this, SLOT( saveProject() ), @@ -469,16 +466,11 @@ void mainWindow::finalize( void ) project_menu->insertSeparator(); #endif project_menu->addAction( /*embed::getIconPixmap( "project_import" ),*/ - tr( "Import file" ), + tr( "Import..." ), engine::getSongEditor(), SLOT( importProject() ) ); -#ifdef QT4 - project_menu->addSeparator(); -#else - project_menu->insertSeparator(); -#endif project_menu->addAction( embed::getIconPixmap( "project_export" ), - tr( "E&xport" ), + tr( "E&xport..." ), engine::getSongEditor(), SLOT( exportProject() ), Qt::CTRL + Qt::Key_E ); @@ -577,19 +569,6 @@ void mainWindow::finalize( void ) tr( "What's this?" ), this, SLOT( enterWhatsThisMode() ) ); -#if 0 -#ifdef LADSPA_SUPPORT -#ifdef QT4 - help_menu->addSeparator(); -#else - help_menu->insertSeparator(); -#endif - help_menu->addAction( embed::getIconPixmap( "help" ), tr( "LADSPA Plugins..." ), - this, SLOT( ladspaPluginBrowser() ) ); -#endif -#endif - - #ifdef QT4 help_menu->addSeparator(); #else @@ -702,7 +681,8 @@ void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de ) void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de ) { - QRect r( _de.attribute( "x" ).toInt(), _de.attribute( "y" ).toInt(), + QRect r( tMax( 0, _de.attribute( "x" ).toInt() ), + tMax( 0, _de.attribute( "y" ).toInt() ), _de.attribute( "width" ).toInt(), _de.attribute( "height" ).toInt() ); if( !r.isNull() && _w->parentWidget() != NULL ) @@ -792,6 +772,9 @@ void mainWindow::openProject( void ) { engine::getSongEditor()->loadProject( ofd.selectedFiles()[0] ); + configManager::inst()->addRecentlyOpenedProject( + ofd.selectedFiles()[0] ); + updateRecentlyOpenedProjectsMenu(); } } } @@ -799,6 +782,30 @@ void mainWindow::openProject( void ) +void mainWindow::updateRecentlyOpenedProjectsMenu( void ) +{ + m_recentlyOpenedProjectsMenu->clear(); + QStringList rup = configManager::inst()->recentlyOpenedProjects(); + for( QStringList::iterator it = rup.begin(); it != rup.end(); ++it ) + { + m_recentlyOpenedProjectsMenu->addAction( *it ); + } +} + + + + +void mainWindow::openRecentlyOpenedProject( int _id ) +{ + const QString & f = m_recentlyOpenedProjectsMenu->text( _id ); + engine::getSongEditor()->loadProject( f ); + configManager::inst()->addRecentlyOpenedProject( f ); + updateRecentlyOpenedProjectsMenu(); +} + + + + bool mainWindow::saveProject( void ) { if( engine::getSongEditor()->projectFileName() == "" ) @@ -858,6 +865,9 @@ bool mainWindow::saveProjectAs( void ) #else engine::getSongEditor()->saveProjectAs( sfd.selectedFile() ); #endif + configManager::inst()->addRecentlyOpenedProject( + sfd.selectedFiles()[0] ); + updateRecentlyOpenedProjectsMenu(); return( TRUE ); } return( FALSE ); @@ -896,19 +906,6 @@ void mainWindow::help( void ) -#if 0 -void mainWindow::ladspaPluginBrowser( void ) -{ - // moc for Qt 3.x doesn't recognize preprocessor directives, - // so we can't just block the whole thing out. -#ifdef LADSPA_SUPPORT - ladspaBrowser lb; - lb.exec(); -#endif -} -#endif - - void mainWindow::toggleBBEditorWin( void ) { @@ -1167,8 +1164,8 @@ void mainWindow::browseHelp( void ) } else if( pid == 0 ) { - QString url = "http://wiki.mindrules.net/doku.php?id=" - + tr( "start", "doku.php id" ); +// TODO: use QDesktopService with Qt4 + QString url = "http://lmms.sf.net/wiki/index.php?title=Main_Page"; execlp( "x-www-browser", "x-www-browser", url. #ifdef QT4 toAscii().constData(), diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp index 69f43ae6a..cf4846ee7 100644 --- a/src/core/mixer.cpp +++ b/src/core/mixer.cpp @@ -288,7 +288,7 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) // clear last audio-buffer clearAudioBuffer( m_writeBuf, m_framesPerPeriod ); -printf("---------------------------next period\n"); +//printf("---------------------------next period\n"); // if( criticalXRuns() == FALSE ) { engine::getSongEditor()->processNextBuffer(); @@ -745,7 +745,7 @@ void mixer::processBuffer( const surroundSampleFrame * _buf, for( ch_cnt_t chnl = 0; chnl < m_audioDev->channels(); ++chnl ) { m_writeBuf[frame][chnl] += _buf[frame][chnl]; - + if( m_scaleClip ) { scaleClip( frame, chnl ); diff --git a/src/lib/journalling_object.cpp b/src/lib/journalling_object.cpp index 931c47a96..3921728cc 100644 --- a/src/lib/journalling_object.cpp +++ b/src/lib/journalling_object.cpp @@ -68,7 +68,6 @@ journallingObject::~journallingObject() void journallingObject::undo( void ) { - printf("undo: %d\n", id() ); if( m_journalEntries.empty() == TRUE ) { return; @@ -85,7 +84,6 @@ void journallingObject::undo( void ) void journallingObject::redo( void ) { - printf("undo: %d\n", id() ); if( m_journalEntries.empty() == TRUE ) { return; diff --git a/src/lib/mmp.cpp b/src/lib/mmp.cpp index 1e6086445..6c6cac23d 100644 --- a/src/lib/mmp.cpp +++ b/src/lib/mmp.cpp @@ -537,7 +537,7 @@ void multimediaProject::upgrade( void ) { el.setAttribute( "chord-enabled", TRUE ); el.setAttribute( "arp-enabled", - el.attribute( "arpdir" ).toInt() != 0 ); + el.attribute( "arpdir" ).toInt() != 0 ); } } @@ -594,6 +594,24 @@ void multimediaProject::upgrade( void ) } } + if( version < "0.3.0" ) + { + QDomNodeList list = elementsByTagName( "pluckedstringsynth" ); + for( int i = 0; !list.item( i ).isNull(); ++i ) + { + QDomElement el = list.item( i ).toElement(); + el.setTagName( "vibedstrings" ); + el.setAttribute( "active0", 1 ); + } + + list = elementsByTagName( "lb303" ); + for( int i = 0; !list.item( i ).isNull(); ++i ) + { + QDomElement el = list.item( i ).toElement(); + el.setTagName( "lb302" ); + } + } + if( !m_head.hasAttribute( "mastervol" ) ) { m_head.setAttribute( "mastervol", 100 ); diff --git a/src/lib/project_journal.cpp b/src/lib/project_journal.cpp index cc4228033..15c085b41 100644 --- a/src/lib/project_journal.cpp +++ b/src/lib/project_journal.cpp @@ -103,7 +103,6 @@ void projectJournal::journalEntryAdded( const jo_id_t _id ) m_journalEntries.push_back( _id ); m_currentJournalEntry = m_journalEntries.end(); engine::getSongEditor()->setModified(); - printf("history size: %d\n", m_journalEntries.size() ); } diff --git a/src/widgets/knob.cpp b/src/widgets/knob.cpp index b74ad45a6..cfb416ede 100644 --- a/src/widgets/knob.cpp +++ b/src/widgets/knob.cpp @@ -411,13 +411,13 @@ void knob::dropEvent( QDropEvent * _de ) QString val = stringPairDrag::decodeValue( _de ); if( type == "float_value" ) { - printf("set val\n"); + //printf("set val\n"); setValue( val.toFloat() ); _de->accept(); } else if( type == "link_object" ) { - printf("link!\n"); + //printf("link!\n"); knob * obj = (knob *)( val.toULong() ); linkObjects( this, obj ); obj->setValue( value() );