added undo/redo-system and other features

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@104 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-03-14 13:30:28 +00:00
parent a6d0f95bb4
commit fe9d017e02
63 changed files with 2402 additions and 2476 deletions

383
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -47,6 +47,7 @@ man1_MANS = lmms.1
lmms_MOC = \
./about_dialog.moc \
./arp_and_chords_tab_widget.moc \
./automatable_button.moc \
./bb_editor.moc \
./bb_track.moc \
./channel_track.moc \
@@ -127,6 +128,7 @@ lmms_SOURCES = \
$(srcdir)/src/core/envelope_tab_widget.cpp \
$(srcdir)/src/core/export_project_dialog.cpp \
$(srcdir)/src/core/file_browser.cpp \
$(srcdir)/src/core/import_filter.cpp \
$(srcdir)/src/core/instrument.cpp \
$(srcdir)/src/core/main_window.cpp \
$(srcdir)/src/core/main.cpp \
@@ -150,6 +152,7 @@ lmms_SOURCES = \
$(srcdir)/src/lib/base64.cpp \
$(srcdir)/src/lib/buffer_allocator.cpp \
$(srcdir)/src/lib/clipboard.cpp \
$(srcdir)/src/lib/edit_history.cpp \
$(srcdir)/src/lib/embed.cpp \
$(srcdir)/src/lib/ladspa_manager.cpp \
$(srcdir)/src/lib/mmp.cpp \
@@ -159,7 +162,6 @@ lmms_SOURCES = \
$(srcdir)/src/midi/midi_alsa_raw.cpp \
$(srcdir)/src/midi/midi_alsa_seq.cpp \
$(srcdir)/src/midi/midi_client.cpp \
$(srcdir)/src/midi/midi_file.cpp \
$(srcdir)/src/midi/midi_mapper.cpp \
$(srcdir)/src/midi/midi_oss.cpp \
$(srcdir)/src/midi/midi_port.cpp \
@@ -167,6 +169,7 @@ lmms_SOURCES = \
$(srcdir)/src/tracks/channel_track.cpp \
$(srcdir)/src/tracks/pattern.cpp \
$(srcdir)/src/tracks/sample_track.cpp \
$(srcdir)/src/widgets/automatable_button.cpp \
$(srcdir)/src/widgets/combobox.cpp \
$(srcdir)/src/widgets/cpuload_widget.cpp \
$(srcdir)/src/widgets/fade_button.cpp \
@@ -253,7 +256,6 @@ lmms_SOURCES = \
$(srcdir)/include/midi_alsa_raw.h \
$(srcdir)/include/midi_client.h \
$(srcdir)/include/midi_event_processor.h \
$(srcdir)/include/midi_file.h \
$(srcdir)/include/midi_oss.h \
$(srcdir)/include/midi_port.h \
$(srcdir)/include/midi_time.h \
@@ -277,6 +279,7 @@ lmms_SOURCES = \
$(srcdir)/include/buffer_allocator.h \
$(srcdir)/include/lcd_spinbox.h \
$(srcdir)/include/tooltip.h \
$(srcdir)/include/automatable_button.h \
$(srcdir)/include/led_checkbox.h \
$(srcdir)/include/text_float.h \
$(srcdir)/include/tempo_sync_knob.h \
@@ -297,6 +300,9 @@ lmms_SOURCES = \
$(srcdir)/include/rubberband.h \
$(srcdir)/include/base64.h \
$(srcdir)/include/automatable_object.h \
$(srcdir)/include/editable_object.h \
$(srcdir)/include/edit_history.h \
$(srcdir)/include/import_filter.h \
$(srcdir)/include/engine.h \
$(srcdir)/include/qxembed.h

2
README
View File

@@ -1,4 +1,4 @@
Linux MultiMedia Studio 0.1.2
Linux MultiMedia Studio 0.1.4
==============================
Copyright (c) 2004-2006 by Tobias Doerffel and others.

12
TODO
View File

@@ -1,16 +1,20 @@
- add edit-history to project for making it possible to undo things even if you did them in a previous session
- make edit-history qobject and undo/redo slots -> direct connection to GUI
- restore stacking-order of windows when loading project
- fix MIDI-import-filter
- bristol-bindings
- resample sample-track-tcos when using hq-mode
- add support for panes-interface (like blender) (instead of MDI etc.)
- message when importing unsupported MIDI-file (track-count = 0)
- volume-knobs for each sample-track
- AMS-bindings
- AMS/OMS-bindings
- remove binary-embed-system
- recording-functionality
- show loading-vst-hint when cloning vestige-track
- do not hang when saving while loading VST-plugin
- tempo-recogn. and sync of beat-samples
- do not quantize when importing from MIDI-file
- KNOB-setValue!!!
- separate GUI and data/sound-processing-code
- fix qtimer-problem /channel-activity-LEDs
- make color-scheme switchable: LMMS / user
- autosave every 30s (configurable!) and offer recovery at startup after crash
- make piano-roll use rubberband instead of implementing a simple one on it's own
@@ -25,7 +29,6 @@
- pre-listen when opening sample with QFileDialog
- panning-editing in piano-roll
- speed up painting of sampleTCO
- save window-positions, -states and -sizes in files
- solve problems with different keyboard-layouts when playing channel-track with pc-keyboard -> use tr()
- panning env+lfo
- plucked-string-synth: knob for metallic -> use noise as wave-shape
@@ -41,7 +44,6 @@
- effect-board -> live-fx from input
- event/automation-system
- chord-editor?
- WAVE/OGG/MP3-Import -> FFT-analysis -> write notes
- FLP-Import

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.1.4-cvs20060308, tobydox/at/users/dot/sourceforge/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060308)
AC_INIT(lmms, 0.1.4-cvs20060313, tobydox/at/users/dot/sourceforge/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060313)
AM_CONFIG_HEADER(config.h)
@@ -465,6 +465,7 @@ AC_CONFIG_FILES([Makefile
plugins/Makefile
plugins/audio_file_processor/Makefile
plugins/bit_invader/Makefile
plugins/midi_import/Makefile
plugins/organic/Makefile
plugins/plucked_string_synth/Makefile
plugins/triple_oscillator/Makefile
@@ -679,7 +680,7 @@ else
with_warnings="true"
else
if test ! -z "$HAVE_VST_AEFFECTX_H" ; then
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* it's own VST-server for hosting VST-plugins"
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* LMMS VST Support Layer (LVSL) for integrated VST-plugin usage"
else
echo " ========================"
echo " === LMMS - WARNING ======================================================="

View File

@@ -32,18 +32,6 @@ If you're interested in translating LMMS in another language or want to imp
<translation>Deutsche Übersetzung von Tobias Doerffel
Wenn Sie an der Übersetzung von LMMS in eine andere Sprache interessiert sind oder existierende Übersetzungen verbessern wollen, sind Sie herzlich willkommen, uns zu helfen! Kontaktieren Sie einfach den Maintainer!</translation>
</message>
<message>
<source>LMMS - A powerful synthesizer-studio
Copyright (c) 2004-2005 LMMS-Developers
http://lmms.sourceforge.net</source>
<translation type="obsolete">LMMS - Ein leistungsfähiges Synthesizer-Studio
Copyright (c) 2004-2005 LMMS-Entwickler
http://lmms.sourceforge.net</translation>
</message>
<message>
<source>Linux MultiMedia Studio %1</source>
@@ -516,22 +504,10 @@ http://lmms.sourceforge.net</translation>
<source>GATE</source>
<translation>GATE</translation>
</message>
<message>
<source>DIRECTION:</source>
<translation type="obsolete">RICHTUNG:</translation>
</message>
<message>
<source>SORT-MODE</source>
<translation type="obsolete">SORT-MODUS</translation>
</message>
<message>
<source>Direction:</source>
<translation>Richtung:</translation>
</message>
<message>
<source>Sort-mode</source>
<translation type="obsolete">Sort-Modus</translation>
</message>
<message>
<source>Mode:</source>
<translation>Modus:</translation>
@@ -669,10 +645,6 @@ http://lmms.sourceforge.net</translation>
<source>Click here, if you want to stop playing of current beat/bassline.</source>
<translation>Klicken Sie hier, wenn Sie das Abspielen des aktuellen Beats/Bassline stoppen wollen.</translation>
</message>
<message>
<source>Beat+Bassline Editor</source>
<translation type="obsolete">Beat+Bassline Editor</translation>
</message>
<message>
<source>Beat+Baseline Editor</source>
<translation>Beat+Baseline Editor</translation>
@@ -692,10 +664,6 @@ http://lmms.sourceforge.net</translation>
<source>Change color</source>
<translation>Farbe ändern</translation>
</message>
<message>
<source>Open in Beat+Bassline-Editor</source>
<translation type="obsolete">Im Beat+Bassline-Editor öffnen</translation>
</message>
<message>
<source>Open in Beat+Baseline-Editor</source>
<translation>Im Beat+Baseline-Editor öffnen</translation>
@@ -704,9 +672,6 @@ http://lmms.sourceforge.net</translation>
<context>
<name>bbTrack</name>
<message>
<source>Beat/Bassline %1</source>
<translation type="obsolete">Beat/Bassline %1</translation>
</message>
<message>
<source>Beat/Baseline %1</source>
<translation>Beat/Baseline %1</translation>
@@ -913,10 +878,6 @@ Kopierte Dateien können Sie ändern, aber gleichzeitig belegen diese auch zusä
<source>Copy or link files</source>
<translation>Dateien kopieren oder verknüpfen</translation>
</message>
<message>
<source>Choose LMMS-working-directory</source>
<translation type="obsolete">LMMS-Arbeitsverzeichnis wählen</translation>
</message>
<message>
<source>Directory not existing</source>
<translation>Verzeichnis existiert nicht</translation>
@@ -1424,191 +1385,6 @@ Stellen Sie sicher, dass Sie Schreibzugriff auf die gewählte Datei/Gerät haben
<translation>Bitte warten, Sample wird für Vorschau geladen....</translation>
</message>
</context>
<context>
<name>lmmsMainWin</name>
<message>
<source>Setting up main-window and workspace...</source>
<translation type="obsolete">Initialisiere Hauptfenster und Arbeitsbereich...</translation>
</message>
<message>
<source>Creating new song...</source>
<translation type="obsolete">Erstelle neuen Song...</translation>
</message>
<message>
<source>Creating GUI...</source>
<translation type="obsolete">Erstelle Oberfläche...</translation>
</message>
<message>
<source>&amp;New</source>
<translation type="obsolete">&amp;Neu</translation>
</message>
<message>
<source>&amp;Open...</source>
<translation type="obsolete">Ö&amp;ffnen...</translation>
</message>
<message>
<source>&amp;Save</source>
<translation type="obsolete">&amp;Speichern</translation>
</message>
<message>
<source>Save &amp;As...</source>
<translation type="obsolete">Speichern &amp;als...</translation>
</message>
<message>
<source>E&amp;xport</source>
<translation type="obsolete">E&amp;xportieren</translation>
</message>
<message>
<source>&amp;Quit</source>
<translation type="obsolete">&amp;Beenden</translation>
</message>
<message>
<source>Help</source>
<translation type="obsolete">Hilfe</translation>
</message>
<message>
<source>About</source>
<translation type="obsolete">Über</translation>
</message>
<message>
<source>&amp;Help</source>
<translation type="obsolete">&amp;Hilfe</translation>
</message>
<message>
<source>What&apos;s this?</source>
<translation type="obsolete">Was ist das?</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Bassline Editor. The Beat+Bassline Editor is needed for setting beats, opening, adding and removing channels, cutting, copying and pasting beat- and bassline-patterns and other things like that.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes wird der Beat+Bassline Editor ein- oder ausgeblendet. Der Beat+Bassline Editor ist nötig, um Beats zu setzen, um Kanale zu öffnen, hinzuzufügen und zu entfernen, um Bassline-Patterns auszuschneiden, zu kopieren und einzufügen usw.</translation>
</message>
<message>
<source>My samples</source>
<translation type="obsolete">Meine Samples</translation>
</message>
<message>
<source>My presets</source>
<translation type="obsolete">Meine Presets</translation>
</message>
<message>
<source>My projects</source>
<translation type="obsolete">Meine Projekte</translation>
</message>
<message>
<source>Loading song...</source>
<translation type="obsolete">Lade Song...</translation>
</message>
<message>
<source>&amp;Settings</source>
<translation type="obsolete">Ein&amp;stellungen</translation>
</message>
<message>
<source>Show setup wizard</source>
<translation type="obsolete">Einrichtungsassistent zeigen</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the project notes window. In this window you can put down your project notes.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes können Sie das Projektnotizen-Fenster ein- oder ausblenden. In diesem Fenster können Sie Ihre Projektnotizen aufschreiben.</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the EffectBoard. The EffectBoard is a very powerful tool for managing effects for your song. You can insert effects into different effect-channels.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes wird das EffectBoard ein- oder ausgeblendet. Das EffectBoard ist ein äußerst leistungsfähiges Werkzeug, um Effekte für Ihren Song zu verwalten. Sie können Effekte in unterschiedliche Effekt-Kanäle einfügen.</translation>
</message>
<message>
<source>LMMS %1</source>
<translation type="obsolete">LMMS %1</translation>
</message>
<message>
<source>Create new project</source>
<translation type="obsolete">Neues Projekt erstellen</translation>
</message>
<message>
<source>Open existing project</source>
<translation type="obsolete">Existierendes Projekt öffnen</translation>
</message>
<message>
<source>Save current project</source>
<translation type="obsolete">Aktuelles Projekt speichern</translation>
</message>
<message>
<source>Export current project</source>
<translation type="obsolete">Aktuelles Projekt exportieren</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Piano-Roll. With the help of the Piano-Roll you can edit melody-patterns in an easy way.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes können Sie das Piano-Roll ein- oder ausblenden. Mit Hilfe des Piano-Rolls können Sie Melodie-Patterns auf eine bequeme Art bearbeiten.</translation>
</message>
<message>
<source>&amp;Project</source>
<translation type="obsolete">&amp;Projekt</translation>
</message>
<message>
<source>Open project</source>
<translation type="obsolete">Projekt öffnen</translation>
</message>
<message>
<source>Save project</source>
<translation type="obsolete">Projekt speichern</translation>
</message>
<message>
<source>Import file</source>
<translation type="obsolete">Datei importieren</translation>
</message>
<message>
<source>My home</source>
<translation type="obsolete">Persönlicher Ordner</translation>
</message>
<message>
<source>Root directory</source>
<translation type="obsolete">Wurzelverzeichnis</translation>
</message>
<message>
<source>Show settings dialog</source>
<translation type="obsolete">Einstellungsdialog anzeigen</translation>
</message>
<message>
<source>Help not available</source>
<translation type="obsolete">Hilfe nicht verfügbar</translation>
</message>
<message>
<source>Show/hide Beat+Bassline Editor</source>
<translation type="obsolete">Zeige/verstecke Beat+Bassline Editor</translation>
</message>
<message>
<source>Show/hide Piano-Roll</source>
<translation type="obsolete">Zeige/verstecke Piano-Roll</translation>
</message>
<message>
<source>Show/hide Song-Editor</source>
<translation type="obsolete">Zeige/verstecke Song-Editor</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Song-Editor. With the help of the Song-Editor you can edit song-playlist and specify when which track should be played. You can also insert and move samples (e.g. rap-samples) directly into the playlist.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes können Sie den Song-Editor ein- oder ausblenden. Mit Hilfe des Song-Editors können Sie den Song bearbeiten und einstellen, wann welche Spur gespielt werden soll. Sie können auch Samples (z.B. Rap-Samples) direkt in die Playliste einfügen und verschieben.</translation>
</message>
<message>
<source>Show/hide EffectBoard</source>
<translation type="obsolete">Zeige/verstecke EffectBoard</translation>
</message>
<message>
<source>Show/hide project notes</source>
<translation type="obsolete">Zeige/verstecke Projekt-Notizen</translation>
</message>
<message>
<source>MultiMedia Project (*.mmp *.xml)</source>
<translation type="obsolete">MultiMedia-Projekt (*.mmp *.xml)</translation>
</message>
<message>
<source>MultiMedia Project (*.mmp);;MultiMedia Project Template (*.mpt)</source>
<translation type="obsolete">MultiMedia-Projekt (*.mmp);;MultiMedia-Projekt-Vorlage (*.mpt)</translation>
</message>
<message>
<source>Currently there&apos;s no help available in LMMS.
Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<translation type="obsolete">Derzeit ist in LMMS keine Hilfe verfügbar.
Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.</translation>
</message>
</context>
<context>
<name>mainWindow</name>
<message>
@@ -1659,14 +1435,6 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.</t
<source>Export current project</source>
<translation>Aktuelles Projekt exportieren</translation>
</message>
<message>
<source>Show/hide Beat+Bassline Editor</source>
<translation type="obsolete">Zeige/verstecke Beat+Bassline Editor</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Bassline Editor. The Beat+Bassline Editor is needed for setting beats, opening, adding and removing channels, cutting, copying and pasting beat- and bassline-patterns and other things like that.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes wird der Beat+Bassline Editor ein- oder ausgeblendet. Der Beat+Bassline Editor ist nötig, um Beats zu setzen, um Kanale zu öffnen, hinzuzufügen und zu entfernen, um Bassline-Patterns auszuschneiden, zu kopieren und einzufügen usw.</translation>
</message>
<message>
<source>Show/hide Piano-Roll</source>
<translation>Zeige/verstecke Piano-Roll</translation>
@@ -1789,10 +1557,6 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.</t
<source>Show/hide Beat+Baseline Editor</source>
<translation>Zeige/verstecke Beat+Baseline Editor</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Baseline Editor. The Beat+Baesline Editor is needed for setting beats, opening, adding and removing channels, cutting, copying and pasting beat- and baseline-patterns and other things like that.</source>
<translation type="obsolete">Durch das Drücken dieses Knopfes wird der Beat+Baseline Editor ein- oder ausgeblendet. Der Beat+Bassline Editor ist nötig, um Beats zu setzen, um Kanale zu öffnen, hinzuzufügen und zu entfernen, um Bassline-Patterns auszuschneiden, zu kopieren und einzufügen usw.</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Baseline Editor. The Beat+Baseline Editor is needed for creating beats, opening, adding and removing channels, cutting, copying and pasting beat- and baseline-patterns and other things like that.</source>
<translation>Durch das Drücken dieses Knopfes wird der Beat+Baseline Editor ein- oder ausgeblendet. Der Beat+Baseline Editor ist nötig, um Beats zu erstellen, Kanale zu öffnen, hinzuzufügen und zu entfernen sowie um Baseline-Patterns auszuschneiden, zu kopieren und einzufügen usw.</translation>
@@ -1822,14 +1586,6 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.</t
<source>CHANNEL</source>
<translation>KANAL</translation>
</message>
<message>
<source>RECEIVE MIDI-EVENTS</source>
<translation type="obsolete">MIDI-EREIGNISSE EMPFANGEN</translation>
</message>
<message>
<source>SEND MIDI-EVENTS</source>
<translation type="obsolete">MIDI-EREIGNISSE SENDEN</translation>
</message>
<message>
<source>MIDI-devices to receive MIDI-events from</source>
<translation>MIDI-Geräte, von denen MIDI-Events empfangen werden sollen</translation>
@@ -1950,10 +1706,6 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.</t
<source>The pattern currently cannot be freezed because you&apos;re in play-mode. Please stop and try again!</source>
<translation>Der Pattern kann derzeit nicht eingefroren werden, da Sie sich im Abspiel-Modus befinden. Bitte stoppen Sie und versuchen es erneut!</translation>
</message>
<message>
<source>double-click to open this pattern in piano-roll</source>
<translation type="obsolete">Doppelklick, um diesen Pattern im Piano-Roll zu öffnen</translation>
</message>
<message>
<source>Open in piano-roll</source>
<translation>Im Piano-Roll öffnen</translation>
@@ -2140,10 +1892,6 @@ Lautstärke eines Steps kann mit Mausrad geändert werden</translation>
<source>Plugin browser</source>
<translation>Plugin-Browser</translation>
</message>
<message>
<source>You can drag an instrument-plugin into either the Song-Editor, the Beat+Bassline Editor or just into a channel-window or on the corresponding channel-button.</source>
<translation type="obsolete">Sie können ein Instrument-Plugin entweder in den Song-Editor, den Beat+Bassline-Editor oder einfach in ein Kanal-Fenster oder auf den zugehörigen Kanal-Button ziehen.</translation>
</message>
<message>
<source>cheap synthesis of guitar/harp-like sounds</source>
<translation>Einfache Synthese gitarren-/harfenähnlicher Klänge</translation>
@@ -2152,10 +1900,6 @@ Lautstärke eines Steps kann mit Mausrad geändert werden</translation>
<source>three powerful oscillators you can modulate in several ways</source>
<translation>Drei leistungsfähige Oszillatoren, die Sie auf verschiedene Art und Weise modulieren können</translation>
</message>
<message>
<source>experimental VST-hoster for using VST-plugins within LMMS</source>
<translation type="obsolete">Experimenteller VST-Hoster zum Benutzen von VST-Plugins innerhalb von LMMS</translation>
</message>
<message>
<source>simple sampler with various settings for using samples (e.g. drums) in a channel</source>
<translation>Einfacher Sampler mit verschiedenen Einstellungen zum Benutzen von Samples (z.B. Drums) in einem Kanal</translation>
@@ -2309,10 +2053,6 @@ Lautstärke eines Steps kann mit Mausrad geändert werden</translation>
</context>
<context>
<name>sampleBuffer</name>
<message>
<source>All Audio-Files (*.wav *.ogg *.voc *.aif *.aiff *.au *.raw)</source>
<translation type="obsolete">Alle Audio-Dateien (*.wav *.ogg *.voc *.aif *.aiff *.au *.raw)</translation>
</message>
<message>
<source>Wave-Files (*.wav)</source>
<translation>Wave-Dateien (*.wav)</translation>
@@ -2414,12 +2154,6 @@ Lautstärke eines Steps kann mit Mausrad geändert werden</translation>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
<message>
<source>FRAMES: %1
LATENCY: %2 ms</source>
<translation type="obsolete">FRAMES: %1
LATENZ: %2 ms</translation>
</message>
<message>
<source>Here you can setup the internal buffer-size used by LMMS. Smaller values result in a lower latency but also may cause unusable sound or bad performance, especially on older computers or systems with a non-realtime kernel.</source>
<translation>Hier können Sie die interne Puffergröße einstellen, die von LMMS genutzt wird. Kleinere Werte machen sich in einer geringeren Latenz bemerkbar, können aber auch zu unbrauchbarem Sound oder schlechter Performance führen, vor allem auf älteren Computern oder Systemen mit einem Nicht-Echtzeit-Kernel.</translation>
@@ -2517,10 +2251,6 @@ Latenz: %2 ms</translation>
<source>Dummy (no sound output)</source>
<translation>Dummy (keine Sound-Ausgabe)</translation>
</message>
<message>
<source>JACK (Jack Audio Connection Kit)</source>
<translation type="obsolete">JACK (Jack Audio Connection Kit)</translation>
</message>
<message>
<source>OSS (Open Sound System)</source>
<translation>OSS (Open Sound System)</translation>
@@ -2590,7 +2320,7 @@ Latenz: %2 ms</translation>
</message>
<message>
<source>Click here, if you want to play your whole song. Playing will be started at the song-position-marker (green). You can also move it while playing.</source>
<translation>Klicken Sie hier, wenn Sie Ihren ganzen Song abspielen wollen. Das Abspielen wird am Song-Positions-Marker (grün) gestartet. Sie können diesen auch während des Bewegens verschieben.</translation>
<translation>Klicken Sie hier, wenn Sie Ihren ganzen Song abspielen wollen. Das Abspielen wird am Song-Positions-Marker (grün) gestartet. Sie können diesen auch während des Abspielens verschieben.</translation>
</message>
<message>
<source>Play song (Space)</source>
@@ -2664,22 +2394,6 @@ Bitte stellen Sie sicher, dass Sie wenigstens Leserechte auf die Datei besitzen
<source>High quality mode</source>
<translation>High-Quality-Modus</translation>
</message>
<message>
<source>Insert bar (Shift+Insert)</source>
<translation type="obsolete">Spalte einfügen (Umschalt+Einfügen)</translation>
</message>
<message>
<source>Remove bar (Shift+Delete)</source>
<translation type="obsolete">Spalte löschen (Umschalt+Entfernen)</translation>
</message>
<message>
<source>If you click here, a bar will be inserted at the current bar.</source>
<translation type="obsolete">Wenn Sie hier klicken, wird eine Spalte an der aktuellen Spalte eingefügt.</translation>
</message>
<message>
<source>If you click here, the current bar will be removed.</source>
<translation type="obsolete">Wenn Sie hier klicken, wird die aktuelle Spalte gelöscht.</translation>
</message>
<message>
<source>Project saved</source>
<translation>Projekt gespeichert</translation>
@@ -2688,10 +2402,6 @@ Bitte stellen Sie sicher, dass Sie wenigstens Leserechte auf die Datei besitzen
<source>The project %1 is now saved.</source>
<translation>Das Projekt %1 ist nun gespeichert.</translation>
</message>
<message>
<source>The project %1 could not be saved!</source>
<translation type="obsolete">Das Projekt %1 konnte nicht gespeichert werden!</translation>
</message>
<message>
<source>Could not write file %1. You probably are not permitted to write to this file.
Please make sure you have write-access to the file and try again.</source>
@@ -2718,10 +2428,6 @@ Bitte stellen Sie sicher, dass Sie Schreibrechte auf diese Datei besitzen und ve
<source>Master pitch</source>
<translation>Master-Tonhöhe</translation>
</message>
<message>
<source>The project %1 is not saved!</source>
<translation type="obsolete">Das Projekt %1 ist nicht gespeichert!</translation>
</message>
<message>
<source>The project %1 was not saved!</source>
<translation>Das Projekt %1 wurde nicht gespeichert!</translation>
@@ -2947,10 +2653,6 @@ Bitte stellen Sie sicher, dass Sie Schreibrechte auf diese Datei und das Verzeic
</context>
<context>
<name>trackOperationsWidget</name>
<message>
<source>Press &lt;Ctrl&gt; while clicking on move-grip to begin a new drag&apos;n&apos;drop-action</source>
<translation type="obsolete">Drücken Sie &lt;Strg&gt; während des Klicks auf den Verschiebe-Griff, um eine neue Drag&apos;n&apos;Drop-Aktion zu beginnen</translation>
</message>
<message>
<source>Clone this track</source>
<translation>Diese Spur klonen</translation>
@@ -2959,10 +2661,6 @@ Bitte stellen Sie sicher, dass Sie Schreibrechte auf diese Datei und das Verzeic
<source>Remove this track</source>
<translation>Diese Spur entfernen</translation>
</message>
<message>
<source>Operations for this track</source>
<translation type="obsolete">Aktionen für diese Spur</translation>
</message>
<message>
<source>With this switch you can either mute this track or mute all other tracks.
By clicking left, this track is muted. This is useful, if you only want to listen to the other tracks without changing this track and loosing information.
@@ -2986,39 +2684,6 @@ Klick rechts = alle anderen Spuren stummschalten (Solo)</translation>
<translation>Aktionen für dise Spur</translation>
</message>
</context>
<context>
<name>trackWidget</name>
<message>
<source>Clone this track</source>
<translation type="obsolete">Diese Spur klonen</translation>
</message>
<message>
<source>Move this track up</source>
<translation type="obsolete">Diese Spur nach oben verschieben</translation>
</message>
<message>
<source>Move this track down</source>
<translation type="obsolete">Diese Spur nach unten verschieben</translation>
</message>
<message>
<source>With this switch you can either mute this track or mute all other tracks.
By clicking left, this track is muted. This is useful, if you only want to listen to the other tracks without changing this track and loosing information.
When you click right on this switch, all other tracks will be muted. This is useful, if you only want to listen to this track.</source>
<translation type="obsolete">Mit diesem Schalter können SIe entweder diese Spur stummschalten oder alle andern Spuren stummschalten.
Wenn Sie links klicken, wird diese Spur stummgeschaltet. Das ist nützlich, wenn Sie nur die anderen Spuren hören wollen, ohne diese Spur zu ändern und Informationen zu verlieren.
Wenn Sie rechts klicken, werden alle anderen Spuren stumm geschaltet. Das ist nützlich, wenn Sie nur diese Spur hören wollen.</translation>
</message>
<message>
<source>left click = mute this track
right click = mute all other tracks (solo)</source>
<translation type="obsolete">Klick links = diese Spur stummschalten
Klick rechts = alle anderen Spuren stummschalten (Solo)</translation>
</message>
<message>
<source>Remove this track</source>
<translation type="obsolete">Diese Spur entfernen</translation>
</message>
</context>
<context>
<name>tripleOscillator</name>
<message>

View File

@@ -44,19 +44,6 @@ If you&apos;re interested in translating LMMS in another language or want to imp
<message>
<source>LMMS - A powerful synthesizer-studio
Copyright (c) 2004-2005 LMMS-Developers
http://lmms.sourceforge.net</source>
<translation type="obsolete">LMMS - программа-синтезатор для компьютера
Права на программу LMMS (c) 2004-2005 принадлежат её разработчикам
Наша страница в интернете:
http://lmms.sourceforge.net</translation>
</message>
<message>
<source>LMMS - A powerful synthesizer-studio
Copyright (c) 2004-2006 LMMS-Developers
http://lmms.sourceforge.net</source>
@@ -338,10 +325,6 @@ http://lmms.sourceforge.net</translation>
<source>m-Maj13</source>
<translation></translation>
</message>
<message>
<source>Chords</source>
<translation type="obsolete">Аккорды</translation>
</message>
<message>
<source>Chord range:</source>
<translation>Диапазон аккорда:</translation>
@@ -354,14 +337,6 @@ http://lmms.sourceforge.net</translation>
<source>Use this knob for setting the chord range in octaves. The selected chord will be played within specified amount of octaves.</source>
<translation>Этот регулятор изменяет частотный диапазон акорда: аккорд будет содержать указанное число октав.</translation>
</message>
<message>
<source>Range</source>
<translation type="obsolete">Диапазон</translation>
</message>
<message>
<source>Arpeggio</source>
<translation type="obsolete">Арпеджио</translation>
</message>
<message>
<source>An arpeggio is a type of playing (especially plucked) instruments, which makes the music much livelier. The strings of such instruments (e.g. harps) are plucked like chords, the only difference is, that this is done in a sequential order, so the notes are not played at the same time. Typical arpeggios are major or minor triads. But there&apos;re a lot of other possible chords, you can select.</source>
<translation>Из БСЭ: АРПЕДЖИО, правильнее арпеджо (итал. arpeggio, от arpeggiare - играть на арфе), исполнение звуков аккорда вразбивку, б. ч. начиная с нижнего тона. А. применяют при игре на арфе, а также на фортепиано и др. муз. инструментах.
@@ -400,22 +375,10 @@ http://lmms.sourceforge.net</translation>
<source>Use this knob for setting the arpeggio gate. The arpeggio gate specifies the percent of a whole arpeggio-tone that should be played. With this you can make cool staccato-arpeggios.</source>
<translation>Регулировка заполнения для арпеджио. Коэффициент заполнения показывает, какая часть каждого тона будет проиграна. Простой способ создавать стаккато-орпеджио.</translation>
</message>
<message>
<source>Time</source>
<translation type="obsolete">Период</translation>
</message>
<message>
<source>Gate</source>
<translation type="obsolete">Заполнение</translation>
</message>
<message>
<source>Direction:</source>
<translation>Направление:</translation>
</message>
<message>
<source>arpeggio direction = none = no arpeggio</source>
<translation type="obsolete">Отключить арпеджио</translation>
</message>
<message>
<source>arpeggio direction = up</source>
<translation>Поднимать частоту</translation>
@@ -552,14 +515,6 @@ http://lmms.sourceforge.net</translation>
<source>GATE</source>
<translation>ЗАПОЛНЕНИЕ</translation>
</message>
<message>
<source>DIRECTION:</source>
<translation type="obsolete">НАПРАВЛЕНИЕ:</translation>
</message>
<message>
<source>SORT-MODE</source>
<translation type="obsolete">СОРТИРОВАТЬ</translation>
</message>
<message>
<source>Mode:</source>
<translation>Режим:</translation>
@@ -693,10 +648,6 @@ http://lmms.sourceforge.net</translation>
<source>Click here, if you want to stop playing of current beat/bassline.</source>
<translation>Нажмите чтобы остановить воспроизведение.</translation>
</message>
<message>
<source>Beat+Bassline Editor</source>
<translation type="obsolete">Редактор ритма/басов</translation>
</message>
<message>
<source>Beat+Baseline Editor</source>
<translation>Редактор ритма/лейтмотива</translation>
@@ -716,10 +667,6 @@ http://lmms.sourceforge.net</translation>
<source>Change color</source>
<translation>Изменить цвет</translation>
</message>
<message>
<source>Open in Beat+Bassline-Editor</source>
<translation type="obsolete">Открыть в редакторе ритма/басов</translation>
</message>
<message>
<source>Open in Beat+Baseline-Editor</source>
<translation>Открыть в редакторе ритма/лейтмотива</translation>
@@ -727,10 +674,6 @@ http://lmms.sourceforge.net</translation>
</context>
<context>
<name>bbTrack</name>
<message>
<source>Beat/Bassline %1</source>
<translation type="obsolete">Ритм/басы %1</translation>
</message>
<message>
<source>Beat/Baseline %1</source>
<translation>Лейтмотив %1</translation>
@@ -779,33 +722,6 @@ http://lmms.sourceforge.net</translation>
<translation>Здесь вы можете рисовать собственный сигнал</translation>
</message>
</context>
<context>
<name>browser</name>
<message>
<source>Files</source>
<translation type="obsolete">Файлы</translation>
</message>
<message>
<source>Browser</source>
<translation type="obsolete">Просмотрщик</translation>
</message>
<message>
<source>Reload (F5)</source>
<translation type="obsolete">Обновить (F5)</translation>
</message>
<message>
<source>Send to active channel</source>
<translation type="obsolete">В активный канал</translation>
</message>
<message>
<source>Open in new channel/B+B Editor</source>
<translation type="obsolete">В новый канал и открыть в редакторе ритма/басов</translation>
</message>
<message>
<source>Open in new channel/Song-Editor</source>
<translation type="obsolete">В новый канал и открыть в редакторе</translation>
</message>
</context>
<context>
<name>channelTrack</name>
<message>
@@ -899,25 +815,6 @@ http://lmms.sourceforge.net</translation>
<source>Setup LMMS</source>
<translation>Настройка LMMS</translation>
</message>
<message>
<source>LMMS needs to be setup in order to run properly. This wizard will help you to setup your personal LMMS-installation.
If you&apos;re unsure what to do at a step, just click on &apos;Next&apos;. LMMS will automatically select the best options for you.
Now click on &apos;Next&apos; to get to the next page.</source>
<translation type="obsolete">Перед началом работы нужно настроить LMMS. Этот мастер поможет вам создать собственные настройки.
Если вы не знаете точно, что следует делать, просто нажимайте &quot;Дальше&quot;. Как правило, настройки по умолчанию являются лучшим выбором.
А теперь - самое время нажать &quot;Дальше&quot;.</translation>
</message>
<message>
<source>When working with LMMS there needs to be a working-directory.
This directory is used for storing your projects, presets, samples etc.
Please select a directory:</source>
<translation type="obsolete">При работе с LMMS вам потребуется рабочий каталог, где вы сможете хранить проекты, настройки, образцы звуков и т. д.
Выберите каталог:</translation>
</message>
<message>
<source>For using the ready presets and samples of LMMS and enjoying the demo-songs the according files have to be copied or linked into your LMMS-working-directory.
When copying files, you can modify them, but they need additional space in your working-directory. If you link files, you cannot modify them, but they need no extra space. So it&apos;s recommended to copy presets and demo-projects and link samples, which are bigger in size.
@@ -958,10 +855,6 @@ When copying files, you can modify them, but they need additional space in your
<source>Copy or link files</source>
<translation>Копировать файлы или создавать ссылки</translation>
</message>
<message>
<source>Choose LMMS-working-directory</source>
<translation type="obsolete">Выбор рабочего каталога LMMS</translation>
</message>
<message>
<source>Directory not existing</source>
<translation>Каталог не существует</translation>
@@ -980,18 +873,10 @@ The setup-wizard will be shown for reconfiguring LMMS.</source>
<source>The directory you specified does not exist. Create it?</source>
<translation>Указанный каталог не существует. Создать его?</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Отменить</translation>
</message>
<message>
<source>&lt; &amp;Back</source>
<translation>&lt; &amp;Назад</translation>
</message>
<message>
<source>Next &gt;</source>
<translation type="obsolete">Дальше &gt;</translation>
</message>
<message>
<source>&amp;Finish</source>
<translation>&amp;Завершить</translation>
@@ -1221,38 +1106,10 @@ LMMS-working-directory. Run the setup-wizard now?</source>
<source>control envelope-amount by this LFO</source>
<translation>Разрешить этому LFO задавать глубину модуляции обложки</translation>
</message>
<message>
<source>DELAY</source>
<translation type="obsolete">DELAY</translation>
</message>
<message>
<source>ATTACK</source>
<translation type="obsolete">ATTACK</translation>
</message>
<message>
<source>HOLD</source>
<translation>HOLD</translation>
</message>
<message>
<source>DECAY</source>
<translation type="obsolete">DECAY</translation>
</message>
<message>
<source>SUSTAIN</source>
<translation type="obsolete">SUSTAIN</translation>
</message>
<message>
<source>RELEASE</source>
<translation type="obsolete">RELEASE</translation>
</message>
<message>
<source>AMOUNT</source>
<translation type="obsolete">AMOUNT</translation>
</message>
<message>
<source>SPEED</source>
<translation type="obsolete">SPEED</translation>
</message>
<message>
<source>DEL</source>
<translation>ЗДРЖ</translation>
@@ -1308,14 +1165,6 @@ LMMS-working-directory. Run the setup-wizard now?</source>
</context>
<context>
<name>envelopeTabWidget</name>
<message>
<source>Cut</source>
<translation type="obsolete">Срез</translation>
</message>
<message>
<source>Filter</source>
<translation type="obsolete">Фильтр</translation>
</message>
<message>
<source>LowPass</source>
<translation>ФНЧ</translation>
@@ -1479,10 +1328,6 @@ Make sure, you have write access to the selected file/device!</source>
<source>Browser</source>
<translation>Просмотрщик</translation>
</message>
<message>
<source>Files</source>
<translation type="obsolete">Файлы</translation>
</message>
<message>
<source>Reload (F5)</source>
<translation>Обновить (F5)</translation>
@@ -1542,239 +1387,6 @@ Make sure, you have write access to the selected file/device!</source>
<translation>Подождите пожалуйста, образец загружается для прослушивания...</translation>
</message>
</context>
<context>
<name>lmmsMainWin</name>
<message>
<source>Windows</source>
<translation type="obsolete">Окна</translation>
</message>
<message>
<source>Setting up main-window and workspace...</source>
<translation type="obsolete">Создаю рабочее пространство...</translation>
</message>
<message>
<source>Creating new song...</source>
<translation type="obsolete">Создаю композицию...</translation>
</message>
<message>
<source>Creating GUI...</source>
<translation type="obsolete">Создаю GUI...</translation>
</message>
<message>
<source>Show/Hide EffectBoard</source>
<translation type="obsolete">Показать/скрыть панель эффектов</translation>
</message>
<message>
<source>&amp;New</source>
<translation type="obsolete">&amp;Новый</translation>
</message>
<message>
<source>&amp;Open...</source>
<translation type="obsolete">&amp;Открыть...</translation>
</message>
<message>
<source>&amp;Save</source>
<translation type="obsolete">&amp;Сохранить</translation>
</message>
<message>
<source>Save &amp;As...</source>
<translation type="obsolete">Сохранить &amp;как...</translation>
</message>
<message>
<source>E&amp;xport</source>
<translation type="obsolete">&amp;Экспорт</translation>
</message>
<message>
<source>&amp;Quit</source>
<translation type="obsolete">&amp;Выйти</translation>
</message>
<message>
<source>Help</source>
<translation type="obsolete">Справка</translation>
</message>
<message>
<source>About</source>
<translation type="obsolete">О программе</translation>
</message>
<message>
<source>&amp;Help</source>
<translation type="obsolete">&amp;О программе</translation>
</message>
<message>
<source>Show/Hide Piano-Roll</source>
<translation type="obsolete">Показать/скрыть синтезатор</translation>
</message>
<message>
<source>What&apos;s this?</source>
<translation type="obsolete">Что это?</translation>
</message>
<message>
<source>Show/Hide Beat+Bassline Editor</source>
<translation type="obsolete">Показать/скрыть редактор ритма/басов</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Bassline Editor. The Beat+Bassline Editor is needed for setting beats, opening, adding and removing channels, cutting, copying and pasting beat- and bassline-patterns and other things like that.</source>
<translation type="obsolete">По нажатию этой кнопки запускается редактор ритма/басов. Он необходим для установки ритма, добавления и удаления каналов, вырезания, копирования и вставки шаблонов ритма и басов и т. п.</translation>
</message>
<message>
<source>Show/Hide Song-Editor</source>
<translation type="obsolete">Показать/скрыть редактор мелодии</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Song-Editor. With the Song-Editor you can edit the song and set when and which track should be played. You can also insert and move samples (e.g. rap-samples) directly in the playlist.</source>
<translation type="obsolete">По нажатию этой кнопки запускается редактор мелодии. С его помощью вы можеет редактировать композицию, устанавливать время воспроизведения для всех дорожек. Также вы можете вставлять и передвигать образцы непосредственно в списке воспроизведения.</translation>
</message>
<message>
<source>My samples</source>
<translation type="obsolete">Мои образцы</translation>
</message>
<message>
<source>My presets</source>
<translation type="obsolete">Мои предустановки</translation>
</message>
<message>
<source>My projects</source>
<translation type="obsolete">Мои проекты</translation>
</message>
<message>
<source>Loading song...</source>
<translation type="obsolete">Загружаю композицию...</translation>
</message>
<message>
<source>&amp;Settings</source>
<translation type="obsolete">&amp;Настройка</translation>
</message>
<message>
<source>Show setup wizard</source>
<translation type="obsolete">Запустить мастер настройки</translation>
</message>
<message>
<source>MultiMedia Project (*.xml)</source>
<translation type="obsolete">Мультимедийный проект (*.xml)</translation>
</message>
<message>
<source>Show/Hide Project notes</source>
<translation type="obsolete">Показать/скрыть комментарий</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the project notes window. In this window you can put down your project notes.</source>
<translation type="obsolete">Эта кнопка показывает/прячет окно с заметками. В этом окне вы можете помещать любые комментарии к своей композиции.</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the EffectBoard. The EffectBoard is a very powerful tool for managing effects for your song. You can insert effects into different effect-channels.</source>
<translation type="obsolete">Эта кнопка показывает/прячет панель эффектов. Эта панель является мощным инструментом управления эффектами, которые Вы можете вставлять в особый канал (канал эффектов).</translation>
</message>
<message>
<source>Create new project</source>
<translation type="obsolete">Создать новый проект</translation>
</message>
<message>
<source>Ctrl+N</source>
<translation type="obsolete">Ctrl+N</translation>
</message>
<message>
<source>Open existing project</source>
<translation type="obsolete">Открыть существующий проект</translation>
</message>
<message>
<source>Ctrl+O</source>
<translation type="obsolete">Ctrl+O</translation>
</message>
<message>
<source>Save current project</source>
<translation type="obsolete">Сохранить текущий проект</translation>
</message>
<message>
<source>Export current project</source>
<translation type="obsolete">Экспортировать проект в звуковой файл</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Piano-Roll. With the help of the Piano-Roll you can edit melody-patterns in an easy way.</source>
<translation type="obsolete">По нажатию этой кнопки запускается синтезатор LMMS. С его помощью вы можете легко редактировать шблоны мелодии.</translation>
</message>
<message>
<source>&amp;Project</source>
<translation type="obsolete">&amp;Проект</translation>
</message>
<message>
<source>Open project</source>
<translation type="obsolete">Открыть проект</translation>
</message>
<message>
<source>Save project</source>
<translation type="obsolete">Сохранить проект</translation>
</message>
<message>
<source>Song management</source>
<translation type="obsolete">Управление композициями</translation>
</message>
<message>
<source>Import file</source>
<translation type="obsolete">Импорт файла</translation>
</message>
<message>
<source>My home</source>
<translation type="obsolete">Домашний каталог</translation>
</message>
<message>
<source>Root directory</source>
<translation type="obsolete">Корневой каталог</translation>
</message>
<message>
<source>Show settings dialog</source>
<translation type="obsolete">Показать окно настройки</translation>
</message>
<message>
<source>Help not available</source>
<translation type="obsolete">Справка недоступна</translation>
</message>
<message>
<source>Currently there&apos;s no help available in LMMS.
Please visit http://lmms.sourceforge.net and click on &quot;Documentation&quot;.
There hopefully you&apos;ll find the stuff you want to know...</source>
<translation type="obsolete">Пока что справка для LMMS не написана.
Зайдите на сайт http://lmms.sourceforge.net и пройдите по ссылке &quot;Documentation&quot;.
Надеемся, Вы найдёте там нужные материалы...</translation>
</message>
<message>
<source>Show/hide Beat+Bassline Editor</source>
<translation type="obsolete">Показать/скрыть редактор ритма/басов</translation>
</message>
<message>
<source>Show/hide Piano-Roll</source>
<translation type="obsolete">Показать/скрыть синтезатор</translation>
</message>
<message>
<source>Show/hide Song-Editor</source>
<translation type="obsolete">Показать/скрыть редактор мелодии</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Song-Editor. With the help of the Song-Editor you can edit song-playlist and specify when which track should be played. You can also insert and move samples (e.g. rap-samples) directly into the playlist.</source>
<translation type="obsolete">По нажатию этой кнопки запускается редактор мелодии. С его помощью вы можеет редактировать композицию, устанавливать время воспроизведения для всех дорожек. Также вы можете вставлять и передвигать образцы непосредственно в списке воспроизведения.</translation>
</message>
<message>
<source>Show/hide EffectBoard</source>
<translation type="obsolete">Показать/скрыть панель эффектов</translation>
</message>
<message>
<source>Show/hide project notes</source>
<translation type="obsolete">Показать/скрыть заметки к проекту</translation>
</message>
<message>
<source>MultiMedia Project (*.mmp *.xml)</source>
<translation type="obsolete">Мультимедийный проект (*.mmp *.xml)</translation>
</message>
<message>
<source>MultiMedia Project (*.mmp);;MultiMedia Project Template (*.mpt)</source>
<translation type="obsolete">Мультимедийный проект (*.mmp);;Шаблон мультимедийного проекта (*.mpt)</translation>
</message>
<message>
<source>Currently there&apos;s no help available in LMMS.
Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<translation type="obsolete">Пока что справка для LMMS не написана.
Вероятно, Вы сможете найти нужные материалы на http://wiki.mindrules.net.</translation>
</message>
</context>
<context>
<name>mainWindow</name>
<message>
@@ -1825,14 +1437,6 @@ Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<source>Export current project</source>
<translation>Экспортировать проект в звуковой файл</translation>
</message>
<message>
<source>Show/hide Beat+Bassline Editor</source>
<translation type="obsolete">Показать/скрыть редактор ритма/басов</translation>
</message>
<message>
<source>By pressing this button, you can show or hide the Beat+Bassline Editor. The Beat+Bassline Editor is needed for setting beats, opening, adding and removing channels, cutting, copying and pasting beat- and bassline-patterns and other things like that.</source>
<translation type="obsolete">По нажатию этой кнопки запускается редактор ритма/басов. Он необходим для установки ритма, добавления и удаления каналов, вырезания, копирования и вставки шаблонов ритма и басов и т. п.</translation>
</message>
<message>
<source>Show/hide Piano-Roll</source>
<translation>Показать/скрыть синтезатор</translation>
@@ -1974,20 +1578,6 @@ Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<translation>УСТРОЙСТВО</translation>
</message>
</context>
<context>
<name>midiDevice</name>
<message>
<source>DEVICE</source>
<translation type="obsolete">УСТРОЙСТВО</translation>
</message>
</context>
<context>
<name>midiRawClient</name>
<message>
<source>DEVICE</source>
<translation type="obsolete">УСТРОЙСТВО</translation>
</message>
</context>
<context>
<name>midiTabWidget</name>
<message>
@@ -1998,18 +1588,6 @@ Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<source>CHANNEL</source>
<translation>КАНАЛ</translation>
</message>
<message>
<source>RECEIVE MIDI-EVENTS</source>
<translation type="obsolete">ПРИНИМАТЬ СОБЫТИЯ MIDI</translation>
</message>
<message>
<source>SEND MIDI-EVENTS</source>
<translation type="obsolete">ОТПРАВЛЯТЬ СОБЫТИЯ MIDI</translation>
</message>
<message>
<source>SEND RECEIVED MIDI-EVENTS</source>
<translation type="obsolete">ОТПРАВЛЯТЬ ПОЛУЧЕНЫЕ СОБЫТИЯ MIDI</translation>
</message>
<message>
<source>MIDI-devices to receive MIDI-events from</source>
<translation>Устройства MIDI, с которых нужно принимать события</translation>
@@ -2130,10 +1708,6 @@ Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<source>The pattern currently cannot be freezed because you&apos;re in play-mode. Please stop and try again!</source>
<translation>Шаблон не может быть заморожен, так как он проигрывается в данный момент. Остановите воспроизведение и попробуйте снова!</translation>
</message>
<message>
<source>double-click to open this pattern in piano-roll</source>
<translation type="obsolete">Чтобы открыть шаблон в синтезаторе, дважды щёлкните мышью</translation>
</message>
<message>
<source>Open in piano-roll</source>
<translation>Открыть в синтезаторе</translation>
@@ -2146,10 +1720,6 @@ Please visit http://wiki.mindrules.net for documentation on LMMS.</source>
<source>Channel muted</source>
<translation>Канал заглушён</translation>
</message>
<message>
<source>The channel this pattern belongs to is currently muted, so freezing makes no sense! Do you still want to continue?</source>
<translation type="obsolete">Канал, к которому относится этот шаблон, заглушён, так что заморозка не имеет смысла! Тем не менее, заморозить?</translation>
</message>
<message>
<source>1 step</source>
<translation>1 шаг</translation>
@@ -2190,22 +1760,6 @@ use mouse wheel to set volume of a step</source>
</context>
<context>
<name>pianoRoll</name>
<message>
<source>Click if you want to draw, resize or move single notes (= key &apos;D&apos;)</source>
<translation type="obsolete">Инструмент рисования, изменения размера и перемещения одиночных нот (клавиша &apos;D&apos;)</translation>
</message>
<message>
<source>Click if you want to erase single notes (= key &apos;E&apos;)</source>
<translation type="obsolete">Инструмент стирания одиночных нот (клавиша &apos;E&apos;)</translation>
</message>
<message>
<source>Click if you want to select notes (= key &apos;S&apos;)</source>
<translation type="obsolete">Инструмент выделения нот (клавиша &apos;S&apos;)</translation>
</message>
<message>
<source>Click if you want to move selected notes (= key &apos;M&apos;)</source>
<translation type="obsolete">Инструмент перемещения выбранных нот (клавиша &apos;M&apos;)</translation>
</message>
<message>
<source>If you click here, erase-mode will be activated. In this mode you can erase single notes. You can also press &apos;E&apos; on your keyboard to activate this mode.</source>
<translation>Эта кнопка включает режим стирания нот по одной. Режим активируется также клавишей &apos;E&apos;.</translation>
@@ -2262,14 +1816,6 @@ use mouse wheel to set volume of a step</source>
<source>If you click here, draw-mode will be activated. In this mode you can add, resize and move single notes. This is the default-mode which is used most of the time. You can also press &apos;D&apos; on your keyboard to activate this mode.</source>
<translation>Эта кнопка включает режим рисования. При этом вы можете добавлять, перемещать и изменять размер одиночных нот. Этот режим используется чаще всего, и он является режимом по умолчанию.. Режим активируется также клавишей &apos;D&apos;.</translation>
</message>
<message>
<source>Record notes from MIDI-device to current pattern</source>
<translation type="obsolete">Записать ноты с цифрового музыкального инструмента (MIDI)</translation>
</message>
<message>
<source>Click here, if you want to record notes from a MIDI-device or the virtual test-piano of the according channel-window to the current pattern. When recording all notes you play will be written to this pattern and you can edit, play etc. them afterwards.</source>
<translation type="obsolete">Нажмите эту кнопку, если вы хотите записать ноты с устройства MIDI или виртуального пианино соответствующего канала. Позже вы сможете отредактировать записанный шаблон.</translation>
</message>
<message>
<source>Piano-Roll - no pattern</source>
<translation>Синтезатор - без шаблона</translation>
@@ -2348,26 +1894,14 @@ use mouse wheel to set volume of a step</source>
<source>Plugin browser</source>
<translation>Просмотр модулей</translation>
</message>
<message>
<source>You can drag an instrument-plugin into either the Song-Editor, the Beat+Bassline Editor or just into a channel-window or on the corresponding channel-button.</source>
<translation type="obsolete">Вы можете переносить нужные вам инструменты из этой панели в редактор мелодии или в редактор ритма/басов. Отпускайте кнопку мыши прямо в окне, чтобы создать новый канал, или на кнопке нужного канала для замены типа канала на выбранный инструмент.</translation>
</message>
<message>
<source>cheap synthesis of guitar/harp-like sounds</source>
<translation>Простая эмуляция струнных вроде гитары или арфы</translation>
</message>
<message>
<source>send all note-events to an external MIDI-device, e.g. a keyboard</source>
<translation type="obsolete">Отсылать все ноты на внешний цифровой музыкальный инструмент (MIDI), например, клавиатуру</translation>
</message>
<message>
<source>three powerful oscillators you can modulate in several ways</source>
<translation>Три генератора, которые Вы можете настраивать по вкусу</translation>
</message>
<message>
<source>experimental VST-hoster for using VST-plugins within LMMS</source>
<translation type="obsolete">Экспериментальная поддержка модулей VST</translation>
</message>
<message>
<source>simple sampler with various settings for using samples (e.g. drums) in a channel</source>
<translation>Подключение произвольного звукового образца с некоторой возможностью настройки</translation>
@@ -2521,10 +2055,6 @@ use mouse wheel to set volume of a step</source>
</context>
<context>
<name>sampleBuffer</name>
<message>
<source>All Audio-Files (*.wav *.ogg *.voc *.aif *.aiff *.au *.raw)</source>
<translation type="obsolete">Все звуковые файлы (*.wav *.ogg *.voc *.aif *.aiff *.au *.raw)</translation>
</message>
<message>
<source>Wave-Files (*.wav)</source>
<translation>Файлы Wave (*.wav)</translation>
@@ -2638,12 +2168,6 @@ use mouse wheel to set volume of a step</source>
<source>Please note that most changes won&apos;t take effect until you restart LMMS!</source>
<translation>Учтите, что большинство настроек не вступят в силу до перезапуска программы!</translation>
</message>
<message>
<source>FRAMES: %1
LATENCY: %2 ms</source>
<translation type="obsolete">ФРАГМЕНТОВ: %1
ОТКЛИК: %2 мс</translation>
</message>
<message>
<source>Here you can setup the internal buffer-size used by LMMS. Smaller values result in a lower latency but also may cause unusable sound or bad performance, especially on older computers or systems with a non-realtime kernel.</source>
<translation>Здесь вы можете настроить размер внутреннего звукового буфера LMMS. Меньшие значения дают меньшее время отклика программы, но повышают потребление ресурсов - это особенно заметно на старых машинах и системах, ядро которых не поддерживает приоритета реального времени. Если наблюдается прерывистый звук, попробуйте увеличить размер буфера.</translation>
@@ -2745,10 +2269,6 @@ Latency: %2 ms</source>
<source>Dummy (no MIDI support)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JACK (Jack Audio Connection Kit)</source>
<translation type="obsolete">JACK (Звуковой инстументарий Jack)</translation>
</message>
<message>
<source>SDL (Simple DirectMedia Layer)</source>
<translation type="unfinished"></translation>
@@ -2764,30 +2284,10 @@ Latency: %2 ms</source>
</context>
<context>
<name>songEditor</name>
<message>
<source>Play/pause song (Space)</source>
<translation type="obsolete">Воспроизведение/пауза (Пробел)</translation>
</message>
<message>
<source>Stop playing song (Space)</source>
<translation type="obsolete">Остановить воспроизведение (Пробел)</translation>
</message>
<message>
<source>Insert bar at current tact (Shift+Insert)</source>
<translation type="obsolete">Вставить такт под курсор (Shift+Insert)</translation>
</message>
<message>
<source>Remove bar at current tact (Shift+Delete)</source>
<translation type="obsolete">Удалить такт из-под курсора (Shift+Delete)</translation>
</message>
<message>
<source>Click here, if you want to stop playing of your song. The song-position-marker will be set to the start of your song.</source>
<translation>Нажмите сюда, если вы хотите остановить воспроизведение мелодии. Курсор при этом будет установлен на начало композиции.</translation>
</message>
<message>
<source>The current song was modified since last saving. Do you want to save it now?</source>
<translation type="obsolete">Der aktuelle Song wurde seit dem letzten Speichern geändert. Wollen Sie ihn jetzt speichern?</translation>
</message>
<message>
<source>untitled</source>
<translation>Неназванное</translation>
@@ -2800,10 +2300,6 @@ Latency: %2 ms</source>
<source>Could not open file</source>
<translation>Не могу открыть файл</translation>
</message>
<message>
<source>Could not open file %1. You probably have no rights to read this file. Please make sure you have at least read-access to the file and try again.</source>
<translation type="obsolete">Не огу открыть файл %1; вероятно, у вас нет прав на его чтение. Пожалуйста, проверьте это.</translation>
</message>
<message>
<source>Error in multimedia-project</source>
<translation>Ошибка в мультимедийном проекте</translation>
@@ -2816,11 +2312,6 @@ Latency: %2 ms</source>
<source>Could not write file</source>
<translation>Не могу записать файл</translation>
</message>
<message>
<source>Could not write file %1. You probably are not permitted to write to this file. Please make sure you have write-access to the file and try again.</source>
<translation type="obsolete">Не могу записать файл %1. Вероятно, у вас нет прав на его запись.
Проверьте, обладаете ли вы правами на запись выбранного файла и попробуйте снова.</translation>
</message>
<message>
<source>Song-Editor</source>
<translation>Редактор мелодии</translation>
@@ -2829,10 +2320,6 @@ Latency: %2 ms</source>
<source>Click here, if you want to play your whole song. Playing will be started at the song-position-marker (green). You can also move it while playing.</source>
<translation>Нажмите, чтобы прослушать созданную мелодию. Воспроизведение начнётся с позиции курсора (зелёный треугольник); вы можете двигать его во время проигрывания.</translation>
</message>
<message>
<source>Song control</source>
<translation type="obsolete">Управление мелодией</translation>
</message>
<message>
<source>Play song (Space)</source>
<translation>Начать воспроизведение (Пробел)</translation>
@@ -2845,46 +2332,14 @@ Latency: %2 ms</source>
<source>The tempo of a song is specified in beats per minute (BPM). If you want to change the tempo of your song, change this value. Every tact has four beats, so the tempo in BPM specifies, how many tacts / 4 should be played within a minute (or how many tacts should be played within four minutes).</source>
<translation>Это значение задаёт темп мелодии в ударах в минуту (англ. аббр. BPM). На каждый такт приходится четыре удара, так что темп в ударах в минуту фактически указывает, сколько четвертей такта проигрывается за минуту (или, что то же, количество тактов, проигрываемых за четыре минуты).</translation>
</message>
<message>
<source>master output volume</source>
<translation type="obsolete">Общая громкость</translation>
</message>
<message>
<source>master pitch</source>
<translation>Общая высота тона</translation>
</message>
<message>
<source>Edit</source>
<translation type="obsolete">Правка</translation>
</message>
<message>
<source>If you click here, a tact will be inserted at the current tact.</source>
<translation type="obsolete">Если вы нажмёте эту кнопку, под курсором вставится один такт.</translation>
</message>
<message>
<source>If you click here, the tact at the current tact will be removed.</source>
<translation type="obsolete">Если вы нажмёте эту кнопку, такт под курсором будет удалён.</translation>
</message>
<message>
<source>Insert tact at current tact (Shift+Insert)</source>
<translation type="obsolete">Вставить такт в текущей позиции (Shift+Insert)</translation>
</message>
<message>
<source>Remove tact at current tact (Shift+Delete)</source>
<translation type="obsolete">Удалить такт в текущей позиции (Shift+Delete)</translation>
</message>
<message>
<source>semitones</source>
<translation type="obsolete">полутон[а,ов]</translation>
</message>
<message>
<source>tempo of song</source>
<translation>Темп мелодии</translation>
</message>
<message>
<source>Add channel-track</source>
<translation type="obsolete">Добавить канал инструмента</translation>
</message>
<message>
<source>Add beat/bassline</source>
<translation>Добавить ритм/басы</translation>
@@ -2893,10 +2348,6 @@ Latency: %2 ms</source>
<source>Add sample-track</source>
<translation>Добавить файл</translation>
</message>
<message>
<source>%1 saved.</source>
<translation type="obsolete">%1 сохранён.</translation>
</message>
<message>
<source>Project NOT saved.</source>
<translation>Проект НЕ СОХРАНЁН.</translation>
@@ -2928,14 +2379,6 @@ Please make sure you have at least read-access to the file and try again.</sourc
<translation>Не могу открыть файл %1 для чтения. Вероятно, у вас нет прав на его чтение.
Проверьте, обладаете ли вы правами на чтение выбранного файла и попробуйте снова.</translation>
</message>
<message>
<source>Master output volume:</source>
<translation type="obsolete">Выходная громкость:</translation>
</message>
<message>
<source>Master output pitch:</source>
<translation type="obsolete">Выходная высота тона:</translation>
</message>
<message>
<source>Import file</source>
<translation>Импорт файла</translation>
@@ -2953,22 +2396,6 @@ Please make sure you have at least read-access to the file and try again.</sourc
<source>High quality mode</source>
<translation>Высокое качество</translation>
</message>
<message>
<source>Insert bar (Shift+Insert)</source>
<translation type="obsolete">Вставить такт (Shift + Insert)</translation>
</message>
<message>
<source>Remove bar (Shift+Delete)</source>
<translation type="obsolete">Удалить такт (Shift + Delete)</translation>
</message>
<message>
<source>If you click here, a bar will be inserted at the current bar.</source>
<translation type="obsolete">При нажатии на эту кнопку, в начало композиции вставится один такт.</translation>
</message>
<message>
<source>If you click here, the current bar will be removed.</source>
<translation type="obsolete">При нажатии на эту кнопку, из начала композиции удалится один такт.</translation>
</message>
<message>
<source>master volume</source>
<translation>Общая громкость</translation>
@@ -2997,10 +2424,6 @@ Please make sure you have at least read-access to the file and try again.</sourc
<source>The project %1 is now saved.</source>
<translation>Проект %1 сохранён.</translation>
</message>
<message>
<source>The project %1 could not be saved!</source>
<translation type="obsolete">Не смог сохранить проект %1!</translation>
</message>
<message>
<source>Could not write file %1. You probably are not permitted to write to this file.
Please make sure you have write-access to the file and try again.</source>
@@ -3020,31 +2443,6 @@ Please make sure you have write-access to the file and try again.</source>
<translation>Правка (выделение/перемещение)</translation>
</message>
</context>
<context>
<name>soundGenerator</name>
<message>
<source>Error while loading plugin</source>
<translation type="obsolete">Ошибка загрузки модуля</translation>
</message>
<message>
<source>The %1-plugin wasn&apos;t found! Using AudioFileProcessor with default settings instead.
</source>
<translation type="obsolete">Модуль %1 не найден! Вместо него будет использован AudioFileProcessor с настройками по умолчанию.
</translation>
</message>
<message>
<source>Plugin not found</source>
<translation type="obsolete">Модуль не найден</translation>
</message>
<message>
<source>The %1-plugin wasn&apos;t found!</source>
<translation type="obsolete">Модуль %1 не найден!</translation>
</message>
<message>
<source>Failed loading plugin &quot;%1&quot;!</source>
<translation type="obsolete">Ошибка загрузки модуля &quot;%1&quot;!</translation>
</message>
</context>
<context>
<name>surroundArea</name>
<message>
@@ -3214,10 +2612,6 @@ Please make sure you have write-permission to the file and the directory contain
</context>
<context>
<name>trackContentObject</name>
<message>
<source>Delete</source>
<translation type="obsolete">Удалить</translation>
</message>
<message>
<source>Cut</source>
<translation>Вырезать</translation>
@@ -3261,10 +2655,6 @@ Please make sure you have write-permission to the file and the directory contain
</context>
<context>
<name>trackOperationsWidget</name>
<message>
<source>Press &lt;Ctrl&gt; while clicking on move-grip to begin a new drag&apos;n&apos;drop-action</source>
<translation type="obsolete">Для перетаскивания в другое окно нажмите &lt;Ctrl&gt; при нажатии на эту полоску</translation>
</message>
<message>
<source>Clone this track</source>
<translation>Копировать дорожку</translation>
@@ -3273,10 +2663,6 @@ Please make sure you have write-permission to the file and the directory contain
<source>Remove this track</source>
<translation>Удалить дорожку</translation>
</message>
<message>
<source>Operations for this track</source>
<translation type="obsolete">Действия для этой дорожки</translation>
</message>
<message>
<source>With this switch you can either mute this track or mute all other tracks.
By clicking left, this track is muted. This is useful, if you only want to listen to the other tracks without changing this track and loosing information.
@@ -3300,43 +2686,6 @@ right click = mute all other tracks (solo)</source>
<translation>Действия для этой дорожки</translation>
</message>
</context>
<context>
<name>trackWidget</name>
<message>
<source>Clone this track</source>
<translation type="obsolete">Копировать дорожку</translation>
</message>
<message>
<source>Delete this track</source>
<translation type="obsolete">Удалить дорожку</translation>
</message>
<message>
<source>Move this track up</source>
<translation type="obsolete">Сдвинуть дорожку вверх</translation>
</message>
<message>
<source>Move this track down</source>
<translation type="obsolete">Сдвинуть дорожку вниз</translation>
</message>
<message>
<source>With this switch you can either mute this track or mute all other tracks.
By clicking left, this track is muted. This is useful, if you only want to listen to the other tracks without changing this track and loosing information.
When you click right on this switch, all other tracks will be muted. This is useful, if you only want to listen to this track.</source>
<translation type="obsolete">Вы можете заглушать эту дорожку или все дорожки кроме этой.
Если вы нажмёте на выключателе левой кнопкой мыши, то дорожка не будет воспроизводиться. Это может пригодиться, если вам нужно прослушать другие дорожки без удаления текущей, т. е. без потери информации.
Правая кнопка мыши, наоборот, оставляет звучать только текущую дорожку.</translation>
</message>
<message>
<source>left click = mute this track
right click = mute all other tracks (solo)</source>
<translation type="obsolete">Левая кнопка мыши отключает эту дорожку;
Правая отключает все дорожки, кроме этой</translation>
</message>
<message>
<source>Remove this track</source>
<translation type="obsolete">Удалить дорожку</translation>
</message>
</context>
<context>
<name>tripleOscillator</name>
<message>

Binary file not shown.

Binary file not shown.

View File

@@ -50,13 +50,12 @@
class QPixmap;
class automatableButtonGroup;
class channelTrack;
class comboBox;
class groupBox;
class knob;
class ledCheckBox;
class notePlayHandle;
class pixmapButton;
class tempoSyncKnob;
@@ -98,14 +97,6 @@ public:
}
protected slots:
void arpUpToggled( bool );
void arpDownToggled( bool );
void arpUpAndDownToggled( bool );
void arpRandomToggled( bool );
private:
enum arpDirections
@@ -115,7 +106,7 @@ private:
DOWN,
UP_AND_DOWN,
RANDOM
} m_arpDirection;
} ;
enum arpModes
{
@@ -137,10 +128,7 @@ private:
knob * m_arpGateKnob;
QLabel * m_arpDirectionLbl;
pixmapButton * m_arpUpBtn;
pixmapButton * m_arpDownBtn;
pixmapButton * m_arpUpAndDownBtn;
pixmapButton * m_arpRandomBtn;
automatableButtonGroup * m_arpDirectionBtnGrp;
comboBox * m_arpModeComboBox;

120
include/automatable_button.h Executable file
View File

@@ -0,0 +1,120 @@
/*
* automatable_button.h - class automatableButton, the base for all buttons
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _AUTOMATABLE_BUTTON_H
#define _AUTOMATABLE_BUTTON_H
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#else
#include <qwidget.h>
#endif
#include "automatable_object.h"
class automatableButtonGroup;
class automatableButton : public QWidget, public automatableObject<bool>
{
Q_OBJECT
public:
automatableButton( QWidget * _parent, engine * _engine );
virtual ~automatableButton();
inline virtual bool isChecked( void ) const
{
return( value() );
}
inline void setToggleButton( bool _on )
{
m_toggleButton = _on;
setStepRecording( m_toggleButton );
}
public slots:
virtual void toggle( void );
virtual void setChecked( bool _on );
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseReleaseEvent( QMouseEvent * _me );
private:
automatableButtonGroup * m_group;
bool m_toggleButton;
friend class automatableButtonGroup;
signals:
void clicked( void );
void toggled( bool );
} ;
class automatableButtonGroup : public QObject, public automatableObject<int>
{
Q_OBJECT
public:
automatableButtonGroup( QObject * _parent, engine * _engine );
virtual ~automatableButtonGroup();
void addButton( automatableButton * _btn );
void removeButton( automatableButton * _btn );
void activateButton( automatableButton * _btn );
virtual void setValue( const int _value );
private:
vlist<automatableButton *> m_buttons;
signals:
void valueChanged( int );
} ;
#endif

View File

@@ -28,14 +28,19 @@
#include <math.h>
#include "editable_object.h"
#include "templates.h"
template<typename T>
class automatableObject
class automatableObject : public editableObject
{
public:
automatableObject( const T _val = 0, const T _min = 0,
const T _max = 0, const T _step = 1 ) :
automatableObject( engine * _engine, const T _val = 0, const T _min = 0,
const T _max = 0,
const T _step = defaultRelStep() ) :
editableObject( _engine ),
m_oldValue( _val ),
m_value( _val ),
m_minValue( _min ),
m_maxValue( _max ),
@@ -45,6 +50,11 @@ public:
virtual ~automatableObject()
{
while( m_linkedObjects.empty() == FALSE )
{
m_linkedObjects.last()->unlinkObject( this );
m_linkedObjects.erase( m_linkedObjects.end() - 1 );
}
}
static inline T minRelStep( void )
@@ -83,31 +93,71 @@ public:
return( m_step );
}
inline virtual void setValue( const T _value )
inline T fittedValue( T _value )
{
m_value = tLimit<T>( _value, minValue(), maxValue() );
_value = tLimit<T>( _value, minValue(), maxValue() );
if( m_step != 0 )
{
m_value = static_cast<T>( floorf( m_value / m_step ) *
m_step );
_value = static_cast<T>( floorf( _value / step() ) *
step() );
}
else
{
m_value = m_minValue;
_value = minValue();
}
// correct rounding error at the border
if( tAbs<T>( m_value - m_maxValue ) < minEps() *
tAbs<T>( m_step ) )
if( tAbs<T>( _value - maxValue() ) < minEps() *
tAbs<T>( step() ) )
{
m_value = m_maxValue;
_value = maxValue();
}
// correct rounding error if value = 0
if( tAbs<T>( m_value ) < minEps() * tAbs<T>( m_step ) )
if( tAbs<T>( _value ) < minEps() * tAbs<T>( step() ) )
{
m_value = 0;
_value = 0;
}
return( _value );
}
inline virtual void setInitValue( const T _value )
{
const bool sr = isRecordingSteps();
setStepRecording( FALSE );
setValue( _value );
setStepRecording( sr );
}
inline virtual void setValue( const T _value )
{
const T old_val = m_value;
m_value = fittedValue( _value );
if( old_val != m_value )
{
// add changes to history so user can undo it
addStep( editStep( 0, m_value - old_val ) );
// notify linked objects
// doesn't work because of implicit typename T
// for( autoObjVector::iterator it = m_linkedObjects.begin();
// it != m_linkedObjects.end(); ++it )
for( csize i = 0; i < m_linkedObjects.size(); ++i )
{
automatableObject<T> * it = m_linkedObjects[i];
if( value() != it->value() &&
it->fittedValue( value() ) != it->value() )
{
const bool sr = it->isRecordingSteps();
it->setStepRecording( isRecordingSteps() );
it->setValue( value() );
it->setStepRecording( sr );
}
}
}
}
@@ -117,7 +167,7 @@ public:
}
inline virtual void setRange( const T _min, const T _max,
const T _step = 0 )
const T _step = defaultRelStep() )
{
m_minValue = _min;
m_maxValue = _max;
@@ -127,7 +177,7 @@ public:
qSwap<T>( m_minValue, m_maxValue );
}
// re-adjust value
setValue( value() );
automatableObject<T>::setInitValue( value() );
}
inline virtual void setStep( const T _step )
@@ -159,6 +209,63 @@ public:
m_step = _step;
}
inline void linkObject( automatableObject<T> * _object )
{
if( qFind( m_linkedObjects.begin(), m_linkedObjects.end(),
_object ) == m_linkedObjects.end() )
{
m_linkedObjects.push_back( _object );
}
}
inline void unlinkObject( automatableObject<T> * _object )
{
m_linkedObjects.erase( qFind( m_linkedObjects.begin(),
m_linkedObjects.end(),
_object ) );
}
static inline void linkObjects( automatableObject<T> * _object1,
automatableObject<T> * _object2 )
{
_object1->linkObject( _object2 );
_object2->linkObject( _object1 );
}
protected:
virtual void redoStep( const editStep & _edit_step )
{
const bool sr = isRecordingSteps();
setStepRecording( FALSE );
#ifndef QT3
setValue( value() + _edit_step.data().value<T>() );
#else
setValue( value() + static_cast<T>(
_edit_step.data().toDouble() ) );
#endif
setStepRecording( sr );
}
virtual void undoStep( const editStep & _edit_step )
{
#ifndef QT3
redoStep( editStep( _edit_step.actionID(),
-_edit_step.data().value<T>() ) );
#else
redoStep( editStep( _edit_step.actionID(),
static_cast<T>( -_edit_step.data().toDouble() ) ) );
#endif
}
// most objects will need this temporarily
T m_oldValue;
inline void addStepFromOldToCurVal( void )
{
addStep( editStep( 0, value() - m_oldValue ) );
}
private:
T m_value;
@@ -166,6 +273,9 @@ private:
T m_maxValue;
T m_step;
typedef vvector<automatableObject<T> *> autoObjVector;
autoObjVector m_linkedObjects;
} ;

View File

@@ -46,14 +46,17 @@
#endif
#include "automatable_object.h"
class QAction;
class comboBox : public QWidget
class comboBox : public QWidget, public automatableObject<int>
{
Q_OBJECT
public:
comboBox( QWidget * _parent );
comboBox( QWidget * _parent, engine * _engine );
virtual ~comboBox();
void addItem( const QString & _item, const QPixmap & _pixmap =
@@ -61,26 +64,19 @@ public:
inline void clear( void )
{
m_currentIndex = 0;
setRange( 0, 0 );
m_items.clear();
update();
}
int findText( const QString & _txt ) const;
int currentIndex( void ) const
{
return( m_currentIndex );
}
QString currentText( void ) const
{
return( m_items[m_currentIndex].first );
return( m_items[value()].first );
}
public slots:
void setCurrentIndex( int _idx );
void setValue( const int _idx );
protected:
@@ -98,7 +94,6 @@ private:
typedef QPair<QString, QPixmap> item;
vvector<item> m_items;
int m_currentIndex;
bool m_pressed;
@@ -110,7 +105,7 @@ private slots:
signals:
void activated( const QString & );
void currentIndexChanged( int );
void valueChanged( int );
} ;

View File

@@ -26,10 +26,8 @@
#ifndef _ENGINE_H
#define _ENGINE_H
#include "qt3support.h"
class bbEditor;
class editHistory;
class mainWindow;
class mixer;
class pianoRoll;
@@ -40,7 +38,7 @@ class songEditor;
class engine
{
public:
engine( const bool _has_gui = TRUE );
engine( const bool _has_gui = true );
engine( const engine & _engine );
~engine();
@@ -94,6 +92,11 @@ public:
return( m_projectNotes );
}
inline editHistory * getEditHistory( void )
{
return( m_editHistory );
}
private:
bool m_hasGUI;
@@ -104,6 +107,7 @@ private:
bbEditor * m_bbEditor;
pianoRoll * m_pianoRoll;
projectNotes * m_projectNotes;
editHistory * m_editHistory;
} ;

View File

@@ -58,6 +58,7 @@
class QPaintEvent;
class QPixmap;
class automatableButtonGroup;
class envelopeTabWidget;
class knob;
class ledCheckBox;
@@ -119,10 +120,7 @@ protected:
protected slots:
void updateAfterKnobChange( float );
void lfoSinWaveCh( bool );
void lfoTriangleWaveCh( bool );
void lfoSawWaveCh( bool );
void lfoSquareWaveCh( bool );
void lfoWaveCh( int );
void lfoUserWaveCh( bool );
void x100Toggled( bool );
@@ -159,11 +157,8 @@ private:
knob * m_lfoAttackKnob;
tempoSyncKnob * m_lfoSpeedKnob;
knob * m_lfoAmountKnob;
pixmapButton * m_sinLfoBtn;
pixmapButton * m_triangleLfoBtn;
pixmapButton * m_sawLfoBtn;
pixmapButton * m_sqrLfoBtn;
pixmapButton * m_usrLfoBtn;
pixmapButton * m_userLfoBtn;
automatableButtonGroup * m_lfoWaveBtnGrp;
ledCheckBox * m_x100Cb;
ledCheckBox * m_controlEnvAmountCb;

View File

@@ -40,23 +40,21 @@
#include "pixmap_button.h"
class QPixmap;
class groupBox : public QWidget
class groupBox : public QWidget, public engineObject
{
Q_OBJECT
public:
groupBox( const QString & _caption, QWidget * _parent );
groupBox( const QString & _caption, QWidget * _parent,
engine * _engine );
virtual ~groupBox();
bool isActive( void ) const
{
#ifdef QT4
return( m_led->isChecked() );
#else
return( m_led->isOn() );
#endif
}

127
include/import_filter.h Executable file
View File

@@ -0,0 +1,127 @@
/*
* import_filter.h - declaration of class importFilter, the base-class for all
* file import filters
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMPORT_FILTER_H
#define _IMPORT_FILTER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QFile>
#else
#include <qfile.h>
#endif
#include "plugin.h"
class trackContainer;
class importFilter : public plugin
{
public:
importFilter( const QString & _file_name,
const descriptor * _descriptor, engine * _eng );
virtual ~importFilter();
// tries to import given file to given track-container by having all
// available import-filters to try to import the file
static void FASTCALL import( const QString & _file_to_import,
trackContainer * _tc );
protected:
virtual bool tryImport( trackContainer * _tc ) = 0;
const QFile & file( void ) const
{
return( m_file );
}
bool openFile( void );
inline void closeFile( void )
{
m_file.close();
}
inline int readByte( void )
{
#ifdef QT4
char c;
if( m_file.getChar( &c ) )
{
return( static_cast<int>( c ) );
}
return( -1 );
#else
return( m_file.getch() );
#endif
}
inline void ungetChar( int _ch )
{
#ifndef QT3
m_file.ungetChar( _ch );
#else
m_file.ungetch( _ch );
#endif
}
virtual void FASTCALL saveSettings( QDomDocument &,
QDomElement & )
{
}
virtual void FASTCALL loadSettings( const QDomElement & )
{
}
virtual QString nodeName( void ) const
{
return( "import_filter" );
}
private:
QFile m_file;
} ;
#endif

View File

@@ -59,8 +59,7 @@ enum knobTypes
class knob : public QWidget, public engineObject,
public automatableObject<float>
class knob : public QWidget, public automatableObject<float>
{
Q_OBJECT
public:
@@ -75,10 +74,10 @@ public:
void setTotalAngle( float _angle );
inline void setInitValue( const float _val )
inline virtual void setInitValue( const float _val )
{
m_initValue = _val;
setValue( _val );
automatableObject<float>::setInitValue( _val );
}
virtual void setValue( const float _x );
@@ -86,33 +85,8 @@ public:
virtual void setRange( const float _min, const float _max,
const float _step = 0.0 );
/* inline float value( void ) const
{
return( m_value );
}
void setStep( float );
inline float maxValue( void ) const
{
return( m_maxValue );
}
inline float minValue( void ) const
{
return( m_minValue );
}*/
/* inline void incPages( int _n_pages )
{
setNewValue( value() + float( _n_pages ) * m_pageSize, 1 );
}*/
public slots:
/* void setValue( float _val, bool _is_init_value = FALSE );
void fitValue( float _val );
void incValue( int _steps );*/
void reset( void );
void copyValue( void );
void pasteValue( void );
@@ -173,6 +147,7 @@ protected:
float m_angle;
float m_totalAngle;
QPixmap * m_knobPixmap;
int m_knobNum;
QString m_hintTextBeforeValue;

View File

@@ -51,16 +51,12 @@ class lcdSpinBox : public QWidget, public automatableObject<int>
{
Q_OBJECT
public:
lcdSpinBox( int _min, int _max, int _num_digits, QWidget * _parent );
lcdSpinBox( int _min, int _max, int _num_digits, QWidget * _parent,
engine * _engine );
virtual ~lcdSpinBox();
virtual void setStep( const int _step );
/* inline int value( void ) const
{
return( m_number->intValue() );
}*/
void setLabel( const QString & _txt );
inline void addTextForValue( int _val, const QString & _text )
@@ -84,11 +80,6 @@ protected:
private:
QMap<int, QString> m_textForValue;
/* int m_value;
int m_minValue;
int m_maxValue;
int m_step;*/
QLCDNumber * m_number;
QLabel * m_label;

View File

@@ -26,26 +26,13 @@
#ifndef _LED_CHECKBOX_H
#define _LED_CHECKBOX_H
#include "qt3support.h"
#ifdef QT4
#include <QWidget>
#else
#include <qwidget.h>
#endif
#include "automatable_object.h"
#include "automatable_button.h"
class QPixmap;
class ledCheckBox : public QWidget, public automatableObject<bool>
class ledCheckBox : public automatableButton
{
Q_OBJECT
public:
@@ -54,30 +41,19 @@ public:
YELLOW, GREEN, TOTAL_COLORS
} ;
ledCheckBox( const QString & _txt, QWidget * _parent,
ledCheckBox( const QString & _txt, QWidget * _parent, engine * _engine,
ledColors _color = YELLOW );
virtual ~ledCheckBox();
inline bool isChecked( void ) const
{
return( value() );
}
inline const QString & text( void )
{
return( m_text );
}
public slots:
void toggle( void );
void setChecked( bool _on );
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void mousePressEvent( QMouseEvent * _me );
private:
@@ -85,9 +61,6 @@ private:
QPixmap * m_ledOffPixmap;
QString m_text;
signals:
void toggled( bool );
} ;

View File

@@ -52,6 +52,7 @@
#include "engine.h"
class QDomElement;
class QGridLayout;
class QSplashScreen;
@@ -59,7 +60,6 @@ class configManager;
class toolButton;
class mainWindow : public QMainWindow, public engineObject
{
Q_OBJECT
@@ -98,6 +98,9 @@ public:
static QSplashScreen * s_splashScreen;
static void saveWidgetState( QWidget * _w, QDomElement & _de );
static void restoreWidgetState( QWidget * _w, const QDomElement & _de );
public slots:
inline void emptySlot( void )
@@ -120,6 +123,9 @@ public slots:
void toggleProjectNotesWin( void );
void togglePianoRollWin( void );
void undo( void );
void redo( void );
protected:
virtual void closeEvent( QCloseEvent * _ce );

View File

@@ -46,6 +46,7 @@
#include "types.h"
#include "note.h"
#include "engine.h"
#include "settings.h"
class QPainter;
@@ -59,7 +60,7 @@ class timeLine;
class toolButton;
class pianoRoll : public QWidget, public engineObject
class pianoRoll : public QWidget, public engineObject, public settings
{
Q_OBJECT
public:
@@ -83,6 +84,15 @@ public:
int quantization( void ) const;
virtual void FASTCALL saveSettings( QDomDocument & _doc,
QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
inline virtual QString nodeName( void ) const
{
return( "pianoroll" );
}
public slots:
virtual void update( void );

View File

@@ -26,48 +26,32 @@
#ifndef _PIXMAP_BUTTON_H
#define _PIXMAP_BUTTON_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QPushButton>
#include <QPixmap>
#else
#include <qpushbutton.h>
#include <qpixmap.h>
#endif
#include "automatable_button.h"
class pixmapButton : public QPushButton
class pixmapButton : public automatableButton
{
Q_OBJECT
public:
pixmapButton( QWidget * _parent );
pixmapButton( QWidget * _parent, engine * _engine );
virtual ~pixmapButton();
void FASTCALL setActiveGraphic( const QPixmap & _pm );
void FASTCALL setInactiveGraphic( const QPixmap & _pm,
bool _update = TRUE );
void FASTCALL setBgGraphic( const QPixmap & _pm );
#ifdef QT3
inline void setChecked( bool _on )
{
setOn( _on );
}
inline bool isChecked( void ) const
{
return( isOn() );
}
#endif
void setActiveGraphic( const QPixmap & _pm );
void setInactiveGraphic( const QPixmap & _pm, bool _update = TRUE );
void setBgGraphic( const QPixmap & _pm );
signals:
@@ -82,9 +66,9 @@ protected:
private:
QPixmap * m_activePixmap;
QPixmap * m_inactivePixmap;
QPixmap * m_bgPixmap;
QPixmap m_activePixmap;
QPixmap m_inactivePixmap;
QPixmap m_bgPixmap;
} ;

View File

@@ -135,10 +135,6 @@ inline QString baseName( const QString & _file )
#define modifiers state
// QButtonGroup
#define addButton insert
// QProgressBar
#define setTextVisible setPercentageVisible

View File

@@ -47,7 +47,7 @@ class nStateButton;
class textFloat;
class timeLine : public QWidget, public engineObject
class timeLine : public QWidget, public engineObject, public settings
{
Q_OBJECT
public:
@@ -116,6 +116,15 @@ public:
void addToolButtons( QWidget * _tool_bar );
virtual void FASTCALL saveSettings( QDomDocument & _doc,
QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
inline virtual QString nodeName( void ) const
{
return( "timeline" );
}
public slots:
void updatePosition( const midiTime & );
void updatePosition( void )

View File

@@ -2,5 +2,5 @@ if VST_SUPPORT
VESTIGE_SUBDIR=vestige
endif
SUBDIRS = audio_file_processor bit_invader organic plucked_string_synth triple_oscillator $(VESTIGE_SUBDIR)
SUBDIRS = audio_file_processor bit_invader midi_import organic plucked_string_synth triple_oscillator $(VESTIGE_SUBDIR)

View File

@@ -28,7 +28,6 @@
#ifdef QT4
#include <QPainter>
#include <QButtonGroup>
#include <QBitmap>
#include <Qt/QtXml>
#include <QFileInfo>
@@ -37,7 +36,6 @@
#else
#include <qpainter.h>
#include <qbuttongroup.h>
#include <qbitmap.h>
#include <qdom.h>
#include <qfileinfo.h>
@@ -104,7 +102,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
}
m_openAudioFileButton = new pixmapButton( this );
m_openAudioFileButton = new pixmapButton( this, eng() );
m_openAudioFileButton->setCheckable( FALSE );
m_openAudioFileButton->setCursor( QCursor( Qt::PointingHandCursor ) );
m_openAudioFileButton->move( 200, 90 );
@@ -130,7 +128,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
"are not reset, so please don't wonder if your sample "
"doesn't sound like the original one..." ) );
m_reverseButton = new pixmapButton( this );
m_reverseButton = new pixmapButton( this, eng() );
m_reverseButton->move( 160, 124 );
m_reverseButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"reverse_on" ) );
@@ -149,7 +147,7 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
"This is useful for cool effects, e.g. a reversed "
"crash." ) );
m_loopButton = new pixmapButton( this );
m_loopButton = new pixmapButton( this, eng() );
m_loopButton->move( 180, 124 );
m_loopButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"loop_on" ) );
@@ -226,16 +224,12 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
"AudioFileProcessor returns if a note is longer than "
"the sample between start- and end-point." ) );
m_viewLinesPB = new pixmapButton( this );
m_viewLinesPB = new pixmapButton( this, eng() );
m_viewLinesPB->move( 154, 158 );
m_viewLinesPB->setBgGraphic( getBackground( m_viewLinesPB ) );
if( m_drawMethod == sampleBuffer::LINE_CONNECT )
{
#ifdef QT4
m_viewLinesPB->setChecked( TRUE );
#else
m_viewLinesPB->setOn( TRUE );
#endif
}
connect( m_viewLinesPB, SIGNAL( toggled( bool ) ), this,
SLOT( lineDrawBtnToggled( bool ) ) );
@@ -249,16 +243,12 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
"sound itself. It just gives you another view to your "
"sample." ) );
m_viewDotsPB = new pixmapButton( this );
m_viewDotsPB = new pixmapButton( this, eng() );
m_viewDotsPB->move( 204, 158 );
m_viewDotsPB->setBgGraphic( getBackground( m_viewDotsPB ) );
if( m_drawMethod == sampleBuffer::DOTS )
{
#ifdef QT4
m_viewDotsPB->setChecked( TRUE );
#else
m_viewDotsPB->setOn( TRUE );
#endif
}
connect( m_viewDotsPB, SIGNAL( toggled( bool ) ), this,
SLOT( dotDrawBtnToggled( bool ) ) );
@@ -271,13 +261,12 @@ audioFileProcessor::audioFileProcessor( channelTrack * _channel_track ) :
"with dots. This doesn't change the sound itself. "
"It just gives you another view to your sample." ) );
QButtonGroup * view_group = new QButtonGroup( this );
automatableButtonGroup * view_group = new automatableButtonGroup( this,
eng() );
view_group->addButton( m_viewLinesPB );
view_group->addButton( m_viewDotsPB );
view_group->setExclusive( TRUE );
#ifndef QT4
view_group->hide();
#ifndef QT4
setBackgroundMode( Qt::NoBackground );
#endif
setAcceptDrops( TRUE );

View File

@@ -202,13 +202,13 @@ bitInvader::bitInvader( channelTrack * _channel_track ) :
this, SLOT ( sampleSizeChanged( float ) )
);
m_interpolationToggle = new ledCheckBox( "Interpolation", this );
m_interpolationToggle = new ledCheckBox( "Interpolation", this, eng() );
m_interpolationToggle->move( 55,80 );
connect( m_interpolationToggle, SIGNAL( toggled( bool ) ),
this, SLOT ( interpolationToggle( bool ) ) );
m_normalizeToggle = new ledCheckBox( "Normalize", this );
m_normalizeToggle = new ledCheckBox( "Normalize", this, eng() );
m_normalizeToggle->move( 55, 100 );
connect( m_normalizeToggle, SIGNAL( toggled( bool ) ),
@@ -233,58 +233,57 @@ bitInvader::bitInvader( channelTrack * _channel_track ) :
connect( m_graph, SIGNAL ( sampleChanged( void ) ),
this, SLOT ( sampleChanged( void ) ) );
sinWaveBtn = new pixmapButton( this );
sinWaveBtn = new pixmapButton( this, eng() );
sinWaveBtn->move( 188, 120 );
sinWaveBtn->setActiveGraphic( embed::getIconPixmap(
"sin_wave_inactive" ) );
"sin_wave_active" ) );
sinWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"sin_wave_inactive" ) );
sinWaveBtn->setChecked( TRUE );
toolTip::add( sinWaveBtn,
tr( "Click here if you want a sine-wave for "
"current oscillator." ) );
triangleWaveBtn = new pixmapButton( this );
triangleWaveBtn = new pixmapButton( this, eng() );
triangleWaveBtn->move( 188, 136 );
triangleWaveBtn->setActiveGraphic(
embed::getIconPixmap( "triangle_wave_inactive" ) );
embed::getIconPixmap( "triangle_wave_active" ) );
triangleWaveBtn->setInactiveGraphic(
embed::getIconPixmap( "triangle_wave_inactive" ) );
toolTip::add( triangleWaveBtn,
tr( "Click here if you want a triangle-wave "
"for current oscillator." ) );
sawWaveBtn = new pixmapButton( this );
sawWaveBtn = new pixmapButton( this, eng() );
sawWaveBtn->move( 188, 152 );
sawWaveBtn->setActiveGraphic( embed::getIconPixmap(
"saw_wave_inactive" ) );
"saw_wave_active" ) );
sawWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"saw_wave_inactive" ) );
toolTip::add( sawWaveBtn,
tr( "Click here if you want a saw-wave for "
"current oscillator." ) );
sqrWaveBtn = new pixmapButton( this );
sqrWaveBtn = new pixmapButton( this, eng() );
sqrWaveBtn->move( 188, 168 );
sqrWaveBtn->setActiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
"square_wave_active" ) );
sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
toolTip::add( sqrWaveBtn,
tr( "Click here if you want a square-wave for "
"current oscillator." ) );
whiteNoiseWaveBtn = new pixmapButton( this );
whiteNoiseWaveBtn = new pixmapButton( this, eng() );
whiteNoiseWaveBtn->move( 188, 184 );
whiteNoiseWaveBtn->setActiveGraphic(
embed::getIconPixmap( "white_noise_wave_inactive" ) );
embed::getIconPixmap( "white_noise_wave_active" ) );
whiteNoiseWaveBtn->setInactiveGraphic(
embed::getIconPixmap( "white_noise_wave_inactive" ) );
toolTip::add( whiteNoiseWaveBtn,
tr( "Click here if you want a white-noise for "
"current oscillator." ) );
usrWaveBtn = new pixmapButton( this );
usrWaveBtn = new pixmapButton( this, eng() );
usrWaveBtn->move( 188, 200 );
usrWaveBtn->setActiveGraphic( embed::getIconPixmap(
"usr_wave_active" ) );
@@ -310,7 +309,7 @@ bitInvader::bitInvader( channelTrack * _channel_track ) :
smoothBtn = new pixmapButton( this );
smoothBtn = new pixmapButton( this, eng() );
smoothBtn->move( 55, 225 );
smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"smooth" ) );

View File

@@ -0,0 +1,12 @@
AUTOMAKE_OPTIONS = foreign 1.4
INCLUDES = -I$(top_srcdir)/include -I.
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="midiimport"
pkglib_LTLIBRARIES= libmidiimport.la
libmidiimport_la_SOURCES = midi_import.cpp midi_import.h

View File

@@ -0,0 +1,546 @@
/*
* midi_import.cpp - support for importing MIDI-files
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* This file partly contains code from Fluidsynth, Peter Hanappe
*
* 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.
*
*/
#include "midi_import.h"
#include "track_container.h"
#include "channel_track.h"
#include "pattern.h"
#ifdef QT4
#include <Qt/QtXml>
#include <QApplication>
#include <QProgressDialog>
#else
#include <qdom.h>
#include <qapplication.h>
#include <qprogressdialog.h>
#define pos at
#define setValue setProgress
#endif
#define makeID(_c0, _c1, _c2, _c3) \
( ( _c0 ) | ( ( _c1 ) << 8 ) | ( ( _c2 ) << 16 ) | ( ( _c3 ) << 24 ) )
extern "C"
{
plugin::descriptor midiimport_plugin_descriptor =
{
STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ),
"MIDI Import",
QT_TRANSLATE_NOOP( "pluginBrowser",
"Filter for importing MIDI-files into LMMS" ),
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
0x0100,
plugin::IMPORT_FILTER,
new QPixmap()
} ;
}
midiImport::midiImport( const QString & _file ) :
importFilter( _file, &midiimport_plugin_descriptor, NULL )
{
}
midiImport::~midiImport()
{
}
bool FASTCALL midiImport::tryImport( trackContainer * _tc )
{
if( openFile() == FALSE )
{
return( FALSE );
}
switch( readID() )
{
case makeID( 'M', 'T', 'h', 'd' ):
return( readSMF( _tc ) );
case makeID( 'R', 'I', 'F', 'F' ):
return( readRIFF( _tc ) );
default:
printf( "midiImport::importToTrackContainer(): not a "
"Standard MIDI file\n" );
return( FALSE );
}
}
bool FASTCALL midiImport::readSMF( trackContainer * _tc )
{
// the curren position is immediately after the "MThd" id
int header_len = readInt( 4 );
if( header_len < 6 )
{
invalid_format:
printf( "midiImport::readSMF(): invalid file format\n" );
return( FALSE );
}
int type = readInt( 2 );
if( type != 0 && type != 1 )
{
printf( "midiImport::readSMF(): type %d format is not "
"supported\n", type );
return( FALSE );
}
int num_tracks = readInt( 2 );
if( num_tracks < 1 || num_tracks > 1000 )
{
printf( "midiImport::readSMF(): invalid number of tracks (%d)\n",
num_tracks );
num_tracks = 0;
return( FALSE );
}
#ifdef LMMS_DEBUG
printf( "tracks: %d\n", num_tracks );
#endif
int time_division = readInt( 2 );
if( time_division < 0 )
{
goto invalid_format;
}
#ifdef LMMS_DEBUG
printf( "time-division: %d\n", time_division );
#endif
m_smpteTiming = !!( time_division & 0x8000 );
#ifdef QT4
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
trackContainer::tr( "Cancel" ), 0, num_tracks );
#else
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
trackContainer::tr( "Cancel" ), num_tracks,
0, 0, TRUE );
#endif
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
pd.show();
// read tracks
for( int i = 0; i < num_tracks; ++i )
{
pd.setValue( i );
#ifdef QT4
qApp->processEvents( QEventLoop::AllEvents, 100 );
#else
qApp->processEvents( 100 );
#endif
if( pd.wasCanceled() )
{
return( FALSE );
}
int len;
// search for MTrk chunk
while( 1 )
{
Sint32 id = readID();
len = readInt( 4 );
if( file().atEnd() )
{
printf( "midiImport::readSMF(): unexpected end "
"of file\n" );
return( FALSE );
}
if( len < 0 || len >= 0x10000000 )
{
printf( "midiImport::readSMF(): invalid chunk "
"length %d\n", len );
return( FALSE );
}
if( id == makeID( 'M', 'T', 'r', 'k' ) )
{
break;
}
skip( len );
}
if( len <= 0 )
{
continue;
}
if( !readTrack( file().pos() + len ) )
{
return( FALSE );
}
if( i == 0 )
{
continue;
}
// now create new channel-track for reading track
channelTrack * ct = dynamic_cast<channelTrack *>(
track::create(
track::CHANNEL_TRACK,
_tc ) );
#ifdef LMMS_DEBUG
assert( ct != NULL );
#endif
// TODO: setup program, channel etc.
ct->loadInstrument( "tripleoscillator" );
ct->toggledChannelButton( FALSE );
// now create pattern to store notes in
pattern * p = dynamic_cast<pattern *>( ct->createTCO( 0 ) );
#ifdef LMMS_DEBUG
assert( p != NULL );
#endif
ct->addTCO( p );
// init keys
int keys[NOTES_PER_OCTAVE * OCTAVES][2];
for( int j = 0; j < NOTES_PER_OCTAVE * OCTAVES; ++j )
{
keys[j][0] = -1;
}
// now process every event
for( eventVector::const_iterator it = m_events.begin();
it != m_events.end(); ++it )
{
const int tick = it->first;
const midiEvent & ev = it->second;
switch( ev.m_type )
{
case NOTE_ON:
if( ev.key() >=
NOTES_PER_OCTAVE * OCTAVES )
{
continue;
}
if( ev.velocity() > 0 )
{
keys[ev.key()][0] = tick;
keys[ev.key()][1] =
ev.velocity();
break;
}
case NOTE_OFF:
if( ev.key() <
NOTES_PER_OCTAVE * OCTAVES &&
keys[ev.key()][0] >= 0 )
{
note n( midiTime( ( tick - keys[ev.key()][0] ) / 10 ),
midiTime( keys[ev.key()][0] / 10 ),
(tones)( ev.key() % NOTES_PER_OCTAVE ),
(octaves)( ev.key() / NOTES_PER_OCTAVE ),
keys[ev.key()][1] * 100 / 128 );
p->addNote( n );
keys[ev.key()][0] = -1;
}
break;
default:
/* printf( "Unhandled event: %#x\n",
ev.m_type );*/
break;
}
}
}
return( TRUE );
}
bool FASTCALL midiImport::readRIFF( trackContainer * _tc )
{
// skip file length
skip( 4 );
// check file type ("RMID" = RIFF MIDI)
if( readID() != makeID( 'R', 'M', 'I', 'D' ) )
{
invalid_format:
printf( "midiImport::readRIFF(): invalid file format\n" );
return( FALSE );
}
// search for "data" chunk
while( 1 )
{
int id = readID();
int len = read32LE();
if( file().atEnd() )
{
data_not_found:
printf( "midiImport::readRIFF(): data chunk not "
"found\n" );
return( FALSE );
}
if( id == makeID( 'd', 'a', 't', 'a' ) )
{
break;
}
if( len < 0 )
{
goto data_not_found;
}
skip( ( len + 1 ) & ~1 );
}
// the "data" chunk must contain data in SMF format
if( readID() != makeID( 'M', 'T', 'h', 'd' ) )
{
goto invalid_format;
}
return( readSMF( _tc ) );
}
bool FASTCALL midiImport::readTrack( int _track_end )
{
int tick = 0;
unsigned char last_cmd = 0;
// unsigned char port = 0;
m_events.clear();
// the current file position is after the track ID and length
while( (int) file().pos() < _track_end )
{
unsigned char cmd;
int len;
int delta_ticks = readVar();
if( delta_ticks < 0 )
{
break;
}
tick += delta_ticks;
int c = readByte();
if( c < 0 )
{
break;
}
if( c & 0x80 )
{
// have command
cmd = c;
if( cmd < 0xf0 )
{
last_cmd = cmd;
}
}
else
{
// running status
ungetChar( c );
cmd = last_cmd;
if( !cmd )
{
error();
return( FALSE );
}
}
switch( cmd & 0xF0 )
{
// channel msg with 2 parameter bytes
case NOTE_OFF:
case NOTE_ON:
case KEY_PRESSURE:
case CONTROL_CHANGE:
case PITCH_BEND:
{
int data1 = readByte() & 0x7F;
int data2 = readByte() & 0x7F;
m_events.push_back( qMakePair( tick,
midiEvent( static_cast<midiEventTypes>(
cmd & 0xF0 ),
cmd & 0x0F,
data1,
data2 ) ) );
break;
}
// channel msg with 1 parameter byte
case PROGRAM_CHANGE:
case CHANNEL_PRESSURE:
m_events.push_back( qMakePair( tick,
midiEvent( static_cast<midiEventTypes>(
cmd & 0xF0 ),
cmd & 0x0F,
readByte() & 0x7F ) ) );
break;
case MIDI_SYSEX:
switch( cmd )
{
case MIDI_SYSEX:
case MIDI_EOX:
{
len = readVar();
if( len < 0 )
{
error();
return( FALSE );
}
if( cmd == MIDI_SYSEX )
{
++len;
}
char * data = new char[len];
if( cmd == MIDI_SYSEX )
{
data[0] = MIDI_SYSEX;
}
for( ; c < len; ++c )
{
data[c] = readByte();
}
m_events.push_back(
qMakePair( tick,
midiEvent( MIDI_SYSEX, data, len ) ) );
break;
}
case MIDI_META_EVENT:
c = readByte();
len = readVar();
/* if( len < 0 )
{
error();
return( FALSE );
}*/
switch( c )
{
case 0x21: // port number
if( len < 1 )
{
error();
return( FALSE );
}
/* port = readByte() %
port_count;
skip( len - 1 );*/
skip( len );
break;
case 0x2F: // end of track
//track->end_tick = tick;
skip( _track_end -
file().pos() );
return( TRUE );
case 0x51: // tempo
if( len < 3 )
{
error();
return( FALSE );
}
if( m_smpteTiming )
{
// SMPTE timing
// doesnt change
skip( len );
}
else
{
/* event = new_event(track, 0);
event->type = SND_SEQ_EVENT_TEMPO;
event->port = port;
event->tick = tick;
event->data.tempo = read_byte() << 16;
event->data.tempo |= read_byte() << 8;
event->data.tempo |= read_byte();
skip( len -3 );*/
skip( len );
}
break;
default:// ignore all other
// meta events
skip( len );
break;
}
break;
default: // invalid Fx command
error();
return( FALSE );
}
break;
default: // cannot happen
error();
return( FALSE );
}
}
error();
return( FALSE );
}
void midiImport::error( void )
{
printf( "midiImport::readTrack(): invalid MIDI data (offset %#x)\n",
(unsigned int) file().pos() );
}
extern "C"
{
// neccessary for getting instance out of shared lib
plugin * lmms_plugin_main( void * _data )
{
return( new midiImport( static_cast<const char *>( _data ) ) );
}
}
#undef pos
#undef setValue

141
plugins/midi_import/midi_import.h Executable file
View File

@@ -0,0 +1,141 @@
/*
* midi_import_filter.h - support for importing MIDI-files
*
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _MIDI_IMPORT_H
#define _MIDI_IMPORT_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "qt3support.h"
#ifdef QT4
#include <QString>
#include <QPair>
#include <QVector>
#else
#include <qstring.h>
#include <qpair.h>
#include <qvaluevector.h>
#endif
#include "midi.h"
#include "import_filter.h"
class midiImport : public importFilter
{
public:
midiImport( const QString & _file );
virtual ~midiImport();
private:
virtual bool tryImport( trackContainer * _tc );
bool FASTCALL readSMF( trackContainer * _tc );
bool FASTCALL readRIFF( trackContainer * _tc );
bool FASTCALL readTrack( int _track_end );
void error( void );
inline int readInt( int _bytes )
{
int c, value = 0;
do
{
c = readByte();
if( c == -1 )
{
return( -1 );
}
value = ( value << 8 ) | c;
} while( --_bytes );
return( value );
}
inline Sint32 read32LE( void )
{
int value = readByte();
value |= readByte() << 8;
value |= readByte() << 16;
value |= readByte() << 24;
return( value );
}
inline int readVar( void )
{
int c = readByte();
int value = c & 0x7f;
if( c & 0x80 )
{
c = readByte();
value = ( value << 7 ) | ( c & 0x7f );
if( c & 0x80 )
{
c = readByte();
value = ( value << 7 ) | ( c & 0x7f );
if( c & 0x80 )
{
c = readByte();
value = ( value << 7 ) | c;
if( c & 0x80 )
{
return -1;
}
}
}
}
return( !file().atEnd() ? value : -1 );
}
inline Sint32 readID( void )
{
return( read32LE() );
}
inline void skip( int _bytes )
{
while( _bytes > 0 )
{
readByte();
--_bytes;
}
}
typedef vvector<QPair<int, midiEvent> > eventVector;
eventVector m_events;
bool m_smpteTiming;
} ;
#endif

View File

@@ -28,13 +28,11 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QButtonGroup>
#include <QBitmap>
#include <QPainter>
#else
#include <qbuttongroup.h>
#include <qbitmap.h>
#include <qpainter.h>
#include <qdom.h>
@@ -50,11 +48,13 @@
#include "channel_track.h"
#include "note_play_handle.h"
#include "knob.h"
#include "pixmap_button.h"
#include "buffer_allocator.h"
#include "debug.h"
#include "tooltip.h"
#include "sample_buffer.h"
#include "automatable_button.h"
#include "pixmap_button.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
@@ -98,165 +98,116 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
#endif
m_fm1OscBtn = new pixmapButton( this );
m_fm1OscBtn->move( 80, 50 );
m_fm1OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * fm_osc1_btn = new pixmapButton( this, eng() );
fm_osc1_btn->move( 80, 50 );
fm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"fm_active" ) );
m_fm1OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
fm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"fm_inactive" ) );
m_fm1OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
fm_osc1_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
createHeuristicMask() ) );
connect( m_fm1OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( fm1BtnToggled( bool ) ) );
toolTip::add( m_fm1OscBtn, tr( "use frequency modulation for "
toolTip::add( fm_osc1_btn, tr( "use frequency modulation for "
"modulating oscillator 2 with "
"oscillator 1" ) );
m_am1OscBtn = new pixmapButton( this );
m_am1OscBtn->move( 120, 50 );
m_am1OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * am_osc1_btn = new pixmapButton( this, eng() );
am_osc1_btn->move( 120, 50 );
am_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"am_active" ) );
m_am1OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
am_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"am_inactive" ) );
m_am1OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
am_osc1_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
createHeuristicMask() ) );
connect( m_am1OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( am1BtnToggled( bool ) ) );
toolTip::add( m_am1OscBtn, tr( "use amplitude modulation for "
toolTip::add( am_osc1_btn, tr( "use amplitude modulation for "
"modulating oscillator 2 with "
"oscillator 1" ) );
m_mix1OscBtn = new pixmapButton( this );
m_mix1OscBtn->move( 160, 50 );
m_mix1OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * mix_osc1_btn = new pixmapButton( this, eng() );
mix_osc1_btn->move( 160, 50 );
mix_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"mix_active" ) );
m_mix1OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
mix_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"mix_inactive" ) );
m_mix1OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
mix_osc1_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
"btn_mask" ).createHeuristicMask() ) );
connect( m_mix1OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( mix1BtnToggled( bool ) ) );
toolTip::add( m_mix1OscBtn, tr( "mix output of oscillator 1 & 2" ) );
toolTip::add( mix_osc1_btn, tr( "mix output of oscillator 1 & 2" ) );
m_sync1OscBtn = new pixmapButton( this );
m_sync1OscBtn->move( 200, 50 );
m_sync1OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * sync_osc1_btn = new pixmapButton( this, eng() );
sync_osc1_btn->move( 200, 50 );
sync_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"sync_active" ) );
m_sync1OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
sync_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"sync_inactive" ) );
m_sync1OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
sync_osc1_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
"btn_mask" ).createHeuristicMask() ) );
connect( m_sync1OscBtn, SIGNAL( toggled( bool ) ), this, SLOT(
sync1BtnToggled( bool ) ) );
toolTip::add( m_sync1OscBtn, tr( "synchronize oscillator 1 with "
toolTip::add( sync_osc1_btn, tr( "synchronize oscillator 1 with "
"oscillator 2" ) );
if( m_modulationAlgo1 == oscillator::FREQ_MODULATION )
{
m_fm1OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo1 == oscillator::AMP_MODULATION )
{
m_am1OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo1 == oscillator::MIX )
{
m_mix1OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo1 == oscillator::SYNC )
{
m_sync1OscBtn->setChecked( TRUE );
}
m_mod1BtnGrp = new automatableButtonGroup( this, eng() );
m_mod1BtnGrp->addButton( fm_osc1_btn );
m_mod1BtnGrp->addButton( am_osc1_btn );
m_mod1BtnGrp->addButton( mix_osc1_btn );
m_mod1BtnGrp->addButton( sync_osc1_btn );
m_mod1BtnGrp->setInitValue( m_modulationAlgo1 );
QButtonGroup * modulation_algo_group1 = new QButtonGroup( this );
modulation_algo_group1->addButton( m_fm1OscBtn );
modulation_algo_group1->addButton( m_am1OscBtn );
modulation_algo_group1->addButton( m_mix1OscBtn );
modulation_algo_group1->addButton( m_sync1OscBtn );
modulation_algo_group1->setExclusive( TRUE );
#ifndef QT4
modulation_algo_group1->hide();
#endif
connect( m_mod1BtnGrp, SIGNAL( valueChanged( int ) ),
this, SLOT( mod1Ch( int ) ) );
m_fm2OscBtn = new pixmapButton( this );
m_fm2OscBtn->move( 80, 70 );
m_fm2OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * fm_osc2_btn = new pixmapButton( this, eng() );
fm_osc2_btn->move( 80, 70 );
fm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"fm_active" ) );
m_fm2OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
fm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"fm_inactive" ) );
m_fm2OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
fm_osc2_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
createHeuristicMask() ) );
connect( m_fm2OscBtn, SIGNAL( toggled( bool ) ), this, SLOT(
fm2BtnToggled( bool ) ) );
toolTip::add( m_fm2OscBtn, tr( "use frequency modulation for "
toolTip::add( fm_osc2_btn, tr( "use frequency modulation for "
"modulating oscillator 3 with "
"oscillator 2" ) );
m_am2OscBtn = new pixmapButton( this );
m_am2OscBtn->move( 120, 70 );
m_am2OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * am_osc2_btn = new pixmapButton( this, eng() );
am_osc2_btn->move( 120, 70 );
am_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"am_active" ) );
m_am2OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
am_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"am_inactive" ) );
m_am2OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
am_osc2_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap( "btn_mask" ).
createHeuristicMask() ) );
connect( m_am2OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( am2BtnToggled( bool ) ) );
toolTip::add( m_am2OscBtn, tr( "use amplitude modulation for "
toolTip::add( am_osc2_btn, tr( "use amplitude modulation for "
"modulating oscillator 3 with "
"oscillator 2" ) );
m_mix2OscBtn = new pixmapButton( this );
m_mix2OscBtn->move( 160, 70 );
m_mix2OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * mix_osc2_btn = new pixmapButton( this, eng() );
mix_osc2_btn->move( 160, 70 );
mix_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"mix_active" ) );
m_mix2OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
mix_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"mix_inactive" ) );
m_mix2OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
mix_osc2_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
"btn_mask" ).createHeuristicMask() ) );
connect( m_mix2OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( mix2BtnToggled( bool ) ) );
toolTip::add( m_mix2OscBtn, tr("mix output of oscillator 2 & 3" ) );
toolTip::add( mix_osc2_btn, tr("mix output of oscillator 2 & 3" ) );
m_sync2OscBtn = new pixmapButton( this );
m_sync2OscBtn->move( 200, 70 );
m_sync2OscBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
pixmapButton * sync_osc2_btn = new pixmapButton( this, eng() );
sync_osc2_btn->move( 200, 70 );
sync_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"sync_active" ) );
m_sync2OscBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
sync_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"sync_inactive" ) );
m_sync2OscBtn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
sync_osc2_btn->setMask( QBitmap( PLUGIN_NAME::getIconPixmap(
"btn_mask" ).createHeuristicMask() ) );
connect( m_sync2OscBtn, SIGNAL( toggled( bool ) ), this,
SLOT( sync2BtnToggled( bool ) ) );
toolTip::add( m_sync2OscBtn, tr( "synchronize oscillator 2 with "
toolTip::add( sync_osc2_btn, tr( "synchronize oscillator 2 with "
"oscillator 3" ) );
if( m_modulationAlgo2 == oscillator::FREQ_MODULATION )
{
m_fm2OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo2 == oscillator::AMP_MODULATION )
{
m_am2OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo2 == oscillator::MIX )
{
m_mix2OscBtn->setChecked( TRUE );
}
else if( m_modulationAlgo2 == oscillator::SYNC )
{
m_sync2OscBtn->setChecked( TRUE );
}
m_mod2BtnGrp = new automatableButtonGroup( this, eng() );
m_mod2BtnGrp->addButton( fm_osc2_btn );
m_mod2BtnGrp->addButton( am_osc2_btn );
m_mod2BtnGrp->addButton( mix_osc2_btn );
m_mod2BtnGrp->addButton( sync_osc2_btn );
m_mod2BtnGrp->setInitValue( m_modulationAlgo2 );
QButtonGroup * modulation_algo_group2 = new QButtonGroup( this );
modulation_algo_group2->addButton( m_fm2OscBtn );
modulation_algo_group2->addButton( m_am2OscBtn );
modulation_algo_group2->addButton( m_mix2OscBtn );
modulation_algo_group2->addButton( m_sync2OscBtn );
modulation_algo_group2->setExclusive( TRUE );
#ifndef QT4
modulation_algo_group2->hide();
#endif
connect( m_mod2BtnGrp, SIGNAL( valueChanged( int ) ),
this, SLOT( mod2Ch( int ) ) );
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
@@ -419,78 +370,78 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
"channel. This is very good for creating wide "
"stereo-sounds." ).arg( i+1 ) );
m_osc[i].sinWaveBtn = new pixmapButton( this );
m_osc[i].sinWaveBtn->move( 188, 105 + i * 50 );
m_osc[i].sinWaveBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * sin_wave_btn = new pixmapButton( this, eng() );
sin_wave_btn->move( 188, 105 + i * 50 );
sin_wave_btn->setActiveGraphic( embed::getIconPixmap(
"sin_wave_active" ) );
m_osc[i].sinWaveBtn->setInactiveGraphic( embed::getIconPixmap(
sin_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"sin_wave_inactive" ) );
m_osc[i].sinWaveBtn->setChecked( TRUE );
toolTip::add( m_osc[i].sinWaveBtn,
sin_wave_btn->setChecked( TRUE );
toolTip::add( sin_wave_btn,
tr( "Click here if you want a sine-wave for "
"current oscillator." ) );
m_osc[i].triangleWaveBtn = new pixmapButton( this );
m_osc[i].triangleWaveBtn->move( 203, 105 + i * 50 );
m_osc[i].triangleWaveBtn->setActiveGraphic(
pixmapButton * triangle_wave_btn = new pixmapButton( this, eng() );
triangle_wave_btn->move( 203, 105 + i * 50 );
triangle_wave_btn->setActiveGraphic(
embed::getIconPixmap( "triangle_wave_active" ) );
m_osc[i].triangleWaveBtn->setInactiveGraphic(
triangle_wave_btn->setInactiveGraphic(
embed::getIconPixmap( "triangle_wave_inactive" ) );
toolTip::add( m_osc[i].triangleWaveBtn,
toolTip::add( triangle_wave_btn,
tr( "Click here if you want a triangle-wave "
"for current oscillator." ) );
m_osc[i].sawWaveBtn = new pixmapButton( this );
m_osc[i].sawWaveBtn->move( 218, 105 + i * 50 );
m_osc[i].sawWaveBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * saw_wave_btn = new pixmapButton( this, eng() );
saw_wave_btn->move( 218, 105 + i * 50 );
saw_wave_btn->setActiveGraphic( embed::getIconPixmap(
"saw_wave_active" ) );
m_osc[i].sawWaveBtn->setInactiveGraphic( embed::getIconPixmap(
saw_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"saw_wave_inactive" ) );
toolTip::add( m_osc[i].sawWaveBtn,
toolTip::add( saw_wave_btn,
tr( "Click here if you want a saw-wave for "
"current oscillator." ) );
m_osc[i].sqrWaveBtn = new pixmapButton( this );
m_osc[i].sqrWaveBtn->move( 233, 105 + i * 50 );
m_osc[i].sqrWaveBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * sqr_wave_btn = new pixmapButton( this, eng() );
sqr_wave_btn->move( 233, 105 + i * 50 );
sqr_wave_btn->setActiveGraphic( embed::getIconPixmap(
"square_wave_active" ) );
m_osc[i].sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap(
sqr_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
toolTip::add( m_osc[i].sqrWaveBtn,
toolTip::add( sqr_wave_btn,
tr( "Click here if you want a square-wave for "
"current oscillator." ) );
m_osc[i].moogSawWaveBtn = new pixmapButton( this );
m_osc[i].moogSawWaveBtn->move( 188, 120+i*50 );
m_osc[i].moogSawWaveBtn->setActiveGraphic(
pixmapButton * moog_saw_wave_btn = new pixmapButton( this, eng() );
moog_saw_wave_btn->move( 188, 120+i*50 );
moog_saw_wave_btn->setActiveGraphic(
embed::getIconPixmap( "moog_saw_wave_active" ) );
m_osc[i].moogSawWaveBtn->setInactiveGraphic(
moog_saw_wave_btn->setInactiveGraphic(
embed::getIconPixmap( "moog_saw_wave_inactive" ) );
toolTip::add( m_osc[i].moogSawWaveBtn,
toolTip::add( moog_saw_wave_btn,
tr( "Click here if you want a moog-saw-wave "
"for current oscillator." ) );
m_osc[i].expWaveBtn = new pixmapButton( this );
m_osc[i].expWaveBtn->move( 203, 120+i*50 );
m_osc[i].expWaveBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * exp_wave_btn = new pixmapButton( this, eng() );
exp_wave_btn->move( 203, 120+i*50 );
exp_wave_btn->setActiveGraphic( embed::getIconPixmap(
"exp_wave_active" ) );
m_osc[i].expWaveBtn->setInactiveGraphic( embed::getIconPixmap(
exp_wave_btn->setInactiveGraphic( embed::getIconPixmap(
"exp_wave_inactive" ) );
toolTip::add( m_osc[i].expWaveBtn,
toolTip::add( exp_wave_btn,
tr( "Click here if you want an exponential "
"wave for current oscillator." ) );
m_osc[i].whiteNoiseWaveBtn = new pixmapButton( this );
m_osc[i].whiteNoiseWaveBtn->move( 218, 120+i*50 );
m_osc[i].whiteNoiseWaveBtn->setActiveGraphic(
pixmapButton * white_noise_btn = new pixmapButton( this, eng() );
white_noise_btn->move( 218, 120+i*50 );
white_noise_btn->setActiveGraphic(
embed::getIconPixmap( "white_noise_wave_active" ) );
m_osc[i].whiteNoiseWaveBtn->setInactiveGraphic(
white_noise_btn->setInactiveGraphic(
embed::getIconPixmap( "white_noise_wave_inactive" ) );
toolTip::add( m_osc[i].whiteNoiseWaveBtn,
toolTip::add( white_noise_btn,
tr( "Click here if you want a white-noise for "
"current oscillator." ) );
m_osc[i].usrWaveBtn = new pixmapButton( this );
m_osc[i].usrWaveBtn = new pixmapButton( this, eng() );
m_osc[i].usrWaveBtn->move( 233, 120+i*50 );
m_osc[i].usrWaveBtn->setActiveGraphic( embed::getIconPixmap(
"usr_wave_active" ) );
@@ -500,109 +451,42 @@ tripleOscillator::tripleOscillator( channelTrack * _channel_track ) :
tr( "Click here if you want a user-defined "
"wave-shape for current oscillator." ) );
QButtonGroup * wave_btn_group = new QButtonGroup( this );
wave_btn_group->addButton( m_osc[i].sinWaveBtn );
wave_btn_group->addButton( m_osc[i].triangleWaveBtn );
wave_btn_group->addButton( m_osc[i].sawWaveBtn );
wave_btn_group->addButton( m_osc[i].sqrWaveBtn );
wave_btn_group->addButton( m_osc[i].moogSawWaveBtn );
wave_btn_group->addButton( m_osc[i].expWaveBtn );
wave_btn_group->addButton( m_osc[i].whiteNoiseWaveBtn );
wave_btn_group->addButton( m_osc[i].usrWaveBtn );
wave_btn_group->setExclusive( TRUE );
#ifndef QT4
wave_btn_group->hide();
#endif
m_osc[i].waveBtnGrp = new automatableButtonGroup( this, eng() );
m_osc[i].waveBtnGrp->addButton( sin_wave_btn );
m_osc[i].waveBtnGrp->addButton( triangle_wave_btn );
m_osc[i].waveBtnGrp->addButton( saw_wave_btn );
m_osc[i].waveBtnGrp->addButton( sqr_wave_btn );
m_osc[i].waveBtnGrp->addButton( moog_saw_wave_btn );
m_osc[i].waveBtnGrp->addButton( exp_wave_btn );
m_osc[i].waveBtnGrp->addButton( white_noise_btn );
m_osc[i].waveBtnGrp->addButton( m_osc[i].usrWaveBtn );
if( i == 0 )
{ // Osc 1
connect( m_osc[i].sinWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01SinWaveCh( bool ) ) );
connect( m_osc[i].triangleWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01TriangleWaveCh( bool ) ) );
connect( m_osc[i].sawWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01SawWaveCh( bool ) ) );
connect( m_osc[i].sqrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01SquareWaveCh( bool ) ) );
connect( m_osc[i].moogSawWaveBtn,
SIGNAL(toggled( bool ) ), this,
SLOT( osc01MoogSawWaveCh( bool ) ) );
connect( m_osc[i].expWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01ExpWaveCh( bool ) ) );
connect( m_osc[i].whiteNoiseWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01WhiteNoiseCh( bool ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc01UserDefWaveCh( bool ) ) );
{
connect( m_osc[i].waveBtnGrp,
SIGNAL( valueChanged( int ) ),
this, SLOT( osc0WaveCh( int ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( doubleClicked() ), this,
SLOT( osc01UserDefWaveDblClick() ) );
SLOT( osc0UserDefWaveDblClick() ) );
}
else if( i == 1 )
{ // Osc 2
connect( m_osc[i].sinWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02SinWaveCh( bool ) ) );
connect( m_osc[i].triangleWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02TriangleWaveCh( bool ) ) );
connect( m_osc[i].sawWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02SawWaveCh( bool ) ) );
connect( m_osc[i].sqrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02SquareWaveCh( bool ) ) );
connect( m_osc[i].moogSawWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02MoogSawWaveCh( bool ) ) );
connect( m_osc[i].expWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02ExpWaveCh( bool ) ) );
connect( m_osc[i].whiteNoiseWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02WhiteNoiseCh( bool ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc02UserDefWaveCh( bool ) ) );
{
connect( m_osc[i].waveBtnGrp,
SIGNAL( valueChanged( int ) ),
this, SLOT( osc1WaveCh( int ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( doubleClicked() ), this,
SLOT( osc02UserDefWaveDblClick() ) );
SLOT( osc1UserDefWaveDblClick() ) );
}
else if( i == 2 )
{ // Osc 3
connect( m_osc[i].sinWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03SinWaveCh( bool ) ) );
connect( m_osc[i].triangleWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03TriangleWaveCh( bool ) ) );
connect( m_osc[i].sawWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03SawWaveCh( bool ) ) );
connect( m_osc[i].sqrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03SquareWaveCh( bool ) ) );
connect( m_osc[i].moogSawWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03MoogSawWaveCh( bool ) ) );
connect( m_osc[i].expWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03ExpWaveCh( bool ) ) );
connect( m_osc[i].whiteNoiseWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03WhiteNoiseCh( bool ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( toggled( bool ) ), this,
SLOT( osc03UserDefWaveCh( bool ) ) );
{
connect( m_osc[i].waveBtnGrp,
SIGNAL( valueChanged( int ) ),
this, SLOT( osc2WaveCh( int ) ) );
connect( m_osc[i].usrWaveBtn,
SIGNAL( doubleClicked() ), this,
SLOT( osc03UserDefWaveDblClick() ) );
SLOT( osc2UserDefWaveDblClick() ) );
}
}
}
@@ -664,8 +548,8 @@ void tripleOscillator::loadSettings( const QDomElement & _this )
m_modulationAlgo2 = static_cast<oscillator::modulationAlgos>(
_this.attribute( "modalgo2" ).toInt() );
getModulationButton( m_modulationAlgo1, 1 )->setChecked( TRUE );
getModulationButton( m_modulationAlgo2, 2 )->setChecked( TRUE );
m_mod1BtnGrp->setInitValue( m_modulationAlgo1 );
m_mod2BtnGrp->setInitValue( m_modulationAlgo2 );
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
{
@@ -686,36 +570,8 @@ void tripleOscillator::loadSettings( const QDomElement & _this )
"stphdetun" + is ).toFloat() );
m_osc[i].m_sampleBuffer->setAudioFile( _this.attribute(
"userwavefile" + is ) );
switch( _this.attribute( "wavetype" + is ).toInt() )
{
case oscillator::TRIANGLE_WAVE:
m_osc[i].triangleWaveBtn->setChecked( TRUE );
break;
case oscillator::SAW_WAVE:
m_osc[i].sawWaveBtn->setChecked( TRUE );
break;
case oscillator::SQUARE_WAVE:
m_osc[i].sqrWaveBtn->setChecked( TRUE );
break;
case oscillator::MOOG_SAW_WAVE:
m_osc[i].moogSawWaveBtn->setChecked( TRUE );
break;
case oscillator::EXP_WAVE:
m_osc[i].expWaveBtn->setChecked( TRUE );
break;
case oscillator::WHITE_NOISE_WAVE:
m_osc[i].whiteNoiseWaveBtn->setChecked( TRUE );
break;
case oscillator::USER_DEF_WAVE:
toolTip::add( m_osc[i].usrWaveBtn,
m_osc[i].m_sampleBuffer->audioFile() );
m_osc[i].usrWaveBtn->setChecked( TRUE );
break;
case oscillator::SIN_WAVE:
default:
m_osc[i].sinWaveBtn->setChecked( TRUE );
break;
}
m_osc[i].waveBtnGrp->setValue( _this.attribute( "wavetype" +
is ).toInt() );
}
}
@@ -863,26 +719,85 @@ void tripleOscillator::deleteNotePluginData( notePlayHandle * _n )
// now follows all the stupid UI-Code...
void tripleOscillator::setModulationAlgo(
oscillator::modulationAlgos _new_modulation_algo, int _n )
void tripleOscillator::osc0WaveCh( int _n )
{
if( _n == 1 )
{
m_modulationAlgo1 = _new_modulation_algo;
}
else
{
m_modulationAlgo2 = _new_modulation_algo;
}
eng()->getSongEditor()->setModified();
m_osc[0].waveShape = static_cast<oscillator::waveShapes>( _n );
}
void tripleOscillator::osc1WaveCh( int _n )
{
m_osc[1].waveShape = static_cast<oscillator::waveShapes>( _n );
}
void tripleOscillator::osc2WaveCh( int _n )
{
m_osc[2].waveShape = static_cast<oscillator::waveShapes>( _n );
}
void tripleOscillator::mod1Ch( int _n )
{
m_modulationAlgo1 = static_cast<oscillator::modulationAlgos>( _n );
}
void tripleOscillator::mod2Ch( int _n )
{
m_modulationAlgo2 = static_cast<oscillator::modulationAlgos>( _n );
}
void tripleOscillator::osc0UserDefWaveDblClick( void )
{
QString af = m_osc[0].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[0].m_sampleBuffer->setAudioFile( af );
toolTip::add( m_osc[0].usrWaveBtn,
m_osc[0].m_sampleBuffer->audioFile() );
}
}
void tripleOscillator::osc1UserDefWaveDblClick( void )
{
QString af = m_osc[1].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[1].m_sampleBuffer->setAudioFile( af );
toolTip::add( m_osc[1].usrWaveBtn,
m_osc[1].m_sampleBuffer->audioFile() );
}
}
void tripleOscillator::osc2UserDefWaveDblClick( void )
{
QString af = m_osc[2].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[2].m_sampleBuffer->setAudioFile( af );
toolTip::add( m_osc[2].usrWaveBtn,
m_osc[2].m_sampleBuffer->audioFile() );
}
}
oscillator::modulationAlgos tripleOscillator::getModulationAlgo( int _n )
{
if( _n == 1 )
@@ -898,337 +813,6 @@ oscillator::modulationAlgos tripleOscillator::getModulationAlgo( int _n )
void tripleOscillator::doSinWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::SIN_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doTriangleWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::TRIANGLE_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doSawWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::SAW_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doSqrWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::SQUARE_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doMoogSawWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::MOOG_SAW_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doExpWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::EXP_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doWhiteNoiseWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::WHITE_NOISE_WAVE;
eng()->getSongEditor()->setModified();
}
void tripleOscillator::doUsrWaveBtn( oscillatorData * _osc )
{
_osc->waveShape = oscillator::USER_DEF_WAVE;
eng()->getSongEditor()->setModified();
}
// Slots for Osc 1
void tripleOscillator::osc01SinWaveCh( bool _on )
{
if( _on ) doSinWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01TriangleWaveCh( bool _on )
{
if( _on ) doTriangleWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01SawWaveCh( bool _on )
{
if( _on ) doSawWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01SquareWaveCh( bool _on )
{
if( _on ) doSqrWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01MoogSawWaveCh( bool _on )
{
if( _on ) doMoogSawWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01ExpWaveCh( bool _on )
{
if( _on ) doExpWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01WhiteNoiseCh( bool _on )
{
if( _on ) doWhiteNoiseWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01UserDefWaveCh( bool _on )
{
if( _on ) doUsrWaveBtn( &m_osc[0] );
}
void tripleOscillator::osc01UserDefWaveDblClick( void )
{
QString af = m_osc[0].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[0].m_sampleBuffer->setAudioFile( af );
/*#ifndef QT4
toolTip::remove( m_osc[0].usrWaveBtn );
#endif*/
toolTip::add( m_osc[0].usrWaveBtn,
m_osc[0].m_sampleBuffer->audioFile() );
}
}
// Slots for Osc 2
void tripleOscillator::osc02SinWaveCh( bool _on )
{
if( _on ) doSinWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02TriangleWaveCh( bool _on )
{
if( _on ) doTriangleWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02SawWaveCh( bool _on )
{
if( _on ) doSawWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02SquareWaveCh( bool _on )
{
if( _on ) doSqrWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02MoogSawWaveCh( bool _on )
{
if( _on ) doMoogSawWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02ExpWaveCh( bool _on )
{
if( _on ) doExpWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02WhiteNoiseCh( bool _on )
{
if( _on ) doWhiteNoiseWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02UserDefWaveCh( bool _on )
{
if( _on ) doUsrWaveBtn( &m_osc[1] );
}
void tripleOscillator::osc02UserDefWaveDblClick( void )
{
QString af = m_osc[1].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[1].m_sampleBuffer->setAudioFile( af );
/*#ifndef QT4
toolTip::remove( m_osc[1].usrWaveBtn );
#endif*/
toolTip::add( m_osc[1].usrWaveBtn,
m_osc[1].m_sampleBuffer->audioFile() );
}
}
// Slots for Osc 3
void tripleOscillator::osc03SinWaveCh( bool _on )
{
if( _on ) doSinWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03TriangleWaveCh( bool _on )
{
if( _on ) doTriangleWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03SawWaveCh( bool _on )
{
if( _on ) doSawWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03SquareWaveCh( bool _on )
{
if( _on ) doSqrWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03MoogSawWaveCh( bool _on )
{
if( _on ) doMoogSawWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03ExpWaveCh( bool _on )
{
if( _on ) doExpWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03WhiteNoiseCh( bool _on )
{
if( _on ) doWhiteNoiseWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03UserDefWaveCh( bool _on )
{
if( _on ) doUsrWaveBtn( &m_osc[2] );
}
void tripleOscillator::osc03UserDefWaveDblClick( void )
{
QString af = m_osc[2].m_sampleBuffer->openAudioFile();
if( af != "" )
{
m_osc[2].m_sampleBuffer->setAudioFile( af );
/*#ifndef QT4
toolTip::remove( m_osc[2].usrWaveBtn );
#endif*/
toolTip::add( m_osc[2].usrWaveBtn,
m_osc[2].m_sampleBuffer->audioFile() );
}
}
void tripleOscillator::fm1BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::FREQ_MODULATION, 1 );
}
void tripleOscillator::am1BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::AMP_MODULATION, 1 );
}
void tripleOscillator::mix1BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::MIX, 1 );
}
void tripleOscillator::sync1BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::SYNC, 1 );
}
void tripleOscillator::fm2BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::FREQ_MODULATION, 2 );
}
void tripleOscillator::am2BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::AMP_MODULATION, 2 );
}
void tripleOscillator::mix2BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::MIX, 2 );
}
void tripleOscillator::sync2BtnToggled( bool _on )
{
if( _on ) setModulationAlgo( oscillator::SYNC, 2 );
}
pixmapButton * tripleOscillator::getModulationButton(
oscillator::modulationAlgos _modulation_algo, int _n )
{
if( _n == 1 )
{
switch( _modulation_algo )
{
case oscillator::FREQ_MODULATION: return( m_fm1OscBtn );
case oscillator::AMP_MODULATION: return( m_am1OscBtn );
case oscillator::MIX: return( m_mix1OscBtn );
case oscillator::SYNC: return( m_sync1OscBtn );
}
}
else
{
switch( _modulation_algo )
{
case oscillator::FREQ_MODULATION: return( m_fm2OscBtn );
case oscillator::AMP_MODULATION: return( m_am2OscBtn );
case oscillator::MIX: return( m_mix2OscBtn );
case oscillator::SYNC: return( m_sync2OscBtn );
}
}
#ifdef LMMS_DEBUG
// there's something really not ok, if this case occurs, so let's exit
assert( 1 != 1 );
#endif
return( NULL );
}
extern "C"
{

View File

@@ -31,9 +31,10 @@
#include "oscillator.h"
class automatableButtonGroup;
class knob;
class pixmapButton;
class notePlayHandle;
class pixmapButton;
class sampleBuffer;
@@ -44,7 +45,7 @@ class tripleOscillator : public instrument
{
Q_OBJECT
public:
tripleOscillator( channelTrack * _channel ) FASTCALL;
tripleOscillator( channelTrack * _channel );
virtual ~tripleOscillator();
virtual void FASTCALL playNote( notePlayHandle * _n );
@@ -59,49 +60,15 @@ public:
protected slots:
// Slots for Osc 1
void osc01SinWaveCh( bool _on );
void osc01TriangleWaveCh( bool _on );
void osc01SawWaveCh( bool _on );
void osc01SquareWaveCh( bool _on );
void osc01MoogSawWaveCh( bool _on );
void osc01ExpWaveCh( bool _on );
void osc01WhiteNoiseCh( bool _on );
void osc01UserDefWaveCh( bool _on );
void osc01UserDefWaveDblClick( void );
void osc0WaveCh( int _n );
void osc1WaveCh( int _n );
void osc2WaveCh( int _n );
void osc0UserDefWaveDblClick( void );
void osc1UserDefWaveDblClick( void );
void osc2UserDefWaveDblClick( void );
// Slots for Osc 2
void osc02SinWaveCh( bool _on );
void osc02TriangleWaveCh( bool _on );
void osc02SawWaveCh( bool _on );
void osc02SquareWaveCh( bool _on );
void osc02MoogSawWaveCh( bool _on );
void osc02ExpWaveCh( bool _on );
void osc02WhiteNoiseCh( bool _on );
void osc02UserDefWaveCh( bool _on );
void osc02UserDefWaveDblClick( void );
// Slots for Osc 3
void osc03SinWaveCh( bool _on );
void osc03TriangleWaveCh( bool _on );
void osc03SawWaveCh( bool _on );
void osc03SquareWaveCh( bool _on );
void osc03MoogSawWaveCh( bool _on );
void osc03ExpWaveCh( bool _on );
void osc03WhiteNoiseCh( bool _on );
void osc03UserDefWaveCh( bool _on );
void osc03UserDefWaveDblClick( void );
// modulation-type-button slots
void fm1BtnToggled( bool _on );
void am1BtnToggled( bool _on );
void mix1BtnToggled( bool _on );
void sync1BtnToggled( bool _on );
void fm2BtnToggled( bool _on );
void am2BtnToggled( bool _on );
void mix2BtnToggled( bool _on );
void sync2BtnToggled( bool _on );
void mod1Ch( int _n );
void mod2Ch( int _n );
private:
@@ -117,13 +84,7 @@ private:
knob * fineRKnob;
knob * phaseOffsetKnob;
knob * stereoPhaseDetuningKnob;
pixmapButton * sinWaveBtn;
pixmapButton * triangleWaveBtn;
pixmapButton * sawWaveBtn;
pixmapButton * sqrWaveBtn;
pixmapButton * moogSawWaveBtn;
pixmapButton * expWaveBtn;
pixmapButton * whiteNoiseWaveBtn;
automatableButtonGroup * waveBtnGrp;
pixmapButton * usrWaveBtn;
sampleBuffer * m_sampleBuffer;
} m_osc[NUM_OF_OSCILLATORS];
@@ -135,33 +96,18 @@ private:
} ;
void FASTCALL doSinWaveBtn( oscillatorData * _osc );
void FASTCALL doTriangleWaveBtn( oscillatorData * _osc );
void FASTCALL doSawWaveBtn( oscillatorData * _osc );
void FASTCALL doSqrWaveBtn( oscillatorData * _osc );
void FASTCALL doMoogSawWaveBtn( oscillatorData * _osc );
void FASTCALL doExpWaveBtn( oscillatorData * _osc );
void FASTCALL doWhiteNoiseWaveBtn( oscillatorData * _osc );
void FASTCALL doUsrWaveBtn( oscillatorData * _osc );
pixmapButton * FASTCALL getModulationButton(
oscillator::modulationAlgos _modulation_algo, int _n );
void FASTCALL setModulationAlgo(
oscillator::modulationAlgos _new_modulation_algo, int _n );
/* pixmapButton * FASTCALL getModulationButton(
oscillator::modulationAlgos _modulation_algo, int _n );*/
/* void FASTCALL setModulationAlgo(
oscillator::modulationAlgos _new_modulation_algo, int _n );*/
oscillator::modulationAlgos FASTCALL getModulationAlgo( int _n );
pixmapButton * m_fm1OscBtn;
pixmapButton * m_am1OscBtn;
pixmapButton * m_mix1OscBtn;
pixmapButton * m_sync1OscBtn;
pixmapButton * m_fm2OscBtn;
pixmapButton * m_am2OscBtn;
pixmapButton * m_mix2OscBtn;
pixmapButton * m_sync2OscBtn;
oscillator::modulationAlgos m_modulationAlgo1;
oscillator::modulationAlgos m_modulationAlgo2;
automatableButtonGroup * m_mod1BtnGrp;
automatableButtonGroup * m_mod2BtnGrp;
} ;

View File

@@ -110,7 +110,7 @@ vestigeInstrument::vestigeInstrument( channelTrack * _channel_track ) :
connect( eng()->getSongEditor(), SIGNAL( tempoChanged( bpm_t ) ),
this, SLOT( changeTempo( bpm_t ) ) );
m_openPluginButton = new pixmapButton( this );
m_openPluginButton = new pixmapButton( this, eng() );
m_openPluginButton->setCheckable( FALSE );
m_openPluginButton->setCursor( Qt::PointingHandCursor );
m_openPluginButton->move( 200, 70 );

View File

@@ -459,7 +459,7 @@ audioALSA::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setGeometry( 10, 40, 160, 10 );
m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1,
this );
this, NULL );
m_channels->setStep( 2 );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->setValue( configManager::inst()->value( "audioalsa",

View File

@@ -450,7 +450,7 @@ audioJACK::setupWidget::setupWidget( QWidget * _parent ) :
cn_lbl->setGeometry( 10, 40, 160, 10 );
m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1,
this );
this, NULL );
m_channels->setStep( 2 );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->setValue( configManager::inst()->value( "audiojack",

View File

@@ -354,7 +354,7 @@ audioOSS::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setGeometry( 10, 40, 160, 10 );
m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1,
this );
this, NULL );
m_channels->setStep( 2 );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->setValue( configManager::inst()->value( "audiooss",

View File

@@ -31,12 +31,10 @@
#ifdef QT4
#include <Qt/QtXml>
#include <QButtonGroup>
#include <QLabel>
#else
#include <qbuttongroup.h>
#include <qdom.h>
#include <qlabel.h>
#include <qwhatsthis.h>
@@ -199,15 +197,14 @@ const int ARP_GROUPBOX_HEIGHT = 240 - ARP_GROUPBOX_Y;
arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
QWidget( _channel_track->tabWidgetParent() ),
settings(),
engineObject( _channel_track->eng() ),
m_arpDirection( UP )
engineObject( _channel_track->eng() )
{
m_chordsGroupBox = new groupBox( tr( "CHORDS" ), this );
m_chordsGroupBox = new groupBox( tr( "CHORDS" ), this, eng() );
m_chordsGroupBox->setGeometry( CHORDS_GROUPBOX_X, CHORDS_GROUPBOX_Y,
CHORDS_GROUPBOX_WIDTH,
CHORDS_GROUPBOX_HEIGHT );
m_chordsComboBox = new comboBox( m_chordsGroupBox );
m_chordsComboBox = new comboBox( m_chordsGroupBox, eng() );
m_chordsComboBox->setFont( pointSize<8>( m_chordsComboBox->font() ) );
m_chordsComboBox->setGeometry( 10, 25, 140, 22 );
@@ -240,7 +237,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_arpGroupBox = new groupBox( tr( "ARPEGGIO" ), this );
m_arpGroupBox = new groupBox( tr( "ARPEGGIO" ), this, eng() );
m_arpGroupBox->setGeometry( ARP_GROUPBOX_X, ARP_GROUPBOX_Y,
ARP_GROUPBOX_WIDTH,
ARP_GROUPBOX_HEIGHT );
@@ -258,7 +255,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
"not played at the same time. Typical arpeggios are "
"major or minor triads. But there're a lot of other "
"possible chords, you can select." ) );
m_arpComboBox = new comboBox( m_arpGroupBox );
m_arpComboBox = new comboBox( m_arpGroupBox, eng() );
m_arpComboBox->setFont( pointSize<8>( m_arpComboBox->font() ) );
m_arpComboBox->setGeometry( 10, 25, 140, 22 );
@@ -329,72 +326,67 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
m_arpUpBtn = new pixmapButton( m_arpGroupBox );
m_arpUpBtn->move( 10, 74 );
m_arpUpBtn->setActiveGraphic( embed::getIconPixmap( "arp_up_on" ) );
m_arpUpBtn->setInactiveGraphic( embed::getIconPixmap( "arp_up_off" ) );
m_arpUpBtn->setChecked( TRUE );
pixmapButton * arp_up_btn = new pixmapButton( m_arpGroupBox, eng() );
arp_up_btn->move( 10, 74 );
arp_up_btn->setActiveGraphic( embed::getIconPixmap( "arp_up_on" ) );
arp_up_btn->setInactiveGraphic( embed::getIconPixmap( "arp_up_off" ) );
#ifdef QT3
m_arpUpBtn->setBackgroundMode( Qt::PaletteBackground );
arp_up_btn->setBackgroundMode( Qt::PaletteBackground );
#endif
toolTip::add( m_arpUpBtn, tr( "arpeggio direction = up" ) );
connect( m_arpUpBtn, SIGNAL( toggled( bool ) ), this,
SLOT( arpUpToggled( bool ) ) );
toolTip::add( arp_up_btn, tr( "arpeggio direction = up" ) );
m_arpDownBtn = new pixmapButton( m_arpGroupBox );
m_arpDownBtn->move( 30, 74 );
m_arpDownBtn->setActiveGraphic( embed::getIconPixmap( "arp_down_on" ) );
m_arpDownBtn->setInactiveGraphic( embed::getIconPixmap(
pixmapButton * arp_down_btn = new pixmapButton( m_arpGroupBox, eng() );
arp_down_btn->move( 30, 74 );
arp_down_btn->setActiveGraphic( embed::getIconPixmap( "arp_down_on" ) );
arp_down_btn->setInactiveGraphic( embed::getIconPixmap(
"arp_down_off" ) );
#ifdef QT3
m_arpDownBtn->setBackgroundMode( Qt::PaletteBackground );
arp_down_btn->setBackgroundMode( Qt::PaletteBackground );
#endif
toolTip::add( m_arpDownBtn, tr( "arpeggio direction = down" ) );
connect( m_arpDownBtn, SIGNAL( toggled( bool ) ), this,
SLOT( arpDownToggled( bool ) ) );
toolTip::add( arp_down_btn, tr( "arpeggio direction = down" ) );
m_arpUpAndDownBtn = new pixmapButton( m_arpGroupBox );
m_arpUpAndDownBtn->move( 50, 74 );
m_arpUpAndDownBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * arp_up_and_down_btn = new pixmapButton( m_arpGroupBox,
eng() );
arp_up_and_down_btn->move( 50, 74 );
arp_up_and_down_btn->setActiveGraphic( embed::getIconPixmap(
"arp_up_and_down_on" ) );
m_arpUpAndDownBtn->setInactiveGraphic( embed::getIconPixmap(
arp_up_and_down_btn->setInactiveGraphic( embed::getIconPixmap(
"arp_up_and_down_off" ) );
#ifdef QT3
m_arpUpAndDownBtn->setBackgroundMode( Qt::PaletteBackground );
arp_up_and_down_btn->setBackgroundMode( Qt::PaletteBackground );
#endif
toolTip::add( m_arpUpAndDownBtn,
toolTip::add( arp_up_and_down_btn,
tr( "arpeggio direction = up and down" ) );
connect( m_arpUpAndDownBtn, SIGNAL( toggled( bool ) ), this,
SLOT( arpUpAndDownToggled( bool ) ) );
m_arpRandomBtn = new pixmapButton( m_arpGroupBox );
m_arpRandomBtn->move( 70, 74 );
m_arpRandomBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * arp_random_btn = new pixmapButton( m_arpGroupBox,
eng() );
arp_random_btn->move( 70, 74 );
arp_random_btn->setActiveGraphic( embed::getIconPixmap(
"arp_random_on" ) );
m_arpRandomBtn->setInactiveGraphic( embed::getIconPixmap(
arp_random_btn->setInactiveGraphic( embed::getIconPixmap(
"arp_random_off" ) );
#ifdef QT3
m_arpRandomBtn->setBackgroundMode( Qt::PaletteBackground );
arp_random_btn->setBackgroundMode( Qt::PaletteBackground );
#endif
toolTip::add( m_arpRandomBtn, tr( "arpeggio direction = random" ) );
connect( m_arpRandomBtn, SIGNAL( toggled( bool ) ), this,
SLOT( arpRandomToggled( bool ) ) );
toolTip::add( arp_random_btn, tr( "arpeggio direction = random" ) );
m_arpDirectionBtnGrp = new automatableButtonGroup( this, eng() );
m_arpDirectionBtnGrp->addButton( arp_up_btn );
m_arpDirectionBtnGrp->addButton( arp_down_btn );
m_arpDirectionBtnGrp->addButton( arp_up_and_down_btn );
m_arpDirectionBtnGrp->addButton( arp_random_btn );
m_arpDirectionBtnGrp->setInitValue( UP - 1 );
QButtonGroup * m_arpDirections_group = new QButtonGroup( this );
m_arpDirections_group->addButton( m_arpUpBtn );
m_arpDirections_group->addButton( m_arpDownBtn );
m_arpDirections_group->addButton( m_arpUpAndDownBtn );
m_arpDirections_group->addButton( m_arpRandomBtn );
m_arpDirections_group->setExclusive( TRUE );
#ifdef QT3
m_arpDirections_group->hide();
#endif
QLabel * mode_lbl = new QLabel( tr( "Mode:" ), m_arpGroupBox );
mode_lbl->setGeometry( 10, 104, 64, 10 );
mode_lbl->setFont( pointSize<7>( mode_lbl->font() ) );
m_arpModeComboBox = new comboBox( m_arpGroupBox );
m_arpModeComboBox = new comboBox( m_arpGroupBox, eng() );
m_arpModeComboBox->setFont( pointSize<8>( m_arpModeComboBox->font() ) );
m_arpModeComboBox->setGeometry( 10, 118, 128, 22 );
@@ -404,7 +396,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( channelTrack * _channel_track ) :
embed::getIconPixmap( "arp_sort" ) );
m_arpModeComboBox->addItem( tr( "Sync" ),
embed::getIconPixmap( "arp_sync" ) );
m_arpModeComboBox->setCurrentIndex( 0 );
//m_arpModeComboBox->setValue( 0 );
}
@@ -431,7 +423,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
m_chordsGroupBox->isActive() == TRUE )
{
// then insert sub-notes for chord
const int selected_chord = m_chordsComboBox->currentIndex();
const int selected_chord = m_chordsComboBox->value();
for( int octave_cnt = 0;
octave_cnt < m_chordRangeKnob->value(); ++octave_cnt )
@@ -480,7 +472,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// now follows code for arpeggio
if( _n->baseNote() == FALSE || m_arpDirection == OFF ||
if( _n->baseNote() == FALSE || m_arpDirectionBtnGrp->value() == OFF ||
!m_arpGroupBox->isActive() ||
( _n->released() && _n->releaseFramesDone() >=
_n->actualReleaseFramesToDo() ) )
@@ -489,11 +481,11 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
}
const int selected_arp = m_arpComboBox->currentIndex();
const int selected_arp = m_arpComboBox->value();
constNotePlayHandleVector cnphv = notePlayHandle::nphsOfChannelTrack(
_n->getChannelTrack() );
if( m_arpModeComboBox->currentIndex() != FREE && cnphv.size() == 0 )
if( m_arpModeComboBox->value() != FREE && cnphv.size() == 0 )
{
// maybe we're playing only a preset-preview-note?
cnphv = presetPreviewPlayHandle::nphsOfChannelTrack(
@@ -519,7 +511,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// used for calculating remaining frames for arp-note, we have to add
// arp_frames-1, otherwise the first arp-note will not be setup
// correctly... -> arp_frames frames silence at the start of every note!
int cur_frame = ( ( m_arpModeComboBox->currentIndex() != FREE ) ?
int cur_frame = ( ( m_arpModeComboBox->value() != FREE ) ?
cnphv.first()->totalFramesPlayed() :
_n->totalFramesPlayed() )
+ arp_frames - 1;
@@ -543,7 +535,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// init with zero
int cur_arp_idx = 0;
if( m_arpModeComboBox->currentIndex() == SORT &&
if( m_arpModeComboBox->value() == SORT &&
( ( cur_frame / arp_frames ) % total_range ) /
range != (Uint32) _n->index() )
{
@@ -553,17 +545,19 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
continue;
}
arpDirections dir = static_cast<arpDirections>(
m_arpDirectionBtnGrp->value() + 1 );
// process according to arpeggio-direction...
if( m_arpDirection == UP )
if( dir == UP )
{
cur_arp_idx = ( cur_frame / arp_frames ) % range;
}
else if( m_arpDirection == DOWN )
else if( dir == DOWN )
{
cur_arp_idx = range - ( cur_frame / arp_frames ) %
range - 1;
}
else if( m_arpDirection == UP_AND_DOWN && range > 1 )
else if( dir == UP_AND_DOWN && range > 1 )
{
// imagine, we had to play the arp once up and then
// once down -> makes 2 * range possible notes...
@@ -579,7 +573,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
( range - 1 ) - 1;
}
}
else if( m_arpDirection == RANDOM )
else if( dir == RANDOM )
{
// just pick a random chord-index
cur_arp_idx = (int)( range * ( (float) rand() /
@@ -619,7 +613,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// and is_arp_note=TRUE
notePlayHandle * note_play_handle = new notePlayHandle(
_n->getChannelTrack(),
( ( m_arpModeComboBox->currentIndex() !=
( ( m_arpModeComboBox->value() !=
FREE ) ?
cnphv.first()->framesAhead() :
_n->framesAhead() ) +
@@ -639,7 +633,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// make sure, note is handled as arp-base-note, even if we didn't add a
// sub-note so far
if( m_arpModeComboBox->currentIndex() != FREE )
if( m_arpModeComboBox->value() != FREE )
{
_n->setArpNote( TRUE );
}
@@ -653,19 +647,19 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
{
QDomElement act_de = _doc.createElement( nodeName() );
act_de.setAttribute( "chorddisabled", !m_chordsGroupBox->isActive() );
act_de.setAttribute( "chord", m_chordsComboBox->currentIndex() );
act_de.setAttribute( "chord", m_chordsComboBox->value() );
act_de.setAttribute( "chordrange", m_chordRangeKnob->value() );
act_de.setAttribute( "arpdisabled", !m_arpGroupBox->isActive() );
act_de.setAttribute( "arp", m_arpComboBox->currentIndex() );
act_de.setAttribute( "arp", m_arpComboBox->value() );
act_de.setAttribute( "arprange", m_arpRangeKnob->value() );
act_de.setAttribute( "arptime", m_arpTimeKnob->value() );
act_de.setAttribute( "arpgate", m_arpGateKnob->value() );
act_de.setAttribute( "arpdir", m_arpDirection );
act_de.setAttribute( "arpdir", m_arpDirectionBtnGrp->value() );
act_de.setAttribute( "arpsyncmode",
( int ) m_arpTimeKnob->getSyncMode() );
act_de.setAttribute( "arpmode", m_arpModeComboBox->currentIndex() );
act_de.setAttribute( "arpmode", m_arpModeComboBox->value() );
_parent.appendChild( act_de );
}
@@ -676,91 +670,27 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
{
m_chordsGroupBox->setState( !_this.attribute
( "chorddisabled" ).toInt() );
m_chordsComboBox->setCurrentIndex( _this.attribute( "chord" ).toInt() );
m_chordsComboBox->setValue( _this.attribute( "chord" ).toInt() );
m_chordRangeKnob->setValue( _this.attribute( "chordrange" ).toFloat() );
m_arpComboBox->setCurrentIndex( _this.attribute( "arp" ).toInt() );
m_arpComboBox->setValue( _this.attribute( "arp" ).toInt() );
m_arpRangeKnob->setValue( _this.attribute( "arprange" ).toFloat() );
m_arpTimeKnob->setValue( _this.attribute( "arptime" ).toFloat() );
m_arpGateKnob->setValue( _this.attribute( "arpgate" ).toFloat() );
m_arpDirection = static_cast<arpDirections>(
m_arpDirectionBtnGrp->setInitValue(
_this.attribute( "arpdir" ).toInt() );
m_arpTimeKnob->setSyncMode(
( tempoSyncKnob::tempoSyncMode ) _this.attribute(
"arpsyncmode" ).toInt() );
m_arpModeComboBox->setCurrentIndex( _this.attribute( "arpmode"
).toInt() );
m_arpModeComboBox->setValue( _this.attribute( "arpmode" ).toInt() );
m_arpGroupBox->setState( m_arpDirection != OFF &&
m_arpGroupBox->setState( m_arpDirectionBtnGrp->value() != OFF &&
!_this.attribute( "arpdisabled" ).toInt() );
switch( m_arpDirection )
{
case DOWN:
m_arpDownBtn->setChecked( TRUE );
break;
case UP_AND_DOWN:
m_arpUpAndDownBtn->setChecked( TRUE );
break;
case RANDOM:
m_arpRandomBtn->setChecked( TRUE );
break;
case UP:
default:
m_arpUpBtn->setChecked( TRUE );
m_arpDirection = UP;
break;
}
}
void arpAndChordsTabWidget::arpUpToggled( bool _on )
{
if( _on )
{
m_arpDirection = UP;
}
eng()->getSongEditor()->setModified();
}
void arpAndChordsTabWidget::arpDownToggled( bool _on )
{
if( _on )
{
m_arpDirection = DOWN;
}
eng()->getSongEditor()->setModified();
}
void arpAndChordsTabWidget::arpUpAndDownToggled( bool _on )
{
if( _on )
{
m_arpDirection = UP_AND_DOWN;
}
eng()->getSongEditor()->setModified();
}
void arpAndChordsTabWidget::arpRandomToggled( bool _on )
{
if( _on )
{
m_arpDirection = RANDOM;
}
eng()->getSongEditor()->setModified();
}
#include "arp_and_chords_tab_widget.moc"

View File

@@ -129,9 +129,9 @@ bbEditor::bbEditor( engine * _engine ) :
QLabel * l = new QLabel( m_toolBar );
l->setPixmap( embed::getIconPixmap( "drum" ) );
m_bbComboBox = new comboBox( m_toolBar );
m_bbComboBox = new comboBox( m_toolBar, eng() );
m_bbComboBox->setFixedSize( 200, 22 );
connect( m_bbComboBox, SIGNAL( currentIndexChanged( int ) ),
connect( m_bbComboBox, SIGNAL( valueChanged( int ) ),
this, SLOT( setCurrentBB( int ) ) );
tb_layout->addSpacing( 5 );
@@ -166,9 +166,9 @@ csize bbEditor::currentBB( void ) const
void bbEditor::setCurrentBB( int _bb )
{
if( m_bbComboBox->currentIndex() != _bb )
if( m_bbComboBox->value() != _bb )
{
m_bbComboBox->setCurrentIndex( _bb );
m_bbComboBox->setValue( _bb );
}
// first make sure, all channels have a TCO at current BB
@@ -295,7 +295,7 @@ void bbEditor::updateComboBox( void )
m_bbComboBox->addItem( bbt->trackLabel()->text(),
bbt->trackLabel()->pixmap() );
}
m_bbComboBox->setCurrentIndex( currentBB() );
m_bbComboBox->setValue( currentBB() );
}

View File

@@ -62,6 +62,7 @@
#include <qapplication.h>
#define absolutePath absPath
#define addButton insert
#ifndef __USE_XOPEN_EXTENDED
#define __USE_XOPEN_EXTENDED
@@ -955,6 +956,7 @@ void configManager::processFilesRecursively( const QString & _src_dir,
#include "config_mgr.moc"
#undef absolutePath
#undef addButton
#endif

View File

@@ -26,6 +26,7 @@
#include "bb_editor.h"
#include "edit_history.h"
#include "engine.h"
#include "main_window.h"
#include "mixer.h"
@@ -41,8 +42,10 @@ engine::engine( const bool _has_gui ) :
m_mainWindow( NULL ),
m_songEditor( NULL ),
m_bbEditor( NULL ),
m_pianoRoll( NULL )
m_pianoRoll( NULL ),
m_editHistory( NULL )
{
m_editHistory = new editHistory( this );
m_mainWindow = new mainWindow( this );
m_mixer = new mixer( this );
m_songEditor = new songEditor( this );
@@ -63,6 +66,7 @@ engine::engine( const bool _has_gui ) :
engine::~engine()
{
m_mixer->stopProcessing();
delete m_projectNotes;
delete m_songEditor;
delete m_bbEditor;

View File

@@ -32,14 +32,12 @@
#include <QPainter>
#include <QPaintEvent>
#include <QButtonGroup>
#include <QWhatsThis>
#include <Qt/QtXml>
#include <QLabel>
#else
#include <qbuttongroup.h>
#include <qwhatsthis.h>
#include <qpainter.h>
#include <qpen.h>
@@ -353,101 +351,90 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
SLOT( updateAfterKnobChange( float ) ) );
m_sinLfoBtn = new pixmapButton( this );
m_sinLfoBtn->move( LFO_SHAPES_X, LFO_SHAPES_Y );
m_sinLfoBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * sin_lfo_btn = new pixmapButton( this, eng() );
sin_lfo_btn->move( LFO_SHAPES_X, LFO_SHAPES_Y );
sin_lfo_btn->setActiveGraphic( embed::getIconPixmap(
"sin_wave_active" ) );
m_sinLfoBtn->setInactiveGraphic( embed::getIconPixmap(
sin_lfo_btn->setInactiveGraphic( embed::getIconPixmap(
"sin_wave_inactive" ) );
m_sinLfoBtn->setChecked( TRUE );
#ifdef QT4
m_sinLfoBtn->setWhatsThis(
sin_lfo_btn->setWhatsThis(
#else
QWhatsThis::add( m_sinLfoBtn,
QWhatsThis::add( sin_lfo_btn,
#endif
tr( "Click here if you want a sine-wave for current "
"oscillator." ) );
m_triangleLfoBtn = new pixmapButton( this );
m_triangleLfoBtn->move( LFO_SHAPES_X+15, LFO_SHAPES_Y );
m_triangleLfoBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * triangle_lfo_btn = new pixmapButton( this, eng() );
triangle_lfo_btn->move( LFO_SHAPES_X+15, LFO_SHAPES_Y );
triangle_lfo_btn->setActiveGraphic( embed::getIconPixmap(
"triangle_wave_active" ) );
m_triangleLfoBtn->setInactiveGraphic( embed::getIconPixmap(
triangle_lfo_btn->setInactiveGraphic( embed::getIconPixmap(
"triangle_wave_inactive" ) );
#ifdef QT4
m_triangleLfoBtn->setWhatsThis(
triangle_lfo_btn->setWhatsThis(
#else
QWhatsThis::add( m_triangleLfoBtn,
QWhatsThis::add( triangle_lfo_btn,
#endif
tr( "Click here if you want a triangle-wave for current "
"oscillator." ) );
m_sawLfoBtn = new pixmapButton( this );
m_sawLfoBtn->move( LFO_SHAPES_X+30, LFO_SHAPES_Y );
m_sawLfoBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * saw_lfo_btn = new pixmapButton( this, eng() );
saw_lfo_btn->move( LFO_SHAPES_X+30, LFO_SHAPES_Y );
saw_lfo_btn->setActiveGraphic( embed::getIconPixmap(
"saw_wave_active" ) );
m_sawLfoBtn->setInactiveGraphic( embed::getIconPixmap(
saw_lfo_btn->setInactiveGraphic( embed::getIconPixmap(
"saw_wave_inactive" ) );
#ifdef QT4
m_sawLfoBtn->setWhatsThis(
saw_lfo_btn->setWhatsThis(
#else
QWhatsThis::add( m_sawLfoBtn,
QWhatsThis::add( saw_lfo_btn,
#endif
tr( "Click here if you want a saw-wave for current "
"oscillator." ) );
m_sqrLfoBtn = new pixmapButton( this );
m_sqrLfoBtn->move( LFO_SHAPES_X+45, LFO_SHAPES_Y );
m_sqrLfoBtn->setActiveGraphic( embed::getIconPixmap(
pixmapButton * sqr_lfo_btn = new pixmapButton( this, eng() );
sqr_lfo_btn->move( LFO_SHAPES_X+45, LFO_SHAPES_Y );
sqr_lfo_btn->setActiveGraphic( embed::getIconPixmap(
"square_wave_active" ) );
m_sqrLfoBtn->setInactiveGraphic( embed::getIconPixmap(
sqr_lfo_btn->setInactiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
#ifdef QT4
m_sqrLfoBtn->setWhatsThis(
sqr_lfo_btn->setWhatsThis(
#else
QWhatsThis::add( m_sqrLfoBtn,
QWhatsThis::add( sqr_lfo_btn,
#endif
tr( "Click here if you want a square-wave for current "
"oscillator." ) );
m_usrLfoBtn = new pixmapButton( this );
m_usrLfoBtn->move( LFO_SHAPES_X+60, LFO_SHAPES_Y );
m_usrLfoBtn->setActiveGraphic( embed::getIconPixmap(
m_userLfoBtn = new pixmapButton( this, eng() );
m_userLfoBtn->move( LFO_SHAPES_X+60, LFO_SHAPES_Y );
m_userLfoBtn->setActiveGraphic( embed::getIconPixmap(
"usr_wave_active" ) );
m_usrLfoBtn->setInactiveGraphic( embed::getIconPixmap(
m_userLfoBtn->setInactiveGraphic( embed::getIconPixmap(
"usr_wave_inactive" ) );
#ifdef QT4
m_usrLfoBtn->setWhatsThis(
m_userLfoBtn->setWhatsThis(
#else
QWhatsThis::add( m_usrLfoBtn,
QWhatsThis::add( m_userLfoBtn,
#endif
tr( "Click here if you want a user-defined wave for current "
"oscillator. Afterwards drag an according sample-"
"file into LFO-graph." ) );
connect( m_sinLfoBtn, SIGNAL( toggled( bool ) ), this,
SLOT( lfoSinWaveCh( bool ) ) );
connect( m_triangleLfoBtn, SIGNAL( toggled( bool ) ), this,
SLOT( lfoTriangleWaveCh( bool ) ) );
connect( m_sawLfoBtn, SIGNAL( toggled( bool ) ), this,
SLOT( lfoSawWaveCh( bool ) ) );
connect( m_sqrLfoBtn, SIGNAL( toggled( bool ) ), this,
SLOT( lfoSquareWaveCh( bool ) ) );
connect( m_usrLfoBtn, SIGNAL( toggled( bool ) ), this,
connect( m_userLfoBtn, SIGNAL( toggled( bool ) ), this,
SLOT( lfoUserWaveCh( bool ) ) );
QButtonGroup * lfo_shapes_algo_group = new QButtonGroup( this );
lfo_shapes_algo_group->addButton( m_sinLfoBtn );
lfo_shapes_algo_group->addButton( m_triangleLfoBtn );
lfo_shapes_algo_group->addButton( m_sawLfoBtn );
lfo_shapes_algo_group->addButton( m_sqrLfoBtn );
lfo_shapes_algo_group->addButton( m_usrLfoBtn );
lfo_shapes_algo_group->setExclusive( TRUE );
#ifndef QT4
lfo_shapes_algo_group->hide();
#endif
m_lfoWaveBtnGrp = new automatableButtonGroup( this, eng() );
m_lfoWaveBtnGrp->addButton( sin_lfo_btn );
m_lfoWaveBtnGrp->addButton( triangle_lfo_btn );
m_lfoWaveBtnGrp->addButton( saw_lfo_btn );
m_lfoWaveBtnGrp->addButton( sqr_lfo_btn );
m_lfoWaveBtnGrp->addButton( m_userLfoBtn );
m_lfoWaveBtnGrp->setInitValue( SIN );
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this );
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this, eng() );
m_x100Cb->setFont( pointSize<6>( m_x100Cb->font() ) );
m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 );
#ifdef QT4
@@ -463,7 +450,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
m_controlEnvAmountCb = new ledCheckBox( tr( "MODULATE ENV-AMOUNT" ),
this );
this, eng() );
m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 );
m_controlEnvAmountCb->setFont( pointSize<6>(
m_controlEnvAmountCb->font() ) );
@@ -649,8 +636,11 @@ void envelopeAndLFOWidget::loadSettings( const QDomElement & _this )
m_sustainKnob->setValue( _this.attribute( "sus" ).toFloat() );
m_releaseKnob->setValue( _this.attribute( "rel" ).toFloat() );
m_amountKnob->setValue( _this.attribute( "amt" ).toFloat() );
m_lfoShape = static_cast<lfoShapes>( _this.attribute(
"lshp" ).toInt() );
m_lfoWaveBtnGrp->setValue( m_lfoShape );
m_lfoPredelayKnob->setValue( _this.attribute( "lpdel" ).toFloat() );
m_lfoAttackKnob->setValue( _this.attribute( "latt" ).toFloat() );
m_lfoSpeedKnob->setValue( _this.attribute( "lspd" ).toFloat() );
@@ -663,29 +653,6 @@ void envelopeAndLFOWidget::loadSettings( const QDomElement & _this )
"lfosyncmode" ).toInt() );
m_userWave.setAudioFile( _this.attribute( "userwavefile" ) );
switch( m_lfoShape )
{
case SIN:
m_sinLfoBtn->setChecked( TRUE );
break;
case TRIANGLE:
m_triangleLfoBtn->setChecked( TRUE );
break;
case SAW:
m_sawLfoBtn->setChecked( TRUE );
break;
case SQUARE:
m_sqrLfoBtn->setChecked( TRUE );
break;
case USER:
m_usrLfoBtn->setChecked( TRUE );
break;
}
m_busy = FALSE;
updateSampleVars();
@@ -750,7 +717,7 @@ void envelopeAndLFOWidget::dropEvent( QDropEvent * _de )
if( type == "samplefile" )
{
m_userWave.setAudioFile( stringPairDrag::decodeValue( _de ) );
m_usrLfoBtn->setChecked( TRUE );
m_userLfoBtn->setChecked( TRUE );
lfoUserWaveCh( TRUE );
_de->accept();
}
@@ -759,7 +726,7 @@ void envelopeAndLFOWidget::dropEvent( QDropEvent * _de )
multimediaProject mmp( value, FALSE );
m_userWave.setAudioFile( mmp.content().firstChild().toElement().
attribute( "src" ) );
m_usrLfoBtn->setChecked( TRUE );
m_userLfoBtn->setChecked( TRUE );
lfoUserWaveCh( TRUE );
_de->accept();
}
@@ -1140,56 +1107,9 @@ void envelopeAndLFOWidget::updateAfterKnobChange( float )
void envelopeAndLFOWidget::lfoSinWaveCh( bool _on )
void envelopeAndLFOWidget::lfoWaveCh( int _val )
{
if( _on )
{
m_lfoShape = SIN;
}
eng()->getSongEditor()->setModified();
update();
}
void envelopeAndLFOWidget::lfoTriangleWaveCh( bool _on )
{
if( _on )
{
m_lfoShape = TRIANGLE;
}
eng()->getSongEditor()->setModified();
update();
}
void envelopeAndLFOWidget::lfoSawWaveCh( bool _on )
{
if( _on )
{
m_lfoShape = SAW;
}
eng()->getSongEditor()->setModified();
update();
}
void envelopeAndLFOWidget::lfoSquareWaveCh( bool _on )
{
if( _on )
{
m_lfoShape = SQUARE;
}
eng()->getSongEditor()->setModified();
m_lfoShape = static_cast<lfoShapes>( _val );
update();
}

View File

@@ -138,12 +138,12 @@ envelopeTabWidget::envelopeTabWidget( channelTrack * _channel_track ) :
}
m_filterGroupBox = new groupBox( tr( "FILTER" ), this );
m_filterGroupBox = new groupBox( tr( "FILTER" ), this, eng() );
m_filterGroupBox->setGeometry( FILTER_GROUPBOX_X, FILTER_GROUPBOX_Y,
FILTER_GROUPBOX_WIDTH,
FILTER_GROUPBOX_HEIGHT );
m_filterComboBox = new comboBox( m_filterGroupBox );
m_filterComboBox = new comboBox( m_filterGroupBox, eng() );
m_filterComboBox->setGeometry( 14, 22, 120, 22 );
m_filterComboBox->setFont( pointSize<8>( m_filterComboBox->font() ) );
@@ -281,7 +281,7 @@ void envelopeTabWidget::processAudioBuffer( sampleFrame * _ab,
basicFilters<>::filterTypes filter =
basicFilters<>::getFilterType(
m_filterComboBox->currentIndex() );
m_filterComboBox->value() );
if( m_envLFOWidgets[VOLUME]->used() &&
m_envLFOWidgets[CUT]->used() &&
@@ -498,7 +498,7 @@ void envelopeTabWidget::saveSettings( QDomDocument & _doc,
QDomElement & _parent )
{
QDomElement etw_de = _doc.createElement( nodeName() );
etw_de.setAttribute( "ftype", m_filterComboBox->currentIndex() );
etw_de.setAttribute( "ftype", m_filterComboBox->value() );
etw_de.setAttribute( "fcut", m_filterCutKnob->value() );
etw_de.setAttribute( "fres", m_filterResKnob->value() );
etw_de.setAttribute( "fwet", m_filterGroupBox->isActive() );
@@ -520,7 +520,7 @@ void envelopeTabWidget::saveSettings( QDomDocument & _doc,
void envelopeTabWidget::loadSettings( const QDomElement & _this )
{
m_filterComboBox->setCurrentIndex( _this.attribute( "ftype" ).toInt() );
m_filterComboBox->setValue( _this.attribute( "ftype" ).toInt() );
m_filterCutKnob->setValue( _this.attribute( "fcut" ).toFloat() );
m_filterResKnob->setValue( _this.attribute( "fres" ).toFloat() );
/* m_filterState->setChecked( _this.attribute( "fwet" ).toInt() );*/

View File

@@ -153,7 +153,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
m_typeLbl->setGeometry( LABEL_X, TYPE_STUFF_Y, LABEL_WIDTH,
TYPE_HEIGHT );
m_typeCombo = new comboBox( this );
m_typeCombo = new comboBox( this, eng() );
m_typeCombo->setGeometry( LABEL_X + LABEL_WIDTH+LABEL_MARGIN,
TYPE_STUFF_Y, TYPE_COMBO_WIDTH,
TYPE_HEIGHT );
@@ -167,7 +167,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
tr( fileEncodeDevices[idx].m_description ) );
++idx;
}
m_typeCombo->setCurrentIndex( m_typeCombo->findText( tr(
m_typeCombo->setValue( m_typeCombo->findText( tr(
fileEncodeDevices[m_fileType].m_description ) ) );
@@ -176,7 +176,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
m_kbpsLbl->setGeometry( LABEL_X, KBPS_STUFF_Y, LABEL_WIDTH,
KBPS_HEIGHT );
m_kbpsCombo = new comboBox( this );
m_kbpsCombo = new comboBox( this, eng() );
m_kbpsCombo->setGeometry( LABEL_X + LABEL_WIDTH + LABEL_MARGIN,
KBPS_STUFF_Y, KBPS_COMBO_WIDTH,
KBPS_HEIGHT );
@@ -188,18 +188,18 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
s_availableBitrates[idx] ) );
++idx;
}
m_typeCombo->setCurrentIndex( m_typeCombo->findText(
m_typeCombo->setValue( m_typeCombo->findText(
QString::number( 128 ) ) );
m_vbrCb = new ledCheckBox( tr( "variable bitrate" ), this );
m_vbrCb = new ledCheckBox( tr( "variable bitrate" ), this, eng() );
m_vbrCb->setGeometry( LABEL_X + LABEL_WIDTH + 3 * LABEL_MARGIN +
KBPS_COMBO_WIDTH, KBPS_STUFF_Y + 3, 190, 20 );
m_vbrCb->setChecked( TRUE );
m_hqmCb = new ledCheckBox( tr( "use high-quality-mode (recommened)" ),
this );
this, eng() );
m_hqmCb->setGeometry( LABEL_X, HQ_MODE_CB_Y + 3, HQ_MODE_CB_WIDTH,
HQ_MODE_CB_HEIGHT );
m_hqmCb->setChecked( TRUE );

144
src/core/import_filter.cpp Normal file
View File

@@ -0,0 +1,144 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* import_filter.cpp - base-class for all import-filters (MIDI, FLP etc)
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#include "import_filter.h"
#include "track_container.h"
#ifdef QT4
#include <QMessageBox>
#else
#include <qmessagebox.h>
#define fileName name
#endif
importFilter::importFilter( const QString & _file_name,
const descriptor * _descriptor,
engine * _eng ) :
plugin( _descriptor, _eng ),
m_file( _file_name )
{
}
importFilter::~importFilter()
{
}
void importFilter::import( const QString & _file_to_import,
trackContainer * _tc )
{
vvector<descriptor> d;
plugin::getDescriptorsOfAvailPlugins( d );
bool successful = FALSE;
char * s = qstrdup( _file_to_import.
#ifndef QT3
toAscii().constData()
#else
ascii()
#endif
);
for( vvector<plugin::descriptor>::iterator it = d.begin();
it != d.end(); ++it )
{
if( it->type == plugin::IMPORT_FILTER )
{
plugin * p = plugin::instantiate( it->name, s );
if( dynamic_cast<importFilter *>( p ) != NULL &&
dynamic_cast<importFilter *>( p )->tryImport(
_tc ) == TRUE )
{
delete p;
successful = TRUE;
break;
}
delete p;
}
}
delete[] s;
if( successful == FALSE )
{
QMessageBox::information( NULL,
trackContainer::tr( "Couldn't import file" ),
trackContainer::tr( "Couldn't find a filter for "
"importing file %1.\n"
"You should convert this file "
"into a format supported by "
"LMMS using another software. "
).arg( _file_to_import ),
QMessageBox::Ok,
QMessageBox::NoButton );
}
}
bool importFilter::openFile( void )
{
#ifdef QT4
if( m_file.open( QFile::ReadOnly ) == FALSE )
#else
if( m_file.open( IO_ReadOnly ) == FALSE )
#endif
{
QMessageBox::critical( NULL,
trackContainer::tr( "Couldn't open file" ),
trackContainer::tr( "Couldn't open file %1 "
"for reading.\nPlease make "
"sure you have read-"
"permission to the file and "
"the directory containing the "
"file and try again!" ).arg(
m_file.fileName() ),
QMessageBox::Ok,
QMessageBox::NoButton );
return( FALSE );
}
return( TRUE );
}
#undef fileName
#endif

View File

@@ -36,6 +36,7 @@
#include <QSplashScreen>
#include <QMessageBox>
#include <QMenuBar>
#include <Qt/QtXml>
#else
@@ -46,6 +47,7 @@
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qmenubar.h>
#include <qdom.h>
#if QT_VERSION >= 0x030200
#include <qsplashscreen.h>
@@ -74,6 +76,7 @@
#include "setup_dialog.h"
#include "audio_dummy.h"
#include "tool_button.h"
#include "edit_history.h"
#if QT_VERSION >= 0x030100
@@ -464,9 +467,25 @@ void mainWindow::finalize( void )
#endif
project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ),
qApp, SLOT( closeAllWindows() ),
Qt::CTRL+Qt::Key_Q );
Qt::CTRL + Qt::Key_Q );
QMenu * edit_menu = new QMenu( this );
#ifdef QT4
menuBar()->addMenu( edit_menu )->setText( tr( "&Edit" ) );
#else
menuBar()->insertItem( tr( "&Edit" ), edit_menu );
#endif
edit_menu->addAction( embed::getIconPixmap( "edit_undo" ),
tr( "Undo" ),
this, SLOT( undo() ),
Qt::CTRL + Qt::Key_Z );
edit_menu->addAction( embed::getIconPixmap( "edit_redo" ),
tr( "Redo" ),
this, SLOT( redo() ),
Qt::CTRL + Qt::Key_R );
QMenu * settings_menu = new QMenu( this );
#ifdef QT4
menuBar()->addMenu( settings_menu )->setText( tr( "&Settings" ) );
@@ -583,6 +602,34 @@ void mainWindow::clearKeyModifiers( void )
void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
{
_de.setAttribute( "x", _w->parentWidget()->x() );
_de.setAttribute( "y", _w->parentWidget()->y() );
_de.setAttribute( "width", _w->width() );
_de.setAttribute( "height", _w->height() );
_de.setAttribute( "visible", _w->isVisible() );
}
void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
{
QRect r( _de.attribute( "x" ).toInt(), _de.attribute( "y" ).toInt(),
_de.attribute( "width" ).toInt(),
_de.attribute( "height" ).toInt() );
if( !r.isNull() )
{
_w->setShown( _de.attribute( "visible" ).toInt() );
_w->parentWidget()->move( r.topLeft() );
_w->resize( r.size() );
}
}
void mainWindow::createNewProject( void )
{
if( eng()->getSongEditor()->mayChangeProject() == TRUE )
@@ -808,6 +855,22 @@ void mainWindow::togglePianoRollWin( void )
void mainWindow::undo( void )
{
eng()->getEditHistory()->undo();
}
void mainWindow::redo( void )
{
eng()->getEditHistory()->redo();
}
void mainWindow::closeEvent( QCloseEvent * _ce )
{
if( eng()->getSongEditor()->mayChangeProject() == TRUE )

View File

@@ -76,7 +76,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
m_inputChannelSpinBox = new lcdSpinBox( 0, MIDI_CHANNEL_COUNT, 3,
m_setupTabWidget );
m_setupTabWidget, eng() );
m_inputChannelSpinBox->addTextForValue( 0, "---" );
m_inputChannelSpinBox->setValue( m_midiPort->inputChannel() + 1 );
m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
@@ -86,7 +86,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
inputChannelChanged( m_inputChannelSpinBox->value() );
m_outputChannelSpinBox = new lcdSpinBox( 1, MIDI_CHANNEL_COUNT, 3,
m_setupTabWidget );
m_setupTabWidget, eng() );
m_outputChannelSpinBox->setValue( m_midiPort->outputChannel() + 1 );
//m_outputChannelSpinBox->addTextForValue( 0, "---" );
m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
@@ -97,7 +97,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
m_receiveCheckBox = new ledCheckBox( tr( "Receive MIDI-events" ),
m_setupTabWidget );
m_setupTabWidget, eng() );
m_receiveCheckBox->move( 10, 34 );
connect( m_receiveCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( midiPortModeToggled( bool ) ) );
@@ -106,7 +106,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track,
m_sendCheckBox = new ledCheckBox( tr( "Send MIDI-events" ),
m_setupTabWidget );
m_setupTabWidget, eng() );
m_sendCheckBox->move( 10, 94 );
connect( m_sendCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( midiPortModeToggled( bool ) ) );

View File

@@ -37,6 +37,7 @@
#include <QWheelEvent>
#include <QLayout>
#include <QLabel>
#include <Qt/QtXml>
#else
@@ -45,6 +46,9 @@
#include <qpainter.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qdom.h>
#define addButton insert
#endif
@@ -391,7 +395,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
zoom_lbl->setPixmap( embed::getIconPixmap( "zoom" ) );
// setup zooming-stuff
m_zoomingComboBox = new comboBox( m_toolBar );
m_zoomingComboBox = new comboBox( m_toolBar, eng() );
m_zoomingComboBox->setFixedSize( 80, 22 );
for( int i = 0; i < 6; ++i )
{
@@ -399,7 +403,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
static_cast<int>( powf( 2.0f, i ) ) ) +
"%" );
}
m_zoomingComboBox->setCurrentIndex( m_zoomingComboBox->findText(
m_zoomingComboBox->setValue( m_zoomingComboBox->findText(
"100%" ) );
connect( m_zoomingComboBox, SIGNAL( activated( const QString & ) ),
this, SLOT( zoomingChanged( const QString & ) ) );
@@ -409,21 +413,21 @@ pianoRoll::pianoRoll( engine * _engine ) :
QLabel * quantize_lbl = new QLabel( m_toolBar );
quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) );
m_quantizeComboBox = new comboBox( m_toolBar );
m_quantizeComboBox = new comboBox( m_toolBar, eng() );
m_quantizeComboBox->setFixedSize( 60, 22 );
for( int i = 0; i < 7; ++i )
{
m_quantizeComboBox->addItem( "1/" + QString::number(
static_cast<int>( powf( 2.0f, i ) ) ) );
}
m_quantizeComboBox->setCurrentIndex( m_quantizeComboBox->findText(
m_quantizeComboBox->setValue( 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 = new comboBox( m_toolBar, eng() );
m_noteLenComboBox->setFixedSize( 120, 22 );
m_noteLenComboBox->addItem( tr( "Last note" ),
embed::getIconPixmap( "edit_draw" ) );
@@ -435,7 +439,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
static_cast<int>( powf( 2.0f, i ) ) ),
embed::getIconPixmap( "note_" + pixmaps[i] ) );
}
m_noteLenComboBox->setCurrentIndex( 0 );
m_noteLenComboBox->setValue( 0 );
tb_layout->addSpacing( 5 );
@@ -553,6 +557,24 @@ void pianoRoll::setCurrentPattern( pattern * _new_pattern )
void pianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _parent )
{
QDomElement pr_de = _doc.createElement( nodeName() );
mainWindow::saveWidgetState( this, pr_de );
_parent.appendChild( pr_de );
}
void pianoRoll::loadSettings( const QDomElement & _this )
{
mainWindow::restoreWidgetState( this, _this );
}
inline void pianoRoll::drawNoteRect( QPainter & _p, Uint16 _x, Uint16 _y,
Sint16 _width, const bool _is_selected,
const bool _is_step_note )
@@ -1996,7 +2018,7 @@ void pianoRoll::wheelEvent( QWheelEvent * _we )
m_ppt /= 2;
}
// update combobox with zooming-factor
m_zoomingComboBox->setCurrentIndex(
m_zoomingComboBox->setValue(
m_zoomingComboBox->findText( QString::number(
static_cast<int>( m_ppt * 100 /
DEFAULT_PR_PPT ) ) +"%" ) );
@@ -2486,7 +2508,7 @@ int pianoRoll::quantization( void ) const
midiTime pianoRoll::newNoteLen( void ) const
{
if( m_noteLenComboBox->currentIndex() == 0 )
if( m_noteLenComboBox->value() == 0 )
{
return( m_lenOfNewNotes );
}
@@ -2500,4 +2522,9 @@ midiTime pianoRoll::newNoteLen( void ) const
#include "piano_roll.moc"
#ifdef QT3
#undef addButton
#endif
#endif

View File

@@ -87,10 +87,13 @@ pluginBrowser::pluginBrowser( QWidget * _parent, engine * _engine ) :
m_pluginDescriptors.begin();
it != m_pluginDescriptors.end(); ++it )
{
pluginDescWidget * p = new pluginDescWidget( *it, m_view,
eng() );
p->show();
view_layout->addWidget( p );
if( it->type == plugin::INSTRUMENT )
{
pluginDescWidget * p = new pluginDescWidget( *it,
m_view, eng() );
p->show();
view_layout->addWidget( p );
}
}
view_layout->addStretch();
show();

View File

@@ -191,7 +191,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * disable_tooltips = new ledCheckBox(
tr( "Disable tooltips (no spurious "
"interrupts while playing)" ),
misc_tw );
misc_tw, eng() );
disable_tooltips->move( 10, 18 );
disable_tooltips->setChecked( m_disableToolTips );
connect( disable_tooltips, SIGNAL( toggled( bool ) ),
@@ -202,7 +202,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
tr( "Classical knob usability (move "
"cursor around knob to change "
"value)" ),
misc_tw );
misc_tw, eng() );
classical_knob_usability->move( 10, 36 );
classical_knob_usability->setChecked( m_classicalKnobUsability );
connect( classical_knob_usability, SIGNAL( toggled( bool ) ),
@@ -211,7 +211,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * gimp_like_windows = new ledCheckBox(
tr( "GIMP-like windows (no MDI)" ),
misc_tw );
misc_tw, eng() );
gimp_like_windows->move( 10, 54 );
gimp_like_windows->setChecked( m_gimpLikeWindows );
connect( gimp_like_windows, SIGNAL( toggled( bool ) ),
@@ -219,8 +219,8 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * no_wizard = new ledCheckBox(
tr( "Do not show wizard after "
"up-/downgrade" ), misc_tw );
tr( "Do not show wizard after "
"up-/downgrade" ), misc_tw, eng() );
no_wizard->move( 10, 72 );
no_wizard->setChecked( m_noWizard );
connect( no_wizard, SIGNAL( toggled( bool ) ),
@@ -230,7 +230,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * no_msg = new ledCheckBox(
tr( "Do not show message after "
"closing this dialog" ),
misc_tw );
misc_tw, eng() );
no_msg->move( 10, 90 );
no_msg->setChecked( m_noMsgAfterSetup );
connect( no_msg, SIGNAL( toggled( bool ) ),
@@ -336,7 +336,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * disable_ch_act_ind = new ledCheckBox(
tr( "Disable channel activity indicators" ),
ui_fx_tw );
ui_fx_tw, eng() );
disable_ch_act_ind->move( 10, 20 );
disable_ch_act_ind->setChecked( m_disableChActInd );
connect( disable_ch_act_ind, SIGNAL( toggled( bool ) ),
@@ -345,7 +345,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * manual_ch_piano = new ledCheckBox(
tr( "Only press keys on channel-piano manually" ),
ui_fx_tw );
ui_fx_tw, eng() );
manual_ch_piano->move( 10, 40 );
manual_ch_piano->setChecked( m_manualChPiano );
connect( manual_ch_piano, SIGNAL( toggled( bool ) ),

View File

@@ -64,6 +64,8 @@
#include <qlayout.h>
#include <qbuttongroup.h>
#define addButton insert
#endif
@@ -84,7 +86,6 @@
#include "visualization_widget.h"
#include "project_notes.h"
#include "config_mgr.h"
#include "midi_file.h"
#include "lcd_spinbox.h"
#include "tooltip.h"
#include "tool_button.h"
@@ -92,6 +93,8 @@
#include "text_float.h"
#include "combobox.h"
#include "main_window.h"
#include "import_filter.h"
#include "edit_history.h"
#include "debug.h"
@@ -151,7 +154,7 @@ songEditor::songEditor( engine * _engine ) :
eng()->getMainWindow()->addSpacingToToolBar( 10 );
m_bpmSpinBox = new lcdSpinBox( MIN_BPM, MAX_BPM, 3, tb );
m_bpmSpinBox = new lcdSpinBox( MIN_BPM, MAX_BPM, 3, tb, eng() );
m_bpmSpinBox->setLabel( tr( "TEMPO/BPM" ) );
connect( m_bpmSpinBox, SIGNAL( valueChanged( int ) ), this,
SLOT( setTempo( int ) ) );
@@ -370,7 +373,7 @@ songEditor::songEditor( engine * _engine ) :
zoom_lbl->setPixmap( embed::getIconPixmap( "zoom" ) );
// setup zooming-stuff
m_zoomingComboBox = new comboBox( m_toolBar );
m_zoomingComboBox = new comboBox( m_toolBar, eng() );
m_zoomingComboBox->setFixedSize( 80, 22 );
m_zoomingComboBox->move( 580, 4 );
for( int i = 0; i < 7; ++i )
@@ -379,7 +382,7 @@ songEditor::songEditor( engine * _engine ) :
static_cast<int>( powf( 2.0f, i ) ) ) +
"%" );
}
m_zoomingComboBox->setCurrentIndex( m_zoomingComboBox->findText(
m_zoomingComboBox->setValue( m_zoomingComboBox->findText(
"100%" ) );
connect( m_zoomingComboBox, SIGNAL( activated( const QString & ) ),
this, SLOT( zoomingChanged( const QString & ) ) );
@@ -566,7 +569,7 @@ void songEditor::wheelEvent( QWheelEvent * _we )
setPixelsPerTact( (int) pixelsPerTact() / 2 );
}
// update combobox with zooming-factor
m_zoomingComboBox->setCurrentIndex(
m_zoomingComboBox->setValue(
m_zoomingComboBox->findText( QString::number(
static_cast<int>( pixelsPerTact() *
100 / DEFAULT_PIXELS_PER_TACT ) ) + "%" ) );
@@ -1336,6 +1339,8 @@ bool songEditor::mayChangeProject( void )
void songEditor::clearProject( void )
{
eng()->getEditHistory()->setGlobalStepRecording( FALSE );
if( m_playing )
{
// stop play, because it's dangerous that play-routines try to
@@ -1360,6 +1365,8 @@ void songEditor::clearProject( void )
eng()->getBBEditor()->clearAllTracks();
eng()->getProjectNotes()->clear();
eng()->getEditHistory()->setGlobalStepRecording( TRUE );
}
@@ -1371,6 +1378,8 @@ void songEditor::createNewProject( void )
{
clearProject();
eng()->getEditHistory()->setGlobalStepRecording( FALSE );
track * t;
t = track::create( track::CHANNEL_TRACK, this );
dynamic_cast< channelTrack * >( t )->loadInstrument(
@@ -1392,6 +1401,9 @@ void songEditor::createNewProject( void )
m_modified = FALSE;
eng()->getMainWindow()->resetWindowTitle( "" );
eng()->getEditHistory()->setGlobalStepRecording( TRUE );
}
@@ -1414,6 +1426,8 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
{
clearProject();
eng()->getEditHistory()->setGlobalStepRecording( FALSE );
m_fileName = _file_name;
m_oldFileName = _file_name;
@@ -1473,12 +1487,24 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
{
loadSettings( node.toElement() );
}
else if( node.nodeName() ==
eng()->getPianoRoll()->nodeName() )
{
eng()->getPianoRoll()->loadSettings(
node.toElement() );
}
else if( node.nodeName() ==
eng()->getProjectNotes()->nodeName() )
{
eng()->getProjectNotes()->loadSettings(
node.toElement() );
}
else if( node.nodeName() ==
m_playPos[PLAY_SONG].m_timeLine->nodeName() )
{
m_playPos[PLAY_SONG].m_timeLine->loadSettings(
node.toElement() );
}
}
node = node.nextSibling();
}
@@ -1489,6 +1515,8 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
m_loadingProject = FALSE;
eng()->getMainWindow()->resetWindowTitle( "" );
eng()->getEditHistory()->setGlobalStepRecording( TRUE );
}
@@ -1513,7 +1541,10 @@ bool songEditor::saveProject( void )
saveSettings( mmp, mmp.content() );
eng()->getPianoRoll()->saveSettings( mmp, mmp.content() );
eng()->getProjectNotes()->saveSettings( mmp, mmp.content() );
m_playPos[PLAY_SONG].m_timeLine->saveSettings( mmp, mmp.content() );
if( mmp.writeFile( m_fileName, m_oldFileName == "" ||
m_fileName != m_oldFileName ) == TRUE )
@@ -1574,8 +1605,7 @@ void songEditor::importProject( void )
ofd.setFileMode( QFileDialog::ExistingFiles );
if( ofd.exec () == QDialog::Accepted && !ofd.selectedFiles().isEmpty() )
{
midiFile mf( ofd.selectedFiles()[0] );
mf.importToTrackContainer( this );
importFilter::import( ofd.selectedFiles()[0], this );
}
}
@@ -1676,4 +1706,9 @@ void songEditor::loadSettings( const QDomElement & _this )
#include "song_editor.moc"
#ifdef QT3
#undef addButton
#endif
#endif

View File

@@ -34,6 +34,7 @@
#include <QMouseEvent>
#include <QLayout>
#include <QTimer>
#include <Qt/QtXml>
#else
@@ -41,6 +42,7 @@
#include <qapplication.h>
#include <qlayout.h>
#include <qtimer.h>
#include <qdom.h>
#endif
@@ -174,6 +176,30 @@ void timeLine::addToolButtons( QWidget * _tool_bar )
void timeLine::saveSettings( QDomDocument & _doc, QDomElement & _parent )
{
QDomElement tl_de = _doc.createElement( nodeName() );
tl_de.setAttribute( "lp0pos", (int) loopBegin() );
tl_de.setAttribute( "lp1pos", (int) loopEnd() );
tl_de.setAttribute( "lpstate", m_loopPoints );
_parent.appendChild( tl_de );
}
void timeLine::loadSettings( const QDomElement & _this )
{
m_loopPos[0] = _this.attribute( "lp0pos" ).toInt();
m_loopPos[1] = _this.attribute( "lp1pos" ).toInt();
m_loopPoints = static_cast<loopPointStates>(
_this.attribute( "lpstate" ).toInt() );
update();
}
void timeLine::updatePosition( const midiTime & )
{
const int new_x = markerX( m_pos );
@@ -295,8 +321,6 @@ void timeLine::mousePressEvent( QMouseEvent * _me )
{
const midiTime t = m_begin +
static_cast<Sint32>( _me->x() * 64 / m_ppt );
Uint8 pmin = 0;
Uint8 pmax = 1;
m_action = MOVE_LOOP_BEGIN;
if( m_loopPos[0] > m_loopPos[1] )
{

View File

@@ -863,7 +863,7 @@ trackOperationsWidget::trackOperationsWidget( trackWidget * _parent ) :
toolTip::add( m_trackOps, tr( "Actions for this track" ) );
m_muteBtn = new pixmapButton( this );
m_muteBtn = new pixmapButton( this, m_trackWidget->getTrack()->eng() );
m_muteBtn->setActiveGraphic( embed::getIconPixmap( "mute_on" ) );
m_muteBtn->setInactiveGraphic( embed::getIconPixmap( "mute_off" ) );
m_muteBtn->move( 44, 4 );

View File

@@ -58,7 +58,7 @@
#include "channel_track.h"
#include "mmp.h"
#include "config_mgr.h"
#include "midi_file.h"
#include "import_filter.h"
#include "instrument.h"
#include "rubberband.h"
@@ -109,6 +109,7 @@ void trackContainer::saveSettings( QDomDocument & _doc, QDomElement & _parent )
{
QDomElement tc_de = _doc.createElement( "trackcontainer" );
tc_de.setAttribute( "type", nodeName() );
mainWindow::saveWidgetState( this, tc_de );
_parent.appendChild( tc_de );
// save settings of each track
@@ -176,6 +177,8 @@ void trackContainer::loadSettings( const QDomElement & _this )
node = node.nextSibling();
}
mainWindow::restoreWidgetState( this, _this );
pd->setValue( start_val + _this.childNodes().count() );
if( was_null )
@@ -463,8 +466,7 @@ void trackContainer::dropEvent( QDropEvent * _de )
}
else if( type == "midifile" )
{
midiFile mf( value );
mf.importToTrackContainer( this );
importFilter::import( value, this );
_de->accept();
}
else if( type.left( 6 ) == "track_" )

View File

@@ -2,6 +2,7 @@
#undef SINGLE_SOURCE_COMPILE
#include "src/lib/string_pair_drag.cpp"
#include "src/lib/buffer_allocator.cpp"
#include "src/lib/edit_history.cpp"
#include "src/lib/embed.cpp"
#include "src/lib/base64.cpp"
#include "src/lib/mmp.cpp"
@@ -9,6 +10,7 @@
#include "src/lib/oscillator.cpp"
#include "src/lib/clipboard.cpp"
#include "src/lib/sample_buffer.cpp"
#include "src/core/import_filter.cpp"
#include "src/core/config_mgr.cpp"
#include "src/core/envelope_and_lfo_widget.cpp"
#include "src/core/song_editor.cpp"
@@ -40,7 +42,6 @@
#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"
@@ -82,4 +83,5 @@
#include "src/widgets/tooltip.cpp"
#include "src/widgets/nstate_button.cpp"
#include "src/widgets/lcd_spinbox.cpp"
#include "src/widgets/automatable_button.cpp"
#endif

View File

@@ -0,0 +1,205 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* automatable_button.cpp - implementation of class automatableButton and
* automatableButtonGroup
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#include "automatable_button.h"
automatableButton::automatableButton( QWidget * _parent, engine * _engine ) :
QWidget( _parent ),
automatableObject<bool>( _engine, FALSE, TRUE, FALSE ),
m_group( NULL ),
m_toggleButton( FALSE )
{
}
automatableButton::~automatableButton()
{
if( m_group != NULL )
{
m_group->removeButton( this );
}
}
void automatableButton::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton )
{
if( m_toggleButton == FALSE )
{
setChecked( TRUE );
}
else
{
toggle();
}
_me->accept();
}
else
{
QWidget::mousePressEvent( _me );
}
}
void automatableButton::mouseReleaseEvent( QMouseEvent * _me )
{
if( m_toggleButton == FALSE )
{
setChecked( FALSE );
}
emit clicked();
}
void automatableButton::toggle( void )
{
if( m_toggleButton == TRUE && m_group != NULL )
{
if( value() == FALSE )
{
m_group->activateButton( this );
}
}
else
{
setValue( !value() );
update();
emit( toggled( value() ) );
}
}
void automatableButton::setChecked( bool _on )
{
if( _on != isChecked() )
{
setValue( _on );
update();
emit( toggled( value() ) );
}
}
automatableButtonGroup::automatableButtonGroup( QObject * _parent,
engine * _engine ) :
QObject( _parent ),
automatableObject<int>( _engine )
{
}
automatableButtonGroup::~automatableButtonGroup()
{
while( m_buttons.empty() == FALSE )
{
removeButton( m_buttons.front() );
}
}
void automatableButtonGroup::addButton( automatableButton * _btn )
{
_btn->m_group = this;
_btn->setToggleButton( TRUE );
_btn->setChecked( FALSE );
// disable step-recording as we're recording changes of states of
// button-group members on our own
_btn->setStepRecording( FALSE );
m_buttons.push_back( _btn );
setRange( 0, m_buttons.size() - 1 );
}
void automatableButtonGroup::removeButton( automatableButton * _btn )
{
m_buttons.erase( qFind( m_buttons.begin(), m_buttons.end(), _btn ) );
_btn->m_group = NULL;
setRange( 0, m_buttons.size() - 1 );
}
void automatableButtonGroup::activateButton( automatableButton * _btn )
{
if( _btn != m_buttons[value()] && m_buttons.findIndex( _btn ) != -1 )
{
setValue( m_buttons.findIndex( _btn ) );
}
}
void automatableButtonGroup::setValue( const int _value )
{
if( m_buttons.empty() == FALSE )
{
// range not updated yet?
if( value() == fittedValue( value() ) )
{
m_buttons[value()]->setChecked( FALSE );
}
automatableObject<int>::setValue( _value );
m_buttons[value()]->setChecked( TRUE );
}
emit valueChanged( value() );
}
#include "automatable_button.moc"
#endif

View File

@@ -54,10 +54,10 @@ QPixmap * comboBox::s_arrow = NULL;
const int CB_ARROW_BTN_WIDTH = 20;
comboBox::comboBox( QWidget * _parent ) :
comboBox::comboBox( QWidget * _parent, engine * _engine ) :
QWidget( _parent ),
automatableObject<int>( _engine ),
m_menu( this ),
m_currentIndex( 0 ),
m_pressed( FALSE )
{
if( s_background == NULL )
@@ -124,6 +124,7 @@ void comboBox::addItem( const QString & _item, const QPixmap & _pixmap )
#endif
);
}
setRange( 0, m_items.size() - 1 );
}
@@ -145,13 +146,14 @@ int comboBox::findText( const QString & _txt ) const
void comboBox::setCurrentIndex( int _idx )
void comboBox::setValue( const int _idx )
{
m_currentIndex = tLimit<int>( _idx, 0, ( m_items.size() > 0 ) ?
m_items.size() - 1 : 0 );
emit( currentIndexChanged( m_currentIndex ) );
automatableObject<int>::setValue( _idx );
/* m_value = tLimit<int>( _idx, 0, ( m_items.size() > 0 ) ?
m_items.size() - 1 : 0 );*/
emit( valueChanged( value() ) );
emit( activated( ( m_items.size() > 0 ) ?
m_items[m_currentIndex].first : "" ) );
m_items[value()].first : "" ) );
update();
}
@@ -180,11 +182,11 @@ void comboBox::mousePressEvent( QMouseEvent * _me )
}
else if( _me->button() == Qt::LeftButton )
{
setCurrentIndex( currentIndex() + 1 );
setValue( value() + 1 );
}
else if( _me->button() == Qt::RightButton )
{
setCurrentIndex( currentIndex() - 1 );
setValue( value() - 1 );
}
}
@@ -235,7 +237,7 @@ void comboBox::paintEvent( QPaintEvent * _pe )
p.setFont( font() );
p.setClipRect( QRect( 5, 2, width() - CB_ARROW_BTN_WIDTH - 8,
height() - 2 ) );
const QPixmap & item_pm = m_items[currentIndex()].second;
const QPixmap & item_pm = m_items[value()].second;
int tx = 4;
if( item_pm.isNull() == FALSE )
{
@@ -244,10 +246,10 @@ void comboBox::paintEvent( QPaintEvent * _pe )
}
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( tx+1, p.fontMetrics().height()+1,
m_items[currentIndex()].first );
m_items[value()].first );
p.setPen( QColor( 224, 224, 224 ) );
p.drawText( tx, p.fontMetrics().height(),
m_items[currentIndex()].first );
m_items[value()].first );
}
#ifdef QT3
@@ -261,7 +263,7 @@ void comboBox::paintEvent( QPaintEvent * _pe )
void comboBox::wheelEvent( QWheelEvent * _we )
{
setCurrentIndex( currentIndex() + ( ( _we->delta() < 0 ) ? 1 : -1 ) );
setValue( value() + ( ( _we->delta() < 0 ) ? 1 : -1 ) );
_we->accept();
}
@@ -271,7 +273,7 @@ void comboBox::wheelEvent( QWheelEvent * _we )
void comboBox::setItem( QAction * _item )
{
setCurrentIndex( findText( _item->text() ) );
setValue( findText( _item->text() ) );
}
@@ -288,7 +290,7 @@ void comboBox::setItem( QAction * )
void comboBox::setItem( int _item )
{
setCurrentIndex( _item );
setValue( _item );
}

View File

@@ -39,8 +39,6 @@
#include <qtimer.h>
#include <qobjectlist.h>
#define setChecked setOn
#endif
#ifndef __USE_XOPEN
@@ -59,8 +57,10 @@
QPixmap * groupBox::s_ledBg = NULL;
groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
groupBox::groupBox( const QString & _caption, QWidget * _parent,
engine * _engine ) :
QWidget( _parent ),
engineObject( _engine ),
m_caption( _caption ),
m_origHeight( height() ),
m_animating( FALSE )
@@ -73,7 +73,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
updatePixmap();
m_led = new pixmapButton( this );
m_led = new pixmapButton( this, eng() );
m_led->move( 2, 3 );
m_led->setActiveGraphic( embed::getIconPixmap( "led_green" ) );
m_led->setInactiveGraphic( embed::getIconPixmap( "led_off" ) );
@@ -238,8 +238,6 @@ void groupBox::updatePixmap( void )
#undef setChecked
#include "group_box.moc"

View File

@@ -68,7 +68,6 @@
#include <math.h>
#include "knob.h"
#include "song_editor.h"
/*#include "midi_client.h"*/
#include "embed.h"
#include "spc_bg_hndl_widget.h"
@@ -95,8 +94,7 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
, _name.ascii()
#endif
),
engineObject( _engine ),
automatableObject<float>(),
automatableObject<float>( _engine ),
m_mouseOffset( 0.0f ),
m_buttonPressed( FALSE ),
m_angle( 0.0f ),
@@ -413,6 +411,9 @@ void knob::mousePressEvent( QMouseEvent * _me )
if( _me->button() == Qt::LeftButton &&
eng()->getMainWindow()->isCtrlPressed() == FALSE )
{
setStepRecording( FALSE );
m_oldValue = value();
const QPoint & p = _me->pos();
m_origMousePos = p;
@@ -464,7 +465,6 @@ void knob::mouseMoveEvent( QMouseEvent * _me )
{
QCursor::setPos( mapToGlobal( m_origMousePos ) );
}
eng()->getSongEditor()->setModified();
}
s_textFloat->setText( m_hintTextBeforeValue +
@@ -478,6 +478,9 @@ void knob::mouseMoveEvent( QMouseEvent * _me )
//! Mouse Release Event handler
void knob::mouseReleaseEvent( QMouseEvent * /* _me*/ )
{
setStepRecording( TRUE );
addStepFromOldToCurVal();
if( m_buttonPressed )
{
m_buttonPressed = TRUE;
@@ -560,7 +563,6 @@ void knob::wheelEvent( QWheelEvent * _we )
_we->accept();
const int inc = ( _we->delta() > 0 ) ? 1 : -1;
incValue( inc );
eng()->getSongEditor()->setModified();
s_textFloat->reparent( this );
@@ -730,7 +732,6 @@ void knob::setStep( float _vstep )
void knob::reset( void )
{
setValue( m_initValue );
eng()->getSongEditor()->setModified();
s_textFloat->reparent( this );
s_textFloat->setText( m_hintTextBeforeValue +
QString::number( value() ) +
@@ -754,7 +755,6 @@ void knob::copyValue( void )
void knob::pasteValue( void )
{
setValue( s_copiedValue );
eng()->getSongEditor()->setModified();
s_textFloat->reparent( this );
s_textFloat->setText( m_hintTextBeforeValue +
QString::number( value() ) +

View File

@@ -49,9 +49,9 @@
lcdSpinBox::lcdSpinBox( int _min, int _max, int _num_digits,
QWidget * _parent ) :
QWidget * _parent, engine * _engine ) :
QWidget( _parent ),
automatableObject<int>( 0, _min, _max ),
automatableObject<int>( _engine, 0, _min, _max ),
m_label( NULL ),
m_origMousePos()
{
@@ -62,7 +62,7 @@ lcdSpinBox::lcdSpinBox( int _min, int _max, int _num_digits,
setEnabled( TRUE );
// value is automatically limited to given range
setValue( 0 );
setInitValue( 0 );
m_number->setFixedSize( m_number->sizeHint() * 0.9 );
setFixedSize( m_number->size() );
@@ -152,6 +152,7 @@ void lcdSpinBox::mousePressEvent( QMouseEvent * _me )
{
m_origMousePos = _me->globalPos();
QApplication::setOverrideCursor( Qt::BlankCursor );
m_oldValue = value();
}
}
@@ -169,8 +170,10 @@ void lcdSpinBox::mouseMoveEvent( QMouseEvent * _me )
int dy = _me->globalY() - m_origMousePos.y();
if( dy > 1 || dy < -1 )
{
setValue( value() - dy / 2 * step() );
setStepRecording( FALSE );// why is this neccessary?!
setInitValue( value() - dy / 2 * step() );
emit valueChanged( value() );
setStepRecording( TRUE );
QCursor::setPos( m_origMousePos );
}
}
@@ -181,6 +184,8 @@ void lcdSpinBox::mouseMoveEvent( QMouseEvent * _me )
void lcdSpinBox::mouseReleaseEvent( QMouseEvent * _me )
{
addStepFromOldToCurVal();
QCursor::setPos( m_origMousePos );
QApplication::restoreOverrideCursor();
}

View File

@@ -55,11 +55,12 @@ static const QString names[ledCheckBox::TOTAL_COLORS] =
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
ledColors _color ) :
QWidget( _parent ),
automatableObject<bool>( FALSE, TRUE, FALSE ),
engine * _engine, ledColors _color ) :
automatableButton( _parent, _engine ),
m_text( _text )
{
setToggleButton( TRUE );
if( _color >= TOTAL_COLORS || _color < YELLOW )
{
_color = YELLOW;
@@ -93,42 +94,6 @@ ledCheckBox::~ledCheckBox()
void ledCheckBox::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton )
{
toggle();
}
}
void ledCheckBox::toggle( void )
{
setValue( !value() );
update();
emit( toggled( value() ) );
}
void ledCheckBox::setChecked( bool _on )
{
if( _on != isChecked() )
{
toggle();
}
else
{
emit( toggled( value() ) );
}
}
void ledCheckBox::paintEvent( QPaintEvent * )
{
#ifdef QT4

View File

@@ -45,11 +45,11 @@
pixmapButton::pixmapButton( QWidget * _parent ) :
QPushButton( _parent ),
m_activePixmap( NULL ),
m_inactivePixmap( NULL ),
m_bgPixmap( NULL )
pixmapButton::pixmapButton( QWidget * _parent, engine * _engine ) :
automatableButton( _parent, _engine ),
m_activePixmap(),
m_inactivePixmap(),
m_bgPixmap()
{
setActiveGraphic( embed::getIconPixmap( "led_yellow" ) );
setInactiveGraphic( embed::getIconPixmap( "led_off" ), FALSE );
@@ -58,7 +58,7 @@ pixmapButton::pixmapButton( QWidget * _parent ) :
setBackgroundMode( Qt::NoBackground );
#endif
setCheckable( TRUE );
//setCheckable( TRUE );
}
@@ -66,9 +66,6 @@ pixmapButton::pixmapButton( QWidget * _parent ) :
pixmapButton::~pixmapButton()
{
delete m_activePixmap;
delete m_inactivePixmap;
delete m_bgPixmap;
}
@@ -85,25 +82,23 @@ void pixmapButton::paintEvent( QPaintEvent * )
QPainter p( &draw_pm, this );
#endif
if( m_bgPixmap != NULL )
if( !m_bgPixmap.isNull() )
{
p.drawPixmap( 0, 0, *m_bgPixmap );
p.drawPixmap( 0, 0, m_bgPixmap );
}
if( isChecked() || isDown() )
if( isChecked() )
{
if( m_activePixmap != NULL )
if( !m_activePixmap.isNull() )
{
p.drawPixmap( 0, 0, *m_activePixmap );
p.drawPixmap( 0, 0, m_activePixmap );
}
}
else
else if( !m_inactivePixmap.isNull() )
{
if( m_inactivePixmap != NULL )
{
p.drawPixmap( 0, 0, *m_inactivePixmap );
}
p.drawPixmap( 0, 0, m_inactivePixmap );
}
#ifndef QT4
// and blit all the drawn stuff on the screen...
bitBlt( this, rect().topLeft(), &draw_pm );
@@ -114,24 +109,26 @@ void pixmapButton::paintEvent( QPaintEvent * )
void pixmapButton::mousePressEvent( QMouseEvent * _me)
void pixmapButton::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::RightButton )
{
emit( clickedRight() );
_me->accept();
}
else
{
QPushButton::mousePressEvent( _me );
automatableButton::mousePressEvent( _me );
}
}
void pixmapButton::mouseDoubleClickEvent( QMouseEvent * )
void pixmapButton::mouseDoubleClickEvent( QMouseEvent * _me )
{
emit doubleClicked();
_me->accept();
}
@@ -139,10 +136,8 @@ void pixmapButton::mouseDoubleClickEvent( QMouseEvent * )
void pixmapButton::setActiveGraphic( const QPixmap & _pm )
{
delete m_activePixmap;
m_activePixmap = new QPixmap( _pm );
resize( m_activePixmap->width(), m_activePixmap->height() );
m_activePixmap = _pm;
resize( m_activePixmap.width(), m_activePixmap.height() );
}
@@ -150,9 +145,7 @@ void pixmapButton::setActiveGraphic( const QPixmap & _pm )
void pixmapButton::setInactiveGraphic( const QPixmap & _pm, bool _update )
{
delete m_inactivePixmap;
m_inactivePixmap = new QPixmap( _pm );
m_inactivePixmap = _pm;
if( _update )
{
update();
@@ -164,9 +157,7 @@ void pixmapButton::setInactiveGraphic( const QPixmap & _pm, bool _update )
void pixmapButton::setBgGraphic( const QPixmap & _pm )
{
delete m_bgPixmap;
m_bgPixmap = new QPixmap( _pm );
m_bgPixmap = _pm;
}

View File

@@ -573,8 +573,11 @@ void projectNotes::alignmentChanged( int _a )
void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _parent )
{
QDomElement pn_de = _doc.createElement( nodeName() );
mainWindow::saveWidgetState( this, pn_de );
QDomCDATASection ds = _doc.createCDATASection( m_edit->toHtml() );
pn_de.appendChild( ds );
_parent.appendChild( pn_de );
}
@@ -583,6 +586,7 @@ void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _parent )
void projectNotes::loadSettings( const QDomElement & _this )
{
mainWindow::restoreWidgetState( this, _this );
m_edit->setHtml( _this.text() );
}