From 27b7bf6815cda7abb67026c37b3e44daee1803cb Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 15 Mar 2012 18:21:23 +0000 Subject: merged with trunk --- muse2/CMakeLists.txt | 36 +- muse2/ChangeLog | 82 + muse2/al/sig.cpp | 1 - muse2/awl/posedit.cpp | 1 + muse2/awl/posedit.h | 3 +- muse2/awl/sigedit.cpp | 5 +- muse2/awl/sigedit.h | 5 +- muse2/awl/sigspinbox.cpp | 10 +- muse2/awl/sigspinbox.h | 1 + muse2/muse/app.cpp | 375 +- muse2/muse/app.h | 23 +- muse2/muse/appearance.cpp | 193 +- muse2/muse/appearance.h | 1 + muse2/muse/arranger/alayout.cpp | 26 +- muse2/muse/arranger/alayout.h | 9 +- muse2/muse/arranger/arranger.cpp | 158 +- muse2/muse/arranger/arranger.h | 43 +- muse2/muse/arranger/arrangerview.cpp | 10 +- muse2/muse/arranger/pcanvas.cpp | 164 +- muse2/muse/arranger/pcanvas.h | 5 - muse2/muse/arranger/tlist.cpp | 225 +- muse2/muse/arranger/tlist.h | 6 - muse2/muse/audio.cpp | 145 +- muse2/muse/audio.h | 26 +- muse2/muse/audioconvert.cpp | 102 +- muse2/muse/audioconvert.h | 27 +- muse2/muse/audioprefetch.cpp | 39 +- muse2/muse/audioprefetch.h | 4 - muse2/muse/audiotrack.cpp | 121 +- muse2/muse/cliplist/cliplist.cpp | 15 +- muse2/muse/cobject.cpp | 24 +- muse2/muse/cobject.h | 4 - muse2/muse/conf.cpp | 179 +- muse2/muse/confmport.cpp | 445 +- muse2/muse/confmport.h | 1 - muse2/muse/controlfifo.cpp | 3 - muse2/muse/ctrl.cpp | 85 +- muse2/muse/ctrl.h | 5 +- muse2/muse/ctrl/ctrlcanvas.cpp | 149 +- muse2/muse/ctrl/ctrlcanvas.h | 20 +- muse2/muse/ctrl/ctrledit.cpp | 20 +- muse2/muse/ctrl/ctrledit.h | 2 +- muse2/muse/ctrl/ctrlpanel.cpp | 63 +- muse2/muse/ctrl/ctrlpanel.h | 2 - muse2/muse/driver/alsamidi.cpp | 373 +- muse2/muse/driver/alsamidi.h | 14 +- muse2/muse/driver/alsatimer.cpp | 2 +- muse2/muse/driver/jack.cpp | 720 +- muse2/muse/driver/jackaudio.h | 12 +- muse2/muse/driver/jackmidi.cpp | 444 +- muse2/muse/driver/jackmidi.h | 4 +- muse2/muse/driver/rtctimer.cpp | 4 +- muse2/muse/driver/rtctimer.h | 22 +- muse2/muse/dssihost.cpp | 234 +- muse2/muse/dssihost.h | 64 +- muse2/muse/evdata.h | 1 - muse2/muse/event.cpp | 5 - muse2/muse/event.h | 4 +- muse2/muse/eventbase.h | 9 - muse2/muse/eventlist.cpp | 3 - muse2/muse/exportmidi.cpp | 29 +- muse2/muse/functions.cpp | 2 +- muse2/muse/gconfig.cpp | 6 +- muse2/muse/gconfig.h | 8 +- muse2/muse/globals.cpp | 33 +- muse2/muse/globals.h | 5 +- muse2/muse/gui.h | 21 - muse2/muse/help.cpp | 1 - muse2/muse/helper.cpp | 101 +- muse2/muse/importmidi.cpp | 32 +- muse2/muse/instruments/editinstrument.cpp | 708 +- muse2/muse/instruments/editinstrument.h | 5 +- muse2/muse/instruments/midictrledit.cpp | 34 +- muse2/muse/instruments/minstrument.cpp | 201 +- muse2/muse/instruments/minstrument.h | 3 +- muse2/muse/liste/editevent.cpp | 31 +- muse2/muse/liste/editevent.h | 5 - muse2/muse/liste/listedit.cpp | 15 +- muse2/muse/main.cpp | 71 +- muse2/muse/marker/marker.cpp | 1 - muse2/muse/marker/markerview.cpp | 28 +- muse2/muse/marker/markerview.h | 2 - muse2/muse/master/lmaster.cpp | 71 +- muse2/muse/master/lmaster.h | 4 - muse2/muse/master/master.cpp | 2 +- muse2/muse/master/masteredit.cpp | 88 +- muse2/muse/master/masteredit.h | 4 +- muse2/muse/master/tscale.cpp | 4 - muse2/muse/memory.cpp | 5 +- muse2/muse/midi.cpp | 31 +- muse2/muse/midi.h | 3 +- muse2/muse/midictrl.cpp | 63 - muse2/muse/midictrl.h | 14 - muse2/muse/mididev.cpp | 173 +- muse2/muse/mididev.h | 13 +- muse2/muse/midiedit/dcanvas.cpp | 18 +- muse2/muse/midiedit/dlist.cpp | 10 +- muse2/muse/midiedit/dlist.h | 2 - muse2/muse/midiedit/drumedit.cpp | 82 +- muse2/muse/midiedit/drumedit.h | 2 +- muse2/muse/midiedit/drummap.cpp | 94 +- muse2/muse/midiedit/drummap.h | 1 - muse2/muse/midiedit/ecanvas.cpp | 12 +- muse2/muse/midiedit/ecanvas.h | 1 - muse2/muse/midiedit/piano.cpp | 8 +- muse2/muse/midiedit/pianoroll.cpp | 95 +- muse2/muse/midiedit/pianoroll.h | 9 +- muse2/muse/midiedit/prcanvas.cpp | 62 +- muse2/muse/midiedit/scoreedit.cpp | 142 +- muse2/muse/midiedit/scoreedit.h | 9 +- muse2/muse/midieditor.h | 5 - muse2/muse/midievent.cpp | 7 - muse2/muse/midievent.h | 1 - muse2/muse/midifile.cpp | 11 +- muse2/muse/midiport.cpp | 328 +- muse2/muse/midiport.h | 3 +- muse2/muse/midiseq.cpp | 201 +- muse2/muse/midiseq.h | 17 +- muse2/muse/miditransform.cpp | 9 - muse2/muse/miditransform.h | 1 - muse2/muse/mixer/astrip.cpp | 10 +- muse2/muse/mixer/mstrip.cpp | 45 +- muse2/muse/mixer/rack.cpp | 3 + muse2/muse/mpevent.cpp | 8 +- muse2/muse/mpevent.h | 14 +- muse2/muse/node.cpp | 159 +- muse2/muse/node.h | 3 - muse2/muse/osc.cpp | 226 +- muse2/muse/osc.h | 27 +- muse2/muse/part.cpp | 365 +- muse2/muse/plugin.cpp | 629 +- muse2/muse/plugin.h | 79 +- muse2/muse/pos.cpp | 6 +- muse2/muse/remote/pyapi.cpp | 3 +- muse2/muse/route.cpp | 91 +- muse2/muse/route.h | 12 +- muse2/muse/seqmsg.cpp | 66 +- muse2/muse/shortcuts.h | 2 +- muse2/muse/sig.cpp | 11 +- muse2/muse/sig.h | 6 +- muse2/muse/song.cpp | 443 +- muse2/muse/song.h | 6 +- muse2/muse/songfile.cpp | 161 +- muse2/muse/stringparam.h | 12 +- muse2/muse/structure.cpp | 3 - muse2/muse/style.qss | 4 +- muse2/muse/sync.cpp | 146 +- muse2/muse/sync.h | 20 +- muse2/muse/synth.cpp | 137 +- muse2/muse/synth.h | 50 +- muse2/muse/tempo.cpp | 17 +- muse2/muse/tempo.h | 1 + muse2/muse/thread.cpp | 38 +- muse2/muse/thread.h | 5 +- muse2/muse/ticksynth.cpp | 13 +- muse2/muse/track.cpp | 83 +- muse2/muse/track.h | 39 +- muse2/muse/transport.cpp | 24 +- muse2/muse/transport.h | 1 + muse2/muse/undo.cpp | 60 +- muse2/muse/vst.cpp | 7 +- muse2/muse/vst.h | 4 - muse2/muse/wave.cpp | 46 +- muse2/muse/wave.h | 2 - muse2/muse/waveedit/waveedit.cpp | 8 +- muse2/muse/waveevent.cpp | 28 +- muse2/muse/waveevent.h | 15 +- muse2/muse/wavetrack.cpp | 55 +- muse2/muse/widgets/CMakeLists.txt | 2 + muse2/muse/widgets/doublespinbox.cpp | 102 + muse2/muse/widgets/doublespinbox.h | 73 + muse2/muse/widgets/fdialogbuttons.ui | 25 +- muse2/muse/widgets/filedialog.cpp | 11 +- muse2/muse/widgets/filedialog.h | 2 +- muse2/muse/widgets/genset.cpp | 145 +- muse2/muse/widgets/gensetbase.ui | 43 + muse2/muse/widgets/knob.cpp | 1 + muse2/muse/widgets/midisync.ui | 2 +- muse2/muse/widgets/mtrackinfo.cpp | 67 +- muse2/muse/widgets/mtrackinfo.h | 4 + muse2/muse/widgets/mtrackinfobase.ui | 12 +- muse2/muse/widgets/musewidgetsplug.cpp | 3 +- muse2/muse/widgets/noteinfo.cpp | 28 +- muse2/muse/widgets/noteinfo.h | 15 +- muse2/muse/widgets/pitchedit.cpp | 2 +- muse2/muse/widgets/pitchedit.h | 4 +- muse2/muse/widgets/projectcreate.ui | 321 +- muse2/muse/widgets/projectcreateimpl.cpp | 19 +- muse2/muse/widgets/projectcreateimpl.h | 5 +- muse2/muse/widgets/routepopup.cpp | 4 +- muse2/muse/widgets/spinbox.cpp | 109 +- muse2/muse/widgets/spinbox.h | 45 +- muse2/muse/widgets/tb1.cpp | 3 + muse2/muse/widgets/tempolabel.cpp | 2 +- muse2/muse/widgets/tempolabel.h | 4 +- muse2/muse/xml.cpp | 28 +- .../instruments/KORG microSTATION combinations.idf | 278 + muse2/share/instruments/KORG microSTATION.idf | 666 + muse2/share/locale/muse_cs.ts | 16251 ++++++++++++++ muse2/share/locale/muse_de.ts | 301 +- muse2/share/locale/muse_ru.ts | 21330 +++++-------------- muse2/share/templates/MusE.cfg | 1 + muse2/share/templates/audio.med | 400 +- muse2/share/templates/default.med | 401 +- muse2/share/templates/midiGM.med | 396 +- muse2/share/templates/monorecord.med | 402 +- muse2/share/templates/synti.med | 416 +- muse2/synti/fluid/fluid.cpp | 7 +- muse2/synti/fluidsynth/fluidsynti.cpp | 3 +- muse2/synti/simpledrums2/CMakeLists.txt | 7 +- muse2/synti/simpledrums2/simpledrums.cpp | 3 +- muse2/synti/simpledrums2/ssplugingui.cpp | 6 +- 212 files changed, 28804 insertions(+), 24063 deletions(-) create mode 100644 muse2/muse/widgets/doublespinbox.cpp create mode 100644 muse2/muse/widgets/doublespinbox.h create mode 100755 muse2/share/instruments/KORG microSTATION combinations.idf create mode 100644 muse2/share/instruments/KORG microSTATION.idf create mode 100644 muse2/share/locale/muse_cs.ts (limited to 'muse2') diff --git a/muse2/CMakeLists.txt b/muse2/CMakeLists.txt index b670930e..12bf4855 100644 --- a/muse2/CMakeLists.txt +++ b/muse2/CMakeLists.txt @@ -31,10 +31,22 @@ if (COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) -# set libdir if not use -DCMAKE_INSTALL_LIBDIR -if (NOT CMAKE_INSTALL_LIBDIR) - SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") -endif (NOT CMAKE_INSTALL_LIBDIR) +if (NOT DEFINED LIB_SUFFIX) + SET(LIB_SUFFIX "" CACHE STRING "Suffix for installed library path. Ex. 64 for lib64") +endif (NOT DEFINED LIB_SUFFIX) + +# set libdir if not use -DLIB_INSTALL_DIR +if (NOT LIB_INSTALL_DIR) + if(CMAKE_INSTALL_LIBDIR) + SET(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) + else(CMAKE_INSTALL_LIBDIR) + SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") + endif(CMAKE_INSTALL_LIBDIR) +endif (NOT LIB_INSTALL_DIR) + +if (LIB_SUFFIX) + message(" Install libraries to: " ${LIB_INSTALL_DIR} ) +endif (LIB_SUFFIX) IF(NOT DEFINED SHARE_INSTALL_PREFIX) SET(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share") @@ -66,19 +78,19 @@ set(CMAKE_SKIP_RULE_DEPENDENCY TRUE) SET(MusE_VERSION_MAJOR 2) SET(MusE_VERSION_MINOR 0) SET(MusE_VERSION_PATCH 0) -SET(MusE_VERSION "2.0rc1") -SET(MusE_VERSION_FULL "2.0rc1") -SET(MusE_INSTALL_NAME "muse-2.0rc1") +SET(MusE_VERSION "2.0rc2") +SET(MusE_VERSION_FULL "2.0rc2") +SET(MusE_INSTALL_NAME "muse-2.0rc2") SET(MusE_EXEC_NAME "muse2") ## The directory where we will install the shared components: -SET(MusE_MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/modules) +SET(MusE_MODULES_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME}/modules) ## Synthesizers directory -SET(MusE_SYNTHI_DIR ${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/synthi) +SET(MusE_SYNTHI_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME}/synthi) ## Plugins directory -SET(MusE_PLUGINS_DIR ${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}/plugins) +SET(MusE_PLUGINS_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME}/plugins) ## Top documentation dir IF(NOT DEFINED MusE_DOC_DIR) @@ -89,7 +101,7 @@ ENDIF(NOT DEFINED MusE_DOC_DIR) SET(MusE_SHARE_DIR ${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}) ## Lib directory -SET(MusE_LIB_DIR ${CMAKE_INSTALL_LIBDIR}/${MusE_INSTALL_NAME}) +SET(MusE_LIB_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME}) FIND_PROGRAM(SVNVER svnversion) if (${SVNVER} STREQUAL "SVNVER-NOTFOUND") @@ -141,7 +153,7 @@ endif (APPLE) set(QT_MIN_VERSION "4.3.0") set(QT_USE_QTXML TRUE) set(QT_USE_QTDESIGNER TRUE) -set(QT_USE_QTNSPLUGIN TRUE) +#set(QT_USE_QTNSPLUGIN TRUE) set(QT_USE_QTSVG TRUE) find_package(Qt4) diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 4b9646f4..6ff81359 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,85 @@ +10.03.2012: + - Track routing: Fixed duplicate routes: Reverted usage of operation group in Song::addTrack. (Tim) + - Templates: Default routing: Restored default Jack out/in routes in audio.med, synti.med, default.med, monorecord.med. (Tim) + - Switch from LIB_PATH_SUFFIX to LIB_SUFFIX, and from CMAKE_INSTALL_LIBDIR to LIB_INSTALL_DIR in CMakeLists.txt. Still fall + back to CMAKE_INSTALL_LIBDIR if it is specified explicitly instead of LIB_INSTALL_DIR. (Orcan) + - Fix cmake warning in simpledrums when CMAKE_BUILD_TYPE is not set. (Orcan) +09.03.2012: + - Track list: Popup editors: Pre-select text. (Tim) + - Track list channel popup editor: Eat up dbl-clcks if already open. Caused pseudo 'wrapping' if disabled arrows dbl-clicked. (Tim) +08.03.2012: + * Comprehensive focus fixes: (Tim...) + * New: Gui behaviour option: "Smart Focus": All toolbar boxes give focus back to respective canvases. + (Most boxes except Score Velo On/Off changed to StrongFocus, for non-focused wheel support.) + - Focusing + tabbing fixes: Exclusions, tightening of tab sequences. + - !! Most spinboxes now wait until return pressed !! For example the Song Length box. + - PianoRoll toolbar: Fixed auto-repeats - optimized NoteInfo::setDeltaMode(). + - Midi boxes: Fixed Ctrl-click on/off. + - Master Editor: Fixed can't edit if not enabled. Also Transport sig box. + - TracK Info panel: Fixed Scrolling. TODO: Make step sizes reasonable, same as Pianoroll ScrollBox. + TODO: Scroll when tabbing among the Track Info controls ! + - Track List key handling: Fixed TList::moveSelection(). + - Visible Tracks: Drums and Synths: Fixed Track::isVisible(). + - Track List, and Master Editor: Fixed popup editors. Sizing fixes. Use no frames. + - Event List Editor: Fixed not updating when parts modified. + - Pianoroll and Drum Editor: Fixed not updating sometimes ex. moving part past end of song. + (Was returning prematurely from songChanged() coding if they got SC_SOLO.) +23.02.2012: + - Compile fix in pyapi.cpp (Orcan) + - Don't optimize debug builds of simpledrums (Orcan) +13.02.2012: + - CMake build system: Added cached variable LIB_PATH_SUFFIX, may be set to 64 so that installed library path is lib64 or whatever. (Tim) +12.02.2012: + - Midi: Force events in play event list to be sent when playing, even if redundant. TODO: Fix sending controllers during seek. (By Tim...) + - Midi revert: MidiPort::setMidiDevice(): Send controllers in song to synths. Synths were not restoring vol for ex. My old bad. + - Fluid: Fixed pitch input: Add 8192. + - Fluid + Fluidsynth + SimpleDrums: ::processEvent(): Don't return true for controllers (why?). Was causing multiple send attempts. + - SimpleDrums: Fixed too-short plugin chooser: In ctor SS_PluginGui rem'd a couple of height-fixing lines. Hm, FIXME - was OK before. + - Midi ports config window: Allow default output channel column to unselect all channels ie. no default output channels at all. +31.01.2012: + - Jack Midi: Added missing midi sync output functions start/stop/SPP etc. (By Tim...) + TODO: Give its own clock, currently it's driven by ALSA clock. TODO: ALSA clock out seems badly broken. + - Jack Midi: Fixed Song Position Pointer sync input larger than 10 bars. + - ALSA: Seek sends wrong CCs. putMidiEvent() not respecting CTRL_PROGRAM and CTRL_PITCH. (Thanks to Dennis Schulmeister). + - Routing popup: Fixed crash with empty ports. + - Jack Midi: Fixed crashes/lockups when 'Use Jack Transport' off. Completely re-wrote Jack dummy tranport sync to behave like Jack. + - Midi:Increased MIDI_FIFO_SIZE to 4096 and MIDI_REC_FIFO_SIZE to 256. + - Midi: Sustain: Fixed inhibit/re-enable on stop/play. Also added during seek to quiet things down. + - Midi: Don't send controllers during seek if part or track muted or off. + - Midi: Send controllers during seek only if a change occurred - but force sending if at position 0, or value exists at current position. + - ALSA Revert: Removed recent MidiAlsaDevice::playEventFifo. Hm, too cautious? + - Midi sync: Removed redundant and too-early 'continue' commands. Audio::startRolling already properly does this when sync 'ready to roll'. + - Midi: Fixed timing error. MEvent::operator<() Put same-time note-ons after controllers so that program comes before notes! (For example). + - Jack Midi: Fixed timing error: Reserve multi-events at same frame-time, NOT at successive frames. (Otherwise nightmare to sort stuff.) + - Midi Revert: Re-installed ALSA sequencer thread SEQM_SEEK and SEQM_STOP, and revert code to call them from audio thread. + TODO: Option "Don't use ALSA midi". Midi thread gets in the way of Jack. But ironically ALSA + long-period Audio timing currently best! + - Midi sync: Song saving: Fixed slight typo saving MMC sync: Was using MRT not MMC. +26.01.2012: + - Fixed crash with drag/drop copying plugins when their gui was open (rj) + - Fixed mid clicking to change aux value (rj) +25.01.2012: + - Fixed some focus stealing that prevented shortcuts from working for Snap dialog and Plugin rack (rj) +24.01.2012: + - Removed QT_USE_QTNSPLUGIN from CMakeLists.txt (rj) +15.01.2012: + - Added instrument definitions for "KORG microSTATION" sent + in by Marko Nikolic (flo) +14.01.2012: + - Added "write topwin state" checkbox (flo) +12.01.2012: + - Added Czech translation from Pavel Fric (rj) +11.01.2012: + - Complain more if timing source isn't good enough (rj) +10.01.2012: + - Store default style so we can do an immediate recall when setting 'keep system style' (rj) +07.01.2012: + - Added choice to keep system GUI style (rj) +07.01.2012: + - Fixed compile errors if not configured for OSC or DSSI. (Tim) +07.01.2012: + - MusE 2.0 release candidate 2 released (rj) +06.01.2012: + - added super-glue feature (flo) 03.01.2012: - ADDED NEW STYLE DRUM TRACKS: (flo93) diff --git a/muse2/al/sig.cpp b/muse2/al/sig.cpp index 675a6392..ec0d24a4 100644 --- a/muse2/al/sig.cpp +++ b/muse2/al/sig.cpp @@ -82,7 +82,6 @@ void SigList::add(unsigned tick, const TimeSignature& s) { if (s.z == 0 || s.n == 0) { printf("illegal signature %d/%d\n", s.z, s.n); - // Added by Tim. return; } tick = raster1(tick, 0); diff --git a/muse2/awl/posedit.cpp b/muse2/awl/posedit.cpp index 049b59bd..cc4062ef 100644 --- a/muse2/awl/posedit.cpp +++ b/muse2/awl/posedit.cpp @@ -115,6 +115,7 @@ bool PosEdit::event(QEvent* event) // choose to clear it in their constructor." // Just to be sure. Otherwise escape will close a midi editor for example, which is annoying. ke->setAccepted(true); + emit escapePressed(); return true; } diff --git a/muse2/awl/posedit.h b/muse2/awl/posedit.h index 29692124..65bc48de 100644 --- a/muse2/awl/posedit.h +++ b/muse2/awl/posedit.h @@ -60,8 +60,9 @@ class PosEdit : public QAbstractSpinBox signals: void valueChanged(const MusECore::Pos&); - // Choose these three carefully, watch out for focusing recursion. + // Choose these carefully, watch out for focusing recursion. void returnPressed(); + void escapePressed(); void lostFocus(); // This is emitted when focus lost or return pressed (same as QAbstractSpinBox). void editingFinished(); diff --git a/muse2/awl/sigedit.cpp b/muse2/awl/sigedit.cpp index bbe96d61..70b60a74 100644 --- a/muse2/awl/sigedit.cpp +++ b/muse2/awl/sigedit.cpp @@ -45,6 +45,8 @@ SigEdit::SigEdit(QWidget* parent) slash = new QLabel("/",this); zSpin = new SigSpinBox(this); nSpin = new SigSpinBox(this); + zSpin->setFocusPolicy(Qt::StrongFocus); + nSpin->setFocusPolicy(Qt::StrongFocus); zSpin->setRange(1,100); nSpin->setDenominator(); nSpin->setRange(1,128); @@ -58,6 +60,8 @@ SigEdit::SigEdit(QWidget* parent) connect(nSpin, SIGNAL(valueChanged(int)), SLOT(setN(int))); connect(nSpin, SIGNAL(returnPressed()), SIGNAL(returnPressed())); connect(zSpin, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(nSpin, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(zSpin, SIGNAL(escapePressed()), SIGNAL(escapePressed())); connect(zSpin, SIGNAL(moveFocus()), SLOT(moveFocus())); connect(nSpin, SIGNAL(moveFocus()), SLOT(moveFocus())); @@ -71,7 +75,6 @@ SigEdit::~SigEdit() delete nSpin; } - //--------------------------------------------------------- // moveFocus //--------------------------------------------------------- diff --git a/muse2/awl/sigedit.h b/muse2/awl/sigedit.h index 5fe8186d..bfe381ac 100644 --- a/muse2/awl/sigedit.h +++ b/muse2/awl/sigedit.h @@ -44,7 +44,7 @@ namespace Awl { class SigEdit : public QWidget { Q_OBJECT - + AL::TimeSignature _sig; bool initialized; QLabel *slash; @@ -58,6 +58,7 @@ class SigEdit : public QWidget signals: void valueChanged(const AL::TimeSignature&); void returnPressed(); + void escapePressed(); private slots: void setN(const int n); @@ -71,8 +72,8 @@ class SigEdit : public QWidget public: SigEdit(QWidget* parent = 0); ~SigEdit(); - AL::TimeSignature sig() const { return _sig; } + void setFrame(bool v) { zSpin->setFrame(v); nSpin->setFrame(v); } }; } diff --git a/muse2/awl/sigspinbox.cpp b/muse2/awl/sigspinbox.cpp index f1399538..f3cbe06d 100644 --- a/muse2/awl/sigspinbox.cpp +++ b/muse2/awl/sigspinbox.cpp @@ -8,8 +8,7 @@ class MyLineEdit : public QLineEdit { public: - MyLineEdit() : QLineEdit() {}; - MyLineEdit(QWidget* parent) : QLineEdit(parent) {}; + MyLineEdit(QWidget* parent = 0) : QLineEdit(parent) {}; protected: virtual void mousePressEvent (QMouseEvent* e) @@ -19,10 +18,10 @@ class MyLineEdit : public QLineEdit } }; - SigSpinBox::SigSpinBox(QWidget *parent) : QSpinBox(parent) { + setKeyboardTracking(false); _denominator=false; setLineEdit(new MyLineEdit(this)); } @@ -31,9 +30,14 @@ void SigSpinBox::keyPressEvent(QKeyEvent* ev) { switch (ev->key()) { case Qt::Key_Return: + QSpinBox::keyPressEvent(ev); emit returnPressed(); return; break; + case Qt::Key_Escape: + emit escapePressed(); + return; + break; case Qt::Key_Left: case Qt::Key_Right: case Qt::Key_Slash: diff --git a/muse2/awl/sigspinbox.h b/muse2/awl/sigspinbox.h index 92fd1cbc..50299338 100644 --- a/muse2/awl/sigspinbox.h +++ b/muse2/awl/sigspinbox.h @@ -16,6 +16,7 @@ public: signals: void returnPressed(); + void escapePressed(); void moveFocus(); public slots: diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 7e412c25..d9d5a1d9 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -52,6 +53,7 @@ #include "bigtime.h" #include "cliplist/cliplist.h" #include "conf.h" +#include "config.h" #include "debug.h" #include "didyouknow.h" #include "drumedit.h" @@ -109,12 +111,10 @@ static QString* projectList[PROJECT_LIST_LEN]; #ifdef HAVE_LASH #include -#include lash_client_t * lash_client = 0; -extern snd_seq_t * alsaSeq; #endif /* HAVE_LASH */ -int watchAudio, watchAudioPrefetch, watchMidi; +int watchAudioPrefetch, watchMidi; pthread_t splashThread; @@ -190,12 +190,6 @@ bool MusE::seqStart() midiprio = MusEGlobal::midiRTPrioOverride; // FIXME FIXME: The MusEGlobal::realTimePriority of the Jack thread seems to always be 5 less than the value passed to jackd command. - //if(midiprio == MusEGlobal::realTimePriority) - // printf("MusE: WARNING: Midi realtime priority %d is the same as audio realtime priority %d. Try a different setting.\n", - // midiprio, MusEGlobal::realTimePriority); - //if(midiprio == pfprio) - // printf("MusE: WARNING: Midi realtime priority %d is the same as audio prefetch realtime priority %d. Try a different setting.\n", - // midiprio, pfprio); MusEGlobal::audioPrefetch->start(pfprio); @@ -205,7 +199,6 @@ bool MusE::seqStart() int counter=0; while (++counter) { - //if (counter > 10) { if (counter > 1000) { fprintf(stderr,"midi sequencer thread does not start!? Exiting...\n"); exit(33); @@ -299,14 +292,10 @@ void addProject(const QString& name) // MusE //--------------------------------------------------------- -//MusE::MusE(int argc, char** argv) : QMainWindow(0, "mainwindow") MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() { - // By T356. For LADSPA plugins in plugin.cpp - // QWidgetFactory::addWidgetFactory( new PluginWidgetFactory ); ddskrjo setIconSize(ICON_SIZE); - setFocusPolicy(Qt::WheelFocus); - //setFocusPolicy(Qt::NoFocus); + setFocusPolicy(Qt::NoFocus); MusEGlobal::muse = this; // hack clipListEdit = 0; midiSyncConfig = 0; @@ -428,7 +417,7 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() connect(MusEGlobal::rewindAction, SIGNAL(activated()), MusEGlobal::song, SLOT(rewind())); MusEGlobal::forwardAction = new QAction(QIcon(*MusEGui::fforwardIcon), - tr("Forward"), MusEGlobal::transportAction); + tr("Forward"), MusEGlobal::transportAction); MusEGlobal::forwardAction->setWhatsThis(tr("move current position")); connect(MusEGlobal::forwardAction, SIGNAL(activated()), MusEGlobal::song, SLOT(forward())); @@ -723,9 +712,7 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() optionalToolbars.push_back(transportToolbar); optionalToolbars.push_back(panicToolbar); - - //rlimit lim; - //getrlimit(RLIMIT_RTPRIO, &lim); + //rlimit lim; getrlimit(RLIMIT_RTPRIO, &lim); //printf("RLIMIT_RTPRIO soft:%d hard:%d\n", lim.rlim_cur, lim.rlim_max); // Reported 80, 80 even with non-RT kernel. if (MusEGlobal::realTimePriority < sched_get_priority_min(SCHED_FIFO)) @@ -834,10 +821,6 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() menu_functions->addAction(midiResetInstAction); menu_functions->addAction(midiInitInstActions); menu_functions->addAction(midiLocalOffAction); - /* - ** mpid4 = midiInputPlugins->insertItem( - ** QIconSet(*midi_inputplugins_random_rhythm_generatorIcon), tr("Random Rhythm Generator"), 4); - */ //------------------------------------------------------------- // popup Audio @@ -917,10 +900,7 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() menu_help->addSeparator(); menu_help->addAction(helpAboutAction); - //menu_help->insertItem(tr("About&Qt"), this, SLOT(aboutQt())); - //menu_help->addSeparator(); - //menu_ids[CMD_START_WHATSTHIS] = menu_help->insertItem(tr("What's &This?"), this, SLOT(whatsThis()), 0); - + menu_help->addAction(tr("About &Qt"), qApp, SLOT(aboutQt())); //--------------------------------------------------- // Central Widget @@ -982,8 +962,6 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() MusEGlobal::song->blockSignals(false); - // Load start song moved to main.cpp p4.0.41 REMOVE Tim. - changeConfig(false); QSettings settings("MusE", "MusE-qt"); restoreGeometry(settings.value("MusE/geometry").toByteArray()); @@ -991,7 +969,7 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow() MusEGlobal::song->update(); updateWindowMenu(); - // Load start song moved to main.cpp p4.0.41 REMOVE Tim. + // Load start song now in main.cpp } @@ -1024,8 +1002,7 @@ void MusE::loadDefaultSong(int argc, char** argv) name = argv[0]; else if (MusEGlobal::config.startMode == 0) { if (argc < 2) - //name = projectList[0] ? *projectList[0] : QString("untitled"); - name = projectList[0] ? *projectList[0] : MusEGui::getUniqueUntitledName(); // p4.0.40 + name = projectList[0] ? *projectList[0] : MusEGui::getUniqueUntitledName(); else name = argv[0]; printf("starting with selected song %s\n", MusEGlobal::config.startSong.toLatin1().constData()); @@ -1039,11 +1016,7 @@ void MusE::loadDefaultSong(int argc, char** argv) printf("starting with pre configured song %s\n", MusEGlobal::config.startSong.toLatin1().constData()); name = MusEGlobal::config.startSong; } - //loadProjectFile(name, useTemplate, true); loadProjectFile(name, useTemplate, !useTemplate); - - //MusEGlobal::song->update(); - //updateWindowMenu(); } //--------------------------------------------------------- @@ -1061,12 +1034,9 @@ void MusE::resetMidiDevices() void MusE::initMidiDevices() { - // Added by T356 - //MusEGlobal::audio->msgIdle(true); - + //MusEGlobal::audio->msgIdle(true); MusEGlobal::audio->msgInitMidiDevices(); - - //MusEGlobal::audio->msgIdle(false); + //MusEGlobal::audio->msgIdle(false); } //--------------------------------------------------------- @@ -1122,7 +1092,7 @@ void MusE::loadProjectFile(const QString& name, bool songTemplate, bool doReadMi progress->setCancelButton(0); if (!songTemplate) progress->setMinimumDuration(0); // if we are loading a template it will probably be fast and we can wait before showing the dialog - //progress->show(); + // // stop audio threads if running // @@ -1167,15 +1137,12 @@ void MusE::loadProjectFile(const QString& name, bool songTemplate, bool doReadMi void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadMidiPorts) { - //if (audioMixer) - // audioMixer->clear(); if (mixer1) mixer1->clear(); if (mixer2) mixer2->clear(); _arranger->clear(); // clear track info - //if (clearSong()) - if (clearSong(doReadMidiPorts)) // Allow not touching things like midi ports. p4.0.17 TESTING: Maybe some problems... + if (clearSong(doReadMidiPorts)) // Allow not touching things like midi ports. return; progress->setValue(20); @@ -1187,8 +1154,7 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM QApplication::restoreOverrideCursor(); return; } - //project.setFile("untitled"); - project.setFile(MusEGui::getUniqueUntitledName()); // p4.0.40 + project.setFile(MusEGui::getUniqueUntitledName()); MusEGlobal::museProject = MusEGlobal::museProjectInitPath; } else { @@ -1196,11 +1162,6 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM MusEGlobal::museProject = fi.absolutePath(); project.setFile(name); } - // Changed by T356. 01/19/2010. We want the complete extension here. - //QString ex = fi.extension(false).toLower(); - //if (ex.length() == 3) - // ex += "."; - //ex = ex.left(4); QString ex = fi.completeSuffix().toLower(); QString mex = ex.section('.', -1, -1); if((mex == "gz") || (mex == "bz2")) @@ -1245,7 +1206,6 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM } if (!songTemplate) { addProject(project.absoluteFilePath()); - //setWindowTitle(QString("MusE: Song: ") + project.completeBaseName()); setWindowTitle(QString("MusE: Song: ") + MusEGui::projectTitleFromFilename(project.absoluteFilePath())); } MusEGlobal::song->dirty = false; @@ -1258,41 +1218,37 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM autoMixerAction->setChecked(MusEGlobal::automation); - //FINDMICHJETZT does this work? + showBigtime(MusEGlobal::config.bigTimeVisible); + showMixer1(MusEGlobal::config.mixer1Visible); + showMixer2(MusEGlobal::config.mixer2Visible); + + // Added p3.3.43 Make sure the geometry is correct because showMixerX() will NOT + // set the geometry if the mixer has already been created. + if(mixer1) { - showBigtime(MusEGlobal::config.bigTimeVisible); - //showMixer(MusEGlobal::config.mixerVisible); - showMixer1(MusEGlobal::config.mixer1Visible); - showMixer2(MusEGlobal::config.mixer2Visible); - - // Added p3.3.43 Make sure the geometry is correct because showMixerX() will NOT - // set the geometry if the mixer has already been created. - if(mixer1) - { - //if(mixer1->geometry().size() != MusEGlobal::config.mixer1.geometry.size()) // Moved below - // mixer1->resize(MusEGlobal::config.mixer1.geometry.size()); - - if(mixer1->geometry().topLeft() != MusEGlobal::config.mixer1.geometry.topLeft()) - mixer1->move(MusEGlobal::config.mixer1.geometry.topLeft()); - } - if(mixer2) - { - //if(mixer2->geometry().size() != MusEGlobal::config.mixer2.geometry.size()) // Moved below - // mixer2->resize(MusEGlobal::config.mixer2.geometry.size()); - - if(mixer2->geometry().topLeft() != MusEGlobal::config.mixer2.geometry.topLeft()) - mixer2->move(MusEGlobal::config.mixer2.geometry.topLeft()); - } - - //showMarker(MusEGlobal::config.markerVisible); // Moved below. Tim. - resize(MusEGlobal::config.geometryMain.size()); - move(MusEGlobal::config.geometryMain.topLeft()); - - if (MusEGlobal::config.transportVisible) - transport->show(); - transport->move(MusEGlobal::config.geometryTransport.topLeft()); - showTransport(MusEGlobal::config.transportVisible); + //if(mixer1->geometry().size() != MusEGlobal::config.mixer1.geometry.size()) // Moved below + // mixer1->resize(MusEGlobal::config.mixer1.geometry.size()); + + if(mixer1->geometry().topLeft() != MusEGlobal::config.mixer1.geometry.topLeft()) + mixer1->move(MusEGlobal::config.mixer1.geometry.topLeft()); } + if(mixer2) + { + //if(mixer2->geometry().size() != MusEGlobal::config.mixer2.geometry.size()) // Moved below + // mixer2->resize(MusEGlobal::config.mixer2.geometry.size()); + + if(mixer2->geometry().topLeft() != MusEGlobal::config.mixer2.geometry.topLeft()) + mixer2->move(MusEGlobal::config.mixer2.geometry.topLeft()); + } + + //showMarker(MusEGlobal::config.markerVisible); // Moved below. Tim. + resize(MusEGlobal::config.geometryMain.size()); + move(MusEGlobal::config.geometryMain.topLeft()); + + if (MusEGlobal::config.transportVisible) + transport->show(); + transport->move(MusEGlobal::config.geometryTransport.topLeft()); + showTransport(MusEGlobal::config.transportVisible); progress->setValue(40); @@ -1308,37 +1264,20 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM progress->setValue(50); // Try this AFTER the song update above which does a mixer update... Tested OK - mixers resize properly now. - //FINDMICHJETZT does this work? + if(mixer1) { - if(mixer1) - { - if(mixer1->geometry().size() != MusEGlobal::config.mixer1.geometry.size()) - { - //printf("MusE::loadProjectFile1 resizing mixer1 x:%d y:%d w:%d h:%d\n", MusEGlobal::config.mixer1.geometry.x(), - // MusEGlobal::config.mixer1.geometry.y(), - // MusEGlobal::config.mixer1.geometry.width(), - // MusEGlobal::config.mixer1.geometry.height() - // ); - mixer1->resize(MusEGlobal::config.mixer1.geometry.size()); - } - } - if(mixer2) - { - if(mixer2->geometry().size() != MusEGlobal::config.mixer2.geometry.size()) - { - //printf("MusE::loadProjectFile1 resizing mixer2 x:%d y:%d w:%d h:%d\n", MusEGlobal::config.mixer2.geometry.x(), - // MusEGlobal::config.mixer2.geometry.y(), - // MusEGlobal::config.mixer2.geometry.width(), - // MusEGlobal::config.mixer2.geometry.height() - // ); - mixer2->resize(MusEGlobal::config.mixer2.geometry.size()); - } - } - - // Moved here from above due to crash with a song loaded and then File->New. - // Marker view list was not updated, had non-existent items from marker list (cleared in ::clear()). - showMarker(MusEGlobal::config.markerVisible); - } + if(mixer1->geometry().size() != MusEGlobal::config.mixer1.geometry.size()) + mixer1->resize(MusEGlobal::config.mixer1.geometry.size()); + } + if(mixer2) + { + if(mixer2->geometry().size() != MusEGlobal::config.mixer2.geometry.size()) + mixer2->resize(MusEGlobal::config.mixer2.geometry.size()); + } + + // Moved here from above due to crash with a song loaded and then File->New. + // Marker view list was not updated, had non-existent items from marker list (cleared in ::clear()). + showMarker(MusEGlobal::config.markerVisible); if (songTemplate) { @@ -1370,13 +1309,11 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM void MusE::setUntitledProject() { setConfigDefaults(); - //QString name("untitled"); - QString name(MusEGui::getUniqueUntitledName()); // p4.0.40 - - MusEGlobal::museProject = "./"; //QFileInfo(name).absolutePath(); + QString name(MusEGui::getUniqueUntitledName()); + MusEGlobal::museProject = "./"; project.setFile(name); - //setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); setWindowTitle(tr("MusE: Song: %1").arg(MusEGui::projectTitleFromFilename(name))); + writeTopwinState=true; } //--------------------------------------------------------- @@ -1426,15 +1363,10 @@ void MusE::loadTemplate() QString fn = MusEGui::getOpenFileName(QString("templates"), MusEGlobal::med_file_pattern, this, tr("MusE: load template"), 0, MusEGui::MFileDialog::GLOBAL_VIEW); if (!fn.isEmpty()) { - // MusEGlobal::museProject = QFileInfo(fn).absolutePath(); - - //loadProjectFile(fn, true, true); // With templates, don't clear midi ports. - // Any named ports in the template file are useless since they likely - // would not be found on other users' machines. - // So keep whatever the user currently has set up for ports. - // Note that this will also keep the current window configurations etc. - // but actually that's also probably a good thing. p4.0.17 Tim. TESTING: Maybe some problems... + // Any named ports in the template file are useless (Hm, not true...) since they likely would not be found on other users' machines. + // Keep whatever the user currently has set up for ports. This will also keep the current window configurations etc. + // but actually that's also probably a good thing. loadProjectFile(fn, true, false); setUntitledProject(); @@ -1447,29 +1379,20 @@ void MusE::loadTemplate() bool MusE::save() { - //if (project.completeBaseName() == "untitled") // p4.0.40 Must catch "untitled 1" "untitled 2" etc - //if (MusEGui::projectTitleFromFilename(project.absoluteFilePath()) == "untitled") - //if (MusEGui::projectTitleFromFilename(project.absoluteFilePath()) == MusEGui::getUniqueUntitledName()) - ///if (project.absoluteFilePath() == MusEGui::getUniqueUntitledName()) if (MusEGlobal::museProject == MusEGlobal::museProjectInitPath ) return saveAs(); else - return save(project.filePath(), false); + return save(project.filePath(), false, writeTopwinState); } //--------------------------------------------------------- // save //--------------------------------------------------------- -bool MusE::save(const QString& name, bool overwriteWarn) +bool MusE::save(const QString& name, bool overwriteWarn, bool writeTopwins) { QString backupCommand; - // By T356. Cache the jack in/out route names BEFORE saving. - // Because jack often shuts down during save, causing the routes to be lost in the file. - // Not required any more... - //cacheJackRouteNames(); - if (QFile::exists(name)) { backupCommand.sprintf("cp \"%s\" \"%s.backup\"", name.toLatin1().constData(), name.toLatin1().constData()); } @@ -1484,10 +1407,9 @@ bool MusE::save(const QString& name, bool overwriteWarn) if (f == 0) return false; MusECore::Xml xml(f); - write(xml); + write(xml, writeTopwins); if (ferror(f)) { QString s = "Write File\n" + name + "\nfailed: " - //+ strerror(errno); + QString(strerror(errno)); QMessageBox::critical(this, tr("MusE: Write File failed"), s); @@ -1558,7 +1480,6 @@ void MusE::closeEvent(QCloseEvent* event) QSettings settings("MusE", "MusE-qt"); settings.setValue("MusE/geometry", saveGeometry()); - //settings.setValue("MusE/windowState", saveState()); writeGlobalConfiguration(); @@ -1642,7 +1563,6 @@ void MusE::toggleMarker(bool checked) void MusE::showMarker(bool flag) { - //printf("showMarker %d\n",flag); if (markerView == 0) { markerView = new MusEGui::MarkerView(this); @@ -1752,21 +1672,6 @@ void MusE::showTransport(bool flag) viewTransportAction->setChecked(flag); } -/* -//--------------------------------------------------------- -// getRoutingPopupMenu -// Get the special common routing popup menu. Used (so far) -// by audio strip, midi strip, and midi trackinfo. -//--------------------------------------------------------- - -MusEGui::RoutePopupMenu* MusE::() -{ - if(!routingPopupMenu) - routingPopupMenu = new MusEGui::RoutePopupMenu(this); - return routingPopupMenu; -} -*/ - //--------------------------------------------------------- // saveAs //--------------------------------------------------------- @@ -1774,17 +1679,18 @@ MusEGui::RoutePopupMenu* MusE::() bool MusE::saveAs() { QString name; - //if (MusEGlobal::museProject == MusEGlobal::museProjectInitPath ) // Use project dialog always now. if (MusEGlobal::config.useProjectSaveDialog) { MusEGui::ProjectCreateImpl pci(MusEGlobal::muse); + pci.setWriteTopwins(writeTopwinState); if (pci.exec() == QDialog::Rejected) { return false; } MusEGlobal::song->setSongInfo(pci.getSongInfo(), true); name = pci.getProjectPath(); + writeTopwinState=pci.getWriteTopwins(); } else { - name = MusEGui::getSaveFileName(QString(""), MusEGlobal::med_file_save_pattern, this, tr("MusE: Save As")); + name = MusEGui::getSaveFileName(QString(""), MusEGlobal::med_file_save_pattern, this, tr("MusE: Save As"), &writeTopwinState); if (name.isEmpty()) return false; } @@ -1795,19 +1701,14 @@ bool MusE::saveAs() QMessageBox::warning(this,"Path error","Can't create project path", QMessageBox::Ok); return false; } - //} - //else { - // name = MusEGui::getSaveFileName(QString(""), MusEGlobal::med_file_save_pattern, this, tr("MusE: Save As")); - //} bool ok = false; if (!name.isEmpty()) { QString tempOldProj = MusEGlobal::museProject; MusEGlobal::museProject = QFileInfo(name).absolutePath(); - ok = save(name, true); + ok = save(name, true, writeTopwinState); if (ok) { project.setFile(name); - //setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); setWindowTitle(tr("MusE: Song: %1").arg(MusEGui::projectTitleFromFilename(name))); addProject(name); } @@ -1829,7 +1730,6 @@ void MusE::startEditor(MusECore::PartList* pl, int type) case 1: startListEditor(pl); break; case 3: startDrumEditor(pl, true); break; case 4: startWaveEditor(pl); break; - //case 5: startScoreEdit(pl, true); break; } } @@ -2065,9 +1965,8 @@ void MusE::showDidYouKnowDialog() dyk.show(); if( dyk.exec()) { if (dyk.dontShowCheckBox->isChecked()) { - //printf("disables dialog!\n"); MusEGlobal::config.showDidYouKnow=false; - MusEGlobal::muse->changeConfig(true); // save settings + MusEGlobal::muse->changeConfig(true); // save settings } } } @@ -2084,7 +1983,6 @@ void MusE::showDidYouKnowDialog() void MusE::startClipList(bool checked) { if (clipListEdit == 0) { - //clipListEdit = new ClipListEdit(); clipListEdit = new MusEGui::ClipListEdit(this); toplevels.push_back(clipListEdit); connect(clipListEdit, SIGNAL(isDeleting(MusEGui::TopWin*)), SLOT(toplevelDeleting(MusEGui::TopWin*))); @@ -2174,14 +2072,11 @@ void MusE::toplevelDeleting(MusEGui::TopWin* tl) case MusEGui::TopWin::ARRANGER: break; case MusEGui::TopWin::CLIPLIST: - // ORCAN: This needs to be verified. aid2 used to correspond to Cliplist: - //menu_audio->setItemChecked(aid2, false); viewCliplistAction->setChecked(false); if (currentMenuSharingTopwin == clipListEdit) setCurrentMenuSharingTopwin(NULL); updateWindowMenu(); return; - //break; // the following editors can exist in more than // one instantiation: @@ -2219,7 +2114,6 @@ void MusE::kbAccel(int key) } else if (key == MusEGui::shortcuts[MusEGui::SHRT_PLAY_TOGGLE].key) { if (MusEGlobal::audio->isPlaying()) - //MusEGlobal::song->setStopPlay(false); MusEGlobal::song->setStop(true); else if (!MusEGlobal::config.useOldStyleStopShortCut) MusEGlobal::song->setPlay(true); @@ -2231,7 +2125,6 @@ void MusE::kbAccel(int key) } } else if (key == MusEGui::shortcuts[MusEGui::SHRT_STOP].key) { - //MusEGlobal::song->setPlay(false); MusEGlobal::song->setStop(true); } else if (key == MusEGui::shortcuts[MusEGui::SHRT_GOTO_START].key) { @@ -2306,9 +2199,6 @@ void MusE::kbAccel(int key) else if (key == MusEGui::shortcuts[MusEGui::SHRT_OPEN_BIGTIME].key) { toggleBigTime(!viewBigtimeAction->isChecked()); } - //else if (key == MusEGui::shortcuts[MusEGui::SHRT_OPEN_MIXER].key) { - // toggleMixer(); - // } else if (key == MusEGui::shortcuts[MusEGui::SHRT_OPEN_MIXER].key) { toggleMixer1(!viewMixerAAction->isChecked()); } @@ -2329,12 +2219,14 @@ void MusE::kbAccel(int key) } } +#if 0 //--------------------------------------------------------- // catchSignal // only for debugging //--------------------------------------------------------- -#if 0 +// if enabling this code, also enable the line containing +// "catchSignal" in main.cpp static void catchSignal(int sig) { if (MusEGlobal::debugMsg) @@ -2404,7 +2296,15 @@ void MusE::configAppearance() void MusE::loadTheme(const QString& s) { - if (style()->objectName() != s) + QStringList sl = QStyleFactory::keys(); + if (sl.indexOf(s) == -1) { + if(MusEGlobal::debugMsg) + printf("Set style does not exist, setting default."); + QApplication::setStyle(Appearance::defaultStyle); + style()->setObjectName(Appearance::defaultStyle); + + } + else if (style()->objectName() != s) { QApplication::setStyle(s); style()->setObjectName(s); // p4.0.45 @@ -2446,7 +2346,6 @@ void MusE::changeConfig(bool writeFlag) if (writeFlag) writeGlobalConfiguration(); - //loadStyleSheetFile(MusEGlobal::config.styleSheetFile); loadTheme(MusEGlobal::config.style); QApplication::setFont(MusEGlobal::config.fonts[0]); if(!MusEGlobal::config.styleSheetFile.isEmpty()) @@ -2488,19 +2387,6 @@ void MusE::configShortCuts() } -#if 0 -//--------------------------------------------------------- -// openAudioFileManagement -//--------------------------------------------------------- -void MusE::openAudioFileManagement() - { - if (!audioFileManager) { - audioFileManager = new AudioFileManager(this, "audiofilemanager", false); - audioFileManager->show(); - } - audioFileManager->setVisible(true); - } -#endif //--------------------------------------------------------- // bounceToTrack //--------------------------------------------------------- @@ -2673,9 +2559,8 @@ void MusE::bounceToFile(MusECore::AudioOutput* ao) MusEGlobal::song->setPos(0,MusEGlobal::song->lPos(),0,true,true); MusEGlobal::song->bounceOutput = ao; ao->setRecFile(sf); - //willfoobar-2011-02-13 - //old code//printf("ao->setRecFile %d\n", sf); - printf("ao->setRecFile %ld\n", (unsigned long)sf); + if(MusEGlobal::debugMsg) + printf("ao->setRecFile %p\n", sf); MusEGlobal::song->setRecord(true, false); MusEGlobal::song->setRecordFlag(ao, true); ao->prepareRecording(); @@ -2724,10 +2609,9 @@ MusE::lash_idle_cb () { /* save file */ QString ss = QString(lash_event_get_string(event)) + QString("/lash-project-muse.med"); - int ok = save (ss.toAscii(), false); + int ok = save (ss.toAscii(), false, true); if (ok) { project.setFile(ss.toAscii()); - //setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); setWindowTitle(tr("MusE: Song: %1").arg(MusEGui::projectTitleFromFilename(project.absoluteFilePath()))); addProject(ss.toAscii()); MusEGlobal::museProject = QFileInfo(ss.toAscii()).absolutePath(); @@ -2867,8 +2751,6 @@ void MusE::switchMixerAutomation() MusEGlobal::automation = ! MusEGlobal::automation; // Clear all pressed and touched and rec event lists. MusEGlobal::song->clearRecAutomation(true); - -// printf("automation = %d\n", automation); autoMixerAction->setChecked(MusEGlobal::automation); } @@ -2972,12 +2854,7 @@ void MusE::updateConfiguration() helpManualAction->setShortcut(MusEGui::shortcuts[MusEGui::SHRT_OPEN_HELP].key); fullscreenAction->setShortcut(MusEGui::shortcuts[MusEGui::SHRT_FULLSCREEN].key); - // Orcan: Old stuff, needs to be converted. These aren't used anywhere so I commented them out - //menuSettings->setAccel(MusEGui::shortcuts[MusEGui::SHRT_CONFIG_AUDIO_PORTS].key, menu_ids[CMD_CONFIG_AUDIO_PORTS]); - //menu_help->setAccel(menu_ids[CMD_START_WHATSTHIS], MusEGui::shortcuts[MusEGui::SHRT_START_WHATSTHIS].key); - //arrangerView->updateMusEGui::Shortcuts(); //commented out by flo: is done via signal - } //--------------------------------------------------------- @@ -3096,28 +2973,11 @@ QWidget* MusE::mixer2Window() { return mixer2; } QWidget* MusE::transportWindow() { return transport; } QWidget* MusE::bigtimeWindow() { return bigtime; } -//--------------------------------------------------------- -// focusInEvent -//--------------------------------------------------------- - -void MusE::focusInEvent(QFocusEvent* ev) - { - //if (mixer1) // Removed p4.0.45 - // mixer1->raise(); - //if (mixer2) - // mixer2->raise(); - //raise(); - QMainWindow::focusInEvent(ev); - } - - - //--------------------------------------------------------- // execDeliveredScript //--------------------------------------------------------- void MusE::execDeliveredScript(int id) { - //QString scriptfile = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id]; MusEGlobal::song->executeScript(MusEGlobal::song->getScriptPath(id, true).toLatin1().constData(), MusEGlobal::song->getSelectedMidiParts(), 0, false); // TODO: get quant from arranger } @@ -3138,8 +2998,69 @@ void MusE::findUnusedWaveFiles() unused.exec(); } -void MusE::focusChanged(QWidget*, QWidget* now) +void MusE::focusChanged(QWidget* old, QWidget* now) { + if(MusEGlobal::heavyDebugMsg) + { + printf("\n"); + printf("focusChanged: old:%p now:%p activeWindow:%p\n", old, now, qApp->activeWindow()); + if(old) + printf(" old type: %s\n", typeid(*old).name()); + if(now) + printf(" now type: %s\n", typeid(*now).name()); + if(qApp->activeWindow()) + printf(" activeWindow type: %s\n", typeid(*qApp->activeWindow()).name()); + printf("\n"); + } + + // NOTE: FYI: This is what is required if, for 'Smart Focus', we try simply calling clearFocus from each relevant control + // upon Return/Enter/Escape or whatever. + // It's nice to be able to do that, but this was crash-prone and I don't like it. Instead each relevant control connects + // signals to slots in the editors which set focus on the canvases AND activate their top windows. + // Who knows, this code might be needed in some way. Informational, please keep. Tim. + // + /* + // Allow focus proxy to do its job (if set). + if(now == this) + { + if(mdiArea) + { + QMdiSubWindow* mw = mdiArea->activeSubWindow(); + if(mw && mw->widget()->focusProxy()) // Did we set a focus proxy on the window? + //mw->widget()->setFocus(); // Give focus to the window so proxy gets it. + mw->widget()->focusProxy()->setFocus(); // Give focus directly to the proxy. + } + } + else + if(!now) + { + QWidget* aw = qApp->activeWindow(); + if(aw) + { + if(aw == this) // Active top-level window is MusE? + { + if(mdiArea) + { + QMdiSubWindow* mw = mdiArea->activeSubWindow(); + if(mw && mw->widget()->focusProxy()) // Did we set a focus proxy on the window? + //mw->widget()->setFocus(); // Give focus to the window so proxy gets it. + mw->widget()->focusProxy()->setFocus(); // Give focus directly to the proxy. + } + } + else // Active top-level window is outside the MusE mdi window. + { + if(aw->focusProxy()) // Did we set a focus proxy on the window? + { + //aw->setFocus(); // Give focus to the window so proxy gets it. + aw->focusProxy()->setFocus(); // Give focus directly to the proxy. + if(!aw->focusProxy()->isActiveWindow()) + aw->focusProxy()->activateWindow(); + } + } + } + } + */ + QWidget* ptr=now; if (activeTopWin) @@ -3162,7 +3083,7 @@ void MusE::focusChanged(QWidget*, QWidget* now) printf("focusChanged: at widget %p with type %s\n",ptr, typeid(*ptr).name()); if ( (dynamic_cast(ptr)!=0) || // *ptr is a TopWin or a derived class - (ptr==this) ) // the main window is selected + (ptr==this) ) // the main window is selected break; ptr=dynamic_cast(ptr->parent()); //in the unlikely case that ptr is a QObject, this returns NULL, which stops the loop } diff --git a/muse2/muse/app.h b/muse2/muse/app.h index 7b2c1431..2976708b 100644 --- a/muse2/muse/app.h +++ b/muse2/muse/app.h @@ -31,7 +31,6 @@ #include class QCloseEvent; -class QFocusEvent; class QMainWindow; class QMenu; class QPoint; @@ -211,14 +210,16 @@ class MusE : public QMainWindow MidiTransformerDialog* midiTransformerDialog; QMenu* openRecent; + bool writeTopwinState; + bool readMidi(FILE*); void read(MusECore::Xml& xml, bool doReadMidiPorts, bool isTemplate); void processTrack(MusECore::MidiTrack* track); - void write(MusECore::Xml& xml) const; + void write(MusECore::Xml& xml, bool writeTopwins) const; // If clear_all is false, it will not touch things like midi ports. bool clearSong(bool clear_all = true); - bool save(const QString&, bool); + bool save(const QString&, bool overwriteWarn, bool writeTopwins); void setUntitledProject(); void setConfigDefaults(); @@ -236,8 +237,6 @@ class MusE : public QMainWindow void writeConfiguration(int level, MusECore::Xml&) const; void updateConfiguration(); - virtual void focusInEvent(QFocusEvent*); - QSignalMapper *midiPluginSignalMapper; QSignalMapper *followSignalMapper; QSignalMapper *windowsMapper; @@ -279,18 +278,12 @@ class MusE : public QMainWindow void startSongInfo(bool editable=true); void writeGlobalConfiguration() const; - //void startEditInstrument(); void startClipList(bool); void openRecentMenu(); void selectProject(QAction* act); void cmd(int); -/* void copyMeasure(); // commented out by flo: these are not implemented, - void eraseMeasure(); // but maybe will be in future (state: revision 988) - void deleteMeasure(); - void createMeasure(); - void mixTrack(); -*/ + void startMidiInputPlugin(int); void hideMitPluginTranspose(); void hideMidiInputTransform(); @@ -325,8 +318,6 @@ class MusE : public QMainWindow void arrangeSubWindowsColumns(); void tileSubWindows(); - //void hackishSongOpenTimerTimeout(); - public slots: bool saveAs(); void bounceToFile(MusECore::AudioOutput* ao = 0); @@ -351,7 +342,7 @@ class MusE : public QMainWindow void startEditor(MusECore::PartList*, int); void startScoreQuickly(); void startPianoroll(); - void startPianoroll(MusECore::PartList* /*pl*/, bool /*showDefaultCtrls*/ = false); + void startPianoroll(MusECore::PartList* pl, bool showDefaultCtrls = false); void startWaveEditor(); void startWaveEditor(MusECore::PartList*); void openInScoreEdit(ScoreEdit* destination, MusECore::PartList* pl, bool allInOne=false); @@ -363,7 +354,7 @@ class MusE : public QMainWindow void startListEditor(); void startListEditor(MusECore::PartList*); void startDrumEditor(); - void startDrumEditor(MusECore::PartList* /*pl*/, bool /*showDefaultCtrls*/ = false); + void startDrumEditor(MusECore::PartList* pl, bool showDefaultCtrls = false); void startEditor(MusECore::Track*); void startMidiTransformer(); diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp index e60db239..319a8826 100644 --- a/muse2/muse/appearance.cpp +++ b/muse2/muse/appearance.cpp @@ -49,6 +49,7 @@ namespace MusEGui { +QString Appearance::defaultStyle=""; int BG_ITEM_HEIGHT = 30; class BgPreviewWidget : public QWidget { @@ -145,25 +146,9 @@ Appearance::Appearance(Arranger* a, QWidget* parent) global_bg->setFlags(Qt::ItemIsEnabled); user_bg = new QTreeWidgetItem(backgroundTree, QStringList(tr("Custom")), 0); user_bg->setFlags(Qt::ItemIsEnabled); - /* - partShownames->setChecked(config->canvasShowPartType & 1); - partShowevents->setChecked(config->canvasShowPartType & 2); - partShowCakes->setChecked(!(config->canvasShowPartType & 2)); - - eventNoteon->setChecked(config->canvasShowPartEvent & (1 << 0)); - eventPolypressure->setChecked(config->canvasShowPartEvent & (1 << 1)); - eventController->setChecked(config->canvasShowPartEvent & (1 << 2)); - eventProgramchange->setChecked(config->canvasShowPartEvent & (1 << 3)); - eventAftertouch->setChecked(config->canvasShowPartEvent & (1 << 4)); - eventPitchbend->setChecked(config->canvasShowPartEvent & (1 << 5)); - eventSpecial->setChecked(config->canvasShowPartEvent & (1 << 6)); - eventButtonGroup->setEnabled(config->canvasShowPartType == 2); - arrGrid->setChecked(config->canvasShowGrid); - */ colorframe->setAutoFillBackground(true); aPalette = new QButtonGroup(aPaletteBox); - // There must be an easier way to do this by a for loop. No? : aPalette->addButton(palette0, 0); aPalette->addButton(palette1, 1); aPalette->addButton(palette2, 2); @@ -188,26 +173,7 @@ Appearance::Appearance(Arranger* a, QWidget* parent) itemList->clear(); aid = new IdListViewItem(0, itemList, "Arranger"); id = new IdListViewItem(0, aid, "PartColors"); - // Names moved into global config by Tim. - /* - new IdListViewItem(0x400, id, "Default"); - new IdListViewItem(0x401, id, "Refrain"); - new IdListViewItem(0x402, id, "Bridge"); - new IdListViewItem(0x403, id, "Intro"); - new IdListViewItem(0x404, id, "Coda"); - new IdListViewItem(0x405, id, "Chorus"); - new IdListViewItem(0x406, id, "Solo"); - new IdListViewItem(0x407, id, "Brass"); - new IdListViewItem(0x408, id, "Percussion"); - new IdListViewItem(0x409, id, "Drums"); - new IdListViewItem(0x40a, id, "Guitar"); - new IdListViewItem(0x40b, id, "Bass"); - new IdListViewItem(0x40c, id, "Flute"); - new IdListViewItem(0x40d, id, "Strings"); - new IdListViewItem(0x40e, id, "Keyboard"); - new IdListViewItem(0x40f, id, "Piano"); - new IdListViewItem(0x410, id, "Saxophon"); - */ + for(int i = 0; i < NUM_PARTCOLORS; ++i) new IdListViewItem(0x400 + i, id, MusEGlobal::config.partColorNames[i]); @@ -274,20 +240,6 @@ Appearance::Appearance(Arranger* a, QWidget* parent) //--------------------------------------------------- // STYLE //--------------------------------------------------- - - /* - themeComboBox->clear(); - QString cs = MusEGlobal::muse->style().name(); - cs = cs.lower(); - - themeComboBox->insertStringList(QStyleFactory::keys()); - for (int i = 0; i < themeComboBox->count(); ++i) { - if (themeComboBox->text(i).lower() == cs) { - themeComboBox->setCurrentItem(i); - } - } - */ - openStyleSheet->setIcon(*openIcon); connect(openStyleSheet, SIGNAL(clicked()), SLOT(browseStyleSheet())); defaultStyleSheet->setIcon(*undoIcon); @@ -334,111 +286,6 @@ void Appearance::resetValues() QPalette pal; - /* - pal.setColor(palette0->backgroundRole(), config->palette[0]); - palette0->setPalette(pal); - pal.setColor(palette1->backgroundRole(), config->palette[1]); - palette1->setPalette(pal); - pal.setColor(palette2->backgroundRole(), config->palette[2]); - palette2->setPalette(pal); - pal.setColor(palette3->backgroundRole(), config->palette[3]); - palette3->setPalette(pal); - pal.setColor(palette4->backgroundRole(), config->palette[4]); - palette4->setPalette(pal); - pal.setColor(palette5->backgroundRole(), config->palette[5]); - palette5->setPalette(pal); - pal.setColor(palette6->backgroundRole(), config->palette[6]); - palette6->setPalette(pal); - pal.setColor(palette7->backgroundRole(), config->palette[7]); - palette7->setPalette(pal); - pal.setColor(palette8->backgroundRole(), config->palette[8]); - palette8->setPalette(pal); - pal.setColor(palette9->backgroundRole(), config->palette[9]); - palette9->setPalette(pal); - pal.setColor(palette10->backgroundRole(), config->palette[10]); - palette10->setPalette(pal); - pal.setColor(palette11->backgroundRole(), config->palette[11]); - palette11->setPalette(pal); - pal.setColor(palette12->backgroundRole(), config->palette[12]); - palette12->setPalette(pal); - pal.setColor(palette13->backgroundRole(), config->palette[13]); - palette13->setPalette(pal); - pal.setColor(palette14->backgroundRole(), config->palette[14]); - palette14->setPalette(pal); - pal.setColor(palette15->backgroundRole(), config->palette[15]); - palette15->setPalette(pal); - */ - - /* - pal.setColor(QPalette::Window, config->palette[0]); - palette0->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[1]); - palette1->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[2]); - palette2->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[3]); - palette3->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[4]); - palette4->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[5]); - palette5->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[6]); - palette6->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[7]); - palette7->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[8]); - palette8->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[9]); - palette9->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[10]); - palette10->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[11]); - palette11->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[12]); - palette12->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[13]); - palette13->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[14]); - palette14->setPalette(pal); - pal.setColor(QPalette::Window, config->palette[15]); - palette15->setPalette(pal); - */ - - /* - pal.setColor(QPalette::Button, config->palette[0]); - palette0->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[1]); - palette1->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[2]); - palette2->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[3]); - palette3->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[4]); - palette4->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[5]); - palette5->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[6]); - palette6->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[7]); - palette7->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[8]); - palette8->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[9]); - palette9->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[10]); - palette10->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[11]); - palette11->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[12]); - palette12->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[13]); - palette13->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[14]); - palette14->setPalette(pal); - pal.setColor(QPalette::Button, config->palette[15]); - palette15->setPalette(pal); - */ - palette0->setStyleSheet(QString("background-color: ") + config->palette[0].name()); palette1->setStyleSheet(QString("background-color: ") + config->palette[1].name()); palette2->setStyleSheet(QString("background-color: ") + config->palette[2].name()); @@ -506,23 +353,25 @@ void Appearance::resetValues() eventAftertouch->setChecked(config->canvasShowPartEvent & (1 << 4)); eventPitchbend->setChecked(config->canvasShowPartEvent & (1 << 5)); eventSpecial->setChecked(config->canvasShowPartEvent & (1 << 6)); - //eventButtonGroup->setEnabled(config->canvasShowPartType == 2); eventButtonGroup->setEnabled(config->canvasShowPartType & 2); arrGrid->setChecked(config->canvasShowGrid); themeComboBox->clear(); QString cs = MusEGlobal::muse->style()->objectName(); - //printf("Appearance::resetValues style:%s\n", cs.toAscii().data()); - //printf("Appearance::resetValues App styleSheet:%s\n", qApp->styleSheet().toAscii().data()); cs = cs.toLower(); - themeComboBox->insertItems(0, QStyleFactory::keys()); - for (int i = 0; i < themeComboBox->count(); ++i) { - if (themeComboBox->itemText(i).toLower() == cs) { - themeComboBox->setCurrentIndex(i); - } - } + themeComboBox->insertItem(0,tr("Keep Qt system style")); + themeComboBox->insertItems(1, QStyleFactory::keys()); + if (QStyleFactory::keys().indexOf(config->style) == -1) + themeComboBox->setCurrentIndex(0); // if none is found use the default + else { + for (int i = 0; i < themeComboBox->count(); ++i) { + if (themeComboBox->itemText(i).toLower() == cs) { + themeComboBox->setCurrentIndex(i); + } + } + } globalAlphaSlider->blockSignals(true); globalAlphaVal->blockSignals(true); globalAlphaSlider->setValue(config->globalAlphaBlend); @@ -887,14 +736,12 @@ void Appearance::colorItemSelectionChanged() void Appearance::updateColor() { int r, g, b, h, s, v; - //globalAlphaSlider->setEnabled(color); rslider->setEnabled(color); gslider->setEnabled(color); bslider->setEnabled(color); hslider->setEnabled(color); sslider->setEnabled(color); vslider->setEnabled(color); - //globalAlphaVal->setEnabled(color); rval->setEnabled(color); gval->setEnabled(color); bval->setEnabled(color); @@ -906,15 +753,10 @@ void Appearance::updateColor() QPalette pal; QColor cfc(*color); - // Oops can't do this - affects all colour items. Need to filter. - ///cfc.setAlpha(globalAlphaVal->value()); - pal.setColor(colorframe->backgroundRole(), cfc); colorframe->setPalette(pal); color->getRgb(&r, &g, &b); color->getHsv(&h, &s, &v); - //a = color->alpha(); - //a = config->globalAlphaBlend; rslider->blockSignals(true); gslider->blockSignals(true); @@ -1056,7 +898,6 @@ void Appearance::addToPaletteClicked() if (r == 0xff && g == 0xff && b == 0xff) { // found empty slot aPalette->button(i)->toggle(); - //aPalette->moveFocus(i); ddskrjo button = (QAbstractButton*)aPalette->button(i); // ddskrjo break; } @@ -1065,11 +906,6 @@ void Appearance::addToPaletteClicked() if (button) { int id = aPalette->id(button); config->palette[id] = *color; - //QPalette pal; - //pal.setColor(button->backgroundRole(), *color); - //pal.setColor(QPalette::Window, *color); - //pal.setColor(QPalette::Button, *color); - //button->setPalette(pal); button->setStyleSheet(QString("background-color: ") + color->name()); button->update(); //?? } @@ -1085,8 +921,7 @@ void Appearance::paletteClicked(int id) return; QAbstractButton* button = (QAbstractButton*)aPalette->button(id); // ddskrjo if (button) { - QColor c = button->palette().color(QPalette::Window); - //QColor c = button->palette().color(button->backgroundRole()); + QColor c = button->palette().color(QPalette::Window); int r, g, b; c.getRgb(&r, &g, &b); if (r == 0xff && g == 0xff && b == 0xff) diff --git a/muse2/muse/appearance.h b/muse2/muse/appearance.h index ecefeae0..8b746cfd 100644 --- a/muse2/muse/appearance.h +++ b/muse2/muse/appearance.h @@ -93,6 +93,7 @@ class Appearance : public QDialog, public Ui::AppearanceDialogBase { Appearance(Arranger*, QWidget* parent=0); ~Appearance(); void resetValues(); + static QString defaultStyle; }; } // namespace MusEGui diff --git a/muse2/muse/arranger/alayout.cpp b/muse2/muse/arranger/alayout.cpp index 84923f12..509c84ac 100644 --- a/muse2/muse/arranger/alayout.cpp +++ b/muse2/muse/arranger/alayout.cpp @@ -41,12 +41,12 @@ void TLLayout::wadd(int idx, QWidget* w) addItem(li[idx]); } -#if 0 +#if 0 // DELETETHIS 36 //--------------------------------------------------------- // TLLayoutIterator //--------------------------------------------------------- -class TLLayoutIterator // : public QGLayoutIterator ddskrjo +class TLLayoutIterator { int idx; QList list; @@ -64,7 +64,7 @@ class TLLayoutIterator // : public QGLayoutIterator ddskrjo QLayoutIterator TLLayout::iterator() { - return QLayoutIterator(0); //new TLLayoutIterator(&ilist)); ddskrjo + return QLayoutIterator(0); } void TLLayout::addItem(QLayoutItem *item) @@ -99,10 +99,6 @@ TLLayout::~TLLayout() void TLLayout::setGeometry(const QRect &rect) { - //if(_inSetGeometry) // p4.0.11 Tim - // return; - //_inSetGeometry = true; - int w = rect.width(); int h = rect.height(); @@ -117,7 +113,7 @@ void TLLayout::setGeometry(const QRect &rect) QSize s1 = li[1]->sizeHint(); QSize s2 = li[2]->sizeHint(); - //QSize s3 = li[3]->sizeHint(); + //QSize s3 = li[3]->sizeHint(); DELETETHIS huh? QSize s4 = li[4]->sizeHint(); QSize s5 = li[5]->sizeHint(); @@ -136,15 +132,11 @@ void TLLayout::setGeometry(const QRect &rect) int range = s0.height() - y2; if (range < 0) range = 0; - // Note this appears to cause a single recursive call to this function - jumps to beginning, - // because now the scroll bar wants to be put in the layout. - // Moved below. p4.0.44 - ///sb->setVisible(range != 0); + if (range) sb->setMaximum(range); if (widget) { - //QSize r(s0.width(), y2); QSize r(s0.width(), y2 < s0.height() ? s0.height() : y2); // p4.0.11 Tim widget->setGeometry(0, 0, r.width(), r.height()); } @@ -155,10 +147,8 @@ void TLLayout::setGeometry(const QRect &rect) li[4]->setGeometry(QRect(0, y2, w, s4.height())); li[5]->setGeometry(QRect(3, y3, s5.width(), s5.height())); - /// Fix for non-appearing scrollbar. Yes, we must allow the recursive call, but try it here, not above. p4.0.44 Tim + // Fix for non-appearing scrollbar. Yes, we must allow the recursive call, but try it here, not above. p4.0.44 Tim sb->setVisible(range != 0); - - //_inSetGeometry = false; } //--------------------------------------------------------- @@ -168,8 +158,6 @@ void TLLayout::setGeometry(const QRect &rect) QSize TLLayout::sizeHint() const { return QSize(150, 100); - // p4.0.11 Tim. 100 was allowing vertically shrunk trackinfo widgets. Nope, no help. - //return minimumSize(); } //--------------------------------------------------------- @@ -182,8 +170,6 @@ QSize TLLayout::minimumSize() const w += li[1]->sizeHint().width(); return QSize(w, 50); - // p4.0.11 Tim. 50 was allowing vertically shrunk trackinfo widgets. Nope, no help. - //return QSize(w, stack->minimumSizeHint().height()); } //--------------------------------------------------------- diff --git a/muse2/muse/arranger/alayout.h b/muse2/muse/arranger/alayout.h index 2ffef621..8af26288 100644 --- a/muse2/muse/arranger/alayout.h +++ b/muse2/muse/arranger/alayout.h @@ -49,7 +49,6 @@ class TLLayout : public QLayout WidgetStack* stack; public: - //TLLayout(QWidget *parent) : QLayout(parent, 0, -1) {} TLLayout(QWidget *parent) : QLayout(parent) { _inSetGeometry = false; setContentsMargins(0, 0, 0, 0); setSpacing(-1); } ~TLLayout() { clear(); } @@ -63,16 +62,10 @@ class TLLayout : public QLayout virtual QSize sizeHint() const; virtual QSize minimumSize() const; virtual QSize maximumSize() const; - //QSize sizeHint() const; - //QSize minimumSize() const; - //QSize maximumSize() const; - ///QLayoutIterator iterator(); virtual void setGeometry(const QRect &rect); - //virtual QLayoutItem* itemAt(int) const { return 0;} // ddskrjo, is pure virtual, overridden virtual QLayoutItem* itemAt(int i) const { return ilist.value(i);} - virtual QLayoutItem* takeAt(int); // { return 0;} // ddskrjo, is pure virtual, overridden - ///virtual int count() const { return ilist.count(); } // ddskrjo, is pure virtual, overridden + virtual QLayoutItem* takeAt(int); }; } // namespace MusEGui diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 41cbf06f..9048bb3c 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -37,9 +37,8 @@ #include #include #include -//#include -#include "arrangerview.h" +#include "arrangerview.h" #include "arranger.h" #include "song.h" #include "app.h" @@ -152,6 +151,13 @@ Arranger::custom_col_t Arranger::readOneCustomColumn(MusECore::Xml& xml) +void ScrollBar::redirectedWheelEvent(QWheelEvent* e) +{ + if(isVisible()) + wheelEvent(e); +} + + //--------------------------------------------------------- // Arranger::setHeaderToolTips //--------------------------------------------------------- @@ -200,18 +206,13 @@ Arranger::Arranger(ArrangerView* parent, const char* name) setObjectName(name); _raster = 0; // measure selected = 0; - // Since program covers 3 controls at once, it is in 'midi controller' units rather than 'gui control' units. - //program = -1; - ///program = CTRL_VAL_UNKNOWN; - ///pan = -65; - ///volume = -1; showTrackinfoFlag = true; cursVal = MAXINT; parentWin=parent; - //setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); //--------------------------------------------------- // ToolBar @@ -246,7 +247,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name) MusEGlobal::song->setArrangerRaster(0); toolbar->addWidget(raster); connect(raster, SIGNAL(activated(int)), SLOT(_setRaster(int))); - ///raster->setFocusPolicy(Qt::NoFocus); raster->setFocusPolicy(Qt::TabFocus); // Song len @@ -257,8 +257,8 @@ Arranger::Arranger(ArrangerView* parent, const char* name) // song length is limited to 10000 bars; the real song len is limited // by overflows in tick computations - // lenEntry = new SpinBox(1, 10000, 1); + lenEntry->setFocusPolicy(Qt::StrongFocus); lenEntry->setValue(MusEGlobal::song->len()); lenEntry->setToolTip(tr("song length - bars")); lenEntry->setWhatsThis(tr("song length - bars")); @@ -273,7 +273,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name) typeBox->setCurrentIndex(0); typeBox->setToolTip(tr("midi song type")); typeBox->setWhatsThis(tr("midi song type")); - ///typeBox->setFocusPolicy(Qt::NoFocus); typeBox->setFocusPolicy(Qt::TabFocus); toolbar->addWidget(typeBox); connect(typeBox, SIGNAL(activated(int)), SLOT(modeChange(int))); @@ -284,6 +283,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) toolbar->addWidget(label); globalPitchSpinBox = new SpinBox(-127, 127, 1); + globalPitchSpinBox->setFocusPolicy(Qt::StrongFocus); globalPitchSpinBox->setValue(MusEGlobal::song->globalPitchShift()); globalPitchSpinBox->setToolTip(tr("midi pitch")); globalPitchSpinBox->setWhatsThis(tr("global midi pitch shift")); @@ -296,6 +296,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) toolbar->addWidget(label); globalTempoSpinBox = new SpinBox(50, 200, 1, toolbar); + globalTempoSpinBox->setFocusPolicy(Qt::StrongFocus); globalTempoSpinBox->setSuffix(QString("%")); globalTempoSpinBox->setValue(MusEGlobal::tempomap.globalTempo()); globalTempoSpinBox->setToolTip(tr("midi tempo")); @@ -305,16 +306,19 @@ Arranger::Arranger(ArrangerView* parent, const char* name) QToolButton* tempo50 = new QToolButton(); tempo50->setText(QString("50%")); + tempo50->setFocusPolicy(Qt::NoFocus); toolbar->addWidget(tempo50); connect(tempo50, SIGNAL(clicked()), SLOT(setTempo50())); QToolButton* tempo100 = new QToolButton(); tempo100->setText(tr("N")); + tempo100->setFocusPolicy(Qt::NoFocus); toolbar->addWidget(tempo100); connect(tempo100, SIGNAL(clicked()), SLOT(setTempo100())); QToolButton* tempo200 = new QToolButton(); tempo200->setText(QString("200%")); + tempo200->setFocusPolicy(Qt::NoFocus); toolbar->addWidget(tempo200); connect(tempo200, SIGNAL(clicked()), SLOT(setTempo200())); @@ -322,9 +326,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name) box->setContentsMargins(0, 0, 0, 0); box->setSpacing(0); box->addWidget(MusECore::hLine(this), Qt::AlignTop); - //QFrame* hline = MusECore::hLine(this); - //hline->setLineWidth(0); - //box->addWidget(hline, Qt::AlignTop); //--------------------------------------------------- // Tracklist @@ -336,12 +337,10 @@ Arranger::Arranger(ArrangerView* parent, const char* name) split = new Splitter(Qt::Horizontal, this, "split"); split->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); box->addWidget(split, 1000); - //split->setHandleWidth(10); tracklist = new QWidget(split); split->setStretchFactor(split->indexOf(tracklist), 0); - //tracklist->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, 0, 100)); QSizePolicy tpolicy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); tpolicy.setHorizontalStretch(0); tpolicy.setVerticalStretch(100); @@ -349,11 +348,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name) QWidget* editor = new QWidget(split); split->setStretchFactor(split->indexOf(editor), 1); - //editor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, - // Changed by T356. Was causing "large int implicitly truncated" warning. These are UCHAR values... - //1000, 100)); - //232, 100)); // 232 is what it was being truncated to, but what is the right value?... - //255, 100)); QSizePolicy epolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); epolicy.setHorizontalStretch(255); epolicy.setVerticalStretch(100); @@ -363,7 +357,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) // Track Info //--------------------------------------------------- - infoScroll = new QScrollBar(Qt::Vertical, tracklist); + infoScroll = new ScrollBar(Qt::Vertical, tracklist); infoScroll->setObjectName("infoScrollBar"); //genTrackInfo(tracklist); // Moved below @@ -380,16 +374,14 @@ Arranger::Arranger(ArrangerView* parent, const char* name) tgrid=NULL; updateTListHeader(); list = new TList(header, tracklist, "tracklist"); - + // Do this now that the list is available. genTrackInfo(tracklist); - ///connect(list, SIGNAL(selectionChanged()), SLOT(trackSelectionChanged())); connect(list, SIGNAL(selectionChanged(MusECore::Track*)), SLOT(trackSelectionChanged())); connect(list, SIGNAL(selectionChanged(MusECore::Track*)), midiTrackInfo, SLOT(setTrack(MusECore::Track*))); connect(header, SIGNAL(sectionResized(int,int,int)), list, SLOT(redraw())); connect(header, SIGNAL(sectionMoved(int,int,int)), list, SLOT(redraw())); - connect(header, SIGNAL(sectionMoved(int,int,int)), this, SLOT(headerMoved())); // tracklist: // @@ -422,15 +414,11 @@ Arranger::Arranger(ArrangerView* parent, const char* name) hscroll->setFocusPolicy(Qt::NoFocus); ib->setFixedHeight(hscroll->sizeHint().height()); - // Changed p3.3.43 Too small steps for me... - //vscroll = new QScrollBar(1, 20*20, 1, 5, 0, Vertical, editor); - //vscroll = new QScrollBar(1, 20*20, 5, 25, 0, Qt::Vertical, editor); vscroll = new QScrollBar(editor); - ///vscroll->setMinimum(1); - vscroll->setMinimum(0); // Tim. + vscroll->setMinimum(0); vscroll->setMaximum(20*20); vscroll->setSingleStep(5); - vscroll->setPageStep(25); + vscroll->setPageStep(25); // FIXME: too small steps here for me (flo), better control via window height? vscroll->setValue(0); vscroll->setOrientation(Qt::Vertical); @@ -453,7 +441,8 @@ Arranger::Arranger(ArrangerView* parent, const char* name) canvas->setCanvasTools(arrangerTools); canvas->setOrigin(-offset, 0); canvas->setFocus(); - setFocusProxy(canvas); // once removed by Tim (r735), added by flo again + + list->setFocusProxy(canvas); // Make it easy for track list popup line editor to give focus back to canvas. connect(canvas, SIGNAL(setUsedTool(int)), this, SIGNAL(setUsedTool(int))); connect(canvas, SIGNAL(trackChanged(MusECore::Track*)), list, SLOT(selectTrack(MusECore::Track*))); @@ -462,12 +451,22 @@ Arranger::Arranger(ArrangerView* parent, const char* name) connect(canvas, SIGNAL(selectTrackBelow()), list, SLOT(selectTrackBelow())); connect(canvas, SIGNAL(horizontalZoomIn()), SLOT(horizontalZoomIn())); connect(canvas, SIGNAL(horizontalZoomOut()), SLOT(horizontalZoomOut())); - - connect(this, SIGNAL(redirectWheelEvent(QWheelEvent*)), canvas, SLOT(redirectedWheelEvent(QWheelEvent*))); - connect(list, SIGNAL(redirectWheelEvent(QWheelEvent*)), canvas, SLOT(redirectedWheelEvent(QWheelEvent*))); + if(MusEGlobal::config.smartFocus) + { + connect(lenEntry, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(lenEntry, SIGNAL(escapePressed()), SLOT(focusCanvas())); + connect(globalPitchSpinBox, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(globalPitchSpinBox, SIGNAL(escapePressed()), SLOT(focusCanvas())); + connect(globalTempoSpinBox, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(globalTempoSpinBox, SIGNAL(escapePressed()), SLOT(focusCanvas())); + connect(midiTrackInfo, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(midiTrackInfo, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } + + //connect(this, SIGNAL(redirectWheelEvent(QWheelEvent*)), canvas, SLOT(redirectedWheelEvent(QWheelEvent*))); + connect(list, SIGNAL(redirectWheelEvent(QWheelEvent*)), canvas, SLOT(redirectedWheelEvent(QWheelEvent*))); + connect(trackInfo, SIGNAL(redirectWheelEvent(QWheelEvent*)), infoScroll, SLOT(redirectedWheelEvent(QWheelEvent*))); - //egrid->addMultiCellWidget(time, 0, 0, 0, 1); - //egrid->addMultiCellWidget(MusECore::hLine(editor), 1, 1, 0, 1); egrid->addWidget(time, 0, 0, 1, 2); egrid->addWidget(MusECore::hLine(editor), 1, 0, 1, 2); @@ -479,7 +478,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) connect(hscroll, SIGNAL(scrollChanged(int)), canvas, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scaleChanged(int)), canvas, SLOT(setXMag(int))); connect(vscroll, SIGNAL(valueChanged(int)), list, SLOT(setYPos(int))); - connect(hscroll, SIGNAL(scrollChanged(int)), time, SLOT(setXPos(int))); // + connect(hscroll, SIGNAL(scrollChanged(int)), time, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scaleChanged(int)), time, SLOT(setXMag(int))); connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); connect(canvas, SIGNAL(verticalScroll(unsigned)),SLOT(verticalScrollSetYpos(unsigned))); @@ -492,7 +491,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name) connect(canvas, SIGNAL(startEditor(MusECore::PartList*,int)), SIGNAL(startEditor(MusECore::PartList*, int))); connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); - //connect(MusEGlobal::song, SIGNAL(mTypeChanged(MType)), SLOT(setMode((int)MType))); // p4.0.7 Tim. connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int))); connect(canvas, SIGNAL(selectionChanged()), SIGNAL(selectionChanged())); connect(canvas, SIGNAL(dropSongFile(const QString&)), SIGNAL(dropSongFile(const QString&))); @@ -500,15 +498,10 @@ Arranger::Arranger(ArrangerView* parent, const char* name) connect(canvas, SIGNAL(toolChanged(int)), SIGNAL(toolChanged(int))); connect(MusEGlobal::song, SIGNAL(controllerChanged(MusECore::Track*)), SLOT(controllerChanged(MusECore::Track*))); -// connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(seek())); - // Removed p3.3.43 - // Song::addMarker() already emits a 'markerChanged'. - //connect(time, SIGNAL(addMarker(int)), SIGNAL(addMarker(int))); - configChanged(); // set configuration values if(canvas->part()) - midiTrackInfo->setTrack(canvas->part()->track()); // Tim. + midiTrackInfo->setTrack(canvas->part()->track()); showTrackInfo(showTrackinfoFlag); // Take care of some tabbies! @@ -521,7 +514,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) } -void Arranger::updateTListHeader() +void Arranger::updateTListHeader() // TODO FIXME FINDMICHJETZT this doesn't work properly :/ { if (header) { @@ -580,6 +573,7 @@ void Arranger::updateTListHeader() } } +// DELETETHIS 20 //--------------------------------------------------------- // updateHScrollRange //--------------------------------------------------------- @@ -599,15 +593,6 @@ void Arranger::updateTListHeader() // hscroll->setRange(s, e); //} -//--------------------------------------------------------- -// headerMoved -//--------------------------------------------------------- - -void Arranger::headerMoved() - { - //header->setResizeMode(COL_NAME, QHeaderView::Stretch); - } - //--------------------------------------------------------- // setTime //--------------------------------------------------------- @@ -648,22 +633,25 @@ void Arranger::dclickPart(MusECore::Track* t) void Arranger::configChanged() { - //printf("Arranger::configChanged\n"); - if (MusEGlobal::config.canvasBgPixmap.isEmpty()) { canvas->setBg(MusEGlobal::config.partCanvasBg); canvas->setBg(QPixmap()); - //printf("Arranger::configChanged - no bitmap!\n"); } else { - - //printf("Arranger::configChanged - bitmap %s!\n", MusEGlobal::config.canvasBgPixmap.ascii()); canvas->setBg(QPixmap(MusEGlobal::config.canvasBgPixmap)); } - ///midiTrackInfo->setFont(MusEGlobal::config.fonts[2]); - //updateTrackInfo(type); } +//--------------------------------------------------------- +// focusCanvas +//--------------------------------------------------------- + +void Arranger::focusCanvas() +{ + canvas->setFocus(); + canvas->activateWindow(); +} + //--------------------------------------------------------- // songlenChanged //--------------------------------------------------------- @@ -714,8 +702,6 @@ void Arranger::songChanged(int type) SC_SIG | SC_TEMPO)) // Maybe sig. Requires tempo. canvas->partsChanged(); - //typeBox->setCurrentIndex(int(MusEGlobal::song->mtype())); // REMOVE Tim. Redundant. - if (type & SC_SIG) time->redraw(); if (type & SC_TEMPO) @@ -724,7 +710,6 @@ void Arranger::songChanged(int type) if(type & SC_TRACK_REMOVED) { AudioStrip* w = (AudioStrip*)(trackInfo->getWidget(2)); - //AudioStrip* w = (AudioStrip*)(trackInfo->widget(2)); if(w) { MusECore::Track* t = w->getTrack(); @@ -743,7 +728,7 @@ void Arranger::songChanged(int type) } } - // TEST p4.0.36 Try this + // TEST p4.0.36 Try this DELETETHIS and below and even more below if(type & ( //SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED | SC_PART_INSERTED | SC_PART_REMOVED | SC_PART_MODIFIED | SC_EVENT_INSERTED | SC_EVENT_REMOVED | SC_EVENT_MODIFIED)) //| @@ -783,6 +768,8 @@ void Arranger::modeChange(int mode) { MusEGlobal::song->setMType(MType(mode)); updateTrackInfo(-1); + if(MusEGlobal::config.smartFocus) + focusCanvas(); } //--------------------------------------------------------- @@ -791,10 +778,10 @@ void Arranger::modeChange(int mode) void Arranger::setMode(int mode) { - typeBox->blockSignals(true); // + typeBox->blockSignals(true); // This will only set if different. typeBox->setCurrentIndex(mode); - typeBox->blockSignals(false); // + typeBox->blockSignals(false); } //--------------------------------------------------------- @@ -904,6 +891,8 @@ void Arranger::_setRaster(int index) // Set the audio record part snapping. MusEGlobal::song->setArrangerRaster(_raster); canvas->redraw(); + if(MusEGlobal::config.smartFocus) + focusCanvas(); } //--------------------------------------------------------- @@ -1102,10 +1091,8 @@ QWidget* WidgetStack::visibleWidget() const QSize WidgetStack::minimumSizeHint() const { if (top == -1) - { - //printf("WidgetStack::minimumSizeHint top is -1\n"); return (QSize(0, 0)); - } + QSize s(0,0); for (unsigned int i = 0; i < stack.size(); ++i) { if (stack[i]) { @@ -1115,10 +1102,19 @@ QSize WidgetStack::minimumSizeHint() const s = s.expandedTo(ss); } } - //printf("WidgetStack::minimumSizeHint width:%d height:%d\n", s.width(), s.height()); + return s; } +//--------------------------------------------------------- +// wheelEvent +//--------------------------------------------------------- + +void WidgetStack::wheelEvent(QWheelEvent* ev) + { + emit redirectWheelEvent(ev); + } + //--------------------------------------------------------- // clear //--------------------------------------------------------- @@ -1133,10 +1129,10 @@ void Arranger::clear() midiTrackInfo->setTrack(0); } -void Arranger::wheelEvent(QWheelEvent* ev) - { - emit redirectWheelEvent(ev); - } +//void Arranger::wheelEvent(QWheelEvent* ev) +// { +// emit redirectWheelEvent(ev); +// } void Arranger::controllerChanged(MusECore::Track *t) { @@ -1162,12 +1158,10 @@ void Arranger::showTrackInfo(bool flag) void Arranger::genTrackInfo(QWidget* parent) { trackInfo = new WidgetStack(parent, "trackInfoStack"); - //trackInfo->setFocusPolicy(Qt::TabFocus); // p4.0.9 - //trackInfo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); noTrackInfo = new QWidget(trackInfo); noTrackInfo->setAutoFillBackground(true); - QPixmap *noInfoPix = new QPixmap(160, 1000); //muse_leftside_logo_xpm); + QPixmap *noInfoPix = new QPixmap(160, 1000); const QPixmap *logo = new QPixmap(*museLeftSideLogo); noInfoPix->fill(noTrackInfo->palette().color(QPalette::Window) ); QPainter p(noInfoPix); @@ -1181,13 +1175,9 @@ void Arranger::genTrackInfo(QWidget* parent) midiTrackInfo = new MidiTrackInfo(trackInfo); - //midiTrackInfo->setFocusPolicy(Qt::TabFocus); // p4.0.9 - //midiTrackInfo->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum)); trackInfo->addWidget(noTrackInfo, 0); trackInfo->addWidget(midiTrackInfo, 1); trackInfo->addWidget(0, 2); - -/// genMidiTrackInfo(); } //--------------------------------------------------------- @@ -1249,7 +1239,7 @@ void Arranger::switchInfo(int n) tgrid->update(); // muse-2 Qt4 } -/* +/* DELETETHIS 12 QSize WidgetStack::minimumSize() const { printf("WidgetStack::minimumSize\n"); diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h index c2746ba7..6069c8b3 100644 --- a/muse2/muse/arranger/arranger.h +++ b/muse2/muse/arranger/arranger.h @@ -26,6 +26,9 @@ #include #include +#include +#include + #include "midieditor.h" #include "pcanvas.h" #include "trackautomationview.h" @@ -34,11 +37,9 @@ class QAction; class QCheckBox; class QMainWindow; class QMenu; -class QScrollBar; class QToolButton; class QWheelEvent; class QKeyEvent; -//class QStackedWidget; namespace MusECore { class Track; @@ -60,6 +61,7 @@ class TLLayout; class TList; class WidgetStack; + //--------------------------------------------------------- // WidgetStack //--------------------------------------------------------- @@ -69,6 +71,12 @@ class WidgetStack : public QWidget { std::vector stack; int top; + protected: + virtual void wheelEvent(QWheelEvent* e); + + signals: + void redirectWheelEvent(QWheelEvent*); + public: WidgetStack(QWidget* parent, const char* name = 0); void raiseWidget(int idx); @@ -77,10 +85,26 @@ class WidgetStack : public QWidget { QWidget* visibleWidget() const; int curIdx() const { return top; } virtual QSize minimumSizeHint() const; - //QSize minimumSize() const; - //int minimumHeight() const; }; +//--------------------------------------------------------- +// ScrollBar +//--------------------------------------------------------- + +class ScrollBar : public QScrollBar { + Q_OBJECT + + public slots: + void redirectedWheelEvent(QWheelEvent*); + + protected: + virtual void resizeEvent(QResizeEvent* e) { setPageStep(e->size().height()); } + + public: + ScrollBar(Qt::Orientation orientation, QWidget * parent = 0 ) : QScrollBar(orientation, parent) {}; +}; + + //--------------------------------------------------------- // Arranger //--------------------------------------------------------- @@ -100,9 +124,7 @@ class Arranger : public QWidget { SpinBox* lenEntry; bool showTrackinfoFlag; WidgetStack* trackInfo; - //QStackedWidget* trackInfo; - QScrollBar* infoScroll; - //MidiTrackInfoBase* midiTrackInfo; + ScrollBar* infoScroll; MidiTrackInfo* midiTrackInfo; AudioStrip* waveTrackInfo; QWidget* noTrackInfo; @@ -115,7 +137,6 @@ class Arranger : public QWidget { QToolButton* ib; int trackInfoType; Splitter* split; - ///QMenu* pop; int songType; PosLabel* cursorPos; SpinBox* globalTempoSpinBox; @@ -138,31 +159,27 @@ class Arranger : public QWidget { void songChanged(int); void modeChange(int); void setTime(unsigned); - void headerMoved(); void globalPitchChanged(int); void globalTempoChanged(int); void setTempo50(); void setTempo100(); void setTempo200(); - //void seek(); void verticalScrollSetYpos(unsigned); void horizontalZoomIn(); void horizontalZoomOut(); + void focusCanvas(); signals: - void redirectWheelEvent(QWheelEvent*); void editPart(MusECore::Track*); void selectionChanged(); void dropSongFile(const QString&); void dropMidiFile(const QString&); void startEditor(MusECore::PartList*, int); void toolChanged(int); - //void addMarker(int); void setUsedTool(int); protected: - virtual void wheelEvent(QWheelEvent* e); virtual void keyPressEvent(QKeyEvent* event); public slots: diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp index d38b5284..da510c0e 100644 --- a/muse2/muse/arranger/arrangerview.cpp +++ b/muse2/muse/arranger/arrangerview.cpp @@ -37,7 +37,6 @@ #include #include #include -//#include #include #include #include @@ -59,7 +58,6 @@ #include "mtscale.h" #include "scoreedit.h" #include "shortcuts.h" -#include "sig.h" #include "song.h" #include "structure.h" #include "tb1.h" @@ -78,15 +76,12 @@ namespace MusEGui { ArrangerView::ArrangerView(QWidget* parent) : TopWin(TopWin::ARRANGER, parent, "arrangerview", Qt::Window) { - //using MusEGlobal::muse; - - //setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("MusE: Arranger")); - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); arranger = new Arranger(this, "arranger"); setCentralWidget(arranger); - setFocusProxy(arranger); + //setFocusProxy(arranger); scoreOneStaffPerTrackMapper = new QSignalMapper(this); scoreAllInOneMapper = new QSignalMapper(this); @@ -658,7 +653,6 @@ void ArrangerView::populateAddTrack() void ArrangerView::addNewTrack(QAction* action) { MusEGlobal::song->addNewTrack(action, MusEGlobal::muse->arranger()->curTrack()); // Insert at current selected track. - //MusEGlobal::song->addNewTrack(action); // Add at end. } void ArrangerView::updateShortcuts() diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 897ae1c8..f3e71916 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -34,7 +34,6 @@ #include #include #include -//#include #include #include @@ -48,7 +47,6 @@ #include "globals.h" #include "icons.h" #include "event.h" -//#include "xml.h" #include "wave.h" #include "audio.h" #include "shortcuts.h" @@ -65,8 +63,6 @@ #include "dialogs.h" #include "widgets/pastedialog.h" -//#define ABS(x) ((x) < 0) ? -(x) : (x)) -//#define ABS(x) (x>=0?x:-x) #define ABS(x) (abs(x)) #define EDITING_FINISHED_TIMEOUT 50 /* in milliseconds */ @@ -108,7 +104,6 @@ PartCanvas::PartCanvas(int* r, QWidget* parent, int sx, int sy) setMouseTracking(true); drag = DRAG_OFF; curColorIndex = 0; - //automation.currentCtrl = 0; automation.currentCtrlValid = false; automation.controllerState = doNothing; automation.moveController = false; @@ -117,7 +112,6 @@ PartCanvas::PartCanvas(int* r, QWidget* parent, int sx, int sy) PartCanvas::~PartCanvas() { - //items.clearDelete(); } //--------------------------------------------------------- @@ -131,7 +125,6 @@ int PartCanvas::y2pitch(int y) const int idx = 0; for (MusECore::iTrack it = tl->begin(); it != tl->end(); ++it, ++idx) { int h = (*it)->height(); - // if ((y >= yy) && (y < yy+h)) if (y < yy+h) break; yy += h; @@ -177,7 +170,6 @@ void PartCanvas::returnPressed() //twice. the second call would cause a crash, however! MusECore::Part* oldPart = editPart->part(); MusECore::Part* newPart = oldPart->clone(); - //printf("PartCanvas::returnPressed before msgChangePart oldPart refs:%d Arefs:%d newPart refs:%d Arefs:%d\n", oldPart->events()->refCount(), oldPart->events()->arefCount(), newPart->events()->refCount(), newPart->events()->arefCount()); newPart->setName(lineEditor->text()); // Indicate do undo, and do port controller values but not clone parts. @@ -290,6 +282,7 @@ void PartCanvas::moveCanvasItems(CItemList& items, int dp, int dx, DragType dtyp { CItem* ci = ici->second; + // DELETETHIS 5 // If this item's part is in the parts2change list, change the item's part to the new part. //MusECore::Part* pt = ci->part(); //iP2C ip2c = parts2change.find(pt); @@ -323,7 +316,6 @@ void PartCanvas::moveCanvasItems(CItemList& items, int dp, int dx, DragType dtyp // return false, if copy/move not allowed //--------------------------------------------------------- -// Changed by T356. bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& newpos, DragType t) { NPart* npart = (NPart*) item; @@ -380,12 +372,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& if(t == MOVE_MOVE) item->setPart(dpart); if (t == MOVE_COPY && !clone) { - //dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it - // so we must decrement it first :/ - - // // Copy Events - // MusECore::EventList* se = spart->events(); MusECore::EventList* de = dpart->events(); for (MusECore::iEvent i = se->begin(); i != se->end(); ++i) { @@ -400,7 +387,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it // so we must decrement it first :/ // These will not increment ref count, and will not chain clones... - // TODO: is this comment still correct (by flo93)? i doubt it! + // TODO DELETETHIS: is the above comment still correct (by flo93)? i doubt it! operations.push_back(MusECore::UndoOp(MusECore::UndoOp::AddPart,dpart)); } else if (t == MOVE_MOVE) { @@ -412,7 +399,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& // so we must increment it first :/ dpart->setSelected(spart->selected()); // These will increment ref count if not a clone, and will chain clones... - // TODO: is this comment still correct (by flo93)? i doubt it! + // TODO DELETETHIS: is the above comment still correct (by flo93)? i doubt it! operations.push_back(MusECore::UndoOp(MusECore::UndoOp::ModifyPart,spart, dpart, true, false)); spart->setSelected(false); @@ -456,7 +443,6 @@ void PartCanvas::songIsClearing() void PartCanvas::partsChanged() { - //items.clear(); int sn = -1; if (curItem) sn=curItem->part()->sn(); curItem=NULL; @@ -975,7 +961,7 @@ MusECore::Track* PartCanvas::y2Track(int y) const void PartCanvas::keyPress(QKeyEvent* event) { int key = event->key(); - +// DELETETHIS 10 // if (_tool == AutomationTool) { // can't get the cursor pos to work right, skipping for now // // clear all the automation parameters // automation.moveController=false; @@ -992,7 +978,6 @@ void PartCanvas::keyPress(QKeyEvent* event) // to "false" some usec ago by returnPressed, called by editingFinished. if ( key == Qt::Key_Return || key == Qt::Key_Enter ) { - //returnPressed(); commented out by flo return; } // the below CAN indeed happen. @@ -1090,9 +1075,8 @@ void PartCanvas::keyPress(QKeyEvent* event) emit selectTrackBelow(); return; } - // + // Shortcuts that require selected parts from here - // if (!curItem) { if (items.size()==0) { event->ignore(); // give global accelerators a chance @@ -1202,11 +1186,10 @@ void PartCanvas::keyPress(QKeyEvent* event) MusECore::Track* track = curItem->part()->track();//top->part()->track(); track = y2Track(track->y() - 1); - //If we're at topmost, leave - if (!track) { - //printf("no track above!\n"); + //If we're at topmost (no track above), leave + if (!track) return; - } + int middle = curItem->x() + curItem->part()->lenTick()/2; CItem *aboveL = 0, *aboveR = 0; //Upper limit: song end, lower limit: song start @@ -1367,7 +1350,7 @@ void PartCanvas::keyPress(QKeyEvent* event) // draws a part //--------------------------------------------------------- -#if 0 +#if 0 // DELETETHIS 430 WHOA! void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) { int from = rect.x(); @@ -1794,7 +1777,6 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) int from = rect.x(); int to = from + rect.width(); - //printf("from %d to %d\n", from,to); MusECore::Part* part = ((NPart*)item)->part(); int pTick = part->tick(); from -= pTick; @@ -1817,17 +1799,13 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) // Item bounding box x is in tick coordinates, same as rectangle. if((rr & mr).isNull()) - { - //printf("PartCanvas::drawItem rectangle is null\n"); return; - } - //p.save(); p.setWorldMatrixEnabled(false); // NOTE: Optimization: For each item, hasHiddenEvents() is called once in Canvas::draw(), and we use cachedHasHiddenEvents(). // Not used for now. - //int het = part->cachedHasHiddenEvents(); + //int het = part->cachedHasHiddenEvents(); DELETETHIS or FIXME or whatever? int het = part->hasHiddenEvents(); int xs_0 = rr.x(); @@ -1923,18 +1901,13 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) int h = rr.height(); double s = double(h) / 4.0; int y0 = ys_0; - //int y1 = y0 + lrint(s); int y2 = y0 + lrint(s * 2.0); - //int y3 = y0 + lrint(s * 3.0); int y4 = y0 + h; - //QPoint points[12]; QPoint points[8]; int pts; - // // Fill the part rectangles, accounting for hidden events by using 'jagged' edges... - // p.setBrush(brush); p.setPen(Qt::NoPen); @@ -1946,7 +1919,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) pts = 0; if(het == (MusECore::Part::LeftEventsHidden | MusECore::Part::RightEventsHidden)) { - //points[pts++] = QPoint(xs_0, y0); + //points[pts++] = QPoint(xs_0, y0); DELETETHIS 11 //points[pts++] = QPoint(xe_0, y0); //points[pts++] = QPoint(xe_j, y1); //points[pts++] = QPoint(xe_0, y2); @@ -1969,7 +1942,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) else if(het == MusECore::Part::LeftEventsHidden) { - //points[pts++] = QPoint(xs_0, y0); + //points[pts++] = QPoint(xs_0, y0); DELETETHIS 7 //points[pts++] = QPoint(xe_0, y0); //points[pts++] = QPoint(xe_0, y4); //points[pts++] = QPoint(xs_0, y4); @@ -1988,7 +1961,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) else if(het == MusECore::Part::RightEventsHidden) { - //points[pts++] = QPoint(xs_0, y0); + //points[pts++] = QPoint(xs_0, y0); DELETETHIS 7 //points[pts++] = QPoint(xe_0, y0); //points[pts++] = QPoint(xe_j, y1); //points[pts++] = QPoint(xe_0, y2); @@ -2005,13 +1978,12 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) p.drawConvexPolygon(points, pts); } - // // Draw remaining 'hidden events' decorations with 'jagged' edges... - // int part_r, part_g, part_b, brightness, color_brightness; MusEGlobal::config.partColors[cidx].getRgb(&part_r, &part_g, &part_b); brightness = part_r*29 + part_g*59 + part_b*12; + // DELETETHIS 4 ?? //if ((brightness < 12000 || part->selected()) && !part->mute() && !item->isMoving()) // color_brightness=223; // too dark: use lighter color //else @@ -2022,11 +1994,10 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) color_brightness=180; //255; // too dark: use lighter color QColor c(color_brightness,color_brightness,color_brightness, MusEGlobal::config.globalAlphaBlend); p.setBrush(QBrush(MusECore::gGradientFromQColor(c, rr.topLeft(), rr.bottomLeft()))); - //p.setBrush(QBrush(c)); if(het & MusECore::Part::RightEventsHidden) { pts = 0; - //points[pts++] = QPoint(xe_0, y0); + //points[pts++] = QPoint(xe_0, y0); DELETETHIS 5 //points[pts++] = QPoint(xe_0, y4); //points[pts++] = QPoint(xe_j, y3); //points[pts++] = QPoint(xe_0, y2); @@ -2041,7 +2012,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) if(het & MusECore::Part::LeftEventsHidden) { pts = 0; - //points[pts++] = QPoint(xs_0, y0); + //points[pts++] = QPoint(xs_0, y0); DELETETHIS 5 //points[pts++] = QPoint(xs_j, y1); //points[pts++] = QPoint(xs_0, y2); //points[pts++] = QPoint(xs_j, y3); @@ -2056,7 +2027,6 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) } else { - //p.fillRect(rr, brush); p.fillRect(rr & mr, brush); // Respect the requested drawing rectangle. Gives speed boost! } @@ -2064,11 +2034,8 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) if(part->mute()) { p.setPen(Qt::NoPen); - //brush.setStyle(Qt::DiagCrossPattern); brush.setStyle(Qt::Dense7Pattern); - //p.fillRect(rr, brush); // FIXME: Some shifting going on - //p.fillRect(QRect(rr.x(), rr.y(), rr.width() + 1, rr.height() + 1), brush); // Same here p.fillRect(rr & mr, brush); // Respect the requested drawing rectangle. Gives speed boost! } @@ -2093,7 +2060,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) p.setWorldMatrixEnabled(false); - #if 0 + #if 0 // DELETETHIS 13 // // Now draw the borders... // Works great but requires clones be drawn with the highest priority on top of all other parts, in Canvas::draw. @@ -2108,7 +2075,7 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) //#else #endif - #if 1 + #if 1 // DELETETHIS remove wrapping #if // // Now draw the borders, using custom segments... // @@ -2258,12 +2225,11 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) int part_r, part_g, part_b, brightness; // Since we'll draw the text on the bottom (to accommodate drum 'slivers'), // get the lowest colour in the gradient used to draw the part. - //QRect rr = map(r); QRect tr = rr; tr.setX(tr.x() + 3); MusECore::gGradientFromQColor(MusEGlobal::config.partColors[cidx], tr.topLeft(), tr.bottomLeft()).stops().last().second.getRgb(&part_r, &part_g, &part_b); brightness = part_r*29 + part_g*59 + part_b*12; - //bool rev = (brightness < 12000 || part->selected()) && !part->mute() && !item->isMoving(); + //bool rev = (brightness < 12000 || part->selected()) && !part->mute() && !item->isMoving(); DELETETHIS bool rev = brightness >= 12000 && !part->selected(); p.setFont(MusEGlobal::config.fonts[4]); if (rev) @@ -2278,7 +2244,6 @@ void PartCanvas::drawItem(QPainter& p, const CItem* item, const QRect& rect) p.drawText(tr, Qt::AlignBottom|Qt::AlignLeft, part->name()); } - //p.restore(); p.setWorldMatrixEnabled(true); } @@ -2292,7 +2257,7 @@ void PartCanvas::drawMoving(QPainter& p, const CItem* item, const QRect&) p.setPen( Qt::black); MusECore::Part* part = ((NPart*)item)->part(); QColor c(part->mute() ? Qt::white : MusEGlobal::config.partColors[part->colorIndex()]); - //c.setAlpha(MusEGlobal::config.globalAlphaBlend); + //c.setAlpha(MusEGlobal::config.globalAlphaBlend); DELETETHIS c.setAlpha(128); // Fix this regardless of global setting. Should be OK. p.setBrush(c); p.drawRect(item->mp().x(), item->mp().y(), item->width(), item->height()); @@ -2314,7 +2279,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, MusECore::EventList* ev int part_r, part_g, part_b, brightness; MusEGlobal::config.partColors[pt->colorIndex()].getRgb(&part_r, &part_g, &part_b); brightness = part_r*29 + part_g*59 + part_b*12; - //if ((brightness < 12000 || pt->selected()) && !pt->mute()) + //if ((brightness < 12000 || pt->selected()) && !pt->mute()) DELETETHIS 4 // color_brightness=192; // too dark: use lighter color //else // color_brightness=64; // otherwise use dark color @@ -2506,8 +2471,6 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, MusECore::EventList* ev if (te < (from + pTick)) continue; - //if (te > (to + pTick)) - // te = to + pTick; if (te >= (to + pTick)) te = lrint(rmapxDev_f(rmapx_f(to + pTick) - 1.0)); @@ -2537,9 +2500,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, MusECore::EventList* ev void PartCanvas::drawWavePart(QPainter& p, const QRect& bb, MusECore::WavePart* wp, const QRect& _pr) { - //QRect rr = p.worldMatrix().mapRect(bb); // Gives inconsistent positions. Source shows wrong operation for our needs. QRect rr = map(bb); // Use our own map instead. - //QRect pr = p.worldMatrix().mapRect(_pr); QRect pr = map(_pr); p.save(); @@ -2592,10 +2553,7 @@ void PartCanvas::drawWavePart(QPainter& p, if(ex > x2) ex = x2; if (h < 20) { - // // combine multi channels into one waveform - // - //printf("PartCanvas::drawWavePart i:%d ex:%d\n", i, ex); for (; i < ex; i++) { MusECore::SampleV sa[channels]; @@ -2620,14 +2578,12 @@ void PartCanvas::drawWavePart(QPainter& p, } } else { - // // multi channel display - // int hm = hh / (channels * 2); int cc = hh % (channels * 2) ? 0 : 1; for (; i < ex; i++) { y = pr.y() + hm; - MusECore::SampleV sa[channels]; + MusECore::SampleV sa[channels]; xScale = MusEGlobal::tempomap.deltaTick2frame(postick, postick + tickstep); f.read(sa, xScale, pos); postick += tickstep; @@ -3146,10 +3102,6 @@ void PartCanvas::dragEnterEvent(QDragEnterEvent* event) event->acceptProposedAction(); // TODO CHECK Tim. } -//--------------------------------------------------------- -// dragvent -//--------------------------------------------------------- - //--------------------------------------------------------- // dropEvent //--------------------------------------------------------- @@ -3394,7 +3346,7 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) // does NOT depend on the update rectangle (except to check intersection). That's why this issue // does not show up there. Should probably try to make that routine more efficient, just like here. Tim. p4.0.30 QRect r(mx, yy, mw, th); - //if(r.intersects(mr)) + //if(r.intersects(mr)) DELETETHIS { if (!track->isMidiTrack() && (track->type() != MusECore::Track::WAVE)) { //QRect r = rect & QRect(x, yy, w, track->height()); @@ -3402,6 +3354,7 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) //p.setPen(baseColor); } + // DELETETHIS 13 // This was redundant drawing. Not required, done via drawTopItem in Canvas::draw /* //p.setWorldMatrixEnabled(true); @@ -3418,7 +3371,6 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) } p.restore(); - //p.setWorldMatrixEnabled(true); } //--------------------------------------------------------- @@ -3426,36 +3378,25 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) //--------------------------------------------------------- void PartCanvas::drawTopItem(QPainter& p, const QRect& rect) { - //int x = rect.x(); - //int y = rect.y(); - //int w = rect.width(); - //int h = rect.height(); - - // Changed to draw in device coordinate space instead of virtual, transformed space. Tim. p4.0.30 - //QRect mr = p.transform().mapRect(rect); // Gives inconsistent positions. Source shows wrong operation for our needs. QRect mr = map(rect); // Use our own map instead. - //printf("PartCanvas::drawTopItem x:%d y:%d w:%d h:%d\n", rect.x(), rect.y(), rect.width(), rect.height()); - int mx = mr.x(); int my = mr.y(); int mw = mr.width(); int mh = mr.height(); QColor baseColor(MusEGlobal::config.partCanvasBg.light(104)); - //p.setPen(baseColor); p.save(); p.setWorldMatrixEnabled(false); MusECore::TrackList* tl = MusEGlobal::song->tracks(); int yoff = -rmapy(yorg) - ypos; - //int yy = 0; int yy = yoff; int th; for (MusECore::iTrack it = tl->begin(); it != tl->end(); ++it) { - //if (yy > y + h) + //if (yy > y + h) DELETETHIS if (yy > my + mh) break; MusECore::Track* track = *it; @@ -3463,15 +3404,15 @@ void PartCanvas::drawTopItem(QPainter& p, const QRect& rect) if (!th) continue; if (!track->isMidiTrack()) { // draw automation - //QRect r = rect & QRect(x, yy, w, track->height()); + //QRect r = rect & QRect(x, yy, w, track->height()); DELETETHIS QRect r(mx, yy, mw, th); if(r.intersects(mr)) { drawAutomation(p, r, (MusECore::AudioTrack*)track); - //p.setPen(baseColor); + //p.setPen(baseColor); DELETETHIS } } - //yy += track->height(); + //yy += track->height(); DELETETHIS yy += th; } @@ -3482,22 +3423,16 @@ void PartCanvas::drawTopItem(QPainter& p, const QRect& rect) int width = mapx(MusEGlobal::song->cpos()) - mapx(startPos); if (MusEGlobal::song->cpos() < startPos) { - //p.setWorldMatrixEnabled(true); p.restore(); return; // no drawing if we are before punch out } if (MusEGlobal::song->punchout() && MusEGlobal::song->cpos() > MusEGlobal::song->rpos()) { - //p.setWorldMatrixEnabled(true); p.restore(); return; // no drawing if we are beyond punch out. } - ///p.save(); - ///p.resetTransform(); - // write recording while it happens to get feedback // should be enhanced with solution that draws waveform also - //int yPos=0; int yPos = yoff; if (MusEGlobal::song->record() && MusEGlobal::audio->isPlaying()) { for (MusECore::iTrack it = tl->begin(); it != tl->end(); ++it) { @@ -3522,7 +3457,6 @@ void PartCanvas::drawTopItem(QPainter& p, const QRect& rect) } } p.restore(); - //p.setWorldMatrixEnabled(true); // draw midi events on yPos=0; @@ -3588,13 +3522,13 @@ void PartCanvas::drawAudioTrack(QPainter& p, const QRect& r, const QRect& bbox, p.setPen(Qt::black); QColor c(Qt::gray); c.setAlpha(MusEGlobal::config.globalAlphaBlend); - //QLinearGradient gradient(r.topLeft(), r.bottomLeft()); QLinearGradient gradient(mex + 1, mey + 1, mex + 1, mey + meh - 1); // Inside the border gradient.setColorAt(0, c); gradient.setColorAt(1, c.darker()); QBrush brush(gradient); p.fillRect(mr, brush); // p4.0.30 ... + // DELETETHIS 6 //int xx = -rmapx(xorg) - xpos; //printf("PartCanvas::drawAudioTrack x:%d y:%d w:%d h:%d th:%d xx:%d\n", r.x(), r.y(), r.width(), r.height(), t->height(), xx); //if(r.x() <= xx) @@ -3604,7 +3538,7 @@ void PartCanvas::drawAudioTrack(QPainter& p, const QRect& r, const QRect& bbox, if(mex >= mx && mex <= mx + mw) p.drawLine(mex, my, mex, my + mh - 1); // The left edge - //if(mex + mew >= mx && mex + mew <= mx + mw) + //if(mex + mew >= mx && mex + mew <= mx + mw) DELETETHIS 2 // p.drawLine(mex + mew, my, mex + mew, my + mh - 1); // The right edge. Not used - infinite to the right if(mey >= my && mey <= my + mh) p.drawLine(mx, mey, mx + mw - 1, mey); // The top edge @@ -3647,7 +3581,6 @@ void PartCanvas::drawAutomation(QPainter& p, const QRect& rr, MusECore::AudioTra int ypixel = oldY; double min, max; cl->range(&min,&max); - //bool discrete = cl->valueType() == VAL_BOOL || cl->mode() == MusECore::CtrlList::DISCRETE; bool discrete = cl->mode() == MusECore::CtrlList::DISCRETE; QPen pen1(cl->color(), 0); QPen pen2(cl->color(), 2); @@ -3658,7 +3591,6 @@ void PartCanvas::drawAutomation(QPainter& p, const QRect& rr, MusECore::AudioTra { double y; if (cl->valueType() == MusECore::VAL_LOG ) { // use db scale for volume - //printf("log conversion val=%f min=%f max=%f\n", cl->curVal(), min, max); y = logToVal(cl->curVal(), min, max); // represent volume between 0 and 1 if (y < 0) y = 0.0; } @@ -3672,7 +3604,6 @@ void PartCanvas::drawAutomation(QPainter& p, const QRect& rr, MusECore::AudioTra { double y = ic->second.val; if (cl->valueType() == MusECore::VAL_LOG ) { // use db scale for volume - //printf("log conversion val=%f min=%f max=%f\n", cl->curVal(), min, max); y = logToVal(y, min, max); // represent volume between 0 and 1 if (y < 0) y = 0.0; } @@ -3684,7 +3615,6 @@ void PartCanvas::drawAutomation(QPainter& p, const QRect& rr, MusECore::AudioTra if (oldY==-1) oldY = ypixel; - //printf(" line x1:%d x2:%d prevVal:%f nextVal:%f\n", leftX, currentPixel, prevVal, nextVal); p.setPen(pen1); if(discrete) { @@ -3712,12 +3642,10 @@ void PartCanvas::drawAutomation(QPainter& p, const QRect& rr, MusECore::AudioTra } if (xpixel <= rr.right()) { - //printf(" endline prevVal:%f\n", prevVal); p.setPen(pen1); p.drawLine(xpixel, ypixel, rr.right(), ypixel); } } - //p.restore(); } @@ -3764,7 +3692,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo int ypixel = oldY; double min, max; cl->range(&min,&max); - //bool discrete = cl->valueType() == VAL_BOOL || cl->mode() == MusECore::CtrlList::DISCRETE; // Tim bool discrete = cl->mode() == MusECore::CtrlList::DISCRETE; // First check that there IS automation, ic == cl->end means no automation @@ -3795,12 +3722,9 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo xpixel = mapx(MusEGlobal::tempomap.frame2tick(ic->second.frame)); if (oldY==-1) oldY = ypixel; - //printf(" oldX:%d oldY:%d xpixel:%d ypixel:%d\n", oldX, oldY, xpixel, ypixel); bool foundIt=false; if (addNewCtrl) { - // check if we are reasonably close to a line - //printf("xpixel=%d oldX=%d\n", xpixel, oldX); double firstX=oldX; double lastX=xpixel; double firstY=oldY; @@ -3808,8 +3732,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo double proportion = (currX-firstX)/(lastX-firstX); - //if ( (currX > lastX && firstY!=lastY) // omit special cases. - // || firstX==lastX ) { if((currX < oldX) || (currX > lastX) || (firstX==lastX) ) { oldX = xpixel; @@ -3825,7 +3747,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo // / // 1 double calcY = (lastY-firstY)*proportion+firstY; - //printf("calcY=%f currY=%d\n", calcY, currY); if(ABS(calcY-currY) < circumference || (xpixel == oldX && ABS(currX-xpixel) < circumference)) foundIt=true; @@ -3847,9 +3768,7 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo automation.currentCtrlValid = false; automation.controllerState = addNewController; }else { - //automation.currentCtrl=&ic->second; automation.currentCtrlFrame = ic->second.frame; - //automation.currentCtrlVal = ic->second.val; automation.currentCtrlValid = true; automation.controllerState = movingController; } @@ -3869,7 +3788,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo automation.controllerState = addNewController; automation.currentCtrlList = cl; automation.currentTrack = t; - //automation.currentCtrl = 0; automation.currentCtrlValid = false; return; } @@ -3877,7 +3795,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo } // if there are no hits we default to clearing all the data automation.controllerState = doNothing; - //automation.currentCtrl = 0; automation.currentCtrlValid = false; automation.currentCtrlList = 0; automation.currentTrack = 0; @@ -3886,7 +3803,6 @@ void PartCanvas::checkAutomation(MusECore::Track * t, const QPoint &pointer, boo void PartCanvas::controllerChanged(MusECore::Track* t) { - //redraw(); redraw((QRect(0, mapy(t->y()), width(), rmapy(t->height())))); // TODO Check this - correct? } @@ -3911,19 +3827,15 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) if (automation.controllerState == addNewController) { - //printf("adding a new ctrler!\n"); int frame = MusEGlobal::tempomap.tick2frame(pos.x()); // FIXME Inefficient to add with wait here, then remove and add with wait again below. Tim. MusEGlobal::audio->msgAddACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), frame, 1.0 /*dummy value */); - //MusEGlobal::song->addACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), frame, 1.0 /*dummy value */); MusECore::iCtrl ic=automation.currentCtrlList->begin(); for (; ic !=automation.currentCtrlList->end(); ++ic) { MusECore::CtrlVal &cv = ic->second; if (cv.frame == frame) { - //automation.currentCtrl = &cv; automation.currentCtrlFrame = cv.frame; - //automation.currentCtrlVal = cv.val; automation.currentCtrlValid = true; automation.controllerState = movingController; break; @@ -3937,7 +3849,6 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) for (; ic !=automation.currentCtrlList->end(); ++ic) { MusECore::CtrlVal &cv = ic->second; - //if (&cv == automation.currentCtrl) if (cv.frame == automation.currentCtrlFrame) { currFrame = cv.frame; @@ -3958,9 +3869,7 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) // there is only one value at t, and the next value at t+1, and so on. // Also these are maps, not multimaps. p4.0.32 Tim. int newFrame = MusEGlobal::tempomap.tick2frame(pos.x()); - //if(currFrame == 0) - // newFrame = 0; // Force first item to stay at x = 0. - //else + if (newFrame <= prevFrame) newFrame=prevFrame + (icc == automation.currentCtrlList->begin() ? 0: 1); // Only first item is allowed to go to zero x. if (nextFrame!=-1 && newFrame >= nextFrame) newFrame=nextFrame-1; @@ -3968,7 +3877,6 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) int posy=mapy(pos.y()); int tracky = mapy(automation.currentTrack->y()); int trackHeight = automation.currentTrack->height(); - //printf("posy=%d tracky=%d trackHeight=%d\n", posy,tracky,trackHeight); int mouseY = trackHeight - (posy - tracky)-2; double yfraction = ((double)mouseY)/automation.currentTrack->height(); @@ -3979,7 +3887,6 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) if (automation.currentCtrlList->valueType() == MusECore::VAL_LOG ) { // use db scale for volume printf("log conversion val=%f min=%f max=%f\n", yfraction, min, max); cvval = valToLog(yfraction, min, max); - //printf("calc yfraction = %f v=%f ",yfraction,cvval); if (cvval< min) cvval=min; if (cvval>max) cvval=max; } @@ -3987,7 +3894,6 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) // we need to set val between 0 and 1 (unless integer) cvval = yfraction * (max-min) + min; // 'Snap' to integer or boolean - //if (automation.currentCtrlList->valueType() == VAL_INT || automation.currentCtrlList->valueType() == VAL_BOOL) if (automation.currentCtrlList->mode() == MusECore::CtrlList::DISCRETE) cvval = rint(cvval + 0.1); // LADSPA docs say add a slight bias to avoid rounding errors. Try this. if (cvval< min) cvval=min; @@ -3995,18 +3901,12 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) } automation.currentCtrlFrame = newFrame; - //automation.currentCtrlVal = cvval; automation.currentCtrlValid = true; if(icc != automation.currentCtrlList->end()) MusEGlobal::audio->msgChangeACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), icc->second.frame, newFrame, cvval); - //MusEGlobal::song->changeACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), icc->second.frame, newFrame, cvval); else MusEGlobal::audio->msgAddACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), newFrame, cvval); - //MusEGlobal::song->addACEvent((MusECore::AudioTrack*)automation.currentTrack, automation.currentCtrlList->id(), newFrame, cvval); - - // Not needed. Redraw is now handled by msgXXX(). - //controllerChanged(automation.currentTrack); } } @@ -4019,7 +3919,6 @@ void PartCanvas::processAutomationMovements(QPoint pos, bool addPoint) //--------------------------------------------------------- double PartCanvas::logToVal(double inLog, double min, double max) { - //printf("logToVal inLog %f :", inLog); if (inLog < min) inLog = min; if (inLog > max) inLog = max; double linMin = 20.0*MusECore::fast_log10(min); @@ -4027,7 +3926,6 @@ double PartCanvas::logToVal(double inLog, double min, double max) double linVal = 20.0*MusECore::fast_log10(inLog); double outVal = (linVal-linMin) / (linMax - linMin); - // printf("inLog %f outVal %f linVal %f min %f max %f dbMin %f dbMax %f\n", inLog, outVal, linVal, min, max, linMin, linMax); return outVal; } diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h index 34395688..7882ee5c 100644 --- a/muse2/muse/arranger/pcanvas.h +++ b/muse2/muse/arranger/pcanvas.h @@ -71,7 +71,6 @@ class NPart : public CItem { enum ControllerVals { doNothing, movingController, addNewController }; struct AutomationObject { - //MusECore::CtrlVal *currentCtrl; int currentCtrlFrame; bool currentCtrlValid; MusECore::CtrlList *currentCtrlList; @@ -99,8 +98,6 @@ class PartCanvas : public Canvas { AutomationObject automation; - //std::vector automationViews; - virtual void keyPress(QKeyEvent*); virtual void mousePress(QMouseEvent*); virtual void mouseMove(QMouseEvent* event); @@ -137,9 +134,7 @@ class PartCanvas : public Canvas { enum paste_mode_t { PASTEMODE_MIX, PASTEMODE_MOVEALL, PASTEMODE_MOVESOME }; void paste(bool clone = false, paste_mode_t paste_mode = PASTEMODE_MIX, bool to_single_track=false, int amount=1, int raster=1536); MusECore::Undo pasteAt(const QString&, MusECore::Track*, unsigned int, bool clone = false, bool toTrack = true, int* finalPosPtr = NULL, std::set* affected_tracks = NULL); - //MusECore::Part* readClone(MusECore::Xml&, MusECore::Track*, bool toTrack = true); void drawWavePart(QPainter&, const QRect&, MusECore::WavePart*, const QRect&); - //void drawMidiPart(QPainter&, const QRect& rect, MusECore::EventList* events, MusECore::MidiTrack*mt, const QRect& r, int pTick, int from, int to); void drawMidiPart(QPainter&, const QRect& rect, MusECore::EventList* events, MusECore::MidiTrack*mt, MusECore::MidiPart*pt, const QRect& r, int pTick, int from, int to); MusECore::Track* y2Track(int) const; void drawAudioTrack(QPainter& p, const QRect& r, const QRect& bbox, MusECore::AudioTrack* track); diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp index 0ed201bf..b5fa2a1a 100644 --- a/muse2/muse/arranger/tlist.cpp +++ b/muse2/muse/arranger/tlist.cpp @@ -20,13 +20,10 @@ // //========================================================= -//#include "config.h" - #include #include #include -//#include #include #include #include @@ -95,7 +92,7 @@ TList::TList(Header* hdr, QWidget* parent, const char* name) ypos = 0; editMode = false; editJustFinished=false; - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); setMouseTracking(true); header = hdr; @@ -106,7 +103,7 @@ TList::TList(Header* hdr, QWidget* parent, const char* name) ctrl_edit = NULL; mode = NORMAL; - //setBackgroundMode(Qt::NoBackground); // ORCAN - FIXME + //setBackgroundMode(Qt::NoBackground); // ORCAN - FIXME. DELETETHIS? //setAttribute(Qt::WA_OpaquePaintEvent); resizeFlag = false; @@ -312,7 +309,6 @@ void TList::paint(const QRect& r) pm = addtrack_auxsendIcon; break; case MusECore::Track::AUDIO_SOFTSYNTH: - //pm = waveIcon; pm = synthIcon; break; } @@ -401,7 +397,6 @@ void TList::paint(const QRect& r) if (cl->isVisible()) countVisible++; } - //int count = ((MusECore::AudioTrack*)track)->controller()->size(); //commented out by flo: gives a "unused variable" warning s.sprintf(" %d(%d) %s",countVisible, countAll, tr("visible").toAscii().data()); } @@ -512,18 +507,14 @@ void TList::returnPressed() } } - //MusECore::Track* track = editTrack->clone(false); - //editTrack->setName(editor->text()); - //MusEGlobal::audio->msgChangeTrack(track, editTrack); - // p4.0.46 Tim... MusEGlobal::song->startUndo(); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyTrackName, editTrack, editTrack->name().toLatin1().constData(), editor->text().toLatin1().constData())); editTrack->setName(editor->text()); - //MusEGlobal::song->update(SC_TRACK_MODIFIED); - MusEGlobal::song->endUndo(-1); + //MusEGlobal::song->update(SC_TRACK_MODIFIED); //DELETETHIS + MusEGlobal::song->endUndo(-1); //uagh, why "-1", why no proper flags? } } @@ -532,7 +523,7 @@ void TList::returnPressed() editMode = false; editJustFinished = true; - if(editor->isVisible()) + if(editor && editor->isVisible()) { editor->blockSignals(true); editor->hide(); @@ -541,13 +532,6 @@ void TList::returnPressed() setFocus(); } -void TList::chanValueChanged(int /*val*/) -{ - //MusECore::Track* track = editTrack->clone(false); - //((MusECore::MidiTrack*)editTrack)->setOutChannel(val-1); - //MusEGlobal::audio->msgChangeTrack(track, editTrack); -} - void TList::chanValueFinished() { if(editTrack) @@ -569,7 +553,7 @@ void TList::chanValueFinished() editTrack, mt->outChannel(), channel)); - //mt->setOutChannel(channel); + //mt->setOutChannel(channel); DELETETHIS 10 (only the comments of course) MusEGlobal::audio->msgIdle(true); //MusEGlobal::audio->msgSetTrackOutChannel(mt, channel); mt->setOutChanAndUpdate(channel); @@ -750,15 +734,11 @@ void TList::mouseDoubleClickEvent(QMouseEvent* ev) editTrack = t; if (editor == 0) { editor = new QLineEdit(this); - /*connect(editor, SIGNAL(returnPressed()), - SLOT(returnPressed()));*/ - editor->setFrame(true); + editor->setFrame(false); connect(editor, SIGNAL(editingFinished()), SLOT(returnPressed())); } - //editor->blockSignals(true); editor->setText(editTrack->name()); - //editor->blockSignals(false); - editor->end(false); + editor->selectAll(); editor->setGeometry(colx, coly, colw, colh); editMode = true; editor->show(); @@ -772,16 +752,21 @@ void TList::mouseDoubleClickEvent(QMouseEvent* ev) return; } - //if(t->type() != MusECore::Track::DRUM && t->type() != MusECore::Track::AUDIO_SOFTSYNTH) + // A disabled spinbox up or down button will pass the event to the parent! Causes pseudo 'wrapping'. Eat it up. + if(chan_edit && chan_edit->hasFocus()) + { + ev->accept(); + return; + } + else { editTrack=t; if (chan_edit==0) { chan_edit=new QSpinBox(this); + chan_edit->setFrame(false); chan_edit->setMinimum(1); - //connect(chan_edit, SIGNAL(valueChanged(int)), SLOT(chanValueChanged(int))); connect(chan_edit, SIGNAL(editingFinished()), SLOT(chanValueFinished())); } - //chan_edit->blockSignals(true); if (t->isMidiTrack()) { chan_edit->setMaximum(MIDI_CHANNELS); @@ -792,10 +777,10 @@ void TList::mouseDoubleClickEvent(QMouseEvent* ev) chan_edit->setMaximum(MAX_CHANNELS); chan_edit->setValue(((MusECore::AudioTrack*)editTrack)->channels()); } - //chan_edit->blockSignals(false); int w=colw; if (w < chan_edit->sizeHint().width()) w=chan_edit->sizeHint().width(); chan_edit->setGeometry(colx, coly, w, colh); + chan_edit->selectAll(); editMode = true; chan_edit->show(); chan_edit->setFocus(); @@ -855,13 +840,11 @@ void TList::portsPopupMenu(MusECore::Track* t, int x, int y) { MusECore::MidiTrack* track = (MusECore::MidiTrack*)t; - //QPopupMenu* p = MusECore::midiPortsPopup(0); MusECore::MidiDevice* md = 0; int potential_new_port_no=-1; int port = -1; if(t->type() == MusECore::Track::AUDIO_SOFTSYNTH) { - //MusECore::MidiDevice* md = dynamic_cast((MusECore::SynthI*)t); md = dynamic_cast(t); if(md) port = md->midiPort(); @@ -869,7 +852,7 @@ void TList::portsPopupMenu(MusECore::Track* t, int x, int y) else port = track->outPort(); - QMenu* p = MusECore::midiPortsPopup(this, port); // 0, port); + QMenu* p = MusECore::midiPortsPopup(this, port); if (t->isMidiTrack()) { @@ -1021,8 +1004,10 @@ void TList::portsPopupMenu(MusECore::Track* t, int x, int y) MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[potential_new_port_no], sdev); n=potential_new_port_no; + + MusEGlobal::song->update(); } - // Changed by T356. + // Changed by T356. DELETETHIS 5 //track->setOutPort(n); //MusEGlobal::audio->msgSetTrackOutPort(track, n); @@ -1035,27 +1020,23 @@ void TList::portsPopupMenu(MusECore::Track* t, int x, int y) if (!change) { // Delete all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(false); MusEGlobal::song->changeAllPortDrumCtrlEvents(false); track->setOutPort(n); for (int i=0; ioutPort(); // Add all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(true); MusEGlobal::song->changeAllPortDrumCtrlEvents(true); } else { - //MusEGlobal::audio->msgSetTrackOutPort(track, n); track->setOutPortAndUpdate(n); } MusEGlobal::audio->msgIdle(false); MusEGlobal::audio->msgUpdateSoloStates(); // (p4.0.14) p4.0.17 MusEGlobal::song->update(); } - else - if (t->type() == MusECore::Track::AUDIO_SOFTSYNTH) + else if (t->type() == MusECore::Track::AUDIO_SOFTSYNTH) { if(md != 0) { @@ -1066,17 +1047,14 @@ void TList::portsPopupMenu(MusECore::Track* t, int x, int y) MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[n], (MusEGlobal::midiPorts[n].device() == md) ? 0 : md); MusEGlobal::muse->changeConfig(true); // save configuration file - //MusEGlobal::audio->msgIdle(false); MusEGlobal::song->update(); } } else { MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutPort(track, n); track->setOutPortAndUpdate(n); MusEGlobal::audio->msgIdle(false); - //MusEGlobal::song->update(); MusEGlobal::audio->msgUpdateSoloStates(); // (p4.0.14) p4.0.17 MusEGlobal::song->update(SC_MIDI_TRACK_PROP); // } @@ -1103,22 +1081,13 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) MusECore::SynthI* synth = (MusECore::SynthI*)t; QMenu* p = new QMenu; - //QAction* act = p->addAction(tr("Show Gui")); QAction* gact = p->addAction(tr("show gui")); - //act->setCheckable(true); gact->setCheckable(true); - //printf("synth hasgui %d, gui visible %d\n",synth->hasGui(), synth->guiVisible()); - //act->setEnabled(synth->hasGui()); - //act->setChecked(synth->guiVisible()); gact->setEnabled(synth->hasGui()); gact->setChecked(synth->guiVisible()); QAction* nact = p->addAction(tr("show native gui")); - //act->setCheckable(true); nact->setCheckable(true); - //printf("synth hasgui %d, gui visible %d\n",synth->hasGui(), synth->guiVisible()); - //act->setEnabled(synth->hasGui()); - //act->setChecked(synth->guiVisible()); nact->setEnabled(synth->hasNativeGui()); nact->setChecked(synth->nativeGuiVisible()); @@ -1127,8 +1096,6 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) #ifdef DSSI_SUPPORT if(dynamic_cast(synth->sif())) { - //act->setChecked(false); - //act->setEnabled(false); nact->setChecked(false); nact->setEnabled(false); } @@ -1136,15 +1103,12 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) #endif QAction* ract = p->exec(mapToGlobal(QPoint(x, y)), 0); - //if (ract == act) { if (ract == gact) { bool show = !synth->guiVisible(); - //MusEGlobal::audio->msgShowInstrumentGui(synth, show); synth->showGui(show); } else if (ract == nact) { bool show = !synth->nativeGuiVisible(); - //MusEGlobal::audio->msgShowInstrumentNativeGui(synth, show); synth->showNativeGui(show); } delete p; @@ -1158,19 +1122,13 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) MusECore::MidiPort* port = &MusEGlobal::midiPorts[oPort]; QMenu* p = new QMenu; - //QAction* act = p->addAction(tr("Show Gui")); QAction* gact = p->addAction(tr("show gui")); - //act->setCheckable(true); gact->setCheckable(true); - //printf("synth hasgui %d, gui visible %d\n",port->hasGui(), port->guiVisible()); - //act->setEnabled(port->hasGui()); - //act->setChecked(port->guiVisible()); gact->setEnabled(port->hasGui()); gact->setChecked(port->guiVisible()); QAction* nact = p->addAction(tr("show native gui")); nact->setCheckable(true); - //printf("synth hasgui %d, gui visible %d\n",synth->hasGui(), synth->guiVisible()); nact->setEnabled(port->hasNativeGui()); nact->setChecked(port->nativeGuiVisible()); @@ -1180,8 +1138,6 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) MusECore::MidiDevice* dev = port->device(); if(dev && dev->isSynti() && (dynamic_cast(((MusECore::SynthI*)dev)->sif()))) { - //act->setChecked(false); - //act->setEnabled(false); nact->setChecked(false); nact->setEnabled(false); } @@ -1189,15 +1145,12 @@ void TList::oportPropertyPopupMenu(MusECore::Track* t, int x, int y) #endif QAction* ract = p->exec(mapToGlobal(QPoint(x, y)), 0); - //if (ract == act) { if (ract == gact) { bool show = !port->guiVisible(); - //MusEGlobal::audio->msgShowInstrumentGui(port->instrument(), show); port->instrument()->showGui(show); } else if (ract == nact) { bool show = !port->nativeGuiVisible(); - //MusEGlobal::audio->msgShowInstrumentNativeGui(port->instrument(), show); port->instrument()->showNativeGui(show); } delete p; @@ -1219,16 +1172,14 @@ void TList::tracklistChanged() void TList::keyPressEvent(QKeyEvent* e) { + if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) + { + e->accept(); + return; + } + if (editMode) { - // First time we get a keypress event when lineedit is open is on the return key: - // -- Not true for Qt4. Modifier keys also send key events - Orcan - //if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) // Removed p4.0.46 Tim. - // { - // returnPressed(); - // return; - // } - //else if ( e->key() == Qt::Key_Escape ) { if(editor && editor->isVisible()) @@ -1254,6 +1205,7 @@ void TList::keyPressEvent(QKeyEvent* e) setFocus(); return; } + return; } else if (!editJustFinished) { @@ -1263,24 +1215,24 @@ void TList::keyPressEvent(QKeyEvent* e) editJustFinished=false; - // p4.0.10 Removed by Tim. keyPressExt are sent to part canvas, where they are - // ignored *only* if necessary. - //e->ignore(); - + // Works OK (if focusing allowed). But instead we won't allow focus. Part canvas has Ctrl+up/down which moves selected track only. /* int key = e->key(); switch (key) { - case Key_Up: + case Qt::Key_Up: moveSelection(-1); - break; - case Key_Down: + return; + case Qt::Key_Down: moveSelection(1); - break; + return; default: - break; - } - */ + } */ + + // keyPressExt are sent to part canvas, where they are ignored *only* if necessary. + //e->ignore(); + + emit keyPressExt(e); //redirect keypress events to main app } //--------------------------------------------------------- @@ -1302,7 +1254,6 @@ void TList::moveSelection(int n) for (MusECore::iTrack t = tracks->begin(); t != tracks->end(); ++t) { MusECore::iTrack s = t; if ((*t)->selected()) { - selTrack = *t; if (n > 0) { while (n--) { ++t; @@ -1313,7 +1264,10 @@ void TList::moveSelection(int n) // skip over hidden tracks if (!(*t)->isVisible()) { n++; + continue; } + selTrack = *t; + break; } } else { @@ -1324,40 +1278,42 @@ void TList::moveSelection(int n) // skip over hidden tracks if (!(*t)->isVisible()) { n--; + continue; } + selTrack = *t; + break; } } - (*s)->setSelected(false); - (*t)->setSelected(true); - - // rec enable track if expected - MusECore::TrackList recd = getRecEnabledTracks(); - if (recd.size() == 1 && MusEGlobal::config.moveArmedCheckBox) { // one rec enabled track, move rec enabled with selection - MusEGlobal::song->setRecordFlag((MusECore::Track*)recd.front(),false); - MusEGlobal::song->setRecordFlag((*t),true); - } + if(selTrack) + { + (*s)->setSelected(false); + selTrack->setSelected(true); + + // rec enable track if expected + MusECore::TrackList recd = getRecEnabledTracks(); + if (recd.size() == 1 && MusEGlobal::config.moveArmedCheckBox) { // one rec enabled track, move rec enabled with selection + MusEGlobal::song->setRecordFlag((MusECore::Track*)recd.front(),false); + MusEGlobal::song->setRecordFlag((selTrack),true); + } - if (editTrack && editTrack != *t) - returnPressed(); - - redraw(); - break; + if (editTrack && editTrack != selTrack) + returnPressed(); + redraw(); } + break; + } } - ///emit selectionChanged(); - emit selectionChanged(selTrack); + if(selTrack) + emit selectionChanged(selTrack); } MusECore::TrackList TList::getRecEnabledTracks() { - //printf("getRecEnabledTracks\n"); MusECore::TrackList recEnabled; MusECore::TrackList* tracks = MusEGlobal::song->tracks(); for (MusECore::iTrack t = tracks->begin(); t != tracks->end(); ++t) { - if ((*t)->recordFlag()) { - //printf("rec enabled track\n"); + if ((*t)->recordFlag()) recEnabled.push_back(*t); - } } return recEnabled; } @@ -1368,7 +1324,6 @@ MusECore::TrackList TList::getRecEnabledTracks() void TList::changeAutomation(QAction* act) { - //printf("changeAutomation %d\n", act->data().toInt()); if ( (editAutomation->type() == MusECore::Track::MIDI) || (editAutomation->type() == MusECore::Track::DRUM) || (editAutomation->type() == MusECore::Track::NEW_DRUM) ) { printf("this is wrong, we can't edit automation for midi tracks from arranger yet!\n"); return; @@ -1407,8 +1362,6 @@ void TList::changeAutomationColor(QAction* act) // one of these days I'll rewrite this so it's understandable // this is just to get it up and running... - //printf("change automation color %d %d\n", id, colindex); - MusECore::CtrlListList* cll = ((MusECore::AudioTrack*)editAutomation)->controller(); for(MusECore::CtrlListList::iterator icll =cll->begin();icll!=cll->end();++icll) { MusECore::CtrlList *cl = icll->second; @@ -1421,12 +1374,9 @@ void TList::changeAutomationColor(QAction* act) //--------------------------------------------------------- // colorMenu //--------------------------------------------------------- -//QMenu* TList::colorMenu(QColor c, int id) PopupMenu* TList::colorMenu(QColor c, int id, QWidget* parent) { - //QMenu * m = new QMenu(this); - //PopupMenu * m = new PopupMenu(this); //, true); TODO - PopupMenu * m = new PopupMenu(parent); //, true); // + PopupMenu * m = new PopupMenu(parent); //, true); //TODO for (int i = 0; i< 6; i++) { QPixmap pix(10,10); QPainter p(&pix); @@ -1490,7 +1440,7 @@ void TList::mousePressEvent(QMouseEvent* ev) //delete synp; delete p; } - /*else if (button == Qt::LeftButton) { + /*else if (button == Qt::LeftButton) { DELETETHIS if (!ctrl) { MusEGlobal::song->deselectTracks(); @@ -1514,7 +1464,7 @@ void TList::mousePressEvent(QMouseEvent* ev) ty += h; if (y >= (ty-2)) { - if ( (*it) == tracks->back() && y > ty ) { + if ( (*it) == tracks->back() && y > ty ) { // DELETETHIS, only retain if(foo) break;? //printf("tracks->back() && y > ty\n"); } else if ( y > (ty+2) ) { @@ -1527,7 +1477,7 @@ void TList::mousePressEvent(QMouseEvent* ev) } - //&& y < (ty)) + //&& y < (ty)) DELETETHIS // break; } } @@ -1578,7 +1528,6 @@ void TList::mousePressEvent(QMouseEvent* ev) QAction* act = 0; for(MusECore::CtrlListList::iterator icll =cll->begin();icll!=cll->end();++icll) { MusECore::CtrlList *cl = icll->second; - //printf("id = %d", cl->id()); if (cl->dontShow()) continue; act = p->addAction(cl->name()); @@ -1587,8 +1536,6 @@ void TList::mousePressEvent(QMouseEvent* ev) int data = cl->id() * 256; // shift 8 bits data += 150; // illegal color > 100 act->setData(data); - //QMenu *m = colorMenu(cl->color(), cl->id()); - //PopupMenu *m = colorMenu(cl->color(), cl->id()); PopupMenu *m = colorMenu(cl->color(), cl->id(), p); act->setMenu(m); } @@ -1649,7 +1596,7 @@ void TList::mousePressEvent(QMouseEvent* ev) classesPopupMenu(t, x, t->y() - ypos); break; case COL_OPORT: - // Changed by Tim. p3.3.9 + // Changed by Tim. p3.3.9 DELETETHIS 15 // Reverted. if (button == Qt::LeftButton) portsPopupMenu(t, x, t->y() - ypos); @@ -1703,13 +1650,11 @@ void TList::mousePressEvent(QMouseEvent* ev) t->setSelected(!t->selected()); if (editTrack && editTrack != t) returnPressed(); - ///emit selectionChanged(); emit selectionChanged(t->selected() ? t : 0); } else if (button == Qt::RightButton) { mode = NORMAL; QMenu* p = new QMenu; - //p->clear(); // Leave room for normal track IDs - base these at AUDIO_SOFTSYNTH. p->addAction(QIcon(*automation_clear_dataIcon), tr("Delete Track"))->setData(1001); p->addAction(QIcon(*track_commentIcon), tr("Track Comment"))->setData(1002); @@ -1753,7 +1698,6 @@ void TList::mousePressEvent(QMouseEvent* ev) { TrackComment* tc = new TrackComment(t, 0); tc->show(); - //QToolTip::add( this, "FOOOOOOOOOOOOO" ); } break; @@ -1845,16 +1789,14 @@ void TList::mousePressEvent(QMouseEvent* ev) channel = MIDI_CHANNELS - 1; if(channel < 0) channel = 0; - //if (channel != ((MusECore::MidiTrack*)t)->outChannel()) if (channel != mt->outChannel()) { // Changed by T356. - //mt->setOutChannel(channel); MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutChannel(mt, channel); mt->setOutChanAndUpdate(channel); MusEGlobal::audio->msgIdle(false); + // DELETETHIS 15? /* --- I really don't like this, you can mess up the whole map "as easy as dell" if (mt->type() == MusECore::MidiTrack::DRUM) {//Change channel on all drum instruments for (int i=0; iheight(); ty += h; if (y >= (ty-2)) { - if ( (*it) == tracks->back() && y >= ty ) { + if ( (*it) == tracks->back() && y >= ty ) { // DELETETHIS and cleanup // outside last track don't change to splitVCursor } else if ( y > (ty+2) ) { @@ -2267,7 +2209,7 @@ void TList::mouseReleaseEvent(QMouseEvent* ev) if (editTrack && editor && editor->isVisible()) editor->setFocus(); //else // DELETETHIS or add the same for ctrl_edit! - //if (editTrack && chan_edit && chan_edit->isVisible()) // p4.0.46 + //if (editTrack && chan_edit && chan_edit->isVisible()) // p4.0.46 DELETETHIS? // chan_edit->setFocus(); adjustScrollbar(); } @@ -2329,15 +2271,11 @@ void TList::wheelEvent(QWheelEvent* ev) else if (port < 0) port = 0; if (port != ((MusECore::MidiTrack*)t)->outPort()) { - // Changed by T356. - //mt->setOutPort(port); MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutPort(mt, port); mt->setOutPortAndUpdate(port); MusEGlobal::audio->msgIdle(false); MusEGlobal::audio->msgUpdateSoloStates(); // p4.0.14 - //MusEGlobal::song->update(SC_ROUTE); MusEGlobal::song->update(SC_MIDI_TRACK_PROP); // p4.0.17 } } @@ -2356,10 +2294,7 @@ void TList::wheelEvent(QWheelEvent* ev) else if (channel < 0) channel = 0; if (channel != ((MusECore::MidiTrack*)t)->outChannel()) { - // Changed by T356. - //mt->setOutChannel(channel); MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutChannel(mt, channel); mt->setOutChanAndUpdate(channel); MusEGlobal::audio->msgIdle(false); @@ -2472,15 +2407,6 @@ void TList::setYPos(int y) scroll(0, delta); } -//--------------------------------------------------------- -// resizeEvent -//--------------------------------------------------------- - -//void TList::resizeEvent(QResizeEvent* /*ev*/) -// { -// -// } - //--------------------------------------------------------- // classesPopupMenu //--------------------------------------------------------- @@ -2514,7 +2440,7 @@ void TList::classesPopupMenu(MusECore::Track* t, int x, int y) int pitch = ev.pitch(); // Changed by T356. // Tested: Notes were being mixed up switching back and forth between midi and drum. - //pitch = MusEGlobal::drumMap[pitch].anote; + //pitch = MusEGlobal::drumMap[pitch].anote; DELETETHIS pitch = MusEGlobal::drumMap[pitch].enote; ev.setPitch(pitch); @@ -2546,7 +2472,6 @@ void TList::classesPopupMenu(MusECore::Track* t, int x, int y) MusEGlobal::audio->msgIdle(true); // Delete all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(false); MusEGlobal::song->changeAllPortDrumCtrlEvents(false); if (!change) { @@ -2557,7 +2482,6 @@ void TList::classesPopupMenu(MusECore::Track* t, int x, int y) } } - //MusEGlobal::audio->msgIdle(true); MusECore::PartList* pl = t->parts(); MusECore::MidiTrack* m = (MusECore::MidiTrack*) t; for (MusECore::iPart ip = pl->begin(); ip != pl->end(); ++ip) { @@ -2589,7 +2513,6 @@ void TList::classesPopupMenu(MusECore::Track* t, int x, int y) t->setType(MusECore::Track::DRUM); // Add all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(true); MusEGlobal::song->changeAllPortDrumCtrlEvents(true); MusEGlobal::audio->msgIdle(false); MusEGlobal::song->update(SC_EVENT_MODIFIED); diff --git a/muse2/muse/arranger/tlist.h b/muse2/muse/arranger/tlist.h index a113d221..ae50058a 100644 --- a/muse2/muse/arranger/tlist.h +++ b/muse2/muse/arranger/tlist.h @@ -33,10 +33,8 @@ class QLineEdit; class QSpinBox; class QMouseEvent; class QPaintEvent; -class QResizeEvent; class QScrollBar; class QWheelEvent; -//class QMenu; namespace MusECore { class Track; @@ -107,18 +105,15 @@ class TList : public QWidget { void moveSelection(int n); void adjustScrollbar(); void paint(const QRect& r); - //virtual void resizeEvent(QResizeEvent*); void redraw(const QRect& r); MusECore::Track* y2Track(int) const; void classesPopupMenu(MusECore::Track*, int x, int y); MusECore::TrackList getRecEnabledTracks(); void setHeaderToolTips(); - //QMenu* colorMenu(QColor c, int id); PopupMenu* colorMenu(QColor c, int id, QWidget* parent); private slots: void returnPressed(); - void chanValueChanged(int); void chanValueFinished(); void ctrlValueFinished(); void instrPopupActivated(QAction*); @@ -130,7 +125,6 @@ class TList : public QWidget { void copyTrackDrummap(MusECore::MidiTrack*, bool full); signals: - ///void selectionChanged(); void selectionChanged(MusECore::Track*); void keyPressExt(QKeyEvent*); void redirectWheelEvent(QWheelEvent*); diff --git a/muse2/muse/audio.cpp b/muse2/muse/audio.cpp index 3f1d4dc8..80bffafe 100644 --- a/muse2/muse/audio.cpp +++ b/muse2/muse/audio.cpp @@ -63,11 +63,11 @@ void initAudio() extern double curTime(); -//static const unsigned char mmcDeferredPlayMsg[] = { 0x7f, 0x7f, 0x06, 0x03 }; +//static const unsigned char mmcDeferredPlayMsg[] = { 0x7f, 0x7f, 0x06, 0x03 }; DELETETHIS 2 //static const unsigned char mmcStopMsg[] = { 0x7f, 0x7f, 0x06, 0x01 }; const char* seqMsgList[] = { - "SEQM_ADD_TRACK", "SEQM_REMOVE_TRACK", //"SEQM_CHANGE_TRACK", + "SEQM_ADD_TRACK", "SEQM_REMOVE_TRACK", //"SEQM_CHANGE_TRACK", DELETETHIS "SEQM_MOVE_TRACK", "SEQM_ADD_PART", "SEQM_REMOVE_PART", "SEQM_CHANGE_PART", "SEQM_ADD_EVENT", "SEQM_REMOVE_EVENT", "SEQM_CHANGE_EVENT", @@ -87,15 +87,15 @@ const char* seqMsgList[] = { "SEQM_SCAN_ALSA_MIDI_PORTS", "SEQM_SET_AUX", "SEQM_UPDATE_SOLO_STATES", - //"MIDI_SHOW_INSTR_GUI", - //"MIDI_SHOW_INSTR_NATIVE_GUI", + //"MIDI_SHOW_INSTR_GUI", DELETETHIS + //"MIDI_SHOW_INSTR_NATIVE_GUI", DELETETHIS "AUDIO_RECORD", "AUDIO_ROUTEADD", "AUDIO_ROUTEREMOVE", "AUDIO_REMOVEROUTES", - //"AUDIO_VOL", "AUDIO_PAN", + //"AUDIO_VOL", "AUDIO_PAN", DELETETHIS "AUDIO_ADDPLUGIN", "AUDIO_SET_SEG_SIZE", "AUDIO_SET_PREFADER", "AUDIO_SET_CHANNELS", - //"AUDIO_SET_PLUGIN_CTRL_VAL", + //"AUDIO_SET_PLUGIN_CTRL_VAL", DELETETHIS "AUDIO_SWAP_CONTROLLER_IDX", "AUDIO_CLEAR_CONTROLLER_EVENTS", "AUDIO_SEEK_PREV_AC_EVENT", @@ -125,7 +125,6 @@ Audio::Audio() idle = false; _freewheel = false; _bounce = false; - //loopPassed = false; _loopFrame = 0; _loopCount = 0; @@ -145,8 +144,6 @@ Audio::Audio() state = STOP; msg = 0; - //startRecordPos.setType(Pos::TICKS); - //endRecordPos.setType(Pos::TICKS); startRecordPos.setType(Pos::FRAMES); // Tim endRecordPos.setType(Pos::FRAMES); @@ -189,22 +186,16 @@ extern bool initJackAudio(); bool Audio::start() { - //process(MusEGlobal::segmentSize); // warm up caches state = STOP; _loopCount = 0; MusEGlobal::muse->setHeartBeat(); - if (MusEGlobal::audioDevice) { - //_running = true; - //MusEGlobal::audioDevice->start(); - } - else { - if(false == initJackAudio()) { - //_running = true; + if (!MusEGlobal::audioDevice) { + if(initJackAudio() == false) { InputList* itl = MusEGlobal::song->inputs(); for (iAudioInput i = itl->begin(); i != itl->end(); ++i) { - //printf("reconnecting input %s\n", (*i)->name().ascii()); + if (MusEGlobal::debugMsg) printf("reconnecting input %s\n", (*i)->name().toAscii().data()); for (int x=0; x < (*i)->channels();x++) (*i)->setJackPort(x,0); (*i)->setName((*i)->name()); // restore jack connection @@ -212,13 +203,12 @@ bool Audio::start() OutputList* otl = MusEGlobal::song->outputs(); for (iAudioOutput i = otl->begin(); i != otl->end(); ++i) { - //printf("reconnecting output %s\n", (*i)->name().ascii()); + if (MusEGlobal::debugMsg) printf("reconnecting output %s\n", (*i)->name().toAscii().data()); for (int x=0; x < (*i)->channels();x++) (*i)->setJackPort(x,0); - //printf("name=%s\n",(*i)->name().toLatin1()); + if (MusEGlobal::debugMsg) printf("name=%s\n",(*i)->name().toAscii().data()); (*i)->setName((*i)->name()); // restore jack connection } - //MusEGlobal::audioDevice->start(); } else { printf("Failed to init audio!\n"); @@ -235,7 +225,6 @@ bool Audio::start() MusEGlobal::audioDevice->stopTransport(); - //MusEGlobal::audioDevice->seekTransport(MusEGlobal::song->cPos().frame()); MusEGlobal::audioDevice->seekTransport(MusEGlobal::song->cPos()); return true; @@ -260,12 +249,14 @@ void Audio::stop(bool) bool Audio::sync(int jackState, unsigned frame) { + //printf("Audio::sync: state:%d jackState:%d\n", state, jackState); + bool done = true; if (state == LOOP1) state = LOOP2; else { State s = State(jackState); - // + // STOP -> START_PLAY start rolling // STOP -> STOP seek in stop state // PLAY -> START_PLAY seek in play state @@ -273,10 +264,10 @@ bool Audio::sync(int jackState, unsigned frame) if (state != START_PLAY) { Pos p(frame, false); seek(p); - if (!_freewheel) + if (!_freewheel) done = MusEGlobal::audioPrefetch->seekDone(); if (s == START_PLAY) - state = START_PLAY; + state = START_PLAY; } else { if (frame != _pos.frame()) { @@ -286,6 +277,7 @@ bool Audio::sync(int jackState, unsigned frame) done = MusEGlobal::audioPrefetch->seekDone(); } } + //printf("Audio::sync: done:%d\n", done); return done; } @@ -296,7 +288,6 @@ bool Audio::sync(int jackState, unsigned frame) void Audio::setFreewheel(bool val) { -// printf("JACK: freewheel callback %d\n", val); _freewheel = val; } @@ -319,9 +310,6 @@ void Audio::shutdown() void Audio::process(unsigned frames) { -// extern int watchAudio; -// ++watchAudio; // make a simple watchdog happy. Disabled. - if (!MusEGlobal::checkAudioDevice()) return; if (msg) { processMsg(msg); @@ -360,16 +348,6 @@ void Audio::process(unsigned frames) startRolling(); } else if (isPlaying() && jackState == STOP) { - // Make sure to stop bounce and freewheel mode, for example if user presses stop - // in QJackCtl before right-hand marker is reached (which is handled below). p3.3.43 - //printf("Audio::process isPlaying() && jackState == STOP\n"); - //if (_bounce) - //{ - //printf(" stopping bounce...\n"); - // _bounce = false; - // write(sigFd, "F", 1); - //} - stopRolling(); } else if (state == START_PLAY && jackState == STOP) { @@ -393,7 +371,7 @@ void Audio::process(unsigned frames) printf("JACK: state transition %s -> %s ?\n", audioStates[state], audioStates[jackState]); -// printf("p %s %s %d\n", audioStates[jackState], audioStates[state], _pos.frame()); + // printf("p %s %s %d\n", audioStates[jackState], audioStates[state], _pos.frame()); // // clear aux send buffers @@ -428,8 +406,9 @@ void Audio::process(unsigned frames) && !(MusEGlobal::song->record() || _bounce || MusEGlobal::song->loop())) { - //if(MusEGlobal::debugMsg) - // printf("Audio::process curTickPos >= MusEGlobal::song->len\n"); + + if(MusEGlobal::debugMsg) + printf("Audio::process curTickPos >= MusEGlobal::song->len\n"); MusEGlobal::audioDevice->stopTransport(); return; @@ -456,7 +435,6 @@ void Audio::process(unsigned frames) for (int ch = 0; ch < MIDI_CHANNELS; ++ch) { if (mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) { if (mp->device()!=NULL) { - //printf("send clear sustain!!!!!!!! port %d ch %d\n", i,ch); MidiPlayEvent ev(0, i, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); // may cause problems, called from audio thread mp->device()->putEvent(ev); @@ -465,10 +443,8 @@ void Audio::process(unsigned frames) } } - //MusEGlobal::audioDevice->seekTransport(_loopFrame); Pos lp(_loopFrame, false); MusEGlobal::audioDevice->seekTransport(lp); -// printf(" process: seek to %d, end %d\n", _loopFrame, loop.frame()); } } @@ -493,8 +469,6 @@ void Audio::process(unsigned frames) syncTime = curTime(); frameOffset = syncFrame - samplePos; - //printf("Audio::process calling process1:\n"); - process1(samplePos, offset, frames); for (iAudioOutput i = ol->begin(); i != ol->end(); ++i) (*i)->processWrite(); @@ -513,8 +487,6 @@ void Audio::process1(unsigned samplePos, unsigned offset, unsigned frames) if (MusEGlobal::midiSeqRunning) { processMidi(); } - //MusEGlobal::midiSeq->msgProcess(); - // // process not connected tracks // to animate meter display @@ -553,14 +525,14 @@ void Audio::process1(unsigned samplePos, unsigned offset, unsigned frames) track = (AudioTrack*)(*it); if(!track->processed() && track->type() == Track::AUDIO_AUX) { - //printf("Audio::process1 Do aux: track:%s\n", track->name().toLatin1().constData()); + //printf("Audio::process1 Do aux: track:%s\n", track->name().toLatin1().constData()); DELETETHIS channels = track->channels(); // Just a dummy buffer. float* buffer[channels]; float data[frames * channels]; for (int i = 0; i < channels; ++i) buffer[i] = data + i * frames; - //printf("Audio::process1 calling track->copyData for track:%s\n", track->name().toLatin1()); + //printf("Audio::process1 calling track->copyData for track:%s\n", track->name().toLatin1()); DELETETHIS track->copyData(samplePos, channels, -1, -1, frames, buffer); } } @@ -580,20 +552,16 @@ void Audio::process1(unsigned samplePos, unsigned offset, unsigned frames) if((*it)->isMidiTrack()) continue; track = (AudioTrack*)(*it); - // Ignore unprocessed tracks which have an output route, because they will be processed by - // whatever track(s) they are routed to. - //if(!track->processed() && track->noOutRoute() && (track->type() != Track::AUDIO_OUTPUT)) - // No, do all. if(!track->processed() && (track->type() != Track::AUDIO_OUTPUT)) { - //printf("Audio::process1 track:%s\n", track->name().toLatin1().constData()); + //printf("Audio::process1 track:%s\n", track->name().toLatin1().constData()); DELETETHIS channels = track->channels(); // Just a dummy buffer. float* buffer[channels]; float data[frames * channels]; for (int i = 0; i < channels; ++i) buffer[i] = data + i * frames; - //printf("Audio::process1 calling track->copyData for track:%s\n", track->name().toLatin1()); + //printf("Audio::process1 calling track->copyData for track:%s\n", track->name().toLatin1()); DELETETHIS track->copyData(samplePos, channels, -1, -1, frames, buffer); } } @@ -618,12 +586,6 @@ void Audio::processMsg(AudioMsg* msg) case AUDIO_REMOVEROUTES: removeAllRoutes(msg->sroute, msg->droute); break; - //case AUDIO_VOL: - // msg->snode->setVolume(msg->dval); - // break; - //case AUDIO_PAN: - // msg->snode->setPan(msg->dval); - // break; case SEQM_SET_AUX: msg->snode->setAuxSend(msg->ival, msg->dval); break; @@ -636,10 +598,6 @@ void Audio::processMsg(AudioMsg* msg) case AUDIO_ADDPLUGIN: msg->snode->addPlugin(msg->plugin, msg->ival); break; - //case AUDIO_SET_PLUGIN_CTRL_VAL: - //msg->plugin->track()->setPluginCtrlVal(msg->ival, msg->dval); - // msg->snode->setPluginCtrlVal(msg->ival, msg->dval); - // break; case AUDIO_SWAP_CONTROLLER_IDX: msg->snode->swapControllerIDX(msg->a, msg->b); break; @@ -675,7 +633,7 @@ void Audio::processMsg(AudioMsg* msg) case AUDIO_SET_SEG_SIZE: MusEGlobal::segmentSize = msg->ival; MusEGlobal::sampleRate = msg->iival; -#if 0 //TODO +#if 0 //TODO or DELETETHIS ? audioOutput.MusEGlobal::segmentSizeChanged(); for (int i = 0; i < mixerGroups; ++i) audioGroups[i].MusEGlobal::segmentSizeChanged(); @@ -685,7 +643,6 @@ void Audio::processMsg(AudioMsg* msg) break; case SEQM_RESET_DEVICES: - //printf("Audio::processMsg SEQM_RESET_DEVICES\n"); for (int i = 0; i < MIDI_PORTS; ++i) { if(MusEGlobal::midiPorts[i].device()) @@ -723,6 +680,7 @@ void Audio::processMsg(AudioMsg* msg) case SEQM_SCAN_ALSA_MIDI_PORTS: alsaScanMidiPorts(); break; + //DELETETHIS 6 //case MIDI_SHOW_INSTR_GUI: // MusEGlobal::midiSeq->msgUpdatePollFd(); // break; @@ -743,6 +701,7 @@ void Audio::processMsg(AudioMsg* msg) frameOffset = syncFrame - samplePos; } break; + // DELETETHIS 6 //case SEQM_ADD_TRACK: //case SEQM_REMOVE_TRACK: //case SEQM_CHANGE_TRACK: @@ -780,23 +739,27 @@ void Audio::seek(const Pos& p) printf("Audio::seek already there\n"); return; } - //printf("Audio::seek frame:%d\n", p.frame()); + if (MusEGlobal::heavyDebugMsg) + printf("Audio::seek frame:%d\n", p.frame()); + _pos = p; if (!MusEGlobal::checkAudioDevice()) return; syncFrame = MusEGlobal::audioDevice->framePos(); frameOffset = syncFrame - _pos.frame(); curTickPos = _pos.tick(); - if (curTickPos == 0 && !MusEGlobal::song->record()) +// ALSA support +#if 1 + MusEGlobal::midiSeq->msgSeek(); // handle stuck notes and set controller for new position +#else + if (curTickPos == 0 && !MusEGlobal::song->record()) // Moved here from MidiSeq::processStop() MusEGlobal::audio->initDevices(); - for(iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) (*i)->handleSeek(); +#endif - //loopPassed = true; // for record loop mode if (state != LOOP2 && !freewheel()) { - //MusEGlobal::audioPrefetch->msgSeek(_pos.frame()); // We need to force prefetch to update, to ensure the most recent data. // Things can happen to a part before play is pressed - such as part muting, // part moving etc. Without a force, the wrong data was being played. Tim 08/17/08 @@ -863,11 +826,6 @@ void Audio::startRolling() if(!dev) continue; - // Shall we check open flags? - //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) - //if(!(dev->openFlags() & 1)) - // continue; - MidiSyncInfo& si = mp->syncInfo(); if(si.MMCOut()) @@ -887,7 +845,8 @@ void Audio::startRolling() && MusEGlobal::song->click() && !MusEGlobal::extSyncFlag.value() && MusEGlobal::song->record()) { -#if 0 +// DELETETHIS 14 or keep? +/* state = PRECOUNT; int z, n; if (precountFromMastertrackFlag) @@ -899,7 +858,7 @@ void Audio::startRolling() clickno = z * preMeasures; clicksMeasure = z; ticksBeat = (division * 4)/n; -#endif +*/ } else { // @@ -919,15 +878,12 @@ void Audio::startRolling() for (int ch = 0; ch < MIDI_CHANNELS; ++ch) { if (mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) { if(mp->device() != NULL) { - //printf("send enable sustain!!!!!!!! port %d ch %d\n", i,ch); MidiPlayEvent ev(0, i, ch, ME_CONTROLLER, CTRL_SUSTAIN, 127); - mp->device()->addScheduledEvent(ev); // TODO: Not working? Try putEvent + mp->device()->putEvent(ev); } } } } - - //tempomap.clearExtTempoList(); } //--------------------------------------------------------- @@ -936,19 +892,23 @@ void Audio::startRolling() void Audio::stopRolling() { - //if(MusEGlobal::debugMsg) - // printf("Audio::stopRolling state %s\n", audioStates[state]); + if (MusEGlobal::debugMsg) + printf("Audio::stopRolling state %s\n", audioStates[state]); state = STOP; - MusEGlobal::midiSeq->setExternalPlayState(false); // not playing Moved here from MidiSeq::processStop() p4.0.34 - +// ALSA support +#if 1 + MusEGlobal::midiSeq->msgStop(); +#else + MusEGlobal::midiSeq->setExternalPlayState(false); // not playing Moved here from MidiSeq::processStop() for(iMidiDevice id = MusEGlobal::midiDevices.begin(); id != MusEGlobal::midiDevices.end(); ++id) { MidiDevice* md = *id; md->handleStop(); } - +#endif + WaveTrackList* tracks = MusEGlobal::song->waves(); for (iWaveTrack i = tracks->begin(); i != tracks->end(); ++i) { WaveTrack* track = *i; @@ -985,9 +945,7 @@ void Audio::recordStop() // MusEGlobal::song->setRecordFlag knows about it... track->setRecFile(0); // flush out the old file - MusEGlobal::song->setRecordFlag(track, false); // - //track->setRecordFlag1(true); // and re-arm the track here - //MusEGlobal::song->setRecordFlag(track, true); // here + MusEGlobal::song->setRecordFlag(track, false); } } MidiTrackList* ml = MusEGlobal::song->midis(); @@ -1000,7 +958,6 @@ void Audio::recordStop() // resolve NoteOff events, Controller etc. //--------------------------------------------------- - //buildMidiEventList(el, mpel, mt, MusEGlobal::config.division, true); // Do SysexMeta. Do loops. buildMidiEventList(el, mpel, mt, MusEGlobal::config.division, true, true); MusEGlobal::song->cmdAddRecordedEvents(mt, el, startRecordPos.tick()); diff --git a/muse2/muse/audio.h b/muse2/muse/audio.h index a81498a6..723c378c 100644 --- a/muse2/muse/audio.h +++ b/muse2/muse/audio.h @@ -55,7 +55,7 @@ class Track; //--------------------------------------------------------- enum { - SEQM_ADD_TRACK, SEQM_REMOVE_TRACK, //SEQM_CHANGE_TRACK, + SEQM_ADD_TRACK, SEQM_REMOVE_TRACK, //SEQM_CHANGE_TRACK, DELETETHIS SEQM_MOVE_TRACK, SEQM_ADD_PART, SEQM_REMOVE_PART, SEQM_CHANGE_PART, SEQM_ADD_EVENT, SEQM_REMOVE_EVENT, SEQM_CHANGE_EVENT, @@ -76,15 +76,15 @@ enum { SEQM_SCAN_ALSA_MIDI_PORTS, SEQM_SET_AUX, SEQM_UPDATE_SOLO_STATES, - //MIDI_SHOW_INSTR_GUI, - //MIDI_SHOW_INSTR_NATIVE_GUI, + //MIDI_SHOW_INSTR_GUI, DELETETHIS + //MIDI_SHOW_INSTR_NATIVE_GUI, DELETETHIS AUDIO_RECORD, AUDIO_ROUTEADD, AUDIO_ROUTEREMOVE, AUDIO_REMOVEROUTES, - //AUDIO_VOL, AUDIO_PAN, + //AUDIO_VOL, AUDIO_PAN, DELETETHIS AUDIO_ADDPLUGIN, AUDIO_SET_SEG_SIZE, AUDIO_SET_PREFADER, AUDIO_SET_CHANNELS, - //AUDIO_SET_PLUGIN_CTRL_VAL, + //AUDIO_SET_PLUGIN_CTRL_VAL, DELETETHIS AUDIO_SWAP_CONTROLLER_IDX, AUDIO_CLEAR_CONTROLLER_EVENTS, AUDIO_SEEK_PREV_AC_EVENT, @@ -167,14 +167,13 @@ class Audio { int fromThreadFdw, fromThreadFdr; // message pipe int sigFd; // pipe fd for messages to gui - //QSocketNotifier* _socketNotifier; int sigFdr; // record values: Pos startRecordPos; Pos endRecordPos; - // + AudioOutput* _audioMaster; AudioOutput* _audioMonitor; @@ -208,6 +207,7 @@ class Audio { void stop(bool); void seek(const Pos& pos); + bool isStarting() const { return state == START_PLAY; } bool isPlaying() const { return state == PLAY || state == LOOP1 || state == LOOP2; } bool isRecording() const { return state == PLAY && recording; } void setRunning(bool val) { _running = val; } @@ -222,7 +222,7 @@ class Audio { void msgRemoveTrack(Track*, bool u = true); void msgRemoveTracks(); - //void msgChangeTrack(Track* oldTrack, Track* newTrack, bool u = true); + //void msgChangeTrack(Track* oldTrack, Track* newTrack, bool u = true); DELETETHIS void msgMoveTrack(int idx1, int dx2, bool u = true); void msgAddPart(Part*, bool u = true); void msgRemovePart(Part*, bool u = true); @@ -241,8 +241,8 @@ class Audio { void msgRemoveSig(int tick, int z, int n, bool doUndoFlag = true); void msgAddKey(int tick, int key, bool doUndoFlag = true); void msgRemoveKey(int tick, int key, bool doUndoFlag = true); - //void msgShowInstrumentGui(MidiInstrument*, bool); - //void msgShowInstrumentNativeGui(MidiInstrument*, bool); + //void msgShowInstrumentGui(MidiInstrument*, bool); DELETETHIS + //void msgShowInstrumentNativeGui(MidiInstrument*, bool); DELETETHIS void msgPanic(); void sendMsg(AudioMsg*); bool sendMessage(AudioMsg* m, bool doUndo); @@ -254,8 +254,8 @@ class Audio { void msgAddRoute1(Route, Route); void msgAddPlugin(AudioTrack*, int idx, PluginI* plugin); void msgSetMute(AudioTrack*, bool val); - //void msgSetVolume(AudioTrack*, double val); - //void msgSetPan(AudioTrack*, double val); + //void msgSetVolume(AudioTrack*, double val); DELETETHIS + //void msgSetPan(AudioTrack*, double val); DELETETHIS void msgAddSynthI(SynthI* synth); void msgRemoveSynthI(SynthI* synth); void msgSetSegSize(int, int); @@ -270,7 +270,7 @@ class Audio { void msgResetMidiDevices(); void msgIdle(bool); void msgBounce(); - //void msgSetPluginCtrlVal(AudioTrack*, int /*param*/, double /*val*/); + //void msgSetPluginCtrlVal(AudioTrack*, int /*param*/, double /*val*/); DELETETHIS void msgSwapControllerIDX(AudioTrack*, int, int); void msgClearControllerEvents(AudioTrack*, int); void msgSeekPrevACEvent(AudioTrack*, int); diff --git a/muse2/muse/audioconvert.cpp b/muse2/muse/audioconvert.cpp index eeb11676..9ab2f066 100644 --- a/muse2/muse/audioconvert.cpp +++ b/muse2/muse/audioconvert.cpp @@ -114,7 +114,6 @@ AudioConverter* AudioConverter::release(AudioConverter* cv) { if(!cv) return 0; - //if(cv->incRefCount(-1) <= 0) cv->_refCount -= 1; #ifdef AUDIOCONVERT_DEBUG printf("AudioConverter::release converter:%p current refcount:%d\n", cv, cv->_refCount); @@ -130,13 +129,12 @@ AudioConverter* AudioConverter::release(AudioConverter* cv) return cv; } -//off_t AudioConverter::readAudio(SndFileR& f, off_t sfCurFrame, unsigned offset, float** buffer, int channel, int n, bool doSeek, bool overwrite) off_t AudioConverter::readAudio(MusECore::SndFileR& f, unsigned offset, float** buffer, int channel, int n, bool doSeek, bool overwrite) { if(f.isNull()) return _sfCurFrame; - // Added by Tim. p3.3.17 + // Added by Tim. p3.3.17 DELETETHIS or comment it in again. it's disabled anyway //#ifdef AUDIOCONVERT_DEBUG_PRC //printf("AudioConverter::process %s audConv:%p sfCurFrame:%ld offset:%u channel:%d fchan:%d n:%d\n", // f.name().toLatin1(), this, sfCurFrame, offset, channel, f.channels(), n); @@ -162,12 +160,12 @@ off_t AudioConverter::readAudio(MusECore::SndFileR& f, unsigned offset, float** // Sample rates are different. Seek to a calculated 'sample rate ratio factored' position. double srcratio = (double)fsrate / (double)MusEGlobal::sampleRate; - //long inSize = long((double)frames * _src_ratio) + 1 // From MusE-2 file converter. + //long inSize = long((double)frames * _src_ratio) + 1 // From MusE-2 file converter. DELETETHIS ??? off_t newfr = (off_t)floor(((double)frame * srcratio)); // From simplesynth. _sfCurFrame = f.seek(newfr, 0); - // Added by Tim. p3.3.17 + // Added by Tim. p3.3.17 DELETETHIS 3 or comment it in //#ifdef AUDIOCONVERT_DEBUG_PRC //printf("AudioConverter::process Seek frame:%ld converted to frame:%ld sfCurFrame:%ld\n", frame, newfr, sfCurFrame); //#endif @@ -178,7 +176,7 @@ off_t AudioConverter::readAudio(MusECore::SndFileR& f, unsigned offset, float** else { // No seek requested. - // Added by Tim. p3.3.17 + // Added by Tim. p3.3.17 DELETETHIS 3 or comment it in //#ifdef AUDIOCONVERT_DEBUG_PRC //printf("AudioConverter::process No 'transport' seek, rates different. Seeking to sfCurFrame:%ld\n", sfCurFrame); //#endif @@ -189,19 +187,20 @@ off_t AudioConverter::readAudio(MusECore::SndFileR& f, unsigned offset, float** _sfCurFrame = f.seek(_sfCurFrame, 0); } - /* + /* DELETETHIS 5 int fchan = f.channels(); long outFrames = n; long outSize = outFrames * fchan; float outbuffer[outSize]; */ + // DELETETHIS 4 //sfCurFrame = process(f, sfCurFrame, offset, &outbuffer[0], channel, n); // sfCurFrame = process(f, sfCurFrame, outbuffer, channel, n); //sfCurFrame = process(f, sfCurFrame, buffer, channel, n, overwrite); _sfCurFrame = process(f, buffer, channel, n, overwrite); - /* + /* DELETETHIS 58 (whoa!) float* poutbuf = &outbuffer[0]; if(fchan == channel) { @@ -328,24 +327,22 @@ void SRCAudioConverter::reset() return; } -//off_t SRCAudioConverter::process(SndFileR& f, off_t sfCurFrame, float** buffer, int channel, int n, bool overwrite) off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int channel, int n, bool overwrite) { - //return src_process(_src_state, sd); + //return src_process(_src_state, sd); DELETETHIS if(f.isNull()) - //return; return _sfCurFrame; - // Added by Tim. p3.3.17 + // Added by Tim. p3.3.17 DELETETHIS 4 //#ifdef AUDIOCONVERT_DEBUG_PRC //printf("AudioConverter::process %s audConv:%p sfCurFrame:%ld offset:%u channel:%d fchan:%d n:%d\n", // f.name().toLatin1(), this, sfCurFrame, offset, channel, f.channels(), n); //#endif -// off_t frame = offset; // _spos is added before the call. +// off_t frame = offset; // _spos is added before the call. DELETETHIS unsigned fsrate = f.samplerate(); - //bool resample = src_state && ((unsigned)MusEGlobal::sampleRate != fsrate); + //bool resample = src_state && ((unsigned)MusEGlobal::sampleRate != fsrate); DELETETHIS 2 // bool resample = isValid() && ((unsigned)MusEGlobal::sampleRate != fsrate); if((MusEGlobal::sampleRate == 0) || (fsrate == 0)) @@ -364,29 +361,30 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan long inComp = 1; long outFrames = n; - //long outSize = outFrames * channel; + //long outSize = outFrames * channel; DELETETHIS long outSize = outFrames * fchan; - //long inSize = long(outSize * srcratio) + 1 // From MusE-2 file converter. + //long inSize = long(outSize * srcratio) + 1 // From MusE-2 file converter. DELETETHIS3 //long inSize = (long)floor(((double)outSize / srcratio)); // From simplesynth. //long inFrames = (long)floor(((double)outFrames / srcratio)); // From simplesynth. long inFrames = (long)ceil(((double)outFrames / srcratio)) + inComp; // From simplesynth. + // DELETETHIS //long inFrames = (long)floor(double(outFrames * sfinfo.samplerate) / double(MusEGlobal::sampleRate)); // From simplesynth. long inSize = inFrames * fchan; - //long inSize = inFrames * channel; + //long inSize = inFrames * channel; DELETETHIS // Start with buffers at expected sizes. We won't need anything larger than this, but add 4 for good luck. float inbuffer[inSize + 4]; float outbuffer[outSize]; - //size_t sfTotalRead = 0; + //size_t sfTotalRead = 0; DELETETHIS size_t rn = 0; long totalOutFrames = 0; srcdata.data_in = inbuffer; srcdata.data_out = outbuffer; -// srcdata.data_out = buffer; +// srcdata.data_out = buffer; DELETETHIS // Set some kind of limit on the number of attempts to completely fill the output buffer, // in case something is really screwed up - we don't want to get stuck in a loop here. @@ -394,10 +392,10 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan for(int attempt = 0; attempt < attempts; ++attempt) { rn = f.readDirect(inbuffer, inFrames); - //sfTotalRead += rn; + //sfTotalRead += rn; DELETETHIS // convert - //srcdata.data_in = inbuffer; + //srcdata.data_in = inbuffer; DELETETHIS 4 //srcdata.data_out = outbuffer; //srcdata.data_out = poutbuf; //srcdata.input_frames = inSize; @@ -406,7 +404,7 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan srcdata.end_of_input = ((long)rn != inFrames); srcdata.src_ratio = srcratio; - //#ifdef AUDIOCONVERT_DEBUG_PRC + //#ifdef AUDIOCONVERT_DEBUG_PRC DELETETHIS or comment it in, or maybe add an additional if (heavyDebugMsg)? //printf("AudioConverter::process attempt:%d inFrames:%ld outFrames:%ld rn:%d data in:%p out:%p", // attempt, inFrames, outFrames, rn, srcdata.data_in, srcdata.data_out); //#endif @@ -420,7 +418,7 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan totalOutFrames += srcdata.output_frames_gen; - //#ifdef AUDIOCONVERT_DEBUG_PRC + //#ifdef AUDIOCONVERT_DEBUG_PRC DELETETHIS or comment in or heavyDebugMsg //printf(" frames used in:%ld out:%ld totalOutFrames:%ld data in:%p out:%p\n", srcdata.input_frames_used, srcdata.output_frames_gen, totalOutFrames, srcdata.data_in, srcdata.data_out); //#endif @@ -484,7 +482,7 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan #endif // We've reached the end of the file. Convert the number of frames read. - //rn = (double)rn * srcratio + 1; + //rn = (double)rn * srcratio + 1; DELETETHIS 5 //rn = (long)floor((double)rn * srcratio); //if(rn > (size_t)outFrames) // rn = outFrames; @@ -505,22 +503,18 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan long e = n * channel; for(long i = b; i < e; ++i) outbuffer[i] = 0.0f; - //buffer[i] = 0.0f; } - //float* poutbuf = &outbuffer[0]; float* poutbuf = outbuffer; if(fchan == channel) { if(overwrite) - //for (size_t i = 0; i < rn; ++i) for (int i = 0; i < n; ++i) { for(int ch = 0; ch < channel; ++ch) *(buffer[ch] + i) = *poutbuf++; } else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { for(int ch = 0; ch < channel; ++ch) @@ -531,11 +525,9 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan { // stereo to mono if(overwrite) - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) *(buffer[0] + i) = poutbuf[i + i] + poutbuf[i + i + 1]; else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) *(buffer[0] + i) += poutbuf[i + i] + poutbuf[i + i + 1]; } @@ -543,7 +535,6 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan { // mono to stereo if(overwrite) - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { float data = *poutbuf++; @@ -551,7 +542,6 @@ off_t SRCAudioConverter::process(MusECore::SndFileR& f, float** buffer, int chan *(buffer[1]+i) = data; } else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { float data = *poutbuf++; @@ -585,7 +575,7 @@ RubberBandAudioConverter::RubberBandAudioConverter(int channels, int options) : _rbs = 0; _channels = channels; - _rbs = new RubberBandStretcher(MusEGlobal::sampleRate, _channels, _options); // , initialTimeRatio = 1.0, initialPitchScale = 1.0 + _rbs = new RubberBandStretcher(MusEGlobal::sampleRate, _channels, _options); // , initialTimeRatio = 1.0, initialPitchScale = 1.0 DELETETHIS } RubberBandAudioConverter::~RubberBandAudioConverter() @@ -624,24 +614,23 @@ void RubberBandAudioConverter::reset() ///////////////////////////////// // TODO: Not finished yet.. //////////////////////////////// -//off_t RubberBandAudioConverter::process(SndFileR& f, off_t sfCurFrame, float** buffer, int channel, int n, bool overwrite) +// DELETETHIS well then... but maybe we can clean it up anyway? remove the below for example ;)? off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, int channel, int n, bool overwrite) { - //return src_process(_src_state, sd); + //return src_process(_src_state, sd); DELETETHIS if(f.isNull()) - //return; return _sfCurFrame; - // Added by Tim. p3.3.17 + // Added by Tim. p3.3.17 DELETETHIS 4 //#ifdef AUDIOCONVERT_DEBUG_PRC //printf("AudioConverter::process %s audConv:%p sfCurFrame:%ld offset:%u channel:%d fchan:%d n:%d\n", // f.name().toLatin1(), this, sfCurFrame, offset, channel, f.channels(), n); //#endif -// off_t frame = offset; // _spos is added before the call. +// off_t frame = offset; // _spos is added before the call. DELETETHIS unsigned fsrate = f.samplerate(); - //bool resample = src_state && ((unsigned)MusEGlobal::sampleRate != fsrate); + //bool resample = src_state && ((unsigned)MusEGlobal::sampleRate != fsrate); DELETETHIS 2 // bool resample = isValid() && ((unsigned)MusEGlobal::sampleRate != fsrate); if((MusEGlobal::sampleRate == 0) || (fsrate == 0)) @@ -660,23 +649,24 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i long inComp = 1; long outFrames = n; - //long outSize = outFrames * channel; + //long outSize = outFrames * channel; DELETETHIS long outSize = outFrames * fchan; - //long inSize = long(outSize * srcratio) + 1 // From MusE-2 file converter. + //long inSize = long(outSize * srcratio) + 1 // From MusE-2 file converter. DELETETHIS 3 //long inSize = (long)floor(((double)outSize / srcratio)); // From simplesynth. //long inFrames = (long)floor(((double)outFrames / srcratio)); // From simplesynth. long inFrames = (long)ceil(((double)outFrames / srcratio)) + inComp; // From simplesynth. + // DELETETHIS //long inFrames = (long)floor(double(outFrames * sfinfo.samplerate) / double(MusEGlobal::sampleRate)); // From simplesynth. long inSize = inFrames * fchan; - //long inSize = inFrames * channel; + //long inSize = inFrames * channel; DELETETHIS // Start with buffers at expected sizes. We won't need anything larger than this, but add 4 for good luck. float inbuffer[inSize]; // +4 -// float outbuffer[outSize]; +// float outbuffer[outSize]; DELETETHIS - //float* rbinbuffer[fchan]; + //float* rbinbuffer[fchan]; DELETETHIS 4 //float rbindata[inSize]; //for (int i = 0; i < fchan; ++i) // rbinbuffer[i] = rbindata + i * inFrames; @@ -686,11 +676,11 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i for (int i = 0; i < fchan; ++i) rboutbuffer[i] = rboutdata + i * outFrames; - //size_t sfTotalRead = 0; + //size_t sfTotalRead = 0; DELETETHIS size_t rn = 0; long totalOutFrames = 0; -// srcdata.data_in = inbuffer; +// srcdata.data_in = inbuffer; DELETETHIS 3 //srcdata.data_out = outbuffer; // srcdata.data_out = buffer; float** data_out = rboutbuffer; @@ -712,9 +702,9 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i for(int i = 0; i < fchan; ++i) rbinbuffer[i] = rbindata + i * sreq; -// rn = f.readDirect(inbuffer, inFrames); +// rn = f.readDirect(inbuffer, inFrames); DELETETHIS rn = f.readDirect(inbuffer, sreq); - //sfTotalRead += rn; + //sfTotalRead += rn; DELETETHIS // Must de-interleave soundfile data to feed to rubberband. for(size_t i = 0; i < rn; ++i) @@ -730,7 +720,7 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i // convert - //srcdata.data_in = inbuffer; + //srcdata.data_in = inbuffer; DELETETHIS 4 //srcdata.data_out = outbuffer; //srcdata.data_out = poutbuf; //srcdata.input_frames = inSize; @@ -739,7 +729,7 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i srcdata.end_of_input = ((long)rn != inFrames); srcdata.src_ratio = srcratio; - //#ifdef AUDIOCONVERT_DEBUG_PRC + //#ifdef AUDIOCONVERT_DEBUG_PRC DELETETHIS or comment in //printf("AudioConverter::process attempt:%d inFrames:%ld outFrames:%ld rn:%d data in:%p out:%p", // attempt, inFrames, outFrames, rn, srcdata.data_in, srcdata.data_out); //#endif @@ -753,7 +743,7 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i totalOutFrames += srcdata.output_frames_gen; - //#ifdef AUDIOCONVERT_DEBUG_PRC + //#ifdef AUDIOCONVERT_DEBUG_PRC DELETETHIS or comment in //printf(" frames used in:%ld out:%ld totalOutFrames:%ld data in:%p out:%p\n", srcdata.input_frames_used, srcdata.output_frames_gen, totalOutFrames, srcdata.data_in, srcdata.data_out); //#endif @@ -817,7 +807,7 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i #endif // We've reached the end of the file. Convert the number of frames read. - //rn = (double)rn * srcratio + 1; + //rn = (double)rn * srcratio + 1; DELETETHIS 5 //rn = (long)floor((double)rn * srcratio); //if(rn > (size_t)outFrames) // rn = outFrames; @@ -837,23 +827,19 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i long b = totalOutFrames * channel; long e = n * channel; for(long i = b; i < e; ++i) - //outbuffer[i] = 0.0f; buffer[i] = 0.0f; } - //float* poutbuf = &outbuffer[0]; float* poutbuf = outbuffer; if(fchan == channel) { if(overwrite) - //for (size_t i = 0; i < rn; ++i) for (int i = 0; i < n; ++i) { for(int ch = 0; ch < channel; ++ch) *(buffer[ch] + i) = *poutbuf++; } else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { for(int ch = 0; ch < channel; ++ch) @@ -864,11 +850,9 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i { // stereo to mono if(overwrite) - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) *(buffer[0] + i) = poutbuf[i + i] + poutbuf[i + i + 1]; else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) *(buffer[0] + i) += poutbuf[i + i] + poutbuf[i + i + 1]; } @@ -876,7 +860,6 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i { // mono to stereo if(overwrite) - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { float data = *poutbuf++; @@ -884,7 +867,6 @@ off_t RubberBandAudioConverter::process(MusECore::SndFileR& f, float** buffer, i *(buffer[1]+i) = data; } else - //for(size_t i = 0; i < rn; ++i) for(int i = 0; i < n; ++i) { float data = *poutbuf++; diff --git a/muse2/muse/audioconvert.h b/muse2/muse/audioconvert.h index d9d312ed..23f06ecf 100644 --- a/muse2/muse/audioconvert.h +++ b/muse2/muse/audioconvert.h @@ -36,7 +36,6 @@ #include #include -//#include "eventbase.h" namespace MusECore { class EventBase; @@ -61,18 +60,14 @@ class AudioConverter AudioConverter* reference(); static AudioConverter* release(AudioConverter* cv); - //off_t readAudio(SndFileR& /*sf*/, off_t /*sfCurFrame*/, unsigned /*offset*/, float** /*buffer*/, - // int /*channels*/, int /*frames*/, bool /*doSeek*/, bool /*overwrite*/); - off_t readAudio(MusECore::SndFileR& /*sf*/, unsigned /*offset*/, float** /*buffer*/, - int /*channels*/, int /*frames*/, bool /*doSeek*/, bool /*overwrite*/); + off_t readAudio(MusECore::SndFileR& sf, unsigned offset, float** buffer, + int channels, int frames, bool doSeek, bool overwrite); virtual bool isValid() = 0; virtual void reset() = 0; virtual void setChannels(int ch) = 0; - //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, - // int /*channels*/, int /*frames*/, bool /*overwrite*/) = 0; // Interleaved buffer if stereo. - virtual off_t process(MusECore::SndFileR& /*sf*/, float** /*buffer*/, - int /*channels*/, int /*frames*/, bool /*overwrite*/) = 0; // Interleaved buffer if stereo. + virtual off_t process(MusECore::SndFileR& sf, float** buffer, + int channels, int frames, bool overwrite) = 0; // Interleaved buffer if stereo. }; //--------------------------------------------------------- @@ -92,10 +87,8 @@ class SRCAudioConverter : public AudioConverter virtual bool isValid() { return _src_state != 0; } virtual void reset(); virtual void setChannels(int ch); - //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, - // int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo. - virtual off_t process(MusECore::SndFileR& /*sf*/, float** /*buffer*/, - int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo. + virtual off_t process(MusECore::SndFileR& sf, float** buffer, + int channels, int frames, bool overwrite); // Interleaved buffer if stereo. }; #ifdef RUBBERBAND_SUPPORT @@ -117,10 +110,8 @@ class RubberBandAudioConverter : public AudioConverter virtual bool isValid() { return _rbs != 0; } virtual void reset(); virtual void setChannels(int ch); - //virtual off_t process(SndFileR& /*sf*/, off_t /*sfCurFrame*/, float** /*buffer*/, - // int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo. - virtual off_t process(MusECore::SndFileR& /*sf*/, float** /*buffer*/, - int /*channels*/, int /*frames*/, bool /*overwrite*/); // Interleaved buffer if stereo. + virtual off_t process(MusECore::SndFileR& sf, float** buffer, + int channels, int frames, bool overwrite); // Interleaved buffer if stereo. }; #endif // RUBBERBAND_SUPPORT @@ -132,14 +123,12 @@ class RubberBandAudioConverter : public AudioConverter typedef std::map >::iterator iAudioConvertMap; typedef std::map >::const_iterator ciAudioConvertMap; -//typedef std::map > AudioConvertMap; class AudioConvertMap : public std::map > { public: void remapEvents(const EventList*); iAudioConvertMap addEvent(EventBase*); void removeEvent(EventBase*); - //AudioConverter* getConverter(const EventBase*); iAudioConvertMap getConverter(EventBase*); }; diff --git a/muse2/muse/audioprefetch.cpp b/muse2/muse/audioprefetch.cpp index 1fcb7cef..92689ddb 100644 --- a/muse2/muse/audioprefetch.cpp +++ b/muse2/muse/audioprefetch.cpp @@ -61,14 +61,11 @@ struct PrefetchMsg : public ThreadMsg { // AudioPrefetch //--------------------------------------------------------- -//AudioPrefetch::AudioPrefetch(int prio, const char* name) -// : Thread(prio,name) AudioPrefetch::AudioPrefetch(const char* name) : Thread(name) { seekPos = ~0; writePos = ~0; - //seekDone = true; seekCount = 0; } @@ -86,12 +83,10 @@ static void readMsgP(void* p, void*) // start //--------------------------------------------------------- -//void AudioPrefetch::start() void AudioPrefetch::start(int priority) { clearPollFd(); addPollFd(toThreadFdr, POLLIN, MusECore::readMsgP, this, 0); - //Thread::start(); Thread::start(priority); } @@ -112,13 +107,10 @@ void AudioPrefetch::processMsg1(const void* m) const PrefetchMsg* msg = (PrefetchMsg*)m; switch(msg->id) { case PREFETCH_TICK: - if (MusEGlobal::audio->isRecording()) { - //puts("writeTick"); + if (MusEGlobal::audio->isRecording()) MusEGlobal::audio->writeTick(); - } + // Indicate do not seek file before each read. - // Changed by Tim. p3.3.17 - //prefetch(); prefetch(false); seekPos = ~0; // invalidate cached last seek position @@ -157,13 +149,10 @@ void AudioPrefetch::msgTick() void AudioPrefetch::msgSeek(unsigned samplePos, bool force) { - if (samplePos == seekPos && !force) { - //seekDone = true; + if (samplePos == seekPos && !force) return; - } ++seekCount; - //seekDone = false; #ifdef AUDIOPREFETCH_DEBUG printf("AudioPrefetch::msgSeek samplePos:%u force:%d seekCount:%d\n", samplePos, force, seekCount); @@ -182,7 +171,6 @@ void AudioPrefetch::msgSeek(unsigned samplePos, bool force) // prefetch //--------------------------------------------------------- -//void AudioPrefetch::prefetch() void AudioPrefetch::prefetch(bool doSeek) { if (writePos == ~0U) { @@ -197,31 +185,23 @@ void AudioPrefetch::prefetch(bool doSeek) // adjust loop start so we get exact loop len if (n > lpos) n = 0; -// printf("prefetch seek %d\n", writePos); writePos = lpos - n; } } WaveTrackList* tl = MusEGlobal::song->waves(); for (iWaveTrack it = tl->begin(); it != tl->end(); ++it) { WaveTrack* track = *it; - // p3.3.29 - // Save time. Don't bother if track is off. Track On/Off not designed for rapid repeated response (but mute is). + // Save time. Don't bother if track is off. Track On/Off not designed for rapid repeated response (but mute is). (p3.3.29) if(track->off()) continue; int ch = track->channels(); float* bp[ch]; -// printf("prefetch %d\n", writePos); - if (track->prefetchFifo()->getWriteBuffer(ch, MusEGlobal::segmentSize, bp, writePos)) { - // printf("AudioPrefetch::prefetch No write buffer!\n"); // p3.3.46 Was getting this... + if (track->prefetchFifo()->getWriteBuffer(ch, MusEGlobal::segmentSize, bp, writePos)) continue; - } - //track->fetchData(writePos, MusEGlobal::segmentSize, bp); + track->fetchData(writePos, MusEGlobal::segmentSize, bp, doSeek); - // p3.3.41 - //fprintf(stderr, "AudioPrefetch::prefetch data: MusEGlobal::segmentSize:%ld %e %e %e %e\n", MusEGlobal::segmentSize, bp[0][0], bp[0][1], bp[0][2], bp[0][3]); - } writePos += MusEGlobal::segmentSize; } @@ -232,7 +212,6 @@ void AudioPrefetch::prefetch(bool doSeek) void AudioPrefetch::seek(unsigned seekTo) { -// printf("seek %d\n", seekTo); #ifdef AUDIOPREFETCH_DEBUG printf("AudioPrefetch::seek to:%u seekCount:%d\n", seekTo, seekCount); #endif @@ -264,14 +243,11 @@ void AudioPrefetch::seek(unsigned seekTo) for (unsigned int i = 0; i < (MusEGlobal::fifoLength)-1; ++i)//prevent compiler warning: comparison of signed/unsigned { // Indicate do a seek command before read, but only on the first pass. - // Changed by Tim. p3.3.17 - //prefetch(); prefetch(isFirstPrefetch); isFirstPrefetch = false; - // To help speed things up even more, check the count again. Return if more seek messages are pending. - // Added by Tim. p3.3.20 + // To help speed things up even more, check the count again. Return if more seek messages are pending. (p3.3.20) if(seekCount > 1) { --seekCount; @@ -280,7 +256,6 @@ void AudioPrefetch::seek(unsigned seekTo) } seekPos = seekTo; - //seekDone = true; --seekCount; } diff --git a/muse2/muse/audioprefetch.h b/muse2/muse/audioprefetch.h index 5b34b2cc..7e8a5799 100644 --- a/muse2/muse/audioprefetch.h +++ b/muse2/muse/audioprefetch.h @@ -37,24 +37,20 @@ class AudioPrefetch : public Thread { unsigned seekPos; // remember last seek to optimize seeks virtual void processMsg1(const void*); - //void prefetch(); void prefetch(bool doSeek); void seek(unsigned pos); volatile int seekCount; public: - //AudioPrefetch(int prio, const char* name); AudioPrefetch(const char* name); ~AudioPrefetch(); - //virtual void start(); virtual void start(int); void msgTick(); void msgSeek(unsigned samplePos, bool force=false); - //volatile bool seekDone; bool seekDone() const { return seekCount == 0; } }; diff --git a/muse2/muse/audiotrack.cpp b/muse2/muse/audiotrack.cpp index e542deec..981cdada 100644 --- a/muse2/muse/audiotrack.cpp +++ b/muse2/muse/audiotrack.cpp @@ -48,6 +48,7 @@ bool AudioOutput::_isVisible=false; bool AudioGroup::_isVisible =false; bool WaveTrack::_isVisible=true; +// DELETETHIS 40. this caching stuff seems to be not used any more // By T356. For caching jack in/out routing names BEFORE file save. // Jack often shuts down during file save, causing the routes to be lost in the file. // cacheJackRouteNames() is ONLY called from MusE::save() in app.cpp @@ -95,7 +96,6 @@ void cacheJackRouteNames() AudioTrack::AudioTrack(TrackType t) : Track(t) { - //_totalOutChannels = num_out_bufs; // Is either parameter-default MAX_CHANNELS, or custom value passed (used by syntis). _processed = false; _haveData = false; _sendMetronome = false; @@ -104,28 +104,12 @@ AudioTrack::AudioTrack(TrackType t) _recFile = 0; _channels = 0; _automationType = AUTO_OFF; - //setChannels(1); setChannels(2); addController(new CtrlList(AC_VOLUME,"Volume",0.001,3.163 /* roughly 10 db */, VAL_LOG)); addController(new CtrlList(AC_PAN, "Pan", -1.0, 1.0, VAL_LINEAR)); addController(new CtrlList(AC_MUTE,"Mute",0.0,1.0, VAL_LINEAR, true /*dont show in arranger */)); - //outBuffers = new float*[MAX_CHANNELS]; - //for (int i = 0; i < MAX_CHANNELS; ++i) - // outBuffers[i] = new float[MusEGlobal::segmentSize]; - //for (int i = 0; i < MAX_CHANNELS; ++i) - // posix_memalign((void**)(outBuffers + i), 16, sizeof(float) * MusEGlobal::segmentSize); - - // Let's allocate it all in one block, and just point the remaining buffer pointers into the block - // which allows faster one-shot buffer copying. - // Nope. Nice but interferes with possibility we don't know if other buffers are contiguous (jack buffers, local stack buffers etc.). - //posix_memalign((void**)(outBuffers), 16, sizeof(float) * MusEGlobal::segmentSize * MAX_CHANNELS); - //for (int i = 0; i < MAX_CHANNELS; ++i) - // *(outBuffers + i) = sizeof(float) * MusEGlobal::segmentSize * i; - - // Easy way, less desirable... Start out with enough for MAX_CHANNELS. Then multi-channel syntis can re-allocate, - // via a call to (a modified!) setChannels(). - // Hard way, more desirable... Creating a synti instance passes the total channels to this constructor, overriding MAX_CHANNELS. + // for a lot of considerations and failures, see revision 1402 or earlier (flo) _totalOutChannels = MAX_CHANNELS; outBuffers = new float*[_totalOutChannels]; for (int i = 0; i < _totalOutChannels; ++i) @@ -154,7 +138,6 @@ AudioTrack::AudioTrack(const AudioTrack& t, int flags) bufferPos = MAXINT; - //_recFile = t._recFile; _recFile = NULL; internal_assign(t, flags | ASSIGN_PROPERTIES); @@ -193,16 +176,9 @@ void AudioTrack::internal_assign(const Track& t, int flags) setTotalOutChannels(at._totalOutChannels); // This is only set by multi-channel syntis... - //_totalInChannels = 0; - //_totalInChannels = t._totalInChannels; setTotalInChannels(at._totalInChannels); setChannels(at.channels()); // Set track channels (max 2). - - //bufferPos = MAXINT; - - //_recFile = at._recFile; - //_recFile = NULL; } if(flags & ASSIGN_PLUGINS) @@ -263,23 +239,13 @@ void AudioTrack::internal_assign(const Track& t, int flags) if (!ol->empty()) { AudioOutput* ao = ol->front(); switch(type()) { - //case Track::MIDI: - //case Track::DRUM: - //case Track::AUDIO_OUTPUT: - // break; - case Track::WAVE: - //case Track::AUDIO_GROUP: case Track::AUDIO_AUX: - //case Track::AUDIO_INPUT: - //case Track::AUDIO_SOFTSYNTH: MusEGlobal::audio->msgAddRoute(Route(this, -1), Route(ao, -1)); - //updateFlags |= SC_ROUTE; break; // It should actually never get here now, but just in case. case Track::AUDIO_SOFTSYNTH: MusEGlobal::audio->msgAddRoute(Route(this, 0, channels()), Route(ao, 0, channels())); - //updateFlags |= SC_ROUTE; break; default: break; @@ -495,7 +461,7 @@ void AudioTrack::swapControllerIDX(int idx1, int idx2) _controller.insert(std::pair(newcl->id(), newcl)); } - + // DELETETHIS 67 /* unsigned int idmask = ~AC_PLUGIN_CTL_ID_MASK; @@ -616,7 +582,6 @@ void AudioTrack::processAutomationEvents() { // Don't bother looking for start, it's OK, just take the first one. // Needed for mousewheel and paging etc. - //if (icr->id == id && icr->type == ARVT_START) if (icr->id == id) { int start = icr->frame; @@ -679,17 +644,6 @@ void AudioTrack::processAutomationEvents() // Done with the recorded automation event list. Clear it. _recEvents.clear(); - - // Try muse without this, so that the user can remain in automation write mode - // after a stop. - /* - if (automationType() == AUTO_WRITE) - { - setAutomationType(AUTO_READ); - MusEGlobal::song->update(SC_AUTOMATION); - } - */ - } //--------------------------------------------------------- @@ -734,12 +688,10 @@ void AudioTrack::seekPrevACEvent(int id) if(cl->empty()) return; - //iCtrl s = cl->lower_bound(MusEGlobal::song->cPos().frame()); iCtrl s = cl->lower_bound(MusEGlobal::audio->pos().frame()); // p4.0.33 if(s != cl->begin()) --s; - //MusEGlobal::song->setPos(Song::CPOS, Pos(s->second.frame, false), true, false, true); MusEGlobal::song->setPos(Song::CPOS, Pos(s->second.frame, false), false, true, false); // p4.0.33 return; } @@ -758,7 +710,6 @@ void AudioTrack::seekNextACEvent(int id) if(cl->empty()) return; - //iCtrl s = cl->upper_bound(MusEGlobal::song->cPos().frame()); iCtrl s = cl->upper_bound(MusEGlobal::audio->pos().frame()); // p4.0.33 if(s == cl->end()) @@ -766,7 +717,6 @@ void AudioTrack::seekNextACEvent(int id) --s; } - //MusEGlobal::song->setPos(Song::CPOS, Pos(s->second.frame, false), true, false, true); MusEGlobal::song->setPos(Song::CPOS, Pos(s->second.frame, false), false, true, false); // p4.0.33 return; } @@ -1015,7 +965,6 @@ void AudioTrack::writeProperties(int level, Xml& xml) const if (hasAuxSend()) { int naux = MusEGlobal::song->auxs()->size(); for (int idx = 0; idx < naux; ++idx) { - //QString s("%2\n"); QString s("%2\n"); // Aux fix from Remon, thanks. xml.nput(level, s.arg(idx).arg(_auxSend[idx]).toAscii().constData()); } @@ -1117,10 +1066,6 @@ bool AudioTrack::readProperties(Xml& xml, const QString& tag) _sendMetronome = xml.parseInt(); else if (tag == "automation") setAutomationType(AutomationType(xml.parseInt())); - // Removed by T356 - // "recfile" tag not saved anymore - //else if (tag == "recfile") - // readRecfile(xml); else if (tag == "controller") { CtrlList* l = new CtrlList(); l->read(xml); @@ -1132,7 +1077,6 @@ bool AudioTrack::readProperties(Xml& xml, const QString& tag) // controls would all be set to zero. // But we will allow for the (unintended, useless) possibility of a controller // with no matching plugin control. - //PluginI* p = 0; PluginIBase* p = 0; bool ctlfound = false; unsigned m = l->id() & AC_PLUGIN_CTL_ID_MASK; @@ -1152,6 +1096,7 @@ bool AudioTrack::readProperties(Xml& xml, const QString& tag) SynthIF* sif = synti->sif(); if(sif) { +#ifdef DSSI_SUPPORT DssiSynthIF* dsif = dynamic_cast < DssiSynthIF* > (sif); if(dsif) { @@ -1159,6 +1104,7 @@ bool AudioTrack::readProperties(Xml& xml, const QString& tag) if(p && m < p->parameters()) ctlfound = true; } +#endif } } } @@ -1285,7 +1231,6 @@ void AudioTrack::mapRackPluginsToControllers() l->setValueType(p->ctrlValueType(i)); l->setMode(p->ctrlMode(i)); l->setCurVal(p->param(i)); - //l->setDefault(p->defaultValue(i)); } } @@ -1301,11 +1246,10 @@ void AudioTrack::mapRackPluginsToControllers() // Ignore volume, pan, mute etc. if(id < AC_PLUGIN_CTL_BASE) continue; + unsigned param = id & AC_PLUGIN_CTL_ID_MASK; int idx = (id >> AC_PLUGIN_CTL_BASE_POW) - 1; - //PluginI* p = (*_efxPipe)[idx]; - // p4.0.20 PluginIBase* p = 0; if(idx >= 0 && idx < PipelineDepth) p = (*_efxPipe)[idx]; @@ -1318,9 +1262,11 @@ void AudioTrack::mapRackPluginsToControllers() SynthIF* sif = synti->sif(); if(sif) { +#ifdef DSSI_SUPPORT DssiSynthIF* dsif = dynamic_cast < DssiSynthIF* > (sif); if(dsif) p = dsif; +#endif } } } @@ -1341,6 +1287,17 @@ void AudioTrack::mapRackPluginsToControllers() while (loop); + // DELETETHIS 40 i DO trust the below. some container's erase functions + // return an iterator to the next, so sometimes you need it=erase(it) + // instead of erase(it++). + // i'm happy with both AS LONG the above does not slow down things. + // when in doubt, i'd prefer the below however. + // so either remove the below completely (if the above works fast), + // or remove the above and use the below. + // CAUTION: the below isn't quite up-to-date! first recheck. + // this "not-being-up-to-date" is another reason for NOT keeping such + // comments! + // FIXME: Although this tested OK, and is the 'official' way to erase while iterating, // I don't trust it. I'm weary of this method. The technique didn't work // in Audio::msgRemoveTracks(), see comments there. @@ -1357,6 +1314,7 @@ void AudioTrack::mapRackPluginsToControllers() ++icl; continue; } + int param = id & AC_PLUGIN_CTL_ID_MASK; int idx = (id >> AC_PLUGIN_CTL_BASE_POW) - 1; PluginI* p = (*_efxPipe)[idx]; @@ -1372,6 +1330,7 @@ void AudioTrack::mapRackPluginsToControllers() */ } +// DELETETHIS 60 /* //--------------------------------------------------------- // writeRouting @@ -1444,18 +1403,14 @@ AudioInput::AudioInput() { // set Default for Input Ports: _mute = true; - //setVolume(1.0); for (int i = 0; i < MAX_CHANNELS; ++i) jackPorts[i] = 0; - //_channels = 0; - //setChannels(2); } AudioInput::AudioInput(const AudioInput& t, int flags) : AudioTrack(t, flags) { for (int i = 0; i < MAX_CHANNELS; ++i) - //jackPorts[i] = t.jackPorts[i]; jackPorts[i] = 0; // Register ports. @@ -1559,17 +1514,13 @@ AudioOutput::AudioOutput() { for (int i = 0; i < MAX_CHANNELS; ++i) jackPorts[i] = 0; - //_channels = 0; - //setChannels(2); } AudioOutput::AudioOutput(const AudioOutput& t, int flags) : AudioTrack(t, flags) { for (int i = 0; i < MAX_CHANNELS; ++i) - //jackPorts[i] = t.jackPorts[i]; jackPorts[i] = 0; - //_nframes = t._nframes; _nframes = 0; // Register ports. @@ -1724,10 +1675,6 @@ void AudioAux::write(int level, Xml& xml) const AudioAux::AudioAux() : AudioTrack(AUDIO_AUX) { - //_channels = 0; - //setChannels(2); - //for (int i = 0; i < MAX_CHANNELS; ++i) - // buffer[i] = (i < channels()) ? new float[MusEGlobal::segmentSize] : 0; for(int i = 0; i < MAX_CHANNELS; ++i) { if(i < channels()) @@ -1740,10 +1687,6 @@ AudioAux::AudioAux() AudioAux::AudioAux(const AudioAux& t, int flags) : AudioTrack(t, flags) { - //_channels = 0; - //setChannels(2); - //for (int i = 0; i < MAX_CHANNELS; ++i) - // buffer[i] = (i < channels()) ? new float[MusEGlobal::segmentSize] : 0; for(int i = 0; i < MAX_CHANNELS; ++i) { if(i < channels()) @@ -1757,14 +1700,12 @@ AudioAux::AudioAux(const AudioAux& t, int flags) //--------------------------------------------------------- AudioAux::~AudioAux() - { - //for (int i = 0; i < channels(); ++i) - // delete[] buffer[i]; +{ for (int i = 0; i < MAX_CHANNELS; ++i) { if (buffer[i]) free(buffer[i]); - } } +} //--------------------------------------------------------- // read @@ -1821,17 +1762,7 @@ bool AudioAux::getData(unsigned pos, int ch, unsigned samples, float** data) for (int i = 0; i < chans; ++i) buff[i] = buff_data + i * samples; - //printf("AudioAux::getData name:%s\n calling copyData on:%s auxRefCount:%d\n", - // name().toLatin1().constData(), track->name().toLatin1().constData(), track->auxRefCount()); - track->copyData(pos, chans, -1, -1, samples, buff); - - /* float* buff[ch]; - float buff_data[samples * ch]; - for (int i = 0; i < ch; ++i) - buff[i] = buff_data + i * samples; - //printf("Audio::process1 calling track->copyData for track:%s\n", track->name().toLatin1()); - track->copyData(pos, ch, -1, -1, samples, buff); */ } } @@ -1848,15 +1779,11 @@ void AudioAux::setChannels(int n) { if(n > channels()) { - //for (int i = channels(); i < n; ++i) - // buffer[i] = new float[MusEGlobal::segmentSize]; for(int i = channels(); i < n; ++i) posix_memalign((void**)(buffer + i), 16, sizeof(float) * MusEGlobal::segmentSize); } else if(n < channels()) { - //for (int i = n; i < channels(); ++i) - // delete[] buffer[i]; for(int i = n; i < channels(); ++i) { if(buffer[i]) @@ -1876,7 +1803,6 @@ bool AudioTrack::setRecordFlag1(bool f) if (f == _recordFlag) return true; if (f) { - // do nothing if (_recFile == 0 && MusEGlobal::song->record()) { // this rec-enables a track if the global arm already was done // the standard case would be that rec-enable be done there @@ -1899,7 +1825,6 @@ bool AudioTrack::setRecordFlag1(bool f) remove(s.toLatin1().constData()); if(MusEGlobal::debugMsg) printf("AudioNode::setRecordFlag1: remove file %s if it exists\n", s.toLatin1().constData()); - //_recFile = 0; } } return true; diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp index 02a30dec..f610805e 100644 --- a/muse2/muse/cliplist/cliplist.cpp +++ b/muse2/muse/cliplist/cliplist.cpp @@ -67,7 +67,7 @@ ClipItem::ClipItem(QTreeWidget* parent, const MusECore::SndFileR& w) // samples2smpte //--------------------------------------------------------- -#if 0 +#if 0 // DELETETHIS ? static QString samples2smpte(int samples) { double time = double(samples) / double(sampleRate); @@ -96,7 +96,7 @@ static QString samples2smpte(int samples) } #endif -/* +/* DELETETHIS //--------------------------------------------------------- // text //--------------------------------------------------------- @@ -126,14 +126,11 @@ QString ClipItem::text(int col) const ClipListEdit::ClipListEdit(QWidget* parent) : TopWin(TopWin::CLIPLIST, parent, "cliplist", Qt::Window) { - //setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("MusE: Clip List Editor")); editor = new ClipListEditorBaseWidget; setCentralWidget(editor); - //editor->view->setColumnAlignment(COL_REFS, Qt::AlignRight); - QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config")); settingsMenu->addAction(subwinAction); @@ -283,7 +280,7 @@ void ClipListEdit::writeConfiguration(int level, MusECore::Xml& xml) void ClipListEdit::startChanged(const MusECore::Pos& /*pos*/)//prevent compiler warning: unsused parameter { -// editor->view->triggerUpdate(); +// editor->view->triggerUpdate(); DELETETHIS whole function? } //--------------------------------------------------------- @@ -292,7 +289,7 @@ void ClipListEdit::startChanged(const MusECore::Pos& /*pos*/)//prevent compiler void ClipListEdit::lenChanged(const MusECore::Pos& /*pos*/) //prevent compiler warning: unsused parameter { -// curClip.setLenFrame(pos.frame()); +// curClip.setLenFrame(pos.frame()); DELETETHIS whole function? // editor->view->triggerUpdate(); } @@ -308,7 +305,7 @@ void ClipListEdit::clipSelectionChanged() editor->start->setEnabled(false); editor->len->setEnabled(false); return; -/* +/* DELETETHIS and the above two comments } editor->start->setEnabled(true); editor->len->setEnabled(true); @@ -328,7 +325,7 @@ void ClipListEdit::clipSelectionChanged() void ClipListEdit::clicked(QTreeWidgetItem*, int) { -// printf("clicked\n"); +// printf("clicked\n"); DELETETHIS whole function } } // namespace MusEGui diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp index f13cd257..cb1600a4 100644 --- a/muse2/muse/cobject.cpp +++ b/muse2/muse/cobject.cpp @@ -59,8 +59,7 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag _type=t; setObjectName(QString(name)); - // Allow multiple rows. Tim. - //setDockNestingEnabled(true); + //setDockNestingEnabled(true); // Allow multiple rows. Tim. setIconSize(ICON_SIZE); subwinAction=new QAction(tr("As subwindow"), this); @@ -78,8 +77,12 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag connect(fullscreenAction, SIGNAL(toggled(bool)), SLOT(setFullscreen(bool))); mdisubwin=NULL; - _sharesToolsAndMenu=_defaultSubwin[_type] ? _sharesWhenSubwin[_type] : _sharesWhenFree[_type]; - if (_defaultSubwin[_type]) + if (!MusEGlobal::unityWorkaround) + _sharesToolsAndMenu=_defaultSubwin[_type] ? _sharesWhenSubwin[_type] : _sharesWhenFree[_type]; + else + _sharesToolsAndMenu=false; + + if (_defaultSubwin[_type] && !MusEGlobal::unityWorkaround) { setIsMdiWin(true); _savedToolbarState=_toolbarNonsharedInit[_type]; @@ -90,6 +93,11 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag subwinAction->setChecked(isMdiWin()); shareAction->setChecked(_sharesToolsAndMenu); + if (MusEGlobal::unityWorkaround) + { + shareAction->setEnabled(false); + subwinAction->setEnabled(false); + } fullscreenAction->setEnabled(!isMdiWin()); if (mdisubwin) @@ -288,6 +296,9 @@ QMdiSubWindow* TopWin::createMdiWrapper() void TopWin::setIsMdiWin(bool val) { + if (MusEGlobal::unityWorkaround) + return; + if (val) { if (!isMdiWin()) @@ -363,7 +374,7 @@ void TopWin::addToolBar(QToolBar* toolbar) { _toolbars.push_back(toolbar); - if (!_sharesToolsAndMenu) + if (!_sharesToolsAndMenu || MusEGlobal::unityWorkaround) QMainWindow::addToolBar(toolbar); else toolbar->hide(); @@ -381,6 +392,9 @@ QToolBar* TopWin::addToolBar(const QString& title) void TopWin::shareToolsAndMenu(bool val) { + if (MusEGlobal::unityWorkaround) + return; + if (_sharesToolsAndMenu == val) { if (MusEGlobal::debugMsg) printf("TopWin::shareToolsAndMenu() called but has no effect\n"); diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h index f13ff591..d58bb823 100644 --- a/muse2/muse/cobject.h +++ b/muse2/muse/cobject.h @@ -146,10 +146,6 @@ class TopWin : public QMainWindow // ToplevelList //--------------------------------------------------------- -//typedef std::list ToplevelList; -//typedef ToplevelList::iterator iToplevel; -//typedef ToplevelList::const_iterator ciToplevel; - typedef std::list::iterator iToplevel; typedef std::list::const_iterator ciToplevel; diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp index 638f591b..f35fd6b2 100644 --- a/muse2/muse/conf.cpp +++ b/muse2/muse/conf.cpp @@ -39,7 +39,6 @@ #include "arrangerview.h" #include "marker/markerview.h" #include "master/lmaster.h" -///#include "transport.h" #include "bigtime.h" #include "arranger.h" #include "conf.h" @@ -171,7 +170,6 @@ static void readController(Xml& xml, int midiPort, int channel) case Xml::TagEnd: if (tag == "controller") { MidiPort* port = &MusEGlobal::midiPorts[midiPort]; - //port->addManagedController(channel, id); val = port->limitValToInstrCtlRange(id, val); // The value here will actually be sent to the device LATER, in MidiPort::setMidiDevice() port->setHwCtrlState(channel, id, val); @@ -225,9 +223,6 @@ static void readConfigMidiPort(Xml& xml, bool onlyReadChannelState) int idx = 0; QString device; - //QString instrument; - // Changed by Tim. - //QString instrument("generic midi"); // Let's be bold. New users have been confused by generic midi not enabling any patches and controllers. // I had said this may cause HW problems by sending out GM sysEx when really the HW might not be GM. // But this really needs to be done, one way or another. @@ -306,7 +301,6 @@ static void readConfigMidiPort(Xml& xml, bool onlyReadChannelState) if(onlyReadChannelState) // p4.0.41 return; - //if (idx > MIDI_PORTS) { if (idx < 0 || idx >= MIDI_PORTS) { fprintf(stderr, "bad midi port %d (>%d)\n", idx, MIDI_PORTS); @@ -315,9 +309,6 @@ static void readConfigMidiPort(Xml& xml, bool onlyReadChannelState) MidiDevice* dev = MusEGlobal::midiDevices.find(device); - //if(MusEGlobal::debugMsg && !dev) - // fprintf(stderr, "readConfigMidiPort: device not found %s\n", device.toLatin1().constData()); - if(!dev && type == MidiDevice::JACK_MIDI) { if(MusEGlobal::debugMsg) @@ -357,83 +348,6 @@ static void readConfigMidiPort(Xml& xml, bool onlyReadChannelState) } } -/* -//--------------------------------------------------------- -// readConfigMidiSyncInfo -//--------------------------------------------------------- - -static void readConfigMidiSyncInfo(Xml& xml) -{ - QString device; - int idOut = 127; - int idIn = 127; - bool sendMC = false; - bool sendMMC = false; - bool sendMTC = false; - bool recMC = false; - bool recMMC = false; - bool recMTC = false; - - for (;;) { - Xml::Token token = xml.parse(); - if (token == Xml::Error || token == Xml::End) - break; - QString tag = xml.s1(); - switch (token) { - case Xml::TagStart: - if (tag == "device") - device = xml.parse1(); - else if (tag == "idOut") - idOut = (xml.parseInt()); - else if (tag == "idIn") - idIn = xml.parseInt(); - else if (tag == "sendMC") - sendMC = xml.parseInt(); - else if (tag == "sendMMC") - sendMMC = xml.parseInt(); - else if (tag == "sendMTC") - sendMTC = xml.parseInt(); - else if (tag == "recMC") - recMC = xml.parseInt(); - else if (tag == "recMMC") - recMMC = xml.parseInt(); - else if (tag == "recMTC") - recMTC = xml.parseInt(); - else - xml.unknown("midiSyncInfo"); - break; - case Xml::Attribut: - break; - case Xml::TagEnd: - if(tag == "midiSyncInfo") - { - MidiDevice* dev = MusEGlobal::midiDevices.find(device); - if(dev) - { - MidiSyncInfo& si = dev->syncInfo(); - si.setIdIn(idIn); - si.setIdOut(idOut); - - si.setMCIn(recMC); - si.setMMCIn(recMMC); - si.setMTCIn(recMTC); - - si.setMCOut(sendMC); - si.setMMCOut(sendMMC); - si.setMTCOut(sendMTC); - } - else - fprintf(stderr, "Read configuration: Sync device: %s not found\n", device.toLatin1().constData()); - - return; - } - default: - break; - } - } -} -*/ - //--------------------------------------------------------- // loadConfigMetronom //--------------------------------------------------------- @@ -982,52 +896,37 @@ void readConfiguration(Xml& xml, bool doReadMidiPortConfig, bool doReadGlobalCon MusEGlobal::config.drumTrackPreference = (MusEGlobal::drumTrackPreference_t) xml.parseInt(); else if (tag == "unhideTracks") MusEGlobal::config.unhideTracks = xml.parseInt(); + else if (tag == "smartFocus") + MusEGlobal::config.smartFocus = xml.parseInt(); // ---- the following only skips obsolete entries ---- else if ((tag == "arranger") || (tag == "geometryPianoroll") || (tag == "geometryDrumedit")) xml.skip(tag); else if (tag == "mixerVisible") - // MusEGlobal::config.mixerVisible = xml.parseInt(); // Obsolete xml.skip(tag); else if (tag == "geometryMixer") - // MusEGlobal::config.geometryMixer = readGeometry(xml, tag); // Obsolete xml.skip(tag); else if (tag == "txDeviceId") - //txDeviceId = xml.parseInt(); xml.parseInt(); else if (tag == "rxDeviceId") - //rxDeviceId = xml.parseInt(); xml.parseInt(); else if (tag == "txSyncPort") - //txSyncPort= xml.parseInt(); xml.parseInt(); else if (tag == "rxSyncPort") - //rxSyncPort= xml.parseInt(); xml.parseInt(); - else if (tag == "syncgentype") { - // for compatibility - //int syncGenType= xml.parseInt(); - //genMTCSync = syncGenType == 1; - //genMCSync = syncGenType == 2; + else if (tag == "syncgentype") xml.parseInt(); - } else if (tag == "genMTCSync") - //genMTCSync = xml.parseInt(); xml.parseInt(); else if (tag == "genMCSync") - //genMCSync = xml.parseInt(); xml.parseInt(); else if (tag == "genMMC") - //genMMC = xml.parseInt(); xml.parseInt(); else if (tag == "acceptMTC") - //acceptMTC = xml.parseInt(); xml.parseInt(); else if (tag == "acceptMMC") - //acceptMMC = xml.parseInt(); xml.parseInt(); else if (tag == "acceptMC") - //acceptMC = xml.parseInt(); xml.parseInt(); else if ((tag == "samplerate") || (tag == "segmentsize") || (tag == "segmentcount")) xml.parseInt(); @@ -1164,8 +1063,6 @@ static void writeSeqConfiguration(int level, Xml& xml, bool writePortInfo) // This prevents bogus routes from being saved and propagated in the med file. // Hmm tough decision, should we save if no device? That would preserve routes in case user upgrades HW, // or ALSA reorders or renames devices etc etc, then we have at least kept the track <-> port routes. - //if(((!mport->noInRoute() || !mport->noOutRoute()) && dev) || - //mport->defaultInChannels() || mport->defaultOutChannels() || mport->defaultInChannels() != (1<defaultOutChannels() || (!mport->instrument()->iname().isEmpty() && mport->instrument()->iname() != "GM") || @@ -1189,7 +1086,6 @@ static void writeSeqConfiguration(int level, Xml& xml, bool writePortInfo) continue; xml.tag(level++, "midiport idx=\"%d\"", i); - //if(mport->defaultInChannels()) if(mport->defaultInChannels() != (1<defaultInChannels()); if(mport->defaultOutChannels()) @@ -1202,14 +1098,9 @@ static void writeSeqConfiguration(int level, Xml& xml, bool writePortInfo) if (dev) { xml.strTag(level, "name", dev->name()); - //if(dynamic_cast(dev)) if(dev->deviceType() != MidiDevice::ALSA_MIDI) - //xml.intTag(level, "type", MidiDevice::JACK_MIDI); xml.intTag(level, "type", dev->deviceType()); - // Changed by T356. "record" is old and by mistake written as rwFlags here. - // openFlags was read before, but never written here. - //xml.intTag(level, "record", dev->rwFlags() & 0x2 ? 1 : 0); xml.intTag(level, "openFlags", dev->openFlags()); if(dev->deviceType() == MidiDevice::JACK_MIDI) @@ -1282,8 +1173,6 @@ void MusE::writeGlobalConfiguration(int level, MusECore::Xml& xml) const xml.uintTag(level, "minControlProcessPeriod", MusEGlobal::config.minControlProcessPeriod); xml.intTag(level, "guiRefresh", MusEGlobal::config.guiRefresh); - // Removed by Orcan. 20101220 - //xml.strTag(level, "helpBrowser", config.helpBrowser); xml.intTag(level, "extendedMidi", MusEGlobal::config.extendedMidi); xml.intTag(level, "midiExportDivision", MusEGlobal::config.midiDivision); xml.intTag(level, "guiDivision", MusEGlobal::config.guiDivision); @@ -1307,8 +1196,6 @@ void MusE::writeGlobalConfiguration(int level, MusECore::Xml& xml) const xml.intTag(level, "midiFilterCtrl3", MusEGlobal::midiFilterCtrl3); xml.intTag(level, "midiFilterCtrl4", MusEGlobal::midiFilterCtrl4); - //xml.intTag(level, "txDeviceId", txDeviceId); - //xml.intTag(level, "rxDeviceId", rxDeviceId); xml.strTag(level, "theme", MusEGlobal::config.style); xml.strTag(level, "styleSheetFile", MusEGlobal::config.styleSheetFile); xml.strTag(level, "externalWavEditor", MusEGlobal::config.externalWavEditor); @@ -1317,6 +1204,7 @@ void MusE::writeGlobalConfiguration(int level, MusECore::Xml& xml) const xml.intTag(level, "popupsDefaultStayOpen", MusEGlobal::config.popupsDefaultStayOpen); xml.intTag(level, "leftMouseButtonCanDecrease", MusEGlobal::config.leftMouseButtonCanDecrease); xml.intTag(level, "rangeMarkerWithoutMMB", MusEGlobal::config.rangeMarkerWithoutMMB); + xml.intTag(level, "smartFocus", MusEGlobal::config.smartFocus); xml.intTag(level, "unhideTracks", MusEGlobal::config.unhideTracks); xml.intTag(level, "addHiddenTracks", MusEGlobal::config.addHiddenTracks); @@ -1330,7 +1218,6 @@ void MusE::writeGlobalConfiguration(int level, MusECore::Xml& xml) const xml.intTag(level, "outputTracksVisible", MusECore::AudioOutput::visible()); xml.intTag(level, "synthTracksVisible", MusECore::SynthI::visible()); - //for (int i = 0; i < 6; ++i) { for (int i = 0; i < NUM_FONTS; ++i) { char buffer[32]; sprintf(buffer, "font%d", i); @@ -1384,28 +1271,15 @@ void MusE::writeGlobalConfiguration(int level, MusECore::Xml& xml) const xml.colorTag(level, "auxTrackBg", MusEGlobal::config.auxTrackBg); xml.colorTag(level, "synthTrackBg", MusEGlobal::config.synthTrackBg); - //xml.intTag(level, "txSyncPort", txSyncPort); - //xml.intTag(level, "rxSyncPort", rxSyncPort); xml.intTag(level, "mtctype", MusEGlobal::mtcType); xml.nput(level, "%02d:%02d:%02d:%02d:%02d\n", MusEGlobal::mtcOffset.h(), MusEGlobal::mtcOffset.m(), MusEGlobal::mtcOffset.s(), MusEGlobal::mtcOffset.f(), MusEGlobal::mtcOffset.sf()); - //xml.uintTag(level, "sendClockDelay", MusEGlobal::syncSendFirstClockDelay); - //xml.intTag(level, "useJackTransport", MusEGlobal::useJackTransport); - //xml.intTag(level, "jackTransportMaster", MusEGlobal::jackTransportMaster); MusEGlobal::extSyncFlag.save(level, xml); -// xml.intTag(level, "genMTCSync", genMTCSync); -// xml.intTag(level, "genMCSync", genMCSync); -// xml.intTag(level, "genMMC", genMMC); -// xml.intTag(level, "acceptMTC", acceptMTC); -// xml.intTag(level, "acceptMMC", acceptMMC); -// xml.intTag(level, "acceptMC", acceptMC); - xml.qrectTag(level, "geometryMain", MusEGlobal::config.geometryMain); xml.qrectTag(level, "geometryTransport", MusEGlobal::config.geometryTransport); xml.qrectTag(level, "geometryBigTime", MusEGlobal::config.geometryBigTime); - //xml.qrectTag(level, "geometryMixer", MusEGlobal::config.geometryMixer); // Obsolete xml.intTag(level, "bigtimeVisible", MusEGlobal::config.bigTimeVisible); xml.intTag(level, "transportVisible", MusEGlobal::config.transportVisible); @@ -1464,39 +1338,6 @@ void MusE::writeConfiguration(int level, MusECore::Xml& xml) const xml.intTag(level, "midiFilterCtrl3", MusEGlobal::midiFilterCtrl3); xml.intTag(level, "midiFilterCtrl4", MusEGlobal::midiFilterCtrl4); - //xml.intTag(level, "txDeviceId", txDeviceId); - //xml.intTag(level, "rxDeviceId", rxDeviceId); - - //xml.intTag(level, "txSyncPort", txSyncPort); - /* - // To keep old muse versions happy... - bool mcsync = mmc = mtc = false; - for(int sp = 0; sp < MIDI_PORTS; ++sp) - { - MidiSyncTxPort* txPort = &midiSyncTxPorts[sp]; - if(txPort->doMCSync() || txPort->doMMC() || txPort->doMTC()) - { - if(txPort->doMCSync()) - mcsync = true; - if(txPort->doMMC()) - mmc = true; - if(txPort->doMTC()) - mtc = true; - xml.intTag(level, "txSyncPort", sp); - break; - } - } - */ - - //xml.tag(level++, "midiSyncInfo"); - //for(iMusECore::MidiDevice id = MusECore::MusEGlobal::midiDevices.begin(); id != MusECore::MusEGlobal::midiDevices.end(); ++id) - //{ - // MusECore::MidiDevice* md = *id; - // md->syncInfo().write(level, xml, md); - //} - //xml.etag(level, "midiSyncInfo"); - - //xml.intTag(level, "rxSyncPort", rxSyncPort); xml.intTag(level, "mtctype", MusEGlobal::mtcType); xml.nput(level, "%02d:%02d:%02d:%02d:%02d\n", MusEGlobal::mtcOffset.h(), MusEGlobal::mtcOffset.m(), MusEGlobal::mtcOffset.s(), @@ -1506,16 +1347,9 @@ void MusE::writeConfiguration(int level, MusECore::Xml& xml) const xml.intTag(level, "jackTransportMaster", MusEGlobal::jackTransportMaster); MusEGlobal::extSyncFlag.save(level, xml); -// xml.intTag(level, "genMTCSync", genMTCSync); -// xml.intTag(level, "genMCSync", genMCSync); -// xml.intTag(level, "genMMC", genMMC); -// xml.intTag(level, "acceptMTC", acceptMTC); -// xml.intTag(level, "acceptMMC", acceptMMC); -// xml.intTag(level, "acceptMC", acceptMC); - xml.intTag(level, "bigtimeVisible", viewBigtimeAction->isChecked()); xml.intTag(level, "transportVisible", viewTransportAction->isChecked()); - + xml.geometryTag(level, "geometryMain", this); // FINDME: maybe remove this? do we want // the main win to jump around when loading? if (transport) @@ -1552,7 +1386,6 @@ void MusE::writeConfiguration(int level, MusECore::Xml& xml) const void MusE::configMidiSync() { if (!midiSyncConfig) - //midiSyncConfig = new MusEGui::MidiSyncConfig(this); midiSyncConfig = new MusEGui::MidiSyncConfig; if (midiSyncConfig->isVisible()) { @@ -1734,11 +1567,9 @@ void MixerConfig::read(MusECore::Xml& xml) else if (tag == "showSyntiTracks") showSyntiTracks = xml.parseInt(); else - //xml.unknown(name.toLatin1().constData()); xml.unknown("Mixer"); break; case MusECore::Xml::TagEnd: - //if (tag == name) if (tag == "Mixer") return; default: diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index 0acb8f64..d3aef647 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -112,7 +112,6 @@ void MPConfig::changeDefInputRoutes(QAction* act) if(defch) MusEGlobal::audio->msgAddRoute(MusECore::Route(no, defch), MusECore::Route(*it, defch)); } - //MusEGlobal::audio->msgUpdateSoloStates(); MusEGlobal::song->update(SC_ROUTE); } } @@ -153,9 +152,9 @@ void MPConfig::changeDefOutputRoutes(QAction* act) return; int actid = act->data().toInt(); int defch = MusEGlobal::midiPorts[no].defaultOutChannels(); - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS?? #if 0 - int allch = (1 << MIDI_CHANNELS) - 1; + int allch = (1 << MIDI_CHANNELS) - 1; #endif if(actid == MIDI_CHANNELS + 1) // Apply to all tracks now. @@ -164,6 +163,12 @@ void MPConfig::changeDefOutputRoutes(QAction* act) // Tested: Hmm, allow ports with no device since that is a valid situation. if(!MusEGlobal::song->midis()->empty()) // && MusEGlobal::midiPorts[no].device()) { + // Turn off if and when multiple output routes are supported. + #if 1 + if(!defch) // No channels selected? Just return. + return; + #endif + int ret = QMessageBox::question(this, tr("Default output connections"), tr("Are you sure you want to apply to all existing midi tracks now?"), QMessageBox::Ok | QMessageBox::Cancel, @@ -171,7 +176,7 @@ void MPConfig::changeDefOutputRoutes(QAction* act) if(ret == QMessageBox::Ok) { MusECore::MidiTrackList* mtl = MusEGlobal::song->midis(); - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS?? #if 0 for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) { @@ -208,7 +213,7 @@ void MPConfig::changeDefOutputRoutes(QAction* act) } else { - #if 0 // Turn on if and when multiple output routes are supported. + #if 0 // Turn on if and when multiple output routes are supported. DELETETHIS?? int chbits; if(actid == MIDI_CHANNELS) // Toggle all. { @@ -229,21 +234,31 @@ void MPConfig::changeDefOutputRoutes(QAction* act) if(actid < MIDI_CHANNELS) { int chbits = 1 << actid; - // Multiple out routes not supported. Make the setting exclusive to this port - exclude all other ports. - MusECore::setPortExclusiveDefOutChan(no, chbits); - int j = mdevView->rowCount(); - for(int i = 0; i < j; ++i) - mdevView->item(i, DEVCOL_DEF_OUT_CHANS)->setText(MusECore::bitmap2String(i == no ? chbits : 0)); - if(defpup) + // Are we toggling off? + if(chbits & defch) { - QAction* a; - for(int i = 0; i < MIDI_CHANNELS; ++i) + // Just clear this port's default channels. + MusEGlobal::midiPorts[no].setDefaultOutChannels(0); + mdevView->item(item->row(), DEVCOL_DEF_OUT_CHANS)->setText(MusECore::bitmap2String(0)); + } + else + { + // Multiple out routes not supported. Make the setting exclusive to this port - exclude all other ports. + MusECore::setPortExclusiveDefOutChan(no, chbits); + int j = mdevView->rowCount(); + for(int i = 0; i < j; ++i) + mdevView->item(i, DEVCOL_DEF_OUT_CHANS)->setText(MusECore::bitmap2String(i == no ? chbits : 0)); + if(defpup) { - a = defpup->findActionFromData(i); - if(a) - a->setChecked(i == actid); + QAction* a; + for(int i = 0; i < MIDI_CHANNELS; ++i) + { + a = defpup->findActionFromData(i); + if(a) + a->setChecked(i == actid); + } } - } + } } #endif } @@ -257,13 +272,12 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) { int col = item->column(); QString s = item->text(); - //printf("MPConfig::mdevViewItemRenamed col:%d txt:%s\n", col, s.toLatin1().constData()); if(item == 0) return; switch(col) { // Enabled: Use editor (Not good - only responds if text changed. We need to respond always). - // Disabled: Use pop-up menu. + // Disabled: Use pop-up menu. DELETETHIS? #if 0 case DEVCOL_DEF_IN_CHANS: { @@ -284,7 +298,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) QMessageBox::No); if(ret == QMessageBox::Yes) { - MusECore::MidiTrackList* mtl = MusEGlobal::song->midis(); + MusECore::MidiTrackList* mtl = MusEGlobal::song->midis(); for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) { // Remove all routes from this port to the tracks first. @@ -301,7 +315,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) // Enabled: Use editor (Not good - only responds if text changed. We need to respond always). // Disabled: Use pop-up menu. - // Only turn on if and when multiple output routes are supported. + // Only turn on if and when multiple output routes are supported. DELETETHIS? #if 0 case DEVCOL_DEF_OUT_CHANS: { @@ -368,7 +382,6 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) } break; default: - //printf("MPConfig::mdevViewItemRenamed unknown column clicked col:%d txt:%s\n", col, s.toLatin1().constData()); break; } } @@ -402,16 +415,10 @@ void MPConfig::rbClicked(QTableWidgetItem* item) case DEVCOL_GUI: if (dev == 0) return; - //if (port->hasGui()) if (port->hasNativeGui()) { - //bool v = port->nativeGuiVisible() - //port->instrument()->showGui(!port->guiVisible()); port->instrument()->showNativeGui(!port->nativeGuiVisible()); - //port->instrument()->showNativeGui(!v); - //item->setIcon(port->guiVisible() ? QIcon(*dotIcon) : QIcon(*dothIcon)); item->setIcon(port->nativeGuiVisible() ? QIcon(*dotIcon) : QIcon(*dothIcon)); - //item->setIcon(!v ? QIcon(*dotIcon) : QIcon(*dothIcon)); } return; @@ -428,12 +435,12 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(dev->openFlags() & 2) { item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setIcon(QIcon(*buttondownIcon)); - item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setText(tr("in")); - } + item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setText(tr("in")); + } else { item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setIcon(QIcon()); - item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setText(""); + item->tableWidget()->item(item->row(), DEVCOL_INROUTES)->setText(""); } } return; @@ -451,12 +458,12 @@ void MPConfig::rbClicked(QTableWidgetItem* item) if(dev->openFlags() & 1) { item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setIcon(QIcon(*buttondownIcon)); - item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText(tr("out")); + item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText(tr("out")); } else { item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setIcon(QIcon()); - item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText(""); + item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText(""); } } return; @@ -474,16 +481,12 @@ void MPConfig::rbClicked(QTableWidgetItem* item) return; // Only Jack midi devices. - //MusECore::MidiJackDevice* mjd = dynamic_cast(dev); - //if(!mjd) if(dev->deviceType() != MusECore::MidiDevice::JACK_MIDI) return; - //if(!(dev->rwFlags() & ((col == DEVCOL_OUTROUTES) ? 1 : 2))) if(!(dev->openFlags() & ((col == DEVCOL_OUTROUTES) ? 1 : 2))) return; - //MusECore::RouteList* rl = (dev->rwFlags() & 1) ? dev->outRoutes() : dev->inRoutes(); MusECore::RouteList* rl = (col == DEVCOL_OUTROUTES) ? dev->outRoutes() : dev->inRoutes(); QMenu* pup = 0; int gid = 0; @@ -495,53 +498,40 @@ void MPConfig::rbClicked(QTableWidgetItem* item) gid = 0; // Jack input ports if device is writable, and jack output ports if device is readable. - //sl = (dev->rwFlags() & 1) ? MusEGlobal::audioDevice->inputPorts(true, _showAliases) : MusEGlobal::audioDevice->outputPorts(true, _showAliases); sl = (col == DEVCOL_OUTROUTES) ? MusEGlobal::audioDevice->inputPorts(true, _showAliases) : MusEGlobal::audioDevice->outputPorts(true, _showAliases); - //for (int i = 0; i < channel; ++i) - //{ - //char buffer[128]; - //snprintf(buffer, 128, "%s %d", tr("Channel").toLatin1().constData(), i+1); - //MenuTitleItem* titel = new MenuTitleItem(QString(buffer)); - //pup->insertItem(titel); - - QAction* act; - - act = pup->addAction(tr("Show first aliases")); - act->setData(gid); - act->setCheckable(true); - act->setChecked(_showAliases == 0); - ++gid; - - act = pup->addAction(tr("Show second aliases")); + QAction* act; + + act = pup->addAction(tr("Show first aliases")); + act->setData(gid); + act->setCheckable(true); + act->setChecked(_showAliases == 0); + ++gid; + + act = pup->addAction(tr("Show second aliases")); + act->setData(gid); + act->setCheckable(true); + act->setChecked(_showAliases == 1); + ++gid; + + pup->addSeparator(); + for(std::list::iterator ip = sl.begin(); ip != sl.end(); ++ip) + { + act = pup->addAction(*ip); act->setData(gid); act->setCheckable(true); - act->setChecked(_showAliases == 1); - ++gid; - pup->addSeparator(); - for(std::list::iterator ip = sl.begin(); ip != sl.end(); ++ip) + MusECore::Route rt(*ip, (col == DEVCOL_OUTROUTES), -1, MusECore::Route::JACK_ROUTE); + for(MusECore::ciRoute ir = rl->begin(); ir != rl->end(); ++ir) { - act = pup->addAction(*ip); - act->setData(gid); - act->setCheckable(true); - - //MusECore::Route dst(*ip, true, i); - //MusECore::Route rt(*ip, (dev->rwFlags() & 1), -1, MusECore::Route::JACK_ROUTE); - MusECore::Route rt(*ip, (col == DEVCOL_OUTROUTES), -1, MusECore::Route::JACK_ROUTE); - for(MusECore::ciRoute ir = rl->begin(); ir != rl->end(); ++ir) + if (*ir == rt) { - if (*ir == rt) - { - act->setChecked(true); - break; - } + act->setChecked(true); + break; } - ++gid; } - //if (i+1 != channel) - // pup->insertSeparator(); - //} + ++gid; + } act = pup->exec(ppt); if(act) @@ -549,7 +539,6 @@ void MPConfig::rbClicked(QTableWidgetItem* item) n = act->data().toInt(); if(n == 0) // Show first aliases { - //delete pup; if(_showAliases == 0) _showAliases = -1; else @@ -559,7 +548,6 @@ void MPConfig::rbClicked(QTableWidgetItem* item) else if(n == 1) // Show second aliases { - //delete pup; if(_showAliases == 1) _showAliases = -1; else @@ -569,7 +557,6 @@ void MPConfig::rbClicked(QTableWidgetItem* item) QString s(act->text()); - //if(dev->rwFlags() & 1) // Writeable if(col == DEVCOL_OUTROUTES) // Writeable { MusECore::Route srcRoute(dev, -1); @@ -589,8 +576,6 @@ void MPConfig::rbClicked(QTableWidgetItem* item) MusEGlobal::audio->msgAddRoute(srcRoute, dstRoute); } else - //if(dev->rwFlags() & 2) // Readable - //if(col == DEVCOL_INROUTES) // Readable { MusECore::Route srcRoute(s, false, -1, MusECore::Route::JACK_ROUTE); MusECore::Route dstRoute(dev, -1); @@ -612,24 +597,16 @@ void MPConfig::rbClicked(QTableWidgetItem* item) MusEGlobal::audio->msgUpdateSoloStates(); MusEGlobal::song->update(SC_ROUTE); - //delete pup; // FIXME: // Routes can't be re-read until the message sent from msgAddRoute1() // has had time to be sent and actually affected the routes. - ///goto _redisplay; // Go back + //goto _redisplay; // Go back } delete pup; - //iR->setDown(false); // pup->exec() catches mouse release event } - //break; return; case DEVCOL_DEF_IN_CHANS: - // Enabled: Use editor (Not good - only responds if text changed. We need to respond always). - // Disabled: Use pop-up menu. - #if 0 - return; - #else { defpup = new MusEGui::PopupMenu(this, true); defpup->addAction(new MusEGui::MenuTitleItem("Channel", defpup)); @@ -651,9 +628,10 @@ void MPConfig::rbClicked(QTableWidgetItem* item) act->setData(MIDI_CHANNELS + 1); // Enable only if there are tracks, and port has a device. // Tested: Hmm, allow ports with no device since that is a valid situation. - act->setEnabled(!MusEGlobal::song->midis()->empty()); // && MusEGlobal::midiPorts[no].device()); + act->setEnabled(!MusEGlobal::song->midis()->empty()); // && MusEGlobal::midiPorts[no].device()); DELETETHIS connect(defpup, SIGNAL(triggered(QAction*)), SLOT(changeDefInputRoutes(QAction*))); + // DELETETHIS 2 //connect(defpup, SIGNAL(aboutToHide()), MusEGlobal::muse, SLOT(routingPopupMenuAboutToHide())); //defpup->popup(QCursor::pos()); defpup->exec(QCursor::pos()); @@ -661,15 +639,8 @@ void MPConfig::rbClicked(QTableWidgetItem* item) defpup = 0; } return; - #endif case DEVCOL_DEF_OUT_CHANS: - // Enabled: Use editor (Not good - only responds if text changed. We need to respond always). - // Disabled: Use pop-up menu. - // Only turn on if and when multiple output routes are supported. - #if 0 - return; - #else { defpup = new MusEGui::PopupMenu(this, true); defpup->addAction(new MusEGui::MenuTitleItem("Channel", defpup)); @@ -683,7 +654,7 @@ void MPConfig::rbClicked(QTableWidgetItem* item) act->setChecked((1 << i) & chbits); } - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 act = defpup->addAction(tr("Toggle all")); act->setData(MIDI_CHANNELS); @@ -697,27 +668,21 @@ void MPConfig::rbClicked(QTableWidgetItem* item) act->setEnabled(!MusEGlobal::song->midis()->empty()); // && MusEGlobal::midiPorts[no].device()); connect(defpup, SIGNAL(triggered(QAction*)), SLOT(changeDefOutputRoutes(QAction*))); - //connect(defpup, SIGNAL(aboutToHide()), MusEGlobal::muse, SLOT(routingPopupMenuAboutToHide())); - //defpup->popup(QCursor::pos()); defpup->exec(QCursor::pos()); delete defpup; defpup = 0; } return; - #endif case DEVCOL_NAME: { - //printf("MPConfig::rbClicked DEVCOL_NAME\n"); - // Did we click in the text area? if((mousepos.x() - ppt.x()) > buttondownIcon->width()) { - //printf("MPConfig::rbClicked starting item rename... enabled?:%d\n", item->renameEnabled(DEVCOL_NAME)); // Start the renaming of the cell... - QModelIndex current = item->tableWidget()->currentIndex(); - if (item->flags() & Qt::ItemIsEditable) - item->tableWidget()->edit(current.sibling(current.row(), DEVCOL_NAME)); + QModelIndex current = item->tableWidget()->currentIndex(); + if (item->flags() & Qt::ItemIsEditable) + item->tableWidget()->edit(current.sibling(current.row(), DEVCOL_NAME)); return; } @@ -748,20 +713,14 @@ void MPConfig::rbClicked(QTableWidgetItem* item) int six = 0x30000000; for(MusECore::iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) { - //devALSA = dynamic_cast(*i); - //if(devALSA) if((*i)->deviceType() == MusECore::MidiDevice::ALSA_MIDI) { - //mapALSA.insert( std::pair (std::string(devALSA->name().lower().toLatin1().constData()), ii) ); mapALSA.insert( std::pair (std::string((*i)->name().toLatin1().constData()), aix) ); ++aix; } else if((*i)->deviceType() == MusECore::MidiDevice::JACK_MIDI) { - //devJACK = dynamic_cast(*i); - //if(devJACK) - //mapJACK.insert( std::pair (std::string(devJACK->name().lower().toLatin1().constData()), ii) ); mapJACK.insert( std::pair (std::string((*i)->name().toLatin1().constData()), jix) ); ++jix; } @@ -775,31 +734,27 @@ void MPConfig::rbClicked(QTableWidgetItem* item) printf("MPConfig::rbClicked unknown midi device: %s\n", (*i)->name().toLatin1().constData()); } - //int sz = MusEGlobal::midiDevices.size(); - //if(!mapALSA.empty()) + pup->addSeparator(); + pup->addAction(new MusEGui::MenuTitleItem("ALSA:", pup)); + + for(imap i = mapALSA.begin(); i != mapALSA.end(); ++i) { - pup->addSeparator(); - pup->addAction(new MusEGui::MenuTitleItem("ALSA:", pup)); - - for(imap i = mapALSA.begin(); i != mapALSA.end(); ++i) + int idx = i->second; + //if(idx > sz) // Sanity check DELETETHIS 2 + // continue; + QString s(i->first.c_str()); + MusECore::MidiDevice* md = MusEGlobal::midiDevices.find(s, MusECore::MidiDevice::ALSA_MIDI); + if(md) { - int idx = i->second; - //if(idx > sz) // Sanity check - // continue; - QString s(i->first.c_str()); - MusECore::MidiDevice* md = MusEGlobal::midiDevices.find(s, MusECore::MidiDevice::ALSA_MIDI); - if(md) - { - //if(!dynamic_cast(md)) - if(md->deviceType() != MusECore::MidiDevice::ALSA_MIDI) - continue; - - act = pup->addAction(md->name()); - act->setData(idx); - act->setCheckable(true); - act->setChecked(md == dev); - } - } + //if(!dynamic_cast(md)) DELETETHIS + if(md->deviceType() != MusECore::MidiDevice::ALSA_MIDI) + continue; + + act = pup->addAction(md->name()); + act->setData(idx); + act->setCheckable(true); + act->setChecked(md == dev); + } } if(!mapSYNTH.empty()) @@ -810,13 +765,10 @@ void MPConfig::rbClicked(QTableWidgetItem* item) for(imap i = mapSYNTH.begin(); i != mapSYNTH.end(); ++i) { int idx = i->second; - //if(idx > sz) - // continue; QString s(i->first.c_str()); MusECore::MidiDevice* md = MusEGlobal::midiDevices.find(s, MusECore::MidiDevice::SYNTH_MIDI); if(md) { - //if(!dynamic_cast(md)) if(md->deviceType() != MusECore::MidiDevice::SYNTH_MIDI) continue; @@ -828,42 +780,34 @@ void MPConfig::rbClicked(QTableWidgetItem* item) } } - //if(!mapJACK.empty()) + pup->addSeparator(); + pup->addAction(new MusEGui::MenuTitleItem("JACK:", pup)); + + for(imap i = mapJACK.begin(); i != mapJACK.end(); ++i) { - pup->addSeparator(); - pup->addAction(new MusEGui::MenuTitleItem("JACK:", pup)); - - for(imap i = mapJACK.begin(); i != mapJACK.end(); ++i) + int idx = i->second; + QString s(i->first.c_str()); + MusECore::MidiDevice* md = MusEGlobal::midiDevices.find(s, MusECore::MidiDevice::JACK_MIDI); + if(md) { - int idx = i->second; - //if(idx > sz) - // continue; - QString s(i->first.c_str()); - MusECore::MidiDevice* md = MusEGlobal::midiDevices.find(s, MusECore::MidiDevice::JACK_MIDI); - if(md) - { - //if(!dynamic_cast(md)) - if(md->deviceType() != MusECore::MidiDevice::JACK_MIDI) - continue; - - act = pup->addAction(md->name()); - act->setData(idx); - act->setCheckable(true); - act->setChecked(md == dev); - } - } - } + if(md->deviceType() != MusECore::MidiDevice::JACK_MIDI) + continue; + + act = pup->addAction(md->name()); + act->setData(idx); + act->setCheckable(true); + act->setChecked(md == dev); + } + } act = pup->exec(ppt); if(!act) { delete pup; - //break; return; } n = act->data().toInt(); - //printf("MPConfig::rbClicked n:%d\n", n); MusECore::MidiDevice* sdev = 0; if(n < 0x10000000) @@ -891,11 +835,9 @@ void MPConfig::rbClicked(QTableWidgetItem* item) int typ; if(n < 0x20000000) typ = MusECore::MidiDevice::ALSA_MIDI; - else - if(n < 0x30000000) + else if(n < 0x30000000) typ = MusECore::MidiDevice::JACK_MIDI; - else - //if(n < 0x40000000) + else //if(n < 0x40000000) typ = MusECore::MidiDevice::SYNTH_MIDI; sdev = MusEGlobal::midiDevices.find(act->text(), typ); @@ -918,13 +860,10 @@ void MPConfig::rbClicked(QTableWidgetItem* item) for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) MusEGlobal::audio->msgRemoveRoute(MusECore::Route(i, allch), MusECore::Route(*it, allch)); - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) MusEGlobal::audio->msgRemoveRoute(MusECore::Route(no, allch), MusECore::Route(*it, allch)); - - //MusEGlobal::audio->msgUpdateSoloStates(); - //MusEGlobal::song->update(SC_ROUTE); #endif break; @@ -936,13 +875,10 @@ void MPConfig::rbClicked(QTableWidgetItem* item) for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) // Remove all routes from this port to the tracks. MusEGlobal::audio->msgRemoveRoute(MusECore::Route(no, allch), MusECore::Route(*it, allch)); - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) MusEGlobal::audio->msgRemoveRoute(MusECore::Route(no, allch), MusECore::Route(*it, allch)); - - //MusEGlobal::audio->msgUpdateSoloStates(); - //MusEGlobal::song->update(SC_ROUTE); #endif MusEGlobal::midiSeq->msgSetMidiDevice(port, sdev); @@ -957,26 +893,20 @@ void MPConfig::rbClicked(QTableWidgetItem* item) { for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) { - // Remove all routes from this port to the tracks first. - //MusEGlobal::audio->msgRemoveRoute(MusECore::Route(no, allch), MusECore::Route(*it, allch)); - // Now connect all the specified routes. + // Connect all the specified routes. if(chbits) MusEGlobal::audio->msgAddRoute(MusECore::Route(no, chbits), MusECore::Route(*it, chbits)); } } chbits = MusEGlobal::midiPorts[no].defaultOutChannels(); - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 for(MusECore::iMidiTrack it = mtl->begin(); it != mtl->end(); ++it) { - // Remove all routes from this port to the tracks first. - //MusEGlobal::audio->msgRemoveRoute(MusECore::Route(no, allch), MusECore::Route(*it, allch)); - // Now connect all the specified routes. + // Connect all the specified routes. if(chbits) MusEGlobal::audio->msgAddRoute(MusECore::Route(no, chbits), MusECore::Route(*it, chbits)); } - //MusEGlobal::audio->msgUpdateSoloStates(); - //MusEGlobal::song->update(SC_ROUTE); #else for(int ch = 0; ch < MIDI_CHANNELS; ++ch) if(chbits & (1 << ch)) @@ -991,29 +921,21 @@ void MPConfig::rbClicked(QTableWidgetItem* item) (*it)->setOutPortAndChannelAndUpdate(no, ch); } MusEGlobal::audio->msgIdle(false); - //MusEGlobal::audio->msgUpdateSoloStates(); - //MusEGlobal::song->update(SC_MIDI_TRACK_PROP); - // Stop at the first output channel found. break; } #endif } - //MusEGlobal::audio->msgUpdateSoloStates(); - ////MusEGlobal::song->update(SC_ROUTE); - MusEGlobal::audio->msgUpdateSoloStates(); MusEGlobal::song->update(); } } - //break; return; case DEVCOL_INSTR: { if (dev && dev->isSynti()) - //break; return; if (instrPopup == 0) instrPopup = new QMenu(this); @@ -1033,10 +955,9 @@ void MPConfig::rbClicked(QTableWidgetItem* item) QAction* act = instrPopup->exec(ppt); if(!act) - //break; return; QString s = act->text(); - item->tableWidget()->item(item->row(), DEVCOL_INSTR)->setText(s); + item->tableWidget()->item(item->row(), DEVCOL_INSTR)->setText(s); for (MusECore::iMidiInstrument i = MusECore::midiInstruments.begin(); i != MusECore::midiInstruments.end(); ++i) { if ((*i)->iname() == s) { @@ -1046,10 +967,8 @@ void MPConfig::rbClicked(QTableWidgetItem* item) } MusEGlobal::song->update(); } - //break; return; } - //songChanged(-1); } //--------------------------------------------------------- @@ -1065,11 +984,10 @@ void MPConfig::setToolTip(QTableWidgetItem *item, int col) case DEVCOL_PLAY: item->setToolTip(tr("Enable writing")); break; case DEVCOL_INSTR: item->setToolTip(tr("Port instrument")); break; case DEVCOL_NAME: item->setToolTip(tr("Midi device name. Click to edit (Jack)")); break; - //case DEVCOL_ROUTES: item->setToolTip(tr("Jack midi ports")); break; case DEVCOL_INROUTES: item->setToolTip(tr("Connections from Jack Midi outputs")); break; case DEVCOL_OUTROUTES: item->setToolTip(tr("Connections to Jack Midi inputs")); break; case DEVCOL_DEF_IN_CHANS: item->setToolTip(tr("Auto-connect these channels to new midi tracks")); break; - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 case DEVCOL_DEF_OUT_CHANS: item->setToolTip(tr("Auto-connect new midi tracks to these channels")); break; #else @@ -1100,23 +1018,14 @@ void MPConfig::setWhatsThis(QTableWidgetItem *item, int col) " this port number. Click to edit Jack midi name.")); break; case DEVCOL_INSTR: item->setWhatsThis(tr("Instrument connected to port")); break; - //case DEVCOL_ROUTES: - // item->setWhatsThis(tr("Jack midi ports")); break; case DEVCOL_INROUTES: item->setWhatsThis(tr("Connections from Jack Midi output ports")); break; case DEVCOL_OUTROUTES: item->setWhatsThis(tr("Connections to Jack Midi input ports")); break; case DEVCOL_DEF_IN_CHANS: - //item->setWhatsThis(tr("Auto-connect these channels, on this port, to new midi tracks.\n" - // "Example:\n" - // " 1 2 3 channel 1 2 and 3\n" - // " 1-3 same\n" - // " 1-3 5 channel 1 2 3 and 5\n" - // " all all channels\n" - // " none no channels")); break; item->setWhatsThis(tr("Auto-connect these channels, on this port, to new midi tracks.")); break; case DEVCOL_DEF_OUT_CHANS: - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 item->setWhatsThis(tr("Connect new midi tracks to these channels, on this port.")); break; #else @@ -1158,11 +1067,8 @@ MPConfig::MPConfig(QWidget* parent) mdevView->setSelectionMode(QAbstractItemView::SingleSelection); mdevView->setShowGrid(false); - //popup = 0; instrPopup = 0; defpup = 0; - //_showAliases = -1; // 0: Show first aliases, if available. Nah, stick with -1: none at first. - //_showAliases = 0; // 0: Show first aliases, if available. _showAliases = 1; // 0: Show second aliases, if available. QStringList columnnames; @@ -1199,7 +1105,6 @@ MPConfig::MPConfig(QWidget* parent) connect(synthList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(addInstanceClicked())); connect(removeInstance, SIGNAL(clicked()), SLOT(removeInstanceClicked())); connect(instanceList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(removeInstanceClicked())); - //songChanged(0); songChanged(SC_CONFIG); } @@ -1224,9 +1129,6 @@ void MPConfig::selectionChanged() void MPConfig::songChanged(int flags) { - // Is it simply a midi controller value adjustment? Forget it. - //if(flags == SC_MIDI_CONTROLLER) - // return; if(!(flags & (SC_CONFIG | SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED))) return; @@ -1235,7 +1137,7 @@ void MPConfig::songChanged(int flags) QTableWidgetItem* sitem = mdevView->currentItem(); if(sitem) { - QString id = sitem->tableWidget()->item(sitem->row(), DEVCOL_NO)->text(); + QString id = sitem->tableWidget()->item(sitem->row(), DEVCOL_NO)->text(); no = atoi(id.toLatin1().constData()) - 1; if(no < 0 || no >= MIDI_PORTS) no = -1; @@ -1251,45 +1153,44 @@ void MPConfig::songChanged(int flags) MusECore::MidiDevice* dev = port->device(); QString s; s.setNum(i+1); - QTableWidgetItem* itemno = new QTableWidgetItem(s); - addItem(i, DEVCOL_NO, itemno, mdevView); - itemno->setTextAlignment(Qt::AlignHCenter); - itemno->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemstate = new QTableWidgetItem(port->state()); - addItem(i, DEVCOL_STATE, itemstate, mdevView); - itemstate->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* iteminstr = new QTableWidgetItem(port->instrument() ? - port->instrument()->iname() : - tr("")); - addItem(i, DEVCOL_INSTR, iteminstr, mdevView); - iteminstr->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemname = new QTableWidgetItem; - addItem(i, DEVCOL_NAME, itemname, mdevView); - itemname->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemgui = new QTableWidgetItem; - addItem(i, DEVCOL_GUI, itemgui, mdevView); - itemgui->setTextAlignment(Qt::AlignHCenter); - itemgui->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemrec = new QTableWidgetItem; - addItem(i, DEVCOL_REC, itemrec, mdevView); - itemrec->setTextAlignment(Qt::AlignHCenter); - itemrec->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemplay = new QTableWidgetItem; - addItem(i, DEVCOL_PLAY, itemplay, mdevView); - itemplay->setTextAlignment(Qt::AlignHCenter); - itemplay->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemout = new QTableWidgetItem; - addItem(i, DEVCOL_OUTROUTES, itemout, mdevView); - itemout->setFlags(Qt::ItemIsEnabled); - QTableWidgetItem* itemin = new QTableWidgetItem; - addItem(i, DEVCOL_INROUTES, itemin, mdevView); - itemin->setFlags(Qt::ItemIsEnabled); - //QTableWidgetItem* itemdefin = new QTableWidgetItem(MusECore::bitmap2String(port->defaultInChannels())); + QTableWidgetItem* itemno = new QTableWidgetItem(s); + addItem(i, DEVCOL_NO, itemno, mdevView); + itemno->setTextAlignment(Qt::AlignHCenter); + itemno->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemstate = new QTableWidgetItem(port->state()); + addItem(i, DEVCOL_STATE, itemstate, mdevView); + itemstate->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* iteminstr = new QTableWidgetItem(port->instrument() ? + port->instrument()->iname() : + tr("")); + addItem(i, DEVCOL_INSTR, iteminstr, mdevView); + iteminstr->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemname = new QTableWidgetItem; + addItem(i, DEVCOL_NAME, itemname, mdevView); + itemname->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemgui = new QTableWidgetItem; + addItem(i, DEVCOL_GUI, itemgui, mdevView); + itemgui->setTextAlignment(Qt::AlignHCenter); + itemgui->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemrec = new QTableWidgetItem; + addItem(i, DEVCOL_REC, itemrec, mdevView); + itemrec->setTextAlignment(Qt::AlignHCenter); + itemrec->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemplay = new QTableWidgetItem; + addItem(i, DEVCOL_PLAY, itemplay, mdevView); + itemplay->setTextAlignment(Qt::AlignHCenter); + itemplay->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemout = new QTableWidgetItem; + addItem(i, DEVCOL_OUTROUTES, itemout, mdevView); + itemout->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem* itemin = new QTableWidgetItem; + addItem(i, DEVCOL_INROUTES, itemin, mdevView); + itemin->setFlags(Qt::ItemIsEnabled); // Ignore synth devices. Default input routes make no sense for them (right now). QTableWidgetItem* itemdefin = new QTableWidgetItem((dev && dev->isSynti()) ? QString() : MusECore::bitmap2String(port->defaultInChannels())); addItem(i, DEVCOL_DEF_IN_CHANS, itemdefin, mdevView); - // Enabled: Use editor (not good). Disabled: Use pop-up menu. + // Enabled: Use editor (not good). Disabled: Use pop-up menu. DELETETHIS #if 0 itemdefin->setFlags((dev && dev->isSynti()) ? Qt::NoItemFlags : Qt::ItemIsEditable | Qt::ItemIsEnabled); # else @@ -1302,13 +1203,12 @@ void MPConfig::songChanged(int flags) } #endif - // Turn on if and when multiple output routes are supported. + // Turn on if and when multiple output routes are supported. DELETETHIS? #if 0 QTableWidgetItem* itemdefout = new QTableWidgetItem(MusECore::bitmap2String(port->defaultOutChannels())); addItem(i, DEVCOL_DEF_OUT_CHANS, itemdefout, mdevView); itemdefout->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled); #else - //QTableWidgetItem* itemdefout = new QTableWidgetItem(QString("--")); QTableWidgetItem* itemdefout = new QTableWidgetItem(MusECore::bitmap2String(0)); defochs = port->defaultOutChannels(); if(defochs) @@ -1333,7 +1233,6 @@ void MPConfig::songChanged(int flags) itemname->setText(dev->name()); // Is it a Jack midi device? Allow renaming. - //if(dynamic_cast(dev)) if (dev->deviceType() == MusECore::MidiDevice::JACK_MIDI) itemname->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled); @@ -1347,46 +1246,38 @@ void MPConfig::songChanged(int flags) itemplay->setIcon(QIcon(QPixmap())); } else { - itemname->setText(tr("")); + itemname->setText(tr("")); itemgui->setIcon(QIcon(*dothIcon)); - itemrec->setIcon(QIcon(QPixmap())); - itemplay->setIcon(QIcon(QPixmap())); + itemrec->setIcon(QIcon(QPixmap())); + itemplay->setIcon(QIcon(QPixmap())); } - //if (port->hasGui()) { - if (port->hasNativeGui()) { - //itemgui->setIcon(port->guiVisible() ? QIcon(*dotIcon) : QIcon(*dothIcon)); + if (port->hasNativeGui()) itemgui->setIcon(port->nativeGuiVisible() ? QIcon(*dotIcon) : QIcon(*dothIcon)); - } - else { - itemgui->setIcon(QIcon(QPixmap())); - } + else + itemgui->setIcon(QIcon(QPixmap())); + if (!(dev && dev->isSynti())) - iteminstr->setIcon(QIcon(*buttondownIcon)); - itemname->setIcon(QIcon(*buttondownIcon)); + iteminstr->setIcon(QIcon(*buttondownIcon)); + + itemname->setIcon(QIcon(*buttondownIcon)); - //if(dev && dynamic_cast(dev)) if(dev && dev->deviceType() == MusECore::MidiDevice::JACK_MIDI) { - //item->setPixmap(DEVCOL_ROUTES, *buttondownIcon); - //item->setText(DEVCOL_ROUTES, tr("routes")); - if(dev->rwFlags() & 1) - //if(dev->openFlags() & 1) { if(dev->openFlags() & 1) { itemout->setIcon(QIcon(*buttondownIcon)); - itemout->setText(tr("out")); + itemout->setText(tr("out")); } } if(dev->rwFlags() & 2) - //if(dev->openFlags() & 2) { if(dev->openFlags() & 2) { itemin->setIcon(QIcon(*buttondownIcon)); - itemin->setText(tr("in")); + itemin->setText(tr("in")); } } } @@ -1405,7 +1296,6 @@ void MPConfig::songChanged(int flags) item->setText(1, MusECore::synthType2String((*i)->synthType())); s.setNum((*i)->instances()); item->setText(2, s); - //item->setTextAlignment(2, Qt::AlignHCenter); item->setText(3, QString((*i)->name())); item->setText(4, QString((*i)->version())); @@ -1422,7 +1312,6 @@ void MPConfig::songChanged(int flags) else s.setNum((*si)->midiPort() + 1); iitem->setText(2, s); - //iitem->setTextAlignment(2, Qt::AlignHCenter); } synthList->resizeColumnToContents(1); mdevView->resizeColumnsToContents(); @@ -1456,7 +1345,7 @@ void MPConfig::addInstanceClicked() MusECore::MidiDevice* dev = port->device(); if (dev==0) { MusEGlobal::midiSeq->msgSetMidiDevice(port, si); - MusEGlobal::muse->changeConfig(true); // save configuration file + MusEGlobal::muse->changeConfig(true); // save configuration file MusEGlobal::song->update(); break; } diff --git a/muse2/muse/confmport.h b/muse2/muse/confmport.h index 5d360319..ce23fd24 100644 --- a/muse2/muse/confmport.h +++ b/muse2/muse/confmport.h @@ -50,7 +50,6 @@ class PopupMenu; class MPConfig : public QDialog, Ui::SynthConfigBase { Q_OBJECT QMenu* instrPopup; - //QMenu* popup; MusEGui::PopupMenu* defpup; int _showAliases; // -1: None. 0: First aliases. 1: Second aliases etc. void setWhatsThis(QTableWidgetItem *item, int col); diff --git a/muse2/muse/controlfifo.cpp b/muse2/muse/controlfifo.cpp index c9ff9ed6..b3b293bb 100644 --- a/muse2/muse/controlfifo.cpp +++ b/muse2/muse/controlfifo.cpp @@ -34,7 +34,6 @@ bool ControlFifo::put(const ControlEvent& event) if (size < CONTROL_FIFO_SIZE) { fifo[wIndex] = event; wIndex = (wIndex + 1) % CONTROL_FIFO_SIZE; - // q_atomic_increment(&size); ++size; return false; } @@ -49,7 +48,6 @@ ControlEvent ControlFifo::get() { ControlEvent event(fifo[rIndex]); rIndex = (rIndex + 1) % CONTROL_FIFO_SIZE; - // q_atomic_decrement(&size); --size; return event; } @@ -71,7 +69,6 @@ const ControlEvent& ControlFifo::peek(int n) void ControlFifo::remove() { rIndex = (rIndex + 1) % CONTROL_FIFO_SIZE; - // q_atomic_decrement(&size); --size; } diff --git a/muse2/muse/ctrl.cpp b/muse2/muse/ctrl.cpp index f9353860..9f94e9df 100644 --- a/muse2/muse/ctrl.cpp +++ b/muse2/muse/ctrl.cpp @@ -27,7 +27,6 @@ #include #include -//#include #include "gconfig.h" #include "fastlog.h" @@ -126,10 +125,6 @@ void CtrlList::assign(const CtrlList& l, int flags) double CtrlList::value(int frame) const { - // Changed by Tim. p4.0.32... - - ///if (!automation || empty()) - /// return _curVal; if(empty()) return _curVal; @@ -137,50 +132,32 @@ double CtrlList::value(int frame) const ciCtrl i = upper_bound(frame); // get the index after current frame if (i == end()) { // if we are past all items just return the last value - ///ciCtrl i = end(); --i; - ///const CtrlVal& val = i->second; - ///_curVal = val.val; rv = i->second.val; } else if(_mode == DISCRETE) { if(i == begin()) { - ///_curVal = _default; - //if(i->second.frame == frame) rv = i->second.val; - //else - // rv = _default; } else { --i; - ///const CtrlVal& val = i->second; - ///_curVal = val.val; rv = i->second.val; } } else { - ///int frame2 = i->second.frame; - ///double val2 = i->second.val; - ///int frame1; - ///double val1; if (i == begin()) { - ///frame1 = 0; - ///val1 = _default; rv = i->second.val; } else { int frame2 = i->second.frame; double val2 = i->second.val; --i; - ///frame1 = i->second.frame; - ///val1 = i->second.val; int frame1 = i->second.frame; double val1 = i->second.val; - ///} - //printf("before val1=%f val2=%f\n", val1,val2); + if (_valueType == VAL_LOG) { val1 = 20.0*fast_log10(val1); if (val1 < MusEGlobal::config.minSlider) @@ -189,7 +166,7 @@ double CtrlList::value(int frame) const if (val2 < MusEGlobal::config.minSlider) val2=MusEGlobal::config.minSlider; } - //printf("after val1=%f val2=%f\n", val1,val2); + frame -= frame1; val2 -= val1; frame2 -= frame1; @@ -198,13 +175,10 @@ double CtrlList::value(int frame) const if (_valueType == VAL_LOG) { val1 = exp10(val1/20.0); } - //printf("after val1=%f\n", val1); - ///_curVal = val1; + rv = val1; } } -// printf("autoVal %d %f\n", frame, _curVal); - ///return _curVal; return rv; } @@ -214,9 +188,6 @@ double CtrlList::value(int frame) const //--------------------------------------------------------- double CtrlList::curVal() const { - //double v = value(Pos(audio->tickPos()).frame()); // p4.0.33 - //double v = value(audio->pos().frame()); // Try this. - //return v; return _curVal; } @@ -226,8 +197,6 @@ double CtrlList::curVal() const void CtrlList::setCurVal(double val) { _curVal = val; - //if (size() < 2) // Removed p4.0.32 - // add(0,val); } //--------------------------------------------------------- @@ -236,7 +205,6 @@ void CtrlList::setCurVal(double val) void CtrlList::add(int frame, double val) { -// printf("add %d %f\n", frame, val); iCtrl e = find(frame); if (e != end()) e->second.val = val; @@ -251,10 +219,9 @@ void CtrlList::add(int frame, double val) void CtrlList::del(int frame) { iCtrl e = find(frame); - if (e == end()) { - //printf("CtrlList::del(%d): not found\n", frame); + if (e == end()) return; - } + erase(e); } @@ -276,14 +243,12 @@ void CtrlList::read(Xml& xml) case Xml::Attribut: if (tag == "id") { - //_id = xml.s2().toInt(); _id = loc.toInt(xml.s2(), &ok); if(!ok) printf("CtrlList::read failed reading _id string: %s\n", xml.s2().toLatin1().constData()); } else if (tag == "cur") { - //_curVal = xml.s2().toDouble(); _curVal = loc.toDouble(xml.s2(), &ok); if(!ok) printf("CtrlList::read failed reading _curVal string: %s\n", xml.s2().toLatin1().constData()); @@ -310,33 +275,6 @@ void CtrlList::read(Xml& xml) break; case Xml::Text: { - // Changed by Tim. Users in some locales reported corrupt reading, - // because of the way floating point is represented (2,3456 not 2.3456). - /* - QByteArray ba = tag.toLatin1(); - const char* s = ba;.constData(); - int frame; - double val; - - for (;;) { - char* endp; - while (*s == ' ' || *s == '\n') - ++s; - if (*s == 0) - break; - frame = strtol(s, &endp, 10); - s = endp; - while (*s == ' ' || *s == '\n') - ++s; - val = strtod(s, &endp); - add(frame, val); - s = endp; - ++s; - } - */ - - //printf("CtrlList::read tag:%s\n", tag.toLatin1().constData()); - int len = tag.length(); int frame; double val; @@ -358,9 +296,6 @@ void CtrlList::read(Xml& xml) if(i == len) break; - // Works OK, but only because if current locale fails it falls back on 'C' locale. - // So, let's skip the fallback and force use of 'C' locale. - //frame = fs.toInt(&ok); frame = loc.toInt(fs, &ok); if(!ok) { @@ -380,9 +315,6 @@ void CtrlList::read(Xml& xml) ++i; } - // Works OK, but only because if current locale fails it falls back on 'C' locale. - // So, let's skip the fallback and force use of 'C' locale. - //val = vs.toDouble(&ok); val = loc.toDouble(vs, &ok); if(!ok) { @@ -390,8 +322,6 @@ void CtrlList::read(Xml& xml) break; } - //printf("CtrlList::read i:%d len:%d fs:%s frame %d: vs:%s val %f \n", i, len, fs.toLatin1().constData(), frame, vs.toLatin1().constData(), val); - add(frame, val); if(i == len) @@ -401,11 +331,7 @@ void CtrlList::read(Xml& xml) break; case Xml::TagEnd: if (xml.s1() == "controller") - { - //printf("CtrlList::read _id:%d _curVal:%f\n", _id, _curVal); - return; - } default: break; } @@ -418,7 +344,6 @@ void CtrlList::read(Xml& xml) void CtrlListList::add(CtrlList* vl) { -// printf("CtrlListList(%p)::add(id=%d) size %d\n", this, vl->id(), size()); insert(std::pair(vl->id(), vl)); } diff --git a/muse2/muse/ctrl.h b/muse2/muse/ctrl.h index 83db1063..53cdcf49 100644 --- a/muse2/muse/ctrl.h +++ b/muse2/muse/ctrl.h @@ -43,7 +43,6 @@ const int AC_VOLUME = 0; const int AC_PAN = 1; const int AC_MUTE = 2; -//inline int genACnum(int plugin, int ctrl) { return (plugin + 1) * AC_PLUGIN_CTL_BASE + ctrl; } inline unsigned long genACnum(unsigned long plugin, unsigned long ctrl) { return (plugin + 1) * AC_PLUGIN_CTL_BASE + ctrl; } enum CtrlValueType { VAL_LOG, VAL_LINEAR, VAL_INT, VAL_BOOL }; @@ -122,8 +121,8 @@ class CtrlList : public std::map > { void setMode(Mode m) { _mode = m; } double getDefault() const { return _default; } void setDefault(double val) { _default = val; } - double curVal() const; /* { return _curVal; } */ - void setCurVal(double val); // { _curVal = val; } + double curVal() const; + void setCurVal(double val); int id() const { return _id; } QString name() const { return _name; } void setName(const QString& s) { _name = s; } diff --git a/muse2/muse/ctrl/ctrlcanvas.cpp b/muse2/muse/ctrl/ctrlcanvas.cpp index ddecdbf6..36990595 100644 --- a/muse2/muse/ctrl/ctrlcanvas.cpp +++ b/muse2/muse/ctrl/ctrlcanvas.cpp @@ -114,7 +114,6 @@ static int computeY(const MusECore::MidiController* mc, int val, int height) CEvent::CEvent(MusECore::Event e, MusECore::MidiPart* pt, int v) { _event = e; - //_state = Normal; _part = pt; _val = v; ex = !e.empty() ? e.tick() : 0; @@ -128,16 +127,11 @@ bool CEvent::intersects(const MusECore::MidiController* mc, const QRect& r, cons { if(_event.empty()) return false; - //int y1 = wh - (_val * wh / 128); int y1 = computeY(mc, _val, wh); int tick1 = _event.tick() + _part->tick(); if(ex == -1) - { - //printf("ex:-1 tick1:%d y1:%d r.x:%d r.y:%d r.w:%d r.h:%d\n", tick1, y1, r.x(), r.y(), r.width(), r.height()); - //return tick1 < (r.x() + r.width()) && y1 >= r.y() && y1 < (r.y() + r.height()); return tick1 < (r.x() + r.width()) && y1 < (r.y() + r.height()); - } int tick2 = ex + _part->tick(); @@ -147,18 +141,10 @@ bool CEvent::intersects(const MusECore::MidiController* mc, const QRect& r, cons // So that's 3 x tickstep for each velocity line. // Hmm, actually, for better pin-point accuracy just use one tickstep for now. if(MusECore::midiControllerType(mc->num()) == MusECore::MidiController::Velo) - { - //tick1 -= tickstep; - //if(tick1 <= 0) - // tick1 = 0; - //tick2 += 2 * tickstep; - tick2 += tickstep; - } QRect er(tick1, y1, tick2 - tick1, wh - y1); - //printf("t1:%d t2:%d ex:%d r.x:%d r.y:%d r.w:%d r.h:%d er.x:%d er.y:%d er.w:%d er.h:%d\n", - // tick1, tick2, ex, r.x(), r.y(), r.width(), r.height(), er.x(), er.y(), er.width(), er.height()); + return r.intersects(er); } @@ -174,7 +160,7 @@ bool CEvent::contains(int x1, int x2) const int tick2 = ex + _part->tick(); return ((tick1 >= x1 && tick1 < x2) - //|| (tick2 >= x1 && tick2 < x2) + //|| (tick2 >= x1 && tick2 < x2) DELETETHIS? || (tick2 > x1 && tick2 < x2) || (tick1 < x1 && tick2 >= x2)); } @@ -210,8 +196,6 @@ CtrlCanvas::CtrlCanvas(MidiEditor* e, QWidget* parent, int xmag, pos[1] = 0; pos[2] = 0; noEvents=false; - //_isFirstMove = true; - //_lastDelta = QPoint(0, 0); if (dynamic_cast(editor) && dynamic_cast(editor)->old_style_drummap_mode()==false) filterTrack=true; @@ -326,8 +310,7 @@ void CtrlCanvas::setPos(int idx, unsigned val, bool adjustScrollbar) void CtrlCanvas::setMidiController(int num) { _cnum = num; - //if(curPart) - partControllers(curPart, _cnum, &_dnum, &_didx, &_controller, &ctrl); + partControllers(curPart, _cnum, &_dnum, &_didx, &_controller, &ctrl); if(_panel) { @@ -364,14 +347,9 @@ QPoint CtrlCanvas::raster(const QPoint& p) const void CtrlCanvas::deselectAll() { for(iCEvent i = selection.begin(); i != selection.end(); ++i) - { - //(*i)->setState(CEvent::Normal); - //if(!(*i)->event().empty()) - // (*i)->event().setSelected(false); (*i)->setSelected(false); - } + selection.clear(); - ///update(); } //--------------------------------------------------------- @@ -380,12 +358,8 @@ void CtrlCanvas::deselectAll() void CtrlCanvas::selectItem(CEvent* e) { - //e->setState(CEvent::Selected); - //if(!e->event().empty()) - // e->event().setSelected(true); e->setSelected(true); selection.push_back(e); - ///update(); } //--------------------------------------------------------- @@ -394,9 +368,6 @@ void CtrlCanvas::selectItem(CEvent* e) void CtrlCanvas::deselectItem(CEvent* e) { - //e->setState(CEvent::Normal); - //if(!e->event().empty()) - // e->event().setSelected(false); e->setSelected(false); for (iCEvent i = selection.begin(); i != selection.end(); ++i) { if (*i == e) { @@ -404,7 +375,6 @@ void CtrlCanvas::deselectItem(CEvent* e) break; } } - ///update(); } //--------------------------------------------------------- @@ -492,18 +462,14 @@ void CtrlCanvas::songChanged(int type) // some other useless calls using SC_CONFIG, which was not used // anywhere else in muse before now, except song header. if((type & (SC_CONFIG | SC_DRUMMAP)) || ((type & (SC_PART_MODIFIED | SC_SELECTION)) && changed)) - { setMidiController(_cnum); - //return; - } if(!curPart) // p4.0.27 return; if(type & (SC_CONFIG | SC_DRUMMAP | SC_PART_MODIFIED | SC_EVENT_INSERTED | SC_EVENT_REMOVED | SC_EVENT_MODIFIED)) // p4.0.18 updateItems(); - else - if(type & SC_SELECTION) + else if(type & SC_SELECTION) updateSelections(); // p4.0.18 } @@ -551,7 +517,6 @@ void CtrlCanvas::partControllers(const MusECore::MidiPart* part, int num, int* d { di = (num & ~0xff) | curDrumPitch; n = (num & ~0xff) | MusEGlobal::drumMap[curDrumPitch].anote; // construct real controller number - //num = (num & ~0xff) | curDrumPitch); // construct real controller number mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[curDrumPitch].port]; } else if ((mt->type() == MusECore::Track::NEW_DRUM) && (curDrumPitch > 0) && ((num & 0xff) == 0xff)) //FINDMICHJETZT does this work? @@ -619,9 +584,7 @@ void CtrlCanvas::updateItems() continue; MusECore::EventList* el = part->events(); - //MusECore::MidiController* mc; MusECore::MidiCtrlValList* mcvl; - //partControllers(part, _cnum, 0, 0, &mc, &mcvl); partControllers(part, _cnum, 0, 0, 0, &mcvl); unsigned len = part->lenTick(); @@ -634,7 +597,6 @@ void CtrlCanvas::updateItems() if(_cnum == MusECore::CTRL_VELOCITY && e.type() == MusECore::Note) { - //printf("CtrlCanvas::updateItems MusECore::CTRL_VELOCITY curDrumPitch:%d\n", curDrumPitch); newev = 0; if (curDrumPitch == -1) // and NOT >0 { @@ -823,7 +785,6 @@ void CtrlCanvas::viewMouseMoveEvent(QMouseEvent* event) break; case DRAG_NEW: - ///newVal(start.x(), pos.x(), pos.y()); newVal(start.x(), start.y(), pos.x(), pos.y()); start = pos; break; @@ -857,11 +818,6 @@ void CtrlCanvas::viewMouseReleaseEvent(QMouseEvent* event) bool ctrlKey = event->modifiers() & Qt::ControlModifier; switch (drag) { - ///case DRAG_RESIZE: - ///case DRAG_NEW: - ///case DRAG_DELETE: - ///MusEGlobal::song->endUndo(SC_EVENT_MODIFIED | SC_EVENT_INSERTED); - ///break; case DRAG_RESIZE: MusEGlobal::song->endUndo(SC_EVENT_MODIFIED); break; @@ -878,36 +834,22 @@ void CtrlCanvas::viewMouseReleaseEvent(QMouseEvent* event) case DRAG_LASSO: if(_controller) // p4.0.27 { - ///if (!ctrlKey) - /// deselectAll(); lasso = lasso.normalized(); int h = height(); - //bool do_redraw = false; int tickstep = rmapxDev(1); for (iCEvent i = items.begin(); i != items.end(); ++i) { if((*i)->part() != curPart) continue; if ((*i)->intersects(_controller, lasso, tickstep, h)) { if (ctrlKey && (*i)->selected()) - { - //if (!ctrlKey) // ctrlKey p4.0.18 - { - ///deselectItem(*i); - //do_redraw = true; - (*i)->setSelected(false); - } - } + (*i)->setSelected(false); else - { - ///selectItem(*i); - //do_redraw = true; - (*i)->setSelected(true); - } + (*i)->setSelected(true); } } drag = DRAG_OFF; // Let songChanged handle the redraw upon SC_SELECTION. - MusEGlobal::song->update(SC_SELECTION); // + MusEGlobal::song->update(SC_SELECTION); } break; @@ -1105,7 +1047,6 @@ void CtrlCanvas::changeVal(int x1, int x2, int y) for (ciCEvent i = items.begin(); i != items.end(); ++i) { if (!(*i)->contains(x1, x2)) - //if (!(*i)->contains(xx1, x2)) continue; CEvent* ev = *i; if(ev->part() != curPart) @@ -1119,8 +1060,7 @@ void CtrlCanvas::changeVal(int x1, int x2, int y) newEvent.setVelo(newval); ev->setEvent(newEvent); // Indicate no undo, and do not do port controller values and clone parts. - MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, false, false); - ///ev->setEvent(newEvent); + MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, false, false); changed = true; } } @@ -1145,8 +1085,7 @@ void CtrlCanvas::changeVal(int x1, int x2, int y) newEvent.setB(nval); ev->setEvent(newEvent); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, true, true); - ///ev->setEvent(newEvent); + MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, true, true); changed = true; } } @@ -1177,7 +1116,6 @@ void CtrlCanvas::newVal(int x1, int y) bool found = false; bool do_redraw = false; - //bool do_selchanged = false; iCEvent ice_tmp; iCEvent prev_ev = items.end(); // End is OK with multi-part, this is just an end 'invalid' marker at first. iCEvent insertPoint = items.end(); // Similar case here. @@ -1188,7 +1126,6 @@ void CtrlCanvas::newVal(int x1, int y) lastpv = ctrl->hwVal(); int partTick = curPart->tick(); - //for (ciCEvent i = items.begin(); i != items.end(); ++i) { for (iCEvent i = items.begin(); i != items.end() ; ) { CEvent* ev = *i; @@ -1207,7 +1144,6 @@ void CtrlCanvas::newVal(int x1, int y) } curPartFound = true; - //int partTick = ev->part()->tick(); MusECore::Event event = ev->event(); if (event.empty()) { @@ -1216,7 +1152,6 @@ void CtrlCanvas::newVal(int x1, int y) continue; } int ax = event.tick() + partTick; - //printf("CtrlCanvas::newVal2 ax:%d xx1:%d xx2:%d len:%d\n", ax, xx1, xx2, curPart->lenTick()); if (ax < xx1) { @@ -1224,31 +1159,17 @@ void CtrlCanvas::newVal(int x1, int y) ++i; continue; } - //if(ax <= xx1) - //{ - // if(type == MusECore::CTRL_PROGRAM && event.dataB() != MusECore::CTRL_VAL_UNKNOWN && ((event.dataB() & 0xffffff) != 0xffffff)) - // lastpv = event.dataB(); - // if(ax < xx1) - // continue; - //} if (ax >= xx2) { insertPoint = i; break; } - // Do not add events which are past the end of the part. - //if(event.tick() >= curPart->lenTick()) - // break; - int nval = newval; if(type == MusECore::CTRL_PROGRAM) { if(event.dataB() == MusECore::CTRL_VAL_UNKNOWN) { - //if(lastpv == MusECore::CTRL_VAL_UNKNOWN) - // lastpv = ctrl->hwVal(); - if(lastpv == MusECore::CTRL_VAL_UNKNOWN) { --nval; @@ -1271,14 +1192,11 @@ void CtrlCanvas::newVal(int x1, int y) { MusECore::Event newEvent = event.clone(); newEvent.setB(nval); - //printf("CtrlCanvas::newVal2 change xx1:%d xx2:%d len:%d\n", xx1, xx2, curPart->lenTick()); ev->setEvent(newEvent); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, true, true); - - ///ev->setEvent(newEvent); + MusEGlobal::audio->msgChangeEvent(event, newEvent, curPart, false, true, true); do_redraw = true; } @@ -1289,11 +1207,9 @@ void CtrlCanvas::newVal(int x1, int y) { // delete event - //printf("CtrlCanvas::newVal2 delete xx1:%d xx2:%d len:%d\n", xx1, xx2, curPart->lenTick()); - deselectItem(ev); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); + MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); delete (ev); i = items.erase(i); @@ -1308,7 +1224,6 @@ void CtrlCanvas::newVal(int x1, int y) } do_redraw = true; // Let songChanged handle the redraw upon SC_SELECTION. - //do_selchanged = true; // prev_ev = i; } @@ -1339,10 +1254,8 @@ void CtrlCanvas::newVal(int x1, int y) else event.setB(newval); - //printf("CtrlCanvas::newVal2 add tick:%d A:%d B:%d\n", tick, event.dataA(), event.dataB()); - // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgAddEvent(event, curPart, false, true, true); + MusEGlobal::audio->msgAddEvent(event, curPart, false, true, true); CEvent* newev = new CEvent(event, curPart, event.dataB()); insertPoint = items.insert(insertPoint, newev); @@ -1448,7 +1361,6 @@ void CtrlCanvas::newVal(int x1, int y1, int x2, int y2) continue; } int x = event.tick() + partTick; - //printf("CtrlCanvas::newVal x:%d xx1:%d xx2:%d len:%d\n", x, xx1, xx2, curPart->lenTick()); if (x < xx1) { @@ -1456,13 +1368,6 @@ void CtrlCanvas::newVal(int x1, int y1, int x2, int y2) ++i; continue; } - //if (x <= xx1) - //{ - // if(type == MusECore::CTRL_PROGRAM && event.dataB() != MusECore::CTRL_VAL_UNKNOWN && ((event.dataB() & 0xffffff) != 0xffffff)) - // lastpv = event.dataB(); - // if (x < xx1) - // continue; - //} if (x >= xx2) { insertPoint = i; @@ -1471,7 +1376,7 @@ void CtrlCanvas::newVal(int x1, int y1, int x2, int y2) deselectItem(ev); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); + MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); delete (ev); i = items.erase(i); @@ -1524,7 +1429,7 @@ void CtrlCanvas::newVal(int x1, int y1, int x2, int y2) event.setB(nval); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgAddEvent(event, curPart, false, true, true); + MusEGlobal::audio->msgAddEvent(event, curPart, false, true, true); CEvent* newev = new CEvent(event, curPart, event.dataB()); insertPoint = items.insert(insertPoint, newev); @@ -1612,7 +1517,7 @@ void CtrlCanvas::deleteVal(int x1, int x2, int) deselectItem(ev); // Indicate no undo, and do port controller values and clone parts. - MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); + MusEGlobal::audio->msgDeleteEvent(event, curPart, false, true, true); delete (ev); i = items.erase(i); @@ -1675,7 +1580,6 @@ void CtrlCanvas::pdrawItems(QPainter& p, const QRect& rect, const MusECore::Midi { CEvent* e = *i; // Draw selected part velocity events on top of unselected part events. - //if((fg && e->part() != part) || (!fg && e->part() == part)) if(e->part() != part) continue; MusECore::Event event = e->event(); @@ -1689,7 +1593,6 @@ void CtrlCanvas::pdrawItems(QPainter& p, const QRect& rect, const MusECore::Midi if(fg) { if(e->selected()) - //if(!event.empty() && event.selected()) p.setPen(QPen(Qt::blue, 3)); else p.setPen(QPen(MusEGlobal::config.ctrlGraphFg, 3)); @@ -1731,14 +1634,12 @@ void CtrlCanvas::pdrawItems(QPainter& p, const QRect& rect, const MusECore::Midi } int x1 = rect.x(); int lval = MusECore::CTRL_VAL_UNKNOWN; - ///noEvents=false; bool selected = false; for (iCEvent i = items.begin(); i != items.end(); ++i) { noEvents=false; CEvent* e = *i; // Draw unselected part controller events (lines) on top of selected part events (bars). - //if((fg && (e->part() == part)) || (!fg && (e->part() != part))) if(e->part() != part) { continue; @@ -1799,13 +1700,11 @@ void CtrlCanvas::pdrawItems(QPainter& p, const QRect& rect, const MusECore::Midi lval = wh - ((val - min - bias) * wh / (max - min)); } selected = e->selected(); - //selected = !ev.empty() && ev.selected(); } if (lval == MusECore::CTRL_VAL_UNKNOWN) { if(!fg) { p.fillRect(x1, 0, (x+w) - x1, wh, Qt::darkGray); - ///noEvents=true; } } else @@ -1816,7 +1715,6 @@ void CtrlCanvas::pdrawItems(QPainter& p, const QRect& rect, const MusECore::Midi p.drawLine(x1, lval, x + w, lval); } else - //p.fillRect(x1, lval, (x+w) - x1, wh - lval, MusEGlobal::config.ctrlGraphFg); p.fillRect(x1, lval, (x+w) - x1, wh - lval, selected ? Qt::blue : MusEGlobal::config.ctrlGraphFg); } } @@ -1873,7 +1771,6 @@ void CtrlCanvas::pdraw(QPainter& p, const QRect& rect) for(MusECore::iPart ip = editor->parts()->begin(); ip != editor->parts()->end(); ++ip) { MusECore::MidiPart* part = (MusECore::MidiPart*)(ip->second); - //if((velo && part == curPart) || (!velo && part != curPart)) if(part == curPart || (filterTrack && part->track() != curTrack)) continue; // Draw items for all parts - other than current part @@ -1944,12 +1841,8 @@ void CtrlCanvas::drawOverlay(QPainter& p) { p.drawText(2 , y * 2, tr("Make the current part's track match the selected drumlist entry")); } - else if (noEvents) { - //p.setFont(MusEGlobal::config.fonts[3]); - //p.setPen(Qt::black); - //p.drawText(width()/2-100,height()/2-10, "Use shift + pencil or line tool to draw new events"); + else if (noEvents) p.drawText(2 , y * 2, tr("Drawing hint: Hold Ctrl to affect only existing events")); - } } //--------------------------------------------------------- @@ -1963,7 +1856,6 @@ QRect CtrlCanvas::overlayRect() const QFontMetrics fm(fontMetrics()); QRect r(fm.boundingRect(_controller ? _controller->name() : QString(""))); - //r.translate(2, 2); // top/left margin int y = fm.lineSpacing() + 2; r.translate(2, y); if (curDrumPitch==-2) @@ -1980,8 +1872,6 @@ QRect CtrlCanvas::overlayRect() const r2.translate(2, y * 2); r |= r2; } - - //printf("CtrlCanvas::overlayRect x:%d y:%d w:%d h:%d\n", r.x(), r.y(), r.width(), r.height()); return r; } @@ -1992,7 +1882,6 @@ QRect CtrlCanvas::overlayRect() const void CtrlCanvas::draw(QPainter& p, const QRect& rect) { drawTickRaster(p, rect.x(), rect.y(), - //rect.width(), rect.height(), editor->quant()); rect.width(), rect.height(), editor->raster()); //--------------------------------------------------- @@ -2021,8 +1910,8 @@ void CtrlCanvas::setCurDrumPitch(int instrument) else curDrumPitch = -2; // this means "invalid", but not "unused" } - - + + // DELETETHIS //printf("CtrlCanvas::setCurDrumPitch curDrumPitch:%d\n", curDrumPitch); // diff --git a/muse2/muse/ctrl/ctrlcanvas.h b/muse2/muse/ctrl/ctrlcanvas.h index 50b71bbe..8e107789 100644 --- a/muse2/muse/ctrl/ctrlcanvas.h +++ b/muse2/muse/ctrl/ctrlcanvas.h @@ -53,12 +53,8 @@ class MidiEditor; //--------------------------------------------------------- class CEvent { - public: - //enum State { Normal, Selected }; - private: MusECore::Event _event; - //State _state; int _val; MusECore::MidiPart* _part; int ex; @@ -67,17 +63,14 @@ class CEvent { CEvent(MusECore::Event e, MusECore::MidiPart* part, int v); MusECore::Event event() const { return _event; } void setEvent(MusECore::Event& ev) { _event = ev; } - //State state() { return _state; } - //void setState(State s) { _state = s; } - //bool isSelected() { return _state == Selected; } bool selected() const { return !_event.empty() && _event.selected(); } void setSelected(bool v) { if(!_event.empty()) _event.setSelected(v); } int val() const { return _val; } void setVal(int v) { _val = v; } void setEX(int v) { ex = v; } MusECore::MidiPart* part() const { return _part; } - bool contains(int /*x1*/, int /*x2*/) const; - bool intersects(const MusECore::MidiController*, const QRect&, const int /*tickstep*/, const int /*windowHeight*/) const; + bool contains(int x1, int x2) const; + bool intersects(const MusECore::MidiController*, const QRect&, const int tickstep, const int windowHeight) const; int x() { return ex; } }; @@ -111,10 +104,8 @@ class CtrlCanvas : public MusEGui::View { MusECore::MidiController* _controller; CtrlPanel* _panel; int _cnum; - // Current real drum controller number (anote). - int _dnum; - // Current real drum controller index. - int _didx; + int _dnum; // Current real drum controller number (anote). + int _didx; // Current real drum controller index. int line1x; int line1y; int line2x; @@ -135,7 +126,6 @@ class CtrlCanvas : public MusEGui::View { void changeValRamp(int x1, int x2, int y1, int y2); void newValRamp(int x1, int y1, int x2, int y2); void changeVal(int x1, int x2, int y); - //void newVal(int x1, int x2, int y); void newVal(int x1, int y); void newVal(int x1, int y1, int x2, int y2); void deleteVal(int x1, int x2, int y); @@ -176,8 +166,6 @@ class CtrlCanvas : public MusEGui::View { void setMidiController(int); void updateItems(); void updateSelections(); - - //virtual void closeEvent(QCloseEvent*); private slots: void songChanged(int type); diff --git a/muse2/muse/ctrl/ctrledit.cpp b/muse2/muse/ctrl/ctrledit.cpp index 5fbdecaf..ec814f3e 100644 --- a/muse2/muse/ctrl/ctrledit.cpp +++ b/muse2/muse/ctrl/ctrledit.cpp @@ -88,7 +88,6 @@ void CtrlEdit::writeStatus(int level, MusECore::Xml& xml) { if (canvas->controller()) { xml.tag(level++, "ctrledit"); - //xml.strTag(level, "ctrl", canvas->controller()->name()); xml.intTag(level, "ctrlnum", canvas->controller()->num()); xml.tag(level, "/ctrledit"); } @@ -108,23 +107,8 @@ void CtrlEdit::readStatus(MusECore::Xml& xml) case MusECore::Xml::End: return; case MusECore::Xml::TagStart: - if (tag == "ctrl") { - xml.parse1(); // Obsolete. - /* - QString name = xml.parse1(); - int portno = canvas->track()->outPort(); - MusECore::MidiPort* port = &midiPorts[portno]; - MusECore::MidiInstrument* instr = port->instrument(); - MusECore::MidiControllerList* mcl = instr->controller(); - - for (MusECore::iMidiController ci = mcl->begin(); ci != mcl->end(); ++ci) { - if (ci->second->name() == name) { - canvas->setController(ci->second->num()); - break; - } - } - */ - } + if (tag == "ctrl") + xml.parse1(); // Obsolete. else if (tag == "ctrlnum") { int num = xml.parseInt(); canvas->setController(num); diff --git a/muse2/muse/ctrl/ctrledit.h b/muse2/muse/ctrl/ctrledit.h index a0a941cc..0e3a280b 100644 --- a/muse2/muse/ctrl/ctrledit.h +++ b/muse2/muse/ctrl/ctrledit.h @@ -59,7 +59,7 @@ class CtrlEdit : public QWidget { void setXPos(int val) { canvas->setXPos(val); } void setXMag(int val) { canvas->setXMag(val); } void setCanvasWidth(int w); - void setController(int /*n*/); + void setController(int n); void curPartHasChanged(MusECore::Part*); signals: diff --git a/muse2/muse/ctrl/ctrlpanel.cpp b/muse2/muse/ctrl/ctrlpanel.cpp index 2de234b8..938ebd5a 100644 --- a/muse2/muse/ctrl/ctrlpanel.cpp +++ b/muse2/muse/ctrl/ctrlpanel.cpp @@ -26,7 +26,6 @@ #include "ctrlpanel.h" #include "ctrlcanvas.h" -//#include #include #include #include @@ -69,8 +68,6 @@ CtrlPanel::CtrlPanel(QWidget* parent, MidiEditor* e, CtrlCanvas* c, const char* { setObjectName(name); inHeartBeat = true; - //ctrlMainPop = 0; - //ctrlSubPop = 0; editor = e; ctrlcanvas = c; setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); @@ -90,16 +87,16 @@ CtrlPanel::CtrlPanel(QWidget* parent, MidiEditor* e, CtrlCanvas* c, const char* dbox->setContentsMargins(0, 0, 0, 0); selCtrl = new QPushButton(tr("S")); + selCtrl->setFocusPolicy(Qt::NoFocus); selCtrl->setFont(MusEGlobal::config.fonts[3]); selCtrl->setFixedHeight(20); selCtrl->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); selCtrl->setToolTip(tr("select controller")); - ///pop = new QMenu; - // destroy button QPushButton* destroy = new QPushButton(tr("X")); + destroy->setFocusPolicy(Qt::NoFocus); destroy->setFont(MusEGlobal::config.fonts[3]); destroy->setFixedHeight(20); destroy->setSizePolicy( @@ -138,7 +135,6 @@ CtrlPanel::CtrlPanel(QWidget* parent, MidiEditor* e, CtrlCanvas* c, const char* connect(_knob, SIGNAL(sliderMoved(double,int)), SLOT(ctrlChanged(double))); connect(_knob, SIGNAL(sliderRightClicked(const QPoint&, int)), SLOT(ctrlRightClicked(const QPoint&, int))); - //connect(_knob, SIGNAL(sliderReleased(int)), SLOT(ctrlReleased(int))); connect(_dl, SIGNAL(valueChanged(double,int)), SLOT(ctrlChanged(double))); connect(_dl, SIGNAL(doubleClicked(int)), SLOT(labelDoubleClicked())); @@ -169,7 +165,6 @@ void CtrlPanel::heartBeat() if(_track && _ctrl && _dnum != -1) { - //if(_dnum != MusECore::CTRL_VELOCITY && _dnum != MusECore::CTRL_PROGRAM) if(_dnum != MusECore::CTRL_VELOCITY) { int outport; @@ -201,7 +196,7 @@ void CtrlPanel::heartBeat() else // Auto bias... v -= _ctrl->bias(); - if(double(v) != _knob->value()) + if (double(v) != _knob->value()) { // Added by Tim. p3.3.6 //printf("CtrlPanel::heartBeat setting knob\n"); @@ -210,14 +205,11 @@ void CtrlPanel::heartBeat() } } } - else - if(v != _val) + else if(v != _val) { _val = v; if(v == MusECore::CTRL_VAL_UNKNOWN || ((_dnum == MusECore::CTRL_PROGRAM) && ((v & 0xff) == 0xff) )) { - // MusEGui::DoubleLabel ignores the value if already set... - //_dl->setValue(double(_ctrl->minVal() - 1)); _dl->setValue(_dl->off() - 1.0); } else @@ -228,9 +220,6 @@ void CtrlPanel::heartBeat() // Auto bias... v -= _ctrl->bias(); - // Added by Tim. p3.3.6 - //printf("CtrlPanel::heartBeat setting knob and label\n"); - _knob->setValue(double(v)); _dl->setValue(double(v)); } @@ -276,25 +265,22 @@ void CtrlPanel::labelDoubleClicked() // (or the controller's initial value?) to 'turn on' the controller. if(lastv == MusECore::CTRL_VAL_UNKNOWN || ((lastv & 0xffffff) == 0xffffff)) { - //int kiv = _ctrl->initVal()); int kiv = lrint(_knob->value()); --kiv; kiv &= 0x7f; kiv |= 0xffff00; - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, kiv); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, kiv); MusEGlobal::audio->msgPlayMidiEvent(&ev); } else { - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, lastv); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, lastv); MusEGlobal::audio->msgPlayMidiEvent(&ev); } } else { - //if((curv & 0xffff00) == 0xffff00) + //if((curv & 0xffff00) == 0xffff00) DELETETHIS? //{ ////if(mp->hwCtrlState(chan, _dnum) != MusECore::CTRL_VAL_UNKNOWN) MusEGlobal::audio->msgSetHwCtrlState(mp, chan, _dnum, MusECore::CTRL_VAL_UNKNOWN); @@ -314,28 +300,24 @@ void CtrlPanel::labelDoubleClicked() // (or the controller's initial value?) to 'turn on' the controller. if(lastv == MusECore::CTRL_VAL_UNKNOWN) { - //int kiv = _ctrl->initVal()); int kiv = lrint(_knob->value()); if(kiv < _ctrl->minVal()) kiv = _ctrl->minVal(); if(kiv > _ctrl->maxVal()) kiv = _ctrl->maxVal(); kiv += _ctrl->bias(); - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, kiv); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, kiv); MusEGlobal::audio->msgPlayMidiEvent(&ev); } else { - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, lastv); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, lastv); MusEGlobal::audio->msgPlayMidiEvent(&ev); } } else { - //if(mp->hwCtrlState(chan, _dnum) != MusECore::CTRL_VAL_UNKNOWN) - MusEGlobal::audio->msgSetHwCtrlState(mp, chan, _dnum, MusECore::CTRL_VAL_UNKNOWN); + MusEGlobal::audio->msgSetHwCtrlState(mp, chan, _dnum, MusECore::CTRL_VAL_UNKNOWN); } } MusEGlobal::song->update(SC_MIDI_CONTROLLER); @@ -379,7 +361,6 @@ void CtrlPanel::ctrlChanged(double val) ival |= 0xffff00; else ival |= (curval & 0xffff00); - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, ival); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, ival); MusEGlobal::audio->msgPlayMidiEvent(&ev); } @@ -387,7 +368,6 @@ void CtrlPanel::ctrlChanged(double val) // Shouldn't happen, but... if((ival < _ctrl->minVal()) || (ival > _ctrl->maxVal())) { - //if(mp->hwCtrlState(chan, _dnum) != MusECore::CTRL_VAL_UNKNOWN) if(curval != MusECore::CTRL_VAL_UNKNOWN) MusEGlobal::audio->msgSetHwCtrlState(mp, chan, _dnum, MusECore::CTRL_VAL_UNKNOWN); } @@ -396,7 +376,6 @@ void CtrlPanel::ctrlChanged(double val) // Auto bias... ival += _ctrl->bias(); - //MusECore::MidiPlayEvent ev(MusEGlobal::song->cpos(), outport, chan, MusECore::ME_CONTROLLER, _dnum, ival); MusECore::MidiPlayEvent ev(0, outport, chan, MusECore::ME_CONTROLLER, _dnum, ival); MusEGlobal::audio->msgPlayMidiEvent(&ev); } @@ -445,7 +424,6 @@ void CtrlPanel::setHWController(MusECore::MidiTrack* t, MusECore::MidiController ch = _track->outChannel(); } - //if(_dnum == MusECore::CTRL_VELOCITY || _dnum == MusECore::CTRL_PROGRAM) if(_dnum == MusECore::CTRL_VELOCITY) { _knob->setEnabled(false); @@ -467,7 +445,6 @@ void CtrlPanel::setHWController(MusECore::MidiTrack* t, MusECore::MidiController _val = v; _knob->setRange(double(mn), double(mx), 1.0); _dl->setRange(double(mn), double(mx)); - //_dl->setOff(double(mn - 1)); if(v == MusECore::CTRL_VAL_UNKNOWN || ((v & 0xffffff) == 0xffffff)) { int lastv = mp->lastValidHWCtrlState(ch, _dnum); @@ -484,7 +461,6 @@ void CtrlPanel::setHWController(MusECore::MidiTrack* t, MusECore::MidiController if(v > 128) v = 128; - //dlv = mn - 1; dlv = _dl->off() - 1.0; } else @@ -503,7 +479,6 @@ void CtrlPanel::setHWController(MusECore::MidiTrack* t, MusECore::MidiController _val = v; _knob->setRange(double(mn), double(mx), 1.0); _dl->setRange(double(mn), double(mx)); - //_dl->setOff(double(mn - 1)); if(v == MusECore::CTRL_VAL_UNKNOWN) { int lastv = mp->lastValidHWCtrlState(ch, _dnum); @@ -516,7 +491,6 @@ void CtrlPanel::setHWController(MusECore::MidiTrack* t, MusECore::MidiController } else v = lastv - _ctrl->bias(); - //dlv = mn - 1; dlv = _dl->off() - 1.0; } else @@ -548,7 +522,12 @@ void CtrlPanel::setHeight(int h) setFixedHeight(h); } -#if 0 +#if 0 // DELETETHIS. yeah, really! +// when flo added the new style drumtracks in trunk, he changed a +// lot of things. he didn't update that disabled area here, so +// after releasing 2.0, when we continue developing on trunk, +// then the below code is not only disabled but INVALID (as in WRONG) + /* WARNING: INVALID CODE! *\ * the code which has been disabled by the above #if 0 is partly * * OBSOLETE! it lacks support for new-style drum tracks, especially * @@ -1013,34 +992,18 @@ void CtrlPanel::ctrlPopup() void CtrlPanel::ctrlRightClicked(const QPoint& p, int /*id*/) { - //if(!_knob->selectedFaceColor()) - // _knob->selectFaceColor(true); - //if(_dnum == -1) - // return; if(!editor->curCanvasPart() || !_ctrl) return; int cdp = ctrlcanvas->getCurDrumPitch(); int ctlnum = _ctrl->num(); if(_track->type() == MusECore::Track::DRUM && ((ctlnum & 0xff) == 0xff) && cdp != -1) - //ctlnum = (ctlnum & ~0xff) | MusEGlobal::drumMap[cdp].enote; + //ctlnum = (ctlnum & ~0xff) | MusEGlobal::drumMap[cdp].enote; DELETETHIS or which of them is correct? ctlnum = (ctlnum & ~0xff) | cdp; MusECore::MidiPart* part = dynamic_cast(editor->curCanvasPart()); MusEGlobal::song->execMidiAutomationCtlPopup(0, part, p, ctlnum); } -/* -//--------------------------------------------------------- -// ctrlReleased -//--------------------------------------------------------- - -void CtrlPanel::ctrlReleased(int id) -{ - //if(_knob->selectedFaceColor()) - // _knob->selectFaceColor(false); -} -*/ - } // namespace MusEGui diff --git a/muse2/muse/ctrl/ctrlpanel.h b/muse2/muse/ctrl/ctrlpanel.h index ab6c1777..1a5245dc 100644 --- a/muse2/muse/ctrl/ctrlpanel.h +++ b/muse2/muse/ctrl/ctrlpanel.h @@ -46,7 +46,6 @@ class CtrlCanvas; class CtrlPanel: public QWidget { Q_OBJECT - //QMenu* pop; QPushButton* selCtrl; MidiEditor* editor; CtrlCanvas* ctrlcanvas; @@ -69,7 +68,6 @@ class CtrlPanel: public QWidget { void ctrlChanged(double val); void labelDoubleClicked(); void ctrlRightClicked(const QPoint& p, int id); - //void ctrlReleased(int id); protected slots: virtual void heartBeat(); diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp index 740de1fb..08f5345f 100644 --- a/muse2/muse/driver/alsamidi.cpp +++ b/muse2/muse/driver/alsamidi.cpp @@ -38,6 +38,7 @@ #include "xml.h" #include "part.h" #include "gconfig.h" +#include "track.h" #include @@ -58,8 +59,6 @@ MidiAlsaDevice::MidiAlsaDevice(const snd_seq_addr_t& a, const QString& n) : MidiDevice(n) { adr = a; - stopPending = false; - seekPending = false; init(); } @@ -285,7 +284,7 @@ void MidiAlsaDevice::writeRouting(int level, Xml& xml) const bool MidiAlsaDevice::putMidiEvent(const MidiPlayEvent& e) { if (MusEGlobal::midiOutputTrace) { - printf("MidiOut: midiAlsa: "); + printf("MidiOut: Alsa: <%s>: ", name().toLatin1().constData()); e.dump(); } int chn = e.channel(); @@ -309,6 +308,19 @@ bool MidiAlsaDevice::putMidiEvent(const MidiPlayEvent& e) snd_seq_ev_set_pgmchange(&event, chn, a); break; case ME_CONTROLLER: + { + if(a == CTRL_PROGRAM) + { + snd_seq_ev_set_pgmchange(&event, chn, b); + break; + } + else if(a == CTRL_PITCH) + { + snd_seq_ev_set_pitchbend(&event, chn, b); + break; + } + } + #if 1 snd_seq_ev_set_controller(&event, chn, a, b); #else @@ -453,77 +465,160 @@ bool MidiAlsaDevice::putEvent(snd_seq_event_t* event) // Called from ALSA midi sequencer thread only. //--------------------------------------------------------- -#if 0 -void MidiAlsaDevice::processMidi() -{ - processStuckNotes(); - if (_playEvents.empty()) - return; - int port = midiPort(); - MidiPort* mp = port != -1 ? &MusEGlobal::midiPorts[port] : 0; - unsigned curFrame = MusEGlobal::audio->curFrame(); - int tickpos = MusEGlobal::audio->tickPos(); - bool extsync = MusEGlobal::extSyncFlag.value(); - //int frameOffset = getFrameOffset(); - //int nextTick = MusEGlobal::audio->nextTick(); - - // Play all events up to current frame. - iMPEvent i = _playEvents.begin(); - for (; i != _playEvents.end(); ++i) { - if (i->time() > (extsync ? tickpos : curFrame)) // p3.3.25 Check: Should be nextTickPos? p4.0.34 - break; - if(mp){ - if (mp->sendEvent(*i)) - break; - } - else - if(putMidiEvent(*i)) - break; - } - _playEvents.erase(_playEvents.begin(), i); -} - -#else void MidiAlsaDevice::processMidi() { - bool stop = stopPending; // Snapshots - bool seek = seekPending; // - seekPending = stopPending = false; + //bool stop = stopPending; // Snapshots + //bool seek = seekPending; // + //seekPending = stopPending = false; // Transfer the stuck notes FIFO to the play events list. // FIXME It would be faster to have MidiAlsaDevice automatically add the stuck note so that only // one FIFO would be needed. But that requires passing an extra 'tick' and 'off velocity' in // addScheduledEvent, which felt too weird. - while(!stuckNotesFifo.isEmpty()) - _stuckNotes.add(stuckNotesFifo.get()); + //while(!stuckNotesFifo.isEmpty()) + // _stuckNotes.add(stuckNotesFifo.get()); - bool extsync = MusEGlobal::extSyncFlag.value(); //int frameOffset = getFrameOffset(); //int nextTick = MusEGlobal::audio->nextTick(); - // We're in the ALSA midi thread. MusEGlobal::audio->isPlaying() might not be true during seek right now. - //if(stop || (seek && MusEGlobal::audio->isPlaying())) - if(stop || seek) + //bool is_playing = MusEGlobal::audio->isPlaying(); + // We're in the ALSA midi thread. audio->isPlaying() might not be true during seek right now. Include START_PLAY state... + //bool is_playing = MusEGlobal::audio->isPlaying() || MusEGlobal::audio->isStarting(); // TODO Check this. It includes LOOP1 and LOOP2 besides PLAY. + int pos = MusEGlobal::audio->tickPos(); + int port = midiPort(); + MidiPort* mp = port == -1 ? 0 : &MusEGlobal::midiPorts[port]; + bool ext_sync = MusEGlobal::extSyncFlag.value(); + + /* + if(mp) { - //--------------------------------------------------- - // Clear all notes and handle stuck notes - //--------------------------------------------------- - playEventFifo.clear(); + MidiSyncInfo& si = mp->syncInfo(); + if(stop) + { + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!ext_sync) + { + // Shall we check open flags? + //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) + //if(!(dev->openFlags() & 1)) + // return; + + // Send MMC stop... + if(si.MMCOut()) + { + unsigned char msg[mmcStopMsgLen]; + memcpy(msg, mmcStopMsg, mmcStopMsgLen); + msg[1] = si.idOut(); + putMidiEvent(MidiPlayEvent(0, 0, ME_SYSEX, msg, mmcStopMsgLen)); + } + + // Send midi stop... + if(si.MRTOut()) + { + putMidiEvent(MidiPlayEvent(0, 0, 0, ME_STOP, 0, 0)); + // Added check of option send continue not start. p3.3.31 + // Hmm, is this required? Seems to make other devices unhappy. + // (Could try now that this is in MidiDevice. p4.0.22 ) + //if(!si.sendContNotStart()) + // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / config.division); + } + } + } + + if(seek) + { + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!ext_sync) + { + // Send midi stop and song position pointer... + if(si.MRTOut()) + { + // Shall we check for device write open flag to see if it's ok to send?... + //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) + //if(!(openFlags() & 1)) + // continue; + putMidiEvent(MidiPlayEvent(0, 0, 0, ME_STOP, 0, 0)); + // Hm, try sending these after stuck notes below... + //putMidiEvent(MidiPlayEvent(0, 0, 0, ME_SONGPOS, beat, 0)); + //if(is_playing) + // putMidiEvent(MidiPlayEvent(0, 0, 0, ME_CONTINUE, 0, 0)); + } + } + } + } + */ + + /* + if(stop || (seek && is_playing)) + { + // Clear all notes and handle stuck notes... + //playEventFifo.clear(); _playEvents.clear(); - //printf("transferring stuck notes\n"); for(iMPEvent i = _stuckNotes.begin(); i != _stuckNotes.end(); ++i) { - //printf(" stuck note\n"); MidiPlayEvent ev = *i; ev.setTime(0); - _playEvents.add(ev); + //_playEvents.add(ev); + putMidiEvent(ev); // Play immediately. } _stuckNotes.clear(); } - else + */ + + /* + if(mp) + { + MidiSyncInfo& si = mp->syncInfo(); + // Try sending these now after stuck notes above... + if(stop || seek) + { + // Reset sustain. + for(int ch = 0; ch < MIDI_CHANNELS; ++ch) + if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) + putMidiEvent(MidiPlayEvent(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0)); + } + if(seek) + { + // Send new song position. + if(!ext_sync && si.MRTOut()) + { + int beat = (pos * 4) / MusEGlobal::config.division; + putMidiEvent(MidiPlayEvent(0, 0, 0, ME_SONGPOS, beat, 0)); + } + // Send new controller values. + MidiCtrlValListList* cll = mp->controller(); + for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) + { + MidiCtrlValList* vl = ivl->second; + iMidiCtrlVal imcv = vl->iValue(pos); + if(imcv != vl->end()) { + Part* p = imcv->second.part; + // Don't send if part or track is muted or off. + if(!p || p->mute()) + continue; + Track* track = p->track(); + if(track && (track->isMute() || track->off())) + continue; + unsigned t = (unsigned)imcv->first; + // Do not add values that are outside of the part. + if(t >= p->tick() && t < (p->tick() + p->lenTick())) + // Use sendEvent to get the optimizations and limiting. But force if there's a value at this exact position. + mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val), imcv->first == pos); + } + } + + // Send continue. + // REMOVE Tim. This is redundant and too early - Audio::startRolling already properly sends it when sync ready. + //if(is_playing && !ext_sync && si.MRTOut()) + // putMidiEvent(MidiPlayEvent(0, 0, 0, ME_CONTINUE, 0, 0)); + } + } + */ + + //if(!(stop || (seek && is_playing))) { // Transfer the play events FIFO to the play events list. - while(!playEventFifo.isEmpty()) - _playEvents.add(playEventFifo.get()); + //while(!playEventFifo.isEmpty()) + // _playEvents.add(playEventFifo.get()); /* TODO Handle these more directly than putting them into play events list. //if(MusEGlobal::audio->isPlaying()) @@ -545,53 +640,18 @@ void MidiAlsaDevice::processMidi() processStuckNotes(); } - /* Instead, done immediately in handleStop and handleSeek using putEvent. - if(stop) - { - // reset sustain... - MidiPort* mp = &MusEGlobal::midiPorts[_port]; - for(int ch = 0; ch < MIDI_CHANNELS; ++ch) - { - if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) - { - //printf("send clear sustain!!!!!!!! port %d ch %d\n", i,ch); - MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); - _playEvents.add(ev); - } - } - } - if(seek) - { - // Send new contoller values... - for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) - { - MidiCtrlValList* vl = ivl->second; - iMidiCtrlVal imcv = vl->iValue(pos); - if(imcv != vl->end()) { - Part* p = imcv->second.part; - unsigned t = (unsigned)imcv->first; - // Do not add values that are outside of the part. - if(p && t >= p->tick() && t < (p->tick() + p->lenTick()) ) - _playEvents.add(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); - } - } - } */ - - if (_playEvents.empty()) - return; + if(_playEvents.empty()) + return; - int port = midiPort(); - MidiPort* mp = port != -1 ? &MusEGlobal::midiPorts[port] : 0; unsigned curFrame = MusEGlobal::audio->curFrame(); - int tickpos = MusEGlobal::audio->tickPos(); // Play all events up to current frame. iMPEvent i = _playEvents.begin(); for (; i != _playEvents.end(); ++i) { - if (i->time() > (extsync ? tickpos : curFrame)) // p3.3.25 Check: Should be nextTickPos? p4.0.34 + if (i->time() > (ext_sync ? pos : curFrame)) // p3.3.25 Check: Should be nextTickPos? p4.0.34 break; if(mp){ - if (mp->sendEvent(*i)) + if (mp->sendEvent(*i, true)) // Force the event to be sent. break; } else @@ -601,6 +661,7 @@ void MidiAlsaDevice::processMidi() _playEvents.erase(_playEvents.begin(), i); } +/* //--------------------------------------------------------- // handleStop //--------------------------------------------------------- @@ -613,21 +674,6 @@ void MidiAlsaDevice::handleStop() stopPending = true; // Trigger stop handling in processMidi. - //--------------------------------------------------- - // reset sustain - //--------------------------------------------------- - - MidiPort* mp = &MusEGlobal::midiPorts[_port]; - for(int ch = 0; ch < MIDI_CHANNELS; ++ch) - { - if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) - { - //printf("send clear sustain!!!!!!!! port %d ch %d\n", i,ch); - MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); - putMidiEvent(ev); - } - } - //--------------------------------------------------- // send midi stop //--------------------------------------------------- @@ -646,18 +692,61 @@ void MidiAlsaDevice::handleStop() if(si.MRTOut()) { - // Send STOP mp->sendStop(); - - // Added check of option send continue not start. p3.3.31 - // Hmm, is this required? Seems to make other devices unhappy. - // (Could try now that this is in MidiDevice. p4.0.22 ) + // Added check of option send continue not start. Hmm, is this required? Seems to make other devices unhappy. + // (Could try now that this is in MidiDevice.) //if(!si.sendContNotStart()) // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / config.division); } } + + //--------------------------------------------------- + // reset sustain + //--------------------------------------------------- + + MidiPort* mp = &MusEGlobal::midiPorts[_port]; + for(int ch = 0; ch < MIDI_CHANNELS; ++ch) + { + if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) + { + MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); + //putMidiEvent(ev); + putEvent(ev); + // Do sendEvent to get the optimizations - send only on a change of value. + //mp->sendEvent(ev); + } + } + + //--------------------------------------------------- + // send midi stop + //--------------------------------------------------- + +// // Don't send if external sync is on. The master, and our sync routing system will take care of that. +// if(!MusEGlobal::extSyncFlag.value()) +// { +// // Shall we check open flags? +// //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) +// //if(!(dev->openFlags() & 1)) +// // return; +// +// MidiSyncInfo& si = mp->syncInfo(); +// if(si.MMCOut()) +// mp->sendMMCStop(); +// +// if(si.MRTOut()) +// { +// // Send STOP +// mp->sendStop(); +// // Added check of option send continue not start. Hmm, is this required? Seems to make other devices unhappy. +// // (Could try now that this is in MidiDevice.) +// //if(!si.sendContNotStart()) +// // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / config.division); +// } +// } } +*/ +/* //--------------------------------------------------------- // handleSeek //--------------------------------------------------------- @@ -675,7 +764,41 @@ void MidiAlsaDevice::handleSeek() int pos = MusEGlobal::audio->tickPos(); //--------------------------------------------------- - // Send new contoller values + // Send STOP + //--------------------------------------------------- + + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!MusEGlobal::extSyncFlag.value()) + { + if(mp->syncInfo().MRTOut()) + { + // Shall we check for device write open flag to see if it's ok to send?... + //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) + //if(!(openFlags() & 1)) + // continue; + mp->sendStop(); + } + } + + //--------------------------------------------------- + // reset sustain + //--------------------------------------------------- + + MidiPort* mp = &MusEGlobal::midiPorts[_port]; + for(int ch = 0; ch < MIDI_CHANNELS; ++ch) + { + if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) + { + MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); + putEvent(ev); + //putMidiEvent(ev); + // Do sendEvent to get the optimizations - send only on a change of value. + //mp->sendEvent(ev); + } + } + + //--------------------------------------------------- + // Send new controller values //--------------------------------------------------- for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) @@ -685,12 +808,18 @@ void MidiAlsaDevice::handleSeek() if(imcv != vl->end()) { Part* p = imcv->second.part; + // Don't send if part or track is muted or off. + if(!p || p->mute()) + continue; + Track* track = p->track(); + if(track && (track->isMute() || track->off())) + continue; unsigned t = (unsigned)imcv->first; // Do not add values that are outside of the part. if(p && t >= p->tick() && t < (p->tick() + p->lenTick()) ) //_playEvents.add(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); - // Hmm, play event list for immediate playback? Try putEvent instead. p4.0.34 - putMidiEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); + // Use sendEvent to get the optimizations and limiting. But force if there's a value at this exact position. + mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val), imcv->first == pos); } } @@ -698,31 +827,23 @@ void MidiAlsaDevice::handleSeek() // Send STOP and "set song position pointer" //--------------------------------------------------- - // Don't send if external sync is on. The master, and our sync routing system will take care of that. p3.3.31 + // Don't send if external sync is on. The master, and our sync routing system will take care of that. if(!MusEGlobal::extSyncFlag.value()) { if(mp->syncInfo().MRTOut()) { // Shall we check for device write open flag to see if it's ok to send?... - // This means obey what the user has chosen for read/write in the midi port config dialog, - // which already takes into account whether the device is writable or not. //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) //if(!(openFlags() & 1)) // continue; + //mp->sendStop(); // Moved above. int beat = (pos * 4) / MusEGlobal::config.division; - - //bool isPlaying = (state == PLAY); - bool isPlaying = MusEGlobal::audio->isPlaying(); // TODO Check this it includes LOOP1 and LOOP2 besides PLAY. p4.0.22 - - mp->sendStop(); mp->sendSongpos(beat); - if(isPlaying) - mp->sendContinue(); } } } -#endif +*/ //--------------------------------------------------------- // initMidiAlsa diff --git a/muse2/muse/driver/alsamidi.h b/muse2/muse/driver/alsamidi.h index 2054a7d3..7a1ac1c2 100644 --- a/muse2/muse/driver/alsamidi.h +++ b/muse2/muse/driver/alsamidi.h @@ -45,10 +45,8 @@ class MidiAlsaDevice : public MidiDevice { private: // Special for ALSA midi device: Play event list is processed in the ALSA midi sequencer thread. // Need this FIFO, to decouple from audio thread which adds events to the list. - MidiFifo playEventFifo; - MidiFifo stuckNotesFifo; - volatile bool stopPending; - volatile bool seekPending; + //MidiFifo playEventFifo; + //MidiFifo stuckNotesFifo; virtual QString open(); virtual void close(); @@ -69,13 +67,13 @@ class MidiAlsaDevice : public MidiDevice { virtual void writeRouting(int, Xml&) const; virtual inline int deviceType() const { return ALSA_MIDI; } // Schedule an event for playback. Returns false if event cannot be delivered. - virtual bool addScheduledEvent(const MidiPlayEvent& ev) { return !playEventFifo.put(ev); } + //virtual bool addScheduledEvent(const MidiPlayEvent& ev) { return !playEventFifo.put(ev); } // Add a stuck note. Returns false if event cannot be delivered. - virtual bool addStuckNote(const MidiPlayEvent& ev) { return !stuckNotesFifo.put(ev); } + //virtual bool addStuckNote(const MidiPlayEvent& ev) { return !stuckNotesFifo.put(ev); } // Play all events up to current frame. virtual void processMidi(); - virtual void handleStop(); - virtual void handleSeek(); + //virtual void handleStop(); + //virtual void handleSeek(); }; extern bool initMidiAlsa(); diff --git a/muse2/muse/driver/alsatimer.cpp b/muse2/muse/driver/alsatimer.cpp index ee72d679..20f7ab88 100644 --- a/muse2/muse/driver/alsatimer.cpp +++ b/muse2/muse/driver/alsatimer.cpp @@ -173,7 +173,7 @@ namespace MusECore { (long int)((1000000000.0 / snd_timer_info_get_resolution(info)) / snd_timer_params_get_ticks(params))); } - return 0; + return (long int)((1000000000.0 / snd_timer_info_get_resolution(info)) / snd_timer_params_get_ticks(params)); } actFreq = (1000000000 / snd_timer_info_get_resolution(info)) / setTick; if (actFreq != freq) { diff --git a/muse2/muse/driver/jack.cpp b/muse2/muse/driver/jack.cpp index 421152a7..a52410e9 100644 --- a/muse2/muse/driver/jack.cpp +++ b/muse2/muse/driver/jack.cpp @@ -3,6 +3,7 @@ // Linux Music Editor // $Id: jack.cpp,v 1.30.2.17 2009/12/20 05:00:35 terminator356 Exp $ // (C) Copyright 2002 Werner Schweer (ws@seh.de) +// (C) Copyright 2012 Tim E. Real (terminator356 on sourceforge.net) // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -82,15 +83,6 @@ bool checkAudioDevice() namespace MusECore { -//extern int jackmidi_pi[2]; -//extern int jackmidi_po[2]; - -//jack_port_t *midi_port_in[JACK_MIDI_CHANNELS]; -//jack_port_t *midi_port_out[JACK_MIDI_CHANNELS]; - -//muse_jack_midi_buffer jack_midi_out_data[JACK_MIDI_CHANNELS]; -//muse_jack_midi_buffer jack_midi_in_data[JACK_MIDI_CHANNELS]; - JackAudioDevice* jackAudio; //--------------------------------------------------------- @@ -109,38 +101,9 @@ inline bool checkJackClient(jack_client_t* _client) // jack_thread_init //--------------------------------------------------------- -static void jack_thread_init (void* ) // data +static void jack_thread_init (void* ) { MusEGlobal::doSetuid(); - /* - if (jackAudio->isRealtime()) { - struct sched_param rt_param; - int rv; - memset(&rt_param, 0, sizeof(sched_param)); - int type; - rv = pthread_getschedparam(pthread_self(), &type, &rt_param); - if (rv != 0) - perror("get scheduler parameter"); - if (type != SCHED_FIFO) { - fprintf(stderr, "JACK thread not running SCHED_FIFO, try to set...\n"); - - memset(&rt_param, 0, sizeof(sched_param)); - rt_param.sched_priority = 1; - rv = pthread_setschedparam(pthread_self(), SCHED_FIFO, &rt_param); - if (rv != 0) - perror("set realtime scheduler"); - memset(&rt_param, 0, sizeof(sched_param)); - rv = pthread_getschedparam(pthread_self(), &type, &rt_param); - if (rv != 0) - perror("get scheduler parameter"); - if (type != SCHED_FIFO) - fprintf(stderr, "JACK still not running FIFO !?!\n" - "======reliable RT operation not possible!!======\n"); - else - fprintf(stderr, "JACK thread succesfully set to SCHED_FIFO\n"); - } - } - */ #ifdef VST_SUPPORT if (loadVST) fst_adopt_thread(); @@ -148,161 +111,78 @@ static void jack_thread_init (void* ) // data MusEGlobal::undoSetuid(); } -/* -//--------------------------------------------------------- -// processAudio + Midi -// JACK callback -//--------------------------------------------------------- -void -print_triplet(unsigned char *data) -{ - int a,b,c; - a = b = c = 0; - memcpy(&a, data, 1); - memcpy(&b, data+1, 1); - memcpy(&c, data+2, 1); - fprintf(stderr, "%x,%x,%x", a, b, c); -} -*/ - -/* -void handle_jack_midi_in_events(jack_nframes_t frames) -{ - char buf = 0; - int i,j; - jack_midi_event_t midi_event; - unsigned char t,n,v; - - for(j = 0; j < JACK_MIDI_CHANNELS; j++){ - void *midi_buffer_in = jack_port_get_buffer(midi_port_in[j], frames); - int event_count = jack_midi_get_event_count(midi_buffer_in); - - for(i = 0; i < event_count; i++){ - jack_midi_event_get(&midi_event, midi_buffer_in, i); - t = midi_event.buffer[0]; - n = midi_event.buffer[1]; - v = midi_event.buffer[2]; - if(((*(midi_event.buffer) & 0xf0)) == 0x90){ - fprintf(stderr, "jack-midi-in-event: ON_ time=%d %u ", midi_event.time, - midi_event.size); - print_triplet(midi_event.buffer); - fprintf(stderr, "\n"); - }else if(((*(midi_event.buffer)) & 0xf0) == 0x80){ - fprintf(stderr, "jack-midi-in-event: OFF time=%d %u ", midi_event.time, - midi_event.size); - print_triplet(midi_event.buffer); - fprintf(stderr, "\n"); - }else{ - fprintf(stderr, "jack-midi-in-event: ??? time=%d %u ", midi_event.time, - midi_event.size); - print_triplet(midi_event.buffer); - fprintf(stderr, "\n"); - } - jack_midi_in_data[j].buffer[0] = t; - jack_midi_in_data[j].buffer[1] = n; - jack_midi_in_data[j].buffer[2] = v; - jack_midi_in_data[j].buffer[3] = 1; - fprintf(stderr, "handle_jack_midi_in_events() w\n"); - write(jackmidi_pi[1], &buf, 1); - fprintf(stderr, "handle_jack_midi_in_events() wd\n"); - } - } -} - -void handle_jack_midi_out_events(jack_nframes_t frames) -{ - unsigned char *data; - void *port_buf; - int i,j,n,x; - - //for(i = 0; i < JACK_MIDI_CHANNELS; i++){ - for(i = 0; i < JACK_MIDI_CHANNELS; ++i){ - // jack-midi-clear any old events - while(jack_midi_out_data[i].buffer[jack_midi_out_data[i].take*4+3] == 2){ - port_buf = jack_port_get_buffer(midi_port_out[i], frames); - jack_midi_clear_buffer(port_buf); - jack_midi_out_data[i].buffer[jack_midi_out_data[i].take*4+3] = 0; - // point the take to the next slot - jack_midi_out_data[i].take++; - if(jack_midi_out_data[i].take >= JACK_MIDI_BUFFER_SIZE){ - jack_midi_out_data[i].take = 0; - } - } - // check if any incoming midi-events from muse - if(jack_midi_out_data[i].give != jack_midi_out_data[i].take){ - - if(jack_midi_out_data[i].give > jack_midi_out_data[i].take){ - n = jack_midi_out_data[i].give - jack_midi_out_data[i].take; - }else{ - n = jack_midi_out_data[i].give + - (JACK_MIDI_BUFFER_SIZE - jack_midi_out_data[i].take); - } - port_buf = jack_port_get_buffer(midi_port_out[i], frames); - jack_midi_clear_buffer(port_buf); - // FIX: midi events has different sizes, compare note-on to - // program-change. We should first walk over the events - // counting the size. - //data = jack_midi_event_reserve(port_buf, 0, n*3); - //x = jack_midi_out_data[i].take; - //for(j = 0; j < n; j++){ - // data[j*3+0] = jack_midi_out_data[i].buffer[x*4+0]; - // data[j*3+1] = jack_midi_out_data[i].buffer[x*4+1]; - // data[j*3+2] = jack_midi_out_data[i].buffer[x*4+2]; - // after having copied the buffer over to the jack-buffer, - // mark the muses midi-out buffer as 'need-cleaning' - // jack_midi_out_data[i].buffer[x*4+3] = 2; - // x++; - // if(x >= JACK_MIDI_BUFFER_SIZE){ - // x = 0; - // } - //} - - x = jack_midi_out_data[i].take; - for(j = 0; j < n; ++j) - { - data = jack_midi_event_reserve(port_buf, 0, 3); - if(data == 0) - { - fprintf(stderr, "handle_jack_midi_out_events: buffer overflow, event lost\n"); - // Can do no more processing. Just return. - return; - } - data[0] = jack_midi_out_data[i].buffer[x*4+0]; - data[1] = jack_midi_out_data[i].buffer[x*4+1]; - data[2] = jack_midi_out_data[i].buffer[x*4+2]; - // after having copied the buffer over to the jack-buffer, - // mark the muses midi-out buffer as 'need-cleaning' - jack_midi_out_data[i].buffer[x*4+3] = 2; - x++; - if(x >= JACK_MIDI_BUFFER_SIZE){ - x = 0; - } - } - - } - } -} -*/ - -//static int processAudio(jack_nframes_t frames, void*) int JackAudioDevice::processAudio(jack_nframes_t frames, void*) { - jackAudio->_frameCounter += frames; - -/// handle_jack_midi_in_events(frames); -/// handle_jack_midi_out_events(frames); - -// if (JACK_DEBUG) -// printf("processAudio - >>>>\n"); + int state_pending = jackAudio->_dummyStatePending; // Snapshots. + int pos_pending = jackAudio->_dummyPosPending; // + jackAudio->_dummyStatePending = -1; // Reset. + jackAudio->_dummyPosPending = -1; // + + jackAudio->_frameCounter += frames; MusEGlobal::segmentSize = frames; + if (MusEGlobal::audio->isRunning()) - MusEGlobal::audio->process((unsigned long)frames); + { + // Are we not using Jack transport? + if(!MusEGlobal::useJackTransport.value()) + { + // STOP -> STOP, STOP -> START_PLAY, PLAY -> START_PLAY all count as 'syncing'. + if(((jackAudio->dummyState == Audio::STOP || jackAudio->dummyState == Audio::PLAY) && state_pending == Audio::START_PLAY) + || (jackAudio->dummyState == Audio::STOP && state_pending == Audio::STOP) ) + { + jackAudio->_syncTimeout = (float)frames / (float)MusEGlobal::sampleRate; // (Re)start the timeout counter... + if(pos_pending != -1) + jackAudio->dummyPos = pos_pending; // Set the new dummy position. + if((jackAudio->dummyState == Audio::STOP || jackAudio->dummyState == Audio::PLAY) && state_pending == Audio::START_PLAY) + jackAudio->dummyState = Audio::START_PLAY; + } + else // All other states such as START_PLAY -> STOP, PLAY -> STOP. + if(state_pending != -1 && state_pending != jackAudio->dummyState) + { + jackAudio->_syncTimeout = 0.0; // Reset. + jackAudio->dummyState = state_pending; + } + + // Is the sync timeout counter running? + if(jackAudio->_syncTimeout > 0.0) + { + //printf("Jack processAudio dummy sync: state:%d pending:%d\n", jackAudio->dummyState, state_pending); + // Is MusE audio ready to roll? + if(MusEGlobal::audio->sync(jackAudio->dummyState, jackAudio->dummyPos)) + { + jackAudio->_syncTimeout = 0.0; // Reset. + // We're ready. Switch to PLAY state. + if(jackAudio->dummyState == Audio::START_PLAY) + jackAudio->dummyState = Audio::PLAY; + } + else + { + jackAudio->_syncTimeout += (float)frames / (float)MusEGlobal::sampleRate; + if(jackAudio->_syncTimeout > 5.0) // TODO: Make this timeout a 'settings' option so it can be applied both to Jack and here. + { + if (MusEGlobal::debugMsg) + puts("Jack dummy sync timeout! Starting anyway...\n"); + jackAudio->_syncTimeout = 0.0; // Reset. + // We're not ready, but no time left - gotta roll anyway. Switch to PLAY state, similar to how Jack is supposed to work. + if(jackAudio->dummyState == Audio::START_PLAY) + { + jackAudio->dummyState = Audio::PLAY; + // Docs say sync will be called with Rolling state when timeout expires. + MusEGlobal::audio->sync(jackAudio->dummyState, jackAudio->dummyPos); + } + } + } + } + } + + //if(jackAudio->getState() != Audio::START_PLAY) // Don't process while we're syncing. TODO: May need to deliver silence in process! + MusEGlobal::audio->process((unsigned long)frames); + } else { if (MusEGlobal::debugMsg) puts("jack calling when audio is disconnected!\n"); } -// if (JACK_DEBUG) -// printf("processAudio - <<<<\n"); + return 0; } @@ -344,13 +224,9 @@ static int processSync(jack_transport_state_t state, jack_position_t* pos, void* } unsigned frame = pos->frame; - //printf("processSync valid:%d frame:%d\n", pos->valid, frame); - - // p3.3.23 - //printf("Jack processSync() before MusEGlobal::audio->sync frame:%d\n", frame); //return MusEGlobal::audio->sync(audioState, frame); int rv = MusEGlobal::audio->sync(audioState, frame); - //printf("Jack processSync() after MusEGlobal::audio->sync frame:%d\n", frame); + //printf("Jack processSync() after MusEGlobal::audio->sync frame:%d\n", frame); return rv; } @@ -366,7 +242,6 @@ static void timebase_callback(jack_transport_state_t /* state */, { //printf("Jack timebase_callback pos->frame:%u MusEGlobal::audio->tickPos:%d MusEGlobal::song->cpos:%d\n", pos->frame, MusEGlobal::audio->tickPos(), MusEGlobal::song->cpos()); - // p3.3.27 //Pos p(pos->frame, false); Pos p(MusEGlobal::extSyncFlag.value() ? MusEGlobal::audio->tickPos() : pos->frame, MusEGlobal::extSyncFlag.value() ? true : false); // Can't use song pos - it is only updated every (slow) GUI heartbeat ! @@ -382,7 +257,6 @@ static void timebase_callback(jack_transport_state_t /* state */, // dummy: // - // p3.3.26 //pos->beats_per_bar = 4; //pos->beat_type = 4; //pos->ticks_per_beat = 384; @@ -472,20 +346,7 @@ JackAudioDevice::~JackAudioDevice() if (JACK_DEBUG) printf("~JackAudioDevice()\n"); if (_client) { - - /* - // p3.3.35 - for(int i = 0; i < JACK_MIDI_CHANNELS; i++) - { - if(midi_port_in[i]) - jack_port_unregister(_client, midi_port_in[i]); - if(midi_port_out[i]) - jack_port_unregister(_client, midi_port_out[i]); - } - */ - if (jack_client_close(_client)) { - //error->logError("jack_client_close() failed: %s\n", strerror(errno)); fprintf(stderr,"jack_client_close() failed: %s\n", strerror(errno)); } } @@ -518,32 +379,6 @@ int JackAudioDevice::realtimePriority() const return param.sched_priority; } -/* -//--------------------------------------------------------- -// getJackName() -//--------------------------------------------------------- - -char* JackAudioDevice::getJackName() - { - return jackRegisteredName; - } -*/ - -/* -//--------------------------------------------------------- -// clientName() -//--------------------------------------------------------- - -const char* JackAudioDevice::clientName() -{ - //if(_client) - // return jack_get_client_name(_client); - //else - // return "MusE"; - return jackRegisteredName; -} -*/ - //--------------------------------------------------------- // initJackAudio // return true if JACK not found @@ -551,15 +386,6 @@ const char* JackAudioDevice::clientName() bool initJackAudio() { - /* - // p3.3.35 - for(int i = 0; i < JACK_MIDI_CHANNELS; i++) - { - midi_port_in[i] = 0; - midi_port_out[i] = 0; - } - */ - if (JACK_DEBUG) printf("initJackAudio()\n"); if (MusEGlobal::debugMsg) { @@ -596,7 +422,7 @@ bool initJackAudio() if (status & JackVersionError) printf("jack server has wrong version\n"); printf("cannot create jack client\n"); - MusEGlobal::undoSetuid(); // p3.3.51 + MusEGlobal::undoSetuid(); return true; } @@ -616,39 +442,6 @@ bool initJackAudio() } MusEGlobal::undoSetuid(); - /* - // setup midi input/output - //memset(jack_midi_out_data, 0, JACK_MIDI_CHANNELS * sizeof(muse_jack_midi_buffer)); - //memset(jack_midi_in_data, 0, JACK_MIDI_CHANNELS * sizeof(muse_jack_midi_buffer)); - if(client){ - for(i = 0; i < JACK_MIDI_CHANNELS; i++) - { - char buf[80]; - snprintf(buf, 80, "muse-jack-midi-in-%d", i+1); - midi_port_in[i] = jack_port_register(client, buf, - JACK_DEFAULT_MIDI_TYPE, - JackPortIsInput, 0); - if(midi_port_in[i] == NULL){ - fprintf(stderr, "failed to register jack-midi-in\n"); - exit(-1); - } - snprintf(buf, 80, "muse-jack-midi-out-%d", i+1); - midi_port_out[i] = jack_port_register(client, buf, - JACK_DEFAULT_MIDI_TYPE, - JackPortIsOutput, 0); - if(midi_port_out == NULL) - { - fprintf(stderr, "failed to register jack-midi-out\n"); - exit(-1); - } - } - } - else - { - fprintf(stderr, "WARNING NO muse-jack midi connection\n"); - } - */ - if (client) { MusEGlobal::audioDevice = jackAudio; jackAudio->scanMidiPorts(); @@ -730,8 +523,8 @@ void JackAudioDevice::connectJackMidiPorts() //void* port = md->clientPort(); if(md->rwFlags() & 1) { - void* port = md->outClientPort(); // p3.3.55 - if(port) // + void* port = md->outClientPort(); + if(port) { RouteList* rl = md->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) @@ -743,12 +536,10 @@ void JackAudioDevice::connectJackMidiPorts() } } - // else // p3.3.55 Removed - if(md->rwFlags() & 2) { - void* port = md->inClientPort(); // p3.3.55 - if(port) // + void* port = md->inClientPort(); + if(port) { RouteList* rl = md->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) @@ -760,117 +551,8 @@ void JackAudioDevice::connectJackMidiPorts() } } } - - - /* - const char* type = JACK_DEFAULT_MIDI_TYPE; - const char** ports = jack_get_ports(_client, 0, type, 0); - for (const char** p = ports; p && *p; ++p) - { - jack_port_t* port = jack_port_by_name(_client, *p); - if(!port) - continue; - // Ignore our own client ports. - if(jack_port_is_mine(_client, port)) - { - if(MusEGlobal::debugMsg) - printf(" ignoring own port: %s\n", *p); - continue; - } - int nsz = jack_port_name_size(); - char buffer[nsz]; - strncpy(buffer, *p, nsz); - // Ignore the MusE Jack port. - //if(strncmp(buffer, "MusE", 4) == 0) - // continue; - - if(MusEGlobal::debugMsg) - printf(" found port: %s ", buffer); - - // If there are aliases for this port, use the first one - much better for identifying. - //char a1[nsz]; - char a2[nsz]; - char* aliases[2]; - //aliases[0] = a1; - aliases[0] = buffer; - aliases[1] = a2; - // To disable aliases, just rem this line. - jack_port_get_aliases(port, aliases); - //int na = jack_port_get_aliases(port, aliases); - //char* namep = (na >= 1) ? aliases[0] : buffer; - char* namep = aliases[0]; - - if(MusEGlobal::debugMsg) - printf("alias: %s\n", aliases[0]); - - //int flags = 0; - int pf = jack_port_flags(port); - // If Jack port can send data to us... - //if(pf & JackPortIsOutput) - // Mark as input capable. - // flags |= 2; - // If Jack port can receive data from us... - //if(pf & JackPortIsInput) - // Mark as output capable. - // flags |= 1; - - //JackPort jp(0, QString(buffer), flags); - //portList.append(jp); - - QString name(namep); - - if(JACK_DEBUG) - printf("JackAudioDevice::graphChanged %s\n", name.toLatin1()); - - for(iMidiDevice imd = MusEGlobal::midiDevices.begin(); imd != MusEGlobal::midiDevices.end(); ++imd) - { - // Is it a Jack midi device? - MidiJackDevice* mjd = dynamic_cast(*imd); - if(!mjd) - continue; - - //if(dev->name() != name) - // continue; - - // Is this port the one created for the Jack midi device? - if(!mjd->clientJackPort() || (mjd->clientJackPort() != port)) - continue; - - jack_port_t* devport = jack_port_by_name(_client, mjd->name().toLatin1()); - if(!devport) - continue; - - int ofl = mjd->openFlags(); - - if(JACK_DEBUG) - printf("JackAudioDevice::graphChanged found MidiJackDevice:%s\n", mjd->name().toLatin1()); - - // Note docs say it can't be both input and output. src, dest - // If Jack port can receive data from us and we actually want to... - if((pf & JackPortIsOutput) && (ofl & 1)) - { - if(JACK_DEBUG) - printf("JackAudioDevice::graphChanged connecting MusE output\n"); - MusEGlobal::audioDevice->connect(port, devport); - } - else - // If Jack port can send data to us and we actually want it... - if((pf & JackPortIsInput) && (ofl & 2)) - { - if(JACK_DEBUG) - printf("JackAudioDevice::graphChanged connecting MusE input\n"); - MusEGlobal::audioDevice->connect(devport, port); - } - - break; - } - } - - if(ports) - free(ports); - - */ } + //--------------------------------------------------------- // client_registration_callback //--------------------------------------------------------- @@ -1009,9 +691,6 @@ void JackAudioDevice::graphChanged() ++pn; } - // p3.3.37 - //delete ports; - //free(ports); jack_free(ports); // p4.0.29 ports = NULL; @@ -1100,9 +779,6 @@ void JackAudioDevice::graphChanged() ++pn; } - // p3.3.37 - //delete ports; - //free(ports); jack_free(ports); // p4.0.29 ports = NULL; @@ -1134,12 +810,9 @@ void JackAudioDevice::graphChanged() if(md->rwFlags() & 1) // Writable { - // p3.3.55 jack_port_t* port = (jack_port_t*)md->outClientPort(); if(port != 0) { - //printf("graphChanged() valid out client port\n"); // p3.3.55 - const char** ports = jack_port_get_all_connections(_client, port); RouteList* rl = md->outRoutes(); @@ -1160,7 +833,7 @@ void JackAudioDevice::graphChanged() //if (irl->channel != channel) // continue; QString name = irl->name(); - //name += QString(JACK_MIDI_OUT_PORT_SUFFIX); // p3.3.55 + //name += QString(JACK_MIDI_OUT_PORT_SUFFIX); QByteArray ba = name.toLatin1(); const char* portName = ba.constData(); bool found = false; @@ -1224,9 +897,6 @@ void JackAudioDevice::graphChanged() ++pn; } - // p3.3.55 - // Done with ports. Free them. - //free(ports); jack_free(ports); // p4.0.29 } } @@ -1239,11 +909,9 @@ void JackAudioDevice::graphChanged() if(md->rwFlags() & 2) // Readable { - // p3.3.55 jack_port_t* port = (jack_port_t*)md->inClientPort(); if(port != 0) { - //printf("graphChanged() valid in client port\n"); // p3.3.55 const char** ports = jack_port_get_all_connections(_client, port); RouteList* rl = md->inRoutes(); @@ -1326,20 +994,11 @@ void JackAudioDevice::graphChanged() } ++pn; } - // p3.3.55 - // Done with ports. Free them. - //free(ports); + jack_free(ports); // p4.0.29 } } } - - // p3.3.55 Removed. - //if(ports) - // Done with ports. Free them. - //delete ports; - // free(ports); - //ports = NULL; } } @@ -1360,18 +1019,12 @@ void JackAudioDevice::registerClient() if(!checkJackClient(_client)) return; jack_set_process_callback(_client, processAudio, 0); jack_set_sync_callback(_client, processSync, 0); - // FIXME: FIXME: - // Added by Tim. p3.3.20 - // Did not help. Seek during play: Jack keeps switching to STOP state after about 1-2 seconds timeout if sync is holding it up. - // Nothing in MusE seems to be telling it to stop. - // NOTE: Update: It was a bug in QJackCtl. Fixed now. //jack_set_sync_timeout(_client, 5000000); // Change default 2 to 5 second sync timeout because prefetch may be very slow esp. with resampling ! jack_on_shutdown(_client, processShutdown, 0); jack_set_buffer_size_callback(_client, bufsize_callback, 0); jack_set_sample_rate_callback(_client, srate_callback, 0); jack_set_port_registration_callback(_client, registration_callback, 0); - // p3.3.37 jack_set_client_registration_callback(_client, client_registration_callback, 0); jack_set_port_connect_callback(_client, port_connect_callback, 0); @@ -1384,7 +1037,6 @@ void JackAudioDevice::registerClient() // registerInPort //--------------------------------------------------------- -//void* JackAudioDevice::registerInPort(const char* name) void* JackAudioDevice::registerInPort(const char* name, bool midi) { if (JACK_DEBUG) @@ -1401,7 +1053,6 @@ void* JackAudioDevice::registerInPort(const char* name, bool midi) // registerOutPort //--------------------------------------------------------- -//void* JackAudioDevice::registerOutPort(const char* name) void* JackAudioDevice::registerOutPort(const char* name, bool midi) { if (JACK_DEBUG) @@ -1452,7 +1103,7 @@ void JackAudioDevice::disconnect(void* src, void* dst) if (JACK_DEBUG) printf("JackAudioDevice::disconnect()\n"); if(!checkJackClient(_client)) return; - if(!src || !dst) // p3.3.55 + if(!src || !dst) return; const char* sn = jack_port_name((jack_port_t*) src); const char* dn = jack_port_name((jack_port_t*) dst); @@ -1478,7 +1129,6 @@ void JackAudioDevice::disconnect(void* src, void* dst) // start //--------------------------------------------------------- -//void JackAudioDevice::start() void JackAudioDevice::start(int /*priority*/) { if (JACK_DEBUG) @@ -1488,7 +1138,7 @@ void JackAudioDevice::start(int /*priority*/) MusEGlobal::doSetuid(); if (jack_activate(_client)) { - MusEGlobal::undoSetuid(); // p3.3.51 + MusEGlobal::undoSetuid(); fprintf (stderr, "JACK: cannot activate client\n"); exit(-1); } @@ -1530,7 +1180,6 @@ void JackAudioDevice::start(int /*priority*/) } } - // p3.3.37 // Connect the Jack midi client ports to device ports. connectJackMidiPorts(); @@ -1723,9 +1372,6 @@ void JackAudioDevice::getJackPorts(const char** ports, std::list& name_ name_list.push_back(qname); } - // p3.3.37 - //if(ports) - //free(ports); // jack_free(ports); // p4.0.29 //return clientList; @@ -1744,61 +1390,6 @@ std::list JackAudioDevice::outputPorts(bool midi, int aliases) const char* type = midi ? JACK_DEFAULT_MIDI_TYPE : JACK_DEFAULT_AUDIO_TYPE; const char** ports = jack_get_ports(_client, 0, type, JackPortIsOutput); - /* - QString qname; - for (const char** p = ports; p && *p; ++p) { - jack_port_t* port = jack_port_by_name(_client, *p); - //int flags = jack_port_flags(port); - //if (!(flags & JackPortIsOutput)) - // continue; - //char buffer[128]; - - int nsz = jack_port_name_size(); - char buffer[nsz]; - - strncpy(buffer, *p, nsz); - //if (strncmp(buffer, "MusE", 4) == 0) - //{ - // if(MusEGlobal::debugMsg) - // printf("JackAudioDevice::outputPorts ignoring own MusE port: %s\n", *p); - // continue; - //} - - // Ignore our own client ports. - if(jack_port_is_mine(_client, port)) - { - if(MusEGlobal::debugMsg) - printf("JackAudioDevice::outputPorts ignoring own port: %s\n", *p); - continue; - } - - // p3.3.38 - if((aliases == 0) || (aliases == 1)) - { - //char a1[nsz]; - char a2[nsz]; - char* al[2]; - //aliases[0] = a1; - al[0] = buffer; - al[1] = a2; - int na = jack_port_get_aliases(port, al); - int a = aliases; - if(a >= na) - { - a = na; - if(a > 0) - a--; - } - qname = QString(al[a]); - } - else - qname = QString(buffer); - - //clientList.push_back(QString(buffer)); - clientList.push_back(qname); - } - */ - if(ports) { getJackPorts(ports, clientList, midi, true, aliases); // Get physical ports first. @@ -1823,61 +1414,6 @@ std::list JackAudioDevice::inputPorts(bool midi, int aliases) const char* type = midi ? JACK_DEFAULT_MIDI_TYPE : JACK_DEFAULT_AUDIO_TYPE; const char** ports = jack_get_ports(_client, 0, type, JackPortIsInput); - /* - QString qname; - for (const char** p = ports; p && *p; ++p) { - jack_port_t* port = jack_port_by_name(_client, *p); - //int flags = jack_port_flags(port); - //if (!(flags & JackPortIsInput)) - // continue; - //char buffer[128]; - - int nsz = jack_port_name_size(); - char buffer[nsz]; - - strncpy(buffer, *p, nsz); - //if (strncmp(buffer, "MusE", 4) == 0) - //{ - // if(MusEGlobal::debugMsg) - // printf("JackAudioDevice::inputPorts ignoring own MusE port: %s\n", *p); - // continue; - //} - - // Ignore our own client ports. - if(jack_port_is_mine(_client, port)) - { - if(MusEGlobal::debugMsg) - printf("JackAudioDevice::inputPorts ignoring own port: %s\n", *p); - continue; - } - - // p3.3.38 - if((aliases == 0) || (aliases == 1)) - { - //char a1[nsz]; - char a2[nsz]; - char* al[2]; - //aliases[0] = a1; - al[0] = buffer; - al[1] = a2; - int na = jack_port_get_aliases(port, al); - int a = aliases; - if(a >= na) - { - a = na; - if(a > 0) - a--; - } - qname = QString(al[a]); - } - else - qname = QString(buffer); - - //clientList.push_back(QString(buffer)); - clientList.push_back(qname); - } - */ - if(ports) { getJackPorts(ports, clientList, midi, true, aliases); // Get physical ports first. @@ -1978,37 +1514,6 @@ void JackAudioDevice::setFreewheel(bool f) jack_set_freewheel(_client, f); } -//--------------------------------------------------------- -// dummySync -//--------------------------------------------------------- - -bool JackAudioDevice::dummySync(int state) -{ - // Roughly segment time length. - //timespec ts = { 0, (1000000000 * MusEGlobal::segmentSize) / MusEGlobal::sampleRate }; // In nanoseconds. - unsigned int sl = (1000000 * MusEGlobal::segmentSize) / MusEGlobal::sampleRate; // In microseconds. - - double ct = curTime(); - // Wait for a default maximum of 5 seconds. - // Similar to how Jack is supposed to wait a default of 2 seconds for slow clients. - // TODO: Make this timeout a 'settings' option so it can be applied both to Jack and here. - while((curTime() - ct) < 5.0) - { - // Is MusE audio ready to roll? - if(MusEGlobal::audio->sync(state, dummyPos)) - return true; - - // Not ready. Wait a 'segment', try again... - //nanosleep(&ts, NULL); - usleep(sl); // usleep is supposed to be obsolete! - } - - //if(JACK_DEBUG) - printf("JackAudioDevice::dummySync Sync timeout - audio not ready!\n"); - - return false; -} - //--------------------------------------------------------- // startTransport //--------------------------------------------------------- @@ -2022,19 +1527,7 @@ void JackAudioDevice::startTransport() // as if processSync was called. if(!MusEGlobal::useJackTransport.value()) { - //dummyState = Audio::START_PLAY; - - // Is MusE audio ready to roll? - //if(dummySync(dummyState)) - if(dummySync(Audio::START_PLAY)) - { - // MusE audio is ready to roll. Let's play. - dummyState = Audio::PLAY; - return; - } - - // Ready or not, we gotta roll. Similar to how Jack is supposed to roll anyway. - dummyState = Audio::PLAY; + _dummyStatePending = Audio::START_PLAY; return; } @@ -2052,11 +1545,9 @@ void JackAudioDevice::stopTransport() if (JACK_DEBUG) printf("JackAudioDevice::stopTransport()\n"); - dummyState = Audio::STOP; - if(!MusEGlobal::useJackTransport.value()) { - //dummyState = Audio::STOP; + _dummyStatePending = Audio::STOP; return; } @@ -2077,32 +1568,11 @@ void JackAudioDevice::seekTransport(unsigned frame) if (JACK_DEBUG) printf("JackAudioDevice::seekTransport() frame:%d\n", frame); - dummyPos = frame; if(!MusEGlobal::useJackTransport.value()) { - // If we're not using Jack's transport, just pass the current state and new frame along - // as if processSync was called. - //dummyPos = frame; - int tempState = dummyState; - //dummyState = Audio::START_PLAY; - - // Is MusE audio ready yet? - //MusEGlobal::audio->sync(dummyState, dummyPos); - //if(dummySync(dummyState)) - if(dummySync(Audio::START_PLAY)) - { - dummyState = tempState; - return; - } - - // Not ready, resume previous state anyway. - // FIXME: Observed: Seek during play: Jack transport STOPs on timeout. - // Docs say when starting play, transport will roll anyway, ready or not (observed), - // but don't mention what should happen on seek during play. - // And setting the slow-sync timeout doesn't seem to do anything! - // NOTE: Update: It was a bug with QJackCtl. Fixed now. - //dummyState = tempState; - dummyState = Audio::STOP; + _dummyPosPending = frame; + // STOP -> STOP means seek in stop mode. PLAY -> START_PLAY means seek in play mode. + _dummyStatePending = (dummyState == Audio::STOP ? Audio::STOP : Audio::START_PLAY); return; } @@ -2120,28 +1590,11 @@ void JackAudioDevice::seekTransport(const Pos &p) if (JACK_DEBUG) printf("JackAudioDevice::seekTransport() frame:%d\n", p.frame()); - dummyPos = p.frame(); if(!MusEGlobal::useJackTransport.value()) { - // If we're not using Jack's transport, just pass the current state and new frame along - // as if processSync was called. - //dummyPos = p.frame(); - int tempState = dummyState; - //dummyState = Audio::START_PLAY; - - // Is MusE audio ready yet? - //MusEGlobal::audio->sync(dummyState, dummyPos); - //if(dummySync(dummyState)) - if(dummySync(Audio::START_PLAY)) - { - dummyState = tempState; - return; - } - - // Not ready, resume previous state anyway. - // FIXME: See fixme in other seekTransport... - //dummyState = tempState; - dummyState = Audio::STOP; + _dummyPosPending = p.frame(); + // STOP -> STOP means seek in stop mode. PLAY -> START_PLAY means seek in play mode. + _dummyStatePending = (dummyState == Audio::STOP ? Audio::STOP : Audio::START_PLAY); return; } @@ -2380,8 +1833,7 @@ void exitJackAudio() if (JACK_DEBUG) printf("exitJackAudio() after delete jackAudio\n"); - // Added by Tim. p3.3.14 - MusEGlobal::audioDevice = NULL; + MusEGlobal::audioDevice = NULL; // By Tim } } // namespace MusECore diff --git a/muse2/muse/driver/jackaudio.h b/muse2/muse/driver/jackaudio.h index c4d37db9..838a20df 100644 --- a/muse2/muse/driver/jackaudio.h +++ b/muse2/muse/driver/jackaudio.h @@ -40,13 +40,16 @@ class MidiPlayEvent; class JackAudioDevice : public AudioDevice { jack_client_t* _client; - double sampleTime; - int samplePos; + //double sampleTime; + //int samplePos; + float _syncTimeout; jack_transport_state_t transportState; jack_position_t pos; char jackRegisteredName[16]; int dummyState; int dummyPos; + volatile int _dummyStatePending; + volatile int _dummyPosPending; // Free-running frame counter incremented always in process. jack_nframes_t _frameCounter; @@ -58,14 +61,13 @@ class JackAudioDevice : public AudioDevice { virtual ~JackAudioDevice(); virtual void nullify_client() { _client = 0; } - virtual inline int deviceType() const { return JACK_AUDIO; } // p3.3.52 + virtual inline int deviceType() const { return JACK_AUDIO; } void scanMidiPorts(); //virtual void start(); virtual void start(int); virtual void stop (); - virtual bool dummySync(int state); // Artificial sync when not using Jack transport. virtual int framePos() const; virtual unsigned frameTime() const { return _frameCounter; } @@ -80,8 +82,6 @@ class JackAudioDevice : public AudioDevice { virtual void registerClient(); virtual const char* clientName() { return jackRegisteredName; } - //virtual void* registerOutPort(const char* name); - //virtual void* registerInPort(const char* name); virtual void* registerOutPort(const char* /*name*/, bool /*midi*/); virtual void* registerInPort(const char* /*name*/, bool /*midi*/); diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp index 7a12b92d..706fa269 100644 --- a/muse2/muse/driver/jackmidi.cpp +++ b/muse2/muse/driver/jackmidi.cpp @@ -24,6 +24,7 @@ #include #include +#include #include //#include @@ -43,6 +44,8 @@ #include "../mplugins/midiitransform.h" #include "../mplugins/mitplugin.h" #include "xml.h" +#include "gconfig.h" +#include "track.h" // Turn on debug messages. //#define JACK_MIDI_DEBUG @@ -336,10 +339,10 @@ void MidiJackDevice::recordEvent(MidiRecordEvent& event) event.setLoopNum(MusEGlobal::audio->loopCount()); if (MusEGlobal::midiInputTrace) { - printf("Jack MidiInput: "); + printf("MidiIn Jack: <%s>: ", name().toLatin1().constData()); event.dump(); } - + int typ = event.type(); if(_port != -1) @@ -431,7 +434,8 @@ void MidiJackDevice::eventReceived(jack_midi_event_t* ev) { MidiRecordEvent event; event.setB(0); - + event.setPort(_port); + // NOTE: From muse_qt4_evolution. Not done here in Muse-2 (yet). // move all events 2*MusEGlobal::segmentSize into the future to get // jitterfree playback @@ -452,6 +456,7 @@ void MidiJackDevice::eventReceived(jack_midi_event_t* ev) int a = *(ev->buffer + 1) & 0x7f; int b = *(ev->buffer + 2) & 0x7f; event.setType(type); + switch(type) { case ME_NOTEON: case ME_NOTEOFF: @@ -494,7 +499,7 @@ void MidiJackDevice::eventReceived(jack_midi_event_t* ev) return; case ME_SONGPOS: if(_port != -1) - MusEGlobal::midiSeq->setSongPosition(_port, *(ev->buffer + 1) | (*(ev->buffer + 2) >> 2 )); // LSB then MSB + MusEGlobal::midiSeq->setSongPosition(_port, *(ev->buffer + 1) | (*(ev->buffer + 2) << 7 )); // LSB then MSB return; //case ME_SONGSEL: //case ME_TUNE_REQ: @@ -525,11 +530,6 @@ void MidiJackDevice::eventReceived(jack_midi_event_t* ev) return; } - if (MusEGlobal::midiInputTrace) { - printf("MidiInput<%s>: ", name().toLatin1().constData()); - event.dump(); - } - #ifdef JACK_MIDI_DEBUG printf("MidiJackDevice::eventReceived time:%d type:%d ch:%d A:%d B:%d\n", event.time(), event.type(), event.channel(), event.dataA(), event.dataB()); #endif @@ -600,14 +600,6 @@ bool MidiJackDevice::queueEvent(const MidiPlayEvent& e) //if(port >= JACK_MIDI_CHANNELS) // return false; - //if (midiOutputTrace) { - // printf("MidiOut<%s>: jackMidi: ", portName(port).toLatin1().constData()); - // e.dump(); - // } - - //if(MusEGlobal::debugMsg) - // printf("MidiJackDevice::queueEvent\n"); - if(!_out_client_jackport) return false; void* pb = jack_port_get_buffer(_out_client_jackport, MusEGlobal::segmentSize); @@ -626,9 +618,14 @@ bool MidiJackDevice::queueEvent(const MidiPlayEvent& e) } #ifdef JACK_MIDI_DEBUG - printf("MidiJackDevice::queueEvent time:%d type:%d ch:%d A:%d B:%d\n", e.time(), e.type(), e.channel(), e.dataA(), e.dataB()); + printf("MidiJackDevice::queueEvent pos:%d fo:%d ft:%d time:%d type:%d ch:%d A:%d B:%d\n", pos, frameOffset, ft, e.time(), e.type(), e.channel(), e.dataA(), e.dataB()); #endif + if (MusEGlobal::midiOutputTrace) { + printf("MidiOut: Jack: <%s>: ", name().toLatin1().constData()); + e.dump(); + } + switch(e.type()) { case ME_NOTEON: case ME_NOTEOFF: @@ -698,14 +695,47 @@ bool MidiJackDevice::queueEvent(const MidiPlayEvent& e) } break; case ME_SONGPOS: + { + #ifdef JACK_MIDI_DEBUG + printf("MidiJackDevice::queueEvent songpos %d\n", e.dataA()); + #endif + + unsigned char* p = jack_midi_event_reserve(pb, ft, 3); + if (p == 0) { + #ifdef JACK_MIDI_DEBUG + fprintf(stderr, "MidiJackDevice::queueEvent songpos: buffer overflow, stopping until next cycle\n"); + #endif + return false; + } + int pos = e.dataA(); + p[0] = e.type(); + p[1] = pos & 0x7f; // LSB + p[2] = (pos >> 7) & 0x7f; // MSB + } + break; case ME_CLOCK: case ME_START: case ME_CONTINUE: case ME_STOP: + { + #ifdef JACK_MIDI_DEBUG + printf("MidiJackDevice::queueEvent realtime %x\n", e.type()); + #endif + + unsigned char* p = jack_midi_event_reserve(pb, ft, 1); + if (p == 0) { + #ifdef JACK_MIDI_DEBUG + fprintf(stderr, "MidiJackDevice::queueEvent realtime: buffer overflow, stopping until next cycle\n"); + #endif + return false; + } + p[0] = e.type(); + } + break; + default: if(MusEGlobal::debugMsg) printf("MidiJackDevice::queueEvent: event type %x not supported\n", e.type()); - //return false; - return true; // Absorb the event. Don't want it hanging around in the list. FIXME: Support these? p4.0.15 Tim. + return true; // Absorb the event. Don't want it hanging around in the list. break; } @@ -757,12 +787,18 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) // event.time(), event.type(), event.channel(), event.dataA(), event.dataB(), hb, lb, pr); if (hb != 0xff) + { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HBANK, hb))) return false; // p4.0.15 Inform that processing the event in general failed. Ditto all below... +/// t += 1; + } if (lb != 0xff) - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LBANK, lb))) + { + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LBANK, lb))) return false; - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_PROGRAM, pr, 0))) +/// t += 1; + } + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_PROGRAM, pr, 0))) return false; // } @@ -815,13 +851,15 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HBANK, hb))) return false; +/// t += 1; } if (lb != 0xff) { - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LBANK, lb))) + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LBANK, lb))) return false; +/// t += 1; } - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_PROGRAM, pr, 0))) + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_PROGRAM, pr, 0))) return false; // } @@ -851,7 +889,8 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) int dataL = b & 0x7f; if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, ctrlH, dataH))) return false; - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, ctrlL, dataL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, ctrlL, dataL))) return false; } else if (a < CTRL_NRPN_OFFSET) @@ -860,19 +899,22 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) int ctrlL = a & 0x7f; if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HRPN, ctrlH))) return false; - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LRPN, ctrlL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LRPN, ctrlL))) return false; - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_CONTROLLER, CTRL_HDATA, b))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HDATA, b))) return false; +/// t += 1; - t += 3; + //t += 3; // Select null parameters so that subsequent data controller events do not upset the last *RPN controller. //sendNullRPNParams(chn, false); if(nvh != 0xff) { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HRPN, nvh & 0x7f))) return false; - t += 1; +/// t += 1; } if(nvl != 0xff) { @@ -887,18 +929,21 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) int ctrlL = a & 0x7f; if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HNRPN, ctrlH))) return false; - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LNRPN, ctrlL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LNRPN, ctrlL))) return false; - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_CONTROLLER, CTRL_HDATA, b))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HDATA, b))) return false; +/// t += 1; - t += 3; + //t += 3; //sendNullRPNParams(chn, true); if(nvh != 0xff) { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HNRPN, nvh & 0x7f))) return false; - t += 1; +/// t += 1; } if(nvl != 0xff) { @@ -914,20 +959,24 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) int dataL = b & 0x7f; if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HRPN, ctrlH))) return false; - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LRPN, ctrlL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LRPN, ctrlL))) return false; - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_CONTROLLER, CTRL_HDATA, dataH))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HDATA, dataH))) return false; - if(!queueEvent(MidiPlayEvent(t+3, port, chn, ME_CONTROLLER, CTRL_LDATA, dataL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LDATA, dataL))) return false; +/// t += 1; - t += 4; + //t += 4; //sendNullRPNParams(chn, false); if(nvh != 0xff) { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HRPN, nvh & 0x7f))) return false; - t += 1; +/// t += 1; } if(nvl != 0xff) { @@ -943,20 +992,24 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) int dataL = b & 0x7f; if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HNRPN, ctrlH))) return false; - if(!queueEvent(MidiPlayEvent(t+1, port, chn, ME_CONTROLLER, CTRL_LNRPN, ctrlL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LNRPN, ctrlL))) return false; - if(!queueEvent(MidiPlayEvent(t+2, port, chn, ME_CONTROLLER, CTRL_HDATA, dataH))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HDATA, dataH))) return false; - if(!queueEvent(MidiPlayEvent(t+3, port, chn, ME_CONTROLLER, CTRL_LDATA, dataL))) +/// t += 1; + if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_LDATA, dataL))) return false; +/// t += 1; - t += 4; + //t += 4; //sendNullRPNParams(chn, true); if(nvh != 0xff) { if(!queueEvent(MidiPlayEvent(t, port, chn, ME_CONTROLLER, CTRL_HNRPN, nvh & 0x7f))) return false; - t += 1; +/// t += 1; } if(nvl != 0xff) { @@ -988,8 +1041,16 @@ bool MidiJackDevice::processEvent(const MidiPlayEvent& event) void MidiJackDevice::processMidi() { + //bool stop = stopPending; // Snapshots + //bool seek = seekPending; // + //seekPending = stopPending = false; + processStuckNotes(); + // Don't process if the device is not assigned to a port. + //if(_port == -1) + // return; + void* port_buf = 0; if(_out_client_jackport && _writeEnable) { @@ -997,65 +1058,294 @@ void MidiJackDevice::processMidi() jack_midi_clear_buffer(port_buf); } + int port = midiPort(); + MidiPort* mp = port == -1 ? 0 : &MusEGlobal::midiPorts[port]; + + /* + bool is_playing = MusEGlobal::audio->isPlaying(); // TODO Check this. It includes LOOP1 and LOOP2 besides PLAY. + //bool is_playing = MusEGlobal::audio->isPlaying() || MusEGlobal::audio->isStarting(); + int pos = MusEGlobal::audio->tickPos(); + bool ext_sync = MusEGlobal::extSyncFlag.value(); + + if(mp) + { + MidiSyncInfo& si = mp->syncInfo(); + if(stop) + { + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!ext_sync) + { + // Shall we check open flags? + //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) + //if(!(dev->openFlags() & 1)) + // return; + + // Send MMC stop... + if(si.MMCOut()) + { + unsigned char msg[mmcStopMsgLen]; + memcpy(msg, mmcStopMsg, mmcStopMsgLen); + msg[1] = si.idOut(); + putEvent(MidiPlayEvent(0, 0, ME_SYSEX, msg, mmcStopMsgLen)); + } + + // Send midi stop... + if(si.MRTOut()) + { + putEvent(MidiPlayEvent(0, 0, 0, ME_STOP, 0, 0)); + // Added check of option send continue not start. p3.3.31 + // Hmm, is this required? Seems to make other devices unhappy. + // (Could try now that this is in MidiDevice. p4.0.22 ) + //if(!si.sendContNotStart()) + // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / config.division); + } + } + } + + if(seek) + { + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!ext_sync) + { + // Send midi stop and song position pointer... + if(si.MRTOut()) + { + // Shall we check for device write open flag to see if it's ok to send?... + //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) + //if(!(openFlags() & 1)) + // continue; + putEvent(MidiPlayEvent(0, 0, 0, ME_STOP, 0, 0)); + // Hm, try scheduling these for after stuck notes scheduled below... + //putEvent(MidiPlayEvent(0, 0, 0, ME_SONGPOS, beat, 0)); + //if(is_playing) + // putEvent(MidiPlayEvent(0, 0, 0, ME_CONTINUE, 0, 0)); + } + } + } + } + + if(stop || (seek && is_playing)) + { + // Clear all notes and handle stuck notes... + _playEvents.clear(); + for(iMPEvent i = _stuckNotes.begin(); i != _stuckNotes.end(); ++i) + { + MidiPlayEvent ev = *i; + ev.setTime(0); // Schedule immediately. + putEvent(ev); + } + _stuckNotes.clear(); + } + + if(mp) + { + MidiSyncInfo& si = mp->syncInfo(); + // Try scheduling these now for after stuck notes scheduled above... + if(stop || seek) + { + // Reset sustain. + for(int ch = 0; ch < MIDI_CHANNELS; ++ch) + if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) + putEvent(MidiPlayEvent(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0)); + } + if(seek) + { + // Send new song position. + if(!ext_sync && si.MRTOut()) + { + int beat = (pos * 4) / MusEGlobal::config.division; + putEvent(MidiPlayEvent(0, 0, 0, ME_SONGPOS, beat, 0)); + } + // Send new controller values. + MidiCtrlValListList* cll = mp->controller(); + for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) + { + MidiCtrlValList* vl = ivl->second; + iMidiCtrlVal imcv = vl->iValue(pos); + if(imcv != vl->end()) { + Part* p = imcv->second.part; + // Don't send if part or track is muted or off. + if(!p || p->mute()) + continue; + Track* track = p->track(); + if(track && (track->isMute() || track->off())) + continue; + unsigned t = (unsigned)imcv->first; + // Do not add values that are outside of the part. + if(t >= p->tick() && t < (p->tick() + p->lenTick())) + // Use sendEvent to get the optimizations and limiting. But force if there's a value at this exact position. + mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val), imcv->first == pos); + } + } + // Send continue. + // REMOVE Tim. This is redundant and too early - Audio::startRolling already properly sends it when sync ready. + //if(is_playing && !ext_sync && si.MRTOut()) + // putEvent(MidiPlayEvent(0, 0, 0, ME_CONTINUE, 0, 0)); + } + } + */ + while(!eventFifo.isEmpty()) { MidiPlayEvent e(eventFifo.peek()); + //printf("MidiJackDevice::processMidi FIFO event time:%d type:%d ch:%d A:%d B:%d\n", e.time(), e.type(), e.channel(), e.dataA(), e.dataB()); // Try to process only until full, keep rest for next cycle. If no out client port or no write enable, eat up events. p4.0.15 if(port_buf && !processEvent(e)) return; // Give up. The Jack buffer is full. Nothing left to do. eventFifo.remove(); // Successfully processed event. Remove it from FIFO. } + //if(!(stop || (seek && is_playing))) + // processStuckNotes(); + if(_playEvents.empty()) - { - //printf("MidiJackDevice::processMidi play events empty\n"); return; - } iMPEvent i = _playEvents.begin(); for(; i != _playEvents.end(); ++i) { //printf("MidiJackDevice::processMidi playEvent time:%d type:%d ch:%d A:%d B:%d\n", i->time(), i->type(), i->channel(), i->dataA(), i->dataB()); // Update hardware state so knobs and boxes are updated. Optimize to avoid re-setting existing values. - // Same code as in MidiPort::sendEvent() - if(_port != -1) - { - MidiPort* mp = &MusEGlobal::midiPorts[_port]; - if(i->type() == ME_CONTROLLER) - { - int da = i->dataA(); - int db = i->dataB(); - db = mp->limitValToInstrCtlRange(da, db); - if(!mp->setHwCtrlState(i->channel(), da, db)) - continue; - //mp->setHwCtrlState(i->channel(), da, db); - } - else - if(i->type() == ME_PITCHBEND) - { - //printf("MidiJackDevice::processMidi playEvents ME_PITCHBEND time:%d type:%d ch:%d A:%d B:%d\n", (*i).time(), (*i).type(), (*i).channel(), (*i).dataA(), (*i).dataB()); - int da = mp->limitValToInstrCtlRange(CTRL_PITCH, i->dataA()); - if(!mp->setHwCtrlState(i->channel(), CTRL_PITCH, da)) - continue; - //mp->setHwCtrlState(i->channel(), CTRL_PITCH, da); - //(MidiPlayEvent(t, port, chn, ME_PITCHBEND, v & 0x7f, (v >> 7) & 0x7f)); - } - else - if(i->type() == ME_PROGRAM) - { - if(!mp->setHwCtrlState(i->channel(), CTRL_PROGRAM, i->dataA())) - continue; - //mp->setHwCtrlState(i->channel(), CTRL_PROGRAM, i->dataA()); - } - } + if(mp && !mp->sendHwCtrlState(*i, true)) // Force the event to be sent. + continue; // Try to process only until full, keep rest for next cycle. If no out client port or no write enable, eat up events. p4.0.15 if(port_buf && !processEvent(*i)) break; } _playEvents.erase(_playEvents.begin(), i); +} + +/* +//--------------------------------------------------------- +// handleStop +//--------------------------------------------------------- + +void MidiJackDevice::handleStop() +{ + // If the device is not in use by a port, don't bother it. + if(_port == -1) + return; + + stopPending = true; // Trigger stop handling in processMidi. +// //--------------------------------------------------- +// // reset sustain +// //--------------------------------------------------- +// +// MidiPort* mp = &MusEGlobal::midiPorts[_port]; +// for(int ch = 0; ch < MIDI_CHANNELS; ++ch) +// { +// if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) +// { +// //printf("send clear sustain!!!!!!!! port %d ch %d\n", i,ch); +// MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); +// putEvent(ev); +// // Do sendEvent to get the optimizations - send only on a change of value. +// //mp->sendEvent(ev); +// } +// } + +// //--------------------------------------------------- +// // send midi stop +// //--------------------------------------------------- +// +// // Don't send if external sync is on. The master, and our sync routing system will take care of that. +// if(!MusEGlobal::extSyncFlag.value()) +// { +// // Shall we check open flags? +// //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) +// //if(!(dev->openFlags() & 1)) +// // return; +// +// MidiSyncInfo& si = mp->syncInfo(); +// if(si.MMCOut()) +// mp->sendMMCStop(); +// +// if(si.MRTOut()) +// { +// // Send STOP +// mp->sendStop(); +// +// // Added check of option send continue not start. p3.3.31 +// // Hmm, is this required? Seems to make other devices unhappy. +// // (Could try now that this is in MidiDevice. p4.0.22 ) +// //if(!si.sendContNotStart()) +// // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / config.division); +// } +// } +} +*/ + +/* +//--------------------------------------------------------- +// handleSeek +//--------------------------------------------------------- + +void MidiJackDevice::handleSeek() +{ + // If the device is not in use by a port, don't bother it. + if(_port == -1) + return; + + seekPending = true; // Trigger seek handling in processMidi. + + //MidiPort* mp = &MusEGlobal::midiPorts[_port]; + //MidiCtrlValListList* cll = mp->controller(); + //int pos = MusEGlobal::audio->tickPos(); + + //--------------------------------------------------- + // Send new contoller values + //--------------------------------------------------- + +// for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) +// { +// MidiCtrlValList* vl = ivl->second; +// iMidiCtrlVal imcv = vl->iValue(pos); +// if(imcv != vl->end()) +// { +// Part* p = imcv->second.part; +// //printf("MidiAlsaDevice::handleSeek _port:%d ctl:%d num:%d val:%d\n", _port, ivl->first >> 24, vl->num(), imcv->second.val); +// unsigned t = (unsigned)imcv->first; +// // Do not add values that are outside of the part. +// if(p && t >= p->tick() && t < (p->tick() + p->lenTick()) ) +// // Keep this and the section in processMidi() just in case we need to revert... +// //_playEvents.add(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); +// // Hmm, play event list for immediate playback? Try putEvent, putMidiEvent, or sendEvent (for the optimizations) instead. +// mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); +// } +// } + + //--------------------------------------------------- + // Send STOP and "set song position pointer" + //--------------------------------------------------- + +// // Don't send if external sync is on. The master, and our sync routing system will take care of that. p3.3.31 +// if(!MusEGlobal::extSyncFlag.value()) +// { +// if(mp->syncInfo().MRTOut()) +// { +// // Shall we check for device write open flag to see if it's ok to send?... +// // This means obey what the user has chosen for read/write in the midi port config dialog, +// // which already takes into account whether the device is writable or not. +// //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) +// //if(!(openFlags() & 1)) +// // continue; +// +// int beat = (pos * 4) / MusEGlobal::config.division; +// +// //bool isPlaying = (state == PLAY); +// bool isPlaying = MusEGlobal::audio->isPlaying(); // TODO Check this it includes LOOP1 and LOOP2 besides PLAY. p4.0.22 +// +// mp->sendStop(); +// mp->sendSongpos(beat); +// // REMOVE Tim. This is redundant and too early - Audio::startRolling already properly sends it when sync ready. +// //if(isPlaying) +// // mp->sendContinue(); +// } +// } } +*/ //--------------------------------------------------------- // initMidiJack diff --git a/muse2/muse/driver/jackmidi.h b/muse2/muse/driver/jackmidi.h index d2c14190..c8f7f901 100644 --- a/muse2/muse/driver/jackmidi.h +++ b/muse2/muse/driver/jackmidi.h @@ -74,13 +74,15 @@ class MidiJackDevice : public MidiDevice { public: MidiJackDevice(const QString& name); + virtual ~MidiJackDevice(); static MidiDevice* createJackMidiDevice(QString name = "", int rwflags = 3); // 1:Writable 2: Readable 3: Writable + Readable virtual inline int deviceType() const { return JACK_MIDI; } virtual void setName(const QString&); + //virtual void handleStop(); + //virtual void handleSeek(); virtual void processMidi(); - virtual ~MidiJackDevice(); virtual void recordEvent(MidiRecordEvent&); diff --git a/muse2/muse/driver/rtctimer.cpp b/muse2/muse/driver/rtctimer.cpp index 365b8501..c50fadf6 100644 --- a/muse2/muse/driver/rtctimer.cpp +++ b/muse2/muse/driver/rtctimer.cpp @@ -99,9 +99,9 @@ unsigned int RtcTimer::setTimerFreq(unsigned int freq) { int rc = ioctl(timerFd, RTC_IRQP_SET, freq); if (rc == -1) { - fprintf(stderr, "RtcTimer::setTimerFreq(): cannot set tick on /dev/rtc: %s\n", + fprintf(stderr, "RtcTimer::setTimerFreq(): cannot set freq %d on /dev/rtc: %s\n", freq, strerror(errno)); - fprintf(stderr, " precise timer not available\n"); + fprintf(stderr, " precise timer not available, check file permissions and allowed RTC freq (/sys/class/rtc/rtc0/max_user_freq)\n"); return 0; } return freq; diff --git a/muse2/muse/driver/rtctimer.h b/muse2/muse/driver/rtctimer.h index 425ea643..2b1921a2 100644 --- a/muse2/muse/driver/rtctimer.h +++ b/muse2/muse/driver/rtctimer.h @@ -1,12 +1,12 @@ - //========================================================= - // MusE - // Linux Music Editor - // $Id: rtctimer.h,v 1.1.2.3 2005/08/21 18:11:28 spamatica Exp $ - // - // Most code moved from midiseq.cpp - // - // (C) Copyright -2004 Werner Schweer (werner@seh.de) - // (C) Copyright 2004 Robert Jonsson (rj@spamatica.se) +//========================================================= +// MusE +// Linux Music Editor +// $Id: rtctimer.h,v 1.1.2.3 2005/08/21 18:11:28 spamatica Exp $ +// +// Most code moved from midiseq.cpp +// +// (C) Copyright -2004 Werner Schweer (werner@seh.de) +// (C) Copyright 2004 Robert Jonsson (rj@spamatica.se) // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -22,7 +22,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // - //========================================================= +//========================================================= #ifndef __RTCTIMER_H__ #define __RTCTIMER_H__ @@ -59,4 +59,4 @@ class RtcTimer : public Timer{ } // namespace MusECore -#endif //__ALSATIMER_H__ +#endif //__RTCTIMER_H__ diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp index 2e4e6d35..69c6259d 100644 --- a/muse2/muse/dssihost.cpp +++ b/muse2/muse/dssihost.cpp @@ -112,19 +112,12 @@ static void scanDSSILib(QFileInfo& fi) // ddskrjo removed const for argument for(is = MusEGlobal::synthis.begin(); is != MusEGlobal::synthis.end(); ++is) { Synth* s = *is; - //#ifdef DSSI_DEBUG - // fprintf(stderr, "scanDSSILib: name:%s listname:%s lib:%s listlib:%s\n", - // label.toLatin1().constData(), s->name().toLatin1().constData(), fi.baseName(true).toLatin1().constData(), s->baseName().toLatin1().constData()); - //#endif - if(s->name() == label && s->baseName() == fi.completeBaseName()) break; } if(is != MusEGlobal::synthis.end()) - { - //delete descr; continue; - } + DssiSynth* s = new DssiSynth(fi, descr); if(MusEGlobal::debugMsg) @@ -152,9 +145,6 @@ static void scanDSSILib(QFileInfo& fi) // ddskrjo removed const for argument MusEGlobal::synthis.push_back(s); } - //else - // delete descr; - } } dlclose(handle); @@ -331,12 +321,8 @@ SynthIF* DssiSynth::createSIF(SynthI* synti) iUsedIdx.clear(); midiCtl2PortMap.clear(); port2MidiCtlMap.clear(); - //synti->_guiUpdateControls.clear(); const LADSPA_Descriptor* descr = dssi->LADSPA_Plugin; - //#ifdef DSSI_DEBUG - // printf("DssiSynth::createSIF ladspa plugin PortCount:%lu\n", d->PortCount); - //#endif _portCount = descr->PortCount; @@ -370,8 +356,6 @@ SynthIF* DssiSynth::createSIF(SynthI* synti) { rpIdx.push_back(_controlInPorts); ++_controlInPorts; - // Set to false at first. - //synti->_guiUpdateControls.push_back(false); } else if (LADSPA_IS_PORT_OUTPUT(pd)) { @@ -403,14 +387,10 @@ SynthIF* DssiSynth::createSIF(SynthI* synti) ++_instances; sif->init(this); - //_plugin->incInstances(1); - QString guiPath(info.path() + "/" + info.baseName()); QDir guiDir(guiPath, "*", QDir::Unsorted, QDir::Files); _hasGui = guiDir.exists(); - //sif->initGui(); - return sif; } @@ -418,7 +398,6 @@ SynthIF* DssiSynth::createSIF(SynthI* synti) // guiVisible //--------------------------------------------------------- -//bool DssiSynthIF::guiVisible() const bool DssiSynthIF::nativeGuiVisible() const { #ifdef OSC_SUPPORT @@ -571,7 +550,7 @@ bool DssiSynthIF::init(DssiSynth* s) #endif // This code is duplicated in ::getControllerInfo() - // + int ctlnum = DSSI_NONE; if(dssi->get_midi_controller_for_port) @@ -890,11 +869,8 @@ void DssiSynthIF::setParameter(unsigned long n, float v) // write //--------------------------------------------------------- -//void DssiSynthIF::write(Xml&) const void DssiSynthIF::write(int level, Xml& xml) const { - //bool vstsaved = false; - #ifdef DSSI_VST_CHUNK_SUPPORT if(synth->dssi->getCustomData) { @@ -913,16 +889,13 @@ void DssiSynthIF::write(int level, Xml& xml) const void* p = 0; synth->dssi->getCustomData(handle,&p, &len); if (len) { - //xml.tag(level++, "midistate"); xml.tag(level++, "midistate version=\"%d\"", SYNTH_MIDI_STATE_SAVE_VERSION); xml.nput(level++, "\n", len+7 /*VSTSAVE*/); - xml.nput(" datalen=\"%d\">\n", len+9 /* 2 bytes header + "VSTSAVE" */); + xml.nput(" datalen=\"%d\">\n", len+9 /* 9 = 2 bytes header + "VSTSAVE"*/); xml.nput(level, ""); xml.nput("%02x %02x ", (char)MUSE_SYNTH_SYSEX_MFG_ID, (char)DSSI_SYNTH_UNIQUE_ID); // Wrap in a proper header xml.nput("56 53 54 53 41 56 45 "); // embed a save marker "string 'VSTSAVE' for (long unsigned int i = 0; i < len; ++i) { - //if (i && (((i+7) % 16) == 0)) { if (i && (((i+9) % 16) == 0)) { xml.nput("\n"); xml.nput(level, ""); @@ -932,14 +905,14 @@ void DssiSynthIF::write(int level, Xml& xml) const xml.nput("\n"); xml.tag(level--, "/event"); xml.etag(level--, "midistate"); - //vstsaved = true; } } } #else printf("support for vst chunks not compiled in!\n"); #endif - + + // DELETETHIS 97 ??? /* // p3.3.39 Store the state of current program and bank and all input control values, but only if VSTSAVE above didn't do it already! // TODO: Not quite good enough, we would want to store all controls for EACH program, not just the current one. @@ -1040,7 +1013,6 @@ void DssiSynthIF::write(int level, Xml& xml) const { float f = controls[c].val; xml.floatTag(level, "param", f); - //xml.tag(level, "param name=\"%s\" val=\"%s\"/", name, r->first.c_str(), r->second.c_str()); } } @@ -1065,17 +1037,6 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t int chn = e.channel(); int a = e.dataA(); int b = e.dataB(); - //for sysex - //QByteArray ba = QByteArray((const char*)e.data(), e.len()); - //we must had 0xF0 at the beginning and 0xF7 at the end of e.data() - //ba.push_front(0xF0); - //ba.push_back(0xF7); - - //QByteArray ba(); - ////ba.assign((const char*)e.data(), e.len()); - ////ba.duplicate((const char*)e.data(), e.len()); - ////ba.setRawData((const char*)e.data(), e.len()); - //int len = e.len() + 2; int len = e.len(); char ca[len + 2]; @@ -1117,8 +1078,6 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t int bank = (a >> 8) & 0xff; int prog = a & 0xff; - //_curBank = bank; - //_curProgram = prog; synti->_curBankH = 0; synti->_curBankL = bank; synti->_curProgram = prog; @@ -1187,29 +1146,12 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t // For example sustain footpedal or pitch bend may be supported, but not mapped to any LADSPA port. if(ip == synth->midiCtl2PortMap.end()) { - // p3.3.39 Changed to return false because of crashes with unknown controllers when switching a midi track - // among different dssi synths and regular synths etc. For example high RPN offset numbers (set by another - // device selected into the midi port before selecting this synth) were passing through here when in fact - // the particular synth had no such midi controllers. - // No, that leaves out regular controllers like footpedal - //#ifdef DSSI_DEBUG - //fprintf(stderr, "DssiSynthIF::processEvent dataA:%d not found in map (not a ladspa controller). Ignoring.\n", a); - //#endif - //return false; - - //#ifdef DSSI_DEBUG - //fprintf(stderr, "DssiSynthIF::processEvent dataA:%d not found in map (not a ladspa controller). Filling event as regular controller.\n", a); - //#endif - //snd_seq_ev_set_controller(event, chn, a, b); - //return true; - int ctlnum = a; if(MusECore::midiControllerType(a) != MusECore::MidiController::Controller7) return false; // Event pointer not filled. Return false. else { #ifdef DSSI_DEBUG - //fprintf(stderr, "DssiSynthIF::processEvent midi event is Controller7. Changing to DSSI_CC type. Current dataA:%d\n", a); fprintf(stderr, "DssiSynthIF::processEvent non-ladspa midi event is Controller7. Current dataA:%d\n", a); #endif a &= 0x7f; @@ -1239,12 +1181,6 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t if(k > synth->_controlInPorts) return false; - // TODO: If necessary... choose non-existing numbers... - //for(int k = 0; k < controlPorts; ++k) - //{ - // int i = synth->pIdx[k]; - //} - // Simple but flawed solution: Start them at 0x60000 + 0x2000 = 0x62000. Max NRPN number is 0x3fff. ctlnum = k + (MusECore::CTRL_NRPN14_OFFSET + 0x2000); } @@ -1284,14 +1220,13 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t float val = midi2LadspaValue(ld, i, ctlnum, b); #ifdef DSSI_DEBUG - //fprintf(stderr, "DssiSynthIF::processEvent No midi controller for control port:%d port:%d dataA:%d Converting val from:%d to ladspa:%f\n", i, k, a, b, val); fprintf(stderr, "DssiSynthIF::processEvent control port:%lu port:%lu dataA:%d Converting val from:%d to ladspa:%f\n", i, k, a, b, val); #endif // Set the ladspa port value. controls[k].val = val; // FIXME: Testing - Works but is this safe in a RT process callback? Try hooking into gui heartbeat timer instead... - //lo_send(uiTarget, uiOscControlPath, "if", i, val); + // lo_send(uiTarget, uiOscControlPath, "if", i, val); // Notify that changes are to be sent upon heartbeat. synti->_guiUpdateControls[k] = true; @@ -1324,14 +1259,11 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t { if(e.len() >= 9) { - //if (QString((const char*)e.data()).startsWith("VSTSAVE")) { if (QString((const char*)(data + 2)).startsWith("VSTSAVE")) { #ifdef DSSI_VST_CHUNK_SUPPORT if(dssi->setCustomData) { - //printf("loading chunk from sysex %s!\n", e.data()+7); printf("loading chunk from sysex %s!\n", data+9); - //dssi->setCustomData(handle, e.data()+7 /* len of str*/,e.len()-7); dssi->setCustomData(handle, (unsigned char*)(data+9) /* len of str*/,e.len()-9); } #else @@ -1344,6 +1276,8 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t } } } + + // DELETETHIS, 50 clean it up or fix it? /* // p3.3.39 Read the state of current bank and program and all input control values. // TODO: Needs to be better. See write(). @@ -1408,7 +1342,6 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t snd_seq_ev_clear(event); event->queue = SND_SEQ_QUEUE_DIRECT; snd_seq_ev_set_sysex(event, len, - //(unsigned char*)ba.data()); (unsigned char*)ca); } } @@ -1430,18 +1363,9 @@ bool DssiSynthIF::processEvent(const MusECore::MidiPlayEvent& e, snd_seq_event_t MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MPEventList* el, MusECore::iMPEvent start_event, unsigned pos, int ports, unsigned nframes, float** buffer) { - //#ifdef DSSI_DEBUG - // fprintf(stderr, "DssiSynthIF::getData elsize:%d pos:%d ports:%d samples:%d processed already?:%d\n", el->size(), pos, ports, n, synti->processed()); - //#endif - - // Grab the control ring buffer size now. - //const int cbsz = _controlFifo.getSize(); - // We may not be using nevents all at once - this will be just the maximum. unsigned long nevents = el->size() + synti->eventFifo.getSize(); snd_seq_event_t events[nevents]; - // No, do this in processEvent. - //memset(events, 0, sizeof(events)); int frameOffset = MusEGlobal::audio->getFrameOffset(); unsigned long syncFrame = MusEGlobal::audio->curSyncFrame(); @@ -1449,15 +1373,11 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP // All ports must be connected to something! unsigned long nop, k; - // Watch our limits. - //willyfoobar-2011-02-13 - //old code//np = ports > synth->_outports ? synth->_outports : ports; nop = ((unsigned long) ports) > synth->_outports ? synth->_outports : ((unsigned long) ports); const DSSI_Descriptor* dssi = synth->dssi; const LADSPA_Descriptor* descr = dssi->LADSPA_Plugin; unsigned long sample = 0; - int loopcount = 0; // REMOVE Tim. // To remember the last retrieved value of each AudioTrack controller. //float prev_ctrl_values[synth->_controlInPorts]; @@ -1503,12 +1423,7 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP { RouteList* irl = ((MusECore::AudioTrack*)synti)->inRoutes(); iRoute i = irl->begin(); - if(i->track->isMidiTrack()) - { - //if(MusEGlobal::debugMsg) - //printf("DssiSynthIF::getData: Error: First route is a midi track route!\n"); - } - else + if(!i->track->isMidiTrack()) { int ch = i->channel == -1 ? 0 : i->channel; int remch = i->remoteChannel == -1 ? 0 : i->remoteChannel; @@ -1516,14 +1431,9 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP if((unsigned)ch < synth->_inports && (unsigned)(ch + chs) <= synth->_inports) { - //printf("DssiSynthIF::getData calling copyData on %s ch:%d remch:%d chs:%d\n", i->track->name().toLatin1().constData(), ch, remch, chs); - int h = remch + chs; for(int j = remch; j < h; ++j) - { - //printf(" setting used idx:%d\n", j); synth->iUsedIdx[j] = true; - } ((MusECore::AudioTrack*)i->track)->copyData(pos, chs, ch, -1, nframes, &audioInBuffers[remch]); } @@ -1533,11 +1443,7 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP for(; i != irl->end(); ++i) { if(i->track->isMidiTrack()) - { - //if(MusEGlobal::debugMsg) - // printf("DssiSynthIF::getData: Error: Route is a midi track route!\n"); continue; - } int ch = i->channel == -1 ? 0 : i->channel; int remch = i->remoteChannel == -1 ? 0 : i->remoteChannel; @@ -1545,8 +1451,6 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP if((unsigned)ch < synth->_inports && (unsigned)(ch + chs) <= synth->_inports) { - //printf("DssiSynthIF::getData calling addData on %s ch:%d remch:%d chs:%d\n", i->track->name().toLatin1().constData(), ch, remch, chs); - bool u1 = synth->iUsedIdx[remch]; if(chs >= 2) { @@ -1579,10 +1483,7 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP int h = remch + chs; for(int j = remch; j < h; ++j) - { - //printf(" setting used idx:%d\n", j); synth->iUsedIdx[j] = true; - } } } } @@ -1600,22 +1501,17 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP while(sample < nframes) { - //unsigned long nsamp = n; - //unsigned long nsamp = n - sample; unsigned long nsamp = usefixedrate ? fixedsize : nframes - sample; bool found = false; unsigned long frame = 0; unsigned long index = 0; unsigned long evframe; // Get all control ring buffer items valid for this time period... - //for(int m = 0; m < cbsz; ++m) // Doesn't like this. Why? while(!_controlFifo.isEmpty()) { - //ControlValue v = _controlFifo.get(); ControlEvent v = _controlFifo.peek(); // The events happened in the last period or even before that. Shift into this period with + n. This will sync with MusEGlobal::audio. // If the events happened even before current frame - n, make sure they are counted immediately as zero-frame. - //evframe = (pos + frameOffset > v.frame + n) ? 0 : v.frame - pos - frameOffset + n; evframe = (syncFrame > v.frame + nframes) ? 0 : v.frame - syncFrame + nframes; // Protection. Observed this condition. Why? Supposed to be linear timestamps. if(found && evframe < frame) @@ -1626,34 +1522,14 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP evframe = frame; } - //printf("DssiSynthIF::getData ctrl dssi:%d idx:%lu frame:%lu val:%f unique:%d evframe:%lu\n", - // synth->_isDssiVst, v.idx, v.frame, v.value, v.unique, evframe); // REMOVE Tim. - // Process only items in this time period. Make sure to process all - // subsequent items which have the same frame. - //if(v.frame >= (endPos + frameOffset) || (found && v.frame != frame)) - //if(v.frame < sample || v.frame >= (sample + nsamp) || (found && v.frame != frame)) - //if(v.frame < sample || v.frame >= (endPos + frameOffset) || (found && v.frame != frame)) - //if(v.frame < startPos || v.frame >= (endPos + frameOffset) - //if(evframe < sample || evframe >= n - //if(evframe < sample || evframe >= (n + frameOffset) if(evframe >= nframes - //|| (found && v.frame != frame) - //|| (!usefixedrate && found && !v.unique && v.frame != frame) - //|| (found && !v.unique && evframe != frame) - // Not enough requested samples to satisfy minimum setting? Keep going. || (found && !v.unique && (evframe - sample >= min_per)) - // dssi-vst needs them serialized and accounted for, no matter what. This works with fixed rate - // because nsamp is constant. But with packets, we need to guarantee at least one-frame spacing. - // Although we likely won't be using packets with dssi-vst, so it's OK for now. - //|| (found && v.idx == index)) - //|| (usefixedrate && found && v.idx == index)) // Try this. - || (usefixedrate && found && v.unique && v.idx == index)) // + || (usefixedrate && found && v.unique && v.idx == index)) break; _controlFifo.remove(); // Done with the ring buffer's item. Remove it. if(v.idx >= synth->_controlInPorts) // Sanity check. break; found = true; - //frame = v.frame; frame = evframe; index = v.idx; // Set the ladspa control port value. @@ -1664,9 +1540,9 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP { // Since we are now in the audio thread context, there's no need to send a message, // just modify directly. - //MusEGlobal::audio->msgSetPluginCtrlVal(_track, genACnum(_id, k), controls[k].val); synti->setPluginCtrlVal(genACnum(id(), v.idx), v.value); + // DELETETHIS 15, cleanup, fix, maybe just keep it? dunno. // Record automation. // NO! Take care of this immediately in the OSC control handler, because we don't want // any delay. @@ -1685,6 +1561,7 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP } + // DELETETHIS 10 ? // Process automation control values now. //if(MusEGlobal::automation && synti && synti->automationType() != AUTO_OFF && id() != -1) //{ @@ -1695,16 +1572,11 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP // } //} - //if(found) if(found && !usefixedrate) - //nsamp = frame - sample + 1; nsamp = frame - sample; if(sample + nsamp >= nframes) // Safety check. nsamp = nframes - sample; - //printf("DssiSynthIF::getData n:%d frame:%lu sample:%lu nsamp:%lu pos:%d fOffset:%d syncFrame:%lu loopcount:%d\n", - // n, frame, sample, nsamp, pos, frameOffset, syncFrame, loopcount); // REMOVE Tim. - // TODO: TESTING: Don't allow zero-length runs. This could/should be checked in the control loop instead. // Note this means it is still possible to get stuck in the top loop (at least for a while). if(nsamp == 0) @@ -1714,7 +1586,6 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP // Process event list events... for(; start_event != el->end(); ++start_event) { - //if(i->time() >= (endPos + frameOffset)) // NOTE: frameOffset? Tested, examined printouts of times: Seems OK for playback. if(start_event->time() >= (pos + sample + nsamp + frameOffset)) // frameOffset? Test again... break; @@ -1757,12 +1628,10 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP int ft = start_event->time() - frameOffset - pos; if(ft < 0) ft = 0; - //if (ft >= (int)MusEGlobal::segmentSize) + if (ft >= int(sample + nsamp)) { - printf("DssiSynthIF::getData: eventlist event time:%d out of range. pos:%d offset:%d ft:%d sample:%lu nsamp:%lu\n", start_event->time(), pos, frameOffset, ft, sample, nsamp); - ///if (ft > (int)MusEGlobal::segmentSize) - //ft = MusEGlobal::segmentSize - 1; + printf("DssiSynthIF::getData: eventlist event time:%d out of range. pos:%d offset:%d ft:%d sample:%lu nsamp:%lu\n", start_event->time(), pos, frameOffset, ft, sample, nsamp); ft = sample + nsamp - 1; } // "Each event is timestamped relative to the start of the block, (mis)using the ALSA "tick time" field as a frame count. @@ -1776,14 +1645,12 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP // Now process putEvent events... while(!synti->eventFifo.isEmpty()) { - //MusECore::MidiPlayEvent e = synti->eventFifo.get(); MusECore::MidiPlayEvent e = synti->eventFifo.peek(); #ifdef DSSI_DEBUG fprintf(stderr, "DssiSynthIF::getData eventFifo event time:%d\n", e.time()); #endif - //if(e.time() >= (endPos + frameOffset)) if(e.time() >= (pos + sample + nsamp + frameOffset)) break; @@ -1795,13 +1662,9 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP int ft = e.time() - frameOffset - pos; if(ft < 0) ft = 0; - //if (ft >= (int)MusEGlobal::segmentSize) if (ft >= int(sample + nsamp)) { - //printf("DssiSynthIF::getData: eventFifo event time:%d out of range. pos:%d offset:%d ft:%d (seg=%d)\n", e.time(), pos, frameOffset, ft, MusEGlobal::segmentSize); - printf("DssiSynthIF::getData: eventFifo event time:%d out of range. pos:%d offset:%d ft:%d sample:%lu nsamp:%lu\n", e.time(), pos, frameOffset, ft, sample, nsamp); - ///if (ft > (int)MusEGlobal::segmentSize) - //ft = MusEGlobal::segmentSize - 1; + printf("DssiSynthIF::getData: eventFifo event time:%d out of range. pos:%d offset:%d ft:%d sample:%lu nsamp:%lu\n", e.time(), pos, frameOffset, ft, sample, nsamp); ft = sample + nsamp - 1; } // "Each event is timestamped relative to the start of the block, (mis)using the ALSA "tick time" field as a frame count. @@ -1822,7 +1685,6 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP // Connect all inputs either to some local buffers, or a silence buffer. for(k = 0; k < synth->_inports; ++k) { - //printf(" k:%d synth->iIdx[k]:%d\n", k, synth->iIdx[k]); if(synth->iUsedIdx[k]) { synth->iUsedIdx[k] = false; // Reset @@ -1830,7 +1692,6 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP } else { - //printf(" input used size:%ld idx:%ld = %d silencing...\n", synth->iUsedIdx.size(), k, synth->iUsedIdx[k]); descr->connect_port(handle, synth->iIdx[k], audioInSilenceBuf + sample); } } @@ -1853,7 +1714,6 @@ MusECore::iMPEvent DssiSynthIF::getData(MusECore::MidiPort* /*mp*/, MusECore::MP //} sample += nsamp; - loopcount++; // REMOVE Tim. } return start_event; @@ -1871,7 +1731,6 @@ bool DssiSynthIF::putEvent(const MusECore::MidiPlayEvent& ev) if (MusEGlobal::midiOutputTrace) ev.dump(); return synti->eventFifo.put(ev); - //return false; } //--------------------------------------------------------- @@ -1900,7 +1759,6 @@ void DssiSynth::incInstances(int val) iUsedIdx.clear(); midiCtl2PortMap.clear(); port2MidiCtlMap.clear(); - //synti->_guiUpdateControls.clear(); } } @@ -1991,8 +1849,6 @@ int DssiSynthIF::oscProgram(unsigned long program, unsigned long bank) int ch = 0; // TODO: ?? int port = synti->midiPort(); - //_curBank = bank; - //_curProgram = program; synti->_curBankH = 0; synti->_curBankL = bank; synti->_curProgram = program; @@ -2000,11 +1856,8 @@ int DssiSynthIF::oscProgram(unsigned long program, unsigned long bank) bank &= 0xff; program &= 0xff; - //MidiEvent event(0, ch, MusECore::ME_CONTROLLER, MusECore::CTRL_PROGRAM, (bank << 8) + program); - if(port != -1) { - //MusECore::MidiPlayEvent event(0, port, ch, MusECore::ME_CONTROLLER, MusECore::CTRL_PROGRAM, (bank << 8) + program); MusECore::MidiPlayEvent event(0, port, ch, MusECore::ME_PROGRAM, (bank << 8) + program, 0); #ifdef DSSI_DEBUG @@ -2014,7 +1867,7 @@ int DssiSynthIF::oscProgram(unsigned long program, unsigned long bank) MusEGlobal::midiPorts[port].sendEvent(event); } - //synti->playMidiEvent(&event); // TODO + //synti->playMidiEvent(&event); // TODO DELETETHIS 7 hasn't changed since r462 // //MidiDevice* md = dynamic_cast(synti); //if(md) @@ -2050,11 +1903,12 @@ int DssiSynthIF::oscControl(unsigned long port, float value) return 0; } + // DELETETHIS????: is the below still correct? of so, then keep it of course! // p3.3.39 Set the DSSI control input port's value. // Observations: With a native DSSI synth like LessTrivialSynth, the native GUI's controls do not change the sound at all // ie. they don't update the DSSI control port values themselves. // Hence in response to the call to this oscControl, sent by the native GUI, it is required to that here. -/// controls[cport].val = value; +/// controls[cport].val = value; DELETETHIS // DSSI-VST synths however, unlike DSSI synths, DO change their OWN sound in response to their gui controls. // AND this function is called. // Despite the descrepency we are STILL required to update the DSSI control port values here @@ -2071,6 +1925,7 @@ int DssiSynthIF::oscControl(unsigned long port, float value) // (Because the server simply ignores the 'expected' messages.) // // Well, at least here are the fifos. Try this ... + // DELETETHIS 20 pretty old as well /* OscControlFifo* cfifo = _oscif.oscFifo(cport); if(cfifo) @@ -2093,13 +1948,12 @@ int DssiSynthIF::oscControl(unsigned long port, float value) ce.unique = synth->_isDssiVst; // Special for messages from vst gui to host - requires processing every message. ce.idx = cport; ce.value = value; - // Time-stamp the event. This does a possibly slightly slow call to gettimeofday via timestamp(). - // timestamp() is more or less an estimate of the current frame. (This is exactly how ALSA events - // are treated when they arrive in our ALSA driver.) - //ce.frame = MusEGlobal::audio->timestamp(); - // p4.0.23 timestamp() is circular, which is making it impossible to deal with 'modulo' events which - // slip in 'under the wire' before processing the ring buffers. So try this linear timestamp instead: - ce.frame = MusEGlobal::audio->curFrame(); + + ce.frame = MusEGlobal::audio->curFrame(); + // don't use timestamp(), because it's circular, which is making it impossible to deal + // with 'modulo' events which slip in 'under the wire' before processing the ring buffers. + + if(_controlFifo.put(ce)) { fprintf(stderr, "DssiSynthIF::oscControl: fifo overflow: in control number:%lu\n", cport); @@ -2113,7 +1967,6 @@ int DssiSynthIF::oscControl(unsigned long port, float value) // That makes this pretty useless... But what the heck... if(id() != -1) { - //int id = genACnum(_id, cport); unsigned long pid = genACnum(id(), cport); AutomationType at = synti->automationType(); @@ -2126,17 +1979,6 @@ int DssiSynthIF::oscControl(unsigned long port, float value) synti->recordAutomation(pid, value); } - //MusECore::ciMidiCtl2LadspaPort ip = synth->port2MidiCtlMap.find(cport); - //if(ip != synth->port2MidiCtlMap.end()) - //{ - // TODO: TODO: Update midi MusE's midi controller knobs, sliders, boxes etc with a call to the midi port's setHwCtrlState() etc. - // But first we need a ladspa2MidiValue() function! ... - // - // - //float val = ladspa2MidiValue(ld, i, ?, ?); - - //} - return 0; } @@ -2164,15 +2006,6 @@ int DssiSynthIF::oscMidi(int a, int b, int c) MusEGlobal::midiPorts[port].sendEvent(event); } - //synti->playMidiEvent(&event); // TODO - // - //MidiDevice* md = dynamic_cast(synti); - //if(md) - // md->putEvent(event); - // - //synti->putEvent(event); - // - return 0; } @@ -2217,6 +2050,7 @@ int DssiSynthIF::oscConfigure(const char *key, const char *value) free(message); } + // DELETETHIS 6 ??? // "also call back on UIs for plugins other than the one // that requested this:" // if (n != instance->number && instances[n].uiTarget) { @@ -2262,7 +2096,6 @@ void DssiSynthIF::queryPrograms() // getPatchName //--------------------------------------------------------- -//QString DssiSynthIF::getPatchName(int, int prog) const char* DssiSynthIF::getPatchName(int /*chan*/, int prog, MType /*type*/, bool /*drum*/) { unsigned program = prog & 0x7f; @@ -2315,12 +2148,6 @@ int DssiSynthIF::getControllerInfo(int id, const char** name, int* ctrl, int* mi const DSSI_Descriptor* dssi = synth->dssi; const LADSPA_Descriptor* ld = dssi->LADSPA_Plugin; - // Hmm, has a weird [] operator. Would it work? - // For now just use duplicate code found in ::init() - //iMidiCtl2LadspaPort ip = midiCtl2PortMap[id]; - //int ctlnum = ip->first; - //int k = ip->second; - unsigned long i = controls[id].idx; #ifdef DSSI_DEBUG @@ -2335,12 +2162,6 @@ int DssiSynthIF::getControllerInfo(int id, const char** name, int* ctrl, int* mi // No controller number? Give it one. if(ctlnum == DSSI_NONE) { - // TODO: If neccesary... choose non-existing numbers... - //for(int k = 0; k < controlPorts; ++k) - //{ - // int i = synth->pIdx[k]; - //} - // Simple but flawed solution: Start them at 0x60000 + 0x2000 = 0x62000. Max NRPN number is 0x3fff. ctlnum = MusECore::CTRL_NRPN14_OFFSET + 0x2000 + id; } @@ -2393,9 +2214,6 @@ int DssiSynthIF::getControllerInfo(int id, const char** name, int* ctrl, int* mi int DssiSynthIF::channels() const { - //willyfoobar-2011-02-13 - //!! either change return type to unsigend long or do this change - //old code //return synth->_outports > MAX_CHANNELS ? MAX_CHANNELS : synth->_outports; return ((int)synth->_outports) > MAX_CHANNELS ? MAX_CHANNELS : ((int)synth->_outports) ; } diff --git a/muse2/muse/dssihost.h b/muse2/muse/dssihost.h index 2836d72e..1166886a 100644 --- a/muse2/muse/dssihost.h +++ b/muse2/muse/dssihost.h @@ -26,15 +26,21 @@ #include "config.h" -#include -#include -#include - // Make sure this number is unique among all the MESS synths and DSSI host synth. #define DSSI_SYNTH_UNIQUE_ID 8 // Midistate sysex initialization command. #define DSSI_INIT_DATA_CMD 1 +#define DSSI_PARAMSAVE_VERSION_MAJOR 0 +#define DSSI_PARAMSAVE_VERSION_MINOR 1 + + +#ifdef DSSI_SUPPORT + +#include +#include +#include + #ifdef OSC_SUPPORT #include #include "osc.h" @@ -42,6 +48,7 @@ #include "ladspa.h" #include + #include #include "midictrl.h" @@ -53,15 +60,15 @@ //#include #include "popupmenu.h" -#define DSSI_PARAMSAVE_VERSION_MAJOR 0 -#define DSSI_PARAMSAVE_VERSION_MINOR 1 +#endif // DSSI_SUPPORT namespace MusECore { +#ifdef DSSI_SUPPORT + struct _DSSI; class DssiPluginIF; -//class LadspaPort; class Port; //--------------------------------------------------------- @@ -76,7 +83,6 @@ class DssiSynth : public Synth { unsigned long _portCount, _inports, _outports, _controlInPorts, _controlOutPorts; std::vector iIdx; // Audio input index to port number. std::vector oIdx; // Audio output index to port number. - //std::vector iUsedIdx; // During process, tells whether an audio input port was used by any input routes. std::vector iUsedIdx; // During process, tells whether an audio input port was used by any input routes. std::vector rpIdx; // Port number to control input index. Item is -1 if it's not a control input. MusECore::MidiCtl2LadspaPortMap midiCtl2PortMap; // Maps midi controller numbers to DSSI port numbers. @@ -95,7 +101,6 @@ class DssiSynth : public Synth { virtual SynthIF* createSIF(SynthI*); friend class DssiSynthIF; - //float defaultValue(int); // Not required unsigned long inPorts() const { return _inports; } unsigned long outPorts() const { return _outports; } unsigned long inControls() const { return _controlInPorts; } @@ -179,19 +184,18 @@ class DssiSynthIF : public SynthIF, public PluginIBase #ifdef OSC_SUPPORT OscDssiIF& oscIF() { return _oscif; } - int oscProgram(unsigned long /*prog*/, unsigned long /*bank*/); - int oscControl(unsigned long /*dssiPort*/, float /*val*/); - int oscMidi(int /*a*/, int /*b*/, int /*c*/); - int oscConfigure(const char */*key*/, const char */*val*/); + int oscProgram(unsigned long prog, unsigned long bank); + int oscControl(unsigned long dssiPort, float val); + int oscMidi(int a, int b, int c); + int oscConfigure(const char *key, const char *val); int oscUpdate(); - //int oscExiting(); #endif //------------------------- // Methods for PluginIBase: //------------------------- bool on() const; - void setOn(bool /*val*/); + void setOn(bool val); unsigned long pluginID(); int id(); QString pluginLabel() const; @@ -201,28 +205,30 @@ class DssiSynthIF : public SynthIF, public PluginIBase QString fileName() const; QString titlePrefix() const; MusECore::AudioTrack* track(); - void enableController(unsigned long /*i*/, bool v = true); - bool controllerEnabled(unsigned long /*i*/) const; - bool controllerEnabled2(unsigned long /*i*/) const; + void enableController(unsigned long i, bool v = true); + bool controllerEnabled(unsigned long i) const; + bool controllerEnabled2(unsigned long i) const; void updateControllers(); - void writeConfiguration(int /*level*/, Xml& /*xml*/); - bool readConfiguration(Xml& /*xml*/, bool readPreset=false); + void writeConfiguration(int level, Xml& xml); + bool readConfiguration(Xml& xml, bool readPreset=false); unsigned long parameters() const; unsigned long parametersOut() const; - void setParam(unsigned long /*i*/, float /*val*/); - float param(unsigned long /*i*/) const; - float paramOut(unsigned long /*i*/) const; - const char* paramName(unsigned long /*i*/); - const char* paramOutName(unsigned long /*i*/); - LADSPA_PortRangeHint range(unsigned long /*i*/); - LADSPA_PortRangeHint rangeOut(unsigned long /*i*/); - CtrlValueType ctrlValueType(unsigned long /*i*/) const; - CtrlList::Mode ctrlMode(unsigned long /*i*/) const; + void setParam(unsigned long i, float val); + float param(unsigned long i) const; + float paramOut(unsigned long i) const; + const char* paramName(unsigned long i); + const char* paramOutName(unsigned long i); + LADSPA_PortRangeHint range(unsigned long i); + LADSPA_PortRangeHint rangeOut(unsigned long i); + CtrlValueType ctrlValueType(unsigned long i) const; + CtrlList::Mode ctrlMode(unsigned long i) const; friend class DssiSynth; }; +#endif // DSSI_SUPPORT + extern void initDSSI(); } // namespace MusECore diff --git a/muse2/muse/evdata.h b/muse2/muse/evdata.h index 333a5e2d..f180cf28 100644 --- a/muse2/muse/evdata.h +++ b/muse2/muse/evdata.h @@ -25,7 +25,6 @@ #define __EVDATA_H__ #include -// #include namespace MusECore { diff --git a/muse2/muse/event.cpp b/muse2/muse/event.cpp index 2993b286..6ea1b852 100644 --- a/muse2/muse/event.cpp +++ b/muse2/muse/event.cpp @@ -239,11 +239,6 @@ void Event::setSndFile(MusECore::SndFileR& sf) #ifdef USE_SAMPLERATE if(_audConv) { - // Do we release? Or keep the converter around, while gaining speed since no rapid creation/destruction. - //if(sf.isNull()) - // _audConv = AudioConverter::release(_audConv); - //else - // _audConv->setChannels(sf.channels()); if(!sf.isNull()) _audConv->setChannels(sf.channels()); } diff --git a/muse2/muse/event.h b/muse2/muse/event.h index 01e8e9c2..7e3e498c 100644 --- a/muse2/muse/event.h +++ b/muse2/muse/event.h @@ -27,7 +27,7 @@ #include #include -#include "wave.h" // wg. SndFile +#include "wave.h" // for SndFile #include "pos.h" #include "evdata.h" @@ -103,7 +103,7 @@ class Event { MusECore::SndFileR sndFile() const; virtual void setSndFile(MusECore::SndFileR& sf); - virtual void readAudio(MusECore::WavePart* /*part*/, unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/); + virtual void readAudio(MusECore::WavePart* part, unsigned offset, float** bpp, int channels, int nn, bool doSeek, bool overwrite); void setTick(unsigned val); unsigned tick() const; diff --git a/muse2/muse/eventbase.h b/muse2/muse/eventbase.h index 89d38ec3..0cb960d9 100644 --- a/muse2/muse/eventbase.h +++ b/muse2/muse/eventbase.h @@ -24,13 +24,11 @@ #ifndef __EVENTBASE_H__ #define __EVENTBASE_H__ -//#include #include #include "pos.h" #include "event.h" -//class AudioConverter; namespace MusECore { class WavePart; @@ -60,7 +58,6 @@ class EventBase : public PosLen { void move(int offset); virtual void read(Xml&) = 0; - //virtual void write(int, Xml&, const Pos& offset) const = 0; virtual void write(int, Xml&, const Pos& offset, bool forcePath = false) const = 0; virtual void dump(int n = 0) const; virtual EventBase* mid(unsigned, unsigned) = 0; @@ -100,12 +97,6 @@ class EventBase : public PosLen { virtual void setSndFile(SndFileR&) { } virtual EventBase* clone() = 0; - //virtual void read(unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool overwrite = true) {} - //virtual void readAudio(unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/) {} - //virtual off_t readAudio(SRC_STATE* /*src_state*/, off_t /*sfCurFrame*/, unsigned /*offset*/, - // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/) { return 0; } - //virtual off_t readAudio(AudioConverter* /*audConv*/, off_t /*sfCurFrame*/, unsigned /*offset*/, - // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/) { return 0; } virtual void readAudio(WavePart* /*part*/, unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/) { } }; diff --git a/muse2/muse/eventlist.cpp b/muse2/muse/eventlist.cpp index a411fc61..66780adb 100644 --- a/muse2/muse/eventlist.cpp +++ b/muse2/muse/eventlist.cpp @@ -104,9 +104,6 @@ void EventList::move(Event& event, unsigned tick) iEvent EventList::find(const Event& event) { - // Changed by T356. - // Changed by Tim. p3.3.8 - //EventRange range = equal_range(event.tick()); EventRange range = equal_range(event.type() == Wave ? event.frame() : event.tick()); diff --git a/muse2/muse/exportmidi.cpp b/muse2/muse/exportmidi.cpp index 4a9c1f6d..c5cb44c4 100644 --- a/muse2/muse/exportmidi.cpp +++ b/muse2/muse/exportmidi.cpp @@ -48,12 +48,9 @@ namespace MusECore { static void addController(MPEventList* l, int tick, int port, int channel, int a, int b) { - // p3.3.37 - //if (a < 0x1000) { // 7 Bit Controller if (a < CTRL_14_OFFSET) { // 7 Bit Controller l->add(MidiPlayEvent(tick, port, channel, ME_CONTROLLER, a, b)); } - //else if (a < 0x20000) { // 14 Bit Controller else if (a < CTRL_RPN_OFFSET) { // 14 Bit Controller int ctrlH = (a >> 8) & 0x7f; int ctrlL = a & 0x7f; @@ -62,7 +59,6 @@ static void addController(MPEventList* l, int tick, int port, int channel, int a l->add(MidiPlayEvent(tick, port, channel, ME_CONTROLLER, ctrlH, dataH)); l->add(MidiPlayEvent(tick+1, port, channel, ME_CONTROLLER, ctrlL, dataL)); } - //else if (a < 0x30000) { // RPN 7-Bit Controller else if (a < CTRL_NRPN_OFFSET) { // RPN 7-Bit Controller int ctrlH = (a >> 8) & 0x7f; int ctrlL = a & 0x7f; @@ -70,7 +66,6 @@ static void addController(MPEventList* l, int tick, int port, int channel, int a l->add(MidiPlayEvent(tick+1, port, channel, ME_CONTROLLER, CTRL_LRPN, ctrlL)); l->add(MidiPlayEvent(tick+2, port, channel, ME_CONTROLLER, CTRL_HDATA, b)); } - //else if (a < 0x40000) { // NRPN 7-Bit Controller else if (a < CTRL_INTERNAL_OFFSET) { // NRPN 7-Bit Controller int ctrlH = (a >> 8) & 0x7f; int ctrlL = a & 0x7f; @@ -106,7 +101,6 @@ static void addController(MPEventList* l, int tick, int port, int channel, int a } l->add(MidiPlayEvent(tick+tickoffset, port, channel, ME_PROGRAM, pr, 0)); } - //else if (a < 0x60000) { // RPN14 Controller else if (a < CTRL_NRPN14_OFFSET) { // RPN14 Controller int ctrlH = (a >> 8) & 0x7f; int ctrlL = a & 0x7f; @@ -117,7 +111,6 @@ static void addController(MPEventList* l, int tick, int port, int channel, int a l->add(MidiPlayEvent(tick+2, port, channel, ME_CONTROLLER, CTRL_HDATA, dataH)); l->add(MidiPlayEvent(tick+3, port, channel, ME_CONTROLLER, CTRL_LDATA, dataL)); } - //else if (a < 0x70000) { // NRPN14 Controller else if (a < CTRL_NONE_OFFSET) { // NRPN14 Controller int ctrlH = (a >> 8) & 0x7f; int ctrlL = a & 0x7f; @@ -142,21 +135,17 @@ void MusE::exportMidi() { MusEGui::MFile file(QString("midis"), QString(".mid")); - //FILE* fp = file.open("w", midi_file_pattern, this, false, true, FILE* fp = file.open("w", MusEGlobal::midi_file_save_pattern, this, false, true, tr("MusE: Export Midi")); if (fp == 0) return; MusECore::MidiFile mf(fp); - //MusECore::MidiTrackList* tl = MusEGlobal::song->midis(); MusECore::TrackList* tl = MusEGlobal::song->tracks(); // Changed to full track list so user can rearrange tracks. - //int ntracks = tl->size(); MusECore::MidiFileTrackList* mtl = new MusECore::MidiFileTrackList; int i = 0; MusECore::MidiFileTrack* mft = 0; - //for (MusECore::iMidiTrack im = tl->begin(); im != tl->end(); ++im, ++i) { for (MusECore::ciTrack im = tl->begin(); im != tl->end(); ++im) { if(!(*im)->isMidiTrack()) @@ -164,7 +153,6 @@ void MusE::exportMidi() MusECore::MidiTrack* track = (MusECore::MidiTrack*)(*im); - //MusECore::MidiFileTrack* mft = new MusECore::MidiFileTrack; if (i == 0 || (i != 0 && MusEGlobal::config.smfFormat != 0)) // Changed to single track. Tim { mft = new MusECore::MidiFileTrack; @@ -211,7 +199,7 @@ void MusE::exportMidi() } //--------------------------------------------------- - // Write Coment + // Write Comment // //if (MusEGlobal::config.smfFormat == 0) // Only for smf 0 added by Tim. FIXME: Is this correct? See below. { @@ -263,11 +251,8 @@ void MusE::exportMidi() //--------------------------------------------------- // Write Signatures // - ///const SigList* sl = &sigmap; const AL::SigList* sl = &AL::sigmap; - ///for (ciSigEvent e = sl->begin(); e != sl->end(); ++e) { for (AL::ciSigEvent e = sl->begin(); e != sl->end(); ++e) { - ///SigEvent* event = e->second; AL::SigEvent* event = e->second; int sz = (MusEGlobal::config.exp2ByteTimeSigs ? 2 : 4); // export 2 byte timesigs instead of 4 ? unsigned char data[sz]; @@ -281,7 +266,7 @@ void MusE::exportMidi() case 32: data[1] = 5; break; case 64: data[1] = 6; break; default: - fprintf(stderr, "falsche Signatur; nenner %d\n", event->sig.n); + fprintf(stderr, "wrong Signature; denominator is %d\n", event->sig.n); break; } // By T356. In muse the metronome pulse is fixed at 24 (once per quarter-note). @@ -319,10 +304,6 @@ void MusE::exportMidi() // track comment //----------------------------------- - // FIXME: What are these 0x0F? All I found was that they are unspecified part of the sixteen text meta events. - // So why not use 0x01? And do we include it for all tracks, or only above 1? Tim. - //if (i == 0 || (i != 0 && MusEGlobal::config.smfFormat != 0)) - //if (i != 0 && MusEGlobal::config.smfFormat != 0) if (MusEGlobal::config.smfFormat != 0) { if (!track->comment().isEmpty()) { @@ -351,13 +332,9 @@ void MusE::exportMidi() } int pitch; if (track->type() == MusECore::Track::DRUM) { - // // Map drum-notes to the drum-map values - // int instr = ev.pitch(); pitch = MusEGlobal::drumMap[instr].anote; - // port = MusEGlobal::drumMap[instr].port; - // channel = MusEGlobal::drumMap[instr].channel; } else pitch = ev.pitch(); @@ -431,10 +408,10 @@ void MusE::exportMidi() } mf.setDivision(MusEGlobal::config.midiDivision); mf.setMType(MusEGlobal::song->mtype()); - //mf.setTrackList(mtl, ntracks); mf.setTrackList(mtl, i); mf.write(); + // DELETETHIS 4 ??? or is this still an issue? // TESTING: Cleanup. I did not valgrind this feature in last memleak fixes, but I suspect it leaked. //for(MusECore::iMidiFileTrack imft = mtl->begin(); imft != mtl->end(); ++imft) // delete *imft; diff --git a/muse2/muse/functions.cpp b/muse2/muse/functions.cpp index 71621b0d..ddbd3ce5 100644 --- a/muse2/muse/functions.cpp +++ b/muse2/muse/functions.cpp @@ -1181,7 +1181,7 @@ void paste_at(const QString& pt, int pos, int max_distance, bool always_new_part schedule_resize_all_same_len_clone_parts(it->first, it->second, operations); MusEGlobal::song->informAboutNewParts(new_part_map); // must be called before apply. otherwise - // pointer changes (by resize) screw it up + // pointer changes (by resize) screw it up MusEGlobal::song->applyOperationGroup(operations); MusEGlobal::song->update(SC_SELECTION); } diff --git a/muse2/muse/gconfig.cpp b/muse2/muse/gconfig.cpp index 68ac6315..cb9184a3 100644 --- a/muse2/muse/gconfig.cpp +++ b/muse2/muse/gconfig.cpp @@ -147,7 +147,6 @@ GlobalConfigValues config = { QRect(0, 0, 400, 300), // GeometryMain; QRect(0, 0, 200, 100), // GeometryTransport; QRect(0, 0, 600, 200), // GeometryBigTime; - //QRect(0, 0, 300, 500), // GeometryMixer; // Obsolete { QString("Mixer A"), QRect(0, 0, 300, 500), // Mixer1 @@ -193,9 +192,8 @@ GlobalConfigValues config = { MusECore::DONT_REC_MUTED_OR_HIDDEN, true, // addHiddenTracks true, // unhideTracks - MusEGlobal::PREFER_NEW // drumTrackPreference + MusEGlobal::PREFER_NEW, // drumTrackPreference + false // smartFocus }; -//GlobalConfigValues globalConfig = config; - } // namespace MusEGlobal diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h index 4ba9efea..a76b7e13 100644 --- a/muse2/muse/gconfig.h +++ b/muse2/muse/gconfig.h @@ -71,11 +71,7 @@ struct MixerConfig { bool showAuxTracks; bool showSyntiTracks; - //void write(MusECore::Xml&, const char* name); - //void write(int level, MusECore::Xml& xml, const char* name); void write(int level, MusECore::Xml& xml); - //void read(QDomNode); - //void read(MusECore::Xml& xml, const QString& name); void read(MusECore::Xml& xml); }; @@ -92,7 +88,6 @@ struct GlobalConfigValues { QColor bigTimeForegroundColor; QColor bigTimeBackgroundColor; QColor waveEditBackgroundColor; - //QFont fonts[6]; QFont fonts[NUM_FONTS]; QColor trackBg; QColor selectTrackBg; @@ -148,12 +143,10 @@ struct GlobalConfigValues { QRect geometryMain; QRect geometryTransport; QRect geometryBigTime; -// QRect geometryMixer; MixerConfig mixer1; MixerConfig mixer2; bool transportVisible; bool bigTimeVisible; -// bool mixerVisible; bool mixer1Visible; bool mixer2Visible; bool markerVisible; @@ -188,6 +181,7 @@ struct GlobalConfigValues { bool addHiddenTracks; bool unhideTracks; drumTrackPreference_t drumTrackPreference; + bool smartFocus; }; diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp index d50ea1eb..112b9890 100644 --- a/muse2/muse/globals.cpp +++ b/muse2/muse/globals.cpp @@ -103,6 +103,7 @@ QString lastWavePath("."); QString lastMidiPath("."); bool debugMode = false; +bool unityWorkaround = false; bool debugMsg = false; bool heavyDebugMsg = false; bool midiInputTrace = false; @@ -129,18 +130,7 @@ const char* midi_file_pattern[] = { // the file is a pipe, and pipes can't seek ! // This results in a corrupted midi file from MidiFile::writeTrack(). // So exporting compressed midi has simply been disabled here for now... -/* -const char* midi_file_save_pattern[] = { - "Midi (*.mid)", - "gzip compressed Midi (*.mid.gz)", - "bzip2 compressed Midi (*.mid.bz2)", - "Karaoke (*.kar)", - "gzip compressed karaoke (*.kar.gz)", - "bzip2 compressed karaoke (*.kar.bz2)", - "All Files (*)", - 0 - }; -*/ +// For re-enabling, add .mid.gz and .mid.bz2 and same for .kar again const char* midi_file_save_pattern[] = { QT_TRANSLATE_NOOP("file_patterns", "Midi (*.mid)"), QT_TRANSLATE_NOOP("file_patterns", "Karaoke (*.kar)"), @@ -181,15 +171,6 @@ const char* image_file_pattern[] = { 0 }; -// Not used. -/* -const char* ctrl_file_pattern[] = { - "ctrl Files (*.ctrl *.ctrl.gz *.ctrl.bz2)", - "All Files (*)", - 0 - }; -*/ - const char* part_file_pattern[] = { QT_TRANSLATE_NOOP("file_patterns", "part Files (*.mpt *.mpt.gz *.mpt.bz2)"), QT_TRANSLATE_NOOP("file_patterns", "All Files (*)"), @@ -203,14 +184,6 @@ const char* part_file_save_pattern[] = { 0 }; -/* -const char* plug_file_pattern[] = { - QT_TRANSLATE_NOOP("file_patterns", "part Files (*.pre)"), - QT_TRANSLATE_NOOP("file_patterns", "All Files (*)"), - 0 - }; -*/ - const char* preset_file_pattern[] = { QT_TRANSLATE_NOOP("file_patterns", "Presets (*.pre *.pre.gz *.pre.bz2)"), QT_TRANSLATE_NOOP("file_patterns", "All Files (*)"), @@ -247,7 +220,6 @@ const char* audio_file_pattern[] = { 0 }; -///Qt::ButtonState globalKeyState; Qt::KeyboardModifiers globalKeyState; // Midi Filter Parameter @@ -275,7 +247,6 @@ QAction* punchoutAction; QAction* recordAction; QAction* panicAction; -//AudioMixerApp* audioMixer; MusEGui::MusE* muse = 0; int preMeasures = 2; diff --git a/muse2/muse/globals.h b/muse2/muse/globals.h index 7563c171..d691fad1 100644 --- a/muse2/muse/globals.h +++ b/muse2/muse/globals.h @@ -77,6 +77,7 @@ extern QString lastMidiPath; extern bool debugMode; extern bool midiInputTrace; extern bool midiOutputTrace; +extern bool unityWorkaround; extern bool debugMsg; extern bool heavyDebugMsg; extern bool debugSync; @@ -96,7 +97,6 @@ extern const char* med_file_pattern[]; extern const char* med_file_save_pattern[]; extern const char* project_create_file_save_pattern[]; extern const char* image_file_pattern[]; -//extern const char* ctrl_file_pattern[]; extern const char* part_file_pattern[]; extern const char* part_file_save_pattern[]; extern const char* preset_file_pattern[]; @@ -105,7 +105,6 @@ extern const char* drum_map_file_pattern[]; extern const char* drum_map_file_save_pattern[]; extern const char* audio_file_pattern[]; -///extern Qt::ButtonState globalKeyState; extern Qt::KeyboardModifiers globalKeyState; extern int midiInputPorts; //!< receive from all devices @@ -146,8 +145,6 @@ extern QAction* punchoutAction; extern QAction* recordAction; extern QAction* panicAction; -//class AudioMixerApp; -//extern AudioMixerApp* audioMixer; extern MusEGui::MusE* muse; extern int preMeasures; diff --git a/muse2/muse/gui.h b/muse2/muse/gui.h index 43836dbb..1f3e773a 100644 --- a/muse2/muse/gui.h +++ b/muse2/muse/gui.h @@ -29,27 +29,6 @@ // central point of tweaking the gui // -/* -// size of horizontal and vertical splitter -// -static const int splitWidth = 6; - -// arranger: -static const int trackRowHeight = 24; -static const int minTrackHeight = trackRowHeight + splitWidth + 1; -static const int defaultTrackHeight = minTrackHeight; -static const int infoHeight = 20; -static const int infoWidth = 140; -static const int trackSeparator = 1; -static const int yTrackOffset = -2; // -4; - -// mixer: -static const int STRIP_WIDTH = 60; -static const int LABEL_HEIGHT = 20; -static const int BUTTON_HEIGHT = STRIP_WIDTH / 3; -static const int ENTRY_HEIGHT = 17; -*/ - static const int ICON_WIDTH = 18; static const QSize ICON_SIZE(ICON_WIDTH, ICON_WIDTH); diff --git a/muse2/muse/help.cpp b/muse2/muse/help.cpp index c7ae1ff7..4bce3a16 100644 --- a/muse2/muse/help.cpp +++ b/muse2/muse/help.cpp @@ -73,7 +73,6 @@ void MusE::startHomepageBrowser() void MusE::startBugBrowser() { - //QString museBugPage("http://www.muse-sequencer.org/wiki/index.php/Report_a_bug"); QString museBugPage("http://www.muse-sequencer.org/index.php/Report_a_bug"); launchBrowser(museBugPage); } diff --git a/muse2/muse/helper.cpp b/muse2/muse/helper.cpp index ce96d6fe..89b0b641 100644 --- a/muse2/muse/helper.cpp +++ b/muse2/muse/helper.cpp @@ -40,12 +40,12 @@ #include "audiodev.h" #include "midiseq.h" +#include #include #include #include #include #include -//#include #ifdef DSSI_SUPPORT #include "dssihost.h" @@ -364,10 +364,7 @@ QMenu* populateAddSynth(QWidget* parent) { QMenu* synp = new QMenu(parent); - //typedef std::multimap asmap; typedef std::multimap asmap; - - //typedef std::multimap::iterator imap; typedef std::multimap::iterator imap; @@ -514,8 +511,6 @@ QActionGroup* populateAddTrack(QMenu* addTrack, bool populateAll, bool evenIgnor addTrack->addMenu(synp); } - //QObject::connect(addTrack, SIGNAL(triggered(QAction *)), MusEGlobal::song, SLOT(addNewTrack(QAction *))); - return grp; } @@ -525,9 +520,7 @@ QActionGroup* populateAddTrack(QMenu* addTrack, bool populateAll, bool evenIgnor QString getFilterExtension(const QString &filter) { - // // Return the first extension found. Must contain at least one * character. - // int pos = filter.indexOf('*'); if(pos == -1) @@ -564,11 +557,9 @@ QString browseProjectFolder(QWidget* parent) path = d.absolutePath(); } - QString dir = QFileDialog::getExistingDirectory(parent, qApp->tr("Select project directory"), path); + QString dir = QFileDialog::getExistingDirectory(parent, qApp->translate("@default", QT_TRANSLATE_NOOP("@default", "Select project directory")), path); if(dir.isEmpty()) dir = MusEGlobal::config.projectBaseFolder; - // projDirLineEdit->setText(dir); - //return QFileDialog::getExistingDirectory(this, qApp.tr("Select project directory"), path); return dir; } @@ -586,7 +577,6 @@ QString projectTitleFromFilename(QString filename) QFileInfo fi(filename); - //return fi.baseName(); return fi.fileName(); } @@ -615,9 +605,6 @@ QString projectExtensionFromFilename(QString filename) QString getUniqueUntitledName() { QString filename("untitled"); - //QTemporaryFile tf(MusEGlobal::config.projectBaseFolder +"/" + s + "XXXXXX.med"); - //if(tf.open()) - // s = MusEGui::projectTitleFromFilename(tf.fileName()); QString fbase(MusEGlobal::config.projectBaseFolder); @@ -626,7 +613,6 @@ QString getUniqueUntitledName() nfb += "/" + filename; QFileInfo fi(nfb + "/" + filename + ".med"); // TODO p4.0.40 Check other extensions. if(!fi.exists()) - //return filename; return fi.filePath(); // Find a new filename @@ -640,14 +626,10 @@ QString getUniqueUntitledName() nfb += "/" + nfn; QFileInfo fi(nfb + "/" + nfn + ".med"); if(!fi.exists()) - //break; return fi.filePath(); } - //if(idx >= 10000) - printf("MusE error: Could not make untitled project name (10000 or more untitled projects in project dir - clean up!\n"); - - //return nfn; + printf("MusE error: Could not make untitled project name (10000 or more untitled projects in project dir - clean up!\n"); nfb = fbase; if(MusEGlobal::config.projectStoreInFolder) @@ -686,8 +668,6 @@ void populateMidiPorts() if(dev) { ++jack_midis_found; - //printf("populateMidiPorts Created jack writeable device: %s\n", dev->name().toLatin1().constData()); - //dev->setOpenFlags(1); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); MusECore::Route srcRoute(dev, -1); MusECore::Route dstRoute(*i, true, -1, MusECore::Route::JACK_ROUTE); @@ -704,8 +684,6 @@ void populateMidiPorts() if(dev) { ++jack_midis_found; - //printf("populateMidiPorts Created jack readable device: %s\n", dev->name().toLatin1().constData()); - //dev->setOpenFlags(2); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); MusECore::Route srcRoute(*i, false, -1, MusECore::Route::JACK_ROUTE); MusECore::Route dstRoute(dev, -1); @@ -717,10 +695,10 @@ void populateMidiPorts() } //else // If Jack is not running, use ALSA devices. - //if(MusEGlobal::audioDevice->deviceType() == MusECore::AudioDevice::DUMMY_AUDIO) // Try to do the user a favour: If we still have no Jack devices, even if Jack is running, fill with ALSA. // It is possible user has Jack running on ALSA back-end but without midi support. // IE. They use Jack for audio but use ALSA for midi! + // If unwanted, remove "|| jack_midis_found == 0". if(MusEGlobal::audioDevice->deviceType() == MusECore::AudioDevice::DUMMY_AUDIO || jack_midis_found == 0) { for(MusECore::iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) @@ -728,40 +706,16 @@ void populateMidiPorts() if((*i)->deviceType() != MusECore::MidiDevice::ALSA_MIDI) continue; dev = *i; - // Select only sensible devices first - not thru etc. - //if( ... ) - // continue; - - //dev->setOpenFlags(1); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); if(++port_num == MIDI_PORTS) return; } - - //for(MusECore::iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) - //{ - // if((*i)->deviceType() != MusECore::MidiDevice::ALSA_MIDI) - // continue; - // // Select the ones ignored in the first pass. - // if(! ... ) - // continue; - // - // dev->setOpenFlags(1); - // MusEGlobal::midiSeq->msgSetMidiDevice(port_num, dev); - // - // if(++port_num == MIDI_PORTS) - // return; - //} } - - //MusEGlobal::muse->changeConfig(true); // save configuration file - //MusEGlobal::song->update(); - } #else // this code is disabled - +// DELETETHIS uhm, yeah... do we need this? DISABLED AND MAYBE OUT-OF-DATE CODE! the code below is disabled for a longer period of time, there were certain changes and merges. dunno if that code @@ -792,9 +746,7 @@ void populateMidiPorts() { std::list wsl; std::list rsl; - //wsl = MusEGlobal::audioDevice->inputPorts(true, 1); // Ask for second aliases. wsl = MusEGlobal::audioDevice->inputPorts(true, 0); // Ask for first aliases. - //rsl = MusEGlobal::audioDevice->outputPorts(true, 1); // Ask for second aliases. rsl = MusEGlobal::audioDevice->outputPorts(true, 0); // Ask for first aliases. for(std::list::iterator wi = wsl.begin(); wi != wsl.end(); ++wi) @@ -824,16 +776,9 @@ void populateMidiPorts() // Do we have a matching pair? if(rs == ws) { - // Would like to remove the client name, but no, we need it as a distinguishing identifier. - //int z = ws.indexOf(":"); - //if(z >= 0) - // ws.remove(0, z + 1); - dev = MusECore::MidiJackDevice::createJackMidiDevice(ws, 3); if(dev) { - //printf("populateMidiPorts Created jack writeable/readable device: %s\n", dev->name().toLatin1().constData()); - //dev->setOpenFlags(1); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); MusECore::Route devRoute(dev, -1); MusECore::Route wdstRoute(*wi, true, -1, MusECore::Route::JACK_ROUTE); @@ -854,15 +799,9 @@ void populateMidiPorts() { // No match was found. Create a single writeable device. QString s = *wi; - // Would like to remove the client name, but no, we need it as a distinguishing identifier. - //int z = s.indexOf(":"); - //if(z >= 0) - // s.remove(0, z + 1); dev = MusECore::MidiJackDevice::createJackMidiDevice(s, 1); if(dev) { - //printf("populateMidiPorts Created jack writeable device: %s\n", dev->name().toLatin1().constData()); - //dev->setOpenFlags(1); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); MusECore::Route srcRoute(dev, -1); MusECore::Route dstRoute(*wi, true, -1, MusECore::Route::JACK_ROUTE); @@ -877,15 +816,9 @@ void populateMidiPorts() for(std::list::iterator ri = rsl.begin(); ri != rsl.end(); ++ri) { QString s = *ri; - // Would like to remove the client name, but no, we need it as a distinguishing identifier. - //int z = s.indexOf(":"); - //if(z >= 0) - // s.remove(0, z + 1); dev = MusECore::MidiJackDevice::createJackMidiDevice(s, 2); if(dev) { - //printf("populateMidiPorts Created jack readable device: %s\n", dev->name().toLatin1().constData()); - //dev->setOpenFlags(2); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); MusECore::Route srcRoute(*ri, false, -1, MusECore::Route::JACK_ROUTE); MusECore::Route dstRoute(dev, -1); @@ -904,36 +837,12 @@ void populateMidiPorts() if((*i)->deviceType() != MusECore::MidiDevice::ALSA_MIDI) continue; dev = *i; - // Select only sensible devices first - not thru etc. - //if( ... ) - // continue; - - //dev->setOpenFlags(1); MusEGlobal::midiSeq->msgSetMidiDevice(&MusEGlobal::midiPorts[port_num], dev); if(++port_num == MIDI_PORTS) return; } - - //for(MusECore::iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) - //{ - // if((*i)->deviceType() != MusECore::MidiDevice::ALSA_MIDI) - // continue; - // // Select the ones ignored in the first pass. - // if(! ... ) - // continue; - // - // dev->setOpenFlags(1); - // MusEGlobal::midiSeq->msgSetMidiDevice(port_num, dev); - // - // if(++port_num == MIDI_PORTS) - // return; - //} } - - //MusEGlobal::muse->changeConfig(true); // save configuration file - //MusEGlobal::song->update(); - } #endif // populateMidiPorts diff --git a/muse2/muse/importmidi.cpp b/muse2/muse/importmidi.cpp index bd3c8a9f..44b68353 100644 --- a/muse2/muse/importmidi.cpp +++ b/muse2/muse/importmidi.cpp @@ -38,13 +38,11 @@ #include "midiport.h" #include "transport.h" #include "arranger.h" -//#include "arranger/arranger.h" // p4.0.2 #include "mpevent.h" #include "event.h" #include "midictrl.h" #include "instruments/minstrument.h" #include "drummap.h" -//#include "midiedit/drummap.h" // p4.0.2 #include "xml.h" #include "audio.h" #include "gconfig.h" @@ -195,9 +193,7 @@ bool MusE::importMidi(const QString name, bool merge) mport->setInstrument(instr); MusECore::EventList* mel = track->events(); - //buildMidiEventList(mel, el, track, division, first); - // Don't do loops. - buildMidiEventList(mel, el, track, division, first, false); + buildMidiEventList(mel, el, track, division, first, false); // Don't do loops. first = false; // Comment Added by T356. @@ -209,8 +205,7 @@ bool MusE::importMidi(const QString name, bool merge) else { track->setType(MusECore::Track::DRUM); - - // remap drum pitch with drumOutmap + // remap drum pitch with drumOutmap (was: Inmap. flo93 thought this was wrong) MusECore::EventList* tevents = track->events(); for (MusECore::iEvent i = tevents->begin(); i != tevents->end(); ++i) { MusECore::Event ev = i->second; @@ -246,9 +241,7 @@ bool MusE::importMidi(const QString name, bool merge) track->setOutChannel(0); track->setOutPort(0); MusECore::EventList* mel = track->events(); - //buildMidiEventList(mel, el, track, division, true); - // Do SysexMeta. Don't do loops. - buildMidiEventList(mel, el, track, division, true, false); + buildMidiEventList(mel, el, track, division, true, false); // Do SysexMeta. Don't do loops. processTrack(track); MusEGlobal::song->insertTrack0(track, -1); } @@ -263,7 +256,6 @@ bool MusE::importMidi(const QString name, bool merge) MusEGlobal::song->initLen(); int z, n; - ///sigmap.timesig(0, z, n); AL::sigmap.timesig(0, z, n); int tempo = MusEGlobal::tempomap.tempo(0); @@ -277,7 +269,6 @@ bool MusE::importMidi(const QString name, bool merge) MusEGlobal::song->updatePos(); _arranger->reset(); - ///_arranger->setMode(int(MusEGlobal::song->mtype())); // p4.0.7 Tim } else { MusEGlobal::song->initLen(); @@ -324,7 +315,6 @@ void MusE::processTrack(MusECore::MidiTrack* track) int bar2, beat; unsigned tick; - ///sigmap.tickValues(len, &bar2, &beat, &tick); AL::sigmap.tickValues(len, &bar2, &beat, &tick); int lastOff = 0; @@ -333,7 +323,6 @@ void MusE::processTrack(MusECore::MidiTrack* track) int x2 = 0; // end tick current measure for (int bar = 0; bar < bar2; ++bar, x1 = x2) { - ///x2 = sigmap.bar2tick(bar+1, 0, 0); x2 = AL::sigmap.bar2tick(bar+1, 0, 0); if (lastOff > x2) { // this measure is busy! @@ -347,7 +336,6 @@ void MusE::processTrack(MusECore::MidiTrack* track) MusECore::MidiPart* part = new MusECore::MidiPart(track); part->setTick(st); part->setLenTick(x1-st); - // printf("new part %d len: %d\n", st, x1-st); part->setName(partname); pl->add(part); st = -1; @@ -371,7 +359,6 @@ void MusE::processTrack(MusECore::MidiTrack* track) if (st != -1) { MusECore::MidiPart* part = new MusECore::MidiPart(track); part->setTick(st); - // printf("new part %d len: %d\n", st, x2-st); part->setLenTick(x2-st); part->setName(partname); pl->add(part); @@ -381,7 +368,6 @@ void MusE::processTrack(MusECore::MidiTrack* track) { // Just one long part... MusECore::MidiPart* part = new MusECore::MidiPart(track); - //part->setTick(st); part->setTick(0); part->setLenTick(len); part->setName(partname); @@ -434,11 +420,9 @@ void MusE::importController(int channel, MusECore::MidiPort* mport, int n) return; // controller does already exist MusECore::MidiController* ctrl = 0; MusECore::MidiControllerList* mcl = instr->controller(); -// printf("import Ctrl\n"); for (MusECore::iMidiController i = mcl->begin(); i != mcl->end(); ++i) { MusECore::MidiController* mc = i->second; int cn = mc->num(); -// printf(" %x %x\n", n, cn); if (cn == n) { ctrl = mc; break; @@ -452,8 +436,6 @@ void MusE::importController(int channel, MusECore::MidiPort* mport, int n) if (ctrl == 0) { printf("controller 0x%x not defined for instrument %s, channel %d\n", n, instr->iname().toLatin1().constData(), channel); -// TODO: register default Controller -// MusECore::MidiController* MusECore::MidiPort::midiController(int num) const } MusECore::MidiCtrlValList* newValList = new MusECore::MidiCtrlValList(n); vll->add(channel, newValList); @@ -473,13 +455,11 @@ void MusE::importPart() MusECore::Track* t = *i; if (t->selected()) { // Changed by T356. Support mixed .mpt files. - //if (t->isMidiTrack()) { if (t->isMidiTrack() || t->type() == MusECore::Track::WAVE) { track = t; break; } else { - //QMessageBox::warning(this, QString("MusE"), tr("Import part is only valid for midi tracks!")); QMessageBox::warning(this, QString("MusE"), tr("Import part is only valid for midi and wave tracks!")); return; } @@ -515,6 +495,7 @@ void MusE::importPart() //--------------------------------------------------------- void MusE::importPartToTrack(QString& filename, unsigned tick, MusECore::Track* track) { + // DELETETHIS 41 // Changed by T356 /* bool popenFlag = false; @@ -581,9 +562,6 @@ void MusE::importPartToTrack(QString& filename, unsigned tick, MusECore::Track* break; case MusECore::Xml::TagStart: if (tag == "part") { - //MusECore::MidiPart* p = new MusECore::MidiPart((MusECore::MidiTrack*)track); - //p->read(xml); - // Read the part. MusECore::Part* p = 0; p = readXmlPart(xml, track); @@ -604,8 +582,6 @@ void MusE::importPartToTrack(QString& filename, unsigned tick, MusECore::Track* posOffset = tick - p->tick(); } p->setTick(p->tick() + posOffset); - //finalPos=p->tick() + p->lenTick(); - ////pos += p->lenTick(); MusEGlobal::audio->msgAddPart(p,false); } else diff --git a/muse2/muse/instruments/editinstrument.cpp b/muse2/muse/instruments/editinstrument.cpp index ac3ec68f..e9ced6b2 100644 --- a/muse2/muse/instruments/editinstrument.cpp +++ b/muse2/muse/instruments/editinstrument.cpp @@ -73,9 +73,6 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) toolBar->addAction(QWhatsThis::createAction(this)); Help->addAction(QWhatsThis::createAction(this)); - ///patchpopup = new QMenu(patchButton); - //patchpopup->setCheckable(false);// Qt4 doc says this is unnecessary. - // populate instrument list // Populate common controller list. for(int i = 0; i < 128; ++i) @@ -102,6 +99,7 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) instrumentList->setSelectionMode(QAbstractItemView::SingleSelection); if(instrumentList->item(0)) instrumentList->setCurrentItem(instrumentList->item(0)); + //DELETETHIS //oldMidiInstrument = (MusECore::MidiInstrument*)((ListBoxData*)instrumentList->item(0))->data(); //oldMidiInstrument = (ListBoxData*)instrumentList->item(0); //oldMidiInstrument = (ListBoxData*)instrumentList->selectedItem(); @@ -173,13 +171,10 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) - //instrumentChanged(); changeInstrument(); - //connect(listController, SIGNAL(selectionChanged()), SLOT(controllerChanged())); connect(viewController, SIGNAL(itemSelectionChanged()), SLOT(controllerChanged())); - //connect(instrumentName, SIGNAL(textChanged(const QString&)), SLOT(instrumentNameChanged(const QString&))); connect(instrumentName, SIGNAL(returnPressed()), SLOT(instrumentNameReturn())); connect(instrumentName, SIGNAL(lostFocus()), SLOT(instrumentNameReturn())); @@ -188,7 +183,6 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) connect(patchDelete, SIGNAL(clicked()), SLOT(deletePatchClicked())); connect(patchNew, SIGNAL(clicked()), SLOT(newPatchClicked())); connect(patchNewGroup, SIGNAL(clicked()), SLOT(newGroupClicked())); - //connect(newCategory, SIGNAL(clicked()), SLOT(newCategoryClicked())); connect(patchButton, SIGNAL(clicked()), SLOT(patchButtonClicked())); connect(defPatchH, SIGNAL(valueChanged(int)), SLOT(defPatchChanged(int))); @@ -201,7 +195,6 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) connect(ctrlType,SIGNAL(activated(int)), SLOT(ctrlTypeChanged(int))); connect(ctrlName, SIGNAL(returnPressed()), SLOT(ctrlNameReturn())); connect(ctrlName, SIGNAL(lostFocus()), SLOT(ctrlNameReturn())); - //connect(ctrlName, SIGNAL(textChanged(const QString&)), SLOT(ctrlNameChanged(const QString&))); connect(spinBoxHCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlHNumChanged(int))); connect(spinBoxLCtrlNo, SIGNAL(valueChanged(int)), SLOT(ctrlLNumChanged(int))); connect(spinBoxMin, SIGNAL(valueChanged(int)), SLOT(ctrlMinChanged(int))); @@ -211,7 +204,7 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl) connect(nullParamSpinBoxL, SIGNAL(valueChanged(int)), SLOT(ctrlNullParamLChanged(int))); connect(tabWidget3, SIGNAL(currentChanged(QWidget*)), SLOT(tabChanged(QWidget*))); - //connect(sysexList, SIGNAL(selectionChanged()), SLOT(sysexChanged())); + //connect(sysexList, SIGNAL(selectionChanged()), SLOT(sysexChanged())); DELETETHIS or is it needed later? //connect(deleteSysex, SIGNAL(clicked()), SLOT(deleteSysexClicked())); //connect(newSysex, SIGNAL(clicked()), SLOT(newSysexClicked())); } @@ -546,21 +539,15 @@ void EditInstrument::fileNew() } } if (!found) { - //if(oldMidiInstrument) - //{ MusECore::MidiInstrument* oi = 0; if(oldMidiInstrument) oi = (MusECore::MidiInstrument*)oldMidiInstrument->data(Qt::UserRole).value(); MusECore::MidiInstrument* wip = &workingInstrument; - //checkDirty(oi); - //if(checkDirty(oi)) - if(checkDirty(wip)) - // No save was chosen. Restore the actual instrument name. + if(checkDirty(wip)) // No save was chosen. Restore the actual instrument name. { if(oi) { oldMidiInstrument->setText(oi->iname()); - //workingInstrument.setIName(oi->iname()); // No file path? Only a new unsaved instrument can do that. So delete it. if(oi->filePath().isEmpty()) @@ -569,29 +556,14 @@ void EditInstrument::fileNew() } } - //else - //{ - // if(oi) - // Save was chosen. Assign the working instrument to the actual instrument. - // oi->assign(workingInstrument); - //} - - //oi->setDirty(false); workingInstrument.setDirty(false); - //} MusECore::MidiInstrument* ni = new MusECore::MidiInstrument(s); - //MusECore::midiInstruments.append(ni); MusECore::midiInstruments.push_back(ni); - //QListWidgetItem* item = new QListWidgetItem(ni->iname()); - //InstrumentListItem* item = new InstrumentListItem(ni->iname()); QListWidgetItem* item = new QListWidgetItem(ni->iname()); - //oldMidiInstrument = item; workingInstrument.assign( *ni ); - //workingInstrument.setDirty(false); - - //item->setText(ni->iname()); + QVariant v = qVariantFromValue((void*)(ni)); item->setData(Qt::UserRole, v); instrumentList->addItem(item); @@ -617,14 +589,8 @@ void EditInstrument::fileNew() // fileOpen //--------------------------------------------------------- -void EditInstrument::fileOpen() +void EditInstrument::fileOpen() //DELETETHIS? { - // Allow these to update... - //instrumentNameReturn(); - //patchNameReturn(); - //ctrlNameReturn(); - - } //--------------------------------------------------------- @@ -633,10 +599,8 @@ void EditInstrument::fileOpen() void EditInstrument::fileSave() { - //if (instrument->filePath().isEmpty()) if (workingInstrument.filePath().isEmpty()) { - //fileSaveAs(); saveAs(); return; } @@ -645,18 +609,13 @@ void EditInstrument::fileSave() QFileInfo qfi(workingInstrument.filePath()); if(qfi.absolutePath() == MusEGlobal::museInstruments) { - //fileSaveAs(); saveAs(); return; } - //QFile f(instrument->filePath()); - //if (!f.open(QIODevice::WriteOnly)) { - //FILE* f = fopen(instrument->filePath().toLatin1().constData(), "w"); FILE* f = fopen(workingInstrument.filePath().toLatin1().constData(), "w"); if(f == 0) { - //fileSaveAs(); saveAs(); return; } @@ -666,20 +625,14 @@ void EditInstrument::fileSave() patchNameReturn(); ctrlNameReturn(); - //f.close(); if(fclose(f) != 0) { - //QString s = QString("Creating file:\n") + instrument->filePath() + QString("\nfailed: ") QString s = QString("Creating file:\n") + workingInstrument.filePath() + QString("\nfailed: ") - //+ f.errorString(); + QString(strerror(errno) ); - //fprintf(stderr, "poll failed: %s\n", strerror(errno)); QMessageBox::critical(this, tr("MusE: Create file failed"), s); return; } - //if(fileSave(instrument, instrument->filePath())) - // instrument->setDirty(false); if(fileSave(&workingInstrument, workingInstrument.filePath())) workingInstrument.setDirty(false); } @@ -690,7 +643,7 @@ void EditInstrument::fileSave() bool EditInstrument::fileSave(MusECore::MidiInstrument* instrument, const QString& name) { - //QFile f(name); + //QFile f(name); DELETETHIS //if (!f.open(QIODevice::WriteOnly)) { // QString s("Creating file failed: "); // s += strerror(errno); @@ -703,8 +656,6 @@ bool EditInstrument::fileSave(MusECore::MidiInstrument* instrument, const QStrin FILE* f = fopen(name.toAscii().constData(), "w"); if(f == 0) { - //if(debugMsg) - // printf("READ IDF %s\n", fi->filePath().toLatin1().constData()); QString s("Creating file failed: "); s += QString(strerror(errno)); QMessageBox::critical(this, @@ -716,7 +667,6 @@ bool EditInstrument::fileSave(MusECore::MidiInstrument* instrument, const QStrin updateInstrument(instrument); - //instrument->write(xml); instrument->write(0, xml); // Assign the working instrument values to the actual current selected instrument... @@ -729,18 +679,13 @@ bool EditInstrument::fileSave(MusECore::MidiInstrument* instrument, const QStrin // Now signal the rest of the app so stuff can change... MusEGlobal::song->update(SC_CONFIG | SC_MIDI_CONTROLLER); - //MusEGlobal::song->update(SC_CONFIG | SC_MIDI_CONTROLLER | SC_MIDI_CONTROLLER_ADD); } } - //f.close(); - //if (f.error()) { if(fclose(f) != 0) { QString s = QString("Write File\n") + name + QString("\nfailed: ") - //+ f.errorString(); + QString(strerror(errno)); - //fprintf(stderr, "poll failed: %s\n", strerror(errno)); QMessageBox::critical(this, tr("MusE: Write File failed"), s); return false; } @@ -758,7 +703,7 @@ void EditInstrument::saveAs() patchNameReturn(); ctrlNameReturn(); - //QListWidgetItem* item = instrumentList->currentItem(); + //QListWidgetItem* item = instrumentList->currentItem(); DELETETHIS // ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); // if (item == 0) // return; @@ -774,15 +719,13 @@ void EditInstrument::saveAs() { printf("MusE Error! User instrument directory: %s does not exist. Should be created at startup!\n", MusEGlobal::museUserInstruments.toLatin1().constData()); - //path = MusEGlobal::museUser; + //path = MusEGlobal::museUser; DELETETHIS? //path = MusEGlobal::configPath; } - //if (instrument->filePath().isEmpty()) if (workingInstrument.filePath().isEmpty()) path += QString("/%1.idf").arg(workingInstrument.iname()); else { - //QFileInfo fi(instrument->filePath()); QFileInfo fi(workingInstrument.filePath()); // Prompt for a new instrument name if the name has not been changed, to avoid duplicates. @@ -797,7 +740,7 @@ void EditInstrument::saveAs() // This will still allow a user instrument to override a built-in instrument with the same name. if(fi.absolutePath() != MusEGlobal::museInstruments) { - //QMessageBox::critical(this, + //QMessageBox::critical(this, DELETETHIS??? // tr("MusE: Bad instrument name"), // tr("Please change the instrument name to a new unique name before saving, to avoid duplicates"), // QMessageBox::Ok, @@ -811,20 +754,13 @@ void EditInstrument::saveAs() } path += QString("/%1.idf").arg(fi.baseName()); } - //QString s = QFileDialog::getSaveFileName(this, - // tr("MusE: Save Instrument Definition"), - // path, - // tr("Instrument Definition (*.idf)")); - + QString s = QFileDialog::getSaveFileName(this, tr("MusE: Save Instrument Definition").toLatin1().constData(), path, tr("Instrument Definition (*.idf)")); if (s.isEmpty()) return; - //instrument->setFilePath(s); workingInstrument.setFilePath(s); - //if (fileSave(instrument, s)) - // instrument->setDirty(false); if(fileSave(&workingInstrument, s)) workingInstrument.setDirty(false); } @@ -856,16 +792,10 @@ void EditInstrument::fileSaveAs() { // No save: case 1: - //item->setText(instrument->iname()); - //instrumentList->triggerUpdate(true); - //instrument->setDirty(false); workingInstrument.setDirty(false); if(oi) { oldMidiInstrument->setText(oi->iname()); - //workingInstrument.setIName(oi->iname()); - - //workingInstrument.assign(*oi); // No file path? Only a new unsaved instrument can do that. So delete it. if(oi->filePath().isEmpty()) @@ -888,13 +818,11 @@ void EditInstrument::fileSaveAs() // Save: case 0: - //if(oi) - // oi->assign(workingInstrument); workingInstrument.setDirty(false); break; } - //QListWidgetItem* item = instrumentList->currentItem(); + //QListWidgetItem* item = instrumentList->currentItem(); DELETETHIS // ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); // if (item == 0) // return; @@ -975,8 +903,7 @@ void EditInstrument::fileSaveAs() break; } } - // Assign the found instrument to the working instrument. - //workingInstrument.assign(*(*imi)); + // Assign the found instrument name to the working instrument name. workingInstrument.setIName(s); @@ -1007,22 +934,13 @@ void EditInstrument::fileSaveAs() ni->assign(workingInstrument); ni->setIName(so); ni->setFilePath(QString()); - //MusECore::midiInstruments.append(ni); MusECore::midiInstruments.push_back(ni); - //QListWidgetItem* item = new QListWidgetItem(ni->iname()); - //InstrumentListItem* item = new InstrumentListItem(ni->iname()); - //ListBoxData* item = new ListBoxData(ni->iname()); QListWidgetItem* item = new QListWidgetItem(so); - //oldMidiInstrument = item; workingInstrument.assign( *ni ); - //workingInstrument.setDirty(false); - - //item->setText(ni->iname()); - //item->setData((void*)ni); + QVariant v = qVariantFromValue((void*)(ni)); item->setData(Qt::UserRole, v); - //instrumentList->addItem(item); instrumentList->addItem(item); oldMidiInstrument = 0; @@ -1040,25 +958,17 @@ void EditInstrument::fileSaveAs() break; } - //QString path = QDir::homePath() + "/" + MusEGlobal::config.instrumentPath; - //QString path = QDir::homeDirPath() + "/" + MusEGlobal::museGlobalShare; - //QString path = MusEGlobal::museInstruments; QString path = MusEGlobal::museUserInstruments; if(!QDir(MusEGlobal::museUserInstruments).exists()) { printf("MusE Error! User instrument directory: %s does not exist. Should be created at startup!\n", MusEGlobal::museUserInstruments.toLatin1().constData()); - //path = MusEGlobal::museUser; + //path = MusEGlobal::museUser; DELETETHIS //path = MusEGlobal::configPath; } path += QString("/%1.idf").arg(so); - - //QString s = QFileDialog::getSaveFileName(this, - // tr("MusE: Save Instrument Definition"), - // path, - // tr("Instrument Definition (*.idf)")); - + QString sfn; // If we are overwriting a user instrument just force the path. if(isuser) @@ -1069,12 +979,9 @@ void EditInstrument::fileSaveAs() path, tr("Instrument Definition (*.idf)")); if (sfn.isEmpty()) return; - //instrument->setFilePath(s); workingInstrument.setFilePath(sfn); } - //if (fileSave(instrument, s)) - // instrument->setDirty(false); if(fileSave(&workingInstrument, sfn)) workingInstrument.setDirty(false); } @@ -1099,7 +1006,7 @@ void EditInstrument::closeEvent(QCloseEvent* ev) patchNameReturn(); ctrlNameReturn(); - //QListWidgetItem* item = instrumentList->currentItem(); + //QListWidgetItem* item = instrumentList->currentItem(); DELETETHIS // ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); @@ -1117,16 +1024,10 @@ void EditInstrument::closeEvent(QCloseEvent* ev) { // No save: case 1: - //item->setText(instrument->iname()); - //instrumentList->triggerUpdate(true); - //instrument->setDirty(false); workingInstrument.setDirty(false); if(oi) { oldMidiInstrument->setText(oi->iname()); - //workingInstrument.setIName(oi->iname()); - - //workingInstrument.assign(*oi); // No file path? Only a new unsaved instrument can do that. So delete it. if(oi->filePath().isEmpty()) @@ -1149,14 +1050,10 @@ void EditInstrument::closeEvent(QCloseEvent* ev) // Save: case 0: - //if(oi) - // oi->assign(workingInstrument); workingInstrument.setDirty(false); break; } - -// } QMainWindow::closeEvent(ev); } @@ -1172,10 +1069,8 @@ void EditInstrument::changeInstrument() if(!sel) return; - //oldMidiInstrument = (MusECore::MidiInstrument*)sel->data(); oldMidiInstrument = sel; // Assignment - //workingInstrument = *((MusECore::MidiInstrument*)sel->data()); // Assign will 'delete' any existing patches, groups, or controllers. workingInstrument.assign( *((MusECore::MidiInstrument*)sel->data(Qt::UserRole).value()) ); @@ -1189,23 +1084,11 @@ void EditInstrument::changeInstrument() patchView->clear(); patchView->blockSignals(false); - //viewController->blockSignals(true); for (int i = 0; i < viewController->topLevelItemCount(); ++i) qDeleteAll(viewController->topLevelItem(i)->takeChildren()); viewController->clear(); - //viewController->blockSignals(false); - - //listController->clear(); - //category->clear(); - //sysexList->clear(); - - - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)sel->data(Qt::UserRole).value(); - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)sel->data(); - //instrument->setDirty(false); instrumentName->blockSignals(true); - //instrumentName->setText(instrument->iname()); instrumentName->setText(workingInstrument.iname()); instrumentName->blockSignals(false); @@ -1233,55 +1116,30 @@ void EditInstrument::changeInstrument() nullParamSpinBoxH->blockSignals(false); nullParamSpinBoxL->blockSignals(false); - //std::vector* pg = instrument->groups(); - //MusECore::PatchGroupList* pg = instrument->groups(); MusECore::PatchGroupList* pg = workingInstrument.groups(); - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { for (MusECore::ciPatchGroup g = pg->begin(); g != pg->end(); ++g) { MusECore::PatchGroup* pgp = *g; if(pgp) { - //QTreeWidgetItem* item = new QTreeWidgetItem; QTreeWidgetItem* item = new QTreeWidgetItem(patchView); - //item->setText(0, g->name); item->setText(0, pgp->name); - //QVariant v = QVariant::fromValue((void*)0); - //item->setData(0, Qt::UserRole, v); - //item->setData((void*)*g); - //item->setData((void*)0); - //item->setData((void*)&*g); - //item->setData((void*)pgp); QVariant v = qVariantFromValue((void*)(pgp)); item->setData(0, Qt::UserRole, v); - //patchView->addTopLevelItem(item); - //for (MusECore::ciPatch p = g->patches.begin(); p != g->patches.end(); ++p) for (MusECore::ciPatch p = pgp->patches.begin(); p != pgp->patches.end(); ++p) { - //const Patch& patch = *p; MusECore::Patch* patch = *p; if(patch) { - //QTreeWidgetItem* sitem = new QTreeWidgetItem; QTreeWidgetItem* sitem = new QTreeWidgetItem(item); - //printf("%s \n", qPrintable(patch->name)); - - //sitem->setText(0, patch.name); - //sitem->setText(0, p->name); sitem->setText(0, patch->name); - //QVariant v = QVariant::fromValue((void*)patch); - //sitem->setData(0, Qt::UserRole, v); - //sitem->setData((void*)&*p); - //sitem->setData((void*)patch); QVariant v = QVariant::fromValue((void*)patch); sitem->setData(0, Qt::UserRole, v); - //item->addChild(sitem); } } } } - //patchView->setSelected(patchView->item(0), true); oldPatchItem = 0; @@ -1289,20 +1147,20 @@ void EditInstrument::changeInstrument() if(fc) { // This may cause a patchChanged call. - //if(patchView->selectedItem() != fc) + //if(patchView->selectedItem() != fc) DELETETHIS patchView->blockSignals(true); fc->setSelected(true); patchView->blockSignals(false); //else - // patchChanged(); + // patchChanged(); DELETETHIS - //patchView->firstChild()->setSelected(true); + //patchView->firstChild()->setSelected(true); DELETETHIS //patchView->triggerUpdate(true); } patchChanged(); -// oldPatchItem = (ListViewData*)patchView->selectedItem(); +// oldPatchItem = (ListViewData*)patchView->selectedItem(); DELETETHIS //patchChanged(); // if(oldPatchItem) // { @@ -1317,7 +1175,7 @@ void EditInstrument::changeInstrument() MusECore::MidiControllerList* cl = workingInstrument.controller(); for (MusECore::ciMidiController ic = cl->begin(); ic != cl->end(); ++ic) { MusECore::MidiController* c = ic->second; - //QListWidgetItem* item = new QListWidgetItem(c->name()); + //QListWidgetItem* item = new QListWidgetItem(c->name()); DELETETHIS // ListBoxData* item = new ListBoxData(c->name()); //QVariant v = QVariant::fromValue((void*)c); //item->setData(Qt::UserRole, v); @@ -1328,7 +1186,7 @@ void EditInstrument::changeInstrument() } - //listController->setItemSelected(listController->item(0), true); + //listController->setItemSelected(listController->item(0), true); DELETETHIS // oldController = 0; @@ -1338,7 +1196,7 @@ void EditInstrument::changeInstrument() if(ci) { - // This may cause a controllerChanged call. + // This may cause a controllerChanged call. DELETETHIS //if(listController->selectedItem != ci) // listController->blockSignals(true); // listController->setSelected(ci, true); @@ -1353,13 +1211,13 @@ void EditInstrument::changeInstrument() controllerChanged(); - //oldController = (ListBoxData*)listController->selectedItem(); + //oldController = (ListBoxData*)listController->selectedItem(); DELETETHIS //controllerChanged(listController->item(0), 0); //controllerChanged(); -/* +/* DELETETHIS category->addItems(instrument->categories()); foreach(const SysEx* s, instrument->sysex()) { @@ -1411,25 +1269,17 @@ void EditInstrument::instrumentChanged() if(!sel) return; - //printf("instrument changed: %s\n", sel->text().toLatin1().constData()); - - //if (old) { - //if(oldMidiInstrument) - //{ MusECore::MidiInstrument* oi = 0; if(oldMidiInstrument) oi = (MusECore::MidiInstrument*)oldMidiInstrument->data(Qt::UserRole).value(); MusECore::MidiInstrument* wip = &workingInstrument; // Returns true if aborted. - //checkDirty(oi); - //if(checkDirty(oi)) if(checkDirty(wip)) { // No save was chosen. Abandon changes, or delete if it is new... if(oi) { oldMidiInstrument->setText(oi->iname()); - //wip->setText(oi->iname()); // No file path? Only a new unsaved instrument can do that. So delete it. if(oi->filePath().isEmpty()) @@ -1441,20 +1291,9 @@ void EditInstrument::instrumentChanged() } } - //else - //{ - // Save was chosen. - // if(oi) - // oi->assign(workingInstrument); - //} - - //oi->setDirty(false); - //wip->setDirty(false); workingInstrument.setDirty(false); - //} changeInstrument(); - } //--------------------------------------------------------- @@ -1462,9 +1301,7 @@ void EditInstrument::instrumentChanged() //--------------------------------------------------------- void EditInstrument::instrumentNameReturn() -//void EditInstrument::instrumentNameChanged(const QString& s) { - //instrumentNameChanged(instrumentName->text()); QListWidgetItem* item = instrumentList->currentItem(); if (item == 0) @@ -1482,7 +1319,6 @@ void EditInstrument::instrumentNameReturn() { instrumentName->blockSignals(true); // Grab the last valid name from the item text, since the instrument has not been updated yet. - //instrumentName->setText(curins->iname()); instrumentName->setText(item->text()); instrumentName->blockSignals(false); @@ -1497,16 +1333,9 @@ void EditInstrument::instrumentNameReturn() } } - //if (s != workingInstrument.iname()) { - item->setText(s); - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(); - //instrument->setDirty(true); - workingInstrument.setIName(s); - workingInstrument.setDirty(true); - //instrumentList->updateItem(item); - //instrumentList->update(); - // } + item->setText(s); + workingInstrument.setIName(s); + workingInstrument.setDirty(true); } //--------------------------------------------------------- @@ -1518,20 +1347,15 @@ void EditInstrument::deleteInstrument(QListWidgetItem* item) if(!item) return; - //ListBoxData* curritem = (ListBoxData*)instrumentList->selectedItem(); - MusECore::MidiInstrument* ins = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); - // Be kind to the list item, just in case we install a delete handler or something. - //item->setData(0); - // Delete the list item. // Test this: Is this going to change the current selection? instrumentList->blockSignals(true); delete item; instrumentList->blockSignals(false); - // Test this: Neccessary? + // Test this: Neccessary? DELETETHIS // if(curritem) // instrumentList->setCurrentItem(curritem); @@ -1619,7 +1443,6 @@ void EditInstrument::patchNameReturn() { patchNameEdit->blockSignals(true); // Grab the last valid name from the item text, since the patch has not been updated yet. - //patchNameEdit->setText(curp->name); patchNameEdit->setText(item->text(0)); patchNameEdit->blockSignals(false); @@ -1642,7 +1465,6 @@ void EditInstrument::patchNameReturn() { patchNameEdit->blockSignals(true); // Grab the last valid name from the item text, since the patch group has not been updated yet. - //patchNameEdit->setText(curpg->name); patchNameEdit->setText(item->text(0)); patchNameEdit->blockSignals(false); @@ -1661,6 +1483,7 @@ void EditInstrument::patchNameReturn() item->setText(0, s); workingInstrument.setDirty(true); + // DELETETHIS // Since the name of the patch/group in the working instrument will be updated later, // there's no need to do manually set the name here now. /* @@ -1696,15 +1519,8 @@ void EditInstrument::patchNameReturn() //--------------------------------------------------------- void EditInstrument::patchChanged() { - //if (old && old->data(0, Qt::UserRole).value()) { if(oldPatchItem) { - //QListWidgetItem* item = instrumentList->currentItem(); - //if (item == 0) - // return; - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); - //MusECore::Patch* p = (MusECore::Patch*)old->data(0, Qt::UserRole).value(); - //updatePatch(instrument, p); if(oldPatchItem->parent()) updatePatch(&workingInstrument, (MusECore::Patch*)oldPatchItem->data(0, Qt::UserRole).value()); else @@ -1746,12 +1562,10 @@ void EditInstrument::patchChanged() spinBoxHBank->setValue(hb); spinBoxLBank->setValue(lb); spinBoxProgram->setValue(pr); - //checkBoxDrum->setChecked(p->drumMap); checkBoxDrum->setChecked(p->drum); checkBoxGM->setChecked(p->typ & 1); checkBoxGS->setChecked(p->typ & 2); checkBoxXG->setChecked(p->typ & 4); - //category->setCurrentIndex(p->categorie); } else // The item is a patch group item. @@ -1782,10 +1596,7 @@ void EditInstrument::defPatchChanged(int) int val = getDefaultPatchNumber(); - //if(val == c->minVal() - 1) - // c->setInitVal(MusECore::CTRL_VAL_UNKNOWN); - //else - c->setInitVal(val); + c->setInitVal(val); setDefaultPatchName(val); @@ -1799,13 +1610,6 @@ void EditInstrument::defPatchChanged(int) void EditInstrument::patchButtonClicked() { - //MidiTrack* track = (MidiTrack*)selected; - //int channel = track->outChannel(); - //int port = track->outPort(); - //MusECore::MidiInstrument* instr = midiPorts[port].instrument(); - - //patchpopup->clear(); - QMenu* patchpopup = new QMenu; MusECore::PatchGroupList* pg = workingInstrument.groups(); @@ -1819,17 +1623,10 @@ void EditInstrument::patchButtonClicked() const MusECore::PatchList& pl = pgp->patches; for (MusECore::ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { const MusECore::Patch* mp = *ipl; - //if ((mp->typ & mask) && - // ((drum && songType != MT_GM) || - // (mp->drum == drumchan)) ) - - // { int id = ((mp->hbank & 0xff) << 16) + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); QAction *ac1 = pm->addAction(mp->name); - ac1->setData(id); - // } - + ac1->setData(id); } } } @@ -1838,12 +1635,10 @@ void EditInstrument::patchButtonClicked() const MusECore::PatchList& pl = pg->front()->patches; for (MusECore::ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { const MusECore::Patch* mp = *ipl; - //if (mp->typ & mask) { int id = ((mp->hbank & 0xff) << 16) + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); QAction *ac2 = patchpopup->addAction(mp->name); ac2->setData(id); - // } } } @@ -1865,8 +1660,6 @@ void EditInstrument::patchButtonClicked() if (rv != -1) { - //if(rv != workingInstrument. - setDefaultPatchControls(rv); QTreeWidgetItem* item = viewController->currentItem(); @@ -1896,7 +1689,6 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m QString def; int defval = mctrl->initVal(); int n = mctrl->num(); - //int h = (n >> 7) & 0x7f; int h = (n >> 8) & 0x7f; int l = n & 0x7f; if((n & 0xff) == 0xff) @@ -1906,8 +1698,6 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m switch(t) { case MusECore::MidiController::Controller7: - //case MusECore::MidiController::RPN: - //case MusECore::MidiController::NRPN: hnum = "---"; if(l == -1) lnum = "*"; @@ -1958,8 +1748,6 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m default: hnum = "---"; lnum = "---"; - //min.setNum(0); - //max.setNum(0); min = "---"; max = "---"; def = "---"; @@ -1967,12 +1755,8 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m } QTreeWidgetItem* ci = new QTreeWidgetItem(viewController, QStringList() << mctrl->name() << int2ctrlType(t) << hnum << lnum << min << max << def); - //ListViewData* ci = new ListViewData(viewController, mctrl->name(), int2ctrlType(t), - // hnum, lnum, min, max, def); - //ci->setData((void*)mctrl); QVariant v = qVariantFromValue((void*)(mctrl)); ci->setData(0, Qt::UserRole, v); - //setModified(true); return ci; } @@ -1983,29 +1767,13 @@ QTreeWidgetItem* EditInstrument::addControllerToView(MusECore::MidiController* m void EditInstrument::controllerChanged() { - //if (old) { -// if(oldController) -// { - //QListWidgetItem* item = instrumentList->currentItem(); - //if (item == 0) - // return; - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); - //MusECore::MidiController* oc = (MusECore::MidiController*)old->data(Qt::UserRole).value(); - //updateController(instrument, oc); -// updateController(&workingInstrument, (MusECore::MidiController*)oldController->data()); -// } - - // ListBoxData* sel = (ListBoxData*)listController->selectedItem(); - QTreeWidgetItem* sel = viewController->selectedItems().size() ? viewController->selectedItems()[0] : 0; -// oldController = sel; if(!sel || !sel->data(0, Qt::UserRole).value()) { ctrlName->blockSignals(true); ctrlName->setText(""); ctrlName->blockSignals(false); - //ctrlComment->setText(""); return; } @@ -2015,33 +1783,24 @@ void EditInstrument::controllerChanged() ctrlName->setText(c->name()); ctrlName->blockSignals(false); - //ctrlComment->setText(c->comment()); int ctrlH = (c->num() >> 8) & 0x7f; int ctrlL = c->num() & 0x7f; if((c->num() & 0xff) == 0xff) ctrlL = -1; - //int type = int(c->type()); MusECore::MidiController::ControllerType type = MusECore::midiControllerType(c->num()); - //ctrlType->setCurrentIndex(type); ctrlType->blockSignals(true); ctrlType->setCurrentIndex(type); ctrlType->blockSignals(false); - //ctrlTypeChanged(type); - spinBoxHCtrlNo->blockSignals(true); spinBoxLCtrlNo->blockSignals(true); spinBoxMin->blockSignals(true); spinBoxMax->blockSignals(true); spinBoxDefault->blockSignals(true); - //ctrlTypeChanged(type); - switch (type) { - //case MusECore::MidiController::RPN: - //case MusECore::MidiController::NRPN: case MusECore::MidiController::Controller7: spinBoxHCtrlNo->setEnabled(false); spinBoxLCtrlNo->setEnabled(true); @@ -2129,14 +1888,11 @@ void EditInstrument::controllerChanged() { spinBoxDefault->setRange(c->minVal() - 1, c->maxVal()); if(c->initVal() == MusECore::CTRL_VAL_UNKNOWN) - //spinBoxDefault->setValue(c->minVal() - 1); spinBoxDefault->setValue(spinBoxDefault->minimum()); else spinBoxDefault->setValue(c->initVal()); } - //moveWithPart->setChecked(c->moveWithPart()); - spinBoxHCtrlNo->blockSignals(false); spinBoxLCtrlNo->blockSignals(false); spinBoxMin->blockSignals(false); @@ -2149,7 +1905,6 @@ void EditInstrument::controllerChanged() //--------------------------------------------------------- void EditInstrument::ctrlNameReturn() -//void EditInstrument::ctrlNameChanged(const QString& s) { QTreeWidgetItem* item = viewController->currentItem(); @@ -2161,8 +1916,7 @@ void EditInstrument::ctrlNameReturn() if(c->name() == cName) return; - - //MusECore::MidiControllerList* cl = instrument->controller(); + MusECore::MidiControllerList* cl = workingInstrument.controller(); for(MusECore::ciMidiController ic = cl->begin(); ic != cl->end(); ++ic) { @@ -2186,8 +1940,6 @@ void EditInstrument::ctrlNameReturn() c->setName(ctrlName->text()); item->setText(COL_CNAME, ctrlName->text()); - //c->setName(s); - //item->setText(COL_CNAME, s); workingInstrument.setDirty(true); } @@ -2207,20 +1959,15 @@ void EditInstrument::ctrlTypeChanged(int idx) if(t == MusECore::midiControllerType(c->num())) return; - //if(item) - item->setText(COL_TYPE, ctrlType->currentText()); + item->setText(COL_TYPE, ctrlType->currentText()); int hnum = 0, lnum = 0; - //int rng = 0; - //int min = 0, max = 0; spinBoxMin->blockSignals(true); spinBoxMax->blockSignals(true); spinBoxDefault->blockSignals(true); switch (t) { - //case MusECore::MidiController::RPN: - //case MusECore::MidiController::NRPN: case MusECore::MidiController::Controller7: spinBoxHCtrlNo->setEnabled(false); spinBoxLCtrlNo->setEnabled(true); @@ -2236,22 +1983,17 @@ void EditInstrument::ctrlTypeChanged(int idx) spinBoxDefault->setValue(spinBoxDefault->minimum()); lnum = spinBoxLCtrlNo->value(); - //rng = 127; - //min = -128; - //max = 127; - //if(item) - //{ - //item->setText(COL_LNUM, QString().setNum(spinBoxLCtrlNo->value())); - if(lnum == -1) - item->setText(COL_LNUM, QString("*")); - else - item->setText(COL_LNUM, QString().setNum(lnum)); - item->setText(COL_HNUM, QString("---")); - item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); - item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); - item->setText(COL_DEF, QString("---")); - //} + + if(lnum == -1) + item->setText(COL_LNUM, QString("*")); + else + item->setText(COL_LNUM, QString().setNum(lnum)); + item->setText(COL_HNUM, QString("---")); + item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); + item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); + item->setText(COL_DEF, QString("---")); break; + case MusECore::MidiController::RPN: case MusECore::MidiController::NRPN: spinBoxHCtrlNo->setEnabled(true); @@ -2269,23 +2011,17 @@ void EditInstrument::ctrlTypeChanged(int idx) hnum = spinBoxHCtrlNo->value(); lnum = spinBoxLCtrlNo->value(); - //rng = 127; - //min = -128; - //max = 127; - //if(item) - //{ - //item->setText(COL_LNUM, QString().setNum(spinBoxLCtrlNo->value())); - //item->setText(COL_HNUM, QString().setNum(spinBoxHCtrlNo->value())); - if(lnum == -1) - item->setText(COL_LNUM, QString("*")); - else - item->setText(COL_LNUM, QString().setNum(lnum)); - item->setText(COL_HNUM, QString().setNum(hnum)); - item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); - item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); - item->setText(COL_DEF, QString("---")); - //} + + if(lnum == -1) + item->setText(COL_LNUM, QString("*")); + else + item->setText(COL_LNUM, QString().setNum(lnum)); + item->setText(COL_HNUM, QString().setNum(hnum)); + item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); + item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); + item->setText(COL_DEF, QString("---")); break; + case MusECore::MidiController::Controller14: case MusECore::MidiController::RPN14: case MusECore::MidiController::NRPN14: @@ -2304,23 +2040,16 @@ void EditInstrument::ctrlTypeChanged(int idx) hnum = spinBoxHCtrlNo->value(); lnum = spinBoxLCtrlNo->value(); - //rng = 16383; - //min = -16384; - //max = 16383; - //if(item) - //{ - //item->setText(COL_LNUM, QString().setNum(spinBoxLCtrlNo->value())); - //item->setText(COL_HNUM, QString().setNum(spinBoxHCtrlNo->value())); - if(lnum == -1) - item->setText(COL_LNUM, QString("*")); - else - item->setText(COL_LNUM, QString().setNum(lnum)); - item->setText(COL_HNUM, QString().setNum(hnum)); - item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); - item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); - item->setText(COL_DEF, QString("---")); - //} + if(lnum == -1) + item->setText(COL_LNUM, QString("*")); + else + item->setText(COL_LNUM, QString().setNum(lnum)); + item->setText(COL_HNUM, QString().setNum(hnum)); + item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); + item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); + item->setText(COL_DEF, QString("---")); break; + case MusECore::MidiController::Pitch: spinBoxHCtrlNo->setEnabled(false); spinBoxLCtrlNo->setEnabled(false); @@ -2335,18 +2064,13 @@ void EditInstrument::ctrlTypeChanged(int idx) spinBoxDefault->setRange(spinBoxMin->value() - 1, spinBoxMax->value()); spinBoxDefault->setValue(spinBoxDefault->minimum()); - //rng = 8191; - //min = -8192; - //max = 8191; - //if(item) - //{ item->setText(COL_LNUM, QString("---")); item->setText(COL_HNUM, QString("---")); item->setText(COL_MIN, QString().setNum(spinBoxMin->value())); item->setText(COL_MAX, QString().setNum(spinBoxMax->value())); item->setText(COL_DEF, QString("---")); - //} break; + case MusECore::MidiController::Program: spinBoxHCtrlNo->setEnabled(false); spinBoxLCtrlNo->setEnabled(false); @@ -2361,17 +2085,13 @@ void EditInstrument::ctrlTypeChanged(int idx) spinBoxDefault->setRange(0, 0); spinBoxDefault->setValue(0); - //if(item) - //{ item->setText(COL_LNUM, QString("---")); item->setText(COL_HNUM, QString("---")); item->setText(COL_MIN, QString("---")); item->setText(COL_MAX, QString("---")); - - //item->setText(COL_DEF, QString("0-0-0")); item->setText(COL_DEF, QString("---")); - //} break; + // Shouldn't happen... default: spinBoxHCtrlNo->setEnabled(false); @@ -2411,7 +2131,7 @@ void EditInstrument::ctrlTypeChanged(int idx) } - /* + /* DELETETHIS if(rng != 0) { @@ -2500,7 +2220,6 @@ void EditInstrument::ctrlHNumChanged(int val) QString s; s.setNum(val); MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value(); - //int n = c->num() & 0xff; int n = c->num() & 0x7fff00ff; c->setNum(n | ((val & 0xff) << 8)); item->setText(COL_HNUM, s); @@ -2518,7 +2237,6 @@ void EditInstrument::ctrlLNumChanged(int val) if (item == 0) return; MusECore::MidiController* c = (MusECore::MidiController*)item->data(0, Qt::UserRole).value(); - //int n = c->num() & 0xff00; int n = c->num() & ~0xff; c->setNum(n | (val & 0xff)); if(val == -1) @@ -2551,7 +2269,6 @@ void EditInstrument::ctrlMinChanged(int val) c->setMinVal(val); int rng = 0; - //switch((MusECore::MidiController::ControllerType)ctrlType->currentItem()) switch(MusECore::midiControllerType(c->num())) { case MusECore::MidiController::Controller7: @@ -2571,7 +2288,6 @@ void EditInstrument::ctrlMinChanged(int val) int mx = c->maxVal(); - //if(val > item->text(COL_MAX).toInt()) if(val > mx) { c->setMaxVal(val); @@ -2637,7 +2353,6 @@ void EditInstrument::ctrlMaxChanged(int val) c->setMaxVal(val); int rng = 0; - //switch((MusECore::MidiController::ControllerType)ctrlType->currentItem()) switch(MusECore::midiControllerType(c->num())) { case MusECore::MidiController::Controller7: @@ -2657,7 +2372,6 @@ void EditInstrument::ctrlMaxChanged(int val) int mn = c->minVal(); - //if(val < item->text(COL_MIN).toInt()) if(val < mn) { c->setMinVal(val); @@ -2798,49 +2512,23 @@ void EditInstrument::ctrlNullParamLChanged(int nvl) void EditInstrument::deletePatchClicked() { - //QListWidgetItem* item = instrumentList->currentItem(); -// ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); -// if (item == 0) -// return; - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); -// MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(); - //QTreeWidgetItem* pi = patchView->currentItem(); QTreeWidgetItem* pi = patchView->currentItem(); if (pi == 0) return; - //void* p = pi->data(0, Qt::UserRole).value(); -// MusECore::Patch* patch = (MusECore::Patch*)pi->data(); - //if (p == 0) - // If patch is zero it's a patch group. -// if(patch == 0) - // If the item has a parent item, it's a patch item... if(pi->parent()) { - MusECore::PatchGroup* group = (MusECore::PatchGroup*)(pi->parent())->data(0, Qt::UserRole).value(); + MusECore::PatchGroup* group = (MusECore::PatchGroup*)(pi->parent())->data(0, Qt::UserRole).value(); // If there is an allocated patch in the data, delete it. - //MusECore::Patch* patch = (MusECore::Patch*)pi->auxData(); MusECore::Patch* patch = (MusECore::Patch*)pi->data(0, Qt::UserRole).value(); if(patch) { if(group) - { - //for(iPatch ip = group->patches.begin(); ip != group->patches.end(); ++ip) - // if(&*ip == patch) - // if(*ip == patch) - // { - // - // printf("deletePatchClicked: erasing patch\n"); - // - // group->patches.erase(ip); - // break; - // } - //group->patches.remove( (const Patch&)(*patch) ); group->patches.remove(patch); - } + delete patch; } } @@ -2848,19 +2536,14 @@ void EditInstrument::deletePatchClicked() // The item has no parent item, it's a patch group item... { // Is there an allocated patch group in the data? - //MusECore::PatchGroup* group = (MusECore::PatchGroup*)pi->auxData(); MusECore::PatchGroup* group = (MusECore::PatchGroup*)pi->data(0, Qt::UserRole).value(); if(group) { MusECore::PatchGroupList* pg = workingInstrument.groups(); - //for(MusECore::ciPatchGroup ipg = pg->begin(); ipg != pg->end(); ++ipg) for(MusECore::iPatchGroup ipg = pg->begin(); ipg != pg->end(); ++ipg) { - //printf("deletePatchClicked: working patch group name:%s ad:%X group name:%s ad:%X\n", (*ipg)->name.toLatin1().constData(), (unsigned int)(*ipg), group->name.toLatin1().constData(), (unsigned int) group); - - //if(&*ipg == group) if(*ipg == group) { pg->erase(ipg); @@ -2868,43 +2551,20 @@ void EditInstrument::deletePatchClicked() } } - // Iterate all child list view (patch) items. Find and delete any allocated patches in the items' data. -// for(ListViewData* i = (ListViewData*)pi->firstChild(); i; i = (ListViewData*)i->nextSibling()) -// { - //MusECore::Patch* patch = (MusECore::Patch*)i->auxData(); -// MusECore::Patch* patch = (MusECore::Patch*)i->data(); -// if(patch) -// { - //delete patch; - //group->patches.remove(*patch); const MusECore::PatchList& pl = group->patches; for(MusECore::ciPatch ip = pl.begin(); ip != pl.end(); ++ip) { -// if(&*ip == patch) -// { -// group->patches.erase(ip); -// break; -// } - // Delete the patch. if(*ip) delete *ip; } - //group->patches.clear(); - -// } -// } - // Now delete the group. delete group; } } - //oldPatchItem = (ListViewData*)patchView->selectedItem(); - //oldPatchItem = 0; - // Now delete the patch or group item (and any child patch items) from the list view tree. // !!! This will trigger a patchChanged call. patchView->blockSignals(true); @@ -2916,24 +2576,6 @@ void EditInstrument::deletePatchClicked() oldPatchItem = 0; patchChanged(); - //MusECore::Patch* patch = (MusECore::Patch*)p; - - //std::vector* pg = instrument->groups(); - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { - // for (MusECore::iPatch p = g->patches.begin(); p != g->patches.end(); ++p) { - // if (patch == *p) { - // g->patches.erase(p); - // delete pi; - // instrument->setDirty(true); - // return; - // } - // } - // } - //printf("fatal: patch not found\n"); - //delete patch; - //delete pi; - - workingInstrument.setDirty(true); } @@ -2943,11 +2585,6 @@ void EditInstrument::deletePatchClicked() void EditInstrument::newPatchClicked() { - //QListWidgetItem* item = instrumentList->currentItem(); -// ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); -// if (item == 0) -// return; - if(oldPatchItem) { if(oldPatchItem->parent()) @@ -2955,23 +2592,16 @@ void EditInstrument::newPatchClicked() else updatePatchGroup(&workingInstrument, (MusECore::PatchGroup*)oldPatchItem->data(0, Qt::UserRole).value()); } - - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); -// MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(); - //std::vector* pg = instrument->groups(); -// MusECore::PatchGroupList* pg = instrument->groups(); + MusECore::PatchGroupList* pg = workingInstrument.groups(); QString patchName; for (int i = 1;; ++i) { patchName = QString("Patch-%1").arg(i); bool found = false; - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { for (MusECore::iPatchGroup g = pg->begin(); g != pg->end(); ++g) { MusECore::PatchGroup* pgp = *g; - //for (MusECore::iPatch p = g->patches.begin(); p != g->patches.end(); ++p) { for (MusECore::iPatch p = pgp->patches.begin(); p != pgp->patches.end(); ++p) { - //if (p->name == patchName) { if ((*p)->name == patchName) { found = true; break; @@ -2984,20 +2614,12 @@ void EditInstrument::newPatchClicked() break; } - // // search current patch group - // - //MusECore::PatchGroup* pGroup = 0; - //QTreeWidgetItem* pi = patchView->currentItem(); QTreeWidgetItem* pi = patchView->currentItem(); if (pi == 0) return; - // If there is data then pi is a patch item, and there must be a parent patch group item (with null data). - //if (pi->data(0, Qt::UserRole).value()) - //if (pi->data()) - MusECore::Patch* selpatch = 0; // If there is a parent item then pi is a patch item, and there must be a parent patch group item. @@ -3013,17 +2635,6 @@ void EditInstrument::newPatchClicked() if(!group) return; - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { -// for (MusECore::ciPatchGroup g = pg->begin(); g != pg->end(); ++g) { -// if (g->name == pi->text(0)) { -// pGroup = &*g; -// break; -// } -// } -// if (pGroup == 0) { -// printf("group not found\n"); -// return; -// } // Create a new Patch, then store its pointer in a new patch item, // to be added later to the patch group only upon save... @@ -3062,10 +2673,10 @@ void EditInstrument::newPatchClicked() for(MusECore::iPatchGroup g = pg->begin(); g != pg->end(); ++g) { - MusECore::PatchGroup* pgp = *g; + MusECore::PatchGroup* pgp = *g; for(MusECore::iPatch ip = pgp->patches.begin(); ip != pgp->patches.end(); ++ip) { - MusECore::Patch* p = *ip; + MusECore::Patch* p = *ip; if((p->prog == ((prg + i) & 0x7f)) && ((p->lbank == -1 && lb == -1) || (p->lbank == ((lb + j) & 0x7f))) && ((p->hbank == -1 && hb == -1) || (p->hbank == ((hb + k) & 0x7f)))) @@ -3091,8 +2702,6 @@ void EditInstrument::newPatchClicked() else patch->hbank = (hb + k) & 0x7f; - //patch->typ = selpatch->typ; - //patch->drum = selpatch->drum; break; } @@ -3107,34 +2716,14 @@ void EditInstrument::newPatchClicked() patch->name = patchName; group->patches.push_back(patch); - //MusECore::Patch* pp = &(group->patches.back()); - - //QTreeWidgetItem* sitem = new QTreeWidgetItem; + QTreeWidgetItem* sitem = new QTreeWidgetItem(pi); - //sitem->setText(0, patch->name); sitem->setText(0, patchName); patchNameEdit->setText(patchName); - //QVariant v = QVariant::fromValue((void*)(patch)); - //sitem->setData(0, Qt::UserRole, v); - - // Set the list view item's data. - //sitem->setData((void*)patch); QVariant v = qVariantFromValue((void*)(patch)); sitem->setData(0, Qt::UserRole, v); - //sitem->setAuxData((void*)patch); - //sitem->setData((void*)pp); - - //pi->addChild(sitem); - - //printf("newPatchClicked: before patchView->setCurrentItem\n"); - - //patchView->setCurrentItem(sitem); - - //printf("newPatchClicked: after patchView->setCurrentItem\n"); - - //oldPatchItem = 0; // May cause patchChanged call. patchView->blockSignals(true); @@ -3142,10 +2731,6 @@ void EditInstrument::newPatchClicked() patchView->scrollToItem((QTreeWidgetItem*)sitem, QAbstractItemView::EnsureVisible); patchView->blockSignals(false); - //oldPatchItem = (ListViewData*)patchView->selectedItem(); - //oldPatchItem = sitem; - //oldPatchItem = 0; - spinBoxHBank->setEnabled(true); spinBoxLBank->setEnabled(true); spinBoxProgram->setEnabled(true); @@ -3157,7 +2742,6 @@ void EditInstrument::newPatchClicked() oldPatchItem = 0; patchChanged(); - //instrument->setDirty(true); workingInstrument.setDirty(true); } @@ -3167,11 +2751,6 @@ void EditInstrument::newPatchClicked() void EditInstrument::newGroupClicked() { - //QListWidgetItem* item = instrumentList->currentItem(); -// ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); -// if (item == 0) -// return; - if(oldPatchItem) { if(oldPatchItem->parent()) @@ -3180,19 +2759,13 @@ void EditInstrument::newGroupClicked() updatePatchGroup(&workingInstrument, (MusECore::PatchGroup*)oldPatchItem->data(0, Qt::UserRole).value()); } - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); -// MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(); - //std::vector* pg = instrument->groups(); -// MusECore::PatchGroupList* pg = instrument->groups(); MusECore::PatchGroupList* pg = workingInstrument.groups(); QString groupName; for (int i = 1;; ++i) { groupName = QString("Group-%1").arg(i); bool found = false; - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { for (MusECore::ciPatchGroup g = pg->begin(); g != pg->end(); ++g) { - //if (g->name == groupName) { if ((*g)->name == groupName) { found = true; break; @@ -3206,40 +2779,25 @@ void EditInstrument::newGroupClicked() // to be added later to the instrument only upon save... MusECore::PatchGroup* group = new MusECore::PatchGroup; group->name = groupName; - //MusECore::PatchGroup group; - //group.name = groupName; pg->push_back(group); - //MusECore::PatchGroup* pgp = &(pg->back()); QTreeWidgetItem* sitem = new QTreeWidgetItem(patchView); sitem->setText(0, groupName); patchNameEdit->setText(groupName); - //QVariant v = QVariant::fromValue((void*)0); - //sitem->setData(0, Qt::UserRole, v); - //sitem->setData((void*)0); - // Set the list view item's data. QVariant v = qVariantFromValue((void*)(group)); sitem->setData(0, Qt::UserRole, v); //sitem->setAuxData((void*)pgp); - //patchView->addTopLevelItem(sitem); - //patchView->setCurrentItem(sitem); - - //oldPatchItem = 0; - // May cause patchChanged call. patchView->blockSignals(true); sitem->setSelected(true); patchView->blockSignals(false); - //oldPatchItem = (ListViewData*)patchView->selectedItem(); oldPatchItem = sitem; - //oldPatchItem = 0; - //patchChanged(); spinBoxHBank->setEnabled(false); spinBoxLBank->setEnabled(false); @@ -3249,7 +2807,6 @@ void EditInstrument::newGroupClicked() checkBoxGS->setEnabled(false); checkBoxXG->setEnabled(false); - //instrument->setDirty(true); workingInstrument.setDirty(true); } @@ -3259,21 +2816,10 @@ void EditInstrument::newGroupClicked() void EditInstrument::deleteControllerClicked() { - //QListWidgetItem* item = instrumentList->currentItem(); - //ListBoxData* item = (ListBoxData*)instrumentList->selectedItem(); - //QListWidgetItem* item2 = listController->currentItem(); -// ListBoxData* item = (ListBoxData*)listController->selectedItem(); QTreeWidgetItem* item = viewController->currentItem(); - //if (item == 0 || item2 == 0) if(!item) return; - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); -// MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(); - //MusECore::MidiController* ctrl = (MusECore::MidiController*)item2->data(Qt::UserRole).value(); - //MusECore::MidiController* ctrl = (MusECore::MidiController*)item2->data(); - //MusECore::MidiControllerList* cl = instrument->controller(); - //cl->removeAll(ctrl); MusECore::MidiController* ctrl = (MusECore::MidiController*)item->data(0, Qt::UserRole).value(); if(!ctrl) @@ -3285,20 +2831,14 @@ void EditInstrument::deleteControllerClicked() // Now remove the controller item from the list. // This may cause a controllerChanged call. -// listController->blockSignals(true); viewController->blockSignals(true); delete item; if(viewController->currentItem()) viewController->currentItem()->setSelected(true); -// listController->blockSignals(false); viewController->blockSignals(false); - //oldController = (ListBoxData*)listController->selectedItem(); -// oldController = 0; - controllerChanged(); - //instrument->setDirty(true); workingInstrument.setDirty(true); } @@ -3307,20 +2847,10 @@ void EditInstrument::deleteControllerClicked() //--------------------------------------------------------- void EditInstrument::newControllerClicked() - { - //QListWidgetItem* item = instrumentList->currentItem(); - //if (item == 0) - // return; - //MusECore::MidiInstrument* instrument = (MusECore::MidiInstrument*)item->data(Qt::UserRole).value(); - -// if(oldController) -// updateController(&workingInstrument, (MusECore::MidiController*)oldController->data()); - + { QString cName; - //MusECore::MidiControllerList* cl = instrument->controller(); MusECore::MidiControllerList* cl = workingInstrument.controller(); for (int i = 1;; ++i) { - //ctrlName = QString("Controller-%d").arg(i); cName = QString("Controller-%1").arg(i); bool found = false; for (MusECore::iMidiController ic = cl->begin(); ic != cl->end(); ++ic) { @@ -3348,17 +2878,12 @@ void EditInstrument::newControllerClicked() if(ci) { MusECore::MidiController* selctl = (MusECore::MidiController*)ci->data(0, Qt::UserRole).value(); - // Assign. - // *ctrl = *selctl; // Auto increment controller number. - //int l = ctrl->num() & 0x7f; - //int h = ctrl->num() & 0xffffff00; int l = selctl->num() & 0x7f; int h = selctl->num() & 0xffffff00; // Ignore internal controllers and wild cards. - //if(((h & 0xff0000) != 0x40000) && ((ctrl->num() & 0xff) != 0xff)) if(((h & 0xff0000) != 0x40000) && ((selctl->num() & 0xff) != 0xff)) { // Assign. @@ -3366,8 +2891,6 @@ void EditInstrument::newControllerClicked() for (int i = 1; i < 128; ++i) { - //ctrlName = QString("Controller-%d").arg(i); - //cName = QString("Controller-%1").arg(i); int j = ((i + l) & 0x7f) | h; found = false; for (MusECore::iMidiController ic = cl->begin(); ic != cl->end(); ++ic) @@ -3390,34 +2913,15 @@ void EditInstrument::newControllerClicked() ctrl->setName(cName); - //item = new QListWidgetItem(ctrlName); -// ListBoxData* item = new ListBoxData(ctrlName); - - //QVariant v = qVariantFromValue((void*)(ctrl)); - //item->setData(Qt::UserRole, v); -// item->setData((void*)ctrl); - //listController->addItem(item); -// listController->insertItem(item); - //listController->setCurrentItem(item); - workingInstrument.controller()->add(ctrl); QTreeWidgetItem* item = addControllerToView(ctrl); -// listController->blockSignals(true); -// listController->setSelected(item, true); -// listController->blockSignals(false); viewController->blockSignals(true); item->setSelected(true); viewController->blockSignals(false); - //oldController = (ListBoxData*)listController->selectedItem(); -// oldController = item; - //oldController = 0; - // MidiController is a class, with itialized values. We have to call this to show the values. - // To make multiple entries easier, don't bother calling this. controllerChanged(); - - //instrument->setDirty(true); + workingInstrument.setDirty(true); } @@ -3427,12 +2931,6 @@ void EditInstrument::newControllerClicked() void EditInstrument::addControllerClicked() { - //int lnum = listController->currentItem(); - //if(lnum == -1) - // return; - - //QString name = midiCtrlName(lnum); - QListWidgetItem* idx = listController->currentItem(); if(idx == 0) return; @@ -3504,7 +3002,7 @@ void EditInstrument::addControllerClicked() workingInstrument.setDirty(true); } -/* +/* DELETETHIS or later needed??? //--------------------------------------------------------- // deleteSysexClicked //--------------------------------------------------------- @@ -3562,8 +3060,6 @@ void EditInstrument::updatePatch(MusECore::MidiInstrument* instrument, MusECore: } signed char hb = (spinBoxHBank->value() - 1) & 0xff; - //if (p->hbank != (spinBoxHBank->value() & 0xff)) { - // p->hbank = spinBoxHBank->value() & 0xff; if (p->hbank != hb) { p->hbank = hb; @@ -3571,8 +3067,6 @@ void EditInstrument::updatePatch(MusECore::MidiInstrument* instrument, MusECore: } signed char lb = (spinBoxLBank->value() - 1) & 0xff; - //if (p->lbank != (spinBoxLBank->value() & 0xff)) { - // p->lbank = spinBoxLBank->value() & 0xff; if (p->lbank != lb) { p->lbank = lb; @@ -3609,14 +3103,9 @@ void EditInstrument::updatePatch(MusECore::MidiInstrument* instrument, MusECore: p->typ = value; instrument->setDirty(true); } - - //if (p->categorie != category->currentIndex()) { - // p->categorie = category->currentIndex(); - // instrument->setDirty(true); - // } } -/* +/* DELETETHIS //--------------------------------------------------------- // updateController //--------------------------------------------------------- @@ -3704,38 +3193,10 @@ void EditInstrument::updateController(MusECore::MidiInstrument* instrument, MusE void EditInstrument::updateInstrument(MusECore::MidiInstrument* instrument) { - //QListWidgetItem* sysexItem = sysexList->currentItem(); - //ListBoxData* sysexItem = sysexList->currentItem(); - //if (sysexItem) { - // SysEx* so = (SysEx*)sysexItem->data(Qt::UserRole).value(); - // updateSysex(instrument, so); - // } - - //QListWidgetItem* ctrlItem = listController->currentItem(); - //ListBoxData* ctrlItem = (ListBoxData*)listController->currentItem(); - //ListBoxData* ctrlItem = (ListBoxData*)listController->selectedItem(); -// ListViewData* ctrlItem = (ListViewData*)viewController->selectedItem(); - -// if (ctrlItem) { - //MusECore::MidiController* ctrl = (MusECore::MidiController*)ctrlItem->data(Qt::UserRole).value(); - -// printf("updateInstrument: AB\n"); - -// MusECore::MidiController* ctrl = (MusECore::MidiController*)ctrlItem->data(); - -// printf("updateInstrument: AC\n"); - -// updateController(instrument, ctrl); -// } - -// printf("updateInstrument: B\n"); - QTreeWidgetItem* patchItem = patchView->currentItem(); if (patchItem) { - //MusECore::Patch* p = (MusECore::Patch*)patchItem->data(0, Qt::UserRole).value(); - // If the item has a parent, it's a patch item. if(patchItem->parent()) updatePatch(instrument, (MusECore::Patch*)patchItem->data(0, Qt::UserRole).value()); @@ -3754,8 +3215,8 @@ int EditInstrument::checkDirty(MusECore::MidiInstrument* i, bool isClose) { updateInstrument(i); if (!i->dirty()) - //return false; return 0; + int n; if(isClose) n = QMessageBox::warning(this, tr("MusE"), @@ -3770,18 +3231,13 @@ int EditInstrument::checkDirty(MusECore::MidiInstrument* i, bool isClose) if (n == 0) { if (i->filePath().isEmpty()) { - //fileSaveAs(); saveAs(); } else { - //QFile f(i->filePath()); - //if (!f.open(QIODevice::WriteOnly)) FILE* f = fopen(i->filePath().toLatin1().constData(), "w"); if(f == 0) - //fileSaveAs(); saveAs(); else { - //f.close(); if(fclose(f) != 0) printf("EditInstrument::checkDirty: Error closing file\n"); @@ -3789,10 +3245,8 @@ int EditInstrument::checkDirty(MusECore::MidiInstrument* i, bool isClose) i->setDirty(false); } } - //return false; return 0; } - //return n == 2; return n; } @@ -3899,7 +3353,7 @@ void EditInstrument::setDefaultPatchNumbers(int val) defPatchH->blockSignals(true); defPatchL->blockSignals(true); defPatchProg->blockSignals(true); - defPatchH->setValue(hb); + defPatchH->setValue(hb); defPatchL->setValue(lb); defPatchProg->setValue(pr); defPatchH->blockSignals(false); @@ -3927,8 +3381,6 @@ QString EditInstrument::getPatchName(int prog) if(prog == MusECore::CTRL_VAL_UNKNOWN || pr == 0xff) return "---"; - //int hbank = (prog >> 16) & 0x7f; - //int lbank = (prog >> 8) & 0x7f; int hbank = (prog >> 16) & 0xff; int lbank = (prog >> 8) & 0xff; @@ -3938,9 +3390,9 @@ QString EditInstrument::getPatchName(int prog) const MusECore::PatchList& pl = (*i)->patches; for (MusECore::ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { const MusECore::Patch* mp = *ipl; - if (//(mp->typ & tmask) && + if (//(mp->typ & tmask) && DELETETHIS (pr == mp->prog) - //&& ((drum && mode != MT_GM) || + //&& ((drum && mode != MT_GM) || DELETETHIS // (mp->drum == drumchan)) //&& (hbank == mp->hbank || !hb || mp->hbank == -1) diff --git a/muse2/muse/instruments/editinstrument.h b/muse2/muse/instruments/editinstrument.h index ab5edf39..187f1989 100644 --- a/muse2/muse/instruments/editinstrument.h +++ b/muse2/muse/instruments/editinstrument.h @@ -87,7 +87,6 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase { void tabChanged(QWidget*); void patchChanged(); void controllerChanged(); - //void instrumentNameChanged(const QString&); void instrumentNameReturn(); void patchNameReturn(); void deletePatchClicked(); @@ -95,19 +94,17 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase { void newGroupClicked(); void patchButtonClicked(); void defPatchChanged(int); - //void newCategoryClicked(); void deleteControllerClicked(); void newControllerClicked(); void addControllerClicked(); void ctrlTypeChanged(int); - //void ctrlNameChanged(const QString&); void ctrlNameReturn(); void ctrlHNumChanged(int); void ctrlLNumChanged(int); void ctrlMinChanged(int); void ctrlMaxChanged(int); void ctrlDefaultChanged(int); - //void sysexChanged(); + //void sysexChanged(); DELETETHIS? //void deleteSysexClicked(); //void newSysexClicked(); void ctrlNullParamHChanged(int); diff --git a/muse2/muse/instruments/midictrledit.cpp b/muse2/muse/instruments/midictrledit.cpp index a9ca6383..44f1a150 100644 --- a/muse2/muse/instruments/midictrledit.cpp +++ b/muse2/muse/instruments/midictrledit.cpp @@ -146,19 +146,12 @@ void MidiControllerEditDialog::songChanged(int flags) return; if(flags & (SC_CONFIG | SC_MIDI_CONTROLLER)) - //if(flags & (SC_CONFIG | SC_MIDI_CONTROLLER_ADD)) { - //listController->blockSignals(true); midiPortsList->blockSignals(true); - //viewController->blockSignals(true); updatePredefinedList(); updateMidiPortsList(); updateViewController(); - //viewController->setCurrentItem(viewController->firstChild()); - //controllerChanged(viewController->currentItem()); - //listController->blockSignals(false); midiPortsList->blockSignals(false); - //viewController->blockSignals(false); } } @@ -199,18 +192,11 @@ void MidiControllerEditDialog::updateMidiPortsList() void MidiControllerEditDialog::updateViewController() { - //for (iMidiController i = midiControllerList.begin(); - // i != midiControllerList.end(); ++i) { - // addControllerToView(&*i); int mpidx = midiPortsList->currentItem(); viewController->clear(); - //MidiControllerList* mcl; MidiInstrument* mi = midiPorts[mpidx].instrument(); - //if(mi) MidiControllerList* mcl = mi->controller(); - //else - // mcl = &defaultMidiController; for (iMidiController i = mcl->begin(); i != mcl->end(); ++i) addControllerToView(*i); @@ -249,15 +235,6 @@ void MidiControllerEditDialog::setModified(bool v) void MidiControllerEditDialog::reject() { - //MidiControllerList* mcl; -// MidiInstrument* mi = midiPorts[mpidx].instrument(); - //if(mi) -// MidiControllerList* mcl = mi->controller(); - //else - // mcl = &defaultMidiController; -// for (iMidiController i = mcl->begin(); i != mcl->end(); ++i) -// addControllerToView(*i); - // Restore the list before closing this dialog. updateViewController(); //setModified(false); @@ -272,12 +249,8 @@ void MidiControllerEditDialog::reject() void MidiControllerEditDialog::apply() { int mpidx = midiPortsList->currentItem(); - //MidiControllerList* mcl; MidiInstrument* mi = midiPorts[mpidx].instrument(); - //if(mi) MidiControllerList* mcl = mi->controller(); - //else - // mcl = &defaultMidiController; mcl->clear(); @@ -336,9 +309,6 @@ void MidiControllerEditDialog::apply() item = item->nextSibling(); } - // Update the list before closing this dialog. - //updateViewController(); - //setModified(false); MusEGlobal::song->update(SC_CONFIG | SC_MIDI_CONTROLLER); } @@ -442,14 +412,14 @@ void MidiControllerEditDialog::portChanged(int n) return; _lastPort = n; - //listController->blockSignals(true); + //listController->blockSignals(true); DELETETHIS //midiPortsList->blockSignals(true); //viewController->blockSignals(true); //updatePredefinedList(); //updateMidiPortsList(); //reject(); // populate list updateViewController(); - //viewController->setCurrentItem(viewController->firstChild()); + //viewController->setCurrentItem(viewController->firstChild()); DELETETHIS //controllerChanged(viewController->currentItem()); //listController->blockSignals(false); //midiPortsList->blockSignals(false); diff --git a/muse2/muse/instruments/minstrument.cpp b/muse2/muse/instruments/minstrument.cpp index bbb2a076..5d578803 100644 --- a/muse2/muse/instruments/minstrument.cpp +++ b/muse2/muse/instruments/minstrument.cpp @@ -26,14 +26,13 @@ #include #include #include -//#include #include #include "minstrument.h" #include "midiport.h" -#include "mididev.h" // p4.0.15 -#include "audio.h" // p4.0.15 -#include "midi.h" // p4.0.15 +#include "mididev.h" +#include "audio.h" +#include "midi.h" #include "globals.h" #include "xml.h" #include "event.h" @@ -153,7 +152,7 @@ static void readEventList(Xml& xml, EventList* el, const char* name) static void loadIDF(QFileInfo* fi) { -/* +/* DELETETHIS QFile qf(fi->filePath()); if (!qf.open(IO_ReadOnly)) { printf("cannot open file %s\n", fi->fileName().toLatin1()); @@ -282,7 +281,7 @@ void initMidiInstruments() ++it; } } - //else + //else DELETETHIS //{ // if(usrInstrumentsDir.mkdir(MusEGlobal::museUserInstruments)) // printf("Created user instrument directory: %s\n", MusEGlobal::museUserInstruments.toLatin1()); @@ -416,8 +415,7 @@ MidiInstrument::~MidiInstrument() } - -/* +/* DELETETHIS //--------------------------------------------------------- // uniqueCopy //--------------------------------------------------------- @@ -465,7 +463,6 @@ MidiInstrument& MidiInstrument::assign(const MidiInstrument& ins) _nullvalue = ins._nullvalue; // Assignment - // *_controller = *(ins._controller); for(ciMidiController i = ins._controller->begin(); i != ins._controller->end(); ++i) { MidiController* mc = i->second; @@ -473,7 +470,7 @@ MidiInstrument& MidiInstrument::assign(const MidiInstrument& ins) } // pg.clear(); -// for(iPatchGroup ipg = pg.begin(); ipg != pg.end(); ++ipg) +// for(iPatchGroup ipg = pg.begin(); ipg != pg.end(); ++ipg) DELETETHIS // { //ipg->patches.clear(); @@ -498,7 +495,6 @@ MidiInstrument& MidiInstrument::assign(const MidiInstrument& ins) pg.clear(); // Assignment -// pg = ins.pg; for(ciPatchGroup g = ins.pg.begin(); g != ins.pg.end(); ++g) { PatchGroup* pgp = *g; @@ -527,7 +523,7 @@ MidiInstrument& MidiInstrument::assign(const MidiInstrument& ins) - // Hmm, dirty, yes? But init sets it to false... + // Hmm, dirty, yes? But init sets it to false... DELETETHIS //_dirty = ins._dirty; //_dirty = false; //_dirty = true; @@ -543,18 +539,13 @@ MidiInstrument& MidiInstrument::assign(const MidiInstrument& ins) void MidiInstrument::reset(int portNo, MType) { MusECore::MidiPort* port = &MusEGlobal::midiPorts[portNo]; - //if (port == 0) - // return; if(port->device() == 0) // p4.0.15 - { - //printf("MidiInstrument::reset port device is 0\n"); return; - } + MusECore::MidiPlayEvent ev; ev.setType(0x90); ev.setPort(portNo); ev.setTime(0); // p4.0.15 - //ev.setTime(audio->getFrameOffset() + audio->pos().frame()); for (int chan = 0; chan < MIDI_CHANNELS; ++chan) { @@ -563,15 +554,8 @@ void MidiInstrument::reset(int portNo, MType) { ev.setA(pitch); ev.setB(0); - //printf("MidiInstrument::reset adding event channel:%d pitch:%d\n", chan, pitch); - //ev.dump(); port->sendEvent(ev); - // Changed to use play events list instead of putEvent FIFO. - // These loops send 2048 events, which is more than our FIFO (or Jack buffer) can handle! p4.0.15 Tim. - // Nope, instead, increased FIFO sizes to accommodate. - //port->device()->playEvents()->add(ev); - //port->device()->addScheduledEvent(ev); } } } @@ -661,13 +645,6 @@ void Patch::read(Xml& xml) void Patch::write(int level, Xml& xml) { - //if (drumMap == 0) - //{ - //QString s = QString("Patch name=\"%1\"").arg(Xml::xmlString(name)); - //if (typ != -1) - // s += QString(" mode=\"%d\"").arg(typ); - //s += QString(" hbank=\"%1\" lbank=\"%2\" prog=\"%3\"").arg(hbank).arg(lbank).arg(prog); - //xml.tagE(s); xml.nput(level, ""); xml.put(" />"); - - //return; - //} - - //QString s = QString("drummap name=\"%1\"").arg(Xml::xmlString(name)); - //s += QString(" hbank=\"%1\" lbank=\"%2\" prog=\"%3\"").arg(hbank).arg(lbank).arg(prog); - //xml.stag(s); - //for (int i = 0; i < DRUM_MAPSIZE; ++i) { - // DrumMapEntry* dm = drumMap->entry(i); - // dm->write(xml); - // } - //xml.etag("drummap"); } //--------------------------------------------------------- @@ -706,8 +668,6 @@ void Patch::write(int level, Xml& xml) void MidiInstrument::readMidiState(Xml& xml) { - ///_midiState->read(xml, "midistate", true); - // p4.0.27 A kludge to support old midistates by wrapping them in the proper header. _tmpMidiStateVersion = 1; // Assume old (unmarked) first version 1. for (;;) @@ -997,11 +957,8 @@ void MidiInstrument::read(Xml& xml) void MidiInstrument::write(int level, Xml& xml) { xml.header(); - //xml.stag("muse version=\"2.1\""); xml.tag(level, "muse version=\"1.0\""); - //xml.stag(QString("MidiInstrument name=\"%1\"").arg(Xml::xmlString(iname()))); level++; - //xml.tag(level, "MidiInstrument name=\"%s\"", Xml::xmlString(iname()).toLatin1().constData()); xml.nput(level, "* pg = groups(); - //for (std::vector::iterator g = pg->begin(); g != pg->end(); ++g) { level++; - //for (std::vector::iterator g = pg.begin(); g != pg.end(); ++g) { for (ciPatchGroup g = pg.begin(); g != pg.end(); ++g) { PatchGroup* pgp = *g; const PatchList& pl = pgp->patches; @@ -1029,27 +983,86 @@ void MidiInstrument::write(int level, Xml& xml) level++; //for (iPatch p = g->patches.begin(); p != g->patches.end(); ++p) for (ciPatch p = pl.begin(); p != pl.end(); ++p) - //(*p)->write(xml); - //p->write(level, xml); (*p)->write(level, xml); level--; - //xml.etag("PatchGroup"); xml.etag(level, "PatchGroup"); } for (iMidiController ic = _controller->begin(); ic != _controller->end(); ++ic) - //(*ic)->write(xml); ic->second->write(level, xml); - //xml.etag("MidiInstrument"); writeDrummaps(level, xml); level--; xml.etag(level, "MidiInstrument"); - //xml.etag("muse"); level--; xml.etag(level, "muse"); } + +//--------------------------------------------------------- +// populatePatchPopup +//--------------------------------------------------------- + +void MidiInstrument::populatePatchPopup(MusEGui::PopupMenu* menu, int chan, MType songType, bool drum) + { + menu->clear(); + int mask = 0; + bool drumchan = chan == 9; + switch (songType) { + case MT_XG: mask = 4; break; + case MT_GS: mask = 2; break; + case MT_GM: + if(drumchan) + { + int id = (0xff << 16) + (0xff << 8) + 0x00; // First patch + QAction* act = menu->addAction(gmdrumname); + act->setData(id); + return; + } + mask = 1; + break; + case MT_UNKNOWN: mask = 7; break; + } + if (pg.size() > 1) { + for (ciPatchGroup i = pg.begin(); i != pg.end(); ++i) { + PatchGroup* pgp = *i; + MusEGui::PopupMenu* pm = new MusEGui::PopupMenu(pgp->name, menu, menu->stayOpen()); // Use the parent stayOpen here. + menu->addMenu(pm); + pm->setFont(MusEGlobal::config.fonts[0]); + const PatchList& pl = pgp->patches; + for (ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { + const Patch* mp = *ipl; + if ((mp->typ & mask) && + ((drum && songType != MT_GM) || + (mp->drum == drumchan)) ) + { + int id = ((mp->hbank & 0xff) << 16) + + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); + QAction* act = pm->addAction(mp->name); + act->setData(id); + } + + } + } + } + else if (pg.size() == 1 ){ + // no groups + const PatchList& pl = pg.front()->patches; + for (ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { + const Patch* mp = *ipl; + if (mp->typ & mask) { + int id = ((mp->hbank & 0xff) << 16) + + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); + QAction* act = menu->addAction(mp->name); + act->setData(id); + } + } + } + + } + + + //--------------------------------------------------------- // getPatchName //--------------------------------------------------------- @@ -1222,72 +1235,6 @@ QList MidiInstrument::getPatches(int channel, MType mode } -//--------------------------------------------------------- -// populatePatchPopup -//--------------------------------------------------------- - -void MidiInstrument::populatePatchPopup(MusEGui::PopupMenu* menu, int chan, MType songType, bool drum) - { - menu->clear(); - int mask = 0; - bool drumchan = chan == 9; - switch (songType) { - case MT_XG: mask = 4; break; - case MT_GS: mask = 2; break; - case MT_GM: - if(drumchan) - { - int id = (0xff << 16) + (0xff << 8) + 0x00; // First patch - QAction* act = menu->addAction(gmdrumname); - //act->setCheckable(true); - act->setData(id); - return; - } - mask = 1; - break; - case MT_UNKNOWN: mask = 7; break; - } - if (pg.size() > 1) { - for (ciPatchGroup i = pg.begin(); i != pg.end(); ++i) { - PatchGroup* pgp = *i; - //QMenu* pm = menu->addMenu(pgp->name); - MusEGui::PopupMenu* pm = new MusEGui::PopupMenu(pgp->name, menu, menu->stayOpen()); // Use the parent stayOpen here. - menu->addMenu(pm); - pm->setFont(MusEGlobal::config.fonts[0]); - const PatchList& pl = pgp->patches; - for (ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { - const Patch* mp = *ipl; - if ((mp->typ & mask) && - ((drum && songType != MT_GM) || - (mp->drum == drumchan)) ) - { - int id = ((mp->hbank & 0xff) << 16) - + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); - QAction* act = pm->addAction(mp->name); - //act->setCheckable(true); - act->setData(id); - } - - } - } - } - else if (pg.size() == 1 ){ - // no groups - const PatchList& pl = pg.front()->patches; - for (ciPatch ipl = pl.begin(); ipl != pl.end(); ++ipl) { - const Patch* mp = *ipl; - if (mp->typ & mask) { - int id = ((mp->hbank & 0xff) << 16) - + ((mp->lbank & 0xff) << 8) + (mp->prog & 0xff); - QAction* act = menu->addAction(mp->name); - //act->setCheckable(true); - act->setData(id); - } - } - } - - } - const DrumMap* MidiInstrument::drummap_for_patch(int patch) const { using std::list; diff --git a/muse2/muse/instruments/minstrument.h b/muse2/muse/instruments/minstrument.h index 823b9895..4d5ad8c2 100644 --- a/muse2/muse/instruments/minstrument.h +++ b/muse2/muse/instruments/minstrument.h @@ -233,7 +233,6 @@ class MidiInstrument { virtual void reset(int, MType); virtual QString getPatchName(int,int,MType,bool); - //virtual void populatePatchPopup(QMenu*, int, MType, bool); virtual void populatePatchPopup(MusEGui::PopupMenu*, int, MType, bool); void read(Xml&); void write(int level, Xml&); @@ -264,7 +263,7 @@ extern void removeMidiInstrument(const MidiInstrument* instr); } // namespace MusECore //namespace MusEGui { -//extern void populatePatchPopup(MusECore::MidiInstrument*, PopupMenu*, int, MType, bool); +//extern void populatePatchPopup(MusECore::MidiInstrument*, PopupMenu*, int, MType, bool); DELETETHIS //} #endif diff --git a/muse2/muse/liste/editevent.cpp b/muse2/muse/liste/editevent.cpp index c31ecb3a..6781c365 100644 --- a/muse2/muse/liste/editevent.cpp +++ b/muse2/muse/liste/editevent.cpp @@ -27,7 +27,6 @@ #include #include #include -//#include #include #include #include @@ -45,7 +44,6 @@ #include "pitchedit.h" #include "intlabel.h" #include "globals.h" -///#include "posedit.h" #include "gconfig.h" #include "midiport.h" #include "midiedit/drummap.h" @@ -445,7 +443,6 @@ EditCAfterDialog::EditCAfterDialog(int tick, const MusECore::Event& event, setWindowTitle(tr("MusE: Enter Channel Aftertouch")); QLabel* l1 = new QLabel(tr("Time Position")); - ///epos = new PosEdit; epos = new Awl::PosEdit; QLabel* l2 = new QLabel(tr("Pressure")); @@ -504,7 +501,6 @@ EditPAfterDialog::EditPAfterDialog(int tick, const MusECore::Event& event, setWindowTitle(tr("MusE: Enter Poly Aftertouch")); QLabel* l1 = new QLabel(tr("Time Position")); - ///epos = new PosEdit; epos = new Awl::PosEdit; QLabel* l2 = new QLabel(tr("Pitch")); @@ -632,8 +628,8 @@ EditCtrlDialog::EditCtrlDialog(int tick, const MusECore::Event& event, std::list sList; typedef std::list::iterator isList; - for (MusECore::iMidiCtrlValList i = cll->begin(); i != cll->end(); ++i) { - MusECore::MidiCtrlValList* cl = i->second; + for (MusECore::iMidiCtrlValList it = cll->begin(); it != cll->end(); ++it) { + MusECore::MidiCtrlValList* cl = it->second; int num = cl->num(); // dont show drum specific controller if not a drum track @@ -697,13 +693,11 @@ EditCtrlDialog::EditCtrlDialog(int tick, const MusECore::Event& event, void EditCtrlDialog::newController() { - //QMenu* pup = new QMenu(this); MusEGui::PopupMenu* pup = new MusEGui::PopupMenu(this); - //pup->setCheckable(this);//not necessary in Qt4 - // + // populate popup with all controllers available for // current instrument - // + MusECore::MidiTrack* track = part->track(); int portn = track->outPort(); MusECore::MidiPort* port = &MusEGlobal::midiPorts[portn]; @@ -732,24 +726,16 @@ void EditCtrlDialog::newController() { MusECore::MidiCtrlValList* vl = new MusECore::MidiCtrlValList(mc->num()); cll->add(channel, vl); - //MusEGlobal::song->update(SC_MIDI_CONTROLLER_ADD); } - //for (int idx = 0; ;++idx) { int idx = 0; for (; idx < ctrlList->count() ;++idx) { // p4.0.25 Fix segfault - QString str = ctrlList->item(idx)->text(); + QString str = ctrlList->item(idx)->text(); if (s == str) { - ctrlList->item(idx)->setSelected(true); + ctrlList->item(idx)->setSelected(true); ctrlListClicked(ctrlList->item(idx)); break; } - //if (str.isNull()) { - // ctrlList->addItem(s); - // ctrlList->item(idx)->setSelected(true); - // ctrlListClicked(ctrlList->item(idx)); - // break; - // } } if (idx >= ctrlList->count()) { // p4.0.25 Fix segfault ctrlList->addItem(s); @@ -871,9 +857,7 @@ void EditCtrlDialog::instrPopup() int port = track->outPort(); MusECore::MidiInstrument* instr = MusEGlobal::midiPorts[port].instrument(); - //QMenu* pup = new QMenu(this); MusEGui::PopupMenu* pup = new MusEGui::PopupMenu(this); - //populatePatchPopup(instr, pup, channel, MusEGlobal::song->mtype(), track->isDrumTrack()); instr->populatePatchPopup(pup, channel, MusEGlobal::song->mtype(), track->isDrumTrack()); if(pup->actions().count() == 0) @@ -897,9 +881,6 @@ void EditCtrlDialog::instrPopup() void EditCtrlDialog::programChanged() { -// MusECore::MidiTrack* track = part->track(); -// int channel = track->outChannel(); -// int port = track->outPort(); int hb = hbank->value(); int lb = lbank->value(); int prog = program->value(); diff --git a/muse2/muse/liste/editevent.h b/muse2/muse/liste/editevent.h index 51ba80d0..cd02c82e 100644 --- a/muse2/muse/liste/editevent.h +++ b/muse2/muse/liste/editevent.h @@ -48,7 +48,6 @@ namespace MusEGui { class IntLabel; class PitchEdit; -///class PosEdit; //--------------------------------------------------------- @@ -117,7 +116,6 @@ class EditCtrlDialog : public QDialog, public Ui::EditCtrlBase { int val; // controller value (for prog. changes) const MusECore::MidiPart* part; - ///QMenu* pop; void updatePatch(); @@ -148,7 +146,6 @@ class EditMetaDialog : public EditEventDialog { unsigned char* meta; int len; - ///PosEdit* epos; Awl::PosEdit* epos; QTextEdit* edit; MusEGui::IntLabel* il2; @@ -179,7 +176,6 @@ class EditMetaDialog : public EditEventDialog { class EditCAfterDialog : public EditEventDialog { Q_OBJECT - ///PosEdit* epos; Awl::PosEdit* epos; MusEGui::IntLabel* il2; @@ -201,7 +197,6 @@ class EditCAfterDialog : public EditEventDialog { class EditPAfterDialog : public EditEventDialog { Q_OBJECT - ///PosEdit* epos; Awl::PosEdit* epos; MusEGui::PitchEdit* pl; MusEGui::IntLabel* il2; diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp index 5e72a0c7..a0d82969 100644 --- a/muse2/muse/liste/listedit.cpp +++ b/muse2/muse/liste/listedit.cpp @@ -197,13 +197,13 @@ void ListEdit::songChanged(int type) { if(_isDeleting) // Ignore while while deleting to prevent crash. return; - + if (type == 0) return; if (type & (SC_PART_REMOVED | SC_PART_MODIFIED | SC_PART_INSERTED | SC_EVENT_REMOVED | SC_EVENT_MODIFIED | SC_EVENT_INSERTED | SC_SELECTION)) { - if (type & (SC_PART_REMOVED | SC_PART_INSERTED)) + if (type & (SC_PART_REMOVED | SC_PART_INSERTED | SC_PART_MODIFIED)) genPartlist(); // close window if editor has no parts anymore if (parts()->empty()) { @@ -213,6 +213,8 @@ void ListEdit::songChanged(int type) liste->setSortingEnabled(false); if (type == SC_SELECTION) { + + // DELETETHIS or clean up or whatever? // BUGFIX: I found the keyboard modifier states affect how QTreeWidget::setCurrentItem() operates. // So for example (not) holding shift while lassoo-ing notes in piano roll affected // whether multiple items were selected in this event list editor! @@ -244,12 +246,10 @@ void ListEdit::songChanged(int type) // Go backwards to avoid QTreeWidget::setCurrentItem() dependency on KB modifiers! for (int row = liste->topLevelItemCount() -1; row >= 0 ; --row) { - //printf("ListEdit::songChanged row:%d\n", row); QTreeWidgetItem* i = liste->topLevelItem(row); bool sel = ((EventListItem*)i)->event.selected(); if (i->isSelected() ^ sel) { - //printf("ListEdit::songChanged changing row:%d sel:%d\n", row, sel); // Do setCurrentItem() before setSelected(). if(sel && !ci_done) { @@ -496,7 +496,7 @@ ListEdit::ListEdit(MusECore::PartList* pl) menuEdit->addActions(MusEGlobal::undoRedo->actions()); menuEdit->addSeparator(); -#if 0 +#if 0 // DELETETHIS or implement? QAction *cutAction = menuEdit->addAction(QIcon(*editcutIconSet), tr("Cut")); connect(cutAction, SIGNAL(triggered()), editSignalMapper, SLOT(map())); editSignalMapper->setMapping(cutAction, EList::CMD_CUT); @@ -615,7 +615,6 @@ ListEdit::ListEdit(MusECore::PartList* pl) ListEdit::~ListEdit() { - // MusEGlobal::undoRedo->removeFrom(listTools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -1003,8 +1002,8 @@ void ListEdit::initShortcuts() void ListEdit::keyPressEvent(QKeyEvent* event) { -int key = event->key(); -if (key == Qt::Key_Escape) { + int key = event->key(); + if (key == Qt::Key_Escape) { close(); return; } diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp index d946bf00..f7aee078 100644 --- a/muse2/muse/main.cpp +++ b/muse2/muse/main.cpp @@ -35,6 +35,8 @@ #include #include #include +#include + #include #include @@ -43,12 +45,14 @@ #include "app.h" #include "audio.h" #include "audiodev.h" +#include "config.h" #include "gconfig.h" #include "globals.h" #include "helper.h" #include "icons.h" #include "sync.h" #include "functions.h" +#include "appearance.h" #ifdef HAVE_LASH #include @@ -138,27 +142,17 @@ class MuseApplication : public QApplication { } bool notify(QObject* receiver, QEvent* event) { - //if (event->type() == QEvent::KeyPress) - // printf("notify key press before app::notify accepted:%d\n", event->isAccepted()); bool flag = QApplication::notify(receiver, event); if (event->type() == QEvent::KeyPress) { - //printf("notify key press after app::notify accepted:%d\n", event->isAccepted()); QKeyEvent* ke = (QKeyEvent*)event; - ///MusEGlobal::globalKeyState = ke->stateAfter(); - MusEGlobal::globalKeyState = ke->modifiers(); + MusEGlobal::globalKeyState = ke->modifiers(); bool accepted = ke->isAccepted(); if (!accepted) { int key = ke->key(); - ///if (ke->state() & Qt::ShiftModifier) - //if (MusEGlobal::globalKeyState & Qt::ShiftModifier) if (((QInputEvent*)ke)->modifiers() & Qt::ShiftModifier) key += Qt::SHIFT; - ///if (ke->state() & Qt::AltModifier) - //if (MusEGlobal::globalKeyState & Qt::AltModifier) if (((QInputEvent*)ke)->modifiers() & Qt::AltModifier) key += Qt::ALT; - ///if (ke->state() & Qt::ControlModifier) - //if (MusEGlobal::globalKeyState & Qt::ControlModifier) if (((QInputEvent*)ke)->modifiers() & Qt::ControlModifier) key+= Qt::CTRL; muse->kbAccel(key); @@ -175,7 +169,7 @@ class MuseApplication : public QApplication { } #ifdef HAVE_LASH - virtual void timerEvent (QTimerEvent * /* e */) { + virtual void timerEvent (QTimerEvent*) { if(MusEGlobal::useLASH) muse->lash_idle_cb (); } @@ -226,6 +220,8 @@ static void usage(const char* prog, const char* txt) fprintf(stderr, " -m debug mode: trace midi Input\n"); fprintf(stderr, " -M debug mode: trace midi Output\n"); fprintf(stderr, " -s debug mode: trace sync\n"); + fprintf(stderr, " -u ubuntu/unity workaround: don't allow sharing menus\n"); + fprintf(stderr, " and mdi-subwins.\n"); fprintf(stderr, " -a no audio\n"); fprintf(stderr, " -P n set audio driver real time priority to n\n"); fprintf(stderr, " (Dummy only, default 40. Else fixed by Jack.)\n"); @@ -254,7 +250,6 @@ static void usage(const char* prog, const char* txt) int main(int argc, char* argv[]) { -// error = ErrorHandler::create(argv[0]); MusEGlobal::ruid = getuid(); MusEGlobal::euid = geteuid(); MusEGlobal::undoSetuid(); @@ -279,13 +274,12 @@ int main(int argc, char* argv[]) utemplDir.mkpath("."); // Support old versions: Copy existing templates over. QDir old_utemplDir = QDir(QString(getenv("HOME")) + QString("/templates")); - // printf(" old templates dir:%s\n", (QString(getenv("HOME")) + QString("/templates")).toLatin1().constData()); if(old_utemplDir.exists()) { - //printf(" found old templates dir\n"); // We really just want these, even though it's possible other filenames were saved. // Another application might have used that directory. - QStringList flt; flt << "*.med" << "*.med.gz" << "*.med.bz2" << "*.mid" << "*.midi" << "*.kar"; + QStringList flt; + flt << "*.med" << "*.med.gz" << "*.med.bz2" << "*.mid" << "*.midi" << "*.kar"; old_utemplDir.setNameFilters(flt); QFileInfoList fil = old_utemplDir.entryInfoList(); @@ -295,7 +289,6 @@ int main(int argc, char* argv[]) QString fn = fi.fileName(); QFile f(fi.absoluteFilePath()); f.copy(utemplDir.absolutePath() + "/" + fn); - //printf(" copy old template to:%s result:%d\n", QString(utemplPath.absolutePath() + "/" + fn).toLatin1().constData(), rv); } } } @@ -330,10 +323,11 @@ int main(int argc, char* argv[]) #endif srand(time(0)); // initialize random number generator -// signal(SIGCHLD, catchSignal); // interferes with initVST() +// signal(SIGCHLD, catchSignal); // interferes with initVST(). see also app.cpp, function catchSignal() MusECore::initMidiController(); QApplication::setColorSpec(QApplication::ManyColor); MuseApplication app(argc, argv); + MusEGui::Appearance::defaultStyle = MuseApplication::style()->objectName(); MusEGui::init_function_dialogs(MusEGlobal::muse); MusEGui::initShortCuts(); @@ -344,8 +338,6 @@ int main(int argc, char* argv[]) if(!cConfExists) MusEGlobal::config.projectBaseFolder = MusEGlobal::museUser + QString("/MusE"); - //MusEGlobal::museUserInstruments = MusEGlobal::config.userInstrumentsDir; - // Create user instruments dir if it doesn't exist { QString uinstrPath = MusEGlobal::configPath + QString("/instruments"); @@ -357,10 +349,8 @@ int main(int argc, char* argv[]) { // Support old versions: Copy existing instruments over. QDir old_uinstrDir(MusEGlobal::config.userInstrumentsDir); - //printf(" old instruments dir:%s\n", MusEGlobal::config.userInstrumentsDir.toLatin1().constData()); if(old_uinstrDir.exists()) { - //printf(" found old instruments dir\n"); QStringList flt; flt << "*.idf"; old_uinstrDir.setNameFilters(flt); @@ -374,7 +364,6 @@ int main(int argc, char* argv[]) if(!newf.exists()) { f.copy(newf.fileName()); - //printf(" copy old instrument to:%s result:%d\n", newf.fileName().toLatin1().constData(), rv); } } } @@ -395,14 +384,14 @@ int main(int argc, char* argv[]) muse_splash->show(); QTimer* stimer = new QTimer(0); muse_splash->connect(stimer, SIGNAL(timeout()), muse_splash, SLOT(close())); - stimer->setSingleShot(true); + stimer->setSingleShot(true); stimer->start(6000); } } int i; - QString optstr("ahvdDmMsP:Y:l:py"); + QString optstr("ahvdDumMsP:Y:l:py"); #ifdef VST_SUPPORT optstr += QString("V"); #endif @@ -413,12 +402,6 @@ int main(int argc, char* argv[]) optstr += QString("L"); #endif -//#ifdef VST_SUPPORT -// while ((i = getopt(argc, argv, "ahvdDmMsVP:py")) != EOF) { -//#else -// while ((i = getopt(argc, argv, "ahvdDmMsP:py")) != EOF) { -//#endif - while ((i = getopt(argc, argv, optstr.toLatin1().constData())) != EOF) { char c = (char)i; switch (c) { @@ -438,6 +421,7 @@ int main(int argc, char* argv[]) case 'm': MusEGlobal::midiInputTrace = true; break; case 'M': MusEGlobal::midiOutputTrace = true; break; case 's': MusEGlobal::debugSync = true; break; + case 'u': MusEGlobal::unityWorkaround = true; break; case 'P': MusEGlobal::realTimePriority = atoi(optarg); break; case 'Y': MusEGlobal::midiRTPrioOverride = atoi(optarg); break; case 'p': MusEGlobal::loadPlugins = false; break; @@ -451,23 +435,6 @@ int main(int argc, char* argv[]) } } - /* - if(!MusEGlobal::config.styleSheetFile.isEmpty()) - { - if(MusEGlobal::debugMsg) - printf("loading style sheet <%s> \n", qPrintable(MusEGlobal::config.styleSheetFile)); - QFile cf(MusEGlobal::config.styleSheetFile); - if (cf.open(QIODevice::ReadOnly)) { - QByteArray ss = cf.readAll(); - QString sheet(QString::fromUtf8(ss.data())); - app.setStyleSheet(sheet); - cf.close(); - } - else - printf("loading style sheet <%s> failed\n", qPrintable(MusEGlobal::config.styleSheetFile)); - } - */ - AL::initDsp(); @@ -481,9 +448,6 @@ int main(int argc, char* argv[]) else if (noAudio) { MusECore::initDummyAudio(); MusEGlobal::realTimeScheduling = true; - //if (MusEGlobal::debugMode) { // ?? - // MusEGlobal::realTimeScheduling = false; - // } } else if (MusECore::initJackAudio()) { if (!MusEGlobal::debugMode) @@ -507,7 +471,6 @@ int main(int argc, char* argv[]) fprintf(stderr, "no audio functions available\n"); fprintf(stderr, "*** experimental mode -- no play possible ***\n"); MusECore::initDummyAudio(); - //MusEGlobal::realTimeScheduling = MusEGlobal::audioDevice->isRealtime(); } MusEGlobal::realTimeScheduling = true; } @@ -517,8 +480,6 @@ int main(int argc, char* argv[]) // ??? With Jack2 this reports true even if it is not running realtime. // Jack says: "Cannot use real-time scheduling (RR/10)(1: Operation not permitted)". The kernel is non-RT. // I cannot seem to find a reliable answer to the question, even with dummy audio and system calls. - //if (MusEGlobal::debugMsg) - // printf("MusEGlobal::realTimeScheduling:%d\n", MusEGlobal::realTimeScheduling); MusEGlobal::useJackTransport.setValue(true); @@ -575,8 +536,6 @@ int main(int argc, char* argv[]) MusECore::initMetronome(); - //QApplication::clipboard()->setSelectionMode(false); ddskrjo obsolete even in Qt3 - QApplication::addLibraryPath(MusEGlobal::museGlobalLib + "/qtplugins"); if (MusEGlobal::debugMsg) { QStringList list = app.libraryPaths(); diff --git a/muse2/muse/marker/marker.cpp b/muse2/muse/marker/marker.cpp index fe643ccf..c825b3bf 100644 --- a/muse2/muse/marker/marker.cpp +++ b/muse2/muse/marker/marker.cpp @@ -84,7 +84,6 @@ void MarkerList::write(int level, Xml& xml) const for (ciMarker i = begin(); i != end(); ++i) { const Marker& m = i->second; xml.put(level, "", - //m.tick(), m.type()==Pos::FRAMES, m.name().toLatin1().constData()); m.tick(), m.type()==Pos::FRAMES, Xml::xmlString(m.name()).toLatin1().constData()); } } diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp index a957e3bf..5e84295e 100644 --- a/muse2/muse/marker/markerview.cpp +++ b/muse2/muse/marker/markerview.cpp @@ -30,7 +30,6 @@ #include "sync.h" #include "icons.h" #include "song.h" -///#include "posedit.h" #include "awl/posedit.h" #include @@ -121,7 +120,6 @@ void MarkerItem::setTick(unsigned v) QString s; int bar, beat; unsigned tick; - ///sigmap.tickValues(v, &bar, &beat, &tick); AL::sigmap.tickValues(v, &bar, &beat, &tick); s.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick); setText(COL_TICK, s); @@ -168,10 +166,8 @@ void MarkerView::closeEvent(QCloseEvent* e) //--------------------------------------------------------- MarkerView::MarkerView(QWidget* parent) - : TopWin(TopWin::MARKER, parent, "markerview", Qt::Window /*| WDestructiveClose*/) + : TopWin(TopWin::MARKER, parent, "markerview", Qt::Window) { - //setAttribute(Qt::WA_DeleteOnClose); - setWindowTitle(tr("MusE: Marker")); QAction* markerAdd = new QAction(QIcon(*flagIcon), tr("add marker"), this); @@ -181,10 +177,6 @@ MarkerView::MarkerView(QWidget* parent) connect(markerDelete, SIGNAL(activated()), SLOT(deleteMarker())); //---------Pulldown Menu---------------------------- - /* We probably don't need an empty menu - Orcan - QMenu* fileMenu = new QMenu(tr("&File")); - menuBar()->addMenu(fileMenu); - */ QMenu* editMenu = menuBar()->addMenu(tr("&Edit")); editMenu->addAction(markerAdd); @@ -238,7 +230,6 @@ MarkerView::MarkerView(QWidget* parent) editTick->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); - ///editSMPTE = new PosEdit; editSMPTE = new Awl::PosEdit; editSMPTE->setSmpte(true); editSMPTE->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, @@ -280,7 +271,6 @@ MarkerView::MarkerView(QWidget* parent) // Rest //--------------------------------------------------- - //connect(song, SIGNAL(songChanged(int)), SLOT(updateList())); connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); updateList(); @@ -296,14 +286,11 @@ MarkerView::MarkerView(QWidget* parent) } //--------------------------------------------------------- -// MArkerView +// MarkerView //--------------------------------------------------------- MarkerView::~MarkerView() { - //printf("MarkerView::~MarkerView() before undoRedo->removeFrom(tools)\n"); - - // undoRedo->removeFrom(tools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -507,9 +494,6 @@ void MarkerView::updateList() MusECore::Marker* m = &i->second; // Changed p3.3.43 - //QString tick; - //tick.setNum(i->first); - //new MarkerItem(table, m); MarkerItem* item = new MarkerItem(table, m); if(m == selm) { @@ -548,8 +532,6 @@ void MarkerView::markerSelectionChanged() lock->setChecked(item->lock()); lock->setEnabled(true); - //printf("MarkerView::markerSelectionChanged item->lock:%d\n", item->lock()); - editSMPTE->setEnabled(item->lock()); editTick->setEnabled(!item->lock()); } @@ -613,9 +595,6 @@ void MarkerView::lockChanged(bool lck) void MarkerView::markerChanged(int val) { - //if (val != MusECore::Song::MARKER_CUR) - // return; - // p3.3.43 switch(val) { // MARKER_CUR, MARKER_ADD, MARKER_REMOVE, MARKER_NAME, @@ -673,8 +652,7 @@ void MarkerView::prevMarker() if (i->second.tick() < curPos && i->second.tick() > nextPos) nextPos = i->second.tick(); } -/* if (nextPos == 0) - return;*/ + MusECore::Pos p(nextPos, true); MusEGlobal::song->setPos(0, p, true, true, false); } diff --git a/muse2/muse/marker/markerview.h b/muse2/muse/marker/markerview.h index 06e22daf..3da98b31 100644 --- a/muse2/muse/marker/markerview.h +++ b/muse2/muse/marker/markerview.h @@ -72,8 +72,6 @@ class MarkerView : public TopWin { QTreeWidget* table; QLineEdit* editName; - ///PosEdit* editSMPTE; - ///PosEdit* editTick; Awl::PosEdit* editSMPTE; Awl::PosEdit* editTick; QToolButton* lock; diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp index 91ffdf7e..1553e17f 100644 --- a/muse2/muse/master/lmaster.cpp +++ b/muse2/muse/master/lmaster.cpp @@ -29,8 +29,6 @@ #include "globals.h" #include "app.h" #include "audio.h" -//#include "posedit.h" -//#include "sigedit.h" #include "shortcuts.h" #include "debug.h" @@ -157,8 +155,8 @@ LMaster::LMaster() editingNewItem = false; setWindowTitle(tr("MusE: Mastertrack")); setMinimumHeight(100); - setFixedWidth(400); - setFocusPolicy(Qt::StrongFocus); + //setFixedWidth(400); // FIXME: Arbitrary. But without this, sig editor is too wide. Must fix sig editor width... + setFocusPolicy(Qt::NoFocus); comboboxTimer=new QTimer(this); @@ -208,6 +206,9 @@ LMaster::LMaster() QToolButton* tempoButton = new QToolButton(); QToolButton* timeSigButton = new QToolButton(); QToolButton* keyButton = new QToolButton(); + tempoButton->setFocusPolicy(Qt::NoFocus); + timeSigButton->setFocusPolicy(Qt::NoFocus); + keyButton->setFocusPolicy(Qt::NoFocus); tempoButton->setText(tr("Tempo")); timeSigButton->setText(tr("Timesig")); keyButton->setText(tr("Key")); @@ -218,10 +219,6 @@ LMaster::LMaster() edit->addWidget(timeSigButton); edit->addWidget(keyButton); - ///Q3Accel* qa = new Q3Accel(this); - ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo())); - ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo())); - //--------------------------------------------------- // master //--------------------------------------------------- @@ -242,25 +239,26 @@ LMaster::LMaster() // Rest //--------------------------------------------------- -// QSizeGrip* corner = new QSizeGrip(mainw); - mainGrid->setRowStretch(0, 100); mainGrid->setColumnStretch(0, 100); mainGrid->addWidget(view, 0, 0); -// mainGrid->addWidget(corner, 1, 1, AlignBottom | AlignRight); updateList(); tempo_editor = new QLineEdit(view->viewport()); + tempo_editor->setFrame(false); tempo_editor->hide(); connect(tempo_editor, SIGNAL(returnPressed()), SLOT(returnPressed())); sig_editor = new SigEdit(view->viewport()); + sig_editor->setFrame(false); sig_editor->hide(); connect(sig_editor, SIGNAL(returnPressed()), SLOT(returnPressed())); pos_editor = new Awl::PosEdit(view->viewport()); + pos_editor->setFrame(false); pos_editor->hide(); connect(pos_editor, SIGNAL(returnPressed()), SLOT(returnPressed())); key_editor = new QComboBox(view->viewport()); + key_editor->setFrame(false); key_editor->addItems(MusECore::keyStrs); key_editor->hide(); connect(key_editor, SIGNAL(activated(int)), SLOT(returnPressed())); @@ -284,7 +282,6 @@ LMaster::LMaster() LMaster::~LMaster() { - //undoRedo->removeFrom(tools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -479,9 +476,9 @@ void LMaster::writeConfiguration(int level, MusECore::Xml& xml) // select //--------------------------------------------------------- +//DELETETHIS (whole function)? or is this todo? void LMaster::select(QTreeWidgetItem* /*item*/, QTreeWidgetItem* /*previous_item*/) { -// printf("select %x\n", unsigned(item)); } //--------------------------------------------------------- @@ -518,7 +515,6 @@ void LMaster::cmd(int cmd) case LMASTER_KEYEVENT: { LMasterKeyEventItem* k = (LMasterKeyEventItem*) l; - //keymap.delKey(l->tick()); MusEGlobal::audio->msgRemoveKey(k->tick(), k->key()); break; } @@ -553,7 +549,6 @@ void LMaster::cmd(int cmd) */ void LMaster::itemPressed(QTreeWidgetItem* i, int column) { - //printf("itemPressed, column: %d\n", column); if (editedItem) { if (editorColumn != column || editedItem != i) returnPressed(); @@ -572,9 +567,10 @@ void LMaster::itemPressed(QTreeWidgetItem* i, int column) //--------------------------------------------------------- void LMaster::itemDoubleClicked(QTreeWidgetItem* i) { - //printf("itemDoubleClicked\n"); emit seekTo(((LMasterLViewItem*) i)->tick()); + QFontMetrics fm(font()); + int fnt_w = fm.width('0'); if (!editedItem && editorColumn == LMASTER_VAL_COL) { editedItem = (LMasterLViewItem*) i; QRect itemRect = view->visualItemRect(editedItem); @@ -583,7 +579,6 @@ void LMaster::itemDoubleClicked(QTreeWidgetItem* i) itemRect.setX(x1); //Qt makes crazy things with itemRect if this is called directly.. if (editingNewItem) { - QFontMetrics fm(font()); int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth,0 , this); // ddskrjo 0 int h = fm.height() + fw * 2; itemRect.setWidth(view->columnWidth(LMASTER_VAL_COL)); @@ -601,9 +596,11 @@ void LMaster::itemDoubleClicked(QTreeWidgetItem* i) tempo_editor->selectAll(); } else if (editedItem->getType() == LMASTER_SIGEVENT) { // Edit signatur value: - //sig_editor->setValue(editedItem->text(LMASTER_VAL_COL)); sig_editor->setValue(((LMasterSigEventItem*)editedItem)->getEvent()->sig); - sig_editor->setGeometry(itemRect); + int w = fnt_w * 14; + if(w > itemRect.width()) + w = itemRect.width(); + sig_editor->setGeometry(itemRect.x(), itemRect.y(), w, itemRect.height()); sig_editor->show(); sig_editor->setFocus(); } @@ -631,8 +628,11 @@ void LMaster::itemDoubleClicked(QTreeWidgetItem* i) else { pos_editor->setValue(editedItem->tick()); QRect itemRect = view->visualItemRect(editedItem); - itemRect.setX(0); - itemRect.setWidth(view->columnWidth(LMASTER_BEAT_COL)); + itemRect.setX(view->indentation()); + int w = view->columnWidth(LMASTER_BEAT_COL) - view->indentation(); + if(w < (fnt_w * 13)) + w = fnt_w * 13; + itemRect.setWidth(w); pos_editor->setGeometry(itemRect); pos_editor->show(); pos_editor->setFocus(); @@ -724,7 +724,6 @@ void LMaster::returnPressed() } else MusEGlobal::audio->msgAddSig(newtick, z, n, false); - //MusEGlobal::audio->msgAddSig(newtick, z, n, true); // Select the item: QTreeWidgetItem* newSelected = (QTreeWidgetItem*) getItemAtPos(newtick, LMASTER_SIGEVENT); @@ -761,7 +760,6 @@ void LMaster::returnPressed() // else if (editedItem->getType() == LMASTER_SIGEVENT && editorColumn == LMASTER_VAL_COL) { - ///Sig newSig = sig_editor->sig(); AL::TimeSignature newSig = sig_editor->sig(); sig_editor->hide(); @@ -770,7 +768,6 @@ void LMaster::returnPressed() if(newSig.isValid()) { LMasterSigEventItem* e = (LMasterSigEventItem*) editedItem; - //printf("adding sig %d %d\n", e->z(),e->n()); int tick = e->tick(); if (!editingNewItem) { MusEGlobal::song->startUndo(); @@ -865,7 +862,6 @@ LMasterKeyEventItem::LMasterKeyEventItem(QTreeWidget* parent, const MusECore::Ke int msec = int((time - (min*60 + sec)) * 1000.0); c2.sprintf("%03d:%02d:%03d", min, sec, msec); c3 = "Key"; - //int dt = ev.key; c4 = keyToString(ev.key); setText(0, c1); setText(1, c2); @@ -884,13 +880,12 @@ LMasterTempoItem::LMasterTempoItem(QTreeWidget* parent, const MusECore::TEvent* { tempoEvent = ev; unsigned t = ev->tick; - //QString c1, c2, c3, c4; int bar, beat; unsigned tick; AL::sigmap.tickValues(t, &bar, &beat, &tick); c1.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick); - double time = double(MusEGlobal::tempomap.tick2frame(t) /*ev->frame*/) / double(MusEGlobal::sampleRate); + double time = double(MusEGlobal::tempomap.tick2frame(t)) / double(MusEGlobal::sampleRate); int min = int(time) / 60; int sec = int(time) % 60; int msec = int((time - (min*60 + sec)) * 1000.0); @@ -938,7 +933,7 @@ LMasterSigEventItem::LMasterSigEventItem(QTreeWidget* parent, const AL::SigEvent void LMaster::tempoButtonClicked() { LMasterTempoItem* lastTempo = (LMasterTempoItem*) getLastOfType(LMASTER_TEMPO); -// QString beatString = ((LMasterLViewItem*)lastTempo)->text(LMASTER_BEAT_COL); +// QString beatString = ((LMasterLViewItem*)lastTempo)->text(LMASTER_BEAT_COL); DELETETHIS? // int m, b, t; // Pos p = Pos(beatString); // p.mbt(&m, &b, &t); @@ -948,7 +943,6 @@ void LMaster::tempoButtonClicked() MusECore::TEvent* ev = new MusECore::TEvent(lastTempo->tempo(), newTick); new LMasterTempoItem(view, ev); QTreeWidgetItem* newTempoItem = view->topLevelItem(0); - //LMasterTempoItem* newTempoItem = new LMasterTempoItem(view, ev); editingNewItem = true; // State editorColumn = LMASTER_VAL_COL; // Set that we edit editorColumn @@ -965,7 +959,7 @@ void LMaster::tempoButtonClicked() void LMaster::timeSigButtonClicked() { LMasterSigEventItem* lastSig = (LMasterSigEventItem*) getLastOfType(LMASTER_SIGEVENT); -// QString beatString = ((LMasterLViewItem*)lastSig)->text(LMASTER_BEAT_COL); +// QString beatString = ((LMasterLViewItem*)lastSig)->text(LMASTER_BEAT_COL); DELETETHIS // int m, b, t; // Pos p = Pos(beatString); // p.mbt(&m, &b, &t); @@ -975,7 +969,6 @@ void LMaster::timeSigButtonClicked() AL::SigEvent* ev = new AL::SigEvent(AL::TimeSignature(lastSig->z(), lastSig->n()), newTick); new LMasterSigEventItem(view, ev); QTreeWidgetItem* newSigItem = view->topLevelItem(0); - //LMasterSigEventItem* newSigItem = new LMasterSigEventItem(view, ev); editingNewItem = true; // State editorColumn = LMASTER_VAL_COL; // Set that we edit editorColumn @@ -992,13 +985,12 @@ void LMaster::insertKey() { LMasterKeyEventItem* lastKey = (LMasterKeyEventItem*) getLastOfType(LMASTER_KEYEVENT); - //QString beatString = ((LMasterLViewItem*)lastKey)->text(LMASTER_BEAT_COL); + //QString beatString = ((LMasterLViewItem*)lastKey)->text(LMASTER_BEAT_COL); DELETETHIS //int m, b, t; //Pos p = Pos(beatString); //p.mbt(&m, &b, &t); //m++; //Next bar - //int newTick = AL::sigmap.bar2tick(m, b, t); int newTick = MusEGlobal::song->cpos(); new LMasterKeyEventItem(view, MusECore::KeyEvent(lastKey->key(), newTick)); QTreeWidgetItem* newKeyItem = view->topLevelItem(0); @@ -1066,17 +1058,4 @@ void LMaster::comboboxTimerSlot() key_editor->showPopup(); } -//void LMaster::keyPressEvent(QKeyEvent*ev) -//{ -// switch (ev->key()) { -// case Qt::Key_Return: -// // add return as a valid action for editing values too -// cmd (CMD_EDIT_VALUE); -// break; -// default: -// break; -// } -// MidiEditor::keyPressEvent(ev); -//} - } // namespace MusEGui diff --git a/muse2/muse/master/lmaster.h b/muse2/muse/master/lmaster.h index 33b40f30..367eff77 100644 --- a/muse2/muse/master/lmaster.h +++ b/muse2/muse/master/lmaster.h @@ -28,7 +28,6 @@ #include "cobject.h" #include "tempo.h" #include "keyevent.h" -///#include "sig.h" #include "al/sig.h" #include @@ -154,9 +153,6 @@ class LMaster : public MidiEditor { QAction *tempoAction, *signAction, *posAction, *valAction, *delAction, *keyAction; -// protected: -// virtual void keyPressEvent(QKeyEvent*); - private slots: void select(QTreeWidgetItem*, QTreeWidgetItem*); void itemDoubleClicked(QTreeWidgetItem* item); diff --git a/muse2/muse/master/master.cpp b/muse2/muse/master/master.cpp index 02bef8a1..239467ee 100644 --- a/muse2/muse/master/master.cpp +++ b/muse2/muse/master/master.cpp @@ -245,7 +245,7 @@ void Master::viewMouseMoveEvent(QMouseEvent* event) { QPoint pos = event->pos(); // QPoint dist = pos - start; -// bool moving = dist.y() >= 3 || dist.y() <= 3 || dist.x() >= 3 || dist.x() <= 3; +// bool moving = dist.y() >= 3 || dist.y() <= 3 || dist.x() >= 3 || dist.x() <= 3; DELETETHIS switch (drag) { case DRAG_NEW: diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp index 571d3c83..82ac697b 100644 --- a/muse2/muse/master/masteredit.cpp +++ b/muse2/muse/master/masteredit.cpp @@ -35,9 +35,10 @@ #include "xml.h" #include "lcombo.h" #include "doublelabel.h" -///#include "sigedit.h" #include "globals.h" #include "app.h" +#include "gconfig.h" +#include "audio.h" #include @@ -76,7 +77,7 @@ void MasterEdit::songChanged(int type) return; if (type & SC_TEMPO) { - int tempo = MusEGlobal::tempomap.tempo(MusEGlobal::song->cpos()); + int tempo = MusEGlobal::tempomap.tempoAt(MusEGlobal::song->cpos()); // Bypass the useList flag and read from the list. curTempo->blockSignals(true); curTempo->setValue(double(60000000.0/tempo)); @@ -105,12 +106,10 @@ MasterEdit::MasterEdit() : MidiEditor(TopWin::MASTER, _rasterInit, 0) { setWindowTitle(tr("MusE: Mastertrack")); + setFocusPolicy(Qt::NoFocus); _raster = 0; // measure //---------Pulldown Menu---------------------------- -// QPopupMenu* file = new QPopupMenu(this); -// menuBar()->insertItem("&File", file); - QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config")); settingsMenu->addAction(subwinAction); settingsMenu->addAction(shareAction); @@ -123,6 +122,7 @@ MasterEdit::MasterEdit() QToolBar* enableMaster = addToolBar(tr("Enable master")); enableMaster->setObjectName("Enable master"); enableButton = new QToolButton(); + enableButton->setFocusPolicy(Qt::NoFocus); enableButton->setCheckable(true); enableButton->setText(tr("Enable")); enableButton->setToolTip(tr("Enable usage of master track")); @@ -150,7 +150,7 @@ MasterEdit::MasterEdit() QT_TRANSLATE_NOOP("MusEGui::MasterEdit", "Off"), QT_TRANSLATE_NOOP("MusEGui::MasterEdit", "Bar"), "1/2", "1/4", "1/8", "1/16" }; rasterLabel = new MusEGui::LabelCombo(tr("Snap"), 0); - rasterLabel->setFocusPolicy(Qt::NoFocus); + rasterLabel->setFocusPolicy(Qt::TabFocus); for (int i = 0; i < 6; i++) rasterLabel->insertItem(i, tr(rastval[i])); rasterLabel->setCurrentIndex(1); @@ -160,17 +160,16 @@ MasterEdit::MasterEdit() //---------values for current position--------------- info->addWidget(new QLabel(tr("CurPos "))); curTempo = new MusEGui::TempoEdit(0); - curSig = new SigEdit(0); + curSig = new SigEdit(0); // SigEdit is already StrongFocus. + curTempo->setFocusPolicy(Qt::StrongFocus); curSig->setValue(AL::TimeSignature(4, 4)); curTempo->setToolTip(tr("tempo at current position")); curSig->setToolTip(tr("time signature at current position")); info->addWidget(curTempo); info->addWidget(curSig); - ///connect(curSig, SIGNAL(valueChanged(int,int)), song, SLOT(setSig(int,int))); - connect(curSig, SIGNAL(valueChanged(const AL::TimeSignature&)), MusEGlobal::song, SLOT(setSig(const AL::TimeSignature&))); - - ///connect(curTempo, SIGNAL(valueChanged(double)), song, SLOT(setTempo(double))); - connect(curTempo, SIGNAL(tempoChanged(double)), MusEGlobal::song, SLOT(setTempo(double))); + + connect(curSig, SIGNAL(valueChanged(const AL::TimeSignature&)), SLOT(sigChange(const AL::TimeSignature&))); + connect(curTempo, SIGNAL(tempoChanged(double)), SLOT(tempoChange(double))); //--------------------------------------------------- // master @@ -183,7 +182,7 @@ MasterEdit::MasterEdit() vscroll->setRange(30000, 250000); time1 = new MusEGui::MTScale(&_raster, mainw, xscale); sign = new MusEGui::SigScale(&_raster, mainw, xscale); -// thits = new MusEGui::HitScale(&_raster, mainw, xscale); +// thits = new MusEGui::HitScale(&_raster, mainw, xscale); DELETETHIS what IS this? delete zhits as well canvas = new Master(this, mainw, xscale, yscale); @@ -196,8 +195,6 @@ MasterEdit::MasterEdit() // Rest //--------------------------------------------------- -// QSizeGrip* corner = new QSizeGrip(mainw); - mainGrid->setRowStretch(5, 100); mainGrid->setColumnStretch(1, 100); @@ -206,19 +203,18 @@ MasterEdit::MasterEdit() mainGrid->addWidget(MusECore::hLine(mainw), 2, 1); mainGrid->addWidget(sign, 3, 1); mainGrid->addWidget(MusECore::hLine(mainw), 4, 1); -// mainGrid->addWidget(thits, 5, 1); +// mainGrid->addWidget(thits, 5, 1); DELETETHIS // mainGrid->addWidget(MusECore::hLine(mainw), 6, 1); mainGrid->addWidget(canvas, 5, 1); mainGrid->addWidget(tscale, 5, 0); mainGrid->addWidget(MusECore::hLine(mainw), 6, 1); -// mainGrid->addWidget(zhits, 9, 1); +// mainGrid->addWidget(zhits, 9, 1); DELETETHIS // mainGrid->addWidget(MusECore::hLine(mainw), 7, 1); mainGrid->addWidget(time2, 7, 1); mainGrid->addWidget(hscroll, 8, 1); mainGrid->addWidget(vscroll, 0, 2, 10, 1); -// mainGrid->addWidget(corner, 9, 2, AlignBottom | AlignRight); - canvas->setFocus(); // Tim. + canvas->setFocus(); connect(tools2, SIGNAL(toolChanged(int)), canvas, SLOT(setTool(int))); connect(vscroll, SIGNAL(scrollChanged(int)), canvas, SLOT(setYPos(int))); @@ -229,20 +225,20 @@ MasterEdit::MasterEdit() connect(hscroll, SIGNAL(scrollChanged(int)), time1, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scrollChanged(int)), sign, SLOT(setXPos(int))); -// connect(hscroll, SIGNAL(scrollChanged(int)), thits, SLOT(setXPos(int))); +// connect(hscroll, SIGNAL(scrollChanged(int)), thits, SLOT(setXPos(int))); DELETETHIS connect(hscroll, SIGNAL(scrollChanged(int)), canvas, SLOT(setXPos(int))); -// connect(hscroll, SIGNAL(scrollChanged(int)), zhits, SLOT(setXPos(int))); +// connect(hscroll, SIGNAL(scrollChanged(int)), zhits, SLOT(setXPos(int)));DELETETHIS connect(hscroll, SIGNAL(scrollChanged(int)), time2, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scaleChanged(int)), time1, SLOT(setXMag(int))); connect(hscroll, SIGNAL(scaleChanged(int)), sign, SLOT(setXMag(int))); -// connect(hscroll, SIGNAL(scaleChanged(int)), thits, SLOT(setXMag(int))); +// connect(hscroll, SIGNAL(scaleChanged(int)), thits, SLOT(setXMag(int)));DELETETHIS connect(hscroll, SIGNAL(scaleChanged(int)), canvas, SLOT(setXMag(int))); -// connect(hscroll, SIGNAL(scaleChanged(int)), zhits, SLOT(setXMag(int))); +// connect(hscroll, SIGNAL(scaleChanged(int)), zhits, SLOT(setXMag(int))); DELETETHIS connect(hscroll, SIGNAL(scaleChanged(int)), time2, SLOT(setXMag(int))); connect(time1, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); -// connect(sign, SIGNAL(timeChanged(unsigned)), pos, SLOT(setValue(unsigned))); +// connect(sign, SIGNAL(timeChanged(unsigned)), pos, SLOT(setValue(unsigned))); DELETETHIS // connect(thits, SIGNAL(timeChanged(unsigned)), pos, SLOT(setValue(unsigned))); // connect(canvas, SIGNAL(timeChanged(unsigned)), pos, SLOT(setValue(unsigned))); // connect(zhits, SIGNAL(timeChanged(unsigned)), pos, SLOT(setValue(unsigned))); @@ -256,6 +252,14 @@ MasterEdit::MasterEdit() connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int))); connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); + if(MusEGlobal::config.smartFocus) + { + connect(curSig, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(curSig, SIGNAL(escapePressed()), SLOT(focusCanvas())); + connect(curTempo, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(curTempo, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } + initTopwinState(); MusEGlobal::muse->topwinMenuInited(this); } @@ -266,7 +270,6 @@ MasterEdit::MasterEdit() MasterEdit::~MasterEdit() { - //undoRedo->removeFrom(tools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -297,7 +300,7 @@ void MasterEdit::readStatus(MusECore::Xml& xml) break; case MusECore::Xml::TagEnd: if (tag == "master") { - // raster setzen + // set raster int item = 0; switch(_raster) { case 1: item = 0; break; @@ -372,6 +375,16 @@ void MasterEdit::writeConfiguration(int level, MusECore::Xml& xml) xml.tag(level, "/masteredit"); } +//--------------------------------------------------------- +// focusCanvas +//--------------------------------------------------------- + +void MasterEdit::focusCanvas() +{ + canvas->setFocus(); + canvas->activateWindow(); +} + //--------------------------------------------------------- // _setRaster //--------------------------------------------------------- @@ -383,6 +396,8 @@ void MasterEdit::_setRaster(int index) }; _raster = rasterTable[index]; _rasterInit = _raster; + if(MusEGlobal::config.smartFocus) + focusCanvas(); } //--------------------------------------------------------- @@ -393,7 +408,7 @@ void MasterEdit::posChanged(int idx, unsigned val, bool) { if (idx == 0) { int z, n; - int tempo = MusEGlobal::tempomap.tempo(val); + int tempo = MusEGlobal::tempomap.tempoAt(val); // Bypass the useList flag and read from the list. AL::sigmap.timesig(val, z, n); curTempo->blockSignals(true); curSig->blockSignals(true); @@ -435,5 +450,24 @@ void MasterEdit::setTempo(int val) tempo->setValue(val); } } + +void MasterEdit::sigChange(const AL::TimeSignature& sig) +{ + // TODO: FIXME: Tempo/sig undo + redo broken here. Either fix tempo and sig, or finish something here... + MusEGlobal::audio->msgAddSig(MusEGlobal::song->cPos().tick(), sig.z, sig.n); // Add will replace if found. +} + +void MasterEdit::tempoChange(double t) +{ + if(int(t) == 0) + return; + + // TODO: FIXME: Tempo/sig undo + redo broken here. Either fix tempo and sig, or finish something here... Also in transport. + //MusEGlobal::song->startUndo(); + //iTEvent e = find(tick); + //MusEGlobal::audio->msgDeleteTempo(it->first, it->second, false); + MusEGlobal::audio->msgAddTempo(MusEGlobal::song->cPos().tick(), int(60000000.0/t), true); // Add will replace if found. + //MusEGlobal::song->endUndo(SC_TEMPO); +} } // namespace MusEGui diff --git a/muse2/muse/master/masteredit.h b/muse2/muse/master/masteredit.h index 835ca879..faff69e2 100644 --- a/muse2/muse/master/masteredit.h +++ b/muse2/muse/master/masteredit.h @@ -85,10 +85,12 @@ class MasterEdit : public MidiEditor { void posChanged(int,unsigned,bool); void setTime(unsigned); void setTempo(int); + void sigChange(const AL::TimeSignature&); + void tempoChange(double); + void focusCanvas(); public slots: void songChanged(int); -// void tempoChanged(double); signals: void isDeleting(MusEGui::TopWin*); diff --git a/muse2/muse/master/tscale.cpp b/muse2/muse/master/tscale.cpp index 57bb898d..2dbc9eac 100644 --- a/muse2/muse/master/tscale.cpp +++ b/muse2/muse/master/tscale.cpp @@ -38,7 +38,6 @@ TScale::TScale(QWidget* parent, int ymag) : View(parent, 1, ymag) { setFont(MusEGlobal::config.fonts[5]); - //int w = 4 * QFontMetrics(MusEGlobal::config.fonts[4]).width('0'); int w = 4 * fontMetrics().width('0'); setFixedWidth(w); setMouseTracking(true); @@ -52,7 +51,6 @@ void TScale::pdraw(QPainter& p, const QRect& r) { int y = r.y(); int h = r.height(); - //p.setFont(MusEGlobal::config.fonts[4]); QString s; for (int i = 30000; i <= 250000; i += 10000) { int yy = mapy(280000 - i); @@ -62,8 +60,6 @@ void TScale::pdraw(QPainter& p, const QRect& r) continue; p.drawLine(0, yy, width(), yy); s.setNum(i/1000); - //QFontMetrics fm(MusEGlobal::config.fonts[4]); - //p.drawText(width() - fm.width(s) - 1, yy-2, s); p.drawText(width() - fontMetrics().width(s) - 1, yy-2, s); // Use the window font. Tim p4.0.31 } } diff --git a/muse2/muse/memory.cpp b/muse2/muse/memory.cpp index a1ece0a7..8fd70da6 100644 --- a/muse2/muse/memory.cpp +++ b/muse2/muse/memory.cpp @@ -61,8 +61,6 @@ Pool::~Pool() void Pool::grow(int idx) { -// printf("grow memory idx %d\n", idx); - int esize = (idx+1) * sizeof(unsigned long); Chunk* n = new Chunk; @@ -93,14 +91,13 @@ struct mops { }; typedef std::list > List; -// typedef std::vector List; typedef List::iterator iList; //--------------------------------------------------------- // main // 2.8 s normal 0.7 vector // 2.5 s RTalloc -// 1.18 alle optimierungen (0.97) +// 1.18 all optimisations (0.97) //--------------------------------------------------------- int main() diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp index 85a47ead..2c3c3d8c 100644 --- a/muse2/muse/midi.cpp +++ b/muse2/muse/midi.cpp @@ -168,7 +168,6 @@ QString nameSysex(unsigned int len, const unsigned char* buf) case 0x43: s = "Yamaha: "; break; case 0x44: s = "Casio"; break; case 0x45: s = "Akai"; break; - //case 0x7c: s = "MusE Soft Synth"; break; case MUSE_SYNTH_SYSEX_MFG_ID: s = "MusE Soft Synth"; break; // p4.0.27 case 0x7d: s = "Educational Use"; break; case 0x7e: s = "Universal: Non Real Time"; break; @@ -423,7 +422,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, break; case 0x6: // Marker { - unsigned ltick = CALC_TICK(tick);//(tick * MusEGlobal::config.division + div/2) / div; + unsigned ltick = CALC_TICK(tick); MusEGlobal::song->addMarker(QString((const char*)(data)), ltick, false); } break; @@ -439,8 +438,8 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, case 0x51: // Tempo { unsigned tempo = data[2] + (data[1] << 8) + (data[0] <<16); - unsigned ltick = CALC_TICK(tick);// (unsigned(tick) * unsigned(MusEGlobal::config.division) + unsigned(div/2)) / unsigned(div); - // After ca 10 mins 32 bits will not be enough... This expression has to be changed/factorized or so in some "sane" way... + unsigned ltick = CALC_TICK(tick); + // FIXME: After ca 10 mins 32 bits will not be enough... This expression has to be changed/factorized or so in some "sane" way... MusEGlobal::tempomap.addTempo(ltick, tempo); } break; @@ -451,8 +450,7 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, int timesig_n = 1; for (int i = 0; i < n; i++) timesig_n *= 2; - int ltick = CALC_TICK(tick);//(tick * MusEGlobal::config.division + div/2) / div; - ///sigmap.add(ltick, timesig_z, timesig_n); + int ltick = CALC_TICK(tick); AL::sigmap.add(ltick, AL::TimeSignature(timesig_z, timesig_n)); } break; @@ -535,9 +533,9 @@ void buildMidiEventList(EventList* del, const MPEventList* el, MidiTrack* track, i->first, ev.pitch(), ev.velo()); continue; } - int tick = CALC_TICK(ev.tick()); //(ev.tick() * MusEGlobal::config.division + div/2) / div; + int tick = CALC_TICK(ev.tick()); if (ev.isNote()) { - int lenTick = CALC_TICK(ev.lenTick()); //(ev.lenTick() * MusEGlobal::config.division + div/2) / div; + int lenTick = CALC_TICK(ev.lenTick()); ev.setLenTick(lenTick); } ev.setTick(tick); @@ -566,7 +564,7 @@ void Audio::sendLocalOff() { for (int k = 0; k < MIDI_PORTS; ++k) { for (int i = 0; i < MIDI_CHANNELS; ++i) - MusEGlobal::midiPorts[k].sendEvent(MusECore::MidiPlayEvent(0, k, i, MusECore::ME_CONTROLLER, MusECore::CTRL_LOCAL_OFF, 0)); + MusEGlobal::midiPorts[k].sendEvent(MusECore::MidiPlayEvent(0, k, i, MusECore::ME_CONTROLLER, MusECore::CTRL_LOCAL_OFF, 0), true); } } @@ -636,12 +634,10 @@ void Audio::initDevices() } } // - // damit Midi-Devices, die mehrere Ports besitzen, wie z.B. - // das Korg NS5R, nicht mehrmals zwischen GM und XG/GS hin und - // hergeschaltet werden, wird zun�hst auf allen Ports GM - // initialisiert, und dann erst XG/GS + // First all ports are initialized to GM and then are changed + // to XG/GS in order to prevent that devices with more than one + // port, e.g. Korg NS5R, toggle between GM and XG/GS several times. // - // Standard initialization... for (int i = 0; i < MIDI_PORTS; ++i) { if (!activePorts[i]) @@ -1082,14 +1078,12 @@ void Audio::processMidi() if (devport == defaultPort) { event.setPort(port); if(md && track->recEcho()) - //playEvents->add(event); md->addScheduledEvent(event); } else { // Hmm, this appears to work, but... Will this induce trouble with md->setNextPlayEvent?? MidiDevice* mdAlt = MusEGlobal::midiPorts[devport].device(); if(mdAlt && track->recEcho()) - //mdAlt->playEvents()->add(event); mdAlt->addScheduledEvent(event); } // Shall we activate meters even while rec echo is off? Sure, why not... @@ -1128,7 +1122,6 @@ void Audio::processMidi() drumRecEvent.setB(preVelo); // Tested: Events were not being recorded for a drum map entry pointing to a // different port. This must have been wrong - buildMidiEventList would ignore this. Tim. - //drumRecEvent.setPort(devport); drumRecEvent.setPort(port); //rec-event to current port drumRecEvent.setChannel(track->outChannel()); //rec-event to current channel @@ -1174,11 +1167,9 @@ void Audio::processMidi() else if (state == PRECOUNT) { isMeasure = (clickno % clicksMeasure) == 0; } - //int frame = MusEGlobal::tempomap.tick2frame(midiClick) + frameOffset; int evtime = extsync ? midiClick : MusEGlobal::tempomap.tick2frame(midiClick) + frameOffset; // p3.3.25 if (md) { - //MusECore::MidiPlayEvent ev(frame, MusEGlobal::clickPort, MusEGlobal::clickChan, MusECore::ME_NOTEON, MusECore::MidiPlayEvent ev(evtime, MusEGlobal::clickPort, MusEGlobal::clickChan, MusECore::ME_NOTEON, MusEGlobal::beatClickNote, MusEGlobal::beatClickVelo); @@ -1193,7 +1184,6 @@ void Audio::processMidi() md->addStuckNote(ev); } if (MusEGlobal::audioClickFlag) { - //MusECore::MidiPlayEvent ev1(frame, 0, 0, MusECore::ME_NOTEON, 0, 0); MusECore::MidiPlayEvent ev(evtime, 0, 0, MusECore::ME_NOTEON, 0, 0); ev.setA(isMeasure ? 0 : 1); metronome->addScheduledEvent(ev); @@ -1221,7 +1211,6 @@ void Audio::processMidi() // ALSA devices handled by another thread. if((*id)->deviceType() != MidiDevice::ALSA_MIDI) - //if((*id)->deviceType() == MidiDevice::JACK_MIDI) (*id)->processMidi(); } MusEGlobal::midiBusy=false; diff --git a/muse2/muse/midi.h b/muse2/muse/midi.h index 0d83b7ae..711b36d5 100644 --- a/muse2/muse/midi.h +++ b/muse2/muse/midi.h @@ -90,8 +90,7 @@ QString midiMetaName(int); class MPEventList; class MidiTrack; -extern void buildMidiEventList(EventList* mel, const MPEventList* el, MidiTrack* track, int division, bool /*addSysexMeta*/, bool /*doLoops*/); -// extern bool checkSysex(MidiTrack* track, unsigned int len, unsigned char* buf); +extern void buildMidiEventList(EventList* mel, const MPEventList* el, MidiTrack* track, int division, bool addSysexMeta, bool doLoops); } // namespace MusECore diff --git a/muse2/muse/midictrl.cpp b/muse2/muse/midictrl.cpp index c477297e..b95ccf77 100644 --- a/muse2/muse/midictrl.cpp +++ b/muse2/muse/midictrl.cpp @@ -148,7 +148,6 @@ void initMidiController() defaultMidiController.add(&veloCtrl); defaultMidiController.add(&pitchCtrl); defaultMidiController.add(&programCtrl); - // Removed p3.3.37 Re-added p4.0.15 defaultMidiController.add(&mastervolCtrl); defaultMidiController.add(&volumeCtrl); defaultMidiController.add(&panCtrl); @@ -198,11 +197,6 @@ QString midiCtrlNumString(int ctrl, bool fullyQualified) QString midiCtrlName(int ctrl, bool fullyQualified) { - //if (ctrl < 0x10000) - // return QString(ctrlName[ctrl]); - //return QString("?N?"); - - // p4.0.25 Tim int h = (ctrl >> 8) & 0xff; int l = ctrl & 0xff; QString s1 = QString("%1").arg(h); @@ -271,7 +265,6 @@ void MidiController::copy(const MidiController &mc) _minVal = mc._minVal; _maxVal = mc._maxVal; _initVal = mc._initVal; - //updateBias(); _bias = mc._bias; } @@ -291,17 +284,12 @@ MidiController& MidiController::operator=(const MidiController &mc) MidiController::ControllerType midiControllerType(int num) { - // p3.3.37 - //if (num < 0x10000) if (num < CTRL_14_OFFSET) return MidiController::Controller7; - //if (num < 0x20000) if (num < CTRL_RPN_OFFSET) return MidiController::Controller14; - //if (num < 0x30000) if (num < CTRL_NRPN_OFFSET) return MidiController::RPN; - //if (num < 0x40000) if (num < CTRL_INTERNAL_OFFSET) return MidiController::NRPN; if (num == CTRL_PITCH) @@ -310,10 +298,8 @@ MidiController::ControllerType midiControllerType(int num) return MidiController::Program; if (num == CTRL_VELOCITY) return MidiController::Velo; - //if (num < 0x60000) if (num < CTRL_NRPN14_OFFSET) return MidiController::RPN14; - //if (num < 0x70000) if (num < CTRL_NONE_OFFSET) return MidiController::NRPN14; return MidiController::Controller7; @@ -366,14 +352,6 @@ void MidiController::updateBias() break; } - // Special handling of pan: Only thing to do is force the range! - //if(_num == CTRL_PANPOT) - //{ - // _minVal = -64; - // _maxVal = 63; - // _initVal = 0; - //} - // TODO: Limit _minVal and _maxVal to range. if(_minVal >= 0) @@ -386,11 +364,9 @@ void MidiController::updateBias() { // Adjust bias to fit desired range. if(_minVal + _bias < mn) - //_minVal = mn - _bias; _bias += mn - _minVal + _bias; else if(_maxVal + _bias > mx) - //_maxVal = mx - _bias; _bias -= _maxVal + _bias - mx; } } @@ -467,7 +443,6 @@ void MidiController::write(int level, Xml& xml) const if(_initVal != CTRL_VAL_UNKNOWN) xml.nput(" init=\"%d\"", _initVal); } - //xml.put(level, " />"); xml.put(" />"); } @@ -532,14 +507,11 @@ void MidiController::read(Xml& xml) case RPN: if (_maxVal == NOT_SET) _maxVal = 127; - // p3.3.37 - //_num |= 0x20000; _num |= CTRL_RPN_OFFSET; break; case NRPN: if (_maxVal == NOT_SET) _maxVal = 127; - //_num |= 0x30000; _num |= CTRL_NRPN_OFFSET; break; case Controller7: @@ -547,7 +519,6 @@ void MidiController::read(Xml& xml) _maxVal = 127; break; case Controller14: - //_num |= 0x10000; _num |= CTRL_14_OFFSET; if (_maxVal == NOT_SET) _maxVal = 16383; @@ -555,13 +526,11 @@ void MidiController::read(Xml& xml) case RPN14: if (_maxVal == NOT_SET) _maxVal = 16383; - //_num |= 0x50000; _num |= CTRL_RPN14_OFFSET; break; case NRPN14: if (_maxVal == NOT_SET) _maxVal = 16383; - //_num |= 0x60000; _num |= CTRL_NRPN14_OFFSET; break; case Pitch: @@ -604,10 +573,8 @@ int MidiController::genNum(MidiController::ControllerType t, int h, int l) case Controller14: return val + CTRL_14_OFFSET; case RPN: - //return l + CTRL_RPN_OFFSET; return val + CTRL_RPN_OFFSET; case NRPN: - //return l + CTRL_NRPN_OFFSET; return val + CTRL_NRPN_OFFSET; case RPN14: return val + CTRL_RPN14_OFFSET; @@ -772,8 +739,6 @@ int MidiCtrlValList::value(int tick, Part* part) const // return true if new controller value added or replaced //--------------------------------------------------------- -// Changed by T356. -//bool MidiCtrlValList::add(int tick, int val) bool MidiCtrlValList::addMCtlVal(int tick, int val, Part* part) { iMidiCtrlVal e = findMCtlVal(tick, part); @@ -798,8 +763,6 @@ bool MidiCtrlValList::addMCtlVal(int tick, int val, Part* part) // del //--------------------------------------------------------- -// Changed by T356. -//void MidiCtrlValList::del(int tick) void MidiCtrlValList::delMCtlVal(int tick, Part* part) { iMidiCtrlVal e = findMCtlVal(tick, part); @@ -815,8 +778,6 @@ void MidiCtrlValList::delMCtlVal(int tick, Part* part) // find //--------------------------------------------------------- -// Changed by T356. -//iMidiCtrlVal MidiCtrlValList::find(int tick, Part* part) iMidiCtrlVal MidiCtrlValList::findMCtlVal(int tick, Part* part) { MidiCtrlValRange range = equal_range(tick); @@ -834,8 +795,6 @@ iMidiCtrlVal MidiCtrlValList::findMCtlVal(int tick, Part* part) MidiControllerList::MidiControllerList(const MidiControllerList& mcl) : std::map() { - //copy(mcl); - for(ciMidiController i = mcl.begin(); i != mcl.end(); ++i) { MidiController* mc = i->second; @@ -843,26 +802,4 @@ MidiControllerList::MidiControllerList(const MidiControllerList& mcl) : std::map } } -//--------------------------------------------------------- -// copy -//--------------------------------------------------------- -//void MidiControllerList::copy(const MidiControllerList &mcl) -//{ -// clear(); -// for(ciMidiController i = mcl.begin(); i != mcl.end(); ++i) -// { -// MidiController* mc = *i; -// push_back(new MidiController(*mc)); -// } -//} - -//--------------------------------------------------------- -// operator = -//--------------------------------------------------------- -//MidiControllerList& MidiControllerList::operator= (const MidiControllerList &mcl) -//{ -// copy(mcl); -// return *this; -//} - } // namespace MusECore diff --git a/muse2/muse/midictrl.h b/muse2/muse/midictrl.h index 8a0a3c6d..74902bc2 100644 --- a/muse2/muse/midictrl.h +++ b/muse2/muse/midictrl.h @@ -80,11 +80,6 @@ const int CTRL_LOCAL_OFF = 0x7a; // 122 // internal controller types: const int CTRL_INTERNAL_OFFSET = 0x40000; -// p3.3.37 -//const int CTRL_PITCH = 0x40000; -//const int CTRL_PROGRAM = 0x40001; -//const int CTRL_VELOCITY = 0x40002; -//const int CTRL_MASTER_VOLUME = 0x40003; const int CTRL_PITCH = CTRL_INTERNAL_OFFSET; const int CTRL_PROGRAM = CTRL_INTERNAL_OFFSET + 1; const int CTRL_VELOCITY = CTRL_INTERNAL_OFFSET + 2; @@ -167,15 +162,10 @@ struct MidiCtrlVal // list for easy retrieval //--------------------------------------------------------- -// Changed by T356. -//typedef std::map >::iterator iMidiCtrlVal; -//typedef std::map >::const_iterator ciMidiCtrlVal; typedef std::multimap >::iterator iMidiCtrlVal; typedef std::multimap >::const_iterator ciMidiCtrlVal; typedef std::pair MidiCtrlValRange; -// Changed by T356. -//class MidiCtrlValList : public std::map > { class MidiCtrlValList : public std::multimap > { int ctrlNum; @@ -194,11 +184,7 @@ class MidiCtrlValList : public std::multimap > iMidiCtrlVal iValue(int tick); int value(int tick) const; - //int value(int tick, Part** part = 0) const; int value(int tick, Part* part) const; - // Changed by T356. - //bool add(int tick, int value); - //void del(int tick); bool addMCtlVal(int tick, int value, Part* part); void delMCtlVal(int tick, Part* part); diff --git a/muse2/muse/mididev.cpp b/muse2/muse/mididev.cpp index f7686e18..31a8f6fe 100644 --- a/muse2/muse/mididev.cpp +++ b/muse2/muse/mididev.cpp @@ -42,7 +42,6 @@ #include "sync.h" #include "midiitransform.h" #include "part.h" -//#include "mpevent.h" namespace MusEGlobal { MusECore::MidiDeviceList midiDevices; @@ -92,6 +91,9 @@ void initMidiDevices() void MidiDevice::init() { + stopPending = false; + seekPending = false; + _readEnable = false; _writeEnable = false; _rwFlags = 3; @@ -109,7 +111,6 @@ MidiDevice::MidiDevice() _tmpRecordCount[i] = 0; _sysexFIFOProcessed = false; - //_sysexWritingChunks = false; _sysexReadingChunks = false; init(); @@ -122,7 +123,6 @@ MidiDevice::MidiDevice(const QString& n) _tmpRecordCount[i] = 0; _sysexFIFOProcessed = false; - //_sysexWritingChunks = false; _sysexReadingChunks = false; init(); @@ -205,43 +205,17 @@ void MidiDevice::beforeProcess() _sysexFIFOProcessed = false; } -/* -//--------------------------------------------------------- -// getEvents -//--------------------------------------------------------- - -void MidiDevice::getEvents(unsigned , unsigned , int ch, MPEventList* dst) //from //to -{ - for (int i = 0; i < _tmpRecordCount; ++i) { - const MidiPlayEvent& ev = _recordFifo.peek(i); - if (ch == -1 || (ev.channel() == ch)) - dst->insert(ev); - } - - //while(!recordFifo.isEmpty()) - //{ - // MidiPlayEvent e(recordFifo.get()); - // if (ch == -1 || (e.channel() == ch)) - // dst->insert(e); - //} -} -*/ - //--------------------------------------------------------- // recordEvent //--------------------------------------------------------- void MidiDevice::recordEvent(MidiRecordEvent& event) { - // p3.3.35 // TODO: Tested, but record resolution not so good. Switch to wall clock based separate list in MidiDevice. And revert this line. //event.setTime(MusEGlobal::audio->timestamp()); event.setTime(MusEGlobal::extSyncFlag.value() ? MusEGlobal::lastExtMidiSyncTick : MusEGlobal::audio->timestamp()); - //printf("MidiDevice::recordEvent event time:%d\n", event.time()); - // By T356. Set the loop number which the event came in at. - //if(MusEGlobal::audio->isRecording()) if(MusEGlobal::audio->isPlaying()) event.setLoopNum(MusEGlobal::audio->loopCount()); @@ -255,10 +229,7 @@ void MidiDevice::recordEvent(MidiRecordEvent& event) if(_port != -1) { int idin = MusEGlobal::midiPorts[_port].syncInfo().idIn(); - -// p3.3.26 1/23/10 Section was disabled, enabled by Tim. -//#if 0 - + //--------------------------------------------------- // filter some SYSEX events //--------------------------------------------------- @@ -268,21 +239,17 @@ void MidiDevice::recordEvent(MidiRecordEvent& event) int n = event.len(); if (n >= 4) { if ((p[0] == 0x7f) - //&& ((p[1] == 0x7f) || (p[1] == rxDeviceId))) { && ((p[1] == 0x7f) || (idin == 0x7f) || (p[1] == idin))) { if (p[2] == 0x06) { - //mmcInput(p, n); MusEGlobal::midiSeq->mmcInput(_port, p, n); return; } if (p[2] == 0x01) { - //mtcInputFull(p, n); MusEGlobal::midiSeq->mtcInputFull(_port, p, n); return; } } else if (p[0] == 0x7e) { - //nonRealtimeSystemSysex(p, n); MusEGlobal::midiSeq->nonRealtimeSystemSysex(_port, p, n); return; } @@ -291,9 +258,6 @@ void MidiDevice::recordEvent(MidiRecordEvent& event) else // Trigger general activity indicator detector. Sysex has no channel, don't trigger. MusEGlobal::midiPorts[_port].syncInfo().trigActDetect(event.channel()); - -//#endif - } // @@ -485,8 +449,9 @@ bool MidiDevice::putEvent(const MidiPlayEvent& ev) putMidiEvent(MidiPlayEvent(0, 0, chn, ME_CONTROLLER, CTRL_LBANK, lb)); return putMidiEvent(MidiPlayEvent(0, 0, chn, ME_PROGRAM, pr, 0)); } + return false; // Should absorb anyway and return, right? p4.0.48 Tim. } -#if 1 // if ALSA cannot handle RPN NRPN etc. +#if 1 // if ALSA cannot handle RPN NRPN etc. DELETETHIS? remove the wrapping #if #endif if (a < CTRL_14_OFFSET) { // 7 Bit Controller putMidiEvent(ev); @@ -590,6 +555,35 @@ void MidiDevice::handleStop() if(_port == -1) return; + MidiPort* mp = &MusEGlobal::midiPorts[_port]; + + //--------------------------------------------------- + // send midi stop + //--------------------------------------------------- + + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!MusEGlobal::extSyncFlag.value()) + { + // Shall we check open flags? DELETETHIS 4? + //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) + //if(!(dev->openFlags() & 1)) + // return; + + MidiSyncInfo& si = mp->syncInfo(); + if(si.MMCOut()) + mp->sendMMCStop(); + + if(si.MRTOut()) + { + mp->sendStop(); + //DELETETHIS 5? + // Added check of option send continue not start. Hmm, is this required? Seems to make other devices unhappy. + // (Could try now that this is in MidiDevice.) + //if(!si.sendContNotStart()) + // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / MusEGlobal::config.division); + } + } + //--------------------------------------------------- // Clear all notes and handle stuck notes //--------------------------------------------------- @@ -599,26 +593,24 @@ void MidiDevice::handleStop() { MidiPlayEvent ev = *i; ev.setTime(0); - _playEvents.add(ev); + putEvent(ev); } _stuckNotes.clear(); - //--------------------------------------------------- // reset sustain //--------------------------------------------------- - MidiPort* mp = &MusEGlobal::midiPorts[_port]; for(int ch = 0; ch < MIDI_CHANNELS; ++ch) { if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) { - //printf("send clear sustain!!!!!!!! port %d ch %d\n", i,ch); MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); putEvent(ev); } } + /* DELETETHIS 23 //--------------------------------------------------- // send midi stop //--------------------------------------------------- @@ -626,11 +618,6 @@ void MidiDevice::handleStop() // Don't send if external sync is on. The master, and our sync routing system will take care of that. if(!MusEGlobal::extSyncFlag.value()) { - // Shall we check open flags? - //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) - //if(!(dev->openFlags() & 1)) - // return; - MidiSyncInfo& si = mp->syncInfo(); if(si.MMCOut()) mp->sendMMCStop(); @@ -639,17 +626,13 @@ void MidiDevice::handleStop() { // Send STOP mp->sendStop(); - - // p3.3.31 - // Added check of option send continue not start. - // Hmm, is this required? Seems to make other devices unhappy. - // (Could try now that this is in MidiDevice. p4.0.22 ) - /* - if(!si.sendContNotStart()) - mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / MusEGlobal::config.division); - */ + // Added check of option send continue not start. Hmm, is this required? Seems to make other devices unhappy. + // (Could try now that this is in MidiDevice.) + //if(!si.sendContNotStart()) + // mp->sendSongpos(MusEGlobal::audio->tickPos() * 4 / MusEGlobal::config.division); } } + */ } //--------------------------------------------------------- @@ -662,6 +645,27 @@ void MidiDevice::handleSeek() if(_port == -1) return; + MidiPort* mp = &MusEGlobal::midiPorts[_port]; + MidiCtrlValListList* cll = mp->controller(); + int pos = MusEGlobal::audio->tickPos(); + + //--------------------------------------------------- + // Send STOP + //--------------------------------------------------- + + // Don't send if external sync is on. The master, and our sync routing system will take care of that. + if(!MusEGlobal::extSyncFlag.value()) + { + if(mp->syncInfo().MRTOut()) + { + // Shall we check for device write open flag to see if it's ok to send?... + //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) + //if(!(openFlags() & 1)) + // continue; + mp->sendStop(); + } + } + //--------------------------------------------------- // If playing, clear all notes and handle stuck notes //--------------------------------------------------- @@ -673,17 +677,15 @@ void MidiDevice::handleSeek() { MidiPlayEvent ev = *i; ev.setTime(0); - _playEvents.add(ev); + //_playEvents.add(ev); + putEvent(ev); // For immediate playback try putEvent, putMidiEvent, or sendEvent (for the optimizations) instead. + //mp->sendEvent(ev); } _stuckNotes.clear(); } - MidiPort* mp = &MusEGlobal::midiPorts[_port]; - MidiCtrlValListList* cll = mp->controller(); - int pos = MusEGlobal::audio->tickPos(); - //--------------------------------------------------- - // Send new contoller values + // Send new controller values //--------------------------------------------------- for(iMidiCtrlValList ivl = cll->begin(); ivl != cll->end(); ++ivl) @@ -693,10 +695,32 @@ void MidiDevice::handleSeek() if(imcv != vl->end()) { Part* p = imcv->second.part; + // Don't send if part or track is muted or off. + if(!p || p->mute()) + continue; + Track* track = p->track(); + if(track && (track->isMute() || track->off())) + continue; unsigned t = (unsigned)imcv->first; // Do not add values that are outside of the part. if(p && t >= p->tick() && t < (p->tick() + p->lenTick()) ) - _playEvents.add(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); + //_playEvents.add(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val)); + // Use sendEvent to get the optimizations and limiting. But force if there's a value at this exact position. + mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val), imcv->first == pos); + //mp->sendEvent(MidiPlayEvent(0, _port, ivl->first >> 24, ME_CONTROLLER, vl->num(), imcv->second.val), pos == 0 || imcv->first == pos); + } + } + + //--------------------------------------------------- + // reset sustain + //--------------------------------------------------- + + for(int ch = 0; ch < MIDI_CHANNELS; ++ch) + { + if(mp->hwCtrlState(ch, CTRL_SUSTAIN) == 127) + { + MidiPlayEvent ev(0, _port, ch, ME_CONTROLLER, CTRL_SUSTAIN, 0); + putEvent(ev); } } @@ -709,24 +733,9 @@ void MidiDevice::handleSeek() { if(mp->syncInfo().MRTOut()) { - // Shall we check for device write open flag to see if it's ok to send?... - // This means obey what the user has chosen for read/write in the midi port config dialog, - // which already takes into account whether the device is writable or not. - //if(!(rwFlags() & 0x1) || !(openFlags() & 1)) - //if(!(openFlags() & 1)) - // continue; - + //mp->sendStop(); // Moved above int beat = (pos * 4) / MusEGlobal::config.division; - - //bool isPlaying = false; - //if(state == PLAY) - // isPlaying = true; - bool isPlaying = MusEGlobal::audio->isPlaying(); // Check this it includes LOOP1 and LOOP2 besides PLAY. p4.0.22 - - mp->sendStop(); mp->sendSongpos(beat); - if(isPlaying) - mp->sendContinue(); } } } diff --git a/muse2/muse/mididev.h b/muse2/muse/mididev.h index 57c96090..18a58623 100644 --- a/muse2/muse/mididev.h +++ b/muse2/muse/mididev.h @@ -28,7 +28,6 @@ #include #include "mpevent.h" -//#include "sync.h" #include "route.h" #include "globaldefs.h" @@ -37,7 +36,6 @@ namespace MusECore { -//class RouteList; class Xml; //--------------------------------------------------------- @@ -57,9 +55,6 @@ class MidiDevice { bool _readEnable; // set when opened/closed. bool _writeEnable; // - //int _sysexWriteChunk; - //int _sysexReadChunk; - //bool _sysexWritingChunks; bool _sysexReadingChunks; MPEventList _stuckNotes; @@ -69,6 +64,9 @@ class MidiDevice { MidiFifo eventFifo; // Recording fifos. To speed up processing, one per channel plus one special system 'channel' for channel-less events like sysex. MidiRecFifo _recordFifo[MIDI_CHANNELS + 1]; + + volatile bool stopPending; + volatile bool seekPending; RouteList _inRoutes, _outRoutes; @@ -126,7 +124,7 @@ class MidiDevice { virtual bool putEvent(const MidiPlayEvent&); // This method will try to putEvent 'tries' times, waiting 'delayUs' microseconds between tries. // Since it waits, it should not be used in RT or other time-sensitive threads. p4.0.15 - bool putEventWithRetry(const MidiPlayEvent&, int /*tries*/ = 2, long /*delayUs*/ = 50000); // 2 tries, 50 mS by default. + bool putEventWithRetry(const MidiPlayEvent&, int tries = 2, long delayUs = 50000); // 2 tries, 50 mS by default. virtual void handleStop(); virtual void handleSeek(); @@ -140,11 +138,8 @@ class MidiDevice { MidiRecFifo& recordEvents(const unsigned int ch) { return _recordFifo[ch]; } bool sysexFIFOProcessed() { return _sysexFIFOProcessed; } void setSysexFIFOProcessed(bool v) { _sysexFIFOProcessed = v; } - //bool sysexWritingChunks() { return _sysexWritingChunks; } - //void setSysexWritingChunks(bool v) { _sysexWritingChunks = v; } bool sysexReadingChunks() { return _sysexReadingChunks; } void setSysexReadingChunks(bool v) { _sysexReadingChunks = v; } - //virtual void getEvents(unsigned /*from*/, unsigned /*to*/, int /*channel*/, MPEventList* /*dst*/); bool sendNullRPNParams(int, bool); }; diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index ad0226da..ab967fa9 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -35,8 +35,6 @@ #include #include #include -//#include -//#include #include "dcanvas.h" #include "midieditor.h" @@ -97,7 +95,7 @@ CItem* DrumCanvas::addItem(MusECore::Part* part, MusECore::Event& event) int diff = event.endTick()-part->lenTick(); if (diff > 0) {// too short part? extend it - //printf("addItem - this code should not be run!\n"); + //printf("addItem - this code should not be run!\n"); DELETETHIS //MusECore::Part* newPart = part->clone(); //newPart->setLenTick(newPart->lenTick()+diff); //MusEGlobal::audio->msgChangePart(part, newPart,false); @@ -159,7 +157,6 @@ DrumCanvas::DrumCanvas(MidiEditor* pr, QWidget* parent, int sx, DrumCanvas::~DrumCanvas() { - //items.clearDelete(); if (must_delete_our_drum_map && ourDrumMap!=NULL) delete [] ourDrumMap; @@ -338,10 +335,9 @@ bool DrumCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& newEvent.setPitch(ev_pitch); newEvent.setTick(ntick); - // Added by T356, removed by flo93: with operation groups, it happens that the - // part is too short right now, even if it's queued for being extended - //if(((int)newEvent.endTick() - (int)part->lenTick()) > 0) - // printf("DrumCanvas::moveItem Error! New event end:%d exceeds length:%d of part:%s\n", newEvent.endTick(), part->lenTick(), part->name().toLatin1().constData()); + // don't check, whether the new event is within the part + // at this place. with operation groups, the part isn't + // resized yet. (flo93) if (dtype == MOVE_COPY || dtype == MOVE_CLONE) operations.push_back(MusECore::UndoOp(MusECore::UndoOp::AddEvent, newEvent, dest_part, false, false)); @@ -364,7 +360,7 @@ bool DrumCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& CItem* DrumCanvas::newItem(const QPoint& p, int state) { - int instr = y2pitch(p.y()); //MusEGlobal::drumInmap[y2pitch(p.y())]; + int instr = y2pitch(p.y()); if ((instr<0) || (instr>=getOurDrumMapSize())) return NULL; @@ -449,10 +445,8 @@ void DrumCanvas::newItem(CItem* item, bool noSnap, bool replace) int npitch = event.pitch(); //event.setPitch(npitch); // commented out by flo: has no effect - // // check for existing event // if found change command semantic from insert to delete - // MusECore::EventList* el = nevent->part()->events(); MusECore::iEvent lower = el->lower_bound(event.tick()); MusECore::iEvent upper = el->upper_bound(event.tick()); @@ -858,7 +852,7 @@ void DrumCanvas::dragLeaveEvent(QDragLeaveEvent*) //--------------------------------------------------------- void DrumCanvas::keyPressed(int index, int velocity) - { +{ using MusECore::MidiTrack; if ((index<0) || (index>=getOurDrumMapSize())) diff --git a/muse2/muse/midiedit/dlist.cpp b/muse2/muse/midiedit/dlist.cpp index ad0d05dd..e099ecc9 100644 --- a/muse2/muse/midiedit/dlist.cpp +++ b/muse2/muse/midiedit/dlist.cpp @@ -71,7 +71,7 @@ void DList::draw(QPainter& p, const QRect& rect) if (dm == currentlySelected) p.fillRect(x, yy, w, TH, Qt::yellow); // else -// p.eraseRect(x, yy, w, TH); +// p.eraseRect(x, yy, w, TH); DELETETHIS? QHeaderView *h = header; p.save(); p.setWorldMatrixEnabled(false); @@ -87,8 +87,6 @@ void DList::draw(QPainter& p, const QRect& rect) QString s; int align = Qt::AlignVCenter | Qt::AlignHCenter; - //p.save(); - //p.setWorldMatrixEnabled(false); switch (k) { case COL_VOLUME: s.setNum(dm->vol); @@ -181,7 +179,6 @@ void DList::draw(QPainter& p, const QRect& rect) } if (!s.isEmpty()) p.drawText(r, align, s); - //p.restore(); } p.restore(); } @@ -282,7 +279,6 @@ void DList::devicesPopupMenu(MusECore::DrumMap* t, int x, int y, bool changeAll) { int instr = getSelectedInstrument(); if(instr != -1) - //emit curDrumInstrumentChanged(instr); MusEGlobal::song->update(SC_DRUMMAP); } } @@ -991,7 +987,7 @@ void DList::init(QHeaderView* h, QWidget* parent) h = new QHeaderView(Qt::Horizontal, parent); header = h; - //ORCAN- CHECK if really needed: header->setTracking(true); + //ORCAN- CHECK if really needed: header->setTracking(true); DELETETHIS seems like it's unneeded ;) connect(header, SIGNAL(sectionResized(int,int,int)), SLOT(sizeChange(int,int,int))); connect(header, SIGNAL(sectionMoved(int, int,int)), SLOT(moved(int,int,int))); @@ -1104,7 +1100,7 @@ void DList::viewMouseReleaseEvent(QMouseEvent* ev) emit mapChanged(sInstrument, (unsigned)dInstrument); //Track instrument change done in canvas } drag = NORMAL; -//?? redraw(); //commented out NOT by flo93; was already commented out +//?? redraw(); //commented out NOT by flo93; was already commented out. DELETETHIS? not the below, only this single line! // if (editEntry) //removed by flo93; seems to work without it // editor->setFocus(); //and causes segfaults after adding the pitchedits int x = ev->x(); diff --git a/muse2/muse/midiedit/dlist.h b/muse2/muse/midiedit/dlist.h index d864f23e..517ac722 100644 --- a/muse2/muse/midiedit/dlist.h +++ b/muse2/muse/midiedit/dlist.h @@ -141,8 +141,6 @@ class DList : public View { void devicesPopupMenu(MusECore::DrumMap* t, int x, int y, bool changeAll); void init(QHeaderView*, QWidget*); - - //void setCurDrumInstrument(int n); private slots: void sizeChange(int, int, int); diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp index b4518fa9..e5b965f1 100644 --- a/muse2/muse/midiedit/drumedit.cpp +++ b/muse2/muse/midiedit/drumedit.cpp @@ -65,21 +65,6 @@ namespace MusEGui { -/* -static const char* map_file_pattern[] = { - "Presets (*.map *.map.gz *.map.bz2)", - "All Files (*)", - 0 - }; -static const char* map_file_save_pattern[] = { - "Presets (*.map)", - "gzip compressed presets (*.map.gz)", - "bzip2 compressed presets (*.map.bz2)", - "All Files (*)", - 0 - }; -*/ - int DrumEdit::_rasterInit = 96; int DrumEdit::_dlistWidthInit = 50; int DrumEdit::_dcanvasWidthInit = 300; @@ -143,7 +128,6 @@ void DrumEdit::closeEvent(QCloseEvent* e) _isDeleting = true; // Set flag so certain signals like songChanged, which may cause crash during delete, can be ignored. QSettings settings("MusE", "MusE-qt"); - //settings.setValue("Drumedit/geometry", saveGeometry()); settings.setValue("Drumedit/windowState", saveState()); //Store values of the horizontal splitter @@ -163,7 +147,7 @@ void DrumEdit::closeEvent(QCloseEvent* e) DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, unsigned initPos) : MidiEditor(TopWin::DRUM, _rasterInit, pl, parent, name) { - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); split1w1 = 0; selPart = 0; @@ -388,12 +372,14 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un QToolButton *ldm = new QToolButton(); ldm->setToolTip(tr("Load Drummap")); ldm->setIcon(*openIcon); + ldm->setFocusPolicy(Qt::NoFocus); connect(ldm, SIGNAL(clicked()), SLOT(load())); maptools->addWidget(ldm); QToolButton *sdm = new QToolButton(); sdm->setToolTip(tr("Store Drummap")); sdm->setIcon(*saveIcon); + sdm->setFocusPolicy(Qt::NoFocus); connect(sdm, SIGNAL(clicked()), SLOT(save())); maptools->addWidget(sdm); @@ -408,12 +394,14 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un srec->setToolTip(tr("Step Record")); srec->setIcon(*steprecIcon); srec->setCheckable(true); + srec->setFocusPolicy(Qt::NoFocus); tools->addWidget(srec); midiin = new QToolButton(); midiin->setToolTip(tr("Midi Input")); midiin->setIcon(*midiinIcon); midiin->setCheckable(true); + midiin->setFocusPolicy(Qt::NoFocus); tools->addWidget(midiin); @@ -436,7 +424,8 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un stepLenWidget->addItem("8"); stepLenWidget->addItem("16"); stepLenWidget->setCurrentIndex(0); - connect(stepLenWidget, SIGNAL(currentIndexChanged(QString)), SLOT(setStep(QString))); + stepLenWidget->setFocusPolicy(Qt::TabFocus); + connect(stepLenWidget, SIGNAL(activated(QString)), SLOT(setStep(QString))); cursorToolbar->addWidget(stepLenWidget); addToolBarBreak(); @@ -456,9 +445,9 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un QPushButton* ctrl = new QPushButton(tr("ctrl"), mainw); ctrl->setObjectName("Ctrl"); ctrl->setFont(MusEGlobal::config.fonts[3]); - //hscroll = new MusEGui::ScrollScale(-25, -2, xscale, 20000, Qt::Horizontal, mainw); - // Increased scale to -1. To resolve/select/edit 1-tick-wide (controller graph) events. p4.0.18 Tim. - hscroll = new MusEGui::ScrollScale(-25, -1, xscale, 20000, Qt::Horizontal, mainw); + ctrl->setFocusPolicy(Qt::NoFocus); + // Increased scale to -1. To resolve/select/edit 1-tick-wide (controller graph) events. + hscroll = new MusEGui::ScrollScale(-25, -1 /* formerly -2 */, xscale, 20000, Qt::Horizontal, mainw); ctrl->setFixedSize(40, hscroll->sizeHint().height()); ctrl->setToolTip(tr("Add Controller View")); @@ -472,8 +461,6 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un mainGrid->addWidget(ctrl, 1, 0); mainGrid->addWidget(hscroll, 1, 1); mainGrid->addWidget(corner, 1, 2, Qt::AlignBottom|Qt::AlignRight); -// mainGrid->addRowSpacing(1, hscroll->sizeHint().height()); -// mainGrid->addItem(new QSpacerItem(0, hscroll->sizeHint().height()), 1, 0); split2 = new MusEGui::Splitter(Qt::Horizontal, split1, "split2"); split1w1 = new QWidget(split2); @@ -503,7 +490,7 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un split2->setSizes(mops); // By T356. Not much choice but to disable this for now, to stop runaway resize bug. // Can't seem to get the splitter to readjust when manually setting sizes. - //split2->setResizeMode(split1w1, QSplitter::KeepSize); + //split2->setResizeMode(split1w1, QSplitter::KeepSize); DELETETHIS or FIXME? gridS2->setRowStretch(1, 100); gridS2->setColumnStretch(0, 100); @@ -513,9 +500,8 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un gridS2->addWidget(canvas, 2, 0); gridS2->addWidget(vscroll, 2, 1); - // - // Reihenfolge in dlist.c festgeschrieben ("Dcols") - // + + // Ordering is hardcoded in dlist.c ("Dcols") header = new MusEGui::Header(split1w1, "header"); header->setFixedHeight(31); header->setColumnLabel(tr("H"), COL_HIDE, 20); @@ -596,7 +582,12 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un connect(toolbar, SIGNAL(rasterChanged(int)), SLOT(setRaster(int))); connect(toolbar, SIGNAL(soloChanged(bool)), SLOT(soloChanged(bool))); connect(info, SIGNAL(valueChanged(MusEGui::NoteInfo::ValType, int)), SLOT(noteinfoChanged(MusEGui::NoteInfo::ValType, int))); - + if(MusEGlobal::config.smartFocus) + { + connect(info, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(info, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } + connect(ctrl, SIGNAL(clicked()), SLOT(addCtrl())); QClipboard* cb = QApplication::clipboard(); @@ -700,7 +691,6 @@ void DrumEdit::setTime(unsigned tick) DrumEdit::~DrumEdit() { - //MusEGlobal::undoRedo->removeFrom(tools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -724,6 +714,16 @@ void DrumEdit::setSelection(int tick, MusECore::Event& e, MusECore::Part* p) selectionChanged(); } +//--------------------------------------------------------- +// focusCanvas +//--------------------------------------------------------- + +void DrumEdit::focusCanvas() +{ + canvas->setFocus(); + canvas->activateWindow(); +} + //--------------------------------------------------------- // soloChanged //--------------------------------------------------------- @@ -743,6 +743,8 @@ void DrumEdit::setRaster(int val) _rasterInit = val; MidiEditor::setRaster(val); canvas->redrawGrid(); + if(MusEGlobal::config.smartFocus) + focusCanvas(); // give back focus after kb input } //--------------------------------------------------------- @@ -774,7 +776,6 @@ void DrumEdit::noteinfoChanged(MusEGui::NoteInfo::ValType type, int val) break; } // Indicate do undo, and do not do port controller values and clone parts. - //MusEGlobal::audio->msgChangeEvent(selEvent, event, selPart); MusEGlobal::audio->msgChangeEvent(selEvent, event, selPart, true, false, false); } @@ -980,7 +981,6 @@ ende: void DrumEdit::save() { - //QString fn = MusEGui::getSaveFileName(QString("drummaps"), map_file_pattern, QString fn = MusEGui::getSaveFileName(QString("drummaps"), MusEGlobal::drum_map_file_save_pattern, this, tr("MusE: Store Drum Map")); if (fn.isEmpty()) @@ -1050,7 +1050,7 @@ void DrumEdit::cmd(int cmd) if (quantize_dialog->exec()) quantize_notes(partlist_to_set(parts()), quantize_dialog->range, (MusEGlobal::config.division*4)/raster, - /* quant_len= */false, quantize_dialog->strength, + /* quant_len= */false, quantize_dialog->strength, // DELETETHIS quantize_dialog->swing, quantize_dialog->threshold); break; } @@ -1109,8 +1109,6 @@ CtrlEdit* DrumEdit::addCtrl() connect(dlist, SIGNAL(curDrumInstrumentChanged(int)), canvas, SLOT(setCurDrumInstrument(int))); connect(canvas, SIGNAL(curPartHasChanged(MusECore::Part*)), ctrlEdit, SLOT(curPartHasChanged(MusECore::Part*))); - //printf("DrumEdit::addCtrl curDrumInstrument:%d\n", dlist->getSelectedInstrument()); - setCurDrumInstrument(dlist->getSelectedInstrument()); // p3.3.44 @@ -1121,7 +1119,6 @@ CtrlEdit* DrumEdit::addCtrl() if(split1w1) { - ///split2->setCollapsible(split1w1, false); split2->setCollapsible(split2->indexOf(split1w1), false); split1w1->setMinimumWidth(CTRL_PANEL_FIXED_WIDTH); } @@ -1155,7 +1152,6 @@ void DrumEdit::removeCtrl(CtrlEdit* ctrl) if(ctrlEditList.empty()) { split1w1->setMinimumWidth(0); - ///split2->setCollapsible(split1w1, true); split2->setCollapsible(split2->indexOf(split1w1), true); } } @@ -1171,11 +1167,8 @@ void DrumEdit::newCanvasWidth(int w) nw = 1; for (std::list::iterator i = ctrlEditList.begin(); - i != ctrlEditList.end(); ++i) { - // Changed by Tim. p3.3.7 - //(*i)->setCanvasWidth(w); + i != ctrlEditList.end(); ++i) (*i)->setCanvasWidth(nw); - } updateHScrollRange(); } @@ -1328,7 +1321,7 @@ void DrumEdit::keyPressEvent(QKeyEvent* event) } /* - else if (key == shortcuts[SHRT_INSERT_AT_LOCATION].key) { + else if (key == shortcuts[SHRT_INSERT_AT_LOCATION].key) { DELETETHIS pc->pianoCmd(CMD_INSERT); return; } @@ -1350,7 +1343,7 @@ void DrumEdit::keyPressEvent(QKeyEvent* event) else if (key == shortcuts[SHRT_TOGGLE_TRIOL].key) val = rasterTable[index + ((off == 0) ? 9 : 0)]; /* - else if (key == shortcuts[SHRT_EVENT_COLOR].key) { + else if (key == shortcuts[SHRT_EVENT_COLOR].key) { DELETETHIS if (colorMode == 0) colorMode = 1; else if (colorMode == 1) @@ -1417,7 +1410,6 @@ void DrumEdit::initShortcuts() //--------------------------------------------------------- void DrumEdit::execDeliveredScript(int id) { - //QString scriptfile = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id]; QString scriptfile = MusEGlobal::song->getScriptPath(id, true); MusEGlobal::song->executeScript(scriptfile.toLatin1().constData(), parts(), raster(), true); } @@ -1434,8 +1426,8 @@ void DrumEdit::execUserScript(int id) void DrumEdit::setStep(QString v) { ((DrumCanvas*)canvas)->setStep(v.toInt()); - stepLenWidget->setFocusPolicy(Qt::NoFocus); - canvas->setFocus(); + if(MusEGlobal::config.smartFocus) + focusCanvas(); } void DrumEdit::ourDrumMapChanged(bool instrMapChanged) diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h index 33491581..907b8b84 100644 --- a/muse2/muse/midiedit/drumedit.h +++ b/muse2/muse/midiedit/drumedit.h @@ -122,7 +122,6 @@ class DrumEdit : public MidiEditor { private slots: void setRaster(int); void noteinfoChanged(MusEGui::NoteInfo::ValType type, int val); - //CtrlEdit* addCtrl(); void removeCtrl(CtrlEdit* ctrl); void cmd(int); void clipboardChanged(); // enable/disable "Paste" @@ -144,6 +143,7 @@ class DrumEdit : public MidiEditor { void hideEmptyInstruments(); void display_old_new_conflict_message(); + void focusCanvas(); public slots: void setSelection(int, MusECore::Event&, MusECore::Part*); diff --git a/muse2/muse/midiedit/drummap.cpp b/muse2/muse/midiedit/drummap.cpp index d86bcd65..477b2f9d 100644 --- a/muse2/muse/midiedit/drummap.cpp +++ b/muse2/muse/midiedit/drummap.cpp @@ -119,77 +119,6 @@ const DrumMap idrumMap[DRUM_MAPSIZE] = { { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 97, 97, false }, { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 98, 98, false }, - /* - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 83, 83, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 84, 84, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 85, 85, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 86, 86, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 87, 87, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 88, 88, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 89, 89, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 90, 90, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 91, 91, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 92, 92, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 93, 93, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 94, 94, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 95, 95, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 96, 96, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 97, 97, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 98, 98, false }, - - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 83, 83, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 84, 84, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 85, 85, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 86, 86, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 87, 87, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 88, 88, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 89, 89, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 90, 90, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 91, 91, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 92, 92, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 93, 93, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 94, 94, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 95, 95, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 96, 96, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 97, 97, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 98, 98, false }, - - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 83, 83, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 84, 84, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 85, 85, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 86, 86, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 87, 87, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 88, 88, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 89, 89, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 90, 90, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 91, 91, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 92, 92, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 93, 93, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 94, 94, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 95, 95, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 96, 96, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 97, 97, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 98, 98, false }, - - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 83, 83, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 84, 84, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 85, 85, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 86, 86, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 87, 87, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 88, 88, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 89, 89, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 90, 90, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 91, 91, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 92, 92, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 93, 93, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 94, 94, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 95, 95, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 96, 96, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 97, 97, false }, - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 98, 98, false } - }; - */ - { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 99, 99, false }, { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 100, 100, false }, { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 101, 101, false }, @@ -339,9 +268,7 @@ void initDrumMap() void resetGMDrumMap() { MusEGlobal::audio->msgIdle(true); - // Delete all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(false); - MusEGlobal::song->changeAllPortDrumCtrlEvents(false); + MusEGlobal::song->changeAllPortDrumCtrlEvents(false); // Delete all port controller events. for(int i = 0; i < DRUM_MAPSIZE; ++i) MusEGlobal::drumMap[i] = idrumMap[i]; @@ -351,9 +278,8 @@ void resetGMDrumMap() MusEGlobal::drumInmap[(unsigned int)(MusEGlobal::drumMap[i].enote)] = i; MusEGlobal::drumOutmap[(unsigned int)(MusEGlobal::drumMap[i].anote)] = i; } - // Add all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(true); - MusEGlobal::song->changeAllPortDrumCtrlEvents(true); + + MusEGlobal::song->changeAllPortDrumCtrlEvents(true); // Add all port controller events. MusEGlobal::audio->msgIdle(false); } @@ -522,9 +448,7 @@ static void readDrummapEntry(Xml& xml, DrumMap* dm) void readDrumMap(Xml& xml, bool external) { MusEGlobal::audio->msgIdle(true); - // Delete all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(false); - MusEGlobal::song->changeAllPortDrumCtrlEvents(false); + MusEGlobal::song->changeAllPortDrumCtrlEvents(false); // Delete all port controller events. if (external) { for (int i = 0; i < DRUM_MAPSIZE; ++i) @@ -568,9 +492,8 @@ void readDrumMap(Xml& xml, bool external) MusEGlobal::drumInmap[(unsigned int)(MusEGlobal::drumMap[i].enote)] = i; MusEGlobal::drumOutmap[(unsigned int)(MusEGlobal::drumMap[i].anote)] = i; } - // Add all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(true); - MusEGlobal::song->changeAllPortDrumCtrlEvents(true); + + MusEGlobal::song->changeAllPortDrumCtrlEvents(true); // Add all port controller events. MusEGlobal::audio->msgIdle(false); return; @@ -579,9 +502,8 @@ void readDrumMap(Xml& xml, bool external) break; } } - // Add all port controller events. - //MusEGlobal::audio->msgChangeAllPortDrumCtrlEvents(true); - MusEGlobal::song->changeAllPortDrumCtrlEvents(true); + + MusEGlobal::song->changeAllPortDrumCtrlEvents(true); // Add all port controller events. MusEGlobal::audio->msgIdle(false); } diff --git a/muse2/muse/midiedit/drummap.h b/muse2/muse/midiedit/drummap.h index 7f28b068..2dca10d6 100644 --- a/muse2/muse/midiedit/drummap.h +++ b/muse2/muse/midiedit/drummap.h @@ -45,7 +45,6 @@ struct DrumMap { char lv1, lv2, lv3, lv4; // velocities char enote, anote; // input note - output note bool mute; -// bool selected; bool operator==(const DrumMap& map) const; bool operator!=(const DrumMap& map) const { return !operator==(map); } diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp index 3eeb4f84..984ec41c 100644 --- a/muse2/muse/midiedit/ecanvas.cpp +++ b/muse2/muse/midiedit/ecanvas.cpp @@ -21,6 +21,7 @@ // //========================================================= +#include #include #include #include @@ -77,9 +78,7 @@ QString EventCanvas::getCaption() const { int bar1, bar2, xx; unsigned x; - ///sigmap.tickValues(curPart->tick(), &bar1, &xx, &x); AL::sigmap.tickValues(curPart->tick(), &bar1, &xx, &x); - ///sigmap.tickValues(curPart->tick() + curPart->lenTick(), &bar2, &xx, &x); AL::sigmap.tickValues(curPart->tick() + curPart->lenTick(), &bar2, &xx, &x); return QString("MusE: Part <") + curPart->name() @@ -151,7 +150,7 @@ void EventCanvas::songChanged(int flags) return; if (flags & ~SC_SELECTION) { - //items.clear(); + //items.clear(); DELETETHIS bool curItemNeedsRestore=false; MusECore::Event storedEvent; int partSn; @@ -182,10 +181,8 @@ void EventCanvas::songChanged(int flags) MusECore::EventList* el = part->events(); for (MusECore::iEvent i = el->begin(); i != el->end(); ++i) { MusECore::Event e = i->second; - // Added by T356. Do not add events which are either past, or extend past the end of the part. - // Reverted to just events which are past. p4.0.24 + // Do not add events which are past the end of the part. if(e.tick() > len) - //if(e.endTick() > len) break; if (e.isNote()) { @@ -288,13 +285,10 @@ MusECore::MidiTrack* EventCanvas::track() const void EventCanvas::keyPress(QKeyEvent* event) { int key = event->key(); - ///if (event->state() & Qt::ShiftButton) if (((QInputEvent*)event)->modifiers() & Qt::ShiftModifier) key += Qt::SHIFT; - ///if (event->state() & Qt::AltButton) if (((QInputEvent*)event)->modifiers() & Qt::AltModifier) key += Qt::ALT; - ///if (event->state() & Qt::ControlButton) if (((QInputEvent*)event)->modifiers() & Qt::ControlModifier) key+= Qt::CTRL; diff --git a/muse2/muse/midiedit/ecanvas.h b/muse2/muse/midiedit/ecanvas.h index ad19480e..349bb92b 100644 --- a/muse2/muse/midiedit/ecanvas.h +++ b/muse2/muse/midiedit/ecanvas.h @@ -73,7 +73,6 @@ class EventCanvas : public Canvas { void updateSelection(); virtual CItem* addItem(MusECore::Part*, MusECore::Event&) = 0; - // Added by T356. virtual QPoint raster(const QPoint&) const; virtual MusECore::Undo moveCanvasItems(CItemList&, int, int, DragType) = 0; virtual bool moveItem(MusECore::Undo&, CItem*, const QPoint&, DragType) = 0; diff --git a/muse2/muse/midiedit/piano.cpp b/muse2/muse/midiedit/piano.cpp index abd360df..1000ffe9 100644 --- a/muse2/muse/midiedit/piano.cpp +++ b/muse2/muse/midiedit/piano.cpp @@ -404,13 +404,10 @@ void Piano::draw(QPainter& p, const QRect& r) int drawY = octaveSize * drawKey + 81 - KH*2; if (drawY > r.y() && drawY < r.y() + r.height()) { - //printf("drawing c %d at %d r.y %d r.x %d\n",drawKey, drawY, r.y(), r.x()); p.drawPixmap(0,drawY,*c_keys[drawKey]); } } - //p.drawTiledPixmap(r, *c1, r.topLeft()+offset + coffset); - //printf("drawText KH %d %d, x %d y %d\n",KH, curPitch, r.x(), r.y()); - //p.drawText(r,Qt::AlignAuto,"A"); + if (curPitch == -1) return; int y = pitch2y(curPitch); @@ -457,7 +454,7 @@ int Piano::pitch2y(int pitch) const int Piano::y2pitch(int y) const { - const int total = (10 * 7 + 5) * KH; // 75 Ganztonschritte + const int total = (10 * 7 + 5) * KH; // 75 full tone steps y = total - y; int oct = (y / (7 * KH)) * 12; char kt[] = { @@ -524,7 +521,6 @@ void Piano::viewMouseMoveEvent(QMouseEvent* event) keyDown = nk; if (keyDown != -1) { int velocity = event->x()*127/40; - //emit keyPressed(keyDown, shift); emit keyPressed(keyDown, velocity>127 ? 127 : velocity, shift); } } diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp index 33245c4c..71b2abf8 100644 --- a/muse2/muse/midiedit/pianoroll.cpp +++ b/muse2/muse/midiedit/pianoroll.cpp @@ -157,12 +157,10 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, menuSelect->addSeparator(); - //selectPrevPartAction = select->addAction(tr("&Previous Part")); selectPrevPartAction = menuSelect->addAction(QIcon(*select_all_parts_on_trackIcon), tr("&Previous Part")); mapper->setMapping(selectPrevPartAction, PianoCanvas::CMD_SELECT_PREV_PART); connect(selectPrevPartAction, SIGNAL(triggered()), mapper, SLOT(map())); - //selNextPartAction = select->addAction(tr("&Next Part")); selectNextPartAction = menuSelect->addAction(QIcon(*select_all_parts_on_trackIcon), tr("&Next Part")); mapper->setMapping(selectNextPartAction, PianoCanvas::CMD_SELECT_NEXT_PART); connect(selectNextPartAction, SIGNAL(triggered()), mapper, SLOT(map())); @@ -232,17 +230,14 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, QActionGroup* actgrp = new QActionGroup(this); actgrp->setExclusive(true); - //evColorBlueAction = eventColor->addAction(tr("&Blue")); evColorBlueAction = actgrp->addAction(tr("&Blue")); evColorBlueAction->setCheckable(true); colorMapper->setMapping(evColorBlueAction, 0); - //evColorPitchAction = eventColor->addAction(tr("&Pitch colors")); evColorPitchAction = actgrp->addAction(tr("&Pitch colors")); evColorPitchAction->setCheckable(true); colorMapper->setMapping(evColorPitchAction, 1); - //evColorVelAction = eventColor->addAction(tr("&Velocity colors")); evColorVelAction = actgrp->addAction(tr("&Velocity colors")); evColorVelAction->setCheckable(true); colorMapper->setMapping(evColorVelAction, 2); @@ -269,18 +264,21 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, srec->setToolTip(tr("Step Record")); srec->setIcon(*steprecIcon); srec->setCheckable(true); + srec->setFocusPolicy(Qt::NoFocus); tools->addWidget(srec); midiin = new QToolButton(); midiin->setToolTip(tr("Midi Input")); midiin->setIcon(*midiinIcon); midiin->setCheckable(true); + midiin->setFocusPolicy(Qt::NoFocus); tools->addWidget(midiin); speaker = new QToolButton(); speaker->setToolTip(tr("Play Events")); speaker->setIcon(*speakerIcon); speaker->setCheckable(true); + speaker->setFocusPolicy(Qt::NoFocus); tools->addWidget(speaker); tools2 = new MusEGui::EditToolBar(this, pianorollTools); @@ -306,31 +304,21 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, hsplitter->setHandleWidth(2); QPushButton* ctrl = new QPushButton(tr("ctrl"), mainw); - //QPushButton* ctrl = new QPushButton(tr("C"), mainw); // Tim. ctrl->setObjectName("Ctrl"); ctrl->setFont(MusEGlobal::config.fonts[3]); ctrl->setToolTip(tr("Add Controller View")); - //hscroll = new MusEGui::ScrollScale(-25, -2, xscale, 20000, Qt::Horizontal, mainw); - // Increased scale to -1. To resolve/select/edit 1-tick-wide (controller graph) events. p4.0.18 Tim. - hscroll = new MusEGui::ScrollScale(-25, -1, xscale, 20000, Qt::Horizontal, mainw); + ctrl->setFocusPolicy(Qt::NoFocus); + // Increased scale to -1. To resolve/select/edit 1-tick-wide (controller graph) events. + hscroll = new MusEGui::ScrollScale(-25, -1 /* formerly -2 */, xscale, 20000, Qt::Horizontal, mainw); ctrl->setFixedSize(pianoWidth, hscroll->sizeHint().height()); - //ctrl->setFixedSize(pianoWidth / 2, hscroll->sizeHint().height()); // Tim. - - // Tim. - /* - QPushButton* trackInfoButton = new QPushButton(tr("T"), mainw); - trackInfoButton->setObjectName("TrackInfo"); - trackInfoButton->setFont(MusEGlobal::config.fonts[3]); - trackInfoButton->setToolTip(tr("Show track info")); - trackInfoButton->setFixedSize(pianoWidth / 2, hscroll->sizeHint().height()); - */ + //ctrl->setFixedSize(pianoWidth / 2, hscroll->sizeHint().height()); // DELETETHIS? QSizeGrip* corner = new QSizeGrip(mainw); midiTrackInfo = new MusEGui::MidiTrackInfo(mainw); int mtiw = midiTrackInfo->width(); // Save this. midiTrackInfo->setMinimumWidth(100); - //midiTrackInfo->setMaximumWidth(150); + //midiTrackInfo->setMaximumWidth(150); DELETETHIS ? midiTrackInfo->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding)); infoScroll = new QScrollArea; @@ -339,7 +327,8 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, infoScroll->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Expanding)); infoScroll->setWidget(midiTrackInfo); infoScroll->setWidgetResizable(true); - //infoScroll->setVisible(false); + infoScroll->setFocusPolicy(Qt::NoFocus); + //infoScroll->setVisible(false); DELETETHIS 4? //infoScroll->setEnabled(false); //hsplitter->addWidget(midiTrackInfo); @@ -350,7 +339,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, mainGrid->setColumnStretch(1, 100); mainGrid->addWidget(hsplitter, 0, 1, 1, 3); - // Original. + // Original. DELETETHIS 21 /* mainGrid->setColumnStretch(1, 100); mainGrid->addWidget(splitter, 0, 0, 1, 3); @@ -385,8 +374,6 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, canvas = new PianoCanvas(this, split1, xscale, yscale); vscroll = new MusEGui::ScrollScale(-3, 7, yscale, KH * 75, Qt::Vertical, split1); - //setFocusProxy(canvas); // Tim. - int offset = -(MusEGlobal::config.division/4); canvas->setOrigin(offset, 0); canvas->setCanvasTools(pianorollTools); @@ -398,7 +385,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, gridS1->setRowStretch(2, 100); gridS1->setColumnStretch(1, 100); - //gridS1->setColumnStretch(2, 100); // Tim. + //gridS1->setColumnStretch(2, 100); // Tim. DELETETHIS gridS1->addWidget(time, 0, 1, 1, 2); gridS1->addWidget(MusECore::hLine(split1), 1, 0, 1, 3); @@ -406,7 +393,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, gridS1->addWidget(canvas, 2, 1); gridS1->addWidget(vscroll, 2, 2); - // Tim. + // Tim. DELETETHIS /* gridS1->addWidget(time, 0, 2, 1, 3); gridS1->addWidget(MusECore::hLine(split1), 1, 1, 1, 4); @@ -429,11 +416,10 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, gridS2->addWidget(ctrl, 0, 0); gridS2->addWidget(hscroll, 0, 1); gridS2->addWidget(corner, 0, 2, Qt::AlignBottom|Qt::AlignRight); - //splitter->setCollapsible(0, true); + //splitter->setCollapsible(0, true); DELETETHIS piano->setFixedWidth(pianoWidth); - // Tim. QList mops; mops.append(mtiw + 30); // 30 for possible scrollbar mops.append(width() - mtiw - 30); @@ -442,8 +428,9 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, connect(tools2, SIGNAL(toolChanged(int)), canvas, SLOT(setTool(int))); connect(ctrl, SIGNAL(clicked()), SLOT(addCtrl())); - //connect(trackInfoButton, SIGNAL(clicked()), SLOT(toggleTrackInfo())); Tim. + //connect(trackInfoButton, SIGNAL(clicked()), SLOT(toggleTrackInfo())); Tim. DELETETHIS connect(info, SIGNAL(valueChanged(MusEGui::NoteInfo::ValType, int)), SLOT(noteinfoChanged(MusEGui::NoteInfo::ValType, int))); + connect(vscroll, SIGNAL(scrollChanged(int)), piano, SLOT(setYPos(int))); connect(vscroll, SIGNAL(scrollChanged(int)), canvas, SLOT(setYPos(int))); connect(vscroll, SIGNAL(scaleChanged(int)), canvas, SLOT(setYMag(int))); @@ -470,11 +457,18 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, connect(speaker, SIGNAL(toggled(bool)), SLOT(setSpeaker(bool))); connect(canvas, SIGNAL(followEvent(int)), SLOT(follow(int))); + if(MusEGlobal::config.smartFocus) + { + connect(info, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(info, SIGNAL(escapePressed()), SLOT(focusCanvas())); + connect(midiTrackInfo, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(midiTrackInfo, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } + connect(hscroll, SIGNAL(scaleChanged(int)), SLOT(updateHScrollRange())); piano->setYPos(KH * 30); canvas->setYPos(KH * 30); vscroll->setPos(KH * 30); - //setSelection(0, 0, 0); //Really necessary? Causes segfault when only 1 item selected, replaced by the following: info->setEnabled(false); connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged1(int))); @@ -490,10 +484,10 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, connect(toolbar, SIGNAL(rasterChanged(int)),SLOT(setRaster(int))); connect(toolbar, SIGNAL(soloChanged(bool)), SLOT(soloChanged(bool))); - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); + setEventColorMode(colorMode); - QClipboard* cb = QApplication::clipboard(); connect(cb, SIGNAL(dataChanged()), SLOT(clipboardChanged())); @@ -504,7 +498,6 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name, const MusECore::Pos cpos=MusEGlobal::song->cPos(); canvas->setPos(0, cpos.tick(), true); canvas->selectAtTick(cpos.tick()); - //canvas->selectFirst();// unsigned pos=0; if(initPos >= MAXINT) @@ -534,12 +527,10 @@ void PianoRoll::songChanged1(int bits) return; if (bits & SC_SOLO) - { toolbar->setSolo(canvas->track()->solo()); - return; - } + songChanged(bits); - //trackInfo->songChanged(bits); + // We'll receive SC_SELECTION if a different part is selected. if (bits & SC_SELECTION) updateTrackInfo(); @@ -552,7 +543,6 @@ void PianoRoll::songChanged1(int bits) void PianoRoll::configChanged() { initShortcuts(); - //trackInfo->updateTrackInfo(); } //--------------------------------------------------------- @@ -615,7 +605,6 @@ void PianoRoll::setTime(unsigned tick) PianoRoll::~PianoRoll() { - // MusEGlobal::undoRedo->removeFrom(tools); // p4.0.6 Removed } //--------------------------------------------------------- @@ -700,12 +689,22 @@ void PianoRoll::setSelection(int tick, MusECore::Event& e, MusECore::Part* p) selectionChanged(); } +//--------------------------------------------------------- +// focusCanvas +//--------------------------------------------------------- + +void PianoRoll::focusCanvas() +{ + canvas->setFocus(); + canvas->activateWindow(); +} + //--------------------------------------------------------- // edit currently selected Event //--------------------------------------------------------- void PianoRoll::noteinfoChanged(MusEGui::NoteInfo::ValType type, int val) - { + { int selections = canvas->selectionSize(); if (selections == 0) { @@ -731,7 +730,6 @@ void PianoRoll::noteinfoChanged(MusEGui::NoteInfo::ValType type, int val) break; } // Indicate do undo, and do not do port controller values and clone parts. - //MusEGlobal::audio->msgChangeEvent(selEvent, event, selPart); MusEGlobal::audio->msgChangeEvent(selEvent, event, selPart, true, false, false); } else { @@ -772,8 +770,7 @@ void PianoRoll::noteinfoChanged(MusEGui::NoteInfo::ValType type, int val) CtrlEdit* PianoRoll::addCtrl() { - ///CtrlEdit* ctrlEdit = new CtrlEdit(splitter, this, xscale, false, "pianoCtrlEdit"); - CtrlEdit* ctrlEdit = new CtrlEdit(ctrlLane/*splitter*/, this, xscale, false, "pianoCtrlEdit"); // ccharrett + CtrlEdit* ctrlEdit = new CtrlEdit(ctrlLane/* formerly splitter*/, this, xscale, false, "pianoCtrlEdit"); // ccharrett connect(tools2, SIGNAL(toolChanged(int)), ctrlEdit, SLOT(setTool(int))); connect(hscroll, SIGNAL(scrollChanged(int)), ctrlEdit, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scaleChanged(int)), ctrlEdit, SLOT(setXMag(int))); @@ -816,7 +813,6 @@ void PianoRoll::closeEvent(QCloseEvent* e) _isDeleting = true; // Set flag so certain signals like songChanged, which may cause crash during delete, can be ignored. QSettings settings("MusE", "MusE-qt"); - //settings.setValue("Pianoroll/geometry", saveGeometry()); settings.setValue("Pianoroll/windowState", saveState()); emit isDeleting(static_cast(this)); @@ -887,7 +883,8 @@ void PianoRoll::setRaster(int val) _rasterInit = val; MidiEditor::setRaster(val); canvas->redrawGrid(); - canvas->setFocus(); // give back focus after kb input + if(MusEGlobal::config.smartFocus) + focusCanvas(); // give back focus after kb input } //--------------------------------------------------------- @@ -1190,9 +1187,6 @@ void PianoRoll::setEventColorMode(int mode) colorMode = mode; colorModeInit = colorMode; - ///eventColor->setItemChecked(0, mode == 0); - ///eventColor->setItemChecked(1, mode == 1); - ///eventColor->setItemChecked(2, mode == 2); evColorBlueAction->setChecked(mode == 0); evColorPitchAction->setChecked(mode == 1); evColorVelAction->setChecked(mode == 2); @@ -1234,7 +1228,7 @@ void PianoRoll::setSpeaker(bool val) -/* +/* DELETETHIS //--------------------------------------------------------- // trackInfoScroll //--------------------------------------------------------- @@ -1289,7 +1283,6 @@ void PianoRoll::initShortcuts() //--------------------------------------------------------- void PianoRoll::execDeliveredScript(int id) { - //QString scriptfile = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id]; QString scriptfile = MusEGlobal::song->getScriptPath(id, true); MusEGlobal::song->executeScript(scriptfile.toAscii().data(), parts(), raster(), true); } @@ -1309,7 +1302,7 @@ void PianoRoll::execUserScript(int id) void PianoRoll::newCanvasWidth(int /*w*/) { -/* +/* DELETETHIS whole function? int nw = w + (vscroll->width() - 18); // 18 is the fixed width of the CtlEdit VScale widget. if(nw < 1) nw = 1; diff --git a/muse2/muse/midiedit/pianoroll.h b/muse2/muse/midiedit/pianoroll.h index 9b73fc1b..20ae093e 100644 --- a/muse2/muse/midiedit/pianoroll.h +++ b/muse2/muse/midiedit/pianoroll.h @@ -76,11 +76,6 @@ class PianoRoll : public MidiEditor { MusECore::MidiPart* selPart; int selTick; - //enum { CMD_EVENT_COLOR, CMD_CONFIG_QUANT, CMD_LAST }; - //int menu_ids[CMD_LAST]; - //Q3PopupMenu *menuEdit, *menuFunctions, *menuSelect, *menuConfig, *menuPlugins; - - QMenu *menuEdit, *menuFunctions, *menuSelect, *menuConfig, *eventColor, *menuPlugins; MusEGui::MidiTrackInfo *midiTrackInfo; MusECore::Track* selected; @@ -143,7 +138,6 @@ class PianoRoll : public MidiEditor { bool _playEvents; - //QScrollBar* infoScroll; QScrollArea* infoScroll; @@ -156,10 +150,8 @@ class PianoRoll : public MidiEditor { private slots: void setSelection(int, MusECore::Event&, MusECore::Part*); void noteinfoChanged(MusEGui::NoteInfo::ValType, int); - //CtrlEdit* addCtrl(); void removeCtrl(CtrlEdit* ctrl); void soloChanged(bool flag); - //void trackInfoScroll(int); void setRaster(int); void cmd(int); void setSteprec(bool); @@ -174,6 +166,7 @@ class PianoRoll : public MidiEditor { void newCanvasWidth(int); void toggleTrackInfo(); void updateTrackInfo(); + void focusCanvas(); signals: void isDeleting(MusEGui::TopWin*); diff --git a/muse2/muse/midiedit/prcanvas.cpp b/muse2/muse/midiedit/prcanvas.cpp index fe7f6979..794e04ad 100644 --- a/muse2/muse/midiedit/prcanvas.cpp +++ b/muse2/muse/midiedit/prcanvas.cpp @@ -38,11 +38,6 @@ #include #include #include -//#include -//#include -//#include -//#include -//#include #include "xml.h" #include "prcanvas.h" @@ -88,7 +83,7 @@ CItem* PianoCanvas::addItem(MusECore::Part* part, MusECore::Event& event) int diff = event.tick()-part->lenTick(); if (diff > 0) {// too short part? extend it - //printf("addItem - this code should not be run!\n"); + //printf("addItem - this code should not be run!\n"); DELETETHIS //MusECore::Part* newPart = part->clone(); //newPart->setLenTick(newPart->lenTick()+diff); //MusEGlobal::audio->msgChangePart(part, newPart,false); @@ -177,24 +172,16 @@ void PianoCanvas::drawItem(QPainter& p, const MusEGui::CItem* item, QRect rr = map(rect); // Use our own map instead. QRect mer = map(r); - ///r = r.intersected(rect); - //QRect rr = r & rect; - ///if(!r.isValid()) - //if(!rr.isValid()) - // return; QRect mr = rr & mer; - //if(!mr.isValid()) if(mr.isNull()) return; - //p.save(); - p.setPen(Qt::black); struct Triple { int r, g, b; }; - static Triple myColors /*Qt::color1*/[12] = { // ddskrjp + static Triple myColors [12] = { // ddskrjp { 0xff, 0x3d, 0x39 }, { 0x39, 0xff, 0x39 }, { 0x39, 0x3d, 0xff }, @@ -234,7 +221,7 @@ void PianoCanvas::drawItem(QPainter& p, const MusEGui::CItem* item, break; case 1: // pitch { - Triple* c = &myColors/*Qt::color1*/[event.pitch() % 12]; + Triple* c = &myColors[event.pitch() % 12]; color.setRgb(c->r, c->g, c->b); } break; @@ -261,7 +248,7 @@ void PianoCanvas::drawItem(QPainter& p, const MusEGui::CItem* item, int mey = mer.y(); int mew = mer.width(); int meh = mer.height(); - //int mfx = mx; + //int mfx = mx; DELETETHIS //if(mfx == mex) mfx += 1; //int mfy = my; //if(mfy == mey) mfy += 1; @@ -272,13 +259,13 @@ void PianoCanvas::drawItem(QPainter& p, const MusEGui::CItem* item, //if(mfh == meh) mfh -= 1; //if(mfy == mey) mfh -= 1; color.setAlpha(MusEGlobal::config.globalAlphaBlend); - //QLinearGradient gradient(mex + 1, mey + 1, mex + 1, mey + meh - 2); // Inside the border + //QLinearGradient gradient(mex + 1, mey + 1, mex + 1, mey + meh - 2); // Inside the border DELETETHIS //gradient.setColorAt(0, color); //gradient.setColorAt(1, color.darker()); //QBrush brush(gradient); QBrush brush(color); p.fillRect(mr, brush); - //p.fillRect(mfx, mfy, mfw, mfh, brush); + //p.fillRect(mfx, mfy, mfw, mfh, brush); DELETETHIS if(mex >= mx && mex <= mx + mw) p.drawLine(mex, my, mex, my + mh - 1); // The left edge @@ -289,9 +276,7 @@ void PianoCanvas::drawItem(QPainter& p, const MusEGui::CItem* item, if(mey + meh >= my && mey + meh <= my + mh) p.drawLine(mx, mey + meh - 1, mx + mw - 1, mey + meh - 1); // The bottom edge - //p.setWorldMatrixEnabled(true); p.setWorldMatrixEnabled(wmtxen); - //p.restore(); } //--------------------------------------------------------- @@ -307,10 +292,6 @@ void PianoCanvas::drawTopItem(QPainter& , const QRect&) void PianoCanvas::drawMoving(QPainter& p, const MusEGui::CItem* item, const QRect& rect) { - //if(((NEvent*)item)->part() != curPart) - // return; - //if(!item->isMoving()) - // return; QRect mr = QRect(item->mp().x(), item->mp().y() - item->height()/2, item->width(), item->height()); mr = mr.intersected(rect); if(!mr.isValid()) @@ -479,9 +460,7 @@ bool PianoCanvas::moveItem(MusECore::Undo& operations, MusEGui::CItem* item, con MusEGlobal::audio->msgPlayMidiEvent(&ev2); } - // Changed by T356. - MusECore::Part* part = nevent->part(); // - //MusECore::Part* part = Canvas::part(); // part can be dynamically recreated, ask the authority + MusECore::Part* part = nevent->part(); newEvent.setPitch(npitch); int ntick = editor->rasterVal(x) - part->tick(); @@ -490,10 +469,9 @@ bool PianoCanvas::moveItem(MusECore::Undo& operations, MusEGui::CItem* item, con newEvent.setTick(ntick); newEvent.setLenTick(event.lenTick()); - // Added by T356, removed by flo93: with operation groups, it happens that the - // part is too short right now, even if it's queued for being extended - //if(((int)newEvent.endTick() - (int)part->lenTick()) > 0) - // printf("PianoCanvas::moveItem Error! New event end:%d exceeds length:%d of part:%s\n", newEvent.endTick(), part->lenTick(), part->name().toLatin1().constData()); + // don't check, whether the new event is within the part + // at this place. with operation groups, the part isn't + // resized yet. (flo93) if (dtype == MOVE_COPY || dtype == MOVE_CLONE) operations.push_back(MusECore::UndoOp(MusECore::UndoOp::AddEvent, newEvent, part, false, false)); @@ -509,7 +487,6 @@ bool PianoCanvas::moveItem(MusECore::Undo& operations, MusEGui::CItem* item, con MusEGui::CItem* PianoCanvas::newItem(const QPoint& p, int) { - //printf("newItem point\n"); int pitch = y2pitch(p.y()); int tick = editor->rasterVal1(p.x()); int len = p.x() - tick; @@ -526,7 +503,6 @@ MusEGui::CItem* PianoCanvas::newItem(const QPoint& p, int) void PianoCanvas::newItem(MusEGui::CItem* item, bool noSnap) { - //printf("newItem citem\n"); NEvent* nevent = (NEvent*) item; MusECore::Event event = nevent->event(); int x = item->x(); @@ -560,8 +536,7 @@ void PianoCanvas::newItem(MusEGui::CItem* item, bool noSnap) MusEGlobal::song->applyOperationGroup(operations); } - //else forbid action by not applying it - else + else // forbid action by not applying it songChanged(SC_EVENT_INSERTED); //this forces an update of the itemlist, which is neccessary //to remove "forbidden" events from the list again } @@ -572,7 +547,6 @@ void PianoCanvas::newItem(MusEGui::CItem* item, bool noSnap) void PianoCanvas::resizeItem(MusEGui::CItem* item, bool noSnap, bool) // experimental changes to try dynamically extending parts { - //printf("resizeItem!\n"); NEvent* nevent = (NEvent*) item; MusECore::Event event = nevent->event(); MusECore::Event newEvent = event.clone(); @@ -583,7 +557,6 @@ void PianoCanvas::resizeItem(MusEGui::CItem* item, bool noSnap, bool) // if (noSnap) len = nevent->width(); else { - //MusECore::Part* part = nevent->part(); unsigned tick = event.tick() + part->tick(); len = editor->rasterVal(tick + nevent->width()) - tick; if (len <= 0) @@ -687,7 +660,7 @@ void PianoCanvas::pianoCmd(int cmd) for (std::list::iterator i = elist.begin(); i != elist.end(); ++i) { MusECore::Event event = *i; MusECore::Event newEvent = event.clone(); - newEvent.setTick(event.tick() + editor->raster());// - part->tick()); + newEvent.setTick(event.tick() + editor->raster());// - part->tick()); DELETETHIS // Do not do port controller values and clone parts. operations.push_back(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part, false, false)); } @@ -740,7 +713,7 @@ void PianoCanvas::pianoPressed(int pitch, int velocity, bool shift) MusECore::MidiPlayEvent e(0, port, channel, 0x90, pitch, velocity); MusEGlobal::audio->msgPlayMidiEvent(&e); - if (_steprec && curPart /* && pos[0] >= start_tick && pos[0] < end_tick [removed by flo93: this is handled in steprec->record] */) + if (_steprec && curPart) // && pos[0] >= start_tick && pos[0] < end_tick [removed by flo93: this is handled in steprec->record] steprec->record(curPart,pitch,editor->raster(),editor->raster(),velocity,MusEGlobal::globalKeyState&Qt::ControlModifier,shift, -1 /* anything which is != rcSteprecNote */); } @@ -770,6 +743,8 @@ void PianoCanvas::drawCanvas(QPainter& p, const QRect& rect) int w = rect.width(); int h = rect.height(); + //DELETETHIS whoa, clean up the whole function. remove every commented out code line + // Changed to draw in device coordinate space instead of virtual, transformed space. Tim. p4.0.30 //int mx = mapx(x); @@ -990,7 +965,7 @@ void PianoCanvas::startDrag(MusEGui::CItem* /* item*/, bool copymode) void PianoCanvas::dragEnterEvent(QDragEnterEvent* event) { - ///event->accept(Q3TextDrag::canDecode(event)); + //event->accept(Q3TextDrag::canDecode(event)); event->acceptProposedAction(); // TODO CHECK Tim. } @@ -1000,7 +975,7 @@ void PianoCanvas::dragEnterEvent(QDragEnterEvent* event) void PianoCanvas::dragMoveEvent(QDragMoveEvent*) { - //printf("drag move %x\n", this); + //printf("drag move %x\n", this); DELETETHIS (whole function?) //event->acceptProposedAction(); } @@ -1010,7 +985,7 @@ void PianoCanvas::dragMoveEvent(QDragMoveEvent*) void PianoCanvas::dragLeaveEvent(QDragLeaveEvent*) { - //printf("drag leave\n"); + //printf("drag leave\n"); DELETETHIS (whole function?) //event->acceptProposedAction(); } @@ -1159,7 +1134,6 @@ void PianoCanvas::modifySelected(MusEGui::NoteInfo::ValType type, int delta) } MusEGlobal::song->changeEvent(event, newEvent, part); // Indicate do not do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part, false, false)); already_done.append(QPair(part->events(), event)); diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 955a73d0..5722a275 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -69,12 +68,9 @@ using namespace std; #include "functions.h" #include "helper.h" #include "cmd.h" -#include "sig.h" #include "song.h" #include "shortcuts.h" -//#include "../ctrl/ctrledit.h" - using MusEGlobal::debugMsg; using MusEGlobal::heavyDebugMsg; @@ -108,7 +104,8 @@ QString IntToQStr(int i); -//do NOT put parentheses around this! +//do NOT put parentheses around this! and always right-multiply it, +//that is: foo * PAGESTEP, never PAGESTEP * foo! #define PAGESTEP 3/4 @@ -184,7 +181,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) : TopWin(TopWin::SCORE, parent, name) { setAttribute(Qt::WA_DeleteOnClose); - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); mainw = new QWidget(this); @@ -243,6 +240,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) srec->setToolTip(tr("Step Record")); srec->setIcon(*steprecIcon); srec->setCheckable(true); + srec->setFocusPolicy(Qt::NoFocus); steprec_tools->addWidget(srec); connect(srec, SIGNAL(toggled(bool)), score_canvas, SLOT(set_steprec(bool))); @@ -318,24 +316,34 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) note_settings_toolbar->addWidget(apply_velo_to_label); note_settings_toolbar->addWidget(new QLabel(tr("Velocity:"), note_settings_toolbar)); - velo_spinbox = new QSpinBox(this); + velo_spinbox = new SpinBox(this); velo_spinbox->setRange(0, 127); velo_spinbox->setSingleStep(1); //we do not use the valueChanged signal, because that would generate //many many undos when using the spin buttons. connect(velo_spinbox, SIGNAL(editingFinished()), SLOT(velo_box_changed())); connect(this,SIGNAL(velo_changed(int)), score_canvas, SLOT(set_velo(int))); + if(MusEGlobal::config.smartFocus) + { + connect(velo_spinbox, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(velo_spinbox, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } note_settings_toolbar->addWidget(velo_spinbox); velo_spinbox->setValue(ScoreCanvas::note_velo_init); note_settings_toolbar->addWidget(new QLabel(tr("Off-Velocity:"), note_settings_toolbar)); - velo_off_spinbox = new QSpinBox(this); + velo_off_spinbox = new SpinBox(this); velo_off_spinbox->setRange(0, 127); velo_off_spinbox->setSingleStep(1); //we do not use the valueChanged signal, because that would generate //many many undos when using the spin buttons. connect(velo_off_spinbox, SIGNAL(editingFinished()), SLOT(velo_off_box_changed())); connect(this,SIGNAL(velo_off_changed(int)), score_canvas, SLOT(set_velo_off(int))); + if(MusEGlobal::config.smartFocus) + { + connect(velo_off_spinbox, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(velo_off_spinbox, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } note_settings_toolbar->addWidget(velo_off_spinbox); velo_off_spinbox->setValue(ScoreCanvas::note_velo_off_init); @@ -350,25 +358,33 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) quant_combobox->addItem("8"); // _quant_power2 and _quant_power2_init quant_combobox->addItem("16"); // and MAX_QUANT_POWER (must be log2(largest_value)) quant_combobox->addItem("32"); + quant_combobox->setFocusPolicy(Qt::TabFocus); quant_combobox->setCurrentIndex(score_canvas->quant_power2()-1); // the above is intendedly executed BEFORE connecting. otherwise this would // destroy pixels_per_whole_init! - connect(quant_combobox, SIGNAL(currentIndexChanged(int)), score_canvas, SLOT(set_quant(int))); + //connect(quant_combobox, SIGNAL(currentIndexChanged(int)), score_canvas, SLOT(set_quant(int))); + connect(quant_combobox, SIGNAL(activated(int)), SLOT(quant_combobox_changed(int))); // Tim quant_toolbar->addWidget(quant_combobox); quant_toolbar->addSeparator(); quant_toolbar->addWidget(new QLabel(tr("Pixels per whole:"), quant_toolbar)); - px_per_whole_spinbox = new QSpinBox(this); + px_per_whole_spinbox = new SpinBox(this); + px_per_whole_spinbox->setFocusPolicy(Qt::StrongFocus); px_per_whole_spinbox->setRange(10, 1200); px_per_whole_spinbox->setSingleStep(50); connect(px_per_whole_spinbox, SIGNAL(valueChanged(int)), score_canvas, SLOT(set_pixels_per_whole(int))); connect(score_canvas, SIGNAL(pixels_per_whole_changed(int)), px_per_whole_spinbox, SLOT(setValue(int))); + if(MusEGlobal::config.smartFocus) + { + connect(px_per_whole_spinbox, SIGNAL(returnPressed()), SLOT(focusCanvas())); + connect(px_per_whole_spinbox, SIGNAL(escapePressed()), SLOT(focusCanvas())); + } quant_toolbar->addWidget(px_per_whole_spinbox); px_per_whole_spinbox->setValue(ScoreCanvas::_pixels_per_whole_init); - QMenu* edit_menu = menuBar()->addMenu(tr("&Edit")); + QMenu* edit_menu = menuBar()->addMenu(tr("&Edit")); edit_menu->addActions(MusEGlobal::undoRedo->actions()); edit_menu->addSeparator(); @@ -426,7 +442,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) connect(select_oloop_action, SIGNAL(triggered()), menu_mapper, SLOT(map())); - QMenu* functions_menu = menuBar()->addMenu(tr("Fu&nctions")); + QMenu* functions_menu = menuBar()->addMenu(tr("Fu&nctions")); func_quantize_action = functions_menu->addAction(tr("&Quantize"), menu_mapper, SLOT(map())); func_notelen_action = functions_menu->addAction(tr("Change note &length"), menu_mapper, SLOT(map())); @@ -450,7 +466,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) menu_mapper->setMapping(func_legato_action, CMD_LEGATO); - QMenu* settings_menu = menuBar()->addMenu(tr("Window &Config")); + QMenu* settings_menu = menuBar()->addMenu(tr("Window &Config")); color_menu = settings_menu->addMenu(tr("Note head &colors")); color_actions = new QActionGroup(this); @@ -491,7 +507,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) preamble_keysig_action->setChecked(ScoreCanvas::preamble_contains_keysig_init); preamble_timesig_action->setChecked(ScoreCanvas::preamble_contains_timesig_init); - + QAction* set_name_action = settings_menu->addAction(tr("Set Score &name"), menu_mapper, SLOT(map())); menu_mapper->setMapping(set_name_action, CMD_SET_NAME); @@ -499,7 +515,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) settings_menu->addAction(subwinAction); settings_menu->addAction(shareAction); settings_menu->addAction(fullscreenAction); - + init_shortcuts(); @@ -614,6 +630,12 @@ ScoreEdit::~ScoreEdit() names.erase(name); } +void ScoreEdit::focusCanvas() +{ + score_canvas->setFocus(); + score_canvas->activateWindow(); +} + void ScoreEdit::velo_box_changed() { emit velo_changed(velo_spinbox->value()); @@ -624,11 +646,18 @@ void ScoreEdit::velo_off_box_changed() emit velo_off_changed(velo_off_spinbox->value()); } +void ScoreEdit::quant_combobox_changed(int idx) +{ + score_canvas->set_quant(idx); + if(MusEGlobal::config.smartFocus) + focusCanvas(); +} + void ScoreEdit::song_changed(int flags) { if(_isDeleting) // Ignore while while deleting to prevent crash. return; - + if (flags & (SC_SELECTION | SC_EVENT_MODIFIED | SC_EVENT_REMOVED)) { map selection=get_events(score_canvas->get_all_parts(),1); @@ -699,7 +728,7 @@ void ScoreEdit::closeEvent(QCloseEvent* e) { _isDeleting = true; // Set flag so certain signals like songChanged, which may cause crash during delete, can be ignored. names.erase(name); - + QSettings settings("MusE", "MusE-qt"); //settings.setValue("ScoreEdit/geometry", saveGeometry()); settings.setValue("ScoreEdit/windowState", saveState()); @@ -976,6 +1005,10 @@ void ScoreCanvas::write_staves(int level, MusECore::Xml& xml) const void ScoreEdit::readStatus(MusECore::Xml& xml) { + // never "return;" inside that function. + // instead, goto end_of_scoreedit_read_status; + // (there is a command which must be executed!) + bool apply_velo_temp=apply_velo; apply_velo=false; @@ -1063,12 +1096,15 @@ void ScoreEdit::readStatus(MusECore::Xml& xml) case MusECore::Xml::TagEnd: if (tag == "scoreedit") - return; + goto end_of_scoreedit_read_status; default: break; } } + +end_of_scoreedit_read_status: + apply_velo=apply_velo_temp; } @@ -1510,7 +1546,7 @@ void ScoreCanvas::song_changed(int flags) { if(parent && parent->deleting()) // Ignore while while deleting to prevent crash. return; - + if (flags & (SC_PART_MODIFIED | SC_PART_REMOVED | SC_PART_INSERTED | SC_TRACK_REMOVED)) { update_parts(); @@ -2132,12 +2168,19 @@ list parse_note_len(int len_ticks, int begin_tick, vector& foo, #define NUMBER_HEIGHT (pix_num[0].height()) -//kann 0 oder 1 sein: -//bei notenkollisionen mit ungerader anzahl von kollidierenden -//wird immer so ausgewichen, dass möglichst wenige ausweichen müssen -//wenn die anzahl aber gerade ist, gibt es keine "bessere" lösung -//in dem fall werden immer die geraden (0) bzw. ungeraden (1) -//ausweichen. +// kann 0 oder 1 sein: +// bei notenkollisionen mit ungerader anzahl von kollidierenden +// wird immer so ausgewichen, dass möglichst wenige ausweichen müssen +// wenn die anzahl aber gerade ist, gibt es keine "bessere" lösung +// in dem fall werden immer die geraden (0) bzw. ungeraden (1) +// ausweichen. +// ROUGH TRANSLATION: +// can be 0 or 1: +// when there are note head collisions with an odd number of colliding +// heads there's an unique solution for "stepping aside", so that +// fewer notes must "step aside". but when the number of colliding +// heads is even, there is no "better" solution. this constant +// specifies whether the "odd" (1) or the "even" (0) heads will move. #define AUSWEICHEN_BEVORZUGT 0 #define STEM_LEN 30 @@ -2861,9 +2904,11 @@ void ScoreCanvas::draw_note_lines(QPainter& p, int y, bool reserve_akkolade_spac void staff_t::calc_item_pos() { - MusECore::key_enum curr_key=MusECore::KEY_C; //this has to be KEY_C or KEY_C_B and nothing else, - //because only with these two keys the next (initial) - //key signature is properly drawn. + //this has to be KEY_C or KEY_C_B and nothing else, + //because only with these two keys the next (initial) + //key signature is properly drawn. + MusECore::key_enum curr_key=MusECore::KEY_C; + int pos_add=0; max_y_coord=0; @@ -2974,9 +3019,13 @@ void ScoreCanvas::calc_pos_add_list() //process key changes - MusECore::key_enum curr_key=MusECore::KEY_C; //this has to be KEY_C or KEY_C_B and nothing else, - //because only with these two keys the next (initial) - //key signature is properly calculated. + + //this has to be KEY_C or KEY_C_B and nothing else, + //because only with these two keys the next (initial) + //key signature is properly calculated. + MusECore::key_enum curr_key=MusECore::KEY_C; + + for (MusECore::iKeyEvent it=MusEGlobal::keymap.begin(); it!=MusEGlobal::keymap.end(); it++) { MusECore::key_enum new_key=it->second.key; @@ -3252,10 +3301,10 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte list aufloes_list=calc_accidentials(curr_key, staff.clef, new_key); list new_acc_list=calc_accidentials(new_key, staff.clef); - // vorzeichen aus curr_key auflösen + // cancel accidentials from curr_key draw_accidentials(p, it->x + KEYCHANGE_ACC_LEFTDIST - x_pos+x_left, y_offset, aufloes_list, pix_noacc[BLACK_PIXMAP]); - // alle vorzeichen aus new_key zeichnen + // draw all accidentials from new_key QPixmap* pix = is_sharp_key(new_key) ? &pix_sharp[BLACK_PIXMAP] : &pix_b[BLACK_PIXMAP]; vorzeichen_t new_accidential = is_sharp_key(new_key) ? SHARP : B; @@ -3650,9 +3699,9 @@ void ScoreCanvas::mousePressEvent (QMouseEvent* event) keystate=event->modifiers(); bool ctrl=keystate & Qt::ControlModifier; - // den errechneten tick immer ABrunden! - // denn der "bereich" eines schlags geht von schlag_begin bis nächsterschlag_begin-1 - // noten werden aber genau in die mitte dieses bereiches gezeichnet + // always round DOWN. + // because the "area" of a beat goes from "beat_begin" to "nextbeat_begin-1", + // but notes are drawn in the middle of that area! list::iterator staff_it=staff_at_y(event->y() + y_pos); @@ -4644,7 +4693,8 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set o when changing toolbarstate when sharing and immediately after that * changing "share" status, the changed state isn't stored * (could be solved by storing the current window when quitting/saving whatever) @@ -4689,6 +4739,15 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set o do partial recalculating; recalculating can take pretty long - * (0,5 sec) when displaying a whole song in scores - * o transpose etc. must also transpose key-pressure events - * o transpose: support in-key-transpose - * o thin out: remove unneeded ctrl messages - * * less important stuff * o allow "fixating" toolbars? * o quantize-templates (everything is forced into a specified diff --git a/muse2/muse/midiedit/scoreedit.h b/muse2/muse/midiedit/scoreedit.h index 7a16d19f..584c5f78 100644 --- a/muse2/muse/midiedit/scoreedit.h +++ b/muse2/muse/midiedit/scoreedit.h @@ -51,6 +51,7 @@ #include "steprec.h" #include "cleftypes.h" #include "helper.h" +#include "spinbox.h" #include #include @@ -106,11 +107,11 @@ class ScoreEdit : public TopWin QWidget* mainw; MusEGui::EditToolBar* edit_tools; - QSpinBox* velo_spinbox; - QSpinBox* velo_off_spinbox; + SpinBox* velo_spinbox; + SpinBox* velo_off_spinbox; QComboBox* quant_combobox; - QSpinBox* px_per_whole_spinbox; + SpinBox* px_per_whole_spinbox; QAction* preamble_keysig_action; QAction* preamble_timesig_action; @@ -179,9 +180,11 @@ class ScoreEdit : public TopWin void menu_command(int); void velo_box_changed(); void velo_off_box_changed(); + void quant_combobox_changed(int); void init_shortcuts(); void selection_changed(); void clipboard_changed(); + void focusCanvas(); signals: void isDeleting(MusEGui::TopWin*); diff --git a/muse2/muse/midieditor.h b/muse2/muse/midieditor.h index fa59c9cc..9a215a03 100644 --- a/muse2/muse/midieditor.h +++ b/muse2/muse/midieditor.h @@ -23,7 +23,6 @@ #ifndef __MIDIEDITOR_H__ #define __MIDIEDITOR_H__ -///#include "sig.h" #include "al/sig.h" #include "cobject.h" @@ -93,10 +92,6 @@ class MidiEditor : public TopWin { QWidget* parent = 0, const char* name = 0); ~MidiEditor(); - ///int rasterStep(unsigned tick) const { return sigmap.rasterStep(tick, _raster); } - ///unsigned rasterVal(unsigned v) const { return sigmap.raster(v, _raster); } - ///unsigned rasterVal1(unsigned v) const { return sigmap.raster1(v, _raster); } - ///unsigned rasterVal2(unsigned v) const { return sigmap.raster2(v, _raster); } int rasterStep(unsigned tick) const { return AL::sigmap.rasterStep(tick, _raster); } unsigned rasterVal(unsigned v) const { return AL::sigmap.raster(v, _raster); } unsigned rasterVal1(unsigned v) const { return AL::sigmap.raster1(v, _raster); } diff --git a/muse2/muse/midievent.cpp b/muse2/muse/midievent.cpp index 97f2359a..9e0e8974 100644 --- a/muse2/muse/midievent.cpp +++ b/muse2/muse/midievent.cpp @@ -90,7 +90,6 @@ void MidiEventBase::dump(int n) const // MidiEventBase::write //--------------------------------------------------------- -//void MidiEventBase::write(int level, Xml& xml, const Pos& offset) const void MidiEventBase::write(int level, Xml& xml, const Pos& offset, bool /*forcePath*/) const { xml.nput(level++, "\n"); } } diff --git a/muse2/muse/midievent.h b/muse2/muse/midievent.h index 2c832cdf..a63fede2 100644 --- a/muse2/muse/midievent.h +++ b/muse2/muse/midievent.h @@ -70,7 +70,6 @@ class MidiEventBase : public EventBase { virtual void dump(int n = 0) const; virtual void read(Xml&); - //virtual void write(int, Xml&, const Pos& offset) const; virtual void write(int, Xml&, const Pos& offset, bool forcePath = false) const; virtual EventBase* mid(unsigned, unsigned); }; diff --git a/muse2/muse/midifile.cpp b/muse2/muse/midifile.cpp index 1fc7e114..5e45f261 100644 --- a/muse2/muse/midifile.cpp +++ b/muse2/muse/midifile.cpp @@ -340,8 +340,8 @@ int MidiFile::readEvent(MidiPlayEvent* event, MidiFileTrack* t) return -2; } if (buffer[len-1] != 0xf7) { - printf("SYSEX endet nicht mit 0xf7!\n"); - // Fortsetzung folgt? + printf("SYSEX doesn't end with 0xf7!\n"); + // to be continued? } else --len; // don't count 0xf7 @@ -566,7 +566,7 @@ void MidiFile::writeEvent(const MidiPlayEvent* event) int c = event->channel(); int nstat = event->type(); - // we dont save meta data into smf type 0 files: + // we dont save meta data into smf type 0 files: DELETETHIS 4 ??? // Oct 16, 2011: Apparently it is legal to do that. Part of fix for bug tracker 3293339. //if (MusEGlobal::config.smfFormat == 0 && nstat == ME_META) // return; @@ -620,6 +620,7 @@ bool MidiFile::write() writeLong(6); // header len writeShort(MusEGlobal::config.smfFormat); if (MusEGlobal::config.smfFormat == 0) { + // DELETETHIS 30 /* //writeShort(1); // Removed. Bug tracker 3293339 MidiFileTrack dst; @@ -645,7 +646,7 @@ bool MidiFile::write() */ writeShort(1); - //writeShort(_division); + //writeShort(_division); DELETETHIS 3 //if(!_tracks->empty()) // writeTrack(*(_tracks->begin())); @@ -658,7 +659,7 @@ bool MidiFile::write() writeShort(_division); for (ciMidiFileTrack i = _tracks->begin(); i != _tracks->end(); ++i) writeTrack(*i); -/// } + return (ferror(fp) != 0); } diff --git a/muse2/muse/midiport.cpp b/muse2/muse/midiport.cpp index b7d1d7b7..ef94c659 100644 --- a/muse2/muse/midiport.cpp +++ b/muse2/muse/midiport.cpp @@ -21,8 +21,6 @@ // //========================================================= -//#include "config.h" - #include #include @@ -31,7 +29,6 @@ #include "midictrl.h" #include "midi.h" #include "minstrument.h" -//#include "instruments/minstrument.h" // p4.0.2 #include "xml.h" #include "globals.h" #include "mpevent.h" @@ -41,10 +38,6 @@ #include "menutitleitem.h" #include "icons.h" -//#ifdef DSSI_SUPPORT -//#include "dssihost.h" -//#endif - namespace MusEGlobal { MusECore::MidiPort midiPorts[MIDI_PORTS]; } @@ -75,7 +68,6 @@ void initMidiPorts() MidiPort::MidiPort() : _state("not configured") { - //_defaultInChannels = 0; _defaultInChannels = (1 << MIDI_CHANNELS) -1; // p4.0.17 Default is now to connect to all channels. _defaultOutChannels = 0; _device = 0; @@ -181,15 +173,14 @@ void MidiPort::setMidiDevice(MidiDevice* dev) // The 'reverb level' controller would still be at '100', and could adversely affect the song, // but if the instrument has an available initial value of say '0', it will be used instead. // - //if(_instrument) - // p3.3.39 NOT for syntis! Use midiState an/or initParams for that. + + // NOT for syntis. Use midiState and/or initParams for that. if(_instrument && !_device->isSynti()) { MidiControllerList* cl = _instrument->controller(); MidiController* mc; for(ciMidiController imc = cl->begin(); imc != cl->end(); ++imc) { - //mc = *imc; mc = imc->second; for(int chan = 0; chan < MIDI_CHANNELS; ++chan) { @@ -210,38 +201,12 @@ void MidiPort::setMidiDevice(MidiDevice* dev) if(mc->initVal() != CTRL_VAL_UNKNOWN) { int ctl = mc->num(); - -///#ifdef DSSI_SUPPORT - // Exclude dssi synths from this, as some of them have hundreds of controls. - // Another difference is dssi synth devices (usually) have readable default port values, - // unlike a midi output port, which cannot be queried for a current or default value, - // so we blindly send values here. Also some dssi have a different default mechanism or - // storage systems for parameters, with complex GUIs with their own manipulation schemes. - // Another difference is dssi controls are best manipulated as ladspa controls - - // (they ARE ladspa controls). This is stuff I mainly put for midi ports and MESS... - // I DO allow midi control of those ladspa controls, so our midi controls shall be updated here... - // p3.3.39 Only non-syntis! Use midiState an/or initParams for that. - ///if(!_device->isSynti() || (dynamic_cast(((SynthI*)_device)->sif()) == 0)) - ///{ -///#endif - // Note the addition of bias! - //_device->putEvent(MidiPlayEvent(0, portno(), chan, - // ME_CONTROLLER, ctl, mc->initVal() + mc->bias())); - // Retry added. Use default attempts and delay. p4.0.15 - _device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, - ME_CONTROLLER, ctl, mc->initVal() + mc->bias())); - //if(_device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, - // ME_CONTROLLER, ctl, mc->initVal() + mc->bias()))) - // return; - -///#ifdef DSSI_SUPPORT - ///} -///#endif - + // Note the addition of bias! + // Retry added. Use default attempts and delay. + _device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, + ME_CONTROLLER, ctl, mc->initVal() + mc->bias())); // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... - //setHwCtrlState(chan, ctl, mc->initVal() + mc->bias()); // Set it again so that control labels show 'off'... - //setHwCtrlState(chan, ctl, CTRL_VAL_UNKNOWN); setHwCtrlStates(chan, ctl, CTRL_VAL_UNKNOWN, mc->initVal() + mc->bias()); } } @@ -250,42 +215,18 @@ void MidiPort::setMidiDevice(MidiDevice* dev) } // init HW controller state - // p3.3.39 NOT for syntis! Use midiState an/or initParams for that. - if(!_device->isSynti()) - { - for (iMidiCtrlValList i = _controller->begin(); i != _controller->end(); ++i) { - int channel = i->first >> 24; - int cntrl = i->first & 0xffffff; - int val = i->second->hwVal(); - if (val != CTRL_VAL_UNKNOWN) { - - -///#ifdef DSSI_SUPPORT - // Not for dssi synths... - ///if(!_device->isSynti() || (dynamic_cast(((SynthI*)_device)->sif()) == 0)) - ///{ -///#endif - //_device->putEvent(MidiPlayEvent(0, portno(), channel, - // ME_CONTROLLER, cntrl, val)); - // Retry added. Use default attempts and delay. p4.0.15 - _device->putEventWithRetry(MidiPlayEvent(0, portno(), channel, - ME_CONTROLLER, cntrl, val)); - //if(_device->putEventWithRetry(MidiPlayEvent(0, portno(), channel, - // ME_CONTROLLER, cntrl, val))) - // return; - -///#ifdef DSSI_SUPPORT - ///} -///#endif - - // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... - setHwCtrlState(channel, cntrl, val); - // Set it again so that control labels show 'off'... - //setHwCtrlState(channel, cntrl, CTRL_VAL_UNKNOWN); - //setHwCtrlStates(channel, cntrl, CTRL_VAL_UNKNOWN, val); - } + for (iMidiCtrlValList i = _controller->begin(); i != _controller->end(); ++i) { + int channel = i->first >> 24; + int cntrl = i->first & 0xffffff; + int val = i->second->hwVal(); + if (val != CTRL_VAL_UNKNOWN) { + // Retry added. Use default attempts and delay. + _device->putEventWithRetry(MidiPlayEvent(0, portno(), channel, + ME_CONTROLLER, cntrl, val)); + // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... + setHwCtrlState(channel, cntrl, val); } - } + } } else @@ -331,9 +272,7 @@ QMenu* midiPortsPopup(QWidget* parent, int checkPort) for( ; pi < MIDI_PORTS; ++pi) { MusECore::MidiDevice* md = MusEGlobal::midiPorts[pi].device(); - //if(md && !md->isSynti() && (md->rwFlags() & 1)) if(md && (md->rwFlags() & 1)) - //if(md && (md->rwFlags() & 1 || md->isSynti()) ) // Revert. Hm, why synths? Only writeable ports. p4.0.41 break; } if(pi == MIDI_PORTS) @@ -353,7 +292,6 @@ QMenu* midiPortsPopup(QWidget* parent, int checkPort) for (int i = 0; i < MIDI_PORTS; ++i) { MidiPort* port = &MusEGlobal::midiPorts[i]; MusECore::MidiDevice* md = port->device(); - //if(md && !(md->rwFlags() & 1 || md->isSynti()) && (i != checkPort)) if(md && !(md->rwFlags() & 1) && (i != checkPort)) // Only writeable ports, or current one. continue; name.sprintf("%d:%s", port->portno()+1, port->portname().toLatin1().constData()); @@ -371,9 +309,7 @@ QMenu* midiPortsPopup(QWidget* parent, int checkPort) { subp = new QMenu(p); subp->setTitle(qApp->translate("@default", QT_TRANSLATE_NOOP("@default", "Empty ports"))); - //subp->addAction(new MusEGui::MenuTitleItem("Empty Ports", subp)); } - //act = subp->addAction(name); // No need for all those "" names. act = subp->addAction(QString().setNum(i+1)); act->setData(i); act->setCheckable(true); @@ -391,7 +327,6 @@ QMenu* midiPortsPopup(QWidget* parent, int checkPort) const QString& MidiPort::portname() const { - //static const QString none(""); static const QString none(QT_TRANSLATE_NOOP("@default", "")); if (_device) return _device->name(); @@ -405,50 +340,18 @@ const QString& MidiPort::portname() const void MidiPort::tryCtrlInitVal(int chan, int ctl, int val) { - // p4.0.27 - // Look for an initial value in the song for this midi controller, on this midi channel... - //for(iMidiCtrlValList i = _controller->begin(); i != _controller->end(); ++i) + // Look for an initial value in the song for this midi controller, on this midi channel... (p4.0.27) iMidiCtrlValList i = _controller->find(chan, ctl); if(i != _controller->end()) { - //int channel = i->first >> 24; - //int cntrl = i->first & 0xffffff; - //if(channel == chan && cntrl == ctl) int v = i->second->value(0); // Value at tick 0. if(v != CTRL_VAL_UNKNOWN) { if(_device) - { - ///#ifdef DSSI_SUPPORT - - // Not for dssi synths... - ///if(!_device->isSynti() || (dynamic_cast(((SynthI*)_device)->sif()) == 0)) - ///{ - - ///#endif - - //_device->putEvent(MidiPlayEvent(0, portno(), channel, - // ME_CONTROLLER, cntrl, v)); - // Retry added. Use default attempts and delay. p4.0.15 - _device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, - ME_CONTROLLER, ctl, v)); - //if(_device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, - // ME_CONTROLLER, ctl, v))) - // return; - - ///#ifdef DSSI_SUPPORT - - ///} - - ///#endif - - } + _device->putEventWithRetry(MidiPlayEvent(0, portno(), chan, ME_CONTROLLER, ctl, v)); // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... setHwCtrlState(chan, ctl, v); - // Set it again so that control labels show 'off'... - //setHwCtrlState(chan, ctl, CTRL_VAL_UNKNOWN); - //setHwCtrlStates(chan, ctl, CTRL_VAL_UNKNOWN, v); return; } @@ -458,52 +361,35 @@ void MidiPort::tryCtrlInitVal(int chan, int ctl, int val) if(_instrument) { MidiControllerList* cl = _instrument->controller(); - //for(ciMidiController imc = cl->begin(); imc != cl->end(); ++imc) ciMidiController imc = cl->find(ctl); if(imc != cl->end()) { - //MidiController* mc = *imc; MidiController* mc = imc->second; - //int cnum = mc->num(); - //if(cnum == ctl) - //{ - int initval = mc->initVal(); - - // Initialize from either the instrument controller's initial value, or the supplied value. - if(initval != CTRL_VAL_UNKNOWN) + int initval = mc->initVal(); + + // Initialize from either the instrument controller's initial value, or the supplied value. + if(initval != CTRL_VAL_UNKNOWN) + { + if(_device) { - if(_device) - { - //MidiPlayEvent ev(song->cpos(), portno(), chan, ME_CONTROLLER, ctl, initval + mc->bias()); - MidiPlayEvent ev(0, portno(), chan, ME_CONTROLLER, ctl, initval + mc->bias()); - _device->putEvent(ev); - // Retry added. Use default attempts and delay. p4.0.15 - //_device->putEventWithRetry(ev); - } - // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... - //setHwCtrlState(chan, ctl, initval + mc->bias()); - // Set it again so that control labels show 'off'... - //setHwCtrlState(chan, ctl, CTRL_VAL_UNKNOWN); - setHwCtrlStates(chan, ctl, CTRL_VAL_UNKNOWN, initval + mc->bias()); - - return; - } + MidiPlayEvent ev(0, portno(), chan, ME_CONTROLLER, ctl, initval + mc->bias()); + _device->putEvent(ev); + // Retry added. Use default attempts and delay. p4.0.15 + //_device->putEventWithRetry(ev); + } + setHwCtrlStates(chan, ctl, CTRL_VAL_UNKNOWN, initval + mc->bias()); + + return; + } } } // No initial value was found in the song or instrument for this midi controller. Just send the given value. if(_device) { - //MidiPlayEvent ev(song->cpos(), portno(), chan, ME_CONTROLLER, ctl, val); MidiPlayEvent ev(0, portno(), chan, ME_CONTROLLER, ctl, val); _device->putEvent(ev); - // Retry added. Use default attempts and delay. p4.0.15 - //_device->putEventWithRetry(ev); } - // Set it once so the 'last HW value' is set, and control knobs are positioned at the value... - //setHwCtrlState(chan, ctl, val); - // Set it again so that control labels show 'off'... - //setHwCtrlState(chan, ctl, CTRL_VAL_UNKNOWN); setHwCtrlStates(chan, ctl, CTRL_VAL_UNKNOWN, val); } @@ -514,14 +400,6 @@ void MidiPort::tryCtrlInitVal(int chan, int ctl, int val) void MidiPort::sendGmInitValues() { for (int i = 0; i < MIDI_CHANNELS; ++i) { - // Changed by T356. - //setHwCtrlState(i, CTRL_PROGRAM, 0); - //setHwCtrlState(i, CTRL_PITCH, 0); - //setHwCtrlState(i, CTRL_VOLUME, 100); - //setHwCtrlState(i, CTRL_PANPOT, 64); - //setHwCtrlState(i, CTRL_REVERB_SEND, 40); - //setHwCtrlState(i, CTRL_CHORUS_SEND, 0); - // By T356. Initialize from instrument controller if it has an initial value, otherwise use the specified value. // Tested: Ultimately, a track's controller stored values take priority by sending any 'zero time' value // AFTER these GM/GS/XG init routines are called via initDevices(). @@ -550,25 +428,6 @@ void MidiPort::sendGsInitValues() void MidiPort::sendXgInitValues() { for (int i = 0; i < MIDI_CHANNELS; ++i) { - // Changed by T356. - //setHwCtrlState(i, CTRL_PROGRAM, 0); - //setHwCtrlState(i, CTRL_MODULATION, 0); - //setHwCtrlState(i, CTRL_PORTAMENTO_TIME, 0); - //setHwCtrlState(i, CTRL_VOLUME, 0x64); - //setHwCtrlState(i, CTRL_PANPOT, 0x40); - //setHwCtrlState(i, CTRL_EXPRESSION, 0x7f); - //setHwCtrlState(i, CTRL_SUSTAIN, 0x0); - //setHwCtrlState(i, CTRL_PORTAMENTO, 0x0); - //setHwCtrlState(i, CTRL_SOSTENUTO, 0x0); - //setHwCtrlState(i, CTRL_SOFT_PEDAL, 0x0); - //setHwCtrlState(i, CTRL_HARMONIC_CONTENT, 0x40); - //setHwCtrlState(i, CTRL_RELEASE_TIME, 0x40); - //setHwCtrlState(i, CTRL_ATTACK_TIME, 0x40); - //setHwCtrlState(i, CTRL_BRIGHTNESS, 0x40); - //setHwCtrlState(i, CTRL_REVERB_SEND, 0x28); - //setHwCtrlState(i, CTRL_CHORUS_SEND, 0x0); - //setHwCtrlState(i, CTRL_VARIATION_SEND, 0x0); - // By T356. Initialize from instrument controller if it has an initial value, otherwise use the specified value. tryCtrlInitVal(i, CTRL_PROGRAM, 0); tryCtrlInitVal(i, CTRL_MODULATION, 0); @@ -609,10 +468,6 @@ void MidiPort::sendGmOn() void MidiPort::sendGsOn() { - //static unsigned char data2[] = { 0x41, 0x10, 0x42, 0x12, 0x40, 0x01, 0x33, 0x50, 0x3c }; - //static unsigned char data3[] = { 0x41, 0x10, 0x42, 0x12, 0x40, 0x01, 0x34, 0x50, 0x3b }; - //sendSysex(data2, sizeof(data2)); - //sendSysex(data3, sizeof(data3)); sendSysex(gsOnMsg2, gsOnMsg2Len); sendSysex(gsOnMsg3, gsOnMsg3Len); } @@ -822,57 +677,21 @@ int MidiPort::limitValToInstrCtlRange(int ctl, int val) } //--------------------------------------------------------- -// sendEvent -// return true, if event cannot be delivered +// sendHwCtrlState +// Return true if it is OK to go ahead and deliver the event. //--------------------------------------------------------- -bool MidiPort::sendEvent(const MidiPlayEvent& ev, bool forceSend) +bool MidiPort::sendHwCtrlState(const MidiPlayEvent& ev, bool forceSend) { if (ev.type() == ME_CONTROLLER) { -// printf("current sustain %d %d %d\n", hwCtrlState(ev.channel(),CTRL_SUSTAIN), CTRL_SUSTAIN, ev.dataA()); - - // Added by T356. int da = ev.dataA(); int db = ev.dataB(); - /* - // Is it a drum controller? - MidiController* mc = drumController(da); - if(mc) - { - DrumMap* dm = &drumMap[da & 0x7f]; - int port = dm->port; - MidiPort* mp = &MusEGlobal::midiPorts[port]; - // Is it NOT for this MidiPort? - if(mp && (mp != this)) - { - // Redirect the event to the mapped port and channel... - da = (da & ~0xff) | (dm->anote & 0x7f); - db = mp->limitValToInstrCtlRange(da, db); - MidiPlayEvent nev(ev.time(), port, dm->channel, ME_CONTROLLER, da, db); - if(!mp->setHwCtrlState(ev.channel(), da, db)) - return false; - if(!mp->device()) - return true; - return mp->device()->putEvent(nev); - } - } - */ db = limitValToInstrCtlRange(da, db); - - // Removed by T356. - // - // optimize controller settings - // - //if (hwCtrlState(ev.channel(), ev.dataA()) == ev.dataB()) { -// printf("optimize ctrl %d %x val %d\n", ev.dataA(), ev.dataA(), ev.dataB()); - // return false; - // } -// printf("set HW Ctrl State ch:%d 0x%x 0x%x\n", ev.channel(), ev.dataA(), ev.dataB()); if(!setHwCtrlState(ev.channel(), da, db)) { if (MusEGlobal::debugMsg && forceSend) - printf("sendEvent: State already set. Forcing anyway...\n"); + printf("sendHwCtrlState: State already set. Forcing anyway...\n"); if (!forceSend) return false; } @@ -881,10 +700,6 @@ bool MidiPort::sendEvent(const MidiPlayEvent& ev, bool forceSend) if (ev.type() == ME_PITCHBEND) { int da = limitValToInstrCtlRange(CTRL_PITCH, ev.dataA()); - // Removed by T356. - //if (hwCtrlState(ev.channel(), CTRL_PITCH) == ev.dataA()) - // return false; - if(!setHwCtrlState(ev.channel(), CTRL_PITCH, da)) { if (!forceSend) return false; @@ -899,7 +714,19 @@ bool MidiPort::sendEvent(const MidiPlayEvent& ev, bool forceSend) } } - + return true; + } + +//--------------------------------------------------------- +// sendEvent +// return true, if event cannot be delivered +//--------------------------------------------------------- + +bool MidiPort::sendEvent(const MidiPlayEvent& ev, bool forceSend) + { + if(!sendHwCtrlState(ev, forceSend)) + return false; + if (!_device) { if (MusEGlobal::debugMsg) printf("no device for this midi port\n"); @@ -931,11 +758,8 @@ int MidiPort::hwCtrlState(int ch, int ctrl) const { ch &= 0xff; iMidiCtrlValList cl = _controller->find(ch, ctrl); - if (cl == _controller->end()) { - //if (MusEGlobal::debugMsg) - // printf("hwCtrlState: chan %d ctrl 0x%x not found\n", ch, ctrl); + if (cl == _controller->end()) return CTRL_VAL_UNKNOWN; - } MidiCtrlValList* vl = cl->second; return vl->hwVal(); } @@ -947,22 +771,6 @@ int MidiPort::hwCtrlState(int ch, int ctrl) const bool MidiPort::setHwCtrlState(int ch, int ctrl, int val) { - // Changed by T356. - //iMidiCtrlValList cl = _controller->find(ch, ctrl); - //if (cl == _controller->end()) { - // try to add new controller - // addManagedController(ch, ctrl); -// muse->importController(ch, this, ctrl); - // cl = _controller->find(ch, ctrl); - // if (cl == _controller->end()) { - // if (MusEGlobal::debugMsg) - // printf("setHwCtrlState(%d,0x%x,0x%x): not found\n", ch, ctrl, val); - // return; - // } - // } - //MidiCtrlValList* vl = cl->second; -// printf("setHwCtrlState ch %d ctrl %x val %x\n", ch, ctrl, val); - // By T356. This will create a new value list if necessary, otherwise it returns the existing list. MidiCtrlValList* vl = addManagedController(ch, ctrl); @@ -985,24 +793,6 @@ bool MidiPort::setHwCtrlStates(int ch, int ctrl, int val, int lastval) return vl->setHwVals(val, lastval); } -// Removed by T356. -//--------------------------------------------------------- -// setCtrl -// return true if new controller value added -//--------------------------------------------------------- - -//bool MidiPort::setCtrl(int ch, int tick, int ctrl, int val) -// { -// if (MusEGlobal::debugMsg) -// printf("setCtrl(tick=%d val=%d)\n",tick,val); -// iMidiCtrlValList cl = _controller->find(ch, ctrl); -// if (cl == _controller->end()) { -// if (MusEGlobal::debugMsg) -// printf("setCtrl: controller 0x%x for channel %d not found\n", ctrl, ch); -// return false; -// } -// return cl->second->add(tick, val); -// } //--------------------------------------------------------- // setControllerVal @@ -1033,24 +823,18 @@ bool MidiPort::setControllerVal(int ch, int tick, int ctrl, int val, Part* part) int MidiPort::getCtrl(int ch, int tick, int ctrl) const { iMidiCtrlValList cl = _controller->find(ch, ctrl); - if (cl == _controller->end()) { - //if (MusEGlobal::debugMsg) - // printf("getCtrl: controller %d(0x%x) for channel %d not found size %zd\n", - // ctrl, ctrl, ch, _controller->size()); + if (cl == _controller->end()) return CTRL_VAL_UNKNOWN; - } + return cl->second->value(tick); } int MidiPort::getCtrl(int ch, int tick, int ctrl, Part* part) const { iMidiCtrlValList cl = _controller->find(ch, ctrl); - if (cl == _controller->end()) { - //if (MusEGlobal::debugMsg) - // printf("getCtrl: controller %d(0x%x) for channel %d not found size %zd\n", - // ctrl, ctrl, ch, _controller->size()); + if (cl == _controller->end()) return CTRL_VAL_UNKNOWN; - } + return cl->second->value(tick, part); } //--------------------------------------------------------- diff --git a/muse2/muse/midiport.h b/muse2/muse/midiport.h index 8c12e2c6..0faccce2 100644 --- a/muse2/muse/midiport.h +++ b/muse2/muse/midiport.h @@ -75,7 +75,6 @@ class MidiPort { int getCtrl(int ch, int tick, int ctrl) const; int getCtrl(int ch, int tick, int ctrl, Part* part) const; // Removed by T356. - //bool setCtrl(int ch, int tick, int ctrl, int val); bool setControllerVal(int ch, int tick, int ctrl, int val, Part* part); // Can be CTRL_VAL_UNKNOWN until a valid state is set int lastValidHWCtrlState(int ch, int ctrl) const; @@ -138,6 +137,7 @@ class MidiPort { void sendMMCStop(int devid = -1); void sendMMCDeferredPlay(int devid = -1); + bool sendHwCtrlState(const MidiPlayEvent&, bool forceSend = false ); bool sendEvent(const MidiPlayEvent&, bool forceSend = false ); AutomationType automationType(int channel) { return _automationType[channel]; } void setAutomationType(int channel, AutomationType t) { @@ -153,7 +153,6 @@ extern void initMidiPorts(); extern void setPortExclusiveDefOutChan(int /*port*/, int /*chan*/); #endif -//extern QPopupMenu* midiPortsPopup(QWidget*); extern QMenu* midiPortsPopup(QWidget* parent = 0, int checkPort = -1); } // namespace MusECore diff --git a/muse2/muse/midiseq.cpp b/muse2/muse/midiseq.cpp index 1e46db11..94335d99 100644 --- a/muse2/muse/midiseq.cpp +++ b/muse2/muse/midiseq.cpp @@ -31,6 +31,7 @@ #include #include +#include "app.h" #include "globals.h" #include "midi.h" #include "midiseq.h" @@ -44,7 +45,6 @@ #include "synth.h" #include "song.h" #include "gconfig.h" -#include namespace MusEGlobal { MusECore::MidiSeq* midiSeq; @@ -57,7 +57,6 @@ int MidiSeq::ticker = 0; void initMidiSequencer() { - //MusEGlobal::midiSeq = new MidiSeq(MusEGlobal::realTimeScheduling ? MusEGlobal::realTimePriority : 0, "Midi"); MusEGlobal::midiSeq = new MidiSeq("Midi"); } @@ -80,19 +79,18 @@ void MidiSeq::processMsg(const ThreadMsg* m) { MusECore::AudioMsg* msg = (MusECore::AudioMsg*)m; switch(msg->id) { - // This does not appear to be used anymore. Was sent in Audio::process1, + // This does not appear to be used anymore. Was sent in Audio::process1, DELETETHIS 5 ?? // now Audio::processMidi is called directly. p4.0.15 Tim. //case MusECore::MS_PROCESS: // audio->processMidi(); // break; - // Removed p4.0.34 - //case MusECore::SEQM_SEEK: - // processSeek(); - // break; - //case MusECore::MS_STOP: - // processStop(); - // break; + case MusECore::SEQM_SEEK: + processSeek(); + break; + case MusECore::MS_STOP: + processStop(); + break; case MusECore::MS_SET_RTC: MusEGlobal::doSetuid(); @@ -102,8 +100,9 @@ void MidiSeq::processMsg(const ThreadMsg* m) case MusECore::MS_UPDATE_POLL_FD: updatePollFd(); break; - // Moved into Song::processMsg p4.0.34 - /* + + + // Moved into Song::processMsg p4.0.34 ... case MusECore::SEQM_ADD_TRACK: MusEGlobal::song->insertTrack2(msg->track, msg->ival); updatePollFd(); @@ -112,10 +111,10 @@ void MidiSeq::processMsg(const ThreadMsg* m) MusEGlobal::song->cmdRemoveTrack(msg->track); updatePollFd(); break; - case MusECore::SEQM_CHANGE_TRACK: - MusEGlobal::song->changeTrack((Track*)(msg->p1), (Track*)(msg->p2)); - updatePollFd(); - break; + //case MusECore::SEQM_CHANGE_TRACK: DELETETHIS 4 + // MusEGlobal::song->changeTrack((Track*)(msg->p1), (Track*)(msg->p2)); + // updatePollFd(); + // break; case MusECore::SEQM_ADD_PART: MusEGlobal::song->cmdAddPart((Part*)msg->p1); break; @@ -123,10 +122,10 @@ void MidiSeq::processMsg(const ThreadMsg* m) MusEGlobal::song->cmdRemovePart((Part*)msg->p1); break; case MusECore::SEQM_CHANGE_PART: - //MusEGlobal::song->cmdChangePart((Part*)msg->p1, (Part*)msg->p2); MusEGlobal::song->cmdChangePart((Part*)msg->p1, (Part*)msg->p2, msg->a, msg->b); break; - */ + + case MusECore::SEQM_SET_TRACK_OUT_CHAN: { MidiTrack* track = (MidiTrack*)(msg->p1); @@ -158,29 +157,26 @@ void MidiSeq::processMsg(const ThreadMsg* m) } } -#if 0 -// Removed p4.0.34 +#if 1 // DELETETHIS the #if and #endif? //--------------------------------------------------------- // processStop //--------------------------------------------------------- void MidiSeq::processStop() { - // p3.3.28 - // TODO Try to move this into Audio::stopRolling(). p4.0.22 // Done p4.0.34 - //playStateExt = false; // not playing + // TODO Try to move this into Audio::stopRolling(). + playStateExt = false; // not playing // // clear Alsa midi device notes and stop stuck notes - // Jack midi devices are handled in Audio::stopRolling() // for(iMidiDevice id = MusEGlobal::midiDevices.begin(); id != MusEGlobal::midiDevices.end(); ++id) { - //MidiDevice* md = *id; + //MidiDevice* md = *id; DELETETHIS 3 // Only ALSA devices are handled by this thread. - if((*id)->deviceType() == MidiDevice::ALSA_MIDI) // p4.0.22 - (*id)->handleStop(); // p4.0.22 - /* + //if((*id)->deviceType() == MidiDevice::ALSA_MIDI) + (*id)->handleStop(); + /* DELETETHIS 14 if (md->midiPort() == -1) continue; MPEventList* pel = md->playEvents(); @@ -199,18 +195,17 @@ void MidiSeq::processStop() } #endif -#if 0 -// Removed p4.0.34 +#if 1 //DELETETHIS #if and #endif //--------------------------------------------------------- // processSeek //--------------------------------------------------------- void MidiSeq::processSeek() { - //int pos = MusEGlobal::audio->tickPos(); - // TODO Try to move this into MusEGlobal::audio::seek(). p4.0.22 Done p4.0.34 - //if (pos == 0 && !MusEGlobal::song->record()) - // MusEGlobal::audio->initDevices(); + int pos = MusEGlobal::audio->tickPos(); + // TODO Try to move this into MusEGlobal::audio::seek(). + if (pos == 0 && !MusEGlobal::song->record()) + MusEGlobal::audio->initDevices(); //--------------------------------------------------- // set all controller @@ -218,11 +213,11 @@ void MidiSeq::processSeek() for (iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) { - //MidiDevice* md = *i; + //MidiDevice* md = *i; DELETETHIS 3 // Only ALSA devices are handled by this thread. - if((*i)->deviceType() == MidiDevice::ALSA_MIDI) // p4.0.22 - (*i)->handleSeek(); // p4.0.22 - /* + //if((*i)->deviceType() == MidiDevice::ALSA_MIDI) + (*i)->handleSeek(); + /* DELETETHIS 47 int port = md->midiPort(); if (port == -1) continue; @@ -278,13 +273,9 @@ void MidiSeq::processSeek() // MidiSeq //--------------------------------------------------------- -//MidiSeq::MidiSeq(int priority, const char* name) -// : Thread(priority, name) MidiSeq::MidiSeq(const char* name) : Thread(name) { - // Changed by Tim. p3.3.17 - //prio = priority; prio = 0; idle = false; @@ -352,7 +343,7 @@ signed int MidiSeq::selectTimer() void MidiSeq::threadStart(void*) { - // Removed by Tim. p3.3.17 + // Removed by Tim. p3.3.17 DELETETHIS 13 /* struct sched_param rt_param; memset(&rt_param, 0, sizeof(rt_param)); @@ -397,6 +388,7 @@ static void midiRead(void*, void* d) dev->processInput(); } +// DELETETHIS 12 //--------------------------------------------------------- // synthIRead //--------------------------------------------------------- @@ -446,24 +438,13 @@ void MidiSeq::updatePollFd() for (iMidiDevice imd = MusEGlobal::midiDevices.begin(); imd != MusEGlobal::midiDevices.end(); ++imd) { MidiDevice* dev = *imd; int port = dev->midiPort(); - //const QString name = dev->name(); if (port == -1) continue; if ((dev->rwFlags() & 0x2) || (MusEGlobal::extSyncFlag.value() - //&& (rxSyncPort == port || rxSyncPort == -1))) { - //&& (dev->syncInfo().MCIn()))) { - && (MusEGlobal::midiPorts[port].syncInfo().MCIn()))) { - if(dev->selectRfd() < 0){ - //fprintf(stderr, "WARNING: read-file-descriptor for {%s} is negative\n", name.toLatin1()); - } + && (MusEGlobal::midiPorts[port].syncInfo().MCIn()))) addPollFd(dev->selectRfd(), POLLIN, MusECore::midiRead, this, dev); - } - if (dev->bytesToWrite()){ - if(dev->selectWfd() < 0){ - //fprintf(stderr, "WARNING: write-file-descriptor for {%s} is negative\n", name.toLatin1()); - } + if (dev->bytesToWrite()) addPollFd(dev->selectWfd(), POLLOUT, MusECore::midiWrite, this, dev); - } } // special handling for alsa midi: // (one fd for all devices) @@ -480,23 +461,19 @@ void MidiSeq::updatePollFd() void MidiSeq::threadStop() { timer->stopTimer(); - //timer.stopTimer(); } //--------------------------------------------------------- // setRtcTicks -// return true on success +// returns actual tick frequency //--------------------------------------------------------- -bool MidiSeq::setRtcTicks() +int MidiSeq::setRtcTicks() { + int gotTicks = timer->setTimerFreq(MusEGlobal::config.rtcTicks); - //timer.setTimerFreq(MusEGlobal::config.rtcTicks); - //timer.startTimer(); - timer->setTimerFreq(MusEGlobal::config.rtcTicks); timer->startTimer(); - realRtcTicks = MusEGlobal::config.rtcTicks; - return true; + return gotTicks; } //--------------------------------------------------------- @@ -504,24 +481,20 @@ bool MidiSeq::setRtcTicks() // return true on error //--------------------------------------------------------- -//bool MidiSeq::start() void MidiSeq::start(int priority) { - // Changed by Tim. p3.3.17 - prio = priority; - //timerFd = -1; - MusEGlobal::doSetuid(); - //timerFd = selectTimer(); - //timerFd = timer.initTimer(); - //printf("timerFd=%d\n",timerFd); - setRtcTicks(); + int gotTicks = setRtcTicks(); MusEGlobal::undoSetuid(); - //Thread::start(); Thread::start(priority); - //return false; + + if (gotTicks < 500) { + QMessageBox::warning( MusEGlobal::muse, QString("Bad timing"), QString("Timing source has a frequency below 500hz!\n" \ + "This could lead to audible timing problems.\n" \ + "Please see console output for any further error messages\n ")); + } } //--------------------------------------------------------- @@ -530,6 +503,7 @@ void MidiSeq::start(int priority) void MidiSeq::processMidiClock() { + // DELETETHIS 30, maybe remove entire function? // if (genMCSync) { // MusEGlobal::midiPorts[txSyncPort].sendClock(); // } @@ -584,10 +558,6 @@ void MidiSeq::midiTick(void* p, void*) void MidiSeq::processTimerTick() { - // Disabled by Tim. p3.3.22 -// extern int watchMidi; -// ++watchMidi; // make a simple watchdog happy - //--------------------------------------------------- // read elapsed rtc timer ticks //--------------------------------------------------- @@ -596,14 +566,12 @@ void MidiSeq::processTimerTick() unsigned long nn; if (timerFd != -1) { nn = timer->getTimerTicks(); - //nn = timer.getTimerTicks(); nn >>= 8; } - if (idle) { -// printf("IDLE\n"); + if (idle) return; - } + if (MusEGlobal::midiBusy) { // we hit MusEGlobal::audio: MusEGlobal::midiSeq->msgProcess (actually this has been MusEGlobal::audio->processMidi for some time now - Tim) // miss this timer tick @@ -612,70 +580,32 @@ void MidiSeq::processTimerTick() unsigned curFrame = MusEGlobal::audio->curFrame(); - // Keep the sync detectors running... - // No, done in Song::beat(), (at the much slower heartbeat rate). - // - //for(int port = 0; port < MIDI_PORTS; ++port) - //{ - // Must keep them running even if there's no device... - //if(MusEGlobal::midiPorts[port].device()) - // MusEGlobal::midiPorts[port].syncInfo().setCurFrame(curFrame); - //} - //for(iMidiDevice imd = MusEGlobal::midiDevices.begin(); imd != MusEGlobal::midiDevices.end(); ++imd) - // (*imd)->syncInfo().setCurFrame(curFrame); - if (!MusEGlobal::extSyncFlag.value()) { - //int curTick = MusEGlobal::tempomap.frame2tick(curFrame); - // Copied from Tempomap. - //int curTick = lrint((double(curFrame)/double(MusEGlobal::sampleRate)) * MusEGlobal::tempomap.globalTempo() * MusEGlobal::config.division * 10000.0 / double(MusEGlobal::tempomap.tempo(MusEGlobal::song->cpos()))); - //int curTick = lrint((double(curFrame)/double(MusEGlobal::sampleRate)) * MusEGlobal::tempomap.globalTempo() * 240000.0 / double(MusEGlobal::tempomap.tempo(MusEGlobal::song->cpos()))); int curTick = lrint((double(curFrame)/double(MusEGlobal::sampleRate)) * double(MusEGlobal::tempomap.globalTempo()) * double(MusEGlobal::config.division) * 10000.0 / double(MusEGlobal::tempomap.tempo(MusEGlobal::song->cpos()))); - //int curTick = int((double(curFrame)/double(MusEGlobal::sampleRate)) * double(MusEGlobal::tempomap.globalTempo()) * double(MusEGlobal::config.division * 10000.0) / double(MusEGlobal::tempomap.tempo(MusEGlobal::song->cpos()))); - -/* if ( midiClock > curTick + 100) // reinitialize - { - midiClock = curTick; - } - else if( curTick > midiClock + 100) // reinitialize - { - midiClock = curTick; - }*/ if(midiClock > curTick) midiClock = curTick; int div = MusEGlobal::config.division/24; if(curTick >= midiClock + div) { - //if(curTick >= midiClock) { - //processMidiClock(); int perr = (curTick - midiClock) / div; - //int perr = curTick - midiClock; bool used = false; - //if(genMCSync) - //{ - //MusEGlobal::midiPorts[txSyncPort].sendClock(); for(int port = 0; port < MIDI_PORTS; ++port) { MidiPort* mp = &MusEGlobal::midiPorts[port]; - // No device? Clock out not turned on? - //MidiDevice* dev = mp->device(); - //if(!dev || !mp->syncInfo().MCOut()) + // No device? Clock out not turned on? DELETETHIS 3 if(!mp->device() || !mp->syncInfo().MCOut()) continue; - // Shall we check open flags? - //if(!(dev->rwFlags() & 0x1) || !(dev->openFlags() & 1)) - //if(!(dev->openFlags() & 1)) - // continue; - used = true; mp->sendClock(); } + // DELETETHIS 35 ?? /* for(iMidiDevice imd = MusEGlobal::midiDevices.begin(); imd != MusEGlobal::midiDevices.end(); ++imd) { @@ -710,7 +640,7 @@ void MidiSeq::processTimerTick() if(MusEGlobal::debugMsg && used && perr > 1) printf("Dropped %d midi out clock(s). curTick:%d midiClock:%d div:%d\n", perr, curTick, midiClock, div); - //} + //} DELETETHIS and maybe the below ??? // Increment as if we had caught the timer exactly on the mark, even if the timer // has passed beyond the mark, or even beyond 2 * div. @@ -732,25 +662,16 @@ void MidiSeq::processTimerTick() // // Using equalization periods... midiClock += (perr * div); - //midiClock += perr; + //midiClock += perr; DELETETHIS // - // No equalization periods... TODO: + // No equalization periods... TODO: or DELETETHIS? //midiClock += (perr * div); } } -// if (genMTCSync) { - // printf("Midi Time Code Sync generation not impl.\n"); -// } - - // p3.3.25 - //int tickpos = MusEGlobal::audio->tickPos(); - //bool extsync = MusEGlobal::extSyncFlag.value(); - // // play all events upto curFrame - // for (iMidiDevice id = MusEGlobal::midiDevices.begin(); id != MusEGlobal::midiDevices.end(); ++id) { - //MidiDevice* md = *id; + //MidiDevice* md = *id; DELETETHIS 10 // Is it a Jack midi device? They are iterated in Audio::processMidi. p3.3.36 //MidiJackDevice* mjd = dynamic_cast(md); //if(mjd) @@ -762,7 +683,7 @@ void MidiSeq::processTimerTick() if((*id)->deviceType() == MidiDevice::ALSA_MIDI) (*id)->processMidi(); - // Moved into MidiAlsaDevice. p4.0.34 + // Moved into MidiAlsaDevice. p4.0.34 DELETETHIS 40 /* int port = md->midiPort(); MidiPort* mp = port != -1 ? &MusEGlobal::midiPorts[port] : 0; @@ -838,10 +759,8 @@ void MidiSeq::msgSetMidiDevice(MidiPort* port, MidiDevice* device) Thread::sendMsg(&msg); } -// This does not appear to be used anymore. Was called in Audio::process1, now Audio::processMidi is called directly. p4.0.15 Tim. -//void MidiSeq::msgProcess() { msgMsg(MusECore::MS_PROCESS); } -//void MidiSeq::msgSeek() { msgMsg(MusECore::SEQM_SEEK); } // Removed p4.0.34 -//void MidiSeq::msgStop() { msgMsg(MusECore::MS_STOP); } // +void MidiSeq::msgSeek() { msgMsg(MusECore::SEQM_SEEK); } +void MidiSeq::msgStop() { msgMsg(MusECore::MS_STOP); } void MidiSeq::msgSetRtc() { msgMsg(MusECore::MS_SET_RTC); } void MidiSeq::msgUpdatePollFd() { msgMsg(MusECore::MS_UPDATE_POLL_FD); } diff --git a/muse2/muse/midiseq.h b/muse2/muse/midiseq.h index 3c3813ef..bf7a3376 100644 --- a/muse2/muse/midiseq.h +++ b/muse2/muse/midiseq.h @@ -42,7 +42,6 @@ class SynthI; //--------------------------------------------------------- class MidiSeq : public Thread { - int realRtcTicks; int timerFd; int idle; int prio; // realtime priority @@ -52,9 +51,6 @@ class MidiSeq : public Thread { /* Testing */ bool playStateExt; // used for keeping play state in sync functions int recTick; // ext sync tick position -// int lastTickPos; // position of last sync tick - // run values: -// unsigned _midiTick; double mclock1, mclock2; double songtick1, songtick2; int recTick1, recTick2; @@ -68,7 +64,7 @@ class MidiSeq : public Thread { Timer *timer; signed int selectTimer(); - bool setRtcTicks(); + int setRtcTicks(); static void midiTick(void* p, void*); void processTimerTick(); void processSeek(); @@ -78,16 +74,12 @@ class MidiSeq : public Thread { void updatePollFd(); void mtcSyncMsg(const MTC&, int, bool); - //void mtcInputFull(const unsigned char* p, int n); - //void nonRealtimeSystemSysex(const unsigned char* p, int n); public: - //MidiSeq(int prio, const char* name); MidiSeq(const char* name); ~MidiSeq(); - //bool start(); virtual void start(int); virtual void threadStop(); @@ -98,16 +90,13 @@ class MidiSeq : public Thread { void realtimeSystemInput(int, int); void mtcInputQuarter(int, unsigned char); void setSongPosition(int, int); - // void eventReceived(MidiRecordEvent& event); - //void mmcInput(const unsigned char* p, int n); void mmcInput(int, const unsigned char*, int); void mtcInputFull(int, const unsigned char*, int); void nonRealtimeSystemSysex(int, const unsigned char*, int); void msgMsg(int id); - //void msgProcess(); - //void msgSeek(); - //void msgStop(); + void msgSeek(); + void msgStop(); void msgSetRtc(); void msgUpdatePollFd(); void msgAddSynthI(SynthI* synth); diff --git a/muse2/muse/miditransform.cpp b/muse2/muse/miditransform.cpp index ffc67f53..9f068882 100644 --- a/muse2/muse/miditransform.cpp +++ b/muse2/muse/miditransform.cpp @@ -37,7 +37,6 @@ #include "xml.h" #include "globals.h" #include "comboQuant.h" -//#include "pitchedit.h" #include "audio.h" #include "gconfig.h" #include "midictrl.h" @@ -467,9 +466,6 @@ void MidiTransformerDialog::updatePresetList() presetList->setCurrentItem(0); } - //data->cindex = 0; - //presetList->setCurrentItem(0); - } //--------------------------------------------------------- @@ -683,13 +679,11 @@ void MidiTransformerDialog::transformEvent(MusECore::Event& event, MusECore::Mid // Indicate do clone parts. addPortCtrlEvents(newEvent, part, true); // Indicate do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part, true, true)); MusEGlobal::song->addUpdateFlags(SC_EVENT_MODIFIED); break; case MusECore::Insert: // Indicate do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::AddEvent, dummy, newEvent, part)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::AddEvent, dummy, newEvent, part, true, true)); MusEGlobal::song->addEvent(newEvent, part); // Indicate do clone parts. @@ -698,7 +692,6 @@ void MidiTransformerDialog::transformEvent(MusECore::Event& event, MusECore::Mid break; case MusECore::Extract: // Indicate do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::DeleteEvent, dummy, event, part)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::DeleteEvent, dummy, event, part, true, true)); // Indicate do clone parts. removePortCtrlEvents(event, part, true); @@ -734,7 +727,6 @@ void MidiTransformerDialog::processEvent(MusECore::Event& event, MusECore::MidiP // Indicate do clone parts. addPortCtrlEvents(newEvent, part, true); // Indicate do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::ModifyEvent, newEvent, event, part, true, true)); MusEGlobal::song->addUpdateFlags(SC_EVENT_MODIFIED); } @@ -744,7 +736,6 @@ void MidiTransformerDialog::processEvent(MusECore::Event& event, MusECore::MidiP { MusECore::Event ev; // Indicate do port controller values and clone parts. - //MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::DeleteEvent, ev, event, part, true, true)); MusEGlobal::song->addUndo(MusECore::UndoOp(MusECore::UndoOp::DeleteEvent, ev, event, part, true, true)); // Indicate do clone parts. removePortCtrlEvents(event, part, true); diff --git a/muse2/muse/miditransform.h b/muse2/muse/miditransform.h index 38b0211a..690bd868 100644 --- a/muse2/muse/miditransform.h +++ b/muse2/muse/miditransform.h @@ -68,7 +68,6 @@ class MidiTransformerDialog : public QDialog, public Ui::MidiTransformDialogBase MusECore::MidiTransformPrivate* data; virtual void accept(); -// virtual void reject(); void setValOp(QWidget* a, QWidget* b, MusECore::ValOp op); void processEvent(MusECore::Event&, MusECore::MidiPart*, MusECore::MidiPart*); bool isSelected(MusECore::Event&, MusECore::MidiPart*); diff --git a/muse2/muse/mixer/astrip.cpp b/muse2/muse/mixer/astrip.cpp index ccd47661..6b8043b9 100644 --- a/muse2/muse/mixer/astrip.cpp +++ b/muse2/muse/mixer/astrip.cpp @@ -781,6 +781,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) stereo = new QToolButton(); ///stereo->setFont(MusEGlobal::config.fonts[1]); + stereo->setFocusPolicy(Qt::NoFocus); stereo->setCheckable(true); stereo->setToolTip(tr("1/2 channel")); stereo->setChecked(channel == 2); @@ -795,6 +796,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) pre = new QToolButton(); ///pre->setFont(MusEGlobal::config.fonts[1]); + pre->setFocusPolicy(Qt::NoFocus); pre->setCheckable(true); pre->setText(tr("Pre")); pre->setToolTip(tr("pre fader - post fader")); @@ -895,6 +897,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) if (track->canRecord()) { record = new MusEGui::TransparentToolButton(this); + record->setFocusPolicy(Qt::NoFocus); record->setCheckable(true); record->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); record->setBackgroundRole(QPalette::Mid); @@ -908,6 +911,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) MusECore::Track::TrackType type = t->type(); mute = new QToolButton(); + mute->setFocusPolicy(Qt::NoFocus); mute->setCheckable(true); mute->setToolTip(tr("mute")); mute->setChecked(t->mute()); @@ -917,7 +921,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) connect(mute, SIGNAL(clicked(bool)), SLOT(muteToggled(bool))); solo = new QToolButton(); - + solo->setFocusPolicy(Qt::NoFocus); solo->setCheckable(true); solo->setChecked(t->solo()); if(t->internalSolo()) @@ -938,6 +942,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) } off = new MusEGui::TransparentToolButton(this); + off->setFocusPolicy(Qt::NoFocus); off->setBackgroundRole(QPalette::Mid); off->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); off->setCheckable(true); @@ -960,6 +965,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) if (type != MusECore::Track::AUDIO_AUX) { iR = new QToolButton(); + iR->setFocusPolicy(Qt::NoFocus); ///iR->setFont(MusEGlobal::config.fonts[1]); iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum)); ///iR->setText(tr("iR")); @@ -972,6 +978,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) } oR = new QToolButton(); + oR->setFocusPolicy(Qt::NoFocus); ///oR->setFont(MusEGlobal::config.fonts[1]); oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum)); ///oR->setText(tr("oR")); @@ -987,6 +994,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at) //--------------------------------------------------- autoType = new MusEGui::ComboBox(); + autoType->setFocusPolicy(Qt::NoFocus); ///autoType->setFont(MusEGlobal::config.fonts[1]); autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); //autoType->setAutoFillBackground(true); diff --git a/muse2/muse/mixer/mstrip.cpp b/muse2/muse/mixer/mstrip.cpp index 80663c29..61bd9ba5 100644 --- a/muse2/muse/mixer/mstrip.cpp +++ b/muse2/muse/mixer/mstrip.cpp @@ -297,6 +297,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) //--------------------------------------------------- record = new MusEGui::TransparentToolButton(this); + record->setFocusPolicy(Qt::NoFocus); record->setBackgroundRole(QPalette::Mid); record->setCheckable(true); record->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); @@ -307,6 +308,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) connect(record, SIGNAL(clicked(bool)), SLOT(recordToggled(bool))); mute = new QToolButton(); + mute->setFocusPolicy(Qt::NoFocus); mute->setCheckable(true); mute->setToolTip(tr("mute")); mute->setChecked(track->mute()); @@ -316,7 +318,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) connect(mute, SIGNAL(clicked(bool)), SLOT(muteToggled(bool))); solo = new QToolButton(); - //solo->setToolTip(tr("pre fader listening")); + solo->setFocusPolicy(Qt::NoFocus); solo->setToolTip(tr("solo mode")); solo->setCheckable(true); solo->setChecked(track->solo()); @@ -328,43 +330,8 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) ///solo->setIconSize(soloIconOn->size()); connect(solo, SIGNAL(clicked(bool)), SLOT(soloToggled(bool))); - /* - // Changed by Tim. p3.3.21 - //QToolTip::add(record, tr("record")); - //smBox1->addStretch(100); - //smBox1->addWidget(record); - QLabel* dev_ch_label = new QLabel(); - ///dev_ch_label->setMinimumWidth(STRIP_WIDTH/2); - - // Special here: Must make label same size as the 'exit' button would be IF this were an audio strip... - // (The 'exit1' icon is BIGGER than the 'record on' icon.) - MusEGui::TransparentToolButton* off = new MusEGui::TransparentToolButton(this); - QIcon iconOff; - iconOff.addPixmap(*exit1Icon, QIcon::Normal, QIcon::On); - iconOff.addPixmap(*exitIcon, QIcon::Normal, QIcon::Off); - off->setIcon(iconOff); - off->setIconSize(exit1Icon->size()); - dev_ch_label->setMinimumHeight(off->height()); - delete off; - - //dev_ch_label->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum)); - ///dev_ch_label->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum)); - dev_ch_label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); - dev_ch_label->setAlignment(Qt::AlignCenter); - int port = track->outPort(); - int channel = track->outChannel(); - QString dcs; - dcs.sprintf("%d-%d", port + 1, channel + 1); - dev_ch_label->setText(dcs); - //dev_ch_label->setBackgroundColor(QColor(0, 160, 255)); // Med blue - //dev_ch_label->setFont(MusEGlobal::config.fonts[6]); - dev_ch_label->setFont(MusEGlobal::config.fonts[1]); - // Dealing with a horizontally constrained label. Ignore vertical. Use a minimum readable point size. - //autoAdjustFontSize(dev_ch_label, dev_ch_label->text(), false, true, MusEGlobal::config.fonts[6].pointSize(), 5); - QToolTip::add(dev_ch_label, tr("output port and channel")); - */ - off = new MusEGui::TransparentToolButton(this); + off->setFocusPolicy(Qt::NoFocus); off->setBackgroundRole(QPalette::Mid); off->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); off->setCheckable(true); @@ -384,6 +351,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) //--------------------------------------------------- iR = new QToolButton(); + iR->setFocusPolicy(Qt::NoFocus); ///iR->setFont(MusEGlobal::config.fonts[1]); iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum)); ///iR->setText(tr("iR")); @@ -393,7 +361,9 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) iR->setToolTip(tr("input routing")); grid->addWidget(iR, _curGridRow, 0); connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed())); + oR = new QToolButton(); + oR->setFocusPolicy(Qt::NoFocus); ///oR->setFont(MusEGlobal::config.fonts[1]); oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum)); ///oR->setText(tr("oR")); @@ -412,6 +382,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t) //--------------------------------------------------- autoType = new MusEGui::ComboBox(); + autoType->setFocusPolicy(Qt::NoFocus); ///autoType->setFont(MusEGlobal::config.fonts[1]); autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); autoType->setEnabled(false); diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp index 0ba03beb..3df46dd5 100644 --- a/muse2/muse/mixer/rack.cpp +++ b/muse2/muse/mixer/rack.cpp @@ -182,6 +182,7 @@ EffectRack::EffectRack(QWidget* parent, MusECore::AudioTrack* t) setSpacing(0); setAcceptDrops(true); + setFocusPolicy(Qt::NoFocus); } void EffectRack::updateContents() @@ -683,6 +684,8 @@ void EffectRack::initPlugin(MusECore::Xml xml, int idx) //printf("instantiated!\n"); MusEGlobal::audio->msgAddPlugin(track, idx, plugi); MusEGlobal::song->update(SC_RACK); + if (plugi->guiVisible()) + plugi->gui()->setWindowTitle(plugi->titlePrefix() + plugi->name()); return; } } diff --git a/muse2/muse/mpevent.cpp b/muse2/muse/mpevent.cpp index 8b65bce1..d3709b1f 100644 --- a/muse2/muse/mpevent.cpp +++ b/muse2/muse/mpevent.cpp @@ -116,7 +116,8 @@ bool MEvent::operator<(const MEvent& e) const if (channel() == e.channel()) return type() == ME_NOTEOFF - || (type() == ME_NOTEON && dataB() == 0); + || (type() == ME_NOTEON && dataB() == 0) + || type() != ME_NOTEON; // Make note-ons last so that controllers such as program come before notes played. 1/31/2012 Tim. int map[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 14, 15 }; return map[channel()] < map[e.channel()]; @@ -147,7 +148,6 @@ MidiPlayEvent MidiFifo::get() { MidiPlayEvent event(fifo[rIndex]); rIndex = (rIndex + 1) % MIDI_FIFO_SIZE; - // q_atomic_decrement(&size); --size; return event; } @@ -169,7 +169,6 @@ const MidiPlayEvent& MidiFifo::peek(int n) void MidiFifo::remove() { rIndex = (rIndex + 1) % MIDI_FIFO_SIZE; - // q_atomic_decrement(&size); --size; } @@ -184,7 +183,6 @@ bool MidiRecFifo::put(const MidiPlayEvent& event) if (size < MIDI_REC_FIFO_SIZE) { fifo[wIndex] = event; wIndex = (wIndex + 1) % MIDI_REC_FIFO_SIZE; - // q_atomic_increment(&size); ++size; return false; } @@ -199,7 +197,6 @@ MidiPlayEvent MidiRecFifo::get() { MidiPlayEvent event(fifo[rIndex]); rIndex = (rIndex + 1) % MIDI_REC_FIFO_SIZE; - // q_atomic_decrement(&size); --size; return event; } @@ -221,7 +218,6 @@ const MidiPlayEvent& MidiRecFifo::peek(int n) void MidiRecFifo::remove() { rIndex = (rIndex + 1) % MIDI_REC_FIFO_SIZE; - // q_atomic_decrement(&size); --size; } diff --git a/muse2/muse/mpevent.h b/muse2/muse/mpevent.h index fde7c588..9b64f9cd 100644 --- a/muse2/muse/mpevent.h +++ b/muse2/muse/mpevent.h @@ -30,13 +30,10 @@ #include "memory.h" // Play events ring buffer size -//#define MIDI_FIFO_SIZE 512 -// Increased. FE/6/11 p4.0.15 Tim. -#define MIDI_FIFO_SIZE 2100 +#define MIDI_FIFO_SIZE 4096 // Record events ring buffer size -//#define MIDI_REC_FIFO_SIZE 512 -#define MIDI_REC_FIFO_SIZE 160 +#define MIDI_REC_FIFO_SIZE 256 namespace MusECore { @@ -155,13 +152,12 @@ typedef std::multiset, audioRTallocsize() <= 1) || (type() == AUDIO_OUTPUT)) && (this != metronome); int i; @@ -468,23 +467,8 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s _efxPipe->apply(0, nframes, 0); // Just process controls only, not audio (do not 'run'). for(i = 0; i < trackChans; ++i) - { _meter[i] = 0.0; - /*if(!usedirectbuf) - { - if(MusEGlobal::config.useDenormalBias) - { - for(q = 0; q < nframes; ++q) - outBuffers[i][q] = MusEGlobal::denormalBias; - } - else - memset(outBuffers[i], 0, sizeof(float) * nframes); - } */ - } - //_haveData = false; - //_processed = true; - //_isProcessing = false; // Unblock. return; } @@ -520,7 +504,6 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s // apply plugin chain //--------------------------------------------------- - //fprintf(stderr, "AudioTrack::copyData %s efx apply srcChans:%d\n", name().toLatin1().constData(), srcChans); _efxPipe->apply(trackChans, nframes, buffer); //--------------------------------------------------- @@ -598,22 +581,6 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s memset(dstBuffer[i], 0, sizeof(float) * nframes); } - /* - if(!usedirectbuf) - { - for(i = 0; i < srcChannels; ++i) - { - if(MusEGlobal::config.useDenormalBias) - { - for(q = 0; q < nframes; ++q) - outBuffers[i][q] = MusEGlobal::denormalBias; - } - else - memset(outBuffers[i], 0, sizeof(float) * nframes); - } - } */ - - if(!_prefader) for(i = 0; i < trackChans; ++i) // Must process ALL channels, even if unconnected. Only max 2 channels. _meter[i] = 0.0; @@ -622,11 +589,8 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s } // If we're using local cached 'pre-volume' buffers, copy the input buffers (as they are right now: post-effect pre-volume) back to them. - //if(!usedirectbuf) - { - for(i = 0; i < srcTotalOutChans; ++i) - AL::dsp->cpy(outBuffers[i], buffer[i], nframes); - } + for(i = 0; i < srcTotalOutChans; ++i) + AL::dsp->cpy(outBuffers[i], buffer[i], nframes); // We have some data! Set to true. _haveData = true; @@ -688,7 +652,6 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s { double v; if(srcStartChan > 2 || _prefader) // Don't apply pan or volume to extra channels above 2. Or if prefader on. - //v = _volume; v = 1.0; else if(srcChans >= 2) // If 2 channels apply pan normally. @@ -702,7 +665,6 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s float* sp = buffer[c + srcStartChan]; float* dp = dstBuffer[c]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ = (*sp++ * vol[c]); *dp++ = (*sp++ * v); } } @@ -712,7 +674,6 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s { double v; if(srcStartChan > 2 || _prefader) // Don't apply pan or volume to extra channels above 2. Or if prefader on. - //v = _volume; v = 1.0; else if(trackChans <= 1) // If track is mono apply pan. @@ -723,21 +684,17 @@ void AudioTrack::copyData(unsigned pos, int dstChannels, int srcStartChan, int s float* sp = buffer[srcStartChan]; float* dp = dstBuffer[c]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ = (*sp++ * vol[c]); *dp++ = (*sp++ * v); } } else if(srcChans == 2 && dstChannels == 1) { - //double v1 = (srcStartChan > 2 ? _volume : vol[srcStartChan]); // - //double v2 = (srcStartChan > 2 ? _volume : vol[srcStartChan + 1]); // double v1 = ((srcStartChan > 2 || _prefader) ? 1.0 : vol[srcStartChan]); // Don't apply pan or volume to extra channels above 2. Or if prefader on. double v2 = ((srcStartChan > 2 || _prefader) ? 1.0 : vol[srcStartChan + 1]); // float* dp = dstBuffer[0]; float* sp1 = buffer[srcStartChan]; float* sp2 = buffer[srcStartChan + 1]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ = (*sp1++ * vol[0] + *sp2++ * vol[1]); *dp++ = (*sp1++ * v1 + *sp2++ * v2); } } @@ -758,12 +715,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr printf("MusE: AudioTrack::addData name:%s processed:%d\n", name().toLatin1().constData(), processed()); #endif - //if (off()) - //{ - // _processed = true; - // return; - //} - if(srcStartChan == -1) srcStartChan = 0; @@ -773,10 +724,9 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr if(channels() == 1) srcTotalOutChans = 1; - // Special consideration for metronome: It is not part of the track list, + // Special consideration for metronome: It is not part of the track list, DELETETHIS?? // and it has no in or out routes, yet multiple output tracks may call addData on it ! // We can't tell how many output tracks call it, so we can only assume there might be more than one. - //bool usedirectbuf = ((outRoutes()->size() <= 1) || (type() == AUDIO_OUTPUT)) && (this != metronome); int i; @@ -789,7 +739,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr double _pan = pan(); vol[0] = _volume * (1.0 - _pan); vol[1] = _volume * (1.0 + _pan); - //float meter[srcChans]; float meter[trackChans]; // Have we been here already during this process cycle? @@ -832,19 +781,7 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr _efxPipe->apply(0, nframes, 0); // Track is off. Just process controls only, not audio (do not 'run'). for(i = 0; i < trackChans; ++i) - { _meter[i] = 0.0; - /*if(!usedirectbuf) - { - if(MusEGlobal::config.useDenormalBias) - { - for(q = 0; q < nframes; ++q) - outBuffers[i][q] = MusEGlobal::denormalBias; - } - else - memset(outBuffers[i], 0, sizeof(float) * nframes); - } */ - } return; } @@ -873,15 +810,9 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr //--------------------------------------------------- // apply plugin chain //--------------------------------------------------- - - //fprintf(stderr, "AudioTrack::addData %s efx apply srcChans:%d nframes:%ld %e %e %e %e\n", - // name().toLatin1().constData(), srcChans, nframes, buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); _efxPipe->apply(trackChans, nframes, buffer); - //fprintf(stderr, "AudioTrack::addData after efx: %e %e %e %e\n", - // buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); - //--------------------------------------------------- // aux sends //--------------------------------------------------- @@ -945,23 +876,7 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr if(isMute()) { - // If we're using local buffers, we must zero them. - /* if(!usedirectbuf) - { - for(i = 0; i < srcChannels; ++i) - { - if(MusEGlobal::config.useDenormalBias) - { - for(unsigned int q = 0; q < nframes; ++q) - outBuffers[i][q] = MusEGlobal::denormalBias; - } - else - memset(outBuffers[i], 0, sizeof(float) * nframes); - } - } */ - if(!_prefader) - //for(i = 0; i < srcChans; ++i) for(i = 0; i < trackChans; ++i) _meter[i] = 0.0; @@ -969,11 +884,8 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr } // If we're using local cached 'pre-volume' buffers, copy the input buffers (as they are right now: post-effect pre-volume) back to them. - //if(!usedirectbuf) - { - for(i = 0; i < srcTotalOutChans; ++i) - AL::dsp->cpy(outBuffers[i], buffer[i], nframes); - } + for(i = 0; i < srcTotalOutChans; ++i) + AL::dsp->cpy(outBuffers[i], buffer[i], nframes); // We have some data! Set to true. _haveData = true; @@ -1035,7 +947,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr { double v; if(srcStartChan > 2 || _prefader) // Don't apply pan or volume to extra channels above 2. Or if prefader on. - //v = _volume; v = 1.0; else if(srcChans >= 2) // If 2 channels apply pan normally. @@ -1049,7 +960,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr float* sp = buffer[c + srcStartChan]; float* dp = dstBuffer[c]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ += (*sp++ * vol[c]); *dp++ += (*sp++ * v); } } @@ -1059,7 +969,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr { double v; if(srcStartChan > 2 || _prefader) // Don't apply pan or volume to extra channels above 2. Or if prefader on. - //v = _volume; v = 1.0; else if(trackChans <= 1) // If track is mono apply pan. @@ -1070,21 +979,17 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr float* sp = buffer[srcStartChan]; float* dp = dstBuffer[c]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ += (*sp++ * vol[c]); *dp++ += (*sp++ * v); } } else if(srcChans == 2 && dstChannels == 1) { - //double v1 = (srcStartChan > 2 ? _volume : vol[srcStartChan]); // Don't apply pan to extra channels above 2. - //double v2 = (srcStartChan > 2 ? _volume : vol[srcStartChan + 1]); // double v1 = ((srcStartChan > 2 || _prefader) ? 1.0 : vol[srcStartChan]); // Don't apply pan or volume to extra channels above 2. Or if prefader on. double v2 = ((srcStartChan > 2 || _prefader) ? 1.0 : vol[srcStartChan + 1]); // float* sp1 = buffer[srcStartChan]; float* sp2 = buffer[srcStartChan + 1]; float* dp = dstBuffer[0]; for(unsigned k = 0; k < nframes; ++k) - //*dp++ += (*sp1++ * vol[0] + *sp2++ * vol[1]); *dp++ += (*sp1++ * v1 + *sp2++ * v2); } } @@ -1095,7 +1000,6 @@ void AudioTrack::addData(unsigned pos, int dstChannels, int srcStartChan, int sr void AudioTrack::readVolume(Xml& xml) { - //int ch = 0; for (;;) { Xml::Token token = xml.parse(); switch (token) { @@ -1122,6 +1026,7 @@ void AudioTrack::readVolume(Xml& xml) } } +// DELETETHIS 56 // Removed by T356 // "recfile" tag not saved anymore /* @@ -1189,9 +1094,7 @@ void Track::setChannels(int n) else _channels = n; for (int i = 0; i < _channels; ++i) { - //_meter[i] = 0; _meter[i] = 0.0; - //_peak[i] = 0; _peak[i] = 0.0; } } @@ -1201,7 +1104,6 @@ void AudioInput::setChannels(int n) { if (n == _channels) return; -//was ist mit: void* jackPorts[MAX_CHANNELS]; AudioTrack::setChannels(n); } @@ -1250,12 +1152,10 @@ bool AudioTrack::getData(unsigned pos, int channels, unsigned nframes, float** b #endif ((AudioTrack*)ir->track)->copyData(pos, channels, - //(ir->track->type() == Track::AUDIO_SOFTSYNTH && ir->channel != -1) ? ir->channel : 0, ir->channel, ir->channels, nframes, buffer); - //fprintf(stderr, "AudioTrack::getData %s data: nframes:%ld %e %e %e %e\n", name().toLatin1().constData(), nframes, buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); ++ir; for (; ir != rl->end(); ++ir) { @@ -1286,7 +1186,6 @@ bool AudioInput::getData(unsigned, int channels, unsigned nframes, float** buffe for (int ch = 0; ch < channels; ++ch) { void* jackPort = jackPorts[ch]; - //float* jackbuf = 0; // Do not get buffers of unconnected client ports. Causes repeating leftover data, can be loud, or DC ! if (jackPort && MusEGlobal::audioDevice->connections(jackPort)) @@ -1302,15 +1201,12 @@ bool AudioInput::getData(unsigned, int channels, unsigned nframes, float** buffe // their channel port buffers (if that's even possible) in order to determine if the buffer is shared, // let's just copy always, for now shall we ? float* jackbuf = MusEGlobal::audioDevice->getBuffer(jackPort, nframes); - //memcpy(buffer[ch], jackbuf, nframes* sizeof(float)); AL::dsp->cpy(buffer[ch], jackbuf, nframes); if (MusEGlobal::config.useDenormalBias) { for (unsigned int i=0; i < nframes; i++) buffer[ch][i] += MusEGlobal::denormalBias; - //fprintf(stderr, "AudioInput::getData %s Jack port %p efx apply channels:%d nframes:%ld %e %e %e %e\n", - // name().toLatin1().constData(), jackPort, channels, nframes, buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); } } else @@ -1324,8 +1220,6 @@ bool AudioInput::getData(unsigned, int channels, unsigned nframes, float** buffe { memset(buffer[ch], 0, nframes * sizeof(float)); } - - // name().toLatin1().constData(), channels, nframes, buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); } } return true; @@ -1345,7 +1239,6 @@ void AudioInput::setName(const QString& s) if (jackPorts[i]) MusEGlobal::audioDevice->setPortName(jackPorts[i], buffer); else { - //jackPorts[i] = MusEGlobal::audioDevice->registerInPort(buffer); jackPorts[i] = MusEGlobal::audioDevice->registerInPort(buffer, false); } } @@ -1359,7 +1252,6 @@ void AudioInput::setName(const QString& s) void Track::resetMeter() { for (int i = 0; i < _channels; ++i) - //_meter[i] = 0; _meter[i] = 0.0; } @@ -1370,7 +1262,6 @@ void Track::resetMeter() void Track::resetPeaks() { for (int i = 0; i < _channels; ++i) - //_peak[i] = 0; _peak[i] = 0.0; _lastActivity = 0; } @@ -1454,8 +1345,6 @@ void AudioTrack::record() unsigned pos = 0; float* buffer[_channels]; - //printf("AudioTrack: record() fifo %p, count=%d\n", &fifo, fifo.getCount()); - while(fifo.getCount()) { if (fifo.get(_channels, MusEGlobal::segmentSize, buffer, &pos)) { @@ -1509,8 +1398,6 @@ void AudioTrack::record() if( (pos >= fr) && (!MusEGlobal::song->punchout() || (!MusEGlobal::song->loop() && pos < MusEGlobal::song->rPos().frame())) ) { pos -= fr; - //int position = _recFile->seek(0, SEEK_CUR); - //printf("AudioTrack::record loopcnt:%d lframe:%d newpos:%d curpos:%d start:%d end:%d\n", MusEGlobal::audio->loopCount(), MusEGlobal::audio->loopFrame(), pos, position, MusEGlobal::audio->getStartRecordPos().frame(), MusEGlobal::audio->getEndRecordPos().frame()); _recFile->seek(pos, 0); _recFile->write(_channels, buffer, MusEGlobal::segmentSize); @@ -1600,8 +1487,6 @@ void AudioOutput::processWrite() putFifo(_channels, _nframes, buffer); } } - // Changed by Tim. - //if (MusEGlobal::audioClickFlag && MusEGlobal::song->click()) { if (sendMetronome() && MusEGlobal::audioClickFlag && MusEGlobal::song->click()) { #ifdef METRONOME_DEBUG @@ -1621,13 +1506,10 @@ void AudioOutput::setName(const QString& s) for (int i = 0; i < channels(); ++i) { char buffer[128]; snprintf(buffer, 128, "%s-%d", _name.toLatin1().constData(), i); - if (jackPorts[i]) { + if (jackPorts[i]) MusEGlobal::audioDevice->setPortName(jackPorts[i], buffer); - } - else { - //jackPorts[i] = MusEGlobal::audioDevice->registerOutPort(buffer); + else jackPorts[i] = MusEGlobal::audioDevice->registerOutPort(buffer, false); - } } } @@ -1639,7 +1521,6 @@ void AudioOutput::setName(const QString& s) Fifo::Fifo() { muse_atomic_init(&count); - //nbuffer = FIFO_BUFFER; nbuffer = MusEGlobal::fifoLength; buffer = new FifoBuffer*[nbuffer]; for (int i = 0; i < nbuffer; ++i) @@ -1652,10 +1533,7 @@ Fifo::~Fifo() for (int i = 0; i < nbuffer; ++i) { if(buffer[i]->buffer) - { - //printf("Fifo::~Fifo freeing buffer\n"); free(buffer[i]->buffer); - } delete buffer[i]; } @@ -1684,14 +1562,9 @@ bool Fifo::put(int segs, unsigned long samples, float** src, unsigned pos) if (b->maxSize < n) { if (b->buffer) { - // Changed by Tim. p3.3.15 - //delete[] b->buffer; free(b->buffer); - // p3.3.45 b->buffer = 0; } - // Changed by Tim. p3.3.15 - //b->buffer = new float[n]; posix_memalign((void**)&(b->buffer), 16, sizeof(float) * n); if(!b->buffer) { @@ -1711,7 +1584,6 @@ bool Fifo::put(int segs, unsigned long samples, float** src, unsigned pos) b->segs = segs; b->pos = pos; for (int i = 0; i < segs; ++i) - //memcpy(b->buffer + i * samples, src[i], samples * sizeof(float)); AL::dsp->cpy(b->buffer + i * samples, src[i], samples); add(); return false; @@ -1779,15 +1651,10 @@ bool Fifo::getWriteBuffer(int segs, unsigned long samples, float** buf, unsigned if (b->maxSize < n) { if (b->buffer) { - // Changed by Tim. p3.3.15 - //delete[] b->buffer; free(b->buffer); - // p3.3.45 b->buffer = 0; } - // Changed by Tim. p3.3.15 - //b->buffer = new float[n]; posix_memalign((void**)&(b->buffer), 16, sizeof(float) * n); if(!b->buffer) { @@ -1840,14 +1707,9 @@ void AudioTrack::setChannels(int n) void AudioTrack::setTotalOutChannels(int num) { - //if(num == _totalOutChannels) - // return; - // p4.0.27 Fixes crash if file loaded with track channels less than synth channels. int chans = _totalOutChannels; if(num != chans) { - - //int chans = _totalOutChannels; // Number of allocated buffers is always MAX_CHANNELS or more, even if _totalOutChannels is less. if(chans < MAX_CHANNELS) chans = MAX_CHANNELS; @@ -1870,11 +1732,6 @@ void AudioTrack::setTotalOutChannels(int num) outBuffers = new float*[chans]; for (int i = 0; i < chans; ++i) posix_memalign((void**)&outBuffers[i], 16, sizeof(float) * MusEGlobal::segmentSize); - - //chans = num; - // Limit the actual track (meters, copying etc, all 'normal' operation) to two-channel stereo. - //if(chans > MAX_CHANNELS) - // chans = MAX_CHANNELS; } chans = num; // Limit the actual track (meters, copying etc, all 'normal' operation) to two-channel stereo. diff --git a/muse2/muse/node.h b/muse2/muse/node.h index 15b27d13..50f20546 100644 --- a/muse2/muse/node.h +++ b/muse2/muse/node.h @@ -101,9 +101,6 @@ class Pipeline; class SndFile; -// superceeded by dynamic allocation of fifoLength -//const int FIFO_BUFFER = 4096;//64; - //--------------------------------------------------------- // Fifo //--------------------------------------------------------- diff --git a/muse2/muse/osc.cpp b/muse2/muse/osc.cpp index 7bdc0b00..f78e7a61 100644 --- a/muse2/muse/osc.cpp +++ b/muse2/muse/osc.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -43,7 +44,6 @@ #else #include #include - #include #endif #include @@ -154,55 +154,106 @@ int oscMessageHandler(const char* path, const char* types, lo_arg** argv, fprintf(stderr, "oscMessageHandler: got message for ladspa effect...\n"); #endif - // FIXME: Slowdowns: Shouldn't need these retries but they are needed, only upon creation of the synth. - // Need to fix the real source of the problem! The instance is taking too long to appear after creation. - // - ///for(int retry = 0; retry < 5000; ++retry) - { - ///#ifdef OSC_DEBUG - ///fprintf(stderr, "oscMessageHandler: search retry number:%d ...\n", retry); - ///#endif - - //if(_uiOscPath) - // break; - #ifdef DSSI_SUPPORT - if(isSynth) + #ifdef DSSI_SUPPORT + if(isSynth) + { + // Message is meant for a dssi synth. Check dssi synth instances... + SynthIList* sl = MusEGlobal::song->syntis(); + for(iSynthI si = sl->begin(); si != sl->end(); ++si) { - // Message is meant for a dssi synth. Check dssi synth instances... - SynthIList* sl = MusEGlobal::song->syntis(); - for(iSynthI si = sl->begin(); si != sl->end(); ++si) + SynthI* synti = *si; + + #ifdef OSC_DEBUG + fprintf(stderr, "oscMessageHandler: searching for:%s checking synth instance:%s\n", p, synti->name().toLatin1().constData()); + #endif + + QByteArray ba = synti->name().toLatin1(); + const char* sub = strstr(p, ba.constData()); + if(sub == NULL) + continue; + + // TODO: Fix this dynamic cast - it may be a slowdown. + DssiSynthIF* instance = dynamic_cast(synti->sif()); + if(!instance) + break; + + QByteArray ba2 = synti->name().toLatin1(); + p = sub + strlen(ba2.constData()); + + if (*p != '/' || *(p + 1) == 0) { - SynthI* synti = *si; + fprintf(stderr, "oscMessageHandler error: synth: end of path or no /\n"); + return oscDebugHandler(path, types, argv, argc, data, user_data); + } + + ++p; + + #ifdef OSC_DEBUG + fprintf(stderr, "oscMessageHandler: synth track:%s method:%s\n", synti->name().toLatin1().constData(), p); + #endif + + OscIF& oscif = instance->oscIF(); + + if (!strcmp(p, "configure") && argc == 2 && !strcmp(types, "ss")) + return oscif.oscConfigure(argv); + else if (!strcmp(p, "control") && argc == 2 && !strcmp(types, "if")) + return oscif.oscControl(argv); + else if (!strcmp(p, "midi") && argc == 1 && !strcmp(types, "m")) + return oscif.oscMidi(argv); + else if (!strcmp(p, "program") && argc == 2 && !strcmp(types, "ii")) + return oscif.oscProgram(argv); + else if (!strcmp(p, "update") && argc == 1 && !strcmp(types, "s")) + return oscif.oscUpdate(argv); + else if (!strcmp(p, "exiting") && argc == 0) + return oscif.oscExiting(argv); + return oscDebugHandler(path, types, argv, argc, data, user_data); + } + } + else + #endif //DSSI_SUPPORT + // Message is meant for a ladspa effect. Check all ladspa effect instances... + for(ciTrack it = tl->begin(); it != tl->end(); ++it) + { + if((*it)->isMidiTrack()) + continue; + + Pipeline* efxPipe = ((AudioTrack*)*it)->efxPipe(); + if(efxPipe) + { + for(ciPluginI ip = efxPipe->begin(); ip != efxPipe->end(); ++ip) + { + PluginI* instance = *ip; + if(!instance) + continue; #ifdef OSC_DEBUG - fprintf(stderr, "oscMessageHandler: searching for:%s checking synth instance:%s\n", p, synti->name().toLatin1().constData()); + fprintf(stderr, "oscMessageHandler: searching for:%s checking effect instance:%s label:%s lib:%s\n", + p, instance->name().toLatin1().constData(), instance->label().toLatin1().constData(), instance->lib().toLatin1().constData()); #endif - QByteArray ba = synti->name().toLatin1(); + QByteArray ba = instance->label().toLatin1(); const char* sub = strstr(p, ba.constData()); if(sub == NULL) continue; - - //DssiSynthIF* instance = (DssiSynthIF*)synti->sif(); - // TODO: Fix this dynamic cast - it may be a slowdown. - DssiSynthIF* instance = dynamic_cast(synti->sif()); - if(!instance) - break; - QByteArray ba2 = synti->name().toLatin1(); - p = sub + strlen(ba2.constData()); + Plugin* plugin = instance->plugin(); + if(!plugin) + break; + + QByteArray ba3 = instance->label().toLatin1(); + p = sub + strlen(ba3.constData()); if (*p != '/' || *(p + 1) == 0) { - fprintf(stderr, "oscMessageHandler error: synth: end of path or no /\n"); + fprintf(stderr, "oscMessageHandler: error: effect: end of path or no /\n"); return oscDebugHandler(path, types, argv, argc, data, user_data); } ++p; #ifdef OSC_DEBUG - fprintf(stderr, "oscMessageHandler: synth track:%s method:%s\n", synti->name().toLatin1().constData(), p); + fprintf(stderr, "oscMessageHandler: effect:%s method:%s\n", instance->label().toLatin1().constData(), p); #endif OscIF& oscif = instance->oscIF(); @@ -222,76 +273,6 @@ int oscMessageHandler(const char* path, const char* types, lo_arg** argv, return oscDebugHandler(path, types, argv, argc, data, user_data); } } - else - #endif //DSSI_SUPPORT - // Message is meant for a ladspa effect. Check all ladspa effect instances... - for(ciTrack it = tl->begin(); it != tl->end(); ++it) - { - if((*it)->isMidiTrack()) - continue; - - Pipeline* efxPipe = ((AudioTrack*)*it)->efxPipe(); - if(efxPipe) - { - for(ciPluginI ip = efxPipe->begin(); ip != efxPipe->end(); ++ip) - { - PluginI* instance = *ip; - if(!instance) - continue; - - #ifdef OSC_DEBUG - fprintf(stderr, "oscMessageHandler: searching for:%s checking effect instance:%s label:%s lib:%s\n", - p, instance->name().toLatin1().constData(), instance->label().toLatin1().constData(), instance->lib().toLatin1().constData()); - #endif - - //const char* sub = strstr(p, instance->name().toLatin1().constData()); - ///const char* sub = strstr(p, instance->label().toLatin1().constData()); - QByteArray ba = instance->label().toLatin1(); - const char* sub = strstr(p, ba.constData()); - if(sub == NULL) - continue; - - Plugin* plugin = instance->plugin(); - if(!plugin) - break; - - //p = sub + strlen(instance->name().toLatin1().constData()); - QByteArray ba3 = instance->label().toLatin1(); - p = sub + strlen(ba3.constData()); - - if (*p != '/' || *(p + 1) == 0) - { - fprintf(stderr, "oscMessageHandler: error: effect: end of path or no /\n"); - return oscDebugHandler(path, types, argv, argc, data, user_data); - } - - ++p; - - #ifdef OSC_DEBUG - //fprintf(stderr, "oscMessageHandler: effect:%s method:%s\n", instance->name().toLatin1().constData(), p); - fprintf(stderr, "oscMessageHandler: effect:%s method:%s\n", instance->label().toLatin1().constData(), p); - #endif - - OscIF& oscif = instance->oscIF(); - - if (!strcmp(p, "configure") && argc == 2 && !strcmp(types, "ss")) - return oscif.oscConfigure(argv); - else if (!strcmp(p, "control") && argc == 2 && !strcmp(types, "if")) - return oscif.oscControl(argv); - else if (!strcmp(p, "midi") && argc == 1 && !strcmp(types, "m")) - return oscif.oscMidi(argv); - else if (!strcmp(p, "program") && argc == 2 && !strcmp(types, "ii")) - return oscif.oscProgram(argv); - else if (!strcmp(p, "update") && argc == 1 && !strcmp(types, "s")) - return oscif.oscUpdate(argv); - else if (!strcmp(p, "exiting") && argc == 0) - return oscif.oscExiting(argv); - return oscDebugHandler(path, types, argv, argc, data, user_data); - } - } - } - - ///usleep(1000); } fprintf(stderr, "oscMessageHandler: timeout error: no synth or effect instance found for given path\n"); @@ -321,12 +302,6 @@ void initOSC() } } - ///snprintf(osc_path_tmp, 31, "/dssi"); - // Test: Clear the temp path: - //snprintf(osc_path_tmp, 31, ""); - - ///char* tmp = lo_server_thread_get_url(serverThread); - url = lo_server_thread_get_url(serverThread); if(!url) { @@ -335,14 +310,6 @@ void initOSC() return; } - ///url = (char *)malloc(strlen(tmp) + strlen(osc_path_tmp)); - //url = (char *)malloc(strlen(tmp)); - - ///sprintf(url, "%s%s", tmp, osc_path_tmp + 1); - //sprintf(url, "%s", tmp, osc_path_tmp + 1); - - ///free(tmp); - lo_method meth = 0; meth = lo_server_thread_add_method(serverThread, 0, 0, oscMessageHandler, 0); if(!meth) @@ -433,19 +400,7 @@ OscIF::~OscIF() printf("OscIF::~OscIF terminating _oscGuiQProc\n"); #endif - //_oscGuiQProc->kill(); - // "This tries to terminate the process the nice way. If the process is still running after 5 seconds, - // it terminates the process the hard way. The timeout should be chosen depending on the time the - // process needs to do all its cleanup: use a higher value if the process is likely to do a lot of - // computation or I/O on cleanup." _oscGuiQProc->terminate(); - // FIXME: In Qt4 this can only be used with threads started with QThread. - // Kill is bad anyway, app should check at close if all these guis closed or not - // and ask user if they really want to close, possibly with kill. - // Terminate might not terminate the thread. It is given a chance to prompt for saving etc. - // so kill is not desirable. - // We could wait until terminate finished but don't think that's good here. - ///QTimer::singleShot( 5000, _oscGuiQProc, SLOT( kill() ) ); _oscGuiQProc->waitForFinished(3000); } delete _oscGuiQProc; @@ -552,6 +507,7 @@ int OscIF::oscUpdate(lo_arg **argv) // Send sample rate. lo_send(_uiOscTarget, _uiOscSampleRatePath, "i", MusEGlobal::sampleRate); + // DELETETHIS 46 // Send project directory. //lo_send(_uiOscTarget, _uiOscConfigurePath, "ss", // DSSI_PROJECT_DIRECTORY_KEY, museProject.toLatin1().constData()); // MusEGlobal::song->projectPath() @@ -598,7 +554,7 @@ int OscIF::oscUpdate(lo_arg **argv) lo_send(_uiOscTarget, uiOscGuiPath, ""); */ - + // DELETETHIS 22 #if 0 /* Send current bank/program (-FIX- another race...) */ if (instance->pendingProgramChange < 0) { @@ -633,6 +589,7 @@ int OscIF::oscExiting(lo_arg**) // The gui is gone now, right? _oscGuiVisible = false; +// DELETETHIS 52 // Just an attempt to really kill the process, an attempt to fix gui not re-showing after closing. Doesn't help. /* #ifdef _USE_QPROCESS_FOR_GUI_ @@ -707,6 +664,7 @@ int OscIF::oscExiting(lo_arg**) free(_uiOscPath); _uiOscPath = 0; + // DELETETHIS 20 //const DSSI_Descriptor* dssi = synth->dssi; //const LADSPA_Descriptor* ld = dssi->LADSPA_Plugin; //if(ld->deactivate) @@ -726,7 +684,8 @@ int OscIF::oscExiting(lo_arg**) lo_send(_uiOscTarget, uiOscGuiPath, ""); */ - + +// DELETETHIS 37 #if 0 int i; @@ -837,7 +796,6 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin // Using QProcess works OK. // No QProcess created yet? Do it now. Only once per SynthIF instance. Exists until parent destroyed. if(_oscGuiQProc == 0) - //_oscGuiQProc = new QProcess(muse); _oscGuiQProc = new QProcess(); QString program(guiPath); @@ -845,7 +803,6 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin arguments << oscUrl << filePath << name - //<< QString("channel-1"); << (titlePrefix() + label); #ifdef OSC_DEBUG @@ -867,7 +824,6 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin filePath.toLatin1().constData(), name.toLatin1().constData(), strerror(errno)); - //exit(1); } #ifdef OSC_DEBUG @@ -998,7 +954,7 @@ int OscDssiIF::oscUpdate(lo_arg **argv) // Make sure to call base method. OscIF::oscUpdate(argv); - // Send sample rate. No, done in base class. + // Send sample rate. No, done in base class. DELETETHIS 7 //lo_send(_uiOscTarget, _uiOscSampleRatePath, "i", sampleRate); // Send project directory. No, done in DssiSynthIF. @@ -1007,7 +963,7 @@ int OscDssiIF::oscUpdate(lo_arg **argv) if(_oscSynthIF) _oscSynthIF->oscUpdate(); - +// DELETETHIS 23 #if 0 /* Send current bank/program (-FIX- another race...) */ if (instance->pendingProgramChange < 0) { @@ -1124,10 +1080,6 @@ int OscEffectIF::oscUpdate(lo_arg** argv) // Make sure to call base method. OscIF::oscUpdate(argv); - // Send project directory. No, done in PluginI. - //lo_send(_uiOscTarget, _uiOscConfigurePath, "ss", - // DSSI_PROJECT_DIRECTORY_KEY, museProject.toLatin1().constData()); // MusEGlobal::song->projectPath() - if(_oscPluginI) _oscPluginI->oscUpdate(); diff --git a/muse2/muse/osc.h b/muse2/muse/osc.h index e3f1a26d..f75b5168 100644 --- a/muse2/muse/osc.h +++ b/muse2/muse/osc.h @@ -24,14 +24,19 @@ #ifndef __OSC_H__ #define __OSC_H__ -#include - #include "config.h" +#ifdef OSC_SUPPORT +#include + class QProcess; class QString; +#endif // OSC_SUPPORT + namespace MusECore { +#ifdef OSC_SUPPORT + #ifdef DSSI_SUPPORT class DssiSynthIF; #endif @@ -53,8 +58,8 @@ class OscIF char* _uiOscShowPath; bool _oscGuiVisible; - virtual bool oscInitGui(const QString& /*typ*/, const QString& /*baseName*/, const QString& /*name*/, - const QString& /*label*/, const QString& /*filePath*/, const QString& /*guiPath*/); + virtual bool oscInitGui(const QString& typ, const QString& baseName, const QString& name, + const QString& label, const QString& filePath, const QString& guiPath); public: OscIF(); @@ -67,9 +72,9 @@ class OscIF virtual int oscMidi(lo_arg**) { return 0; } virtual int oscConfigure(lo_arg**) { return 0; } - virtual void oscSendProgram(unsigned long /*prog*/, unsigned long /*bank*/); - virtual void oscSendControl(unsigned long /*dssiPort*/, float /*val*/); - virtual void oscSendConfigure(const char */*key*/, const char */*val*/); + virtual void oscSendProgram(unsigned long prog, unsigned long bank); + virtual void oscSendControl(unsigned long dssiPort, float val); + virtual void oscSendConfigure(const char *key, const char *val); virtual bool oscInitGui() { return false; } virtual void oscShowGui(bool); @@ -85,15 +90,11 @@ class OscEffectIF : public OscIF public: OscEffectIF() {} - //~OscEffectIF(); void oscSetPluginI(PluginI*); virtual int oscUpdate(lo_arg**); - //virtual int oscProgram(lo_arg**); virtual int oscControl(lo_arg**); - //virtual int oscExiting(lo_arg**); - //virtual int oscMidi(lo_arg**); virtual int oscConfigure(lo_arg**); virtual bool oscInitGui(); @@ -109,14 +110,12 @@ class OscDssiIF : public OscIF public: OscDssiIF() {} - //~OscDssiIF(); void oscSetSynthIF(DssiSynthIF*); virtual int oscUpdate(lo_arg**); virtual int oscProgram(lo_arg**); virtual int oscControl(lo_arg**); - //virtual int oscExiting(lo_arg**); virtual int oscMidi(lo_arg**); virtual int oscConfigure(lo_arg**); @@ -125,6 +124,8 @@ class OscDssiIF : public OscIF virtual QString titlePrefix() const; }; #endif // DSSI_SUPPORT + +#endif // OSC_SUPPORT extern void initOSC(); diff --git a/muse2/muse/part.cpp b/muse2/muse/part.cpp index 33519e11..8363ff68 100644 --- a/muse2/muse/part.cpp +++ b/muse2/muse/part.cpp @@ -34,7 +34,6 @@ #include "wave.h" #include "midiport.h" #include "drummap.h" -//#include "midiedit/drummap.h" // p4.0.2 namespace MusECore { @@ -182,7 +181,7 @@ void replaceClone(Part* p1, Part* p2) if(p1->cevents() != p2->cevents()) { bool ret = false; - // If the part to be replaced is a single uncloned part, + // If the part to be replaced is a single uncloned part, DELETETHIS 4 this seems outdated=wrong to me // and the replacement part is not, then this operation // MUST be an undo of a de-cloning of a cloned part. //if(p1->cevents()->refCount() <= 1 && p2->cevents()->refCount() > 1) @@ -191,11 +190,11 @@ void replaceClone(Part* p1, Part* p2) // Chain the replacement part. We don't know the chain it came from, // so we use the slow method. chainCloneInternal(p2); - //return; + //return; DELETETHIS ret = true; } - // If the replacement part is a single uncloned part, + // If the replacement part is a single uncloned part, DELETETHIS same as above // and the part to be replaced is not, then this operation // MUST be a de-cloning of a cloned part. //if(p1->cevents()->refCount() > 1 && p2->cevents()->refCount() <= 1) @@ -207,7 +206,6 @@ void replaceClone(Part* p1, Part* p2) // Isolate the part. p1->setPrevClone(p1); p1->setNextClone(p1); - //return; ret = true; } @@ -376,57 +374,52 @@ void addPortCtrlEvents(Event& event, Part* part, bool doClones) // Update: Due to the varying calls, and order of, incARefcount, (msg)ChangePart, replaceClone, and remove/addPortCtrlEvents, // we can not rely on the reference count as a safety net in these routines. We will just have to trust the clone chain. Part* p = part; - //int j = doClones ? p->cevents()->arefCount() : 1; - //if(j > 0) + while(1) { - //for(int i = 0; i < j; ++i) - while(1) + Track* t = p->track(); + if(t && t->isMidiTrack()) { - Track* t = p->track(); - if(t && t->isMidiTrack()) - { - MidiTrack* mt = (MidiTrack*)t; - int port = mt->outPort(); - unsigned len = p->lenTick(); + MidiTrack* mt = (MidiTrack*)t; + int port = mt->outPort(); + unsigned len = p->lenTick(); + + // Do not add events which are past the end of the part. + if(event.tick() >= len) + break; + + if(event.type() == Controller) + { + int ch = mt->outChannel(); + int tck = event.tick() + p->tick(); + int cntrl = event.dataA(); + int val = event.dataB(); + MidiPort* mp = &MusEGlobal::midiPorts[port]; - // Do not add events which are past the end of the part. - if(event.tick() >= len) - break; - - if(event.type() == Controller) + // Is it a drum controller event, according to the track port's instrument? + if(mt->type() == Track::DRUM) { - int ch = mt->outChannel(); - int tck = event.tick() + p->tick(); - int cntrl = event.dataA(); - int val = event.dataB(); - MidiPort* mp = &MusEGlobal::midiPorts[port]; - - // Is it a drum controller event, according to the track port's instrument? - if(mt->type() == Track::DRUM) + MidiController* mc = mp->drumController(cntrl); + if(mc) { - MidiController* mc = mp->drumController(cntrl); - if(mc) - { - int note = cntrl & 0x7f; - cntrl &= ~0xff; - ch = MusEGlobal::drumMap[note].channel; - mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; - cntrl |= MusEGlobal::drumMap[note].anote; - } + int note = cntrl & 0x7f; + cntrl &= ~0xff; + ch = MusEGlobal::drumMap[note].channel; + mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; + cntrl |= MusEGlobal::drumMap[note].anote; } - - mp->setControllerVal(ch, tck, cntrl, val, p); } - } - - if(!doClones) - break; - // Get the next clone in the chain ring. - p = p->nextClone(); - // Same as original part? Finished. - if(p == part) - break; + + mp->setControllerVal(ch, tck, cntrl, val, p); + } } + + if(!doClones) + break; + // Get the next clone in the chain ring. + p = p->nextClone(); + // Same as original part? Finished. + if(p == part) + break; } } @@ -441,61 +434,56 @@ void addPortCtrlEvents(Part* part, bool doClones) // Update: Due to the varying calls, and order of, incARefcount, (msg)ChangePart, replaceClone, and remove/addPortCtrlEvents, // we can not rely on the reference count as a safety net in these routines. We will just have to trust the clone chain. Part* p = part; - //int j = doClones ? p->cevents()->arefCount() : 1; - //if(j > 0) + while(1) { - //for(int i = 0; i < j; ++i) - while(1) + Track* t = p->track(); + if(t && t->isMidiTrack()) { - Track* t = p->track(); - if(t && t->isMidiTrack()) + MidiTrack* mt = (MidiTrack*)t; + int port = mt->outPort(); + const EventList* el = p->cevents(); + unsigned len = p->lenTick(); + for(ciEvent ie = el->begin(); ie != el->end(); ++ie) { - MidiTrack* mt = (MidiTrack*)t; - int port = mt->outPort(); - const EventList* el = p->cevents(); - unsigned len = p->lenTick(); - for(ciEvent ie = el->begin(); ie != el->end(); ++ie) + const Event& ev = ie->second; + // Added by T356. Do not add events which are past the end of the part. + if(ev.tick() >= len) + break; + + if(ev.type() == Controller) { - const Event& ev = ie->second; - // Added by T356. Do not add events which are past the end of the part. - if(ev.tick() >= len) - break; - - if(ev.type() == Controller) + int ch = mt->outChannel(); + int tck = ev.tick() + p->tick(); + int cntrl = ev.dataA(); + int val = ev.dataB(); + MidiPort* mp = &MusEGlobal::midiPorts[port]; + + // Is it a drum controller event, according to the track port's instrument? + if(mt->type() == Track::DRUM) { - int ch = mt->outChannel(); - int tck = ev.tick() + p->tick(); - int cntrl = ev.dataA(); - int val = ev.dataB(); - MidiPort* mp = &MusEGlobal::midiPorts[port]; - - // Is it a drum controller event, according to the track port's instrument? - if(mt->type() == Track::DRUM) + MidiController* mc = mp->drumController(cntrl); + if(mc) { - MidiController* mc = mp->drumController(cntrl); - if(mc) - { - int note = cntrl & 0x7f; - cntrl &= ~0xff; - ch = MusEGlobal::drumMap[note].channel; - mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; - cntrl |= MusEGlobal::drumMap[note].anote; - } + int note = cntrl & 0x7f; + cntrl &= ~0xff; + ch = MusEGlobal::drumMap[note].channel; + mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; + cntrl |= MusEGlobal::drumMap[note].anote; } - - mp->setControllerVal(ch, tck, cntrl, val, p); } + + mp->setControllerVal(ch, tck, cntrl, val, p); } } - if(!doClones) - break; - // Get the next clone in the chain ring. - p = p->nextClone(); - // Same as original part? Finished. - if(p == part) - break; } - } + if(!doClones) + break; + // Get the next clone in the chain ring. + p = p->nextClone(); + // Same as original part? Finished. + if(p == part) + break; + } } //--------------------------------------------------------- @@ -509,51 +497,46 @@ void removePortCtrlEvents(Event& event, Part* part, bool doClones) // Update: Due to the varying calls, and order of, incARefcount, (msg)ChangePart, replaceClone, and remove/addPortCtrlEvents, // we can not rely on the reference count as a safety net in these routines. We will just have to trust the clone chain. Part* p = part; - //int j = doClones ? p->cevents()->arefCount() : 1; - //if(j > 0) + while(1) { - //for(int i = 0; i < j; ++i) - while(1) + Track* t = p->track(); + if(t && t->isMidiTrack()) { - Track* t = p->track(); - if(t && t->isMidiTrack()) - { - MidiTrack* mt = (MidiTrack*)t; - int port = mt->outPort(); - - if(event.type() == Controller) + MidiTrack* mt = (MidiTrack*)t; + int port = mt->outPort(); + + if(event.type() == Controller) + { + int ch = mt->outChannel(); + int tck = event.tick() + p->tick(); + int cntrl = event.dataA(); + MidiPort* mp = &MusEGlobal::midiPorts[port]; + + // Is it a drum controller event, according to the track port's instrument? + if(mt->type() == Track::DRUM) { - int ch = mt->outChannel(); - int tck = event.tick() + p->tick(); - int cntrl = event.dataA(); - MidiPort* mp = &MusEGlobal::midiPorts[port]; - - // Is it a drum controller event, according to the track port's instrument? - if(mt->type() == Track::DRUM) + MidiController* mc = mp->drumController(cntrl); + if(mc) { - MidiController* mc = mp->drumController(cntrl); - if(mc) - { - int note = cntrl & 0x7f; - cntrl &= ~0xff; - ch = MusEGlobal::drumMap[note].channel; - mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; - cntrl |= MusEGlobal::drumMap[note].anote; - } + int note = cntrl & 0x7f; + cntrl &= ~0xff; + ch = MusEGlobal::drumMap[note].channel; + mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; + cntrl |= MusEGlobal::drumMap[note].anote; } - - mp->deleteController(ch, tck, cntrl, p); } - } - - if(!doClones) - break; - // Get the next clone in the chain ring. - p = p->nextClone(); - // Same as original part? Finished. - if(p == part) - break; - } + + mp->deleteController(ch, tck, cntrl, p); + } + } + + if(!doClones) + break; + // Get the next clone in the chain ring. + p = p->nextClone(); + // Same as original part? Finished. + if(p == part) + break; } } @@ -568,62 +551,57 @@ void removePortCtrlEvents(Part* part, bool doClones) // Update: Due to the varying calls, and order of, incARefcount, (msg)ChangePart, replaceClone, and remove/addPortCtrlEvents, // we can not rely on the reference count as a safety net in these routines. We will just have to trust the clone chain. Part* p = part; - //int j = doClones ? p->cevents()->arefCount() : 1; - //if(j > 0) + while(1) { - //for(int i = 0; i < j; ++i) - while(1) + Track* t = p->track(); + if(t && t->isMidiTrack()) { - Track* t = p->track(); - if(t && t->isMidiTrack()) + MidiTrack* mt = (MidiTrack*)t; + int port = mt->outPort(); + const EventList* el = p->cevents(); + //unsigned len = p->lenTick(); + for(ciEvent ie = el->begin(); ie != el->end(); ++ie) { - MidiTrack* mt = (MidiTrack*)t; - int port = mt->outPort(); - const EventList* el = p->cevents(); - //unsigned len = p->lenTick(); - for(ciEvent ie = el->begin(); ie != el->end(); ++ie) + const Event& ev = ie->second; + // Added by T356. Do not remove events which are past the end of the part. DELETETHIS 5 + // No, actually, do remove ALL of them belonging to the part. + // Just in case there are stray values left after the part end. + //if(ev.tick() >= len) + // break; + + if(ev.type() == Controller) { - const Event& ev = ie->second; - // Added by T356. Do not remove events which are past the end of the part. - // No, actually, do remove ALL of them belonging to the part. - // Just in case there are stray values left after the part end. - //if(ev.tick() >= len) - // break; - - if(ev.type() == Controller) + int ch = mt->outChannel(); + int tck = ev.tick() + p->tick(); + int cntrl = ev.dataA(); + MidiPort* mp = &MusEGlobal::midiPorts[port]; + + // Is it a drum controller event, according to the track port's instrument? + if(mt->type() == Track::DRUM) { - int ch = mt->outChannel(); - int tck = ev.tick() + p->tick(); - int cntrl = ev.dataA(); - MidiPort* mp = &MusEGlobal::midiPorts[port]; - - // Is it a drum controller event, according to the track port's instrument? - if(mt->type() == Track::DRUM) + MidiController* mc = mp->drumController(cntrl); + if(mc) { - MidiController* mc = mp->drumController(cntrl); - if(mc) - { - int note = cntrl & 0x7f; - cntrl &= ~0xff; - ch = MusEGlobal::drumMap[note].channel; - mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; - cntrl |= MusEGlobal::drumMap[note].anote; - } + int note = cntrl & 0x7f; + cntrl &= ~0xff; + ch = MusEGlobal::drumMap[note].channel; + mp = &MusEGlobal::midiPorts[MusEGlobal::drumMap[note].port]; + cntrl |= MusEGlobal::drumMap[note].anote; } - - mp->deleteController(ch, tck, cntrl, p); } + + mp->deleteController(ch, tck, cntrl, p); } - } - - if(!doClones) - break; - // Get the next clone in the chain ring. - p = p->nextClone(); - // Same as original part? Finished. - if(p == part) - break; - } + } + } + + if(!doClones) + break; + // Get the next clone in the chain ring. + p = p->nextClone(); + // Same as original part? Finished. + if(p == part) + break; } } @@ -649,7 +627,6 @@ int PartList::index(Part* part) } if(MusEGlobal::debugMsg) printf("PartList::index(): not found!\n"); - //return 0; // don't comment this in again return -1; // don't change that value. at least MidiEditor::addNewParts relies on this } @@ -904,7 +881,7 @@ void Song::cmdResizePart(Track* track, Part* oPart, unsigned int len, bool doClo i--; Event last = i->second; unsigned last_start = last.frame(); - MusECore::SndFileR file = last.sndFile(); + MusECore::SndFileR file = last.sndFile(); if (file.isNull()) return; @@ -1069,7 +1046,6 @@ void Song::cmdSplitPart(Track* track, Part* part, int tick) startUndo(); // Indicate no undo, and do port controller values but not clone parts. - //MusEGlobal::audio->msgChangePart(part, p1, false); MusEGlobal::audio->msgChangePart(part, p1, false, true, false); MusEGlobal::audio->msgAddPart(p2, false); endUndo(SC_TRACK_MODIFIED | SC_PART_MODIFIED | SC_PART_INSERTED); @@ -1211,19 +1187,6 @@ WavePart* WavePart::clone() const } -/* -bool Part::hasHiddenNotes() -{ - unsigned lastNote=0; - - for (iEvent ev=events()->begin(); ev!=events()->end(); ev++) - if (ev->second.endTick() > lastNote) - lastNote=ev->second.endTick(); - - return lastNote > lenTick(); -} -*/ - //--------------------------------------------------------- // hasHiddenEvents // Returns combination of HiddenEventsType enum. @@ -1246,4 +1209,18 @@ int Part::hasHiddenEvents() return _hiddenEvents; } + + +//--------------------------------------------------------- +// ClonePart +//--------------------------------------------------------- + +ClonePart::ClonePart(const Part* p, int i) +{ + cp = p; + id = i; + uuid_generate(uuid); +} + + } // namespace MusECore diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index ed3a8655..9b3879b9 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -82,22 +82,6 @@ namespace MusEGlobal { MusECore::PluginList plugins; } -/* -static const char* MusEGlobal::preset_file_pattern[] = { - QT_TRANSLATE_NOOP("@default", "Presets (*.pre *.pre.gz *.pre.bz2)"), - QT_TRANSLATE_NOOP("@default", "All Files (*)"), - 0 - }; - -static const char* MusEGlobal::preset_file_save_pattern[] = { - QT_TRANSLATE_NOOP("@default", "Presets (*.pre)"), - QT_TRANSLATE_NOOP("@default", "gzip compressed presets (*.pre.gz)"), - QT_TRANSLATE_NOOP("@default", "bzip2 compressed presets (*.pre.bz2)"), - QT_TRANSLATE_NOOP("@default", "All Files (*)"), - 0 - }; -*/ - namespace MusEGui { int PluginDialog::selectedPlugType = 0; QStringList PluginDialog::sortItems = QStringList(); @@ -113,7 +97,6 @@ namespace MusECore { // ladspa2MidiControlValues //--------------------------------------------------------- -//bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, int port, int ctlnum, int* min, int* max, int* def) bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long port, int ctlnum, int* min, int* max, int* def) { LADSPA_PortRangeHint range = plugin->PortRangeHints[port]; @@ -122,12 +105,8 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por float fmin, fmax, fdef; int imin, imax; float frng; - //int idef; - - //ladspaControlRange(plugin, port, &fmin, &fmax); bool hasdef = ladspaDefaultValue(plugin, port, &fdef); - //bool isint = desc & LADSPA_HINT_INTEGER; MidiController::ControllerType t = midiControllerType(ctlnum); #ifdef PLUGIN_DEBUGIN @@ -181,7 +160,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por frng = fmax - fmin; imin = lrint(fmin); imax = lrint(fmax); - //irng = imax - imin; int ctlmn = 0; int ctlmx = 127; @@ -190,7 +168,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por printf("ladspa2MidiControlValues: port min:%f max:%f \n", fmin, fmax); #endif - //bool isneg = (fmin < 0.0); bool isneg = (imin < 0); int bias = 0; switch(t) @@ -227,7 +204,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por break; case MidiController::Program: ctlmn = 0; - //ctlmx = 0xffffff; ctlmx = 0x3fff; // FIXME: Really should not happen or be allowed. What to do here... break; case MidiController::Pitch: @@ -238,7 +214,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por default: break; } - //int ctlrng = ctlmx - ctlmn; float fctlrng = float(ctlmx - ctlmn); // Is it an integer control? @@ -248,17 +223,7 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por printf("ladspa2MidiControlValues: has LADSPA_HINT_INTEGER\n"); #endif - // If the upper or lower limit is beyond the controller limits, just scale the whole range to fit. - // We could get fancy by scaling only the negative or positive domain, or each one separately, but no... - //if((imin < ctlmn) || (imax > ctlmx)) - //{ - // float scl = float(irng) / float(fctlrng); - // if((ctlmn - imin) > (ctlmx - imax)) - // scl = float(ctlmn - imin); - // else - // scl = float(ctlmx - imax); - //} - // No, instead just clip the limits. ie fit the range into clipped space. + // just clip the limits instead of scaling the whole range. ie fit the range into clipped space. if(imin < ctlmn) imin = ctlmn; if(imax > ctlmx) @@ -267,13 +232,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por *min = imin; *max = imax; - //int idef = (int)lrint(fdef); - //if(idef < ctlmn) - // idef = ctlmn; - //if(idef > ctlmx) - // idef = ctlmx; - //*def = idef; - *def = (int)lrint(fdef); return hasdef; @@ -283,9 +241,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por *min = ctlmn; *max = ctlmx; - // Orcan: commented out next 2 lines to suppress compiler warning: - //float fbias = (fmin + fmax) / 2.0; - //float normbias = fbias / frng; float normdef = fdef / frng; fdef = normdef * fctlrng; @@ -304,7 +259,6 @@ bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned long por // midi2LadspaValue //--------------------------------------------------------- -//float midi2LadspaValue(const LADSPA_Descriptor* plugin, int port, int ctlnum, int val) float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int ctlnum, int val) { LADSPA_PortRangeHint range = plugin->PortRangeHints[port]; @@ -312,14 +266,8 @@ float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int float fmin, fmax; int imin; - //int imax; float frng; - //int idef; - - //ladspaControlRange(plugin, port, &fmin, &fmax); - //bool hasdef = ladspaDefaultValue(plugin, port, &fdef); - //bool isint = desc & LADSPA_HINT_INTEGER; MidiController::ControllerType t = midiControllerType(ctlnum); #ifdef PLUGIN_DEBUGIN @@ -360,8 +308,6 @@ float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int frng = fmax - fmin; imin = lrint(fmin); - //imax = lrint(fmax); - //irng = imax - imin; if(desc & LADSPA_HINT_TOGGLED) { @@ -382,7 +328,6 @@ float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int printf("midi2LadspaValue: port min:%f max:%f \n", fmin, fmax); #endif - //bool isneg = (fmin < 0.0); bool isneg = (imin < 0); int bval = val; int cval = val; @@ -458,11 +403,6 @@ float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int // It's a floating point control, just use wide open maximum range. float normval = float(bval) / fctlrng; - //float fbias = (fmin + fmax) / 2.0; - //float normfbias = fbias / frng; - //float ret = (normdef + normbias) * fctlrng; - //float normdef = fdef / frng; - float ret = normval * frng + fmin; #ifdef PLUGIN_DEBUGIN @@ -510,13 +450,13 @@ CtrlList::Mode ladspaCtrlMode(const LADSPA_Descriptor* plugin, int port) return CtrlList::INTERPOLATE; } +// DELETETHIS 20 // Works but not needed. /* //--------------------------------------------------------- // ladspa2MidiController //--------------------------------------------------------- -//MidiController* ladspa2MidiController(const LADSPA_Descriptor* plugin, int port, int ctlnum) MidiController* ladspa2MidiController(const LADSPA_Descriptor* plugin, unsigned long port, int ctlnum) { int min, max, def; @@ -535,16 +475,12 @@ MidiController* ladspa2MidiController(const LADSPA_Descriptor* plugin, unsigned // If no default ladspa value found, still sets *def to 1.0, but returns false. //--------------------------------------------------------------------------------- -//float ladspaDefaultValue(const LADSPA_Descriptor* plugin, int k) -//bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, int port, float* val) bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, unsigned long port, float* val) { if(port < plugin->PortCount) { LADSPA_PortRangeHint range = plugin->PortRangeHints[port]; LADSPA_PortRangeHintDescriptor rh = range.HintDescriptor; - // bool isLog = LADSPA_IS_HINT_LOGARITHMIC(rh); - //double val = 1.0; float m = (rh & LADSPA_HINT_SAMPLE_RATE) ? float(MusEGlobal::sampleRate) : 1.0f; if (LADSPA_IS_HINT_DEFAULT_MINIMUM(rh)) { @@ -555,9 +491,6 @@ bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, unsigned long port, flo { if (LADSPA_IS_HINT_LOGARITHMIC(rh)) { - //*val = exp(fast_log10(range.LowerBound * m) * .75 + - // log(range.UpperBound * m) * .25); - // p4.0.21 And below... *val = expf(fast_log10(range.LowerBound * m) * .75 + // Why fast_log10? logf(range.UpperBound * m) * .25); return true; @@ -572,8 +505,6 @@ bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, unsigned long port, flo { if (LADSPA_IS_HINT_LOGARITHMIC(rh)) { - //*val = exp(log(range.LowerBound * m) * .5 + - // log10(range.UpperBound * m) * .5); *val = expf(logf(range.LowerBound * m) * .5 + log10f(range.UpperBound * m) * .5); // Why log10? return true; @@ -588,8 +519,6 @@ bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, unsigned long port, flo { if (LADSPA_IS_HINT_LOGARITHMIC(rh)) { - //*val = exp(log(range.LowerBound * m) * .25 + - // log(range.UpperBound * m) * .75); *val = expf(logf(range.LowerBound * m) * .25 + logf(range.UpperBound * m) * .75); return true; @@ -636,7 +565,6 @@ bool ladspaDefaultValue(const LADSPA_Descriptor* plugin, unsigned long port, flo // ladspaControlRange //--------------------------------------------------------- -//void ladspaControlRange(const LADSPA_Descriptor* plugin, int i, float* min, float* max) void ladspaControlRange(const LADSPA_Descriptor* plugin, unsigned long port, float* min, float* max) { LADSPA_PortRangeHint range = plugin->PortRangeHints[port]; @@ -660,6 +588,7 @@ void ladspaControlRange(const LADSPA_Descriptor* plugin, unsigned long port, flo *max = 1.0; } +// DELETETHIS 35 /* //--------------------------------------------------------- // PluginBase @@ -717,10 +646,6 @@ Plugin::Plugin(QFileInfo* f, const LADSPA_Descriptor* d, bool isDssi) _copyright = QString(d->Copyright); _portCount = d->PortCount; - //_portDescriptors = 0; - //if(_portCount) - // _portDescriptors = new LADSPA_PortDescriptor[_portCount]; - _inports = 0; _outports = 0; @@ -729,7 +654,6 @@ Plugin::Plugin(QFileInfo* f, const LADSPA_Descriptor* d, bool isDssi) for(unsigned long k = 0; k < _portCount; ++k) { LADSPA_PortDescriptor pd = d->PortDescriptors[k]; - //_portDescriptors[k] = pd; if(pd & LADSPA_PORT_AUDIO) { if(pd & LADSPA_PORT_INPUT) @@ -780,8 +704,6 @@ Plugin::Plugin(QFileInfo* f, const LADSPA_Descriptor* d, bool isDssi) Plugin::~Plugin() { - //if(_portDescriptors) - // delete[] _portDescriptors; if(plugin) delete plugin; } @@ -822,18 +744,14 @@ int Plugin::incReferences(int val) return 0; } - //if(_references == 0) if(_handle == 0) { - //_references = 0; _handle = dlopen(fi.filePath().toLatin1().constData(), RTLD_NOW); - //handle = dlopen(fi.absFilePath().toLatin1().constData(), RTLD_NOW); if(_handle == 0) { fprintf(stderr, "Plugin::incReferences dlopen(%s) failed: %s\n", fi.filePath().toLatin1().constData(), dlerror()); - //fi.absFilePath().toLatin1().constData(), dlerror()); return 0; } @@ -852,7 +770,6 @@ int Plugin::incReferences(int val) QString label(descr->LADSPA_Plugin->Label); // Listing effect plugins only while excluding synths: // Do exactly what dssi-vst.cpp does for listing ladspa plugins. - //if(label == _name && if(label == _label && !descr->run_synth && !descr->run_synth_adding && @@ -865,8 +782,6 @@ int Plugin::incReferences(int val) plugin = descr->LADSPA_Plugin; break; } - //else - // delete descr; } } else @@ -876,7 +791,6 @@ int Plugin::incReferences(int val) if(ladspadf) { const LADSPA_Descriptor* descr; - //for(int i = 0;; ++i) for(unsigned long i = 0;; ++i) // p4.0.21 { descr = ladspadf(i); @@ -884,7 +798,6 @@ int Plugin::incReferences(int val) break; QString label(descr->Label); - //if(label == _name) if(label == _label) { _isDssi = false; @@ -897,26 +810,18 @@ int Plugin::incReferences(int val) break; } - //else - // delete descr; } } } if(plugin != NULL) { - //_instNo = 0; _name = QString(plugin->Name); _uniqueID = plugin->UniqueID; _maker = QString(plugin->Maker); _copyright = QString(plugin->Copyright); - //if(_portDescriptors) - // delete[] _portDescriptors; - //_portDescriptors = 0; _portCount = plugin->PortCount; - //if(_portCount) - // _portDescriptors = new LADSPA_PortDescriptor[_portCount]; _inports = 0; _outports = 0; @@ -925,7 +830,6 @@ int Plugin::incReferences(int val) for(unsigned long k = 0; k < _portCount; ++k) { LADSPA_PortDescriptor pd = plugin->PortDescriptors[k]; - //_portDescriptors[k] = pd; if(pd & LADSPA_PORT_AUDIO) { if(pd & LADSPA_PORT_INPUT) @@ -974,10 +878,6 @@ int Plugin::incReferences(int val) _references = newref; - //QString guiPath(info.dirPath() + "/" + info.baseName()); - //QDir guiDir(guiPath, "*", QDir::Unsorted, QDir::Files); - //_hasGui = guiDir.exists(); - return _references; } @@ -987,27 +887,6 @@ int Plugin::incReferences(int val) void Plugin::range(unsigned long i, float* min, float* max) const { - /* - LADSPA_PortRangeHint range = plugin->PortRangeHints[i]; - LADSPA_PortRangeHintDescriptor desc = range.HintDescriptor; - if (desc & LADSPA_HINT_TOGGLED) { - *min = 0.0; - *max = 1.0; - return; - } - float m = 1.0; - if (desc & LADSPA_HINT_SAMPLE_RATE) - m = float(MusEGlobal::sampleRate); - - if (desc & LADSPA_HINT_BOUNDED_BELOW) - *min = range.LowerBound * m; - else - *min = 0.0; - if (desc & LADSPA_HINT_BOUNDED_ABOVE) - *max = range.UpperBound * m; - else - *max = 1.0; - */ ladspaControlRange(plugin, i, min, max); // p4.0.20 } @@ -1015,7 +894,6 @@ void Plugin::range(unsigned long i, float* min, float* max) const // defaultValue //--------------------------------------------------------- -//double Plugin::defaultValue(unsigned long port) const float Plugin::defaultValue(unsigned long port) const { // p4.0.21 @@ -1023,6 +901,7 @@ float Plugin::defaultValue(unsigned long port) const ladspaDefaultValue(plugin, port, &val); return val; + // DELETETHIS 50 /* if(port >= plugin->PortCount) return 0.0; @@ -1108,7 +987,6 @@ static void loadPluginLib(QFileInfo* fi) if(dssi) { const DSSI_Descriptor* descr; - //for (int i = 0;; ++i) for (unsigned long i = 0;; ++i) // p4.0.21 { descr = dssi(i); @@ -1124,24 +1002,17 @@ static void loadPluginLib(QFileInfo* fi) { // Make sure it doesn't already exist. if(MusEGlobal::plugins.find(fi->completeBaseName(), QString(descr->LADSPA_Plugin->Label)) != 0) - { - //delete descr; continue; - } + #ifdef PLUGIN_DEBUGIN fprintf(stderr, "loadPluginLib: dssi effect name:%s inPlaceBroken:%d\n", descr->LADSPA_Plugin->Name, LADSPA_IS_INPLACE_BROKEN(descr->LADSPA_Plugin->Properties)); #endif - //LADSPA_Properties properties = descr->LADSPA_Plugin->Properties; - //bool inPlaceBroken = LADSPA_IS_INPLACE_BROKEN(properties); - //MusEGlobal::plugins.add(fi, descr, !inPlaceBroken); if(MusEGlobal::debugMsg) fprintf(stderr, "loadPluginLib: adding dssi effect plugin:%s name:%s label:%s\n", fi->filePath().toLatin1().constData(), descr->LADSPA_Plugin->Name, descr->LADSPA_Plugin->Label); MusEGlobal::plugins.add(fi, descr->LADSPA_Plugin, true); } - //else - // delete descr; } } else @@ -1165,7 +1036,6 @@ static void loadPluginLib(QFileInfo* fi) } const LADSPA_Descriptor* descr; - //for (int i = 0;; ++i) for (unsigned long i = 0;; ++i) // p4.0.21 { descr = ladspa(i); @@ -1174,17 +1044,12 @@ static void loadPluginLib(QFileInfo* fi) // Make sure it doesn't already exist. if(MusEGlobal::plugins.find(fi->completeBaseName(), QString(descr->Label)) != 0) - { - //delete descr; continue; - } + #ifdef PLUGIN_DEBUGIN fprintf(stderr, "loadPluginLib: ladspa effect name:%s inPlaceBroken:%d\n", descr->Name, LADSPA_IS_INPLACE_BROKEN(descr->Properties)); #endif - //LADSPA_Properties properties = descr->Properties; - //bool inPlaceBroken = LADSPA_IS_INPLACE_BROKEN(properties); - //MusEGlobal::plugins.add(fi, ladspa, descr, !inPlaceBroken); if(MusEGlobal::debugMsg) fprintf(stderr, "loadPluginLib: adding ladspa plugin:%s name:%s label:%s\n", fi->filePath().toLatin1().constData(), descr->Name, descr->Label); MusEGlobal::plugins.add(fi, descr); @@ -1289,7 +1154,7 @@ Plugin* PluginList::find(const QString& file, const QString& name) if ((file == i->lib()) && (name == i->label())) return &*i; } - //printf("Plugin <%s> not found\n", name.ascii()); + return 0; } @@ -1492,21 +1357,6 @@ bool Pipeline::isDssiPlugin(int idx) const return false; } -/* -//--------------------------------------------------------- -// dssi_ui_filename -//--------------------------------------------------------- - -QString dssi_ui_filename(int idx) const -{ - PluginI* p = (*this)[idx]; - if(p) - return p->dssi_ui_filename(); - - return QString(); -} -*/ - //--------------------------------------------------------- // has_dssi_ui //--------------------------------------------------------- @@ -1597,15 +1447,6 @@ bool Pipeline::nativeGuiVisible(int idx) void Pipeline::apply(unsigned long ports, unsigned long nframes, float** buffer1) { - // prepare a second set of buffers in case a plugin is not - // capable of inPlace processing - //float* buffer2[ports]; - //float data[nframes * ports]; - //for (int i = 0; i < ports; ++i) - // buffer2[i] = data + i * nframes; - - //fprintf(stderr, "Pipeline::apply data: nframes:%lu %e %e %e %e\n", nframes, buffer1[0][0], buffer1[0][1], buffer1[0][2], buffer1[0][3]); - bool swap = false; for (iPluginI ip = begin(); ip != end(); ++ip) { @@ -1613,10 +1454,8 @@ void Pipeline::apply(unsigned long ports, unsigned long nframes, float** buffer1 if(p) { - //if (p && p->on()) { if (p->on()) { - //fprintf(stderr, "Pipeline::apply PluginI:%p on:%d\n", p, p->on()); if (p->inPlaceCapable()) { if (swap) @@ -1642,8 +1481,6 @@ void Pipeline::apply(unsigned long ports, unsigned long nframes, float** buffer1 if (ports != 0 && swap) { for (unsigned long i = 0; i < ports; ++i) - //memcpy(buffer1[i], buffer2[i], sizeof(float) * nframes); - //memcpy(buffer1[i], buffer[i], sizeof(float) * nframes); AL::dsp->cpy(buffer1[i], buffer[i], nframes); } } @@ -1671,8 +1508,6 @@ QString PluginIBase::dssi_ui_filename() const QString guiPath(dirPath() + "/" + libr); - //fprintf(stderr, "PluginIBase::dssi_ui_filename guiPath:%s\n", guiPath.toLatin1().constData()); - QDir guiDir(guiPath, "*", QDir::Unsorted, QDir::Files); if(!guiDir.exists()) return QString(); @@ -1713,10 +1548,6 @@ QString PluginIBase::dssi_ui_filename() const } } - //fprintf(stderr, "PluginIBase::dssi_ui_filename plug_qt_ui:%s plug_any_ui:%s lib_qt_ui:%s lib_any_ui:%s\n", - // plug_qt_ui.toLatin1().constData(), plug_any_ui.toLatin1().constData(), - // lib_qt_ui.toLatin1().constData(), lib_any_ui.toLatin1().constData()); - // Prefer qt plugin ui if(!plug_qt_ui.isEmpty()) return plug_qt_ui; @@ -1771,8 +1602,6 @@ PluginI::~PluginI() deactivate(); _plugin->incReferences(-1); } - //if (_gui) - // delete _gui; if (controlsOut) delete[] controlsOut; if (controls) @@ -1799,12 +1628,7 @@ void PluginI::updateControllers() if(!_track) return; - //for(int i = 0; i < controlPorts; ++i) for(unsigned long i = 0; i < controlPorts; ++i) - //MusEGlobal::audio->msgSetPluginCtrlVal(this, genACnum(_id, i), controls[i].val); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(_track, genACnum(_id, i), controls[i].val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? _track->setPluginCtrlVal(genACnum(_id, i), controls[i].val); // TODO A faster bulk message MusEGlobal::song->controllerChange(_track); @@ -1816,30 +1640,10 @@ void PluginI::updateControllers() void PluginI::setChannels(int c) { - // p3.3.41 Removed - //if (channel == c) - // return; - - // p3.3.41 channel = c; - //int ni = c / _plugin->outports(); - //if (ni == 0) - // ni = 1; - // p3.3.41 Some plugins have zero out ports, causing exception with the above line. - // Also, pick the least number of ins or outs, and base the number of instances on that. unsigned long ins = _plugin->inports(); unsigned long outs = _plugin->outports(); - /* - unsigned long minports = ~0ul; - if(outs && outs < minports) - minports = outs; - if(ins && ins < minports) - minports = ins; - if(minports == ~0ul) - minports = 1; - int ni = c / minports; - */ int ni = 1; if(outs) ni = c / outs; @@ -1853,9 +1657,6 @@ void PluginI::setChannels(int c) if (ni == instances) return; - // p3.3.41 Moved above. - //channel = c; - // remove old instances: deactivate(); delete[] handle; @@ -1869,8 +1670,6 @@ void PluginI::setChannels(int c) } } - //int curPort = 0; - //int curOutPort = 0; unsigned long curPort = 0; // p4.0.21 unsigned long curOutPort = 0; unsigned long ports = _plugin->ports(); @@ -1906,11 +1705,7 @@ void PluginI::setChannels(int c) void PluginI::setParam(unsigned long i, float val) { - //controls[i].tmpVal = val; - - // p4.0.21 if(i >= _plugin->_controlInPorts) - //if(i >= controlPorts) { printf("PluginI::setParameter param number %lu out of range of ports:%lu\n", i, _plugin->_controlInPorts); return; @@ -1932,7 +1727,7 @@ void PluginI::setParam(unsigned long i, float val) fprintf(stderr, "PluginI::setParameter: fifo overflow: in control number:%lu\n", i); } - // Notify that changes are to be sent upon heartbeat. + // Notify that changes are to be sent upon heartbeat. DELETETHIS 4 // TODO: No, at least not for now. So far, setParameter is only called during loading of stored params, // and we don't want this interfering with oscUpdate which also sends the values. //synti->_guiUpdateControls[n] = true; @@ -1942,7 +1737,6 @@ void PluginI::setParam(unsigned long i, float val) // defaultValue //--------------------------------------------------------- -//double PluginI::defaultValue(unsigned int param) const float PluginI::defaultValue(unsigned long param) const { if(param >= controlPorts) @@ -1960,10 +1754,6 @@ LADSPA_Handle Plugin::instantiate() return NULL; } - //QString guiPath(info.dirPath() + "/" + info.baseName()); - //QDir guiDir(guiPath, "*", QDir::Unsorted, QDir::Files); - //_hasGui = guiDir.exists(); - return h; } @@ -1992,23 +1782,8 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) _name = _plugin->name() + inst; _label = _plugin->label() + inst; - //instances = channel/plug->outports(); - // p3.3.41 Some plugins have zero out ports, causing exception with the above line. - // Also, pick the least number of ins or outs, and base the number of instances on that. unsigned long ins = plug->inports(); unsigned long outs = plug->outports(); - /* - unsigned long minports = ~0ul; - if(outs && outs < minports) - minports = outs; - if(ins && ins < minports) - minports = ins; - if(minports == ~0ul) - minports = 1; - instances = channel / minports; - if(instances < 1) - instances = 1; - */ if(outs) { instances = channel / outs; @@ -2033,7 +1808,6 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) #endif handle[i] = _plugin->instantiate(); - //if (handle[i] == 0) if(handle[i] == NULL) return true; } @@ -2059,8 +1833,6 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) controls = new Port[controlPorts]; controlsOut = new Port[controlOutPorts]; - //int i = 0; - //int ii = 0; unsigned long curPort = 0; unsigned long curOutPort = 0; for(unsigned long k = 0; k < ports; ++k) @@ -2070,7 +1842,6 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) { if(pd & LADSPA_PORT_INPUT) { - //double val = _plugin->defaultValue(k); float val = _plugin->defaultValue(k); // p4.0.21 controls[curPort].val = val; controls[curPort].tmpVal = val; @@ -2081,8 +1852,6 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) else if(pd & LADSPA_PORT_OUTPUT) { - //double val = _plugin->defaultValue(k); - //float val = _plugin->defaultValue(k); controlsOut[curOutPort].val = 0.0; controlsOut[curOutPort].tmpVal = 0.0; controlsOut[curOutPort].enCtrl = false; @@ -2091,8 +1860,6 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) } } } - //unsigned long curPort = 0; - //unsigned long curOutPort = 0; curPort = 0; curOutPort = 0; for(unsigned long k = 0; k < ports; ++k) @@ -2125,15 +1892,12 @@ bool PluginI::initPluginInstance(Plugin* plug, int c) // connect //--------------------------------------------------------- -//void PluginI::connect(int ports, float** src, float** dst) void PluginI::connect(unsigned long ports, unsigned long offset, float** src, float** dst) { - //int port = 0; unsigned long port = 0; // p4.0.21 for (int i = 0; i < instances; ++i) { for (unsigned long k = 0; k < _plugin->ports(); ++k) { if (isAudioIn(k)) { - //_plugin->connectPort(handle[i], k, src[port]); _plugin->connectPort(handle[i], k, src[port] + offset); // p4.0.21 port = (port + 1) % ports; } @@ -2143,13 +1907,8 @@ void PluginI::connect(unsigned long ports, unsigned long offset, float** src, fl for (int i = 0; i < instances; ++i) { for (unsigned long k = 0; k < _plugin->ports(); ++k) { if (isAudioOut(k)) { - // _plugin->connectPort(handle[i], k, dst[port]); _plugin->connectPort(handle[i], k, dst[port] + offset); // p4.0.21 port = (port + 1) % ports; // overwrite output? -// ++port; -// if (port >= ports) { -// return; -// } } } } @@ -2176,18 +1935,12 @@ void PluginI::activate() for (int i = 0; i < instances; ++i) _plugin->activate(handle[i]); if (initControlValues) { - //printf("PluginI::activate init:%d\n", initControlValues); - //for (int i = 0; i < controlPorts; ++i) { for (unsigned long i = 0; i < controlPorts; ++i) { controls[i].val = controls[i].tmpVal; } } else { - // // get initial control values from plugin - // - //printf("PluginI::activate init:%d\n", initControlValues); - //for (int i = 0; i < controlPorts; ++i) { for (unsigned long i = 0; i < controlPorts; ++i) { controls[i].tmpVal = controls[i].val; } @@ -2199,13 +1952,10 @@ void PluginI::activate() // set plugin instance controller value by name //--------------------------------------------------------- -//bool PluginI::setControl(const QString& s, double val) bool PluginI::setControl(const QString& s, float val) { - //for (int i = 0; i < controlPorts; ++i) { for (unsigned long i = 0; i < controlPorts; ++i) { if (_plugin->portName(controls[i].idx) == s) { - //controls[i].val = controls[i].tmpVal = val; setParam(i, val); // p4.0.21 return false; } @@ -2222,17 +1972,11 @@ bool PluginI::setControl(const QString& s, float val) void PluginI::writeConfiguration(int level, Xml& xml) { xml.tag(level++, "plugin file=\"%s\" label=\"%s\" channel=\"%d\"", - //_plugin->lib().toLatin1().constData(), _plugin->label().toLatin1().constData(), instances * _plugin->inports()); - // p3.3.41 - //_plugin->lib().toLatin1().constData(), _plugin->label().toLatin1().constData(), channel); Xml::xmlString(_plugin->lib()).toLatin1().constData(), Xml::xmlString(_plugin->label()).toLatin1().constData(), channel); - //for (int i = 0; i < controlPorts; ++i) { - //int idx = controls[i].idx; for (unsigned long i = 0; i < controlPorts; ++i) { // p4.0.21 - unsigned long idx = controls[i].idx; // + unsigned long idx = controls[i].idx; QString s("control name=\"%1\" val=\"%2\" /"); - //xml.tag(level, s.arg(_plugin->portName(idx)).arg(controls[i].tmpVal).toLatin1().constData()); xml.tag(level, s.arg(Xml::xmlString(_plugin->portName(idx)).toLatin1().constData()).arg(controls[i].tmpVal).toLatin1().constData()); } if (_on == false) @@ -2241,11 +1985,9 @@ void PluginI::writeConfiguration(int level, Xml& xml) xml.intTag(level, "gui", 1); xml.geometryTag(level, "geometry", _gui); } - if (nativeGuiVisible()) { + if (nativeGuiVisible()) xml.intTag(level, "nativegui", 1); - // TODO: - //xml.geometryTag(level, "nativegeometry", ?); - } + xml.tag(level--, "/plugin"); } @@ -2258,8 +2000,7 @@ bool PluginI::loadControl(Xml& xml) QString file; QString label; QString name("mops"); - //double val = 0.0; - float val = 0.0; // p4.0.21 + float val = 0.0; for (;;) { Xml::Token token = xml.parse(); @@ -2276,36 +2017,30 @@ bool PluginI::loadControl(Xml& xml) if (tag == "name") name = xml.s2(); else if (tag == "val") - //val = xml.s2().toDouble(); val = xml.s2().toFloat(); // p4.0.21 break; case Xml::TagEnd: if (tag == "control") { - //if (setControl(name, val)) - // return false; - // p4.0.23 Special for loader - bypass the ring buffer and store directly, - // so that upon the 'gui = 1' tag (show the gui), the gui has immediate - // access to the values. if(_plugin) - { - bool found = false; - for(unsigned long i = 0; i < controlPorts; ++i) - { - if(_plugin->portName(controls[i].idx) == name) - { - controls[i].val = controls[i].tmpVal = val; - found = true; - } - } - if(!found) - { - printf("PluginI:loadControl(%s, %f) controller not found\n", - name.toLatin1().constData(), val); - return false; - } - initControlValues = true; - } + { + bool found = false; + for(unsigned long i = 0; i < controlPorts; ++i) + { + if(_plugin->portName(controls[i].idx) == name) + { + controls[i].val = controls[i].tmpVal = val; + found = true; + } + } + if(!found) + { + printf("PluginI:loadControl(%s, %f) controller not found\n", + name.toLatin1().constData(), val); + return false; + } + initControlValues = true; } + } return true; default: break; @@ -2324,8 +2059,6 @@ bool PluginI::readConfiguration(Xml& xml, bool readPreset) QString file; QString label; if (!readPreset) - //instances = 1; - // p3.3.41 channel = 1; for (;;) { @@ -2339,24 +2072,16 @@ bool PluginI::readConfiguration(Xml& xml, bool readPreset) if (!readPreset && _plugin == 0) { _plugin = MusEGlobal::plugins.find(file, label); - //if (_plugin && initPluginInstance(_plugin, instances)) { - // p3.3.41 if (_plugin) - { - if(initPluginInstance(_plugin, channel)) { + { + if(initPluginInstance(_plugin, channel)) { _plugin = 0; xml.parse1(); printf("Error initializing plugin instance (%s, %s)\n", file.toLatin1().constData(), label.toLatin1().constData()); - //break; // Don't break - let it read any control tags. + //break; // Don't break - let it read any control tags. DELETETHIS } - } - else - { - //printf("Warning: Plugin not found (%s, %s)\n", - // file.toLatin1().constData(), label.toLatin1().constData()); - //break; // Don't break - let it read any control tags. - } + } } if (tag == "control") loadControl(xml); @@ -2407,8 +2132,6 @@ bool PluginI::readConfiguration(Xml& xml, bool readPreset) } else if (tag == "channel") { if (!readPreset) - //instances = xml.s2().toInt(); - // p3.3.41 channel = xml.s2().toInt(); } break; @@ -2417,20 +2140,18 @@ bool PluginI::readConfiguration(Xml& xml, bool readPreset) if (!readPreset && _plugin == 0) { _plugin = MusEGlobal::plugins.find(file, label); if (_plugin == 0) - { + { printf("Warning: Plugin not found (%s, %s)\n", file.toLatin1().constData(), label.toLatin1().constData()); return true; - } + } - //if (initPluginInstance(_plugin, instances)) - // p3.3.41 if (initPluginInstance(_plugin, channel)) - { + { printf("Error initializing plugin instance (%s, %s)\n", file.toLatin1().constData(), label.toLatin1().constData()); return true; - } + } } if (_gui) _gui->updateValues(); @@ -2531,7 +2252,6 @@ bool PluginI::nativeGuiVisible() // makeGui //--------------------------------------------------------- -//void PluginI::makeGui() void PluginIBase::makeGui() { _gui = new MusEGui::PluginGui(this); @@ -2540,7 +2260,6 @@ void PluginIBase::makeGui() //--------------------------------------------------------- // deleteGui //--------------------------------------------------------- -//void PluginI::deleteGui() void PluginIBase::deleteGui() { if(_gui) @@ -2556,7 +2275,6 @@ void PluginIBase::deleteGui() void PluginI::enableAllControllers(bool v) { - //for(int i = 0; i < controlPorts; ++i) for(unsigned long i = 0; i < controlPorts; ++i) controls[i].enCtrl = v; } @@ -2567,7 +2285,6 @@ void PluginI::enableAllControllers(bool v) void PluginI::enable2AllControllers(bool v) { - //for(int i = 0; i < controlPorts; ++i) for(unsigned long i = 0; i < controlPorts; ++i) controls[i].en2Ctrl = v; } @@ -2578,7 +2295,9 @@ void PluginI::enable2AllControllers(bool v) QString PluginI::titlePrefix() const { - return _track->name() + QString(": "); + if (_track) + return _track->name() + QString(": "); + else return ":"; } //--------------------------------------------------------- @@ -2586,6 +2305,8 @@ QString PluginI::titlePrefix() const // If ports is 0, just process controllers only, not audio (do not 'run'). //--------------------------------------------------------- +//DELETETHIS 90 + /* //void PluginI::apply(int n) void PluginI::apply(unsigned long n) @@ -2676,11 +2397,10 @@ void PluginI::apply(unsigned long n) } } */ - -#if 1 + void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** bufOut) { - // Process control value changes. + // Process control value changes. DELETETHIS 10 //if(MusEGlobal::automation && _track && _track->automationType() != AUTO_OFF && _id != -1) //{ // for(int i = 0; i < controlPorts; ++i) @@ -2691,7 +2411,7 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** //} // Grab the control ring buffer size now. - //const int cbsz = _controlFifo.getSize(); + //const int cbsz = _controlFifo.getSize(); DELETETHIS 4 //unsigned endPos = pos + n; //unsigned long frameOffset = MusEGlobal::audio->getFrameOffset(); @@ -2732,7 +2452,7 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** while(sample < n) { - //unsigned long nsamp = n; + //unsigned long nsamp = n; DELETETHIS 2 //unsigned long nsamp = n - sample; unsigned long nsamp = usefixedrate ? fixedsize : n - sample; bool found = false; @@ -2740,18 +2460,18 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** unsigned long index = 0; unsigned long evframe; // Get all control ring buffer items valid for this time period... - //for(int m = 0; m < cbsz; ++m) // Doesn't like this. Why? + //for(int m = 0; m < cbsz; ++m) // Doesn't like this. Why? DELETETHIS while(!_controlFifo.isEmpty()) { - //ControlValue v = _controlFifo.get(); + //ControlValue v = _controlFifo.get(); DELETETHIS ControlEvent v = _controlFifo.peek(); // The events happened in the last period or even before that. Shift into this period with + n. This will sync with audio. // If the events happened even before current frame - n, make sure they are counted immediately as zero-frame. - //evframe = (pos + frameOffset > v.frame + n) ? 0 : v.frame - pos - frameOffset + n; + //evframe = (pos + frameOffset > v.frame + n) ? 0 : v.frame - pos - frameOffset + n; DELETETHIS evframe = (syncFrame > v.frame + n) ? 0 : v.frame - syncFrame + n; // Process only items in this time period. Make sure to process all // subsequent items which have the same frame. - //printf("PluginI::apply control idx:%lu frame:%lu val:%f unique:%d evframe:%lu\n", + //printf("PluginI::apply control idx:%lu frame:%lu val:%f unique:%d evframe:%lu\n", DELETETHIS // v.idx, v.frame, v.value, v.unique, evframe); // REMOVE Tim. // Protection. Observed this condition. Why? Supposed to be linear timestamps. if(found && evframe < frame) @@ -2761,42 +2481,42 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** // Just make it equal to the current frame so it gets processed right away. evframe = frame; } - //if(v.frame >= (endPos + frameOffset) || (found && v.frame != frame)) + //if(v.frame >= (endPos + frameOffset) || (found && v.frame != frame)) DELETETHIS 5 //if(v.frame < sample || v.frame >= (sample + nsamp) || (found && v.frame != frame)) //if(v.frame < sample || v.frame >= (endPos + frameOffset) || (found && v.frame != frame)) //if(v.frame < sample || v.frame >= (endPos + frameOffset) //if(v.frame < sample || v.frame >= frameOffset if(evframe >= n - //|| (found && v.frame != frame) + //|| (found && v.frame != frame) DELETETHIS 3 //|| (!usefixedrate && found && !v.unique && v.frame != frame) //|| (found && !v.unique && evframe != frame) // Not enough requested samples to satisfy minimum setting? Keep going. || (found && !v.unique && (evframe - sample >= min_per)) // Protection. Observed this condition (dummy audio so far). Why? Supposed to be linear timestamps. - //|| (found && evframe < frame) + //|| (found && evframe < frame) DELETETHIS // dssi-vst needs them serialized and accounted for, no matter what. This works with fixed rate // because nsamp is constant. But with packets, we need to guarantee at least one-frame spacing. // Although we likely won't be using packets with dssi-vst, so it's OK for now. - //|| (found && v.idx == index)) + //|| (found && v.idx == index)) DELETETHIS //|| (usefixedrate && found && v.idx == index)) // Try this. || (usefixedrate && found && v.unique && v.idx == index)) // break; _controlFifo.remove(); // Done with the ring buffer's item. Remove it. - //if(v.idx >= controlPorts) // Sanity check. + //if(v.idx >= controlPorts) // Sanity check. DELETETHIS if(v.idx >= _plugin->_controlInPorts) break; found = true; - //frame = v.frame; + //frame = v.frame; DELETETHIS frame = evframe; index = v.idx; // Set the ladspa control port value. - //controls[v.idx].val = v.value; + //controls[v.idx].val = v.value; DELETETHIS controls[v.idx].tmpVal = v.value; // Need to update the automation value, otherwise it overwrites later with the last MusEGlobal::automation value. if(_track && _id != -1) { - // Since we are now in the audio thread context, there's no need to send a message, + // Since we are now in the audio thread context, there's no need to send a message, DELETETHIS 5 // just modify directly. //MusEGlobal::audio->msgSetPluginCtrlVal(this, genACnum(_id, k), controls[k].val); // p3.3.43 @@ -2814,7 +2534,7 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** // TODO: Taken from our native gui control handlers. // This may need modification or may cause problems - // we don't have the luxury of access to the dssi gui controls ! - //if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH)) + //if(at == AUTO_WRITE || (MusEGlobal::audio->isPlaying() && at == AUTO_TOUCH)) DELETETHIS 3 // enableController(k, false); //_track->recordAutomation(id, v.value); } @@ -2823,20 +2543,17 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** // Now update the actual values from the temporary values... for(unsigned long k = 0; k < controlPorts; ++k) { - // printf("PluginI::apply updating port:%lu val:%f\n", k, controls[k].tmpVal); + // printf("PluginI::apply updating port:%lu val:%f\n", k, controls[k].tmpVal); DELETETHIS controls[k].val = controls[k].tmpVal; } //if(found) if(found && !usefixedrate) - //nsamp = frame - sample + 1; + //nsamp = frame - sample + 1; DELETETHIS nsamp = frame - sample; if(sample + nsamp >= n) // Safety check. nsamp = n - sample; - //printf("PluginI::apply ports:%lu n:%lu frame:%lu sample:%lu nsamp:%lu syncFrame:%lu loopcount:%d\n", - // ports, n, frame, sample, nsamp, syncFrame, loopcount); - // Don't allow zero-length runs. This could/should be checked in the control loop instead. // Note this means it is still possible to get stuck in the top loop (at least for a while). if(nsamp == 0) @@ -2847,17 +2564,13 @@ void PluginI::apply(unsigned long n, unsigned long ports, float** bufIn, float** connect(ports, sample, bufIn, bufOut); for(int i = 0; i < instances; ++i) - { - //fprintf(stderr, "PluginI::apply handle %d\n", i); _plugin->apply(handle[i], nsamp); - } } sample += nsamp; - loopcount++; // REMOVE Tim. + loopcount++; // REMOVE Tim. DELETETHIS then } } -#endif //--------------------------------------------------------- // oscConfigure @@ -2885,7 +2598,6 @@ int Plugin::oscConfigure(LADSPA_Handle handle, const char* key, const char* valu char* message = dssi_descr->configure(handle, key, value); if (message) { printf("Plugin::oscConfigure on configure '%s' '%s', plugin '%s' returned error '%s'\n", - //key, value, synti->name().toAscii().data(), message); key, value, plugin->Label, message); free(message); @@ -2898,10 +2610,6 @@ int Plugin::oscConfigure(LADSPA_Handle handle, const char* key, const char* valu // instances[n].ui_osc_configure_path, "ss", key, value); // } - // configure invalidates bank and program information, so - // we should do this again now: - //queryPrograms(); - #endif // DSSI_SUPPORT return 0; @@ -2928,9 +2636,6 @@ int PluginI::oscConfigure(const char *key, const char *value) // concept of restoring an instance from one run to the next, so // we don't bother remembering these at all. - //const char *key = (const char *)&argv[0]->s; - //const char *value = (const char *)&argv[1]->s; - #ifdef PLUGIN_DEBUGIN printf("PluginI::oscConfigure effect plugin name:%s label:%s key:%s value:%s\n", _name.toLatin1().constData(), _label.toLatin1().constData(), key, value); #endif @@ -2939,17 +2644,6 @@ int PluginI::oscConfigure(const char *key, const char *value) // FIXME: Don't think this is right, should probably do as example shows below. for(int i = 0; i < instances; ++i) _plugin->oscConfigure(handle[i], key, value); - - // also call back on UIs for plugins other than the one - // that requested this: - // if (n != instance->number && instances[n].uiTarget) { - // lo_send(instances[n].uiTarget, - // instances[n].ui_osc_configure_path, "ss", key, value); - // } - - // configure invalidates bank and program information, so - // we should do this again now: - //queryPrograms(); #endif // DSSI_SUPPORT return 0; @@ -2965,7 +2659,7 @@ int PluginI::oscUpdate() // Send project directory. _oscif.oscSendConfigure(DSSI_PROJECT_DIRECTORY_KEY, MusEGlobal::museProject.toLatin1().constData()); // MusEGlobal::song->projectPath() - /* + /* DELETETHIS 20 // Send current string configuration parameters. StringParamMap& map = synti->stringParameters(); int i = 0; @@ -2989,11 +2683,11 @@ int PluginI::oscUpdate() usleep(300000); // Send current control values. - //unsigned long ports = controlPorts; + //unsigned long ports = controlPorts; DELETETHIS 2 //for(int i = 0; i < controlPorts; ++i) for(unsigned long i = 0; i < controlPorts; ++i) { - //unsigned long k = synth->pIdx(i); + //unsigned long k = synth->pIdx(i); DELETETHIS 2 //_oscIF.oscSendControl(k, controls[i]); //printf("PluginI::oscUpdate() sending control:%lu val:%f\n", i, controls[i].val); _oscif.oscSendControl(controls[i].idx, controls[i].val); @@ -3012,17 +2706,10 @@ int PluginI::oscUpdate() int PluginI::oscControl(unsigned long port, float value) { - //int port = argv[0]->i; - //LADSPA_Data value = argv[1]->f; - #ifdef PLUGIN_DEBUGIN printf("PluginI::oscControl received oscControl port:%lu val:%f\n", port, value); #endif - //int controlPorts = synth->_controller; - - //if(port >= controlPorts) - //if(port < 0 || port >= _plugin->rpIdx.size()) if(port >= _plugin->rpIdx.size()) { fprintf(stderr, "PluginI::oscControl: port number:%lu is out of range of index list size:%zd\n", port, _plugin->rpIdx.size()); @@ -3054,7 +2741,7 @@ int PluginI::oscControl(unsigned long port, float value) // TODO: May need FIFOs on each control(!) so that the control changes get sent one per process cycle! // Observed countdown not actually going to zero upon string of changes. // Try this ... - /* + /* DELETETHIS 20 OscControlFifo* cfifo = _oscif.oscFifo(cport); if(cfifo) { @@ -3097,7 +2784,6 @@ int PluginI::oscControl(unsigned long port, float value) // That makes this pretty useless... But what the heck... if(_track && _id != -1) { - //int id = genACnum(_id, cport); unsigned long id = genACnum(_id, cport); AutomationType at = _track->automationType(); @@ -3110,7 +2796,7 @@ int PluginI::oscControl(unsigned long port, float value) _track->recordAutomation(id, value); } - /* + /* DELETETHIS 12 const DSSI_Descriptor* dssi = synth->dssi; const LADSPA_Descriptor* ld = dssi->LADSPA_Plugin; @@ -3126,6 +2812,7 @@ int PluginI::oscControl(unsigned long port, float value) } */ +// DELETETHIS 20 #if 0 int port = argv[0]->i; LADSPA_Data value = argv[1]->f; @@ -3175,7 +2862,7 @@ PluginDialog::PluginDialog(QWidget* parent) // "Note: In order to avoid performance issues, it is recommended that sorting // is enabled after inserting the items into the tree. Alternatively, you could // also insert the items into a list before inserting the items into the tree. " - //pList->setSortingEnabled(true); + //pList->setSortingEnabled(true); DELETETHIS QStringList headerLabels; headerLabels << tr("Lib"); headerLabels << tr("Label"); @@ -3196,7 +2883,7 @@ PluginDialog::PluginDialog(QWidget* parent) pList->setAlternatingRowColors(true); pList->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - //fillPlugs(selectedPlugType); + //fillPlugs(selectedPlugType); DELETETHIS 3 //pList->setSortingEnabled(true); //pList->sortByColumn(sortColumn, sortOrder); @@ -3218,20 +2905,14 @@ PluginDialog::PluginDialog(QWidget* parent) okB->setFixedWidth(80); okB->setEnabled(false); cancelB->setFixedWidth(80); - //ok_lo->addStretch(4); - //ok_lo->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Maximum)); ok_lo->addWidget(okB); ok_lo->addSpacing(8); ok_lo->addWidget(cancelB); - //ok_lo->addStretch(4); - //ok_lo->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Maximum)); QGroupBox* plugSelGroup = new QGroupBox(this); plugSelGroup->setTitle("Show plugs:"); plugSelGroup->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - //QHBoxLayout* psl = new QHBoxLayout; QGridLayout* psl = new QGridLayout; - //psl->setRowStretch(0, 0); plugSelGroup->setLayout(psl); QButtonGroup* plugSel = new QButtonGroup(plugSelGroup); @@ -3239,25 +2920,21 @@ PluginDialog::PluginDialog(QWidget* parent) onlySM->setText(tr("Mono and Stereo")); onlySM->setCheckable(true); plugSel->addButton(onlySM); - //psl->addWidget(onlySM); psl->addWidget(onlySM, 1, 0); onlyS = new QRadioButton(this); onlyS->setText(tr("Stereo")); onlyS->setCheckable(true); plugSel->addButton(onlyS); - //psl->addWidget(onlyS); psl->addWidget(onlyS, 0, 1); onlyM = new QRadioButton(this); onlyM->setText(tr("Mono")); onlyM->setCheckable(true); plugSel->addButton(onlyM); - //psl->addWidget(onlyM); psl->addWidget(onlyM, 0, 0); allPlug = new QRadioButton(this); allPlug->setText(tr("Show All")); allPlug->setCheckable(true); plugSel->addButton(allPlug); - //psl->addWidget(allPlug); psl->addWidget(allPlug, 1, 1); plugSel->setExclusive(true); @@ -3292,7 +2969,7 @@ PluginDialog::PluginDialog(QWidget* parent) sortBox->setMinimumSize(100, 10); srch_lo->addWidget(sortBox); - //srch_lo->addStretch(); + //srch_lo->addStretch(); DELETETHIS 4 // FIXME: Adding this makes the whole bottom hlayout expand. Would like some space between lineedit and bottom. // Same thing if spacers added to group box or Ok Cancel box. //srch_lo->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Maximum)); @@ -3303,18 +2980,12 @@ PluginDialog::PluginDialog(QWidget* parent) if(listSave.isEmpty()) { - //int sizes[] = { 110, 110, 0, 30, 30, 30, 30, 30, 50, 110, 110 }; int sizes[] = { 110, 110, 110, 30, 30, 30, 30, 30, 50, 110, 110 }; for (int i = 0; i < 11; ++i) { - //if (sizes[i] == 0) { - // pList->header()->setResizeMode(i, QHeaderView::Stretch); - // } - //else { - if (sizes[i] <= 50) // hack alert! - pList->header()->setResizeMode(i, QHeaderView::Fixed); - pList->header()->resizeSection(i, sizes[i]); - // } - } + if (sizes[i] <= 50) // hack alert! + pList->header()->setResizeMode(i, QHeaderView::Fixed); + pList->header()->resizeSection(i, sizes[i]); + } pList->sortByColumn(0, Qt::AscendingOrder); } else @@ -3368,13 +3039,10 @@ void PluginDialog::saveSettings() sortItems.push_front(sortBox->currentText()); } - ///sortColumn = pList->sortColumn(); QHeaderView* hdr = pList->header(); if(hdr) - { - ///sortOrder = hdr->sortIndicatorOrder(); listSave = hdr->saveState(); - } + geometrySave = geometry(); } @@ -3405,16 +3073,12 @@ void PluginDialog::reject() void PluginDialog::fillPlugs(QAbstractButton* ab) { if (ab == allPlug) - //fillPlugs(SEL_ALL); selectedPlugType = SEL_ALL; else if (ab == onlyM) - //fillPlugs(SEL_M); selectedPlugType = SEL_M; else if (ab == onlyS) - //fillPlugs(SEL_S); selectedPlugType = SEL_S; else if (ab == onlySM) - //fillPlugs(SEL_SM); selectedPlugType = SEL_SM; fillPlugs(); } @@ -3423,10 +3087,6 @@ void PluginDialog::fillPlugs() { pList->clear(); for (MusECore::iPlugin i = MusEGlobal::plugins.begin(); i != MusEGlobal::plugins.end(); ++i) { - //int ai = i->inports(); - //int ao = i->outports(); - //int ci = i->controlInPorts(); - //int co = i->controlOutPorts(); unsigned long ai = i->inports(); // p4.0.21 unsigned long ao = i->outports(); unsigned long ci = i->controlInPorts(); @@ -3503,8 +3163,6 @@ const char* presetBypassText = "Click this button to bypass effect unit"; // PluginGui //--------------------------------------------------------- -//PluginGui::PluginGui(PluginI* p) -// p3.3.43 PluginGui::PluginGui(MusECore::PluginIBase* p) : QMainWindow(0) { @@ -3512,7 +3170,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) params = 0; paramsOut = 0; plugin = p; - //setWindowTitle(plugin->name()); setWindowTitle(plugin->titlePrefix() + plugin->name()); QToolBar* tools = addToolBar(tr("File Buttons")); @@ -3536,7 +3193,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) // TODO: We need to use .qrc files to use icons in WhatsThis bubbles. See Qt // Resource System in Qt documentation - ORCAN - //Q3MimeSourceFactory::defaultFactory()->setPixmap(QString("fileopen"), *openIcon ); fileOpen->setWhatsThis(tr(presetOpenText)); onOff->setWhatsThis(tr(presetBypassText)); fileSave->setWhatsThis(tr(presetSaveText)); @@ -3567,10 +3223,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) const char* name = ba.constData(); if (*name !='P') continue; - //int parameter = -1; - //sscanf(name, "P%d", ¶meter); - //if (parameter == -1) - // continue; unsigned long parameter; // p4.0.21 int rv = sscanf(name, "P%lu", ¶meter); if(rv != 1) @@ -3598,10 +3250,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) const char* name = ba.constData(); if (*name !='P') continue; - //int parameter = -1; - //sscanf(name, "P%d", ¶meter); - //if (parameter == -1) - // continue; unsigned long parameter; // p4.0.21 int rv = sscanf(name, "P%lu", ¶meter); if(rv != 1) @@ -3619,7 +3267,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) gw[nobj].type = GuiWidgets::SLIDER; ((Slider*)obj)->setId(nobj); ((Slider*)obj)->setCursorHoming(true); - //for(int i = 0; i < nobj; i++) for(unsigned long i = 0; i < nobj; i++) // p4.0.21 { if(gw[i].type == GuiWidgets::DOUBLE_LABEL && gw[i].param == parameter) @@ -3633,7 +3280,6 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) else if (strcmp(obj->metaObject()->className(), "MusEGui::DoubleLabel") == 0) { gw[nobj].type = GuiWidgets::DOUBLE_LABEL; ((DoubleLabel*)obj)->setId(nobj); - //for(int i = 0; i < nobj; i++) for(unsigned long i = 0; i < nobj; i++) { if(gw[i].type == GuiWidgets::SLIDER && gw[i].param == parameter) @@ -3674,15 +3320,12 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) mw->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - //int n = plugin->parameters(); unsigned long n = plugin->parameters(); // p4.0.21 params = new GuiParam[n]; - //int style = Slider::BgTrough | Slider::BgSlot; QFontMetrics fm = fontMetrics(); int h = fm.height() + 4; - //for (int i = 0; i < n; ++i) { for (unsigned long i = 0; i < n; ++i) { // p4.0.21 QLabel* label = 0; LADSPA_PortRangeHint range = plugin->range(i); @@ -3698,7 +3341,7 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) if (LADSPA_IS_HINT_TOGGLED(range.HintDescriptor)) { params[i].type = GuiParam::GUI_SWITCH; - CheckBox* cb = new CheckBox(mw, i, "param"); + CheckBox* cb = new CheckBox(mw, i, "param"); cb->setId(i); cb->setText(QString(plugin->paramName(i))); cb->setChecked(plugin->param(i) != 0.0); @@ -3734,20 +3377,15 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) params[i].actuator = s; params[i].label->setSlider((Slider*)params[i].actuator); } - //params[i].actuator->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum)); params[i].actuator->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed)); if (params[i].type == GuiParam::GUI_SLIDER) { - //label->setFixedHeight(20); - //label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum)); label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); - //params[i].label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum)); params[i].label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); grid->addWidget(label, i, 0); grid->addWidget(params[i].label, i, 1); grid->addWidget(params[i].actuator, i, 2); } else if (params[i].type == GuiParam::GUI_SWITCH) { - //grid->addMultiCellWidget(params[i].actuator, i, i, 0, 2); grid->addWidget(params[i].actuator, i, 0, 1, 3); } if (params[i].type == GuiParam::GUI_SLIDER) { @@ -3793,20 +3431,16 @@ PluginGui::PluginGui(MusECore::PluginIBase* p) if(LADSPA_IS_HINT_INTEGER(range.HintDescriptor)) mType=Meter::DBMeter; VerticalMeter* m = new VerticalMeter(this, mType); - //printf("lower =%f upper=%f dlower=%f dupper=%f\n", lower, upper,dlower,dupper); m->setRange(dlower, dupper); m->setVal(dval); m->setFixedHeight(h); paramsOut[i].actuator = m; -// paramsOut[i].label->setSlider((Slider*)params[i].actuator); - //paramsOut[i].actuator->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); paramsOut[i].label->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); grid->addWidget(label, n+i, 0); grid->addWidget(paramsOut[i].label, n+i, 1); grid->addWidget(paramsOut[i].actuator, n+i, 2); -// connect(paramsOut[i].label, SIGNAL(valueChanged(double,int)), SLOT(labelChanged(double,int))); } } @@ -3897,14 +3531,8 @@ void PluginGui::ctrlPressed(int param) plugin->setParam(param, val); ((DoubleLabel*)params[param].label)->setValue(val); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); - if(track) { - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? track->setPluginCtrlVal(id, val); MusEGlobal::song->controllerChange(track); @@ -3913,18 +3541,11 @@ void PluginGui::ctrlPressed(int param) } else if(params[param].type == GuiParam::GUI_SWITCH) { - //double val = (double)((CheckBox*)params[param].actuator)->isChecked(); float val = (float)((CheckBox*)params[param].actuator)->isChecked(); // p4.0.21 plugin->setParam(param, val); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); - if(track) { - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? track->setPluginCtrlVal(id, val); MusEGlobal::song->controllerChange(track); @@ -3964,12 +3585,6 @@ void PluginGui::ctrlReleased(int param) val = rint(val); track->stopAutoRecord(id, val); } - //else if(params[param].type == GuiParam::GUI_SWITCH) - //{ - //double val = (double)((CheckBox*)params[param].actuator)->isChecked(); - // No concept of 'untouching' a checkbox. Remain 'touched' until stop. - //plugin->track()->stopAutoRecord(MusECore::genACnum(plugin->id(), param), val); - //} } //--------------------------------------------------------- @@ -3980,7 +3595,6 @@ void PluginGui::ctrlRightClicked(const QPoint &p, int param) { int id = plugin->id(); if(id != -1) - //MusEGlobal::song->execAutomationCtlPopup((MusECore::AudioTrack*)plugin->track(), p, MusECore::genACnum(id, param)); MusEGlobal::song->execAutomationCtlPopup(plugin->track(), p, MusECore::genACnum(id, param)); } @@ -4012,14 +3626,8 @@ void PluginGui::sliderChanged(double val, int param) return; id = MusECore::genACnum(id, param); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); - if(track) { - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? track->setPluginCtrlVal(id, val); MusEGlobal::song->controllerChange(track); @@ -4057,14 +3665,8 @@ void PluginGui::labelChanged(double val, int param) id = MusECore::genACnum(id, param); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); - if(track) { - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? track->setPluginCtrlVal(id, val); MusEGlobal::song->controllerChange(track); @@ -4079,7 +3681,6 @@ void PluginGui::labelChanged(double val, int param) void PluginGui::load() { QString s("presets/plugins/"); - //s += plugin->plugin()->label(); s += plugin->pluginLabel(); s += "/"; @@ -4144,11 +3745,9 @@ ende: void PluginGui::save() { QString s("presets/plugins/"); - //s += plugin->plugin()->label(); s += plugin->pluginLabel(); s += "/"; - //QString fn = getSaveFileName(s, MusEGlobal::preset_file_pattern, this, QString fn = getSaveFileName(s, MusEGlobal::preset_file_save_pattern, this, tr("MusE: save preset")); if (fn.isEmpty()) @@ -4199,7 +3798,6 @@ void PluginGui::setOn(bool val) void PluginGui::updateValues() { if (params) { - //for (int i = 0; i < plugin->parameters(); ++i) { for (unsigned long i = 0; i < plugin->parameters(); ++i) { // p4.0.21 GuiParam* gp = ¶ms[i]; if (gp->type == GuiParam::GUI_SLIDER) { @@ -4221,12 +3819,9 @@ void PluginGui::updateValues() } } else if (gw) { - //for (int i = 0; i < nobj; ++i) { for (unsigned long i = 0; i < nobj; ++i) { // p4.0.21 QWidget* widget = gw[i].widget; int type = gw[i].type; - //int param = gw[i].param; - //double val = plugin->param(param); unsigned long param = gw[i].param; // p4.0.21 float val = plugin->param(param); switch(type) { @@ -4279,13 +3874,7 @@ void PluginGui::updateControls() } - //if(!MusEGlobal::automation) - // return; - //AutomationType at = plugin->track()->automationType(); - //if(at == AUTO_OFF) - // return; if (params) { - //for (int i = 0; i < plugin->parameters(); ++i) { for (unsigned long i = 0; i < plugin->parameters(); ++i) { // p4.0.21 GuiParam* gp = ¶ms[i]; if (gp->type == GuiParam::GUI_SLIDER) { @@ -4303,8 +3892,6 @@ void PluginGui::updateControls() } if(((Slider*)(gp->actuator))->value() != sv) { - //printf("PluginGui::updateControls slider\n"); - gp->label->blockSignals(true); ((Slider*)(gp->actuator))->blockSignals(true); ((Slider*)(gp->actuator))->setValue(sv); @@ -4321,8 +3908,6 @@ void PluginGui::updateControls() bool v = (int)plugin->track()->pluginCtrlVal(MusECore::genACnum(plugin->id(), i)); if(((CheckBox*)(gp->actuator))->isChecked() != v) { - //printf("PluginGui::updateControls switch\n"); - ((CheckBox*)(gp->actuator))->blockSignals(true); ((CheckBox*)(gp->actuator))->setChecked(v); ((CheckBox*)(gp->actuator))->blockSignals(false); @@ -4332,11 +3917,9 @@ void PluginGui::updateControls() } } else if (gw) { - //for (int i = 0; i < nobj; ++i) { for (unsigned long i = 0; i < nobj; ++i) { // p4.0.21 QWidget* widget = gw[i].widget; int type = gw[i].type; - //int param = gw[i].param; unsigned long param = gw[i].param; // p4.0.21 switch(type) { case GuiWidgets::SLIDER: @@ -4345,8 +3928,6 @@ void PluginGui::updateControls() double v = plugin->track()->pluginCtrlVal(MusECore::genACnum(plugin->id(), param)); if(((Slider*)widget)->value() != v) { - //printf("PluginGui::updateControls slider\n"); - ((Slider*)widget)->blockSignals(true); ((Slider*)widget)->setValue(v); ((Slider*)widget)->blockSignals(false); @@ -4359,8 +3940,6 @@ void PluginGui::updateControls() double v = plugin->track()->pluginCtrlVal(MusECore::genACnum(plugin->id(), param)); if(((DoubleLabel*)widget)->value() != v) { - //printf("PluginGui::updateControls label\n"); - ((DoubleLabel*)widget)->blockSignals(true); ((DoubleLabel*)widget)->setValue(v); ((DoubleLabel*)widget)->blockSignals(false); @@ -4373,8 +3952,6 @@ void PluginGui::updateControls() bool b = (bool) plugin->track()->pluginCtrlVal(MusECore::genACnum(plugin->id(), param)); if(((QCheckBox*)widget)->isChecked() != b) { - //printf("PluginGui::updateControls checkbox\n"); - ((QCheckBox*)widget)->blockSignals(true); ((QCheckBox*)widget)->setChecked(b); ((QCheckBox*)widget)->blockSignals(false); @@ -4387,8 +3964,6 @@ void PluginGui::updateControls() int n = (int) plugin->track()->pluginCtrlVal(MusECore::genACnum(plugin->id(), param)); if(((QComboBox*)widget)->currentIndex() != n) { - //printf("PluginGui::updateControls combobox\n"); - ((QComboBox*)widget)->blockSignals(true); ((QComboBox*)widget)->setCurrentIndex(n); ((QComboBox*)widget)->blockSignals(false); @@ -4407,7 +3982,6 @@ void PluginGui::updateControls() void PluginGui::guiParamChanged(int idx) { QWidget* w = gw[idx].widget; - //int param = gw[idx].param; unsigned long param = gw[idx].param; // p4.0.21 int type = gw[idx].type; @@ -4435,7 +4009,6 @@ void PluginGui::guiParamChanged(int idx) break; } - //for (int i = 0; i < nobj; ++i) { for (unsigned long i = 0; i < nobj; ++i) { // p4.0.21 QWidget* widget = gw[i].widget; if (widget == w || param != gw[i].param) @@ -4462,28 +4035,19 @@ void PluginGui::guiParamChanged(int idx) { id = MusECore::genACnum(id, param); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); + track->setPluginCtrlVal(id, val); + MusEGlobal::song->controllerChange(track); - //if(track) - //{ - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? - track->setPluginCtrlVal(id, val); - MusEGlobal::song->controllerChange(track); - - switch(type) - { - case GuiWidgets::DOUBLE_LABEL: - case GuiWidgets::QCHECKBOX: - track->startAutoRecord(id, val); - break; - default: - track->recordAutomation(id, val); - break; - } - //} + switch(type) + { + case GuiWidgets::DOUBLE_LABEL: + case GuiWidgets::QCHECKBOX: + track->startAutoRecord(id, val); + break; + default: + track->recordAutomation(id, val); + break; + } } plugin->setParam(param, val); } @@ -4494,7 +4058,6 @@ void PluginGui::guiParamChanged(int idx) void PluginGui::guiParamPressed(int idx) { - //int param = gw[idx].param; unsigned long param = gw[idx].param; // p4.0.21 AutomationType at = AUTO_OFF; @@ -4515,7 +4078,7 @@ void PluginGui::guiParamPressed(int idx) // would have to be used, and changed to use CheckBox and ComboBox // instead of QCheckBox and QComboBox, since both of those would // need customization (Ex. QCheckBox doesn't check on click). - /* + /* DELETETHIS 10 plus above switch(type) { case GuiWidgets::QCHECKBOX: double val = (double)((CheckBox*)w)->isChecked(); @@ -4535,7 +4098,6 @@ void PluginGui::guiParamPressed(int idx) void PluginGui::guiParamReleased(int idx) { - //int param = gw[idx].param; unsigned long param = gw[idx].param; // p4.0.21 int type = gw[idx].type; @@ -4561,7 +4123,7 @@ void PluginGui::guiParamReleased(int idx) // would have to be used, and changed to use CheckBox and ComboBox // instead of QCheckBox and QComboBox, since both of those would // need customization (Ex. QCheckBox doesn't check on click). - /* + /* DELETETHIS 10 plus above switch(type) { case GuiWidgets::QCHECKBOX: double val = (double)((CheckBox*)w)->isChecked(); @@ -4581,7 +4143,6 @@ void PluginGui::guiParamReleased(int idx) void PluginGui::guiSliderPressed(int idx) { - //int param = gw[idx].param; unsigned long param = gw[idx].param; // p4.0.21 QWidget *w = gw[idx].widget; @@ -4603,17 +4164,12 @@ void PluginGui::guiSliderPressed(int idx) double val = ((Slider*)w)->value(); plugin->setParam(param, val); - //MusEGlobal::audio->msgSetPluginCtrlVal(((PluginI*)plugin), id, val); - // p3.3.43 - //MusEGlobal::audio->msgSetPluginCtrlVal(track, id, val); - // p4.0.21 MusEGlobal::audio->msgXXX waits. Do we really need to? track->setPluginCtrlVal(id, val); MusEGlobal::song->controllerChange(track); track->startAutoRecord(id, val); // Needed so that paging a slider updates a label or other buddy control. - //for (int i = 0; i < nobj; ++i) { for (unsigned long i = 0; i < nobj; ++i) { // p4.0.21 QWidget* widget = gw[i].widget; if (widget == w || param != gw[i].param) @@ -4673,7 +4229,6 @@ void PluginGui::guiSliderRightClicked(const QPoint &p, int idx) int param = gw[idx].param; int id = plugin->id(); if(id != -1) - //MusEGlobal::song->execAutomationCtlPopup((MusECore::AudioTrack*)plugin->track(), p, MusECore::genACnum(id, param)); MusEGlobal::song->execAutomationCtlPopup(plugin->track(), p, MusECore::genACnum(id, param)); } diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h index 719db108..81c41396 100644 --- a/muse2/muse/plugin.h +++ b/muse2/muse/plugin.h @@ -40,12 +40,9 @@ #include "ctrl.h" #include "controlfifo.h" -//#include "stringparam.h" - #include "config.h" #ifdef OSC_SUPPORT -//class OscIF; #include "osc.h" #endif @@ -103,7 +100,6 @@ class Plugin { const DSSI_Descriptor* dssi_descr; #endif - //LADSPA_PortDescriptor* _portDescriptors; unsigned long _portCount; unsigned long _inports; unsigned long _outports; @@ -122,7 +118,7 @@ class Plugin { unsigned long id() const { return _uniqueID; } QString maker() const { return _maker; } QString copyright() const { return _copyright; } - QString lib(bool complete = true) /*const*/ { return complete ? fi.completeBaseName() : fi.baseName(); } // ddskrjo const + QString lib(bool complete = true) { return complete ? fi.completeBaseName() : fi.baseName(); } // ddskrjo const QString dirPath(bool complete = true) const { return complete ? fi.absolutePath() : fi.path(); } QString filePath() const { return fi.filePath(); } QString fileName() const { return fi.fileName(); } @@ -155,7 +151,7 @@ class Plugin { } #ifdef OSC_SUPPORT - int oscConfigure(LADSPA_Handle /*handle*/, const char* /*key*/, const char* /*value*/); + int oscConfigure(LADSPA_Handle handle, const char* key, const char* value); #endif unsigned long ports() { return _portCount; } @@ -166,22 +162,19 @@ class Plugin { LADSPA_PortRangeHint range(unsigned long i) { // FIXME: - //return plugin ? plugin->PortRangeHints[i] : 0; + //return plugin ? plugin->PortRangeHints[i] : 0; DELETETHIS return plugin->PortRangeHints[i]; } float defaultValue(unsigned long port) const; void range(unsigned long i, float*, float*) const; - CtrlValueType ctrlValueType(unsigned long /*i*/) const; - CtrlList::Mode ctrlMode(unsigned long /*i*/) const; + CtrlValueType ctrlValueType(unsigned long i) const; + CtrlList::Mode ctrlMode(unsigned long i) const; const char* portName(unsigned long i) { return plugin ? plugin->PortNames[i] : 0; } - // Returns (int)-1 if not an input control. - //unsigned long port2InCtrl(unsigned long p) { return p >= rpIdx.size() ? (unsigned long)-1 : rpIdx[p]; } - unsigned long inports() const { return _inports; } unsigned long outports() const { return _outports; } unsigned long controlInPorts() const { return _controlInPorts; } @@ -211,7 +204,6 @@ class PluginList : public std::list { //--------------------------------------------------------- struct Port { - //int idx; unsigned long idx; float val; float tmpVal; @@ -236,7 +228,7 @@ class PluginIBase PluginIBase(); ~PluginIBase(); virtual bool on() const = 0; - virtual void setOn(bool /*val*/) = 0; + virtual void setOn(bool val) = 0; virtual unsigned long pluginID() = 0; virtual int id() = 0; virtual QString pluginLabel() const = 0; @@ -248,33 +240,33 @@ class PluginIBase virtual AudioTrack* track() = 0; - virtual void enableController(unsigned long /*i*/, bool /*v*/ = true) = 0; - virtual bool controllerEnabled(unsigned long /*i*/) const = 0; - virtual bool controllerEnabled2(unsigned long /*i*/) const = 0; + virtual void enableController(unsigned long i, bool v = true) = 0; + virtual bool controllerEnabled(unsigned long i) const = 0; + virtual bool controllerEnabled2(unsigned long i) const = 0; virtual void updateControllers() = 0; - virtual void writeConfiguration(int /*level*/, Xml& /*xml*/) = 0; - virtual bool readConfiguration(Xml& /*xml*/, bool /*readPreset*/=false) = 0; + virtual void writeConfiguration(int level, Xml& xml) = 0; + virtual bool readConfiguration(Xml& xml, bool readPreset=false) = 0; virtual unsigned long parameters() const = 0; virtual unsigned long parametersOut() const = 0; - virtual void setParam(unsigned long /*i*/, float /*val*/) = 0; - virtual float param(unsigned long /*i*/) const = 0; - virtual float paramOut(unsigned long /*i*/) const = 0; - virtual const char* paramName(unsigned long /*i*/) = 0; - virtual const char* paramOutName(unsigned long /*i*/) = 0; - virtual LADSPA_PortRangeHint range(unsigned long /*i*/) = 0; - virtual LADSPA_PortRangeHint rangeOut(unsigned long /*i*/) = 0; - - virtual CtrlValueType ctrlValueType(unsigned long /*i*/) const = 0; - virtual CtrlList::Mode ctrlMode(unsigned long /*i*/) const = 0; + virtual void setParam(unsigned long i, float val) = 0; + virtual float param(unsigned long i) const = 0; + virtual float paramOut(unsigned long i) const = 0; + virtual const char* paramName(unsigned long i) = 0; + virtual const char* paramOutName(unsigned long i) = 0; + virtual LADSPA_PortRangeHint range(unsigned long i) = 0; + virtual LADSPA_PortRangeHint rangeOut(unsigned long i) = 0; + + virtual CtrlValueType ctrlValueType(unsigned long i) const = 0; + virtual CtrlList::Mode ctrlMode(unsigned long i) const = 0; QString dssi_ui_filename() const; MusEGui::PluginGui* gui() const { return _gui; } void deleteGui(); }; -/* +/* DELETETHIS 30 class PluginBase { public: @@ -328,23 +320,17 @@ class PluginI : public PluginIBase { unsigned long controlPorts; unsigned long controlOutPorts; - ///PluginGui* _gui; bool _on; bool initControlValues; QString _name; QString _label; - //#ifdef DSSI_SUPPORT - //StringParamMap _stringParamMap; - //#endif - #ifdef OSC_SUPPORT OscEffectIF _oscif; #endif bool _showNativeGuiPending; void init(); - ///void makeGui(); public: PluginI(); @@ -353,8 +339,6 @@ class PluginI : public PluginIBase { Plugin* plugin() const { return _plugin; } bool on() const { return _on; } void setOn(bool val) { _on = val; } - ///PluginGui* gui() const { return _gui; } - ///void deleteGui(); void setTrack(AudioTrack* t) { _track = t; } AudioTrack* track() { return _track; } @@ -387,17 +371,10 @@ class PluginI : public PluginIBase { #ifdef OSC_SUPPORT OscEffectIF& oscIF() { return _oscif; } - /* - int oscConfigure(lo_arg**); - int oscControl(lo_arg**); - //int oscUpdate(lo_arg**); - //int oscExiting(lo_arg**); - */ - - int oscControl(unsigned long /*dssiPort*/, float /*val*/); - int oscConfigure(const char */*key*/, const char */*val*/); + + int oscControl(unsigned long dssiPort, float val); + int oscConfigure(const char *key, const char *val); int oscUpdate(); - //int oscExiting(); #endif void writeConfiguration(int level, Xml& xml); @@ -453,7 +430,6 @@ class Pipeline : public std::vector { QString name(int idx) const; void showGui(int, bool); bool isDssiPlugin(int) const; - //QString dssi_ui_filename(int) const; bool has_dssi_ui(int idx) const; void showNativeGui(int, bool); void deleteGui(int idx); @@ -477,7 +453,6 @@ extern bool ladspa2MidiControlValues(const LADSPA_Descriptor* plugin, unsigned l extern float midi2LadspaValue(const LADSPA_Descriptor* plugin, unsigned long port, int ctlnum, int val); extern CtrlValueType ladspaCtrlValueType(const LADSPA_Descriptor* plugin, int port); extern CtrlList::Mode ladspaCtrlMode(const LADSPA_Descriptor* plugin, int port); -//extern MidiController* ladspa2MidiController(const LADSPA_Descriptor* plugin, unsigned long port, int ctlnum); } // namespace MusECore @@ -599,8 +574,6 @@ class PluginDialog : public QDialog { void accept(); void reject(); void fillPlugs(QAbstractButton*); - //void fillPlugs(int i); - //void fillPlugs(const QString& sortValue); void fillPlugs(); private slots: @@ -610,8 +583,6 @@ class PluginDialog : public QDialog { QComboBox *sortBox; static int selectedPlugType; static QStringList sortItems; - //static int sortColumn; - //static Qt::SortOrder sortOrder; static QRect geometrySave; static QByteArray listSave; }; diff --git a/muse2/muse/pos.cpp b/muse2/muse/pos.cpp index 70de99e1..efa847cc 100644 --- a/muse2/muse/pos.cpp +++ b/muse2/muse/pos.cpp @@ -458,8 +458,7 @@ void PosLen::setLenTick(unsigned len) { _lenTick = len; sn = -1; -// if (type() == FRAMES) - _lenFrame = MusEGlobal::tempomap.deltaTick2frame(tick(), tick() + len, &sn); + _lenFrame = MusEGlobal::tempomap.deltaTick2frame(tick(), tick() + len, &sn); } //--------------------------------------------------------- @@ -470,8 +469,7 @@ void PosLen::setLenFrame(unsigned len) { _lenFrame = len; sn = -1; -// if (type() == TICKS) - _lenTick = MusEGlobal::tempomap.deltaFrame2tick(frame(), frame() + len, &sn); + _lenTick = MusEGlobal::tempomap.deltaFrame2tick(frame(), frame() + len, &sn); } //--------------------------------------------------------- diff --git a/muse2/muse/remote/pyapi.cpp b/muse2/muse/remote/pyapi.cpp index 90818a44..2a10afa4 100644 --- a/muse2/muse/remote/pyapi.cpp +++ b/muse2/muse/remote/pyapi.cpp @@ -1130,11 +1130,12 @@ bool Song::event(QEvent* _e) pipeline->setOn(fxid, onoff); break; } - case QPybridgeEvent::SONG_ADD_TRACK: + case QPybridgeEvent::SONG_ADD_TRACK: { MusECore::Undo operations; MusEGlobal::song->addTrack(operations, (Track::TrackType)e->getP1()); // Add at end of list. MusEGlobal::song->applyOperationGroup(operations); break; + } case QPybridgeEvent::SONG_CHANGE_TRACKNAME: { Track* t = this->findTrack(e->getS1()); if (t == NULL) diff --git a/muse2/muse/route.cpp b/muse2/muse/route.cpp index 1d494fb0..18672159 100644 --- a/muse2/muse/route.cpp +++ b/muse2/muse/route.cpp @@ -173,9 +173,7 @@ void addRoute(Route src, Route dst) { if (*i == src) // route already there { - //#ifdef ROUTE_DEBUG fprintf(stderr, "addRoute: src track route already exists.\n"); - //#endif return; } } @@ -195,9 +193,7 @@ void addRoute(Route src, Route dst) { if (*i == src) // route already there { - //#ifdef ROUTE_DEBUG fprintf(stderr, "addRoute: src Jack midi route already exists.\n"); - //#endif return; } } @@ -262,9 +258,7 @@ void addRoute(Route src, Route dst) { if (*i == dst) // route already there { - //#ifdef ROUTE_DEBUG fprintf(stderr, "addRoute: dst Jack midi route already exists.\n"); - //#endif return; } } @@ -295,13 +289,7 @@ void addRoute(Route src, Route dst) MidiPort *mp = &MusEGlobal::midiPorts[src.midiPort]; - // Do not allow ports with synth midi devices to connect to audio ins! p4.0.17 - //if(dst.track->type() == Track::AUDIO_INPUT && mp->device() && mp->device()->isSynti()) - //{ - // fprintf(stderr, "addRoute: destination is audio in, but source midi port:%d is synth device\n", src.midiPort); - // return; - //} - // Actually, do not allow synth ports to connect to any track. It may be useful in some cases, + // Do not allow synth ports to connect to any track. It may be useful in some cases, // may be desired later, but for now it's just a routing hassle. p4.0.35 if(mp->device() && mp->device()->isSynti()) return; @@ -311,14 +299,7 @@ void addRoute(Route src, Route dst) fprintf(stderr, "addRoute: source is midi port:%d, but destination channel mask:%d out of range\n", src.midiPort, dst.channel); return; } - - //MidiDevice *md = MusEGlobal::midiPorts[src.midiPort].device(); - //if(!md) - //{ - // fprintf(stderr, "addRoute: source is midi port, but no destination port device\n"); - // return; - //} - + src.channel = dst.channel; RouteList* outRoutes = mp->outRoutes(); iRoute ir = outRoutes->begin(); @@ -366,13 +347,6 @@ void addRoute(Route src, Route dst) return; } - //MidiDevice *md = MusEGlobal::midiPorts[dst.midiPort].device(); - //if(!md) - //{ - // fprintf(stderr, "addRoute: dst is midi port, but no destination port device\n"); - // return; - //} - dst.channel = src.channel; RouteList* outRoutes = src.track->outRoutes(); @@ -437,7 +411,7 @@ void addRoute(Route src, Route dst) for (ciRoute i = outRoutes->begin(); i != outRoutes->end(); ++i) { if (*i == dst) // route already there - // TODO: + // TODO: DELETETHIS all these comments wtf? //if (i->type == dst.type && i->channel == dst.channel) { //if(i->type == Route::TRACK_ROUTE) @@ -463,29 +437,23 @@ void addRoute(Route src, Route dst) RouteList* inRoutes; #ifdef ROUTE_DEBUG - //fprintf(stderr, "addRoute: src track ch:%d chs:%d dst track ch:%d chs:%d name: %s pushing destination and source routes\n", src.channel, src.channels, dst.channel, dst.channels, dst.track->name().toLatin1().constData()); fprintf(stderr, "addRoute: src track ch:%d chs:%d remch:%d dst track ch:%d chs:%d remch:%d name: %s pushing dest and source routes\n", src.channel, src.channels, src.remoteChannel, dst.channel, dst.channels, dst.remoteChannel, dst.track->name().toLatin1().constData()); - //fprintf(stderr, "addRoute: src track ch:%d dst track ch:%d name: %s pushing destination and source routes\n", src.channel, dst.channel, dst.track->name().toLatin1().constData()); #endif inRoutes = dst.track->inRoutes(); - // // make sure AUDIO_AUX is processed last - // if (src.track->type() == Track::AUDIO_AUX) // REMOVE Tim. This special aux code may not be useful or needed now. - inRoutes->push_back(src); // + inRoutes->push_back(src); // so DELETETHIS? else inRoutes->insert(inRoutes->begin(), src); // Is the source an Aux Track or else does it have Aux Tracks routed to it? // Update the destination track's aux ref count, and all tracks it is routed to. if(src.track->auxRefCount()) - //dst.track->updateAuxStates( src.track->auxRefCount() ); src.track->updateAuxRoute( src.track->auxRefCount(), dst.track ); else if(src.track->type() == Track::AUDIO_AUX) - //dst.track->updateAuxStates( 1 ); src.track->updateAuxRoute( 1, dst.track ); } } @@ -496,10 +464,6 @@ void addRoute(Route src, Route dst) void removeRoute(Route src, Route dst) { - //printf("removeRoute %d.%d:<%s> %d.%d:<%s>\n", - // src.type, src.channel, src.name().toLatin1().constData(), - // dst.type, dst.channel, dst.name().toLatin1().constData()); - if (src.type == Route::JACK_ROUTE) { if(!dst.isValid()) @@ -701,11 +665,9 @@ void removeRoute(Route src, Route dst) if(src.isValid() && dst.isValid()) { if(src.track->auxRefCount()) - //dst.track->updateAuxStates( -src.track->auxRefCount() ); src.track->updateAuxRoute( -src.track->auxRefCount(), dst.track ); else if(src.track->type() == Track::AUDIO_AUX) - //dst.track->updateAuxStates( -1 ); src.track->updateAuxRoute( -1, dst.track ); } @@ -755,7 +717,7 @@ void removeAllRoutes(Route src, Route dst) { // TODO: Is the source an Aux Track or else does it have Aux Tracks routed to it? // Update the destination track's aux ref count, and all tracks it is routed to. - /* if(src.isValid() && dst.isValid()) + /* if(src.isValid() && dst.isValid()) DELETETHIS 8 { if(src.track->auxRefCount()) dst.track->updateAuxStates( -src.track->auxRefCount() ); @@ -804,6 +766,7 @@ QString Route::name() const { if(device) { + // DELETETHIS 6 // For unified jack in/out devices, the actual port names are now different from device name. // Like this: device: "MyJackDevice1" -> inport: "MyJackDevice1_in" outport: "MyJackDevice1_out" /* @@ -835,10 +798,8 @@ QString Route::name() const // name2route //--------------------------------------------------------- -//Route name2route(const QString& rn, bool dst) Route name2route(const QString& rn, bool /*dst*/, int rtype) { -// printf("name2route %s\n", rn.toLatin1().constData()); int channel = -1; QString s(rn); // Support old route style in med files. Obsolete. @@ -919,7 +880,7 @@ Route name2route(const QString& rn, bool /*dst*/, int rtype) if((*i)->name() == s) return Route(*i, channel); - /* + /* DELETETHIS 16? MidiJackDevice* jmd = dynamic_cast(*i); if(jmd) { @@ -1049,9 +1010,6 @@ bool checkRoute(const QString& s, const QString& d) } } } - //else if (dst.type == Route::MIDI_PORT_ROUTE) - //{ - //} else { RouteList* outRoutes = (src.type == Route::MIDI_DEVICE_ROUTE) ? src.device->outRoutes() : src.track->outRoutes(); @@ -1086,9 +1044,6 @@ void Route::read(Xml& xml) case Xml::Error: case Xml::End: return; - //case Xml::TagStart: - // xml.unknown("Route"); - // break; case Xml::Attribut: #ifdef ROUTE_DEBUG printf("Route::read(): attribute:%s\n", tag.toLatin1().constData()); @@ -1310,7 +1265,6 @@ void Song::readRoute(Xml& xml) } else { - //printf("adding new route...\n"); addRoute(sroute, droute); } } @@ -1331,12 +1285,7 @@ void Song::readRoute(Xml& xml) void RouteList::removeRoute(const Route& r) { - //printf("RouteList::removeRoute:\n"); - //r.dump(); - //printf("Searching routes:\n"); - for (iRoute i = begin(); i != end(); ++i) { - //i->dump(); if (r == *i) { erase(i); return; @@ -1355,9 +1304,6 @@ void Route::dump() const { if(track) printf("Route dump: track <%s> channel %d channels %d\n", track->name().toLatin1().constData(), channel, channels); - //printf("Route dump: track <%s> channel %d\n", track->name().toLatin1().constData(), channel); - //else - // printf("Route dump: invalid track, channel %d\n", channel); } else if (type == JACK_ROUTE) @@ -1413,16 +1359,7 @@ void Route::dump() const bool Route::operator==(const Route& a) const { - //if (type == MIDI_PORT_ROUTE) // p3.3.50 - //{ - // Use new channel mask. True if all the bits in a.channel are contained in this route's channel. - // Hmm, not commutative... Two such routes are equal if _____ what? ... Code-specific for now. - // return midiPort == a.midiPort && (channel & a.channel) == a.channel; - //} - //else - if ((type == a.type) && (channel == a.channel)) - //if (type == a.type) { if (type == TRACK_ROUTE) { @@ -1433,8 +1370,8 @@ bool Route::operator==(const Route& a) const { if (type == JACK_ROUTE) { - //if (!MusEGlobal::checkAudioDevice()) return false; - //return MusEGlobal::audioDevice->portName(jackPort) == MusEGlobal::audioDevice->portName(a.jackPort); + //if (!MusEGlobal::checkAudioDevice()) return false; DELETETHIS? or keep? + //else return MusEGlobal::audioDevice->portName(jackPort) == MusEGlobal::audioDevice->portName(a.jackPort); return jackPort == a.jackPort; // Simplified. } else @@ -1452,7 +1389,7 @@ bool Route::operator==(const Route& a) const return false; } -/* +/* yaaaay, depth search. just wrote an exam about that. but DELETETHIS, looks unused //--------------------------------------------------------- // isCircularRoute // Recursive. @@ -1462,10 +1399,6 @@ bool Route::operator==(const Route& a) const bool isCircularRoutePath(Track* src, Track* dst) { - //if(isMidiTrack() || _type == AUDIO_AUX) - //if(isMidiTrack()) - // return; - bool rv = false; if(dst) @@ -1473,8 +1406,6 @@ bool isCircularRoutePath(Track* src, Track* dst) src->setNodeTraversed(true); rv = isCircularRoutePath(dst, NULL); src->setNodeTraversed(false); - //if(rv) - // fprintf(stderr, " Circular route %s -> %s\n", src->name().toLatin1().constData(), dst->name().toLatin1().constData()); return rv; } @@ -1483,8 +1414,6 @@ bool isCircularRoutePath(Track* src, Track* dst) src->setNodeTraversed(true); - //printf("isCircularRoute %s\n", src->name().toLatin1().constData()); - RouteList* orl = src->outRoutes(); for (iRoute i = orl->begin(); i != orl->end(); ++i) { diff --git a/muse2/muse/route.h b/muse2/muse/route.h index 587369bc..a0c433f1 100644 --- a/muse2/muse/route.h +++ b/muse2/muse/route.h @@ -105,17 +105,7 @@ extern void removeRoute(Route, Route); extern void removeAllRoutes(Route, Route); // p3.3.55 extern Route name2route(const QString&, bool dst, int rtype = -1); extern bool checkRoute(const QString&, const QString&); -//extern bool isCircularRoutePath(Track* src, Track* dst); // Recursive. - -//--------------------------------------------------------- -// RouteMenuMap -//--------------------------------------------------------- - -//typedef std::map >::iterator iRouteMenuMap; -//typedef std::map >::const_iterator ciRouteMenuMap; -//typedef std::map > RouteMenuMap; -//typedef std::pair pRouteMenuMap; -//typedef std::pair rpRouteMenuMap; +//extern bool isCircularRoutePath(Track* src, Track* dst); // Recursive. DELETETHIS } // namespace MusECore diff --git a/muse2/muse/seqmsg.cpp b/muse2/muse/seqmsg.cpp index abdebda7..a3ea4ddc 100644 --- a/muse2/muse/seqmsg.cpp +++ b/muse2/muse/seqmsg.cpp @@ -83,7 +83,7 @@ bool Audio::sendMessage(AudioMsg* m, bool doUndo) MusEGlobal::song->startUndo(); sendMsg(m); if (doUndo) - MusEGlobal::song->endUndo(0); // MusEGlobal::song->endMsgCmd(); + MusEGlobal::song->endUndo(0); return false; } @@ -94,22 +94,17 @@ bool Audio::sendMessage(AudioMsg* m, bool doUndo) void Audio::msgRemoveRoute(Route src, Route dst) { msgRemoveRoute1(src, dst); - //if (!MusEGlobal::checkAudioDevice()) return; if (src.type == Route::JACK_ROUTE) { if (!MusEGlobal::checkAudioDevice()) return; - //if(dst.type == Route::JACK_MIDI_ROUTE) if(dst.type == Route::MIDI_DEVICE_ROUTE) { - //MidiJackDevice* jmd = dynamic_cast(dst.device); - //if(jmd) if(dst.device) { if(dst.device->deviceType() == MidiDevice::JACK_MIDI) - //MusEGlobal::audioDevice->disconnect(src.jackPort, dst.device->clientPort()); MusEGlobal::audioDevice->disconnect(src.jackPort, dst.device->inClientPort()); // p3.3.55 - //else + //else DELETETHIS //{ // TODO... //MidiAlsaDevice* amd = dynamic_cast(dst.device); @@ -124,17 +119,16 @@ void Audio::msgRemoveRoute(Route src, Route dst) { if (!MusEGlobal::checkAudioDevice()) return; - //if(src.type == Route::JACK_MIDI_ROUTE) + //if(src.type == Route::JACK_MIDI_ROUTE) DELETETHIS if(src.type == Route::MIDI_DEVICE_ROUTE) { - //MidiJackDevice* jmd = dynamic_cast(src.device); + //MidiJackDevice* jmd = dynamic_cast(src.device); DELETETHIS //if(jmd) if(src.device) { if(src.device->deviceType() == MidiDevice::JACK_MIDI) - //MusEGlobal::audioDevice->disconnect(src.device->clientPort(), dst.jackPort); MusEGlobal::audioDevice->disconnect(src.device->outClientPort(), dst.jackPort); // p3.3.55 - //else + //else DELETETHIS //{ // TODO... //MidiAlsaDevice* amd = dynamic_cast(src.device); @@ -169,7 +163,7 @@ void Audio::msgRemoveRoutes(Route src, Route dst) { msgRemoveRoutes1(src, dst); - // TODO + // TODO or DELETETHIS? looks old. /* //if (!MusEGlobal::checkAudioDevice()) return; if (src.type == Route::JACK_ROUTE) @@ -230,7 +224,6 @@ void Audio::msgRemoveRoutes(Route src, Route dst) // msgRemoveRoutes1 //--------------------------------------------------------- -// p3.3.55 void Audio::msgRemoveRoutes1(Route src, Route dst) { AudioMsg msg; @@ -251,19 +244,18 @@ void Audio::msgAddRoute(Route src, Route dst) if (!MusEGlobal::checkAudioDevice()) return; if (isRunning()) { - //if(dst.type == Route::JACK_MIDI_ROUTE) + //if(dst.type == Route::JACK_MIDI_ROUTE) DELETETHIS if(dst.type == Route::MIDI_DEVICE_ROUTE) { - //MidiJackDevice* jmd = dynamic_cast(dst.device); + //MidiJackDevice* jmd = dynamic_cast(dst.device); DELETETHIS //if(jmd) if(dst.device) { if(dst.device->deviceType() == MidiDevice::JACK_MIDI) - //MusEGlobal::audioDevice->connect(src.jackPort, dst.device->clientPort()); MusEGlobal::audioDevice->connect(src.jackPort, dst.device->inClientPort()); // p3.3.55 //else //{ - // TODO... + // TODO... or DELETETHIS //MidiAlsaDevice* amd = dynamic_cast(dst.device); //if(amd) //} @@ -278,19 +270,19 @@ void Audio::msgAddRoute(Route src, Route dst) if (!MusEGlobal::checkAudioDevice()) return; if (MusEGlobal::audio->isRunning()) { - //if(src.type == Route::JACK_MIDI_ROUTE) + //if(src.type == Route::JACK_MIDI_ROUTE) DELETETHIS if(src.type == Route::MIDI_DEVICE_ROUTE) { - //MidiJackDevice* jmd = dynamic_cast(src.device); + //MidiJackDevice* jmd = dynamic_cast(src.device); DELETETHIS //if(jmd) if(src.device) { if(src.device->deviceType() == MidiDevice::JACK_MIDI) - //MusEGlobal::audioDevice->connect(src.device->clientPort(), dst.jackPort); + //MusEGlobal::audioDevice->connect(src.device->clientPort(), dst.jackPort); DELETETHIS MusEGlobal::audioDevice->connect(src.device->outClientPort(), dst.jackPort); // p3.3.55 //else //{ - // TODO... + // TODO... or DELETETHIS //MidiAlsaDevice* amd = dynamic_cast(src.device); //if(amd) //} @@ -343,7 +335,7 @@ void Audio::msgSetRecord(AudioTrack* node, bool val) sendMsg(&msg); } -/* +/* DELETETHIS 34 //--------------------------------------------------------- // msgSetVolume //--------------------------------------------------------- @@ -411,7 +403,6 @@ void Audio::msgSetChannels(AudioTrack* node, int n) { char buffer[128]; snprintf(buffer, 128, "%s-%d", name.toLatin1().constData(), i); - //ai->setJackPort(i, MusEGlobal::audioDevice->registerInPort(buffer)); ai->setJackPort(i, MusEGlobal::audioDevice->registerInPort(buffer, false)); } else if ((i >= n) && ai->jackPort(i)) @@ -442,7 +433,6 @@ void Audio::msgSetChannels(AudioTrack* node, int n) { char buffer[128]; snprintf(buffer, 128, "%s-%d", name.toLatin1().constData(), i); - //ao->setJackPort(i, MusEGlobal::audioDevice->registerOutPort(buffer)); ao->setJackPort(i, MusEGlobal::audioDevice->registerOutPort(buffer, false)); } else if (i >= n && jp) @@ -464,6 +454,7 @@ void Audio::msgSetChannels(AudioTrack* node, int n) } } + // DELETETHIS 47 /* TODO TODO: Change all stereo routes to mono. // If we are going from stereo to mono we need to disconnect any stray synti 'mono last channel'... if(n == 1 && node->channels() > 1) @@ -517,13 +508,11 @@ void Audio::msgSetChannels(AudioTrack* node, int n) sendMsg(&msg); } -/* +/* DELETETHIS 20 //--------------------------------------------------------- // msgSetPluginCtrlVal //--------------------------------------------------------- -//void Audio::msgSetPluginCtrlVal(PluginI* plugin, int param, double val) -// p3.3.43 void Audio::msgSetPluginCtrlVal(AudioTrack* track, int param, double val) { AudioMsg msg; @@ -552,7 +541,6 @@ void Audio::msgSwapControllerIDX(AudioTrack* node, int idx1, int idx2) msg.a = idx1; msg.b = idx2; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -568,7 +556,6 @@ void Audio::msgClearControllerEvents(AudioTrack* node, int acid) msg.snode = node; msg.ival = acid; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -613,7 +600,6 @@ void Audio::msgEraseACEvent(AudioTrack* node, int acid, int frame) msg.ival = acid; msg.a = frame; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -631,7 +617,6 @@ void Audio::msgEraseRangeACEvents(AudioTrack* node, int acid, int frame1, int fr msg.a = frame1; msg.b = frame2; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -649,7 +634,6 @@ void Audio::msgAddACEvent(AudioTrack* node, int acid, int frame, double val) msg.a = frame; msg.dval = val; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -668,7 +652,6 @@ void Audio::msgChangeACEvent(AudioTrack* node, int acid, int frame, int newFrame msg.b = newFrame; msg.dval = val; sendMsg(&msg); - //muse->arranger->controllerChanged(node); MusEGlobal::song->controllerChange(node); } @@ -705,12 +688,7 @@ void Audio::msgSetSegSize(int bs, int sr) void Audio::msgSeek(const Pos& pos) { if (!MusEGlobal::checkAudioDevice()) return; - //MusEGlobal::audioDevice->seekTransport(pos.frame()); - // p3.3.23 - //printf("Audio::msgSeek before MusEGlobal::audioDevice->seekTransport frame:%d\n", pos.frame()); MusEGlobal::audioDevice->seekTransport(pos); - // p3.3.23 - //printf("Audio::msgSeek after MusEGlobal::audioDevice->seekTransport frame:%d\n", pos.frame()); } //--------------------------------------------------------- @@ -747,7 +725,6 @@ void Audio::msgPlay(bool val) unsigned sfr = MusEGlobal::song->cPos().frame(); unsigned dcfr = MusEGlobal::audioDevice->getCurFrame(); if(dcfr != sfr) - //MusEGlobal::audioDevice->seekTransport(sfr); MusEGlobal::audioDevice->seekTransport(MusEGlobal::song->cPos()); MusEGlobal::audioDevice->startTransport(); } @@ -759,7 +736,7 @@ void Audio::msgPlay(bool val) } } -/* +/* DELETETHIS 31 //--------------------------------------------------------- // msgShowInstrumentGui //--------------------------------------------------------- @@ -849,7 +826,7 @@ void Audio::msgRemoveTracks() } while (loop); - /* + /* DELETETHIS 28 // TESTED: DIDN'T WORK: It still skipped some selected tracks ! // Quote from SGI STL: "Erasing an element from a map also does not invalidate any iterators, // except, of course, for iterators that actually point to the element @@ -879,7 +856,7 @@ void Audio::msgRemoveTracks() } -/* +/* DELETETHIS 18 //--------------------------------------------------------- // msgChangeTrack // oldTrack - copy of the original track befor modification @@ -971,7 +948,6 @@ bool Song::msgRemoveParts() // msgChangePart //--------------------------------------------------------- -//void Audio::msgChangePart(Part* oldPart, Part* newPart, bool doUndoFlag) void Audio::msgChangePart(Part* oldPart, Part* newPart, bool doUndoFlag, bool doCtrls, bool doClones) { AudioMsg msg; @@ -987,7 +963,6 @@ void Audio::msgChangePart(Part* oldPart, Part* newPart, bool doUndoFlag, bool do // msgAddEvent //--------------------------------------------------------- -//void Audio::msgAddEvent(Event& event, Part* part, bool doUndoFlag) void Audio::msgAddEvent(Event& event, Part* part, bool doUndoFlag, bool doCtrls, bool doClones) { AudioMsg msg; @@ -1003,7 +978,6 @@ void Audio::msgAddEvent(Event& event, Part* part, bool doUndoFlag, bool doCtrls, // msgDeleteEvent //--------------------------------------------------------- -//void Audio::msgDeleteEvent(Event& event, Part* part, bool doUndoFlag) void Audio::msgDeleteEvent(Event& event, Part* part, bool doUndoFlag, bool doCtrls, bool doClones) { AudioMsg msg; @@ -1019,7 +993,6 @@ void Audio::msgDeleteEvent(Event& event, Part* part, bool doUndoFlag, bool doCtr // msgChangeEvent //--------------------------------------------------------- -//void Audio::msgChangeEvent(Event& oe, Event& ne, Part* part, bool doUndoFlag) void Audio::msgChangeEvent(Event& oe, Event& ne, Part* part, bool doUndoFlag, bool doCtrls, bool doClones) { AudioMsg msg; @@ -1338,7 +1311,6 @@ void Audio::msgBounce() { _bounce = true; if (!MusEGlobal::checkAudioDevice()) return; - //MusEGlobal::audioDevice->seekTransport(MusEGlobal::song->lPos().frame()); MusEGlobal::audioDevice->seekTransport(MusEGlobal::song->lPos()); } diff --git a/muse2/muse/shortcuts.h b/muse2/muse/shortcuts.h index dc2e6f22..3e01788b 100644 --- a/muse2/muse/shortcuts.h +++ b/muse2/muse/shortcuts.h @@ -4,12 +4,12 @@ // $Id: ./muse/shortcuts.h $ // // Copyright (C) 1999-2011 by Werner Schweer and others +// // Author: Mathias Lundgren , (C) 2003 // // Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003 // // -// // 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; version 2 of diff --git a/muse2/muse/sig.cpp b/muse2/muse/sig.cpp index b11aa622..5e3db71e 100644 --- a/muse2/muse/sig.cpp +++ b/muse2/muse/sig.cpp @@ -1,3 +1,5 @@ +// THIS FILE IS ORPHANED: nothing uses its functions + //========================================================= // MusE // Linux Music Editor @@ -84,7 +86,6 @@ void SigList::add(unsigned tick, int z, int n) void SigList::del(unsigned tick) { -// printf("SigList::del(%d)\n", tick); iSigEvent e = find(tick); if (e == end()) { printf("SigList::del(%d): not found\n", tick); @@ -98,7 +99,7 @@ void SigList::del(unsigned tick) } ne->second->z = e->second->z; ne->second->n = e->second->n; - ne->second->tick = e->second->tick; + ne->second->tick = e->second->tick; erase(e); normalize(); } @@ -133,7 +134,7 @@ void SigList::normalize() int ticksB = ticks_beat(e->second->n); int ticksM = ticksB * e->second->z; bar += delta / ticksM; - if (delta % ticksM) // Teil eines Taktes + if (delta % ticksM) // Part of a measure ++bar; ++e; } @@ -175,7 +176,6 @@ int SigList::ticksMeasure(unsigned tick) const ciSigEvent i = upper_bound(tick); if (i == end()) { printf("ticksMeasure: not found %d\n", tick); - // abort(); return 0; } return ticksMeasure(i->second->z, i->second->n); @@ -223,7 +223,6 @@ void SigList::timesig(unsigned tick, int& z, int& n) const ciSigEvent i = upper_bound(tick); if (i == end()) { printf("timesig(%d): not found\n", tick); - // abort(); z = 4; n = 4; } @@ -242,7 +241,6 @@ void SigList::tickValues(unsigned t, int* bar, int* beat, unsigned* tick) const ciSigEvent e = upper_bound(t); if (e == end()) { fprintf(stderr, "tickValues(0x%x) not found(%zd)\n", t, size()); - // abort(); *bar = 0; *beat = 0; *tick = 0; @@ -293,7 +291,6 @@ unsigned SigList::raster(unsigned t, int raster) const ciSigEvent e = upper_bound(t); if (e == end()) { printf("SigList::raster(%x,)\n", t); - // abort(); return t; } int delta = t - e->second->tick; diff --git a/muse2/muse/sig.h b/muse2/muse/sig.h index 727ce79e..9f38afd6 100644 --- a/muse2/muse/sig.h +++ b/muse2/muse/sig.h @@ -1,3 +1,5 @@ +// THIS FILE IS ORPHANED: nothing uses its functions + //========================================================= // MusE // Linux Music Editor @@ -39,8 +41,8 @@ class Xml; //--------------------------------------------------------- struct SigEvent { - int z, n; // takt signatur - unsigned tick; // ab dieser Position gilt signatur + int z, n; // beat signature + unsigned tick; // valid from this position int bar; // precomputed int read(Xml&); diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 6d7e419e..1b7354f2 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -59,11 +59,9 @@ #include "menutitleitem.h" #include "tracks_duplicate.h" #include "midi.h" -///#include "sig.h" #include "al/sig.h" #include "keyevent.h" #include -//#include "utils.h" namespace MusEGlobal { MusECore::Song* song = 0; @@ -158,7 +156,6 @@ void Song::setSig(const AL::TimeSignature& sig) Track* Song::addNewTrack(QAction* action, Track* insertAt) { -printf("Song::addNewTrack\n"); int n = action->data().toInt(); // Ignore negative numbers since this slot could be called by a menu or list etc. passing -1. if(n < 0) @@ -176,7 +173,9 @@ printf("Song::addNewTrack\n"); if(n >= (int)MusEGlobal::synthis.size()) return 0; - //printf("Song::addNewTrack synth: type:%d idx:%d class:%s label:%s\n", ntype, n, MusEGlobal::synthis[n]->baseName().toLatin1().constData(), MusEGlobal::synthis[n]->name().toLatin1().constData()); + if (MusEGlobal::debugMsg) + printf("Song::addNewTrack synth: type:%d idx:%d class:%s label:%s\n", ntype, n, MusEGlobal::synthis[n]->baseName().toLatin1().constData(), MusEGlobal::synthis[n]->name().toLatin1().constData()); + SynthI* si = createSynthI(MusEGlobal::synthis[n]->baseName(), MusEGlobal::synthis[n]->name(), (Synth::Type)ntype, insertAt); if(!si) return 0; @@ -234,9 +233,8 @@ printf("Song::addNewTrack\n"); // If insertAt is valid, inserts before insertAt. Else at the end after all tracks. //--------------------------------------------------------- -Track* Song::addTrack(Undo& operations, Track::TrackType type, Track* insertAt) +Track* Song::addTrack(Undo& /*operations*/, Track::TrackType type, Track* insertAt) { - printf("Song::addTrack\n"); Track* track = 0; int lastAuxIdx = _auxs.size(); switch(type) { @@ -292,10 +290,12 @@ Track* Song::addTrack(Undo& operations, Track::TrackType type, Track* insertAt) int idx = insertAt ? _tracks.index(insertAt) : -1; - // insertTrack1(track, idx); // this and the below are replaced - // msgInsertTrack(track, idx, true); // by the UndoOp-operation - // insertTrack3(track, idx); // does nothing - operations.push_back(UndoOp(UndoOp::AddTrack, idx, track)); + insertTrack1(track, idx); // this and the below are replaced + msgInsertTrack(track, idx, true); // by the UndoOp-operation + insertTrack3(track, idx); // does nothing + // No, can't do this. insertTrack2 needs to be called now, not later, otherwise it sees + // that the track may have routes, and reciprocates them, causing duplicate routes. + ///operations.push_back(UndoOp(UndoOp::AddTrack, idx, track)); // Add default track <-> midiport routes. if(track->isMidiTrack()) @@ -354,18 +354,8 @@ Track* Song::addTrack(Undo& operations, Track::TrackType type, Track* insertAt) if (!ol->empty()) { AudioOutput* ao = ol->front(); switch(type) { - //case Track::MIDI: - //case Track::DRUM: - //case Track::NEW_DRUM: - //case Track::AUDIO_OUTPUT: - // break; - case Track::WAVE: - //case Track::AUDIO_GROUP: // Removed by Tim. case Track::AUDIO_AUX: - //case Track::AUDIO_INPUT: // Removed by Tim. - // p3.3.38 - //case Track::AUDIO_SOFTSYNTH: MusEGlobal::audio->msgAddRoute(Route((AudioTrack*)track, -1), Route(ao, -1)); updateFlags |= SC_ROUTE; break; @@ -465,7 +455,9 @@ void Song::duplicateTracks() // required for fine-grained control over initializing various track types. // - // Set to 0 to use the copy constructor. Set to 1 to use new + assign(). + // Set to 0 to use the copy constructor. Set to 1 to use new + assign(). + // DELETETHIS is this still necessary to keep around? + // also consider removing and adding a hint to a revision number instead #if 0 Track* new_track = 0; @@ -473,7 +465,7 @@ void Song::duplicateTracks() switch(track->type()) { case Track::AUDIO_SOFTSYNTH: // TODO: Handle synths. p4.0.47 - // ((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); + // ((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); DELETETHIS? break; case Track::MIDI: @@ -483,25 +475,25 @@ void Song::duplicateTracks() case Track::DRUM: new_track = new MidiTrack(); new_track->setType(Track::DRUM); - //((MidiTrack*)new_track)->setOutChannel(9); + //((MidiTrack*)new_track)->setOutChannel(9); DELETETHIS? break; case Track::WAVE: new_track = new MusECore::WaveTrack(); - //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); + //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); DELETETHIS? break; case Track::AUDIO_OUTPUT: new_track = new AudioOutput(); break; case Track::AUDIO_GROUP: new_track = new AudioGroup(); - //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); + //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); DELETETHIS? break; case Track::AUDIO_AUX: new_track = new AudioAux(); break; case Track::AUDIO_INPUT: new_track = new AudioInput(); - //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); + //((AudioTrack*)new_track)->addAuxSend(lastAuxIdx); DELETETHIS? break; default: printf("Song::duplicateTracks: Illegal type %d\n", track->type()); @@ -535,13 +527,6 @@ void Song::duplicateTracks() update_flags |= SC_ROUTE; MusEGlobal::song->endUndo(update_flags); MusEGlobal::audio->msgUpdateSoloStates(); - - //if (t->isVisible()) - //{ - ////deselectTracks(); - //t->setSelected(true); - ////update(SC_SELECTION); - //} } //--------------------------------------------------------- @@ -585,7 +570,7 @@ void Song::deselectTracks() (*t)->setSelected(false); } -/* +/* DELETETHIS 17 //--------------------------------------------------------- // changeTrack // oldTrack - copy of the original track befor modification @@ -636,9 +621,7 @@ void Song::changeEvent(Event& oldEvent, Event& newEvent, Part* part) // This can be normal for some (redundant) operations. if(MusEGlobal::debugMsg) printf("Song::changeEvent event not found in part:%s size:%zd\n", part->name().toLatin1().constData(), part->events()->size()); - // Removed by T356. Allow it to add the new event. - // (And remove the old one from the midi port controller!) - //return; + // no "return;" because: Allow it to add the new event. (And remove the old one from the midi port controller!) (tim) } else part->events()->erase(i); @@ -684,16 +667,9 @@ void Song::remapPortDrumCtrlEvents(int mapidx, int newnote, int newchan, int new { MidiPart* part = (MidiPart*)(ip->second); const EventList* el = part->cevents(); - // unsigned len = part->lenTick(); // Commented out by flo, see below for(ciEvent ie = el->begin(); ie != el->end(); ++ie) { const Event& ev = ie->second; - // Added by T356. Do not handle events which are past the end of the part. - // Commented out by flo: yes, DO handle them! these are "hidden events" - // which may be revealed later again! - // if(ev.tick() >= len) - // break; - if(ev.type() != Controller) continue; @@ -834,9 +810,6 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start iEvent e; unsigned endTick; - // Changed by Tim. p3.3.8 - - //if (punchin()) if((MusEGlobal::audio->loopCount() > 0 && startTick > lPos().tick()) || (punchin() && startTick < lPos().tick())) { startTick = lpos(); @@ -845,28 +818,17 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start else { s = events->begin(); -// startTick = s->first; } - // Changed by Tim. p3.3.8 - - //if (punchout()) - //{ - // endTick = rpos(); - // e = events->lower_bound(endTick); - //} - //else - //{ - // search for last noteOff: - endTick = 0; - for (iEvent i = events->begin(); i != events->end(); ++i) { - Event ev = i->second; - unsigned l = ev.endTick(); - if (l > endTick) - endTick = l; - } - // e = events->end(); - //} + // search for last noteOff: + endTick = 0; + for (iEvent i = events->begin(); i != events->end(); ++i) { + Event ev = i->second; + unsigned l = ev.endTick(); + if (l > endTick) + endTick = l; + } + if((MusEGlobal::audio->loopCount() > 0) || (punchout() && endTick > rPos().tick()) ) { endTick = rpos(); @@ -904,11 +866,6 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start // create new part part = new MidiPart(mt); - // Changed by Tim. p3.3.8 - - // Honour the Arranger snap settings. (Set to bar by default). - //startTick = roundDownBar(startTick); - //endTick = roundUpBar(endTick); // Round the start down using the Arranger part snap raster value. startTick = AL::sigmap.raster1(startTick, arrangerRaster()); // Round the end up using the Arranger part snap raster value. @@ -949,23 +906,25 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start // Round the end up (again) using the Arranger part snap raster value. endTick = AL::sigmap.raster2(endTick, arrangerRaster()); - // Remove all of the part's port controller values. Indicate do not do clone parts. - removePortCtrlEvents(part, false); + + removePortCtrlEvents(part, false); // Remove all of the part's port controller values. Don't do clone parts. + // Clone the part. This doesn't increment aref count, and doesn't chain clones. // It also gives the new part a new serial number, but it is // overwritten with the old one by Song::changePart(), below. Part* newPart = part->clone(); - // Set the new part's length. - newPart->setLenTick(endTick); - // Change the part. - changePart(part, newPart); - // Manually adjust reference counts. - part->events()->incARef(-1); + + newPart->setLenTick(endTick); // Set the new part's length. + changePart(part, newPart); // Change the part. + + part->events()->incARef(-1); // Manually adjust reference counts. HACK! newPart->events()->incARef(1); - // Replace the part in the clone chain with the new part. - replaceClone(part, newPart); + + replaceClone(part, newPart); // Replace the part in the clone chain with the new part. + // Now add all of the new part's port controller values. Indicate do not do clone parts. addPortCtrlEvents(newPart, false); + // Create an undo op. Indicate do port controller values but not clone parts. addUndo(UndoOp(UndoOp::ModifyPart, part, newPart, true, false)); updateFlags |= SC_PART_MODIFIED; @@ -977,7 +936,7 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start for (iEvent i = si; i != ei; ++i) { Event event = i->second; - // Create an undo op. Indicate do port controller values and clone parts. + // Indicate do port controller values and clone parts. addUndo(UndoOp(UndoOp::DeleteEvent, event, newPart, true, true)); // Remove the event from the new part's port controller values, and do all clone parts. removePortCtrlEvents(event, newPart, true); @@ -1006,8 +965,7 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start for (iEvent i = si; i != ei; ++i) { Event event = i->second; - // Create an undo op. Indicate that controller values and clone parts were handled. - //addUndo(UndoOp(UndoOp::DeleteEvent, event, part)); + // Indicate that controller values and clone parts were handled. addUndo(UndoOp(UndoOp::DeleteEvent, event, part, true, true)); // Remove the event from the part's port controller values, and do all clone parts. removePortCtrlEvents(event, part, true); @@ -1019,11 +977,9 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, EventList* events, unsigned start int tick = event.tick() - partTick; event.setTick(tick); - // Create an undo op. Indicate that controller values and clone parts were handled. - //addUndo(UndoOp(UndoOp::AddEvent, event, part)); + // Indicate that controller values and clone parts were handled. addUndo(UndoOp(UndoOp::AddEvent, event, part, true, true)); - //addEvent(event, part); if(part->events()->find(event) == part->events()->end()) part->events()->add(event); @@ -1108,7 +1064,7 @@ void Song::setRecord(bool f, bool autoRecEnable) Track *selectedTrack = 0; // loop through list and check if any track is rec enabled // if not then rec enable the selected track - MusECore::WaveTrackList* wtl = waves(); + MusECore::WaveTrackList* wtl = waves(); for (MusECore::iWaveTrack i = wtl->begin(); i != wtl->end(); ++i) { if((*i)->recordFlag()) { @@ -1152,6 +1108,7 @@ void Song::setRecord(bool f, bool autoRecEnable) } } +// DELETETHIS? 14 #if 0 // check for midi devices suitable for recording bool portFound = false; @@ -1239,11 +1196,8 @@ void Song::setMasterFlag(bool val) _masterFlag = val; if (MusEGlobal::tempomap.setMasterFlag(cpos(), val)) { - //MusEGlobal::audioDevice->setMaster(val); emit songChanged(SC_MASTER); } - // Removed. p3.3.26 - //MusEGlobal::audioDevice->setMaster(val); } //--------------------------------------------------------- @@ -1324,31 +1278,31 @@ void Song::seekTo(int tick) void Song::setPos(int idx, const Pos& val, bool sig, bool isSeek, bool adjustScrollbar) { -// printf("setPos %d sig=%d,seek=%d,scroll=%d ", -// idx, sig, isSeek, adjustScrollbar); -// val.dump(0); -// printf("\n"); - //printf("Song::setPos before MusEGlobal::audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame()); + if (MusEGlobal::heavyDebugMsg) + { + printf("setPos %d sig=%d,seek=%d,scroll=%d ", + idx, sig, isSeek, adjustScrollbar); + val.dump(0); + printf("\n"); + printf("Song::setPos before MusEGlobal::audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame()); + } - // If seeking audio, ensure frame resolution CAN be kept throughout. This compares apples and oranges. Moved below. p4.0.33 - //if (pos[idx] == val) - // return; if (idx == CPOS) { _vcpos = val; if (isSeek && !MusEGlobal::extSyncFlag.value()) { if (val == MusEGlobal::audio->pos()) { - //printf("Song::setPos seek MusEGlobal::audio->pos already == val tick:%d frame:%d\n", val.tick(), val.frame()); + if (MusEGlobal::heavyDebugMsg) printf("Song::setPos seek MusEGlobal::audio->pos already == val tick:%d frame:%d\n", val.tick(), val.frame()); return; } MusEGlobal::audio->msgSeek(val); - //printf("Song::setPos after MusEGlobal::audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame()); + if (MusEGlobal::heavyDebugMsg) printf("Song::setPos after MusEGlobal::audio->msgSeek idx:%d isSeek:%d frame:%d\n", idx, isSeek, val.frame()); return; } } if (val == pos[idx]) { - //printf("Song::setPos MusEGlobal::song->pos already == val tick:%d frame:%d\n", val.tick(), val.frame()); + if (MusEGlobal::heavyDebugMsg) printf("Song::setPos MusEGlobal::song->pos already == val tick:%d frame:%d\n", val.tick(), val.frame()); return; } pos[idx] = val; @@ -1433,13 +1387,7 @@ void Song::rewind() void Song::rewindStart() { - // Added by T356 - //MusEGlobal::audio->msgIdle(true); - MusEGlobal::audio->msgSeek(Pos(0, true)); - - // Added by T356 - //MusEGlobal::audio->msgIdle(false); } //--------------------------------------------------------- @@ -1576,15 +1524,6 @@ PartList* Song::getSelectedMidiParts() const { PartList* parts = new PartList(); - //------------------------------------------------------ - // wenn ein Part selektiert ist, diesen editieren - // wenn ein Track selektiert ist, den Ersten - // Part des Tracks editieren, die restlichen sind - // 'ghostparts' - // wenn mehrere Parts selektiert sind, dann Ersten - // editieren, die restlichen sind 'ghostparts' - // - // Rough translation: /* If a part is selected, edit that. If a track is selected, edit the first @@ -1628,16 +1567,16 @@ PartList* Song::getSelectedWaveParts() const { PartList* parts = new PartList(); - //------------------------------------------------------ - // wenn ein Part selektiert ist, diesen editieren - // wenn ein Track selektiert ist, den Ersten - // Part des Tracks editieren, die restlichen sind - // 'ghostparts' - // wenn mehrere Parts selektiert sind, dann Ersten - // editieren, die restlichen sind 'ghostparts' - // + /* + If a part is selected, edit that. + If a track is selected, edit the first + part of the track, the rest are + 'ghost parts' + When multiple parts are selected, then edit the first, + the rest are 'ghost parts' + */ - // markierte Parts sammeln + // collect selected parts for (ciTrack t = _tracks.begin(); t != _tracks.end(); ++t) { MusECore::WaveTrack* track = dynamic_cast(*t); if (track == 0) @@ -1649,8 +1588,8 @@ PartList* Song::getSelectedWaveParts() const } } } - // wenn keine Parts selektiert, dann markierten Track suchen - // und alle Parts dieses Tracks zusammensuchen + // if no parts are selected, then search the selected track + // and collect all parts in this track if (parts->empty()) { for (ciTrack t = _tracks.begin(); t != _tracks.end(); ++t) { @@ -1670,9 +1609,8 @@ PartList* Song::getSelectedWaveParts() const void Song::setMType(MType t) { -// printf("set MType %d\n", t); _mtype = t; - MusEGlobal::song->update(SC_SONG_TYPE); // p4.0.7 Tim. + MusEGlobal::song->update(SC_SONG_TYPE); } //--------------------------------------------------------- @@ -1681,6 +1619,7 @@ void Song::setMType(MType t) void Song::beat() { + // DELETETHIS 15 #if 0 // Just a rate test... static double _heartbeatRateTimer = 0.0; @@ -1699,21 +1638,13 @@ void Song::beat() // Keep the sync detectors running... for(int port = 0; port < MIDI_PORTS; ++port) - { - // Must keep them running even if there's no device... - //if(MusEGlobal::midiPorts[port].device()) MusEGlobal::midiPorts[port].syncInfo().setTime(); - } - //int tick = MusEGlobal::audio->tickPos(); if (MusEGlobal::audio->isPlaying()) - { - //Pos tick(MusEGlobal::audio->tickPos()); - //setPos(0, tick, true, false, true); setPos(0, MusEGlobal::audio->tickPos(), true, false, true); - } - // p3.3.40 Update synth native guis at the heartbeat rate. + + // Update synth native guis at the heartbeat rate. for(ciSynthI is = _synthIs.begin(); is != _synthIs.end(); ++is) (*is)->guiHeartBeat(); @@ -1771,11 +1702,9 @@ Marker* Song::getMarkerAt(int t) { iMarker markerI; for (markerI=_markerList->begin(); markerI != _markerList->end(); ++markerI) { -// if (i1->second.current()) - if (unsigned(t) == markerI->second.tick())//prevent of copmiler warning: comparison signed/unsigned + if (unsigned(t) == markerI->second.tick()) //prevent of compiler warning: comparison signed/unsigned return &markerI->second; } - //Marker* marker = _markerList->add(s, t, lck); return NULL; } @@ -1813,23 +1742,6 @@ Marker* Song::setMarkerLock(Marker* m, bool f) return m; } -// kommer inte att gå göra undo på, kanske skulle fixa det. - -//void Song::moveMarkers(int startOffset, int ticks) -//{ -// iMarker markerI; -// for (markerI=_markerList->rbegin(); markerI != _markerList->rend(); ++markerI) { -// if (markerI->second.tick() > startOffset) { -// if (markerI-> ) -// } -// -// -// -// if (unsigned(t) == markerI->second.tick())//prevent of copmiler warning: comparison signed/unsigned -// return &markerI->second; -// } -// -//} //--------------------------------------------------------- // setRecordFlag @@ -1847,7 +1759,6 @@ void Song::setRecordFlag(Track* track, bool val) track->setRecordFlag1(val); track->setRecordFlag2(val); } -// updateFlags |= SC_RECFLAG; update(SC_RECFLAG); } @@ -1868,8 +1779,7 @@ void Song::rescanAlsaPorts() void Song::endMsgCmd() { if (updateFlags) { - //redoList->clear(); // TODO: delete elements in list - redoList->clearDelete(); // p4.0.46 Tim. NOTE Hm, shouldn't this be above? + redoList->clearDelete(); MusEGlobal::undoAction->setEnabled(true); MusEGlobal::redoAction->setEnabled(false); emit songChanged(updateFlags); @@ -1950,7 +1860,6 @@ void Song::processMsg(AudioMsg* msg) updateFlags = SC_EVENT_INSERTED; if (addEvent(msg->ev1, (MidiPart*)msg->p2)) { Event ev; - //addUndo(UndoOp(UndoOp::AddEvent, ev, msg->ev1, (Part*)msg->p2)); addUndo(UndoOp(UndoOp::AddEvent, ev, msg->ev1, (Part*)msg->p2, msg->a, msg->b)); } else @@ -1965,7 +1874,6 @@ void Song::processMsg(AudioMsg* msg) if(msg->a) removePortCtrlEvents(event, part, msg->b); Event e; - //addUndo(UndoOp(UndoOp::DeleteEvent, e, event, (Part*)part)); addUndo(UndoOp(UndoOp::DeleteEvent, e, event, (Part*)part, msg->a, msg->b)); deleteEvent(event, part); updateFlags = SC_EVENT_REMOVED; @@ -1977,7 +1885,6 @@ void Song::processMsg(AudioMsg* msg) changeEvent(msg->ev1, msg->ev2, (MidiPart*)msg->p3); if(msg->a) addPortCtrlEvents(msg->ev2, (Part*)msg->p3, msg->b); - //addUndo(UndoOp(UndoOp::ModifyEvent, msg->ev2, msg->ev1, (Part*)msg->p3)); addUndo(UndoOp(UndoOp::ModifyEvent, msg->ev2, msg->ev1, (Part*)msg->p3, msg->a, msg->b)); updateFlags = SC_EVENT_MODIFIED; break; @@ -1987,10 +1894,9 @@ void Song::processMsg(AudioMsg* msg) insertTrack2(msg->track, msg->ival); break; case SEQM_REMOVE_TRACK: - //removeTrack2(msg->track); cmdRemoveTrack(msg->track); break; - //case SEQM_CHANGE_TRACK: + //case SEQM_CHANGE_TRACK: DELETETHIS 3 // changeTrack((Track*)(msg->p1), (Track*)(msg->p2)); // break; case SEQM_ADD_PART: @@ -2000,7 +1906,6 @@ void Song::processMsg(AudioMsg* msg) cmdRemovePart((Part*)msg->p1); break; case SEQM_CHANGE_PART: - //cmdChangePart((Part*)msg->p1, (Part*)msg->p2); cmdChangePart((Part*)msg->p1, (Part*)msg->p2, msg->a, msg->b); break; @@ -2076,7 +1981,6 @@ void Song::cmdRemovePart(Part* part) removePart(part); addUndo(UndoOp(UndoOp::DeletePart, part)); part->events()->incARef(-1); - //part->unchainClone(); unchainClone(part); updateFlags = SC_PART_REMOVED; } @@ -2087,14 +1991,11 @@ void Song::cmdRemovePart(Part* part) void Song::cmdChangePart(Part* oldPart, Part* newPart, bool doCtrls, bool doClones) { - //printf("Song::cmdChangePart before changePart oldPart:%p events:%p refs:%d Arefs:%d sn:%d newPart:%p events:%p refs:%d Arefs:%d sn:%d\n", oldPart, oldPart->events(), oldPart->events()->refCount(), oldPart->events()->arefCount(), oldPart->sn(), newPart, newPart->events(), newPart->events()->refCount(), newPart->events()->arefCount(), newPart->sn()); - if(doCtrls) removePortCtrlEvents(oldPart, doClones); changePart(oldPart, newPart); - //addUndo(UndoOp(UndoOp::ModifyPart, oldPart, newPart)); addUndo(UndoOp(UndoOp::ModifyPart, oldPart, newPart, doCtrls, doClones)); // Changed by T356. Do not decrement ref count if the new part is a clone of the old part, since the event list @@ -2102,17 +2003,11 @@ void Song::cmdChangePart(Part* oldPart, Part* newPart, bool doCtrls, bool doClon if(oldPart->cevents() != newPart->cevents()) oldPart->events()->incARef(-1); - //oldPart->replaceClone(newPart); - - //printf("Song::cmdChangePart before repl/unchClone oldPart:%p events:%p refs:%d Arefs:%d sn:%d newPart:%p events:%p refs:%d Arefs:%d sn:%d\n", oldPart, oldPart->events(), oldPart->events()->refCount(), oldPart->events()->arefCount(), oldPart->sn(), newPart, newPart->events(), newPart->events()->refCount(), newPart->events()->arefCount(), newPart->sn()); - replaceClone(oldPart, newPart); if(doCtrls) addPortCtrlEvents(newPart, doClones); - //printf("Song::cmdChangePart after repl/unchClone oldPart:%p events:%p refs:%d Arefs:%d sn:%d newPart:%p events:%p refs:%d Arefs:%d sn:%d\n", oldPart, oldPart->events(), oldPart->events()->refCount(), oldPart->events()->arefCount(), oldPart->sn(), newPart, newPart->events(), newPart->events()->refCount(), newPart->events()->arefCount(), newPart->sn()); - updateFlags = SC_PART_MODIFIED; } @@ -2174,7 +2069,6 @@ void Song::clear(bool signal, bool clear_all) loop = false; for(iMidiDevice imd = MusEGlobal::midiDevices.begin(); imd != MusEGlobal::midiDevices.end(); ++imd) { - //if((*imd)->deviceType() == MidiDevice::JACK_MIDI) if(dynamic_cast< MidiJackDevice* >(*imd)) { if(clear_all) // Allow not touching devices. p4.0.17 TESTING: Maybe some problems... @@ -2190,9 +2084,7 @@ void Song::clear(bool signal, bool clear_all) break; } } - else - //if((*imd)->deviceType() == MidiDevice::ALSA_MIDI) - if(dynamic_cast< MidiAlsaDevice* >(*imd)) + else if(dynamic_cast< MidiAlsaDevice* >(*imd)) { // With alsa devices, we must not delete them (they're always in the list). But we must // clear all routes. They point to non-existant midi tracks, which were all deleted above. @@ -2208,6 +2100,7 @@ void Song::clear(bool signal, bool clear_all) MusEGlobal::keymap.clear(); undoList->clearDelete(); + // DELETETHIS //redoList->clear(); // Check this - Should we do a clearDelete? IIRC it was OK this way - no clearDelete in case of same items in both lists. redoList->clearDelete(); // p4.0.46 Tim if(MusEGlobal::undoAction) @@ -2245,7 +2138,6 @@ void Song::clear(bool signal, bool clear_all) _quantize = false; _len = 0; // song len in ticks _follow = JUMP; - // _tempo = 500000; // default tempo 120 dirty = false; initDrumMap(); initNewDrumMap(); @@ -2305,6 +2197,7 @@ void Song::cleanupForQuit() if(MusEGlobal::debugMsg) printf("deleting undoList, clearing redoList\n"); undoList->clearDelete(); + //DELETETHIS //redoList->clear(); // Check this - Should we do a clearDelete? IIRC it was OK this way - no clearDelete in case of same items in both lists. redoList->clearDelete(); // p4.0.46 Tim @@ -2317,12 +2210,12 @@ void Song::cleanupForQuit() if(MusEGlobal::debugMsg) printf("deleting midiport controllers\n"); + // Clear all midi port controllers and values. for(int i = 0; i < MIDI_PORTS; ++i) - // Remove the controllers and the values. - MusEGlobal::midiPorts[i].controller()->clearDelete(true); + MusEGlobal::midiPorts[i].controller()->clearDelete(true); // Remove the controllers and the values. - // Can't do this here. Jack isn't running. Fixed. Test OK so far. + // Can't do this here. Jack isn't running. Fixed. Test OK so far. DELETETHIS (the comment and #if/#endif) #if 1 if(MusEGlobal::debugMsg) printf("deleting midi devices except synths\n"); @@ -2340,6 +2233,7 @@ void Song::cleanupForQuit() if(MusEGlobal::debugMsg) printf("deleting global available synths\n"); + // Delete all synths. std::vector::iterator is; for(is = MusEGlobal::synthis.begin(); is != MusEGlobal::synthis.end(); ++is) @@ -2392,7 +2286,6 @@ void Song::seqSignal(int fd) return; } for (int i = 0; i < n; ++i) { -// printf("seqSignal to gui:<%c>\n", buffer[i]); switch(buffer[i]) { case '0': // STOP stopRolling(); @@ -2436,7 +2329,7 @@ void Song::seqSignal(int fd) "click on the Restart button."), "restart", "cancel"); if (btn == 0) { printf("restarting!\n"); - MusEGlobal::muse->seqRestart(); + MusEGlobal::muse->seqRestart(); } } @@ -2458,7 +2351,7 @@ void Song::seqSignal(int fd) MusEGlobal::audioDevice->setFreewheel(false); MusEGlobal::audio->msgPlay(false); -#if 0 +#if 0 // DELETETHIS if (record()) MusEGlobal::audio->recordStop(); setStopPlay(false); @@ -2511,7 +2404,6 @@ void Song::recordEvent(MidiTrack* mt, Event& event) // create new part part = new MidiPart(mt); int startTick = roundDownBar(tick); - //int endTick = roundUpBar(tick); int endTick = roundUpBar(tick + 1); part->setTick(startTick); part->setLenTick(endTick - startTick); @@ -2532,15 +2424,9 @@ void Song::recordEvent(MidiTrack* mt, Event& event) for(iEvent i = range.first; i != range.second; ++i) { ev = i->second; - // At the moment, Song::recordEvent() is only called by the 'Rec' buttons in the - // midi track info panel. So only controller types are fed to it. If other event types - // are to be passed, we will have to expand on this to check if equal. Instead, maybe add an isEqual() to Event class. - //if((ev.type() == Controller && event.type() == Controller || ev.type() == Controller && event.type() == Controller) - // && ev.dataA() == event.dataA() && ev.dataB() == event.dataB()) if(ev.type() == Controller && ev.dataA() == event.dataA()) { - // Don't bother if already set. - if(ev.dataB() == event.dataB()) + if(ev.dataB() == event.dataB()) // Don't bother if already set. return; // Indicate do undo, and do port controller values and clone parts. MusEGlobal::audio->msgChangeEvent(ev, event, part, true, true, true); @@ -2550,7 +2436,6 @@ void Song::recordEvent(MidiTrack* mt, Event& event) } // Indicate do undo, and do port controller values and clone parts. - //MusEGlobal::audio->msgAddEvent(event, part); MusEGlobal::audio->msgAddEvent(event, part, true, true, true); } @@ -2575,17 +2460,11 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a CtrlList *cl = icl->second; canAdd = true; - //int frame = pos[0].frame(); - int frame = MusEGlobal::audio->pos().frame(); // Try this. p4.0.33 - - //printf("pos[0]:%d f:%d tickPos:%d f:%d\n", pos[0].tick(), pos[0].frame(), MusEGlobal::audio->tickPos(), Pos(MusEGlobal::audio->tickPos(), true).frame()); + //int frame = pos[0].frame(); DELETETHIS + int frame = MusEGlobal::audio->pos().frame(); // Try this. p4.0.33 DELETETHIS - //ctlval = cl->curVal(); - //AutomationType at = track->MusEGlobal::automationType(); - //if(!MusEGlobal::automation || track->MusEGlobal::automationType() == AUTO_OFF) - ctlval = cl->curVal(); - //else - // ctlval = cl->value(frame); + ctlval = cl->curVal(); + count = cl->size(); if(count) { @@ -2639,16 +2518,12 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a clearAction->setEnabled((bool)count); QAction* act = menu->exec(menupos); - //delete menu; if (!act || !track) { delete menu; return -1; } - //if(!track) - // return -1; - int sel = act->data().toInt(); delete menu; @@ -2697,15 +2572,10 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo if(!track && !part) return -1; - //enum { PREV_EVENT, NEXT_EVENT, ADD_EVENT, CLEAR_EVENT, CLEAR_RANGE, CLEAR_ALL_EVENTS }; enum { ADD_EVENT, CLEAR_EVENT }; QMenu* menu = new QMenu; - //int count = 0; bool isEvent = false; - //bool canSeekPrev = false, canSeekNext = false, canEraseRange = false; - //bool canAdd = false; - //double ctlval = 0.0; MidiTrack* mt; if(track) @@ -2729,8 +2599,6 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo dctl |= MusEGlobal::drumMap[note].anote; } - //printf("Song::execMidiAutomationCtlPopup ctlnum:%d dctl:%d anote:%d\n", ctlnum, dctl, MusEGlobal::drumMap[ctlnum & 0x7f].anote); - unsigned tick = cpos(); if(!part) @@ -2771,9 +2639,6 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo ev = i->second; if(ev.type() == Controller) { - //printf("Song::execMidiAutomationCtlPopup ev.dataA:%d\n", ev.dataA()); - - //if(ev.dataA() == dctl) if(ev.dataA() == ctlnum) { isEvent = true; @@ -2793,31 +2658,19 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo else addEvent->setText(tr("add event")); addEvent->setData(ADD_EVENT); - //addEvent->setEnabled(canAdd); addEvent->setEnabled(true); QAction* eraseEventAction = menu->addAction(tr("erase event")); eraseEventAction->setData(CLEAR_EVENT); eraseEventAction->setEnabled(isEvent); -// menu->insertItem(tr("erase range"), CLEAR_RANGE, CLEAR_RANGE); -// menu->setItemEnabled(CLEAR_RANGE, canEraseRange); - -// menu->insertItem(tr("clear automation"), CLEAR_ALL_EVENTS, CLEAR_ALL_EVENTS); -// menu->setItemEnabled(CLEAR_ALL_EVENTS, (bool)count); - - QAction* act = menu->exec(menupos); - //delete menu; if (!act) { delete menu; return -1; } - //if(!part) - // return -1; - int sel = act->data().toInt(); delete menu; @@ -2825,19 +2678,16 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo { case ADD_EVENT: { - //int val = mp->hwCtrlState(channel, ctlnum); int val = mp->hwCtrlState(channel, dctl); if(val == CTRL_VAL_UNKNOWN) return -1; Event e(Controller); - //e.setA(dctl); e.setA(ctlnum); e.setB(val); // Do we replace an old event? if(isEvent) { - // Don't bother if already set. - if(ev.dataB() == val) + if(ev.dataB() == val) // Don't bother if already set. return -1; e.setTick(tick - part->tick()); @@ -2875,25 +2725,6 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo MusEGlobal::audio->msgDeleteEvent(ev, part, true, true, true); break; - //case CLEAR_RANGE: - //MusEGlobal::audio->msgEraseRangeACEvents(track, acid, pos[1].frame(), pos[2].frame()); - //break; - - //case CLEAR_ALL_EVENTS: - //if(QMessageBox::question(MusEGlobal::muse, QString("Muse"), - // tr("Clear all controller events?"), tr("&Ok"), tr("&Cancel"), - // QString::null, 0, 1 ) == 0) - //MusEGlobal::audio->msgClearControllerEvents(track, acid); - //break; - - //case PREV_EVENT: - //MusEGlobal::audio->msgSeekPrevACEvent(track, acid); - //break; - - //case NEXT_EVENT: - //MusEGlobal::audio->msgSeekNextACEvent(track, acid); - //break; - default: return -1; break; @@ -3053,7 +2884,7 @@ void Song::connectJackRoutes(AudioTrack* track, bool disconnect) void Song::insertTrack0(Track* track, int idx) { insertTrack1(track, idx); - insertTrack2(track, idx); // MusEGlobal::audio->msgInsertTrack(track, idx, false); + insertTrack2(track, idx); // MusEGlobal::audio->msgInsertTrack(track, idx, false); DELETETHIS or is this somehow explanatory? insertTrack3(track, idx); } @@ -3064,8 +2895,6 @@ void Song::insertTrack0(Track* track, int idx) void Song::insertTrack1(Track* track, int /*idx*/) { - //printf("Song::insertTrack1 track:%lx\n", track); - switch(track->type()) { case Track::AUDIO_SOFTSYNTH: { @@ -3079,9 +2908,6 @@ void Song::insertTrack1(Track* track, int /*idx*/) default: break; } - - //printf("Song::insertTrack1 end of function\n"); - } //--------------------------------------------------------- @@ -3091,16 +2917,12 @@ void Song::insertTrack1(Track* track, int /*idx*/) void Song::insertTrack2(Track* track, int idx) { - //printf("Song::insertTrack2 track:%lx\n", track); - int n; switch(track->type()) { case Track::MIDI: case Track::DRUM: case Track::NEW_DRUM: _midis.push_back((MidiTrack*)track); - // Added by T356. - //((MidiTrack*)track)->addPortCtrlEvents(); addPortCtrlEvents(((MidiTrack*)track)); break; @@ -3137,14 +2959,10 @@ void Song::insertTrack2(Track* track, int idx) return; } - // // initialize missing aux send - // iTrack i = _tracks.index2iterator(idx); - //printf("Song::insertTrack2 inserting into _tracks...\n"); _tracks.insert(i, track); - //printf("Song::insertTrack2 inserted\n"); n = _auxs.size(); for (iTrack i = _tracks.begin(); i != _tracks.end(); ++i) { @@ -3156,18 +2974,13 @@ void Song::insertTrack2(Track* track, int idx) } } - // // add routes - // if (track->type() == Track::AUDIO_OUTPUT) { const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->outRoutes()->push_back(*r); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->outRoutes()->push_back(src); @@ -3175,8 +2988,7 @@ void Song::insertTrack2(Track* track, int idx) // Update the Audio Output track's aux ref count. p4.0.37 if(r->track->auxRefCount()) track->updateAuxRoute( r->track->auxRefCount(), NULL ); - else - if(r->track->type() == Track::AUDIO_AUX) + else if(r->track->type() == Track::AUDIO_AUX) track->updateAuxRoute( 1, NULL ); } } @@ -3185,9 +2997,6 @@ void Song::insertTrack2(Track* track, int idx) const RouteList* rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->inRoutes()->push_back(*r); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->inRoutes()->push_back(src); @@ -3195,8 +3004,7 @@ void Song::insertTrack2(Track* track, int idx) // Update the other track's aux ref count and all tracks it is connected to. p4.0.37 if(track->auxRefCount()) r->track->updateAuxRoute( track->auxRefCount(), NULL ); - else - if(track->type() == Track::AUDIO_AUX) + else if(track->type() == Track::AUDIO_AUX) r->track->updateAuxRoute( 1, NULL ); } } @@ -3205,14 +3013,12 @@ void Song::insertTrack2(Track* track, int idx) const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //printf("Song::insertTrack2 %s in route port:%d\n", track->name().toLatin1().constData(), r->midiPort); Route src(track, r->channel); MusEGlobal::midiPorts[r->midiPort].outRoutes()->push_back(src); } rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //printf("Song::insertTrack2 %s out route port:%d\n", track->name().toLatin1().constData(), r->midiPort); Route src(track, r->channel); MusEGlobal::midiPorts[r->midiPort].inRoutes()->push_back(src); } @@ -3222,9 +3028,6 @@ void Song::insertTrack2(Track* track, int idx) const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->outRoutes()->push_back(*r); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->outRoutes()->push_back(src); @@ -3232,16 +3035,12 @@ void Song::insertTrack2(Track* track, int idx) // Update this track's aux ref count. p4.0.37 if(r->track->auxRefCount()) track->updateAuxRoute( r->track->auxRefCount(), NULL ); - else - if(r->track->type() == Track::AUDIO_AUX) + else if(r->track->type() == Track::AUDIO_AUX) track->updateAuxRoute( 1, NULL ); } rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->inRoutes()->push_back(*r); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->inRoutes()->push_back(src); @@ -3249,14 +3048,10 @@ void Song::insertTrack2(Track* track, int idx) // Update the other track's aux ref count and all tracks it is connected to. p4.0.37 if(track->auxRefCount()) r->track->updateAuxRoute( track->auxRefCount(), NULL ); - else - if(track->type() == Track::AUDIO_AUX) + else if(track->type() == Track::AUDIO_AUX) r->track->updateAuxRoute( 1, NULL ); } } - - //printf("Song::insertTrack2 end of function\n"); - } //--------------------------------------------------------- @@ -3278,7 +3073,6 @@ void Song::removeTrack0(Track* track) removeTrack1(track); MusEGlobal::audio->msgRemoveTrack(track); removeTrack3(track); - //delete track; update(SC_TRACK_REMOVED); } @@ -3330,21 +3124,16 @@ void Song::removeTrack1(Track* track) void Song::removeTrack2(Track* track) { - //printf("Song::removeTrack2 track:%s\n", track->name().toLatin1().constData()); - switch(track->type()) { case Track::MIDI: case Track::DRUM: case Track::NEW_DRUM: - // Added by T356. - //((MidiTrack*)track)->removePortCtrlEvents(); removePortCtrlEvents(((MidiTrack*)track)); unchainTrackParts(track, true); _midis.erase(track); break; case Track::WAVE: - // Added by T356. unchainTrackParts(track, true); _waves.erase(track); @@ -3371,19 +3160,13 @@ void Song::removeTrack2(Track* track) } _tracks.erase(track); - // // remove routes - // if (track->type() == Track::AUDIO_OUTPUT) { const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->outRoutes()->removeRoute(*r); - //printf("Song::removeTrack2 %s audio out track:%s\n", track->name().toLatin1().constData(), r->track->name().toLatin1().constData()); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->outRoutes()->removeRoute(src); @@ -3391,8 +3174,7 @@ void Song::removeTrack2(Track* track) // Update the Audio Output track's aux ref count. p4.0.37 if(r->track->auxRefCount()) track->updateAuxRoute( -r->track->auxRefCount(), NULL ); - else - if(r->track->type() == Track::AUDIO_AUX) + else if(r->track->type() == Track::AUDIO_AUX) track->updateAuxRoute( -1, NULL ); } } @@ -3401,10 +3183,6 @@ void Song::removeTrack2(Track* track) const RouteList* rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->inRoutes()->removeRoute(*r); - //printf("Song::removeTrack2 %s audio in track:%s\n", track->name().toLatin1().constData(), r->track->name().toLatin1().constData()); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->inRoutes()->removeRoute(src); @@ -3412,8 +3190,7 @@ void Song::removeTrack2(Track* track) // Update the other track's aux ref count and all tracks it is connected to. p4.0.37 if(track->auxRefCount()) r->track->updateAuxRoute( -track->auxRefCount(), NULL ); - else - if(track->type() == Track::AUDIO_AUX) + else if(track->type() == Track::AUDIO_AUX) r->track->updateAuxRoute( -1, NULL ); } } @@ -3422,14 +3199,12 @@ void Song::removeTrack2(Track* track) const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //printf("Song::removeTrack2 %s in route port:%d\n", track->name().toLatin1().constData(), r->midiPort); Route src(track, r->channel); MusEGlobal::midiPorts[r->midiPort].outRoutes()->removeRoute(src); } rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //printf("Song::removeTrack2 %s out route port:%d\n", track->name().toLatin1().constData(), r->midiPort); Route src(track, r->channel); MusEGlobal::midiPorts[r->midiPort].inRoutes()->removeRoute(src); } @@ -3439,10 +3214,6 @@ void Song::removeTrack2(Track* track) const RouteList* rl = track->inRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->outRoutes()->removeRoute(*r); - //printf("Song::removeTrack2 %s in route track:%s\n", track->name().toLatin1().constData(), r->track->name().toLatin1().constData()); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->outRoutes()->removeRoute(src); @@ -3450,17 +3221,12 @@ void Song::removeTrack2(Track* track) // Update this track's aux ref count. p4.0.37 if(r->track->auxRefCount()) track->updateAuxRoute( -r->track->auxRefCount(), NULL ); - else - if(r->track->type() == Track::AUDIO_AUX) + else if(r->track->type() == Track::AUDIO_AUX) track->updateAuxRoute( -1, NULL ); } rl = track->outRoutes(); for (ciRoute r = rl->begin(); r != rl->end(); ++r) { - //if(r->track == track) - // r->track->inRoutes()->removeRoute(*r); - //printf("Song::removeTrack2 %s out route track:%s\n", track->name().toLatin1().constData(), r->track->name().toLatin1().constData()); - // p3.3.50 Route src(track, r->channel, r->channels); src.remoteChannel = r->remoteChannel; r->track->inRoutes()->removeRoute(src); @@ -3468,8 +3234,7 @@ void Song::removeTrack2(Track* track) // Update the other track's aux ref count and all tracks it is connected to. p4.0.37 if(track->auxRefCount()) r->track->updateAuxRoute( -track->auxRefCount(), NULL ); - else - if(track->type() == Track::AUDIO_AUX) + else if(track->type() == Track::AUDIO_AUX) r->track->updateAuxRoute( -1, NULL ); } } @@ -3518,7 +3283,6 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo fprintf(fp, "BEATLEN %d\n", AL::sigmap.ticksBeat(0)); fprintf(fp, "QUANTLEN %d\n", quant); - //for (iCItem i = items.begin(); i != items.end(); ++i) { for (iEvent e = part->events()->begin(); e != part->events()->end(); e++) { Event ev = e->second; @@ -3582,7 +3346,6 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo QStringList sl = line.split(" "); Event e(Controller); - //int tick = sl[1].toInt(); int a = sl[2].toInt(); int b = sl[3].toInt(); int c = sl[4].toInt(); @@ -3606,11 +3369,8 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver) { - // // List scripts - // QString distScripts = MusEGlobal::museGlobalShare + "/scripts"; - QString userScripts = MusEGlobal::configPath + "/scripts"; QFileInfo distScriptsFi(distScripts); @@ -3630,13 +3390,9 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver) QSignalMapper* userSignalMapper = new QSignalMapper(this); if (deliveredScriptNames.size() > 0 || userScriptNames.size() > 0) { - //menuPlugins = new QPopupMenu(this); - //menuBar()->insertItem(tr("&Plugins"), menuPlugins); int id = 0; if (deliveredScriptNames.size() > 0) { for (QStringList::Iterator it = deliveredScriptNames.begin(); it != deliveredScriptNames.end(); it++, id++) { - //menuPlugins->insertItem(*it, this, SLOT(execDeliveredScript(int)), 0, id); - //menuPlugins->insertItem(*it, this, slot_deliveredscripts, 0, id); QAction* act = menuPlugins->addAction(*it); connect(act, SIGNAL(triggered()), distSignalMapper, SLOT(map())); distSignalMapper->setMapping(act, id); @@ -3645,7 +3401,6 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver) } if (userScriptNames.size() > 0) { for (QStringList::Iterator it = userScriptNames.begin(); it != userScriptNames.end(); it++, id++) { - //menuPlugins->insertItem(*it, this, slot_userscripts, 0, id); QAction* act = menuPlugins->addAction(*it); connect(act, SIGNAL(triggered()), userSignalMapper, SLOT(map())); userSignalMapper->setMapping(act, id); diff --git a/muse2/muse/song.h b/muse2/muse/song.h index 22a3a86c..7f0aae70 100644 --- a/muse2/muse/song.h +++ b/muse2/muse/song.h @@ -33,7 +33,6 @@ #include "pos.h" #include "globaldefs.h" #include "tempo.h" -///#include "sig.h" #include "al/sig.h" #include "undo.h" #include "track.h" @@ -264,7 +263,6 @@ class Song : public QObject { // event manipulations //----------------------------------------- - //void cmdAddRecordedWave(WaveTrack* track, const Pos&, const Pos&); void cmdAddRecordedWave(WaveTrack* track, Pos, Pos); void cmdAddRecordedEvents(MidiTrack*, EventList*, unsigned); bool addEvent(Event&, Part*); @@ -293,7 +291,6 @@ class Song : public QObject { PartList* getSelectedWaveParts() const; bool msgRemoveParts(); - //void cmdChangePart(Part* oldPart, Part* newPart); void cmdChangePart(Part* oldPart, Part* newPart, bool doCtrls, bool doClones); void cmdRemovePart(Part* part); void cmdAddPart(Part* part); @@ -319,7 +316,7 @@ class Song : public QObject { void removeTrack2(Track* track); void removeTrack3(Track* track); void removeMarkedTracks(); - //void changeTrack(Track* oldTrack, Track* newTrack); + //void changeTrack(Track* oldTrack, Track* newTrack); DELETETHIS MidiTrack* findTrack(const Part* part) const; Track* findTrack(const QString& name) const; void swapTracks(int i1, int i2); @@ -339,7 +336,6 @@ class Song : public QObject { int execMidiAutomationCtlPopup(MidiTrack*, MidiPart*, const QPoint&, int); void connectJackRoutes(AudioTrack* track, bool disconnect); void updateSoloStates(); - //void chooseMidiRoutes(QButton* /*parent*/, MidiTrack* /*track*/, bool /*dst*/); //----------------------------------------- // undo, redo diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp index f76c16f9..07430c26 100644 --- a/muse2/muse/songfile.cpp +++ b/muse2/muse/songfile.cpp @@ -29,23 +29,18 @@ #include "song.h" #include "arranger.h" #include "arrangerview.h" -//#include "arranger/arranger.h" // p4.0.2 #include "cobject.h" #include "drumedit.h" -//#include "midiedit/drumedit.h" // p4.0.2 #include "pianoroll.h" #include "scoreedit.h" -//#include "midiedit/pianoroll.h" // p4.0.2 #include "globals.h" #include "xml.h" #include "drummap.h" -//#include "midiedit/drummap.h" // p4.0.2 #include "event.h" #include "marker/marker.h" #include "midiport.h" #include "audio.h" #include "mitplugin.h" -//#include "mplugins/mitplugin.h" // p4.0.2 #include "wave.h" #include "midictrl.h" #include "amixer.h" @@ -55,38 +50,13 @@ #include "keyevent.h" namespace MusEGlobal { -//static CloneList cloneList; -//static CloneList copyCloneList; MusECore::CloneList cloneList; -//CloneList copyCloneList; } namespace MusECore { -//struct ClonePart { - //const EventList* el; -// const Part* cp; -// int id; - //ClonePart(const EventList* e, int i) : el(e), id(i) {} -// ClonePart(const Part* p, int i) : cp(p), id(i) {} -// }; -//typedef std::list CloneList; -//typedef CloneList::iterator iClone; - -//--------------------------------------------------------- -// ClonePart -//--------------------------------------------------------- - -ClonePart::ClonePart(const Part* p, int i) -{ - cp = p; - id = i; - uuid_generate(uuid); -} - - -/* +/* DELETETHIS 42 //--------------------------------------------------------- // updateCloneList //--------------------------------------------------------- @@ -219,41 +189,28 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) case Xml::End: return npart; case Xml::TagStart: - // If the part has not been created yet... - if(!npart) + if(!npart) // If the part has not been created yet... { - // If an id was found... - if(id != -1) + if(id != -1) // If an id was found... { for(iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) { - // Is a matching part found in the clone list? - if(i->id == id) + if(i->id == id) // Is a matching part found in the clone list? { - // If it's a regular paste (not paste clone), and the original part is - // not a clone, defer so that a new copy is created in TagStart above. - //if(!doClone && i->cp->cevents()->arefCount() <= 1) - //if(!doClone && !isclone) - // break; - // This makes a clone, chains the part, and increases ref counts. npart = track->newPart((Part*)i->cp, true); break; } } } - else - // If a uuid was found... - if(uuidvalid) + else if(uuidvalid) // If a uuid was found... { for(iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) { - // Is a matching part found in the clone list? - if(uuid_compare(uuid, i->uuid) == 0) + if(uuid_compare(uuid, i->uuid) == 0) // Is a matching part found in the clone list? { Track* cpt = i->cp->track(); - // If we want to paste to the given track... - if(toTrack) + if(toTrack) // If we want to paste to the given track... { // If the given track type is not the same as the part's // original track type, we can't continue. Just return. @@ -263,15 +220,13 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) return 0; } } - else - // ...else we want to paste to the part's original track. + else // ...else we want to paste to the part's original track. { // Make sure the track exists (has not been deleted). if((cpt->isMidiTrack() && MusEGlobal::song->midis()->find(cpt) != MusEGlobal::song->midis()->end()) || (cpt->type() == Track::WAVE && MusEGlobal::song->waves()->find(cpt) != MusEGlobal::song->waves()->end())) track = cpt; - else - // Track was not found. Try pasting to the given track, as above... + else // Track was not found. Try pasting to the given track, as above... { if(!track || cpt->type() != track->type()) { @@ -284,7 +239,6 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) // If it's a regular paste (not paste clone), and the original part is // not a clone, defer so that a new copy is created in TagStart above. - //if(!doClone && i->cp->cevents()->arefCount() <= 1) if(!doClone && !isclone) break; @@ -295,12 +249,11 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) } } - // If the part still has not been created yet... - if(!npart) + if(!npart) // If the part still has not been created yet... { - // A clone was not created from any matching part. Create a non-clone part now. - if(!track) - { + + if(!track) // A clone was not created from any matching + { // part. Create a non-clone part now. xml.skip("part"); return 0; } @@ -387,6 +340,7 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) e.move( -npart->tick() ); int tick = e.tick(); + // DELETETHIS 7 // Do not discard events belonging to clone parts, // at least not yet. A later clone might have a longer, // fully accommodating part length! @@ -396,7 +350,6 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) // No choice but to accept all events past 0. if(tick < 0) { - //printf("readClone: warning: event not in part: %d - %d -%d, discarded\n", printf("readClone: warning: event at tick:%d not in part:%s, discarded\n", tick, npart->name().toLatin1().constData()); } @@ -405,8 +358,7 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) npart->events()->add(e); } } - else - // ...Otherwise a clone was created, so we don't need the events. + else // ...Otherwise a clone was created, so we don't need the events. xml.skip(tag); } else @@ -421,7 +373,7 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) else if (tag == "cloneId") { id = xml.s2().toInt(); - //if(id != -1) + //if(id != -1) DELETETHIS 19 //{ // for(iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) // { @@ -447,7 +399,7 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) if(!uuid_is_null(uuid)) { uuidvalid = true; - /* + /* DELETETHIS 50 for(iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) { // Is a matching part found in the clone list? @@ -517,7 +469,6 @@ Part* readXmlPart(Xml& xml, Track* track, bool doClone, bool toTrack) // we can have 'Paste Clone' feature. //--------------------------------------------------------- -//void Part::write(int level, Xml& xml) const void Part::write(int level, Xml& xml, bool isCopy, bool forceWavePaths) const { const EventList* el = cevents(); @@ -529,28 +480,19 @@ void Part::write(int level, Xml& xml, bool isCopy, bool forceWavePaths) const if(isCopy) { - //for(iClone i = copyCloneList.begin(); i != copyCloneList.end(); ++i) for(iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) { - //if(i->el == el) { if(i->cp->cevents() == el) { - //id = i->id; uuid_copy(uuid, i->uuid); dumpEvents = false; break; } } - //if(id == -1) if(uuid_is_null(uuid)) { - //id = copyCloneList.size(); - //id = MusEGlobal::cloneList.size(); - //ClonePart cp(el, id); - //ClonePart cp(this, id); ClonePart cp(this); uuid_copy(uuid, cp.uuid); - //copyCloneList.push_back(cp); MusEGlobal::cloneList.push_back(cp); } } @@ -560,22 +502,17 @@ void Part::write(int level, Xml& xml, bool isCopy, bool forceWavePaths) const { for (iClone i = MusEGlobal::cloneList.begin(); i != MusEGlobal::cloneList.end(); ++i) { - //if (i->el == el) { if (i->cp->cevents() == el) { id = i->id; - //uuid_copy(id, i->uid); dumpEvents = false; break; } } if (id == -1) - //if(uuid_is_null(id)) { id = MusEGlobal::cloneList.size(); - //ClonePart cp(el, id); ClonePart cp(this, id); - //ClonePart cp(this); MusEGlobal::cloneList.push_back(cp); } } @@ -588,9 +525,7 @@ void Part::write(int level, Xml& xml, bool isCopy, bool forceWavePaths) const char sid[40]; // uuid string is 36 chars. Try 40 for good luck. sid[0] = 0; uuid_unparse_lower(uuid, sid); - //if(midi) - // xml.nput(level, "begin(); e != el->end(); ++e) - //e->second.write(level, xml, *this); e->second.write(level, xml, *this, forceWavePaths); } xml.etag(level, "part"); } +// DELETETHIS 280! whoa! /* //--------------------------------------------------------- // Part::read @@ -920,7 +847,6 @@ void Song::writeFont(int level, Xml& xml, const char* name, const QFont& font) const { xml.nput(level, "<%s family=\"%s\" size=\"%d\"", - //name, font.family().toLatin1().constData(), font.pointSize()); name, Xml::xmlString(font.family()).toLatin1().constData(), font.pointSize()); if (font.weight() != QFont::Normal) xml.nput(" weight=\"%d\"", font.weight()); @@ -1183,33 +1109,18 @@ void Song::write(int level, Xml& xml) const (*i)->write(level, xml); // write routing - for (ciTrack i = _tracks.begin(); i != _tracks.end(); ++i) { - - // p3.3.38 Changed - //if ((*i)->isMidiTrack()) - // continue; - //MusECore::WaveTrack* track = (MusECore::WaveTrack*)(*i); - //track->writeRouting(level, xml); - + for (ciTrack i = _tracks.begin(); i != _tracks.end(); ++i) (*i)->writeRouting(level, xml); - } // Write midi device routing. - for (iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) { - //MidiJackDevice* mjd = dynamic_cast(*i); - //if (!mjd) - // continue; - //mjd->writeRouting(level, xml); + for (iMidiDevice i = MusEGlobal::midiDevices.begin(); i != MusEGlobal::midiDevices.end(); ++i) (*i)->writeRouting(level, xml); - } - // p3.3.49 Write midi port routing. - for (int i = 0; i < MIDI_PORTS; ++i) { + // Write midi port routing. + for (int i = 0; i < MIDI_PORTS; ++i) MusEGlobal::midiPorts[i].writeRouting(level, xml); - } MusEGlobal::tempomap.write(level, xml); - ///sigmap.write(level, xml); AL::sigmap.write(level, xml); MusEGlobal::keymap.write(level, xml); _markerList->write(level, xml); @@ -1386,7 +1297,7 @@ void MusE::readToplevels(MusECore::Xml& xml) void MusE::readCtrl(MusECore::Xml&, int /*prt*/, int /*channel*/) { -#if 0 +#if 0 // DELETETHIS 30. delete the whole function? ChannelState* iState = MusEGlobal::midiPorts[prt].iState(channel); int idx = 0; @@ -1410,7 +1321,6 @@ void MusE::readCtrl(MusECore::Xml&, int /*prt*/, int /*channel*/) case MusECore::Xml::TagEnd: if (xml.s1() == "ctrl") { iState->controller[idx] = val; -// printf("%d %d ctrl %d val %d\n", prt, channel, idx, val); return; } default: @@ -1427,7 +1337,6 @@ void MusE::readCtrl(MusECore::Xml&, int /*prt*/, int /*channel*/) void MusE::readMidichannel(MusECore::Xml& xml, int prt) { int channel = 0; -// MidiPort* port = &MusEGlobal::midiPorts[prt]; for (;;) { MusECore::Xml::Token token = xml.parse(); @@ -1438,7 +1347,7 @@ void MusE::readMidichannel(MusECore::Xml& xml, int prt) return; case MusECore::Xml::TagStart: if (tag == "pitch") { -//TODO port->setCtrl(channel, 0, CTRL_PITCH, xml.parseInt()); +//TODO port->setCtrl(channel, 0, CTRL_PITCH, xml.parseInt()); DELETETHIS? and below } else if (tag == "program") { //TODO port->setCtrl(channel, 0, CTRL_PROGRAM, xml.parseInt()); @@ -1507,6 +1416,9 @@ void MusE::readMidiport(MusECore::Xml& xml) void MusE::read(MusECore::Xml& xml, bool doReadMidiPorts, bool isTemplate) { bool skipmode = true; + + writeTopwinState=true; + for (;;) { if (progress) progress->setValue(progress->value()+1); @@ -1563,6 +1475,14 @@ void MusE::read(MusECore::Xml& xml, bool doReadMidiPorts, bool isTemplate) readStatusMidiInputTransformPlugin(xml); else if (tag == "toplevels") readToplevels(xml); + else if (tag == "no_toplevels") + { + if (!isTemplate) + writeTopwinState=false; + + xml.skip("no_toplevels"); + } + else xml.unknown("muse"); break; @@ -1588,7 +1508,7 @@ void MusE::read(MusECore::Xml& xml, bool doReadMidiPorts, bool isTemplate) // write song //--------------------------------------------------------- -void MusE::write(MusECore::Xml& xml) const +void MusE::write(MusECore::Xml& xml, bool writeTopwins) const { xml.header(); @@ -1600,7 +1520,7 @@ void MusE::write(MusECore::Xml& xml) const MusEGlobal::song->write(level, xml); - if (!toplevels.empty()) { + if (writeTopwins && !toplevels.empty()) { xml.tag(level++, "toplevels"); for (MusEGui::ciToplevel i = toplevels.begin(); i != toplevels.end(); ++i) { if ((*i)->isVisible()) @@ -1608,6 +1528,11 @@ void MusE::write(MusECore::Xml& xml) const } xml.tag(level--, "/toplevels"); } + else if (!writeTopwins) + { + xml.tag(level, "no_toplevels"); + xml.etag(level, "no_toplevels"); + } xml.tag(level, "/muse"); } diff --git a/muse2/muse/stringparam.h b/muse2/muse/stringparam.h index 448c61b6..2ab2ba37 100644 --- a/muse2/muse/stringparam.h +++ b/muse2/muse/stringparam.h @@ -33,21 +33,19 @@ namespace MusECore { class Xml; -//typedef std::pair StringParamMapItem; typedef std::map::iterator iStringParamMap; typedef std::map::const_iterator ciStringParamMap; class StringParamMap : public std::map { public: - void set(const char* /*key*/, const char* /*value*/); - void remove(const char* /*key*/); + void set(const char* key, const char* value); + void remove(const char* key); - iStringParamMap findKey(const char* /*key*/); - //int index(char* /*key*/); + iStringParamMap findKey(const char* key); - void read(Xml& /*xml*/, const QString& /*name*/); - void write(int /*level*/, Xml& /*xml*/, const char* /*name*/) const; + void read(Xml& xml, const QString& name); + void write(int level, Xml& xml, const char* name) const; }; } // namespace MusECore diff --git a/muse2/muse/structure.cpp b/muse2/muse/structure.cpp index d1d8d3a1..65489cac 100644 --- a/muse2/muse/structure.cpp +++ b/muse2/muse/structure.cpp @@ -145,7 +145,6 @@ void globalCut(bool onlySelectedTracks) TrackList* tracks = MusEGlobal::song->tracks(); for (iTrack it = tracks->begin(); it != tracks->end(); ++it) { - //MidiTrack* track = dynamic_cast(*it); Track* track = *it; if (track == 0 || (onlySelectedTracks && !track->selected())) continue; @@ -169,7 +168,6 @@ void globalCut(bool onlySelectedTracks) nPart = new WavePart(*(WavePart*)part); nPart->setLenTick(len); - // // cut Events in nPart EventList* el = nPart->events(); for (iEvent ie = el->lower_bound(len); ie != el->end(); ++ie) @@ -214,7 +212,6 @@ void globalCut(bool onlySelectedTracks) nPart = new MidiPart(*(MidiPart*)part); else nPart = new WavePart(*(WavePart*)part); - //MidiPart* nPart = new MidiPart(*(MidiPart*)part); int nt = part->tick(); nPart->setTick(nt - (rpos -lpos)); // Indicate no undo, and do port controller values but not clone parts. diff --git a/muse2/muse/style.qss b/muse2/muse/style.qss index d3eb889d..f196ff19 100644 --- a/muse2/muse/style.qss +++ b/muse2/muse/style.qss @@ -5,7 +5,7 @@ /* TODO */ -/* +/* DELETETHIS all? QLabel#midiChannelLabel { font-size: 6pt } MidiRack, EffectRack { font-size: 8pt } @@ -70,4 +70,4 @@ QLabel#M-Synth { background-color: gray; } -*/ \ No newline at end of file +*/ diff --git a/muse2/muse/sync.cpp b/muse2/muse/sync.cpp index 5cdc9729..56560a5e 100644 --- a/muse2/muse/sync.cpp +++ b/muse2/muse/sync.cpp @@ -31,18 +31,12 @@ #include "midiseq.h" #include "audio.h" #include "audiodev.h" -//#include "driver/audiodev.h" // p4.0.2 #include "gconfig.h" #include "xml.h" #include "midi.h" namespace MusEGlobal { -//int rxSyncPort = -1; // receive from all ports -//int txSyncPort = 1; -//int rxDeviceId = 0x7f; // any device -//int txDeviceId = 0x7f; // any device -//MidiSyncPort midiSyncPorts[MIDI_PORTS]; int volatile curMidiSyncInPort = -1; bool debugSync = false; @@ -50,12 +44,6 @@ bool debugSync = false; int mtcType = 1; MusECore::MTC mtcOffset; MusECore::BValue extSyncFlag(0, "extSync"); // false - MASTER, true - SLAVE -//bool genMTCSync = false; // output MTC Sync -//bool genMCSync = false; // output MidiClock Sync -//bool genMMC = false; // output Midi Machine Control -//bool acceptMTC = false; -//bool acceptMC = true; -//bool acceptMMC = true; MusECore::BValue useJackTransport(0,"useJackTransport"); bool volatile jackTransportMaster = true; @@ -65,16 +53,14 @@ static bool mtcValid; static int mtcLost; static bool mtcSync; // receive complete mtc frame? -// p3.3.28 static bool playPendingFirstClock = false; unsigned int syncSendFirstClockDelay = 1; // In milliseconds. -//static int lastStoppedBeat = 0; static unsigned int curExtMidiSyncTick = 0; unsigned int volatile lastExtMidiSyncTick = 0; double volatile curExtMidiSyncTime = 0.0; double volatile lastExtMidiSyncTime = 0.0; -// Not used yet. +// Not used yet. DELETETHIS? // static bool mcStart = false; // static int mcStartTick; @@ -124,7 +110,6 @@ MidiSyncInfo::MidiSyncInfo() _MTCDetect = false; _recMTCtype = 0; _recRewOnStart = true; - //_sendContNotStart = false; _actDetectBits = 0; for(int i = 0; i < MIDI_CHANNELS; ++i) { @@ -140,8 +125,6 @@ MidiSyncInfo::MidiSyncInfo() MidiSyncInfo& MidiSyncInfo::operator=(const MidiSyncInfo &sp) { - //_port = sp._port; - copyParams(sp); _lastClkTime = sp._lastClkTime; @@ -175,8 +158,6 @@ MidiSyncInfo& MidiSyncInfo::operator=(const MidiSyncInfo &sp) MidiSyncInfo& MidiSyncInfo::copyParams(const MidiSyncInfo &sp) { - //_port = sp._port; - _idOut = sp._idOut; _idIn = sp._idIn; _sendMC = sp._sendMC; @@ -188,7 +169,6 @@ MidiSyncInfo& MidiSyncInfo::copyParams(const MidiSyncInfo &sp) _recMMC = sp._recMMC; _recMTC = sp._recMTC; _recRewOnStart = sp._recRewOnStart; - //_sendContNotStart = sp._sendContNotStart; return *this; } @@ -235,7 +215,7 @@ void MidiSyncInfo::setTime() if(_MRTDetect && (t - _lastMRTTime) >= 1.0) // Set detect indicator timeout to about 1 second. { _MRTDetect = false; - // Give up the current midi sync in port number if we took it... + // Give up the current midi sync in port number if we took it... DELETETHIS 3 //if(MusEGlobal::curMidiSyncInPort == _port) // MusEGlobal::curMidiSyncInPort = -1; } @@ -249,7 +229,7 @@ void MidiSyncInfo::setTime() if(_MMCDetect && (t - _lastMMCTime) >= 1.0) // Set detect indicator timeout to about 1 second. { _MMCDetect = false; - // Give up the current midi sync in port number if we took it... + // Give up the current midi sync in port number if we took it... DELETETHIS 3 //if(MusEGlobal::curMidiSyncInPort == _port) // MusEGlobal::curMidiSyncInPort = -1; } @@ -279,7 +259,6 @@ void MidiSyncInfo::setTime() if(_actDetect[i] && (t - _lastActTime[i]) >= 1.0) // Set detect indicator timeout to about 1 second. { _actDetect[i] = false; - //_actDetectBits &= ~bitShiftLU[i]; _actDetectBits &= ~(1 << i); } } @@ -304,6 +283,7 @@ void MidiSyncInfo::setMCIn(const bool v) void MidiSyncInfo::setMRTIn(const bool v) { _recMRT = v; + // DELETETHIS 4 // If sync receive was turned off, clear the current midi sync in port number so another port can grab it. //if(!_recMRT && _port != -1 && MusEGlobal::curMidiSyncInPort == _port) // MusEGlobal::curMidiSyncInPort = -1; @@ -316,6 +296,7 @@ void MidiSyncInfo::setMRTIn(const bool v) void MidiSyncInfo::setMMCIn(const bool v) { _recMMC = v; + // DELETETHIS 4 // If sync receive was turned off, clear the current midi sync in port number so another port can grab it. //if(!_recMMC && _port != -1 && MusEGlobal::curMidiSyncInPort == _port) // MusEGlobal::curMidiSyncInPort = -1; @@ -364,7 +345,7 @@ void MidiSyncInfo::trigMRTDetect() { _MRTDetect = true; _MRTTrig = true; - // Set the current midi sync in port number if it's not taken... + // Set the current midi sync in port number if it's not taken... //DELETETHIS 3 //if(_recMRT && MusEGlobal::curMidiSyncInPort == -1) // MusEGlobal::curMidiSyncInPort = _port; } @@ -377,7 +358,7 @@ void MidiSyncInfo::trigMMCDetect() { _MMCDetect = true; _MMCTrig = true; - // Set the current midi sync in port number if it's not taken... + // Set the current midi sync in port number if it's not taken... DELETETHIS 3 //if(_recMMC && MusEGlobal::curMidiSyncInPort == -1) // MusEGlobal::curMidiSyncInPort = _port; } @@ -416,7 +397,6 @@ void MidiSyncInfo::trigActDetect(const int ch) if(ch < 0 || ch >= MIDI_CHANNELS) return; - //_actDetectBits |= bitShiftLU[ch]; _actDetectBits |= (1 << ch); _actDetect[ch] = true; _actTrig[ch] = true; @@ -429,7 +409,7 @@ void MidiSyncInfo::trigActDetect(const int ch) bool MidiSyncInfo::isDefault() const { return(_idOut == 127 && _idIn == 127 && !_sendMC && !_sendMRT && !_sendMMC && !_sendMTC && - /* !_sendContNotStart && */ !_recMC && !_recMRT && !_recMMC && !_recMTC && _recRewOnStart); + !_recMC && !_recMRT && !_recMMC && !_recMTC && _recRewOnStart); } //--------------------------------------------------------- @@ -458,8 +438,6 @@ void MidiSyncInfo::read(Xml& xml) _sendMMC = xml.parseInt(); else if (tag == "sendMTC") _sendMTC = xml.parseInt(); - //else if (tag == "sendContNotStart") - // _sendContNotStart = xml.parseInt(); else if (tag == "recMC") _recMC = xml.parseInt(); else if (tag == "recMRT") @@ -486,26 +464,13 @@ void MidiSyncInfo::read(Xml& xml) // write //--------------------------------------------------------- -//void MidiSyncInfo::write(int level, Xml& xml, MidiDevice* md) void MidiSyncInfo::write(int level, Xml& xml) { - //if(!md) - // return; - - // All defaults? Nothing to write. - //if(_idOut == 127 && _idIn == 127 && !_sendMC && !_sendMRT && !_sendMMC && !_sendMTC && - // /* !_sendContNotStart && */ !_recMC && !_recMRT && !_recMMC && !_recMTC && _recRewOnStart) - // return; if(isDefault()) return; xml.tag(level++, "midiSyncInfo"); - //xml.intTag(level, "idx", idx); - //xml.intTag(level++, "midiSyncPort", idx); - //xml.tag(level++, "midiSyncInfo idx=\"%d\"", idx); - - //xml.strTag(level, "device", md->name()); - + if(_idOut != 127) xml.intTag(level, "idOut", _idOut); if(_idIn != 127) @@ -515,12 +480,10 @@ void MidiSyncInfo::write(int level, Xml& xml) xml.intTag(level, "sendMC", true); if(_sendMRT) xml.intTag(level, "sendMRT", true); - if(_sendMRT) + if(_sendMMC) xml.intTag(level, "sendMMC", true); if(_sendMTC) xml.intTag(level, "sendMTC", true); - //if(_sendContNotStart) - // xml.intTag(level, "sendContNotStart", true); if(_recMC) xml.intTag(level, "recMC", true); @@ -541,7 +504,6 @@ void MidiSyncInfo::write(int level, Xml& xml) // Midi Machine Control Input received //--------------------------------------------------------- -//void MidiSeq::mmcInput(const unsigned char* p, int n) void MidiSeq::mmcInput(int port, const unsigned char* p, int n) { if (MusEGlobal::debugSync) @@ -560,10 +522,6 @@ void MidiSeq::mmcInput(int port, const unsigned char* p, int n) if(!msync.MMCIn()) return; - //if (!(MusEGlobal::extSyncFlag.value() && acceptMMC)) - //if(!MusEGlobal::extSyncFlag.value()) - // return; - switch(p[3]) { case 1: if (MusEGlobal::debugSync) @@ -571,12 +529,10 @@ void MidiSeq::mmcInput(int port, const unsigned char* p, int n) MusEGlobal::playPendingFirstClock = false; - //if ((state == PLAY || state == PRECOUNT)) if (MusEGlobal::audio->isPlaying()) MusEGlobal::audio->msgPlay(false); playStateExt = false; alignAllTicks(); - //stopPlay(); break; case 2: if (MusEGlobal::debugSync) @@ -588,7 +544,6 @@ void MidiSeq::mmcInput(int port, const unsigned char* p, int n) MusEGlobal::mtcValid = false; MusEGlobal::mtcLost = 0; MusEGlobal::mtcSync = false; - //startPlay(); alignAllTicks(); MusEGlobal::audio->msgPlay(true); playStateExt = true; @@ -623,23 +578,16 @@ void MidiSeq::mmcInput(int port, const unsigned char* p, int n) if (!MusEGlobal::checkAudioDevice()) return; MTC mtc(p[6] & 0x1f, p[7], p[8], p[9], p[10]); int type = (p[6] >> 5) & 3; - //int mmcPos = MusEGlobal::tempomap.frame2tick(lrint(mtc.time()*MusEGlobal::sampleRate)); - //int mmcPos = lrint(mtc.time()*MusEGlobal::sampleRate); int mmcPos = lrint(mtc.time(type) * MusEGlobal::sampleRate); - //Pos tp(mmcPos, true); Pos tp(mmcPos, false); - //MusEGlobal::audioDevice->seekTransport(tp.frame()); MusEGlobal::audioDevice->seekTransport(tp); alignAllTicks(); - //seek(tp); if (MusEGlobal::debugSync) { - //printf("MMC: %f %d seek ", mtc.time(), mmcPos); printf("MMC: LOCATE mtc type:%d time:%lf frame:%d mtc: ", type, mtc.time(), mmcPos); mtc.print(); printf("\n"); } - //write(sigFd, "G", 1); break; } // fall through @@ -653,12 +601,9 @@ void MidiSeq::mmcInput(int port, const unsigned char* p, int n) // process Quarter Frame Message //--------------------------------------------------------- -//void MidiSeq::mtcInputQuarter(int, unsigned char c) void MidiSeq::mtcInputQuarter(int port, unsigned char c) { static int hour, min, sec, frame; - - //printf("MidiSeq::mtcInputQuarter c:%h\n", c); int valL = c & 0xf; int valH = valL << 4; @@ -727,9 +672,7 @@ void MidiSeq::mtcInputQuarter(int port, unsigned char c) } else if (MusEGlobal::mtcValid && (MusEGlobal::mtcLost == 0)) { - //MusEGlobal::mtcCurTime.incQuarter(); MusEGlobal::mtcCurTime.incQuarter(type); - //MusEGlobal::mtcSyncMsg(MusEGlobal::mtcCurTime, type, false); } } @@ -738,13 +681,10 @@ void MidiSeq::mtcInputQuarter(int port, unsigned char c) // process Frame Message //--------------------------------------------------------- -//void MidiSeq::mtcInputFull(const unsigned char* p, int n) void MidiSeq::mtcInputFull(int port, const unsigned char* p, int n) { if (MusEGlobal::debugSync) printf("mtcInputFull\n"); - //if (!MusEGlobal::extSyncFlag.value()) - // return; if (p[3] != 1) { if (p[3] != 2) { // silently ignore user bits @@ -779,10 +719,8 @@ void MidiSeq::mtcInputFull(int port, const unsigned char* p, int n) msync.setRecMTCtype(type); msync.trigMTCDetect(); // MTC in not turned on? Forget it. - //if(MusEGlobal::extSyncFlag.value() && msync.MTCIn()) if(msync.MTCIn()) { - //Pos tp(lrint(MusEGlobal::mtcCurTime.time() * MusEGlobal::sampleRate), false); Pos tp(lrint(MusEGlobal::mtcCurTime.time(type) * MusEGlobal::sampleRate), false); MusEGlobal::audioDevice->seekTransport(tp); alignAllTicks(); @@ -794,10 +732,8 @@ void MidiSeq::mtcInputFull(int port, const unsigned char* p, int n) // nonRealtimeSystemSysex //--------------------------------------------------------- -//void MidiSeq::nonRealtimeSystemSysex(const unsigned char* p, int n) void MidiSeq::nonRealtimeSystemSysex(int /*port*/, const unsigned char* p, int n) { -// int chan = p[2]; switch(p[3]) { case 4: printf("NRT Setup\n"); @@ -822,30 +758,23 @@ void MidiSeq::setSongPosition(int port, int midiBeat) if (MusEGlobal::midiInputTrace) printf("set song position port:%d %d\n", port, midiBeat); - //MusEGlobal::midiPorts[port].syncInfo().trigMCSyncDetect(); MusEGlobal::midiPorts[port].syncInfo().trigMRTDetect(); - //if (!MusEGlobal::extSyncFlag.value()) - // External sync not on? Clock in not turned on? - //if(!MusEGlobal::extSyncFlag.value() || !MusEGlobal::midiPorts[port].syncInfo().MCIn()) if(!MusEGlobal::extSyncFlag.value() || !MusEGlobal::midiPorts[port].syncInfo().MRTIn()) return; // Re-transmit song position to other devices if clock out turned on. for(int p = 0; p < MIDI_PORTS; ++p) - //if(p != port && MusEGlobal::midiPorts[p].syncInfo().MCOut()) if(p != port && MusEGlobal::midiPorts[p].syncInfo().MRTOut()) MusEGlobal::midiPorts[p].sendSongpos(midiBeat); MusEGlobal::curExtMidiSyncTick = (MusEGlobal::config.division * midiBeat) / 4; MusEGlobal::lastExtMidiSyncTick = MusEGlobal::curExtMidiSyncTick; - //Pos pos((MusEGlobal::config.division * midiBeat) / 4, true); Pos pos(MusEGlobal::curExtMidiSyncTick, true); if (!MusEGlobal::checkAudioDevice()) return; - //MusEGlobal::audioDevice->seekTransport(pos.frame()); MusEGlobal::audioDevice->seekTransport(pos); alignAllTicks(pos.frame()); if (MusEGlobal::debugSync) @@ -859,8 +788,6 @@ void MidiSeq::setSongPosition(int port, int midiBeat) //--------------------------------------------------------- void MidiSeq::alignAllTicks(int frameOverride) { - //printf("alignAllTicks audioDriver->framePos=%d, audio->pos().frame()=%d\n", - // MusEGlobal::audioDevice->framePos(), audio->pos().frame()); unsigned curFrame; if (!frameOverride) curFrame = MusEGlobal::audio->pos().frame(); @@ -906,13 +833,6 @@ void MidiSeq::realtimeSystemInput(int port, int c) if (MusEGlobal::midiInputTrace) printf("realtimeSystemInput port:%d 0x%x\n", port+1, c); - //if (MusEGlobal::midiInputTrace && (rxSyncPort != port) && rxSyncPort != -1) { - // if (MusEGlobal::debugSync) - // printf("rxSyncPort configured as %d; received sync from port %d\n", - // rxSyncPort, port); - // return; - // } - MidiPort* mp = &MusEGlobal::midiPorts[port]; // Trigger on any tick, clock, or realtime command. @@ -944,8 +864,6 @@ void MidiSeq::realtimeSystemInput(int port, int c) if(port != MusEGlobal::curMidiSyncInPort) break; - //printf("midi clock:%f\n", curTime()); - // Re-transmit clock to other devices if clock out turned on. // Must be careful not to allow more than one clock input at a time. // Would re-transmit mixture of multiple clocks - confusing receivers. @@ -955,7 +873,6 @@ void MidiSeq::realtimeSystemInput(int port, int c) if(p != port && MusEGlobal::midiPorts[p].syncInfo().MCOut()) MusEGlobal::midiPorts[p].sendClock(); - // p3.3.28 if(MusEGlobal::playPendingFirstClock) { MusEGlobal::playPendingFirstClock = false; @@ -965,10 +882,9 @@ void MidiSeq::realtimeSystemInput(int port, int c) if(!MusEGlobal::audio->isPlaying()) MusEGlobal::audioDevice->startTransport(); } - //else + //else DELETETHIS? // This part will be run on the second and subsequent clocks, after start. // Can't check audio state, might not be playing yet, we might miss some increments. - //if(MusEGlobal::audio->isPlaying()) if(playStateExt) { MusEGlobal::lastExtMidiSyncTime = MusEGlobal::curExtMidiSyncTime; @@ -979,7 +895,7 @@ void MidiSeq::realtimeSystemInput(int port, int c) MusEGlobal::curExtMidiSyncTick += div; } -//BEGIN : Original code: +//BEGIN : Original code: DELETETHIS 250 /* double mclock0 = curTime(); // Difference in time last 2 rounds: @@ -1230,6 +1146,7 @@ void MidiSeq::realtimeSystemInput(int port, int c) } break; case ME_TICK: // midi tick (every 10 msec) + //DELETETHIS 6 // FIXME: Unfinished? mcStartTick is uninitialized and Song::setPos doesn't set it either. Dangerous to allow this. //if (mcStart) { // song->setPos(0, mcStartTick); @@ -1240,10 +1157,8 @@ void MidiSeq::realtimeSystemInput(int port, int c) case ME_START: // start // Re-transmit start to other devices if clock out turned on. for(int p = 0; p < MIDI_PORTS; ++p) - //if(p != port && MusEGlobal::midiPorts[p].syncInfo().MCOut()) if(p != port && MusEGlobal::midiPorts[p].syncInfo().MRTOut()) { - // p3.3.31 // If we aren't rewinding on start, there's no point in re-sending start. // Re-send continue instead, for consistency. if(MusEGlobal::midiPorts[port].syncInfo().recRewOnStart()) @@ -1254,34 +1169,26 @@ void MidiSeq::realtimeSystemInput(int port, int c) if (MusEGlobal::debugSync) printf(" start\n"); - //printf("midi start:%f\n", curTime()); + // DELETETHIS, remove the wrapping if(true) if (1 /* !MusEGlobal::audio->isPlaying()*/ /*state == IDLE*/) { if (!MusEGlobal::checkAudioDevice()) return; - // p3.3.31 // Rew on start option. if(MusEGlobal::midiPorts[port].syncInfo().recRewOnStart()) { MusEGlobal::curExtMidiSyncTick = 0; MusEGlobal::lastExtMidiSyncTick = MusEGlobal::curExtMidiSyncTick; - //MusEGlobal::audioDevice->seekTransport(0); MusEGlobal::audioDevice->seekTransport(Pos(0, false)); } - //unsigned curFrame = MusEGlobal::audio->curFrame(); - //if (MusEGlobal::debugSync) - // printf(" curFrame=%d\n", curFrame); - alignAllTicks(); - //if (MusEGlobal::debugSync) - // printf(" curFrame: %d curTick: %d tempo: %d\n", curFrame, recTick, MusEGlobal::tempomap.tempo(0)); storedtimediffs = 0; for (int i=0; i<24; i++) timediff[i] = 0.0; - // p3.3.26 1/23/10 + // p3.3.26 1/23/10 DELETETHIS 6 // Changed because msgPlay calls MusEGlobal::audioDevice->seekTransport(song->cPos()) // and song->cPos() may not be changed to 0 yet, causing tranport not to go to 0. //MusEGlobal::audio->msgPlay(true); @@ -1296,7 +1203,6 @@ void MidiSeq::realtimeSystemInput(int port, int c) case ME_CONTINUE: // continue // Re-transmit continue to other devices if clock out turned on. for(int p = 0; p < MIDI_PORTS; ++p) - //if(p != port && MusEGlobal::midiPorts[p].syncInfo().MCOut()) if(p != port && MusEGlobal::midiPorts[p].syncInfo().MRTOut()) MusEGlobal::midiPorts[p].sendContinue(); @@ -1321,7 +1227,6 @@ void MidiSeq::realtimeSystemInput(int port, int c) break; case ME_STOP: // stop { - // p3.3.35 // Stop the increment right away. MusEGlobal::midiExtSyncTicks = 0; playStateExt = false; @@ -1329,25 +1234,17 @@ void MidiSeq::realtimeSystemInput(int port, int c) // Re-transmit stop to other devices if clock out turned on. for(int p = 0; p < MIDI_PORTS; ++p) - //if(p != port && MusEGlobal::midiPorts[p].syncInfo().MCOut()) if(p != port && MusEGlobal::midiPorts[p].syncInfo().MRTOut()) MusEGlobal::midiPorts[p].sendStop(); - //MusEGlobal::playPendingFirstClock = false; - - //lastStoppedBeat = (MusEGlobal::audio->tickPos() * 4) / MusEGlobal::config.division; - //MusEGlobal::curExtMidiSyncTick = (MusEGlobal::config.division * lastStoppedBeat) / 4; - - //printf("stop:%f\n", curTime()); - if (MusEGlobal::audio->isPlaying() /*state == PLAY*/) { + if (MusEGlobal::audio->isPlaying()) MusEGlobal::audio->msgPlay(false); - //playStateExt = false; - } if (MusEGlobal::debugSync) printf("realtimeSystemInput stop\n"); + //DELETETHIS 7 // Just in case the process still runs a cycle or two and causes the // audio tick position to increment, reset the incrementer and force // the transport position to what the hardware thinks is the current position. @@ -1358,7 +1255,7 @@ void MidiSeq::realtimeSystemInput(int port, int c) } break; - //case 0xfd: // unknown + //case 0xfd: // unknown DELETETHIS 3 //case ME_SENSE: // active sensing //case ME_META: // system reset (reset is 0xff same enumeration as file meta event) default: @@ -1381,10 +1278,7 @@ void MidiSeq::mtcSyncMsg(const MTC& mtc, int type, bool seekFlag) if (MusEGlobal::debugSync) printf("MidiSeq::MusEGlobal::mtcSyncMsg time:%lf stime:%lf seekFlag:%d\n", time, stime, seekFlag); - if (seekFlag && MusEGlobal::audio->isRunning() /*state == START_PLAY*/) { -// int tick = MusEGlobal::tempomap.time2tick(time); - //state = PLAY; - //write(sigFd, "1", 1); // say PLAY to gui + if (seekFlag && MusEGlobal::audio->isRunning()) { if (!MusEGlobal::checkAudioDevice()) return; if (MusEGlobal::debugSync) printf("MidiSeq::MusEGlobal::mtcSyncMsg starting transport.\n"); @@ -1392,7 +1286,7 @@ void MidiSeq::mtcSyncMsg(const MTC& mtc, int type, bool seekFlag) return; } - /*if (tempoSN != MusEGlobal::tempomap.tempoSN()) { + /*if (tempoSN != MusEGlobal::tempomap.tempoSN()) { DELETETHIS 13 double cpos = MusEGlobal::tempomap.tick2time(_midiTick, 0); samplePosStart = samplePos - lrint(cpos * MusEGlobal::sampleRate); rtcTickStart = rtcTick - lrint(cpos * realRtcTicks); diff --git a/muse2/muse/sync.h b/muse2/muse/sync.h index 8aa1084d..41ad34ad 100644 --- a/muse2/muse/sync.h +++ b/muse2/muse/sync.h @@ -31,9 +31,8 @@ namespace MusECore { class Xml; -//class MidiDevice; -//class MidiSyncPort + class MidiSyncInfo { private: @@ -54,7 +53,6 @@ class MidiSyncInfo int _recMTCtype; bool _recRewOnStart; - //bool _sendContNotStart; double _lastClkTime; double _lastTickTime; @@ -113,8 +111,6 @@ class MidiSyncInfo bool recRewOnStart() const { return _recRewOnStart; } void setRecRewOnStart(const bool v) { _recRewOnStart = v; } - //bool sendContNotStart() const { return _sendContNotStart; } - //void setSendContNotStart(const bool v) { _sendContNotStart = v; } bool MCSyncDetect() const { return _clockDetect; } void trigMCSyncDetect(); @@ -139,7 +135,6 @@ class MidiSyncInfo bool isDefault() const; void read(Xml& xml); - //void write(int level, Xml& xml, MidiDevice* md); void write(int level, Xml& xml); }; @@ -147,24 +142,11 @@ class MidiSyncInfo namespace MusEGlobal { -//extern MidiSync midiSyncPorts[MIDI_PORTS]; - extern bool debugSync; -//extern int rxSyncPort; -//extern int txSyncPort; -//extern int rxDeviceId; -//extern int txDeviceId; - extern int mtcType; extern MusECore::MTC mtcOffset; extern MusECore::BValue extSyncFlag; -//extern bool genMTCSync; // output MTC Sync -//extern bool genMCSync; // output MidiClock Sync -//extern bool genMMC; // output Midi Machine Control -//extern bool acceptMTC; -//extern bool acceptMC; -//extern bool acceptMMC; extern int volatile curMidiSyncInPort; extern MusECore::BValue useJackTransport; extern bool volatile jackTransportMaster; diff --git a/muse2/muse/synth.cpp b/muse2/muse/synth.cpp index 7ab18bda..cf065bbb 100644 --- a/muse2/muse/synth.cpp +++ b/muse2/muse/synth.cpp @@ -33,7 +33,6 @@ #include #include -//#include #include "app.h" #include "arranger.h" @@ -50,7 +49,6 @@ #include "audio.h" #include "midiseq.h" #include "midictrl.h" -//#include "stringparam.h" #include "popupmenu.h" #include "globaldefs.h" @@ -76,26 +74,6 @@ Synth::Type string2SynthType(const QString& type) return Synth::SYNTH_TYPE_END; } -/* -//--------------------------------------------------------- -// description -//--------------------------------------------------------- - -const char* MessSynth::description() const - { - return _descr ? _descr->description : ""; - } - -//--------------------------------------------------------- -// version -//--------------------------------------------------------- - -const char* MessSynth::version() const - { - return _descr ? _descr->version : ""; - } -*/ - bool MessSynthIF::nativeGuiVisible() const { return _mess ? _mess->nativeGuiVisible() : false; @@ -186,7 +164,6 @@ static SynthI* createSynthInstance(const QString& sclass, const QString& label, si = new SynthI(); QString n; n.setNum(s->instances()); - //QString instance_name = s->baseName() + "-" + n; QString instance_name = s->name() + "-" + n; if (si->initInstance(s, instance_name)) { @@ -203,10 +180,6 @@ static SynthI* createSynthInstance(const QString& sclass, const QString& label, // Synth //--------------------------------------------------------- -//Synth::Synth(const QFileInfo& fi) -// : info(fi) -//Synth::Synth(const QFileInfo& fi, QString label) -// : info(fi), _name(label) Synth::Synth(const QFileInfo& fi, QString label, QString descr, QString maker, QString ver) : info(fi), _name(label), _description(descr), _maker(maker), _version(ver) { @@ -217,15 +190,10 @@ Synth::Synth(const QFileInfo& fi, QString label, QString descr, QString maker, Q // instantiate //--------------------------------------------------------- -//void* MessSynth::instantiate() void* MessSynth::instantiate(const QString& instanceName) { ++_instances; - //QString n; - //n.setNum(_instances); - //QString instanceName = baseName() + "-" + n; - MusEGlobal::doSetuid(); QByteArray ba = info.filePath().toLatin1(); const char* path = ba.constData(); @@ -326,13 +294,17 @@ void SynthI::close() //--------------------------------------------------------- bool SynthI::putEvent(const MidiPlayEvent& ev) -//bool SynthI::putMidiEvent(const MidiPlayEvent& ev) { if(_writeEnable) + { + if (MusEGlobal::midiOutputTrace) + { + printf("MidiOut: Synth: <%s>: ", name().toLatin1().constData()); + ev.dump(); + } return _sif->putEvent(ev); - - // Hmm, act as if the event went through? - //return true; + } + return false; } @@ -373,10 +345,8 @@ void SynthI::currentProg(unsigned long *prog, unsigned long *bankL, unsigned lon // init //--------------------------------------------------------- -//bool MessSynthIF::init(Synth* s) bool MessSynthIF::init(Synth* s, SynthI* si) { - //_mess = (Mess*)s->instantiate(); _mess = (Mess*)((MessSynth*)s)->instantiate(si->name()); return (_mess == 0); @@ -397,11 +367,8 @@ int MessSynthIF::totalInChannels() const return 0; } -//SynthIF* MessSynth::createSIF() const SynthIF* MessSynth::createSIF(SynthI* si) { - //return new MessSynthIF(si); - MessSynthIF* sif = new MessSynthIF(si); sif->init(this, si); return sif; @@ -415,17 +382,11 @@ SynthIF* MessSynth::createSIF(SynthI* si) bool SynthI::initInstance(Synth* s, const QString& instanceName) { synthesizer = s; - //sif = s->createSIF(); - //_sif = s->createSIF(this); - - //sif->init(s); setName(instanceName); // set midi device name setIName(instanceName); // set instrument name _sif = s->createSIF(this); - // p3.3.38 - //AudioTrack::setChannels(_sif->channels()); AudioTrack::setTotalOutChannels(_sif->totalOutChannels()); AudioTrack::setTotalInChannels(_sif->totalInChannels()); @@ -442,10 +403,8 @@ bool SynthI::initInstance(Synth* s, const QString& instanceName) int max; int initval = CTRL_VAL_UNKNOWN; id = _sif->getControllerInfo(id, &name, &ctrl, &min, &max, &initval); -// printf("looking for params\n"); if (id == 0) break; -// printf("got parameter:: %s\n", name); // Added by T356. Override existing program controller. @@ -543,8 +502,8 @@ void SynthI::deactivate2() void SynthI::deactivate3() { _sif->deactivate3(); - // Moved below by Tim. p3.3.14 - //synthesizer->incInstances(-1); + + //synthesizer->incInstances(-1); // Moved below by Tim. p3.3.14 if(MusEGlobal::debugMsg) printf("SynthI::deactivate3 deleting _sif...\n"); @@ -596,17 +555,13 @@ void initMidiSynth() while(it!=list.end()) { fi = &*it; - //MusEGlobal::doSetuid(); QByteArray ba = fi->filePath().toLatin1(); const char* path = ba.constData(); // load Synti dll - //printf("initMidiSynth: dlopen file:%s name:%s desc:%s\n", fi->filePath().toLatin1().constData(), QString(descr->name), QString(descr->description), QString(""), QString(descr->version))); void* handle = dlopen(path, RTLD_NOW); if (handle == 0) { fprintf(stderr, "initMidiSynth: MESS dlopen(%s) failed: %s\n", path, dlerror()); - //MusEGlobal::undoSetuid(); - //return 0; ++it; continue; } @@ -622,8 +577,6 @@ void initMidiSynth() "library file \"%s\": %s.\n" "Are you sure this is a MESS plugin file?\n", path, txt); - //MusEGlobal::undoSetuid(); - //return 0; } #endif dlclose(handle); @@ -633,19 +586,11 @@ void initMidiSynth() const MESS* descr = msynth(); if (descr == 0) { fprintf(stderr, "initMidiSynth: no MESS descr found in %s\n", path); - //MusEGlobal::undoSetuid(); - //return 0; dlclose(handle); ++it; continue; } - //Mess* mess = descr->instantiate(MusEGlobal::sampleRate, muse, &museProject, instanceName.toLatin1().constData()); - //MusEGlobal::undoSetuid(); - - - - //MusEGlobal::synthis.push_back(new MessSynth(*fi)); MusEGlobal::synthis.push_back(new MessSynth(*fi, QString(descr->name), QString(descr->description), QString(""), QString(descr->version))); dlclose(handle); @@ -665,38 +610,29 @@ void initMidiSynth() SynthI* Song::createSynthI(const QString& sclass, const QString& label, Synth::Type type, Track* insertAt) { - //printf("Song::createSynthI calling ::createSynthI class:%s\n", sclass.toLatin1().constData()); - SynthI* si = createSynthInstance(sclass, label, type); if(!si) return 0; - //printf("Song::createSynthI created SynthI. Before insertTrack1...\n"); int idx = insertAt ? _tracks.index(insertAt) : -1; insertTrack1(si, idx); - //printf("Song::createSynthI after insertTrack1. Before msgInsertTrack...\n"); msgInsertTrack(si, idx, true); // add to instance list - //printf("Song::createSynthI after msgInsertTrack. Before insertTrack3...\n"); insertTrack3(si, idx); - //printf("Song::createSynthI after insertTrack3. Adding default routes...\n"); - OutputList* ol = MusEGlobal::song->outputs(); // add default route to master (first audio output) if (!ol->empty()) { AudioOutput* ao = ol->front(); - // p3.3.38 - //MusEGlobal::audio->msgAddRoute(Route(si, -1), Route(ao, -1)); - //MusEGlobal::audio->msgAddRoute(Route((AudioTrack*)si, -1), Route(ao, -1)); // Make sure the route channel and channels are valid. MusEGlobal::audio->msgAddRoute(Route((AudioTrack*)si, 0, ((AudioTrack*)si)->channels()), Route(ao, 0, ((AudioTrack*)si)->channels())); MusEGlobal::audio->msgUpdateSoloStates(); } + // DELETETHIS 5 // Now that the track has been added to the lists in insertTrack2(), // if it's a dssi synth, OSC can find the synth, and initialize (and show) its native gui. // No, initializing OSC without actually showing the gui doesn't work, at least for @@ -714,7 +650,6 @@ void SynthI::write(int level, Xml& xml) const { xml.tag(level++, "SynthI"); AudioTrack::writeProperties(level, xml); - //xml.intTag(level, "synthType", synth()->synthType()); xml.strTag(level, "synthType", synthType2String(synth()->synthType())); xml.strTag(level, "class", synth()->baseName()); @@ -739,7 +674,6 @@ void SynthI::write(int level, Xml& xml) const getGeometry(&x, &y, &w, &h); if (h || w) xml.qrectTag(level, "geometry", QRect(x, y, w, h)); - //xml.geometryTag(level, "geometry", _gui); } if (hasNativeGui()) { @@ -851,7 +785,6 @@ void SynthI::read(Xml& xml) return; case Xml::TagStart: if (tag == "synthType") - //type = xml.parseInt(); type = string2SynthType(xml.parse1()); else if (tag == "class") sclass = xml.parse1(); @@ -900,6 +833,7 @@ void SynthI::read(Xml& xml) if (port != -1 && port < MIDI_PORTS) MusEGlobal::midiPorts[port].setMidiDevice(this); + // DELETETHIS 5 // Now that the track has been added to the lists in insertTrack2(), // if it's a dssi synth, OSC can find the synth, and initialize (and show) its native gui. // No, initializing OSC without actually showing the gui doesn't work, at least for @@ -934,7 +868,6 @@ const char* MessSynthIF::getPatchName(int channel, int prog, MType type, bool dr { if (_mess) { - //return _mess->getPatchName(channel, prog, type, drum); const char* s = _mess->getPatchName(channel, prog, type, drum); if(s) return s; @@ -953,7 +886,7 @@ void MessSynthIF::populatePatchPopup(MusEGui::PopupMenu* menu, int ch, MType, bo while (mp) { int id = ((mp->hbank & 0xff) << 16) + ((mp->lbank & 0xff) << 8) + mp->prog; - /* + /* DELETETHIS 9 int pgid = ((mp->hbank & 0xff) << 8) | (mp->lbank & 0xff) | 0x40000000; int itemnum = menu->indexOf(pgid); if(itemnum == -1) @@ -997,10 +930,10 @@ void SynthI::preProcessAlways() if(off()) { // Clear any accumulated play events. - //playEvents()->clear(); + //playEvents()->clear(); DELETETHIS _playEvents.clear(); // Eat up any fifo events. - //while(!eventFifo.isEmpty()) + //while(!eventFifo.isEmpty()) DELETETHIS // eventFifo.get(); eventFifo.clear(); // Clear is the same but faster AND safer, right? } @@ -1023,26 +956,18 @@ bool SynthI::getData(unsigned pos, int ports, unsigned n, float** buffer) int p = midiPort(); MidiPort* mp = (p != -1) ? &MusEGlobal::midiPorts[p] : 0; - //MPEventList* el = playEvents(); - ///iMPEvent ie = nextPlayEvent(); - //iMPEvent ie = el->begin(); // p4.0.15 Tim. iMPEvent ie = _playEvents.begin(); - - //ie = _sif->getData(mp, el, ie, pos, ports, n, buffer); ie = _sif->getData(mp, &_playEvents, ie, pos, ports, n, buffer); - ///setNextPlayEvent(ie); // p4.0.15 We are done with these events. Let us erase them here instead of Audio::processMidi. // That way we can simply set the next play event to the beginning. // This also allows other events to be inserted without the problems caused by the next play event // being at the 'end' iterator and not being *easily* set to some new place beginning of the newer insertions. // The way that MPEventList sorts made it difficult to predict where the iterator of the first newly inserted items was. // The erasure in Audio::processMidi was missing some events because of that. - //el->erase(el->begin(), ie); _playEvents.erase(_playEvents.begin(), ie); - // setNextPlayEvent(el->begin()); // Removed p4.0.15 return true; } @@ -1057,22 +982,17 @@ iMPEvent MessSynthIF::getData(MidiPort* mp, MPEventList* el, iMPEvent i, unsigne for (; i != el->end(); ++i) { int evTime = i->time(); - if (evTime == 0) { - // printf("MessSynthIF::getData - time is 0!\n"); - // continue; + if (evTime == 0) evTime=abs(frameOffset); // will cause frame to be zero, problem? - } + int frame = evTime - abs(frameOffset); - if (frame >= endPos) { - printf("frame > endPos!! frame = %d >= endPos %d, i->time() %d, frameOffset %d curPos=%d\n", frame, endPos, i->time(), frameOffset,curPos); - continue; - } + if (frame >= endPos) { + printf("frame > endPos!! frame = %d >= endPos %d, i->time() %d, frameOffset %d curPos=%d\n", frame, endPos, i->time(), frameOffset,curPos); + continue; + } if (frame > curPos) { - //willyfoobar-2011-02-13 - //!!! comparison of signed with unsigened - //old code//if (frame < pos) if (frame < (int) pos) printf("should not happen: missed event %d\n", pos -frame); else @@ -1085,14 +1005,16 @@ iMPEvent MessSynthIF::getData(MidiPort* mp, MPEventList* el, iMPEvent i, unsigne } } curPos = frame; - } + } + if (mp) mp->sendEvent(*i); else { if (putEvent(*i)) break; - } } + } + if (endPos - curPos) { if (!_mess) @@ -1112,14 +1034,17 @@ iMPEvent MessSynthIF::getData(MidiPort* mp, MPEventList* el, iMPEvent i, unsigne bool MessSynthIF::putEvent(const MidiPlayEvent& ev) { - if (MusEGlobal::midiOutputTrace) - ev.dump(); + //if (MusEGlobal::midiOutputTrace) DELETETHIS or re-enable? + //{ + // printf("MidiOut: MESS: <%s>: ", synti->name().toLatin1().constData()); + // ev.dump(); + //} if (_mess) return _mess->processEvent(ev); return true; } -//unsigned long MessSynthIF::uniqueID() const +//unsigned long MessSynthIF::uniqueID() const DELETETHIS //{ // return _mess ? _mess->uniqueID() : 0; //} diff --git a/muse2/muse/synth.h b/muse2/muse/synth.h index b9f1dcd2..8e19d5e8 100644 --- a/muse2/muse/synth.h +++ b/muse2/muse/synth.h @@ -40,8 +40,6 @@ // Current version of saved midistate data. #define SYNTH_MIDI_STATE_SAVE_VERSION 2 -//class QMenu; - class Mess; struct MESS; @@ -51,9 +49,6 @@ class PopupMenu; namespace MusECore { -//class MidiEvent; -//class MidiPlayEvent; - class SynthI; class SynthIF; @@ -74,19 +69,15 @@ class Synth { public: enum Type { METRO_SYNTH=0, MESS_SYNTH, DSSI_SYNTH, VST_SYNTH, SYNTH_TYPE_END }; - //Synth(const QFileInfo& fi); - //Synth(const QFileInfo& fi, QString label); Synth(const QFileInfo& fi, QString label, QString descr, QString maker, QString ver); virtual ~Synth() {} - //virtual const char* description() const { return ""; } - //virtual const char* version() const { return ""; } virtual Type synthType() const = 0; int instances() const { return _instances; } virtual void incInstances(int val) { _instances += val; } - QString completeBaseName() /*const*/ { return info.completeBaseName(); } // ddskrjo - QString baseName() /*const*/ { return info.baseName(); } // ddskrjo + QString completeBaseName() { return info.completeBaseName(); } // ddskrjo + QString baseName() { return info.baseName(); } // ddskrjo QString name() const { return _name; } QString absolutePath() const { return info.absolutePath(); } QString path() const { return info.path(); } @@ -94,12 +85,8 @@ class Synth { QString fileName() const { return info.fileName(); } QString description() const { return _description; } QString version() const { return _version; } - //QString maker() const { return _version; } ?? QString maker() const { return _maker; } - //virtual void* instantiate() = 0; - - //virtual SynthIF* createSIF() const = 0; virtual SynthIF* createSIF(SynthI*) = 0; }; @@ -111,21 +98,14 @@ class MessSynth : public Synth { const MESS* _descr; public: - //MessSynth(const QFileInfo& fi) : Synth(fi) { descr = 0; } - //MessSynth(const QFileInfo& fi) : Synth(fi, fi.baseName()) { descr = 0; } MessSynth(const QFileInfo& fi, QString label, QString descr, QString maker, QString ver) : Synth(fi, label, descr, maker, ver) { _descr = 0; } virtual ~MessSynth() {} - //virtual const char* description() const; - //virtual const char* version() const; - virtual Type synthType() const { return MESS_SYNTH; } - //virtual void* instantiate(); virtual void* instantiate(const QString&); - //virtual SynthIF* createSIF() const; virtual SynthIF* createSIF(SynthI*); }; @@ -145,7 +125,6 @@ class SynthIF { SynthI* synti; public: - //SynthIF() {} SynthIF(SynthI* s) { synti = s; } virtual ~SynthIF() {} @@ -157,13 +136,13 @@ class SynthIF { virtual bool guiVisible() const = 0; virtual void showGui(bool v) = 0; virtual bool hasGui() const = 0; - //virtual bool guiVisible() const { return false; } + //virtual bool guiVisible() const { return false; } DELETETHIS 3 //virtual void showGui(bool v) { }; //virtual bool hasGui() const { return false; } virtual bool nativeGuiVisible() const = 0; virtual void showNativeGui(bool v) = 0; virtual bool hasNativeGui() const = 0; - //virtual bool nativeGuiVisible() const { return false; } + //virtual bool nativeGuiVisible() const { return false; } DELETETHIS 3 //virtual void showNativeGui(bool v) { }; //virtual bool hasNativeGui() const { return false; } virtual void getGeometry(int*, int*, int*, int*) const = 0; @@ -176,15 +155,12 @@ class SynthIF { virtual MidiPlayEvent receiveEvent() = 0; virtual int eventsPending() const = 0; - //virtual bool init(Synth* s) = 0; - virtual int channels() const = 0; virtual int totalOutChannels() const = 0; virtual int totalInChannels() const = 0; virtual void deactivate3() = 0; virtual const char* getPatchName(int, int, int, bool) const = 0; virtual const char* getPatchName(int, int, MType, bool) = 0; - //virtual void populatePatchPopup(QMenu*, int, MType, bool) = 0; virtual void populatePatchPopup(MusEGui::PopupMenu*, int, MType, bool) = 0; virtual void write(int level, Xml& xml) const = 0; virtual float getParameter(unsigned long idx) const = 0; @@ -213,12 +189,16 @@ class SynthI : public AudioTrack, public MidiDevice, // List of initial floating point parameters, for synths which use them. // Used once upon song reload, then discarded. std::vector initParams; + // List of gui controls to update upon heartbeat. std::vector _guiUpdateControls; + // Update gui program upon heartbeat. bool _guiUpdateProgram; + // Initial, and running, string parameters for synths which use them, like dssi. StringParamMap _stringParamMap; + // Current bank and program for synths which use them, like dssi. // In cases like dssi which have no 'hi' and 'lo' bank, just use _curBankL. unsigned long _curBankH; @@ -228,13 +208,10 @@ class SynthI : public AudioTrack, public MidiDevice, void preProcessAlways(); bool getData(unsigned a, int b, unsigned c, float** data); - //bool putEvent(const MidiPlayEvent& ev); - virtual QString open(); virtual void close(); virtual bool putMidiEvent(const MidiPlayEvent&) {return true;} - //bool putMidiEvent(const MidiEvent&); virtual Track* newTrack() const { return 0; } @@ -246,7 +223,7 @@ class SynthI : public AudioTrack, public MidiDevice, SynthI(); virtual ~SynthI(); - SynthI* clone(int /*flags*/) const { return new SynthI(*this/*, flags*/); } + SynthI* clone(int /*flags*/) const { return new SynthI(*this); } virtual inline int deviceType() const { return SYNTH_MIDI; } @@ -263,19 +240,15 @@ class SynthI : public AudioTrack, public MidiDevice, Synth* synth() const { return synthesizer; } virtual bool isSynti() const { return true; } - //virtual const char* getPatchName(int ch, int prog, MType t, bool dr) { virtual QString getPatchName(int ch, int prog, MType t, bool dr) { return _sif->getPatchName(ch, prog, t, dr); } - //virtual void populatePatchPopup(QMenu* m, int i, MType t, bool d) { virtual void populatePatchPopup(MusEGui::PopupMenu* m, int i, MType t, bool d) { _sif->populatePatchPopup(m, i, t, d); } - // void setParameter(const char* name, const char* value) const; // Not required - //StringParamMap& stringParameters() { return _stringParamMap; } // Not required - void currentProg(unsigned long */*prog*/, unsigned long */*bankL*/, unsigned long */*bankH*/); + void currentProg(unsigned long *prog, unsigned long *bankL, unsigned long *bankH); void guiHeartBeat() { return _sif->guiHeartBeat(); } bool initGui() const { return _sif->initGui(); } @@ -326,7 +299,6 @@ class MessSynthIF : public SynthIF { Mess* _mess; public: - //MessSynthIF() { _mess = 0; } MessSynthIF(SynthI* s) : SynthIF(s) { _mess = 0; } virtual ~MessSynthIF() { } @@ -350,7 +322,6 @@ class MessSynthIF : public SynthIF { virtual bool putEvent(const MidiPlayEvent& ev); virtual MidiPlayEvent receiveEvent(); virtual int eventsPending() const; - //virtual bool init(Synth* s); bool init(Synth* s, SynthI* si); virtual int channels() const; @@ -359,7 +330,6 @@ class MessSynthIF : public SynthIF { virtual void deactivate3(); virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool); - //virtual void populatePatchPopup(QMenu*, int, MType, bool); virtual void populatePatchPopup(MusEGui::PopupMenu*, int, MType, bool); virtual void write(int level, Xml& xml) const; virtual float getParameter(unsigned long) const { return 0.0; } diff --git a/muse2/muse/tempo.cpp b/muse2/muse/tempo.cpp index 051fc7c5..1147fd78 100644 --- a/muse2/muse/tempo.cpp +++ b/muse2/muse/tempo.cpp @@ -137,13 +137,27 @@ int TempoList::tempo(unsigned tick) const return _tempo; } +//--------------------------------------------------------- +// tempo +// Bypass the useList flag and read from the list +//--------------------------------------------------------- + +int TempoList::tempoAt(unsigned tick) const + { + ciTEvent i = upper_bound(tick); + if (i == end()) { + printf("tempoAt: no TEMPO at tick %d,0x%x\n", tick, tick); + return 1000; + } + return i->second->tempo; + } + //--------------------------------------------------------- // del //--------------------------------------------------------- void TempoList::del(unsigned tick) { -// printf("TempoList::del(%d)\n", tick); iTEvent e = find(tick); if (e == end()) { printf("TempoList::del(%d): not found\n", tick); @@ -270,7 +284,6 @@ unsigned TempoList::tick2frame(unsigned tick, int* sn) const ciTEvent i = upper_bound(tick); if (i == end()) { printf("tick2frame(%d,0x%x): not found\n", tick, tick); - // abort(); return 0; } unsigned dtick = tick - i->second->tick; diff --git a/muse2/muse/tempo.h b/muse2/muse/tempo.h index 5c408630..7a3f413b 100644 --- a/muse2/muse/tempo.h +++ b/muse2/muse/tempo.h @@ -86,6 +86,7 @@ class TempoList : public TEMPOLIST { void dump() const; int tempo(unsigned tick) const; + int tempoAt(unsigned tick) const; unsigned tick2frame(unsigned tick, unsigned frame, int* sn) const; unsigned tick2frame(unsigned tick, int* sn = 0) const; unsigned frame2tick(unsigned frame, int* sn = 0) const; diff --git a/muse2/muse/thread.cpp b/muse2/muse/thread.cpp index 8fe0cdb8..69238922 100644 --- a/muse2/muse/thread.cpp +++ b/muse2/muse/thread.cpp @@ -57,16 +57,13 @@ static void* loop(void* mops) // start //--------------------------------------------------------- -//void Thread::start(void* ptr) void Thread::start(int prio, void* ptr) { - // Changed by Tim. p3.3.17 - userPtr = ptr; pthread_attr_t* attributes = 0; _realTimePriority = prio; - /* + /* DELETETHIS 14 attributes = (pthread_attr_t*) malloc(sizeof(pthread_attr_t)); pthread_attr_init(attributes); */ @@ -105,7 +102,7 @@ void Thread::start(int prio, void* ptr) } - /* + /* DELETETHIS 8 if (pthread_create(&thread, attributes, MusECore::loop, this)) perror("creating thread failed:"); // else @@ -136,7 +133,6 @@ void Thread::start(int prio, void* ptr) free(attributes); } - //undoSetuid(); } //--------------------------------------------------------- @@ -145,11 +141,8 @@ void Thread::start(int prio, void* ptr) void Thread::stop(bool force) { - // Changed by Tim. p3.3.17 - if (thread == 0) return; - //if (force && thread > 0) { if (force) { pthread_cancel(thread); threadStop(); @@ -157,7 +150,7 @@ void Thread::stop(bool force) _running = false; if (thread) { if (pthread_join(thread, 0)) { - // perror("Failed to join sequencer thread"); + // perror("Failed to join sequencer thread"); DELETETHIS and the if around? } } } @@ -166,14 +159,10 @@ void Thread::stop(bool force) // prio = 0 no realtime scheduling //--------------------------------------------------------- -//Thread::Thread(int prio, const char* s) Thread::Thread(const char* s) { - // Changed by Tim. p3.3.17 - userPtr = 0; _name = s; - //realTimePriority = prio; _realTimePriority = 0; pfd = 0; @@ -183,9 +172,6 @@ Thread::Thread(const char* s) _pollWait = -1; thread = 0; - //if (MusEGlobal::debugMsg) - // printf("Start thread %s with priority %d\n", s, prio); - // create message channels int filedes[2]; // 0 - reading 1 - writing if (pipe(filedes) == -1) { @@ -202,7 +188,7 @@ Thread::Thread(const char* s) fromThreadFdr = filedes[0]; fromThreadFdw = filedes[1]; -// pthread_mutexattr_t mutexattr; +// pthread_mutexattr_t mutexattr; DELETETHIS 5 // pthread_mutexattr_init(&mutexattr); // pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_TIMED_NP); // pthread_mutex_init(&lock, &mutexattr); @@ -271,7 +257,7 @@ void Thread::loop() perror("WARNING: Cannot lock memory:"); } -/* +/* DELETETHIS 46 pthread_attr_t* attributes = 0; attributes = (pthread_attr_t*) malloc(sizeof(pthread_attr_t)); pthread_attr_init(attributes); @@ -337,19 +323,13 @@ void Thread::loop() printf("Thread: Cannot get current client scheduler: %s\n", strerror(errno)); } - /* - if (MusEGlobal::debugMsg) - printf("Thread <%s> set to %s priority %d\n", - _name, policy == SCHED_FIFO ? "SCHED_FIFO" : "SCHED_OTHER", - realTimePriority); - */ if (MusEGlobal::debugMsg) printf("Thread <%s, id %p> has %s priority %d\n", _name, (void *)pthread_self(), policy == SCHED_FIFO ? "SCHED_FIFO" : "SCHED_OTHER", policy == SCHED_FIFO ? _realTimePriority : 0); -// pthread_mutex_lock(&lock); +// pthread_mutex_lock(&lock); DELETETHIS and below _running = true; // pthread_cond_signal(&ready); // pthread_mutex_unlock(&lock); @@ -394,8 +374,6 @@ void Thread::loop() bool Thread::sendMsg(const ThreadMsg* m) { - // Changed by Tim. p3.3.17 - if (_running) { int rv = write(toThreadFdw, &m, sizeof(ThreadMsg*)); @@ -412,7 +390,7 @@ bool Thread::sendMsg(const ThreadMsg* m) perror("Thread::sendMessage(): read pipe failed"); return true; } - //int c; + //int c; DELETETHIS 6 //rv = read(fromThreadFdr, &c, sizeof(c)); //if (rv != sizeof(c)) { // perror("Thread::sendMessage(): read pipe failed"); @@ -460,7 +438,7 @@ void Thread::readMsg() int rv = write(fromThreadFdw, &c, 1); if (rv != 1) perror("Thread::readMessage(): write pipe failed"); - //int c = p->serialNo; + //int c = p->serialNo; DELETETHIS 4 //int rv = write(fromThreadFdw, &c, sizeof(c)); //if (rv != sizeof(c)) // perror("Thread::readMsg(): write pipe failed"); diff --git a/muse2/muse/thread.h b/muse2/muse/thread.h index 755754f9..ab897834 100644 --- a/muse2/muse/thread.h +++ b/muse2/muse/thread.h @@ -70,7 +70,6 @@ struct ThreadMsg { class Thread { const char* _name; volatile bool _running; - //int realTimePriority; int _pollWait; // poll timeout in msec (-1 = infinite) pthread_t thread; @@ -78,7 +77,7 @@ class Thread { int toThreadFdw; // message to thread (app write) PollList plist; -// pthread_mutex_t lock; +// pthread_mutex_t lock; DELETETHIS 2 // pthread_cond_t ready; void* userPtr; @@ -95,13 +94,11 @@ class Thread { virtual void defaultTick() {} public: - //Thread(int prio, const char* name); Thread(const char* name); virtual ~Thread(); const char* name() const { return _name; } - //virtual void start(void* ptr=0); virtual void start(int priority, void* ptr=0); void stop(bool); diff --git a/muse2/muse/ticksynth.cpp b/muse2/muse/ticksynth.cpp index 6d3721ea..48e1ba2b 100644 --- a/muse2/muse/ticksynth.cpp +++ b/muse2/muse/ticksynth.cpp @@ -24,7 +24,6 @@ #include "ticksynth.h" #include "default_click.h" -//#include #include "popupmenu.h" // If sysex support is ever added, make sure this number is unique among all the MESS synths. @@ -45,15 +44,12 @@ static MetronomeSynth* metronomeSynth = 0; class MetronomeSynth : public Synth { public: - //MetronomeSynth(const QFileInfo& fi) : Synth(fi) {} - //MetronomeSynth(const QFileInfo& fi) : Synth(fi, QString("Metronome")) {} MetronomeSynth(const QFileInfo& fi) : Synth(fi, QString("Metronome"), QString("Metronome"), QString(), QString()) {} virtual ~MetronomeSynth() {} virtual Type synthType() const { return METRO_SYNTH; } virtual void incInstances(int) {} virtual void* instantiate(); - //virtual SynthIF* createSIF() const; virtual SynthIF* createSIF(SynthI*); }; @@ -78,9 +74,6 @@ class MetronomeSynthIF : public SynthIF void process(float** buffer, int offset, int n); public: - //MetronomeSynthIF() { - // data = 0; - // } MetronomeSynthIF(SynthI* s) : SynthIF(s) { data = 0; } @@ -103,15 +96,12 @@ class MetronomeSynthIF : public SynthIF virtual MidiPlayEvent receiveEvent() { return MidiPlayEvent(); } virtual int eventsPending() const { return 0; } - //virtual bool init(Synth*) { return true; } - virtual int channels() const { return 1; } virtual int totalOutChannels() const { return 1; } virtual int totalInChannels() const { return 0; } virtual void deactivate3() {} virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool) { return ""; } - //virtual void populatePatchPopup(QMenu*, int, MType, bool) {}; virtual void populatePatchPopup(MusEGui::PopupMenu*, int, MType, bool) {}; virtual void write(int, Xml&) const {} virtual float getParameter(unsigned long) const { return 0.0; } @@ -130,7 +120,7 @@ iMPEvent MetronomeSynthIF::getData(MidiPort*, MPEventList* el, iMPEvent i, unsig printf("MusE: MetronomeSynthIF::getData\n"); #endif - //set type to unsigned , due to compiler warning: comparison signed/unsigned + //set type to unsigned , due to compiler warning: comparison signed/unsigned unsigned int curPos = pos; //prevent compiler warning: comparison signed/unsigned unsigned int endPos = pos + n; //prevent compiler warning: comparison signed/unsigned unsigned int off = pos; //prevent compiler warning: comparison signed/unsigned @@ -172,6 +162,7 @@ bool MetronomeSynthIF::putEvent(const MidiPlayEvent& ev) return false; } +// DELETETHIS 9 //--------------------------------------------------------- // createSIF //--------------------------------------------------------- diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp index cdb81a8f..e810f677 100644 --- a/muse2/muse/track.cpp +++ b/muse2/muse/track.cpp @@ -39,13 +39,10 @@ namespace MusECore { -//bool Track::_isVisible=true; unsigned int Track::_soloRefCnt = 0; Track* Track::_tmpSoloChainTrack = 0; bool Track::_tmpSoloChainDoIns = false; bool Track::_tmpSoloChainNoDec = false; -//bool Track::_tmpIsAuxProcessing = false; -//int Track::_tmpIsAuxProcRefCount = 0; const char* Track::_cname[] = { "Midi", "Drum", "NewStyleDrum", "Wave", @@ -113,15 +110,9 @@ void removePortCtrlEvents(MidiTrack* t) { Part* part = ip->second; const EventList* el = part->cevents(); - //unsigned len = part->lenTick(); for(ciEvent ie = el->begin(); ie != el->end(); ++ie) { const Event& ev = ie->second; - // Added by T356. Do not remove events which are past the end of the part. - // No, actually, do remove ALL of them belonging to the part. - // Just in case there are stray values left after the part end. - //if(ev.tick() >= len) - // break; if(ev.type() == Controller) { @@ -159,7 +150,6 @@ bool Track::isVisible() { case Track::AUDIO_AUX: return AudioAux::visible(); - break; case Track::AUDIO_GROUP: return AudioGroup::visible(); case Track::AUDIO_INPUT: @@ -169,9 +159,10 @@ bool Track::isVisible() case Track::WAVE: return WaveTrack::visible(); case Track::MIDI: + case Track::DRUM: return MidiTrack::visible(); case Track::AUDIO_SOFTSYNTH: - return AudioAux::visible(); + return SynthI::visible(); default: break; } @@ -225,8 +216,6 @@ void Track::init() _height = 20; _locked = false; for (int i = 0; i < MAX_CHANNELS; ++i) { - //_meter[i] = 0; - //_peak[i] = 0; _meter[i] = 0.0; _peak[i] = 0.0; } @@ -242,8 +231,6 @@ Track::Track(const Track& t, int flags) { internal_assign(t, flags | ASSIGN_PROPERTIES); for (int i = 0; i < MAX_CHANNELS; ++i) { - //_meter[i] = 0; - //_peak[i] = 0; _meter[i] = 0.0; _peak[i] = 0.0; } @@ -290,7 +277,6 @@ void Track::internal_assign(const Track& t, int flags) _type = t.type(); _locked = t.locked(); - //_name = t.name(); _name = t.name() + " #"; for(int i = 2; true; ++i) { @@ -421,12 +407,9 @@ void Track::dump() const void Track::updateAuxRoute(int refInc, Track* dst) { - //if(isMidiTrack() || _type == AUDIO_AUX) if(isMidiTrack()) return; - //printf("Track::updateAuxRoute %s _auxRouteCount:%d refInc:%d\n", name().toLatin1().constData(), _auxRouteCount, refInc); - if(dst) { _nodeTraversed = true; @@ -454,7 +437,6 @@ void Track::updateAuxRoute(int refInc, Track* dst) if(_auxRouteCount < 0) { fprintf(stderr, "Track::updateAuxRoute Ref underflow! %s _auxRouteCount:%d refInc:%d\n", name().toLatin1().constData(), _auxRouteCount, refInc); - //_auxRouteCount = 0; } for (iRoute i = _outRoutes.begin(); i != _outRoutes.end(); ++i) @@ -462,8 +444,6 @@ void Track::updateAuxRoute(int refInc, Track* dst) if( !(*i).isValid() || (*i).type != Route::TRACK_ROUTE ) continue; Track* t = (*i).track; - //if(t->isMidiTrack()) - // continue; t->updateAuxRoute(refInc, NULL); } @@ -478,10 +458,6 @@ void Track::updateAuxRoute(int refInc, Track* dst) bool Track::isCircularRoute(Track* dst) { - //if(isMidiTrack() || _type == AUDIO_AUX) - //if(isMidiTrack()) - // return; - bool rv = false; if(dst) @@ -489,8 +465,6 @@ bool Track::isCircularRoute(Track* dst) _nodeTraversed = true; rv = dst->isCircularRoute(NULL); _nodeTraversed = false; - //if(rv) - // fprintf(stderr, " Circular route %s -> %s\n", name().toLatin1().constData(), dst->name().toLatin1().constData()); return rv; } @@ -504,8 +478,6 @@ bool Track::isCircularRoute(Track* dst) if( !(*i).isValid() || (*i).type != Route::TRACK_ROUTE ) continue; Track* t = (*i).track; - //if(t->isMidiTrack()) - // continue; rv = t->isCircularRoute(NULL); if(rv) break; @@ -601,13 +573,10 @@ void MidiTrack::internal_assign(const Track& t, int flags) { c = mp->defaultInChannels(); if(c) - { MusEGlobal::audio->msgAddRoute(Route(i, c), Route(this, c)); - //updateFlags |= SC_ROUTE; - } } - if(!defOutFound) /// + if(!defOutFound) { c = mp->defaultOutChannels(); if(c) @@ -616,7 +585,6 @@ void MidiTrack::internal_assign(const Track& t, int flags) /// TODO: Switch if and when multiple output routes supported. #if 0 MusEGlobal::audio->msgAddRoute(Route(this, c), Route(i, c)); - //updateFlags |= SC_ROUTE; #else for(ch = 0; ch < MIDI_CHANNELS; ++ch) { @@ -627,7 +595,6 @@ void MidiTrack::internal_assign(const Track& t, int flags) _outPort = i; if(type() != Track::DRUM) // Leave drum tracks at channel 10. _outChannel = ch; - //updateFlags |= SC_ROUTE; break; } } @@ -682,10 +649,7 @@ void MidiTrack::init() { _outPort = 0; _outChannel = (type()==NEW_DRUM) ? 9 : 0; - //_inPortMask = 0xffff; - ///_inPortMask = 0xffffffff; - - ///_inChannelMask = 0xffff; // "ALL" + transposition = 0; velocity = 0; delay = 0; @@ -751,10 +715,8 @@ void MidiTrack::setOutChanAndUpdate(int i) if(_outChannel == i) return; - //removePortCtrlEvents(); removePortCtrlEvents(this); _outChannel = i; - //addPortCtrlEvents(); addPortCtrlEvents(this); } @@ -767,10 +729,8 @@ void MidiTrack::setOutPortAndUpdate(int i) if(_outPort == i) return; - //removePortCtrlEvents(); removePortCtrlEvents(this); _outPort = i; - //addPortCtrlEvents(); addPortCtrlEvents(this); } @@ -783,11 +743,9 @@ void MidiTrack::setOutPortAndChannelAndUpdate(int port, int ch) if(_outPort == port && _outChannel == ch) return; - //removePortCtrlEvents(); removePortCtrlEvents(this); _outPort = port; _outChannel = ch; - //addPortCtrlEvents(); addPortCtrlEvents(this); } @@ -799,10 +757,6 @@ void MidiTrack::setOutPortAndChannelAndUpdate(int port, int ch) void MidiTrack::setInPortAndChannelMask(unsigned int portmask, int chanmask) { - //if(!portmask || !chanmask) - // return; - - //RouteList* rl = inRoutes(); bool changed = false; for(int port = 0; port < 32; ++port) // 32 is the old maximum number of ports. @@ -812,7 +766,7 @@ void MidiTrack::setInPortAndChannelMask(unsigned int portmask, int chanmask) if(!MusEGlobal::midiPorts[port].foundInSongFile()) continue; - //if(!(portmask & (1 << port))) + //if(!(portmask & (1 << port))) DELETETHIS 8 // continue; // Removed. Allow to connect to port with no device so user can change device later. @@ -825,24 +779,17 @@ void MidiTrack::setInPortAndChannelMask(unsigned int portmask, int chanmask) Route bRoute(this, chanmask); // Route wanted? - //if((portmask & (1 << port)) && (chanmask & (1 << ch))) if(portmask & (1 << port)) { - // Route already exists? - //if(iir != rl->end()) - // continue; MusEGlobal::audio->msgAddRoute(aRoute, bRoute); changed = true; } else { - // Route does not exist? - //if(iir == rl->end()) - // continue; MusEGlobal::audio->msgRemoveRoute(aRoute, bRoute); changed = true; } - //} + //} DELETETHIS } if(changed) @@ -852,7 +799,7 @@ void MidiTrack::setInPortAndChannelMask(unsigned int portmask, int chanmask) } } -/* +/* DELETETHIS 84 //--------------------------------------------------------- // addPortCtrlEvents //--------------------------------------------------------- @@ -1001,9 +948,6 @@ void MidiTrack::write(int level, Xml& xml) const xml.intTag(level, "device", outPort()); xml.intTag(level, "channel", outChannel()); - //xml.intTag(level, "inportMap", inPortMask()); - ///xml.uintTag(level, "inportMap", inPortMask()); // Obsolete - ///xml.intTag(level, "inchannelMap", inChannelMask()); // Obsolete xml.intTag(level, "locked", _locked); xml.intTag(level, "echo", _recEcho); @@ -1081,14 +1025,9 @@ void MidiTrack::read(Xml& xml) else if (tag == "channel") setOutChannel(xml.parseInt()); else if (tag == "inportMap") - //setInPortMask(xml.parseInt()); - ///setInPortMask(xml.parseUInt()); - //xml.skip(tag); // Obsolete. - portmask = xml.parseUInt(); // Support old files. + portmask = xml.parseUInt(); // Obsolete but support old files. else if (tag == "inchannelMap") - ///setInChannelMask(xml.parseInt()); - //xml.skip(tag); // Obsolete. - chanmask = xml.parseInt(); // Support old files. + chanmask = xml.parseInt(); // Obsolete but support old files. else if (tag == "locked") _locked = xml.parseInt(); else if (tag == "echo") @@ -1327,13 +1266,9 @@ void Track::writeRouting(int level, Xml& xml) const s = "dest"; - //if(r->type == Route::MIDI_DEVICE_ROUTE) // Obsolete since 1.1-RC2 - // s += QString(QT_TRANSLATE_NOOP("@default", " devtype=\"%1\"")).arg(r->device->deviceType()); // - //if(r->type != Route::TRACK_ROUTE) // if(r->type != Route::TRACK_ROUTE && r->type != Route::MIDI_PORT_ROUTE) s += QString(" type=\"%1\"").arg(r->type); - //s += QString(QT_TRANSLATE_NOOP("@default", " name=\"%1\"/")).arg(r->name()); if(r->type == Route::MIDI_PORT_ROUTE) s += QString(" mport=\"%1\"/").arg(r->midiPort); else diff --git a/muse2/muse/track.h b/muse2/muse/track.h index 5cc217b6..b8133fae 100644 --- a/muse2/muse/track.h +++ b/muse2/muse/track.h @@ -110,7 +110,7 @@ class Track { Track(TrackType); Track(const Track&, int flags); virtual ~Track(); - //virtual Track& operator=(const Track& t); + //virtual Track& operator=(const Track& t); DELETETHIS virtual void assign(const Track&, int flags); static const char* _cname[]; @@ -220,14 +220,9 @@ class Track { //--------------------------------------------------------- class MidiTrack : public Track { - //friend class AudioTrack; - //static unsigned int _soloRefCnt; int _outPort; int _outChannel; - //int _inPortMask; - //unsigned int _inPortMask; // bitmask of accepted record ports - //int _inChannelMask; // bitmask of accepted record channels bool _recEcho; // For midi (and audio). Whether to echo incoming record events to output device. EventList* _events; // tmp Events during midi import @@ -288,23 +283,17 @@ class MidiTrack : public Track { void setOutChannel(int i) { _outChannel = i; } void setOutPort(int i) { _outPort = i; } // These will transfer controller data to the new selected port and/or channel. - void setOutChanAndUpdate(int /*chan*/); - void setOutPortAndUpdate(int /*port*/); + void setOutChanAndUpdate(int chan); + void setOutPortAndUpdate(int port); // Combines both port and channel operations. - void setOutPortAndChannelAndUpdate(int /*port*/, int /*chan*/); + void setOutPortAndChannelAndUpdate(int port, int chan); - //void setInPortMask(int i) { _inPortMask = i; } - //void setInPortMask(unsigned int i) { _inPortMask = i; } // Obsolete - //void setInChannelMask(int i) { _inChannelMask = i; } // // Backward compatibility: For reading old songs. - void setInPortAndChannelMask(unsigned int /*portmask*/, int /*chanmask*/); + void setInPortAndChannelMask(unsigned int portmask, int chanmask); void setRecEcho(bool b) { _recEcho = b; } int outPort() const { return _outPort; } - //int inPortMask() const { return _inPortMask; } - //unsigned int inPortMask() const { return _inPortMask; } int outChannel() const { return _outChannel; } - //int inChannelMask() const { return _inChannelMask; } bool recEcho() const { return _recEcho; } virtual bool isMute() const; @@ -312,8 +301,6 @@ class MidiTrack : public Track { virtual void updateSoloStates(bool noDec); virtual void updateInternalSoloStates(); - //bool soloMode() const { return _soloRefCnt; } - virtual bool canRecord() const { return true; } static void setVisible(bool t) { _isVisible = t; } static bool visible() { return _isVisible; } @@ -350,9 +337,6 @@ class MidiTrack : public Track { //--------------------------------------------------------- class AudioTrack : public Track { - //friend class MidiTrack; - //static unsigned int _soloRefCnt; - bool _haveData; // Whether we have data from a previous process call during current cycle. CtrlListList _controller; @@ -360,7 +344,6 @@ class AudioTrack : public Track { bool _prefader; // prefader metering std::vector _auxSend; - //void readRecfile(Xml& xml); void readAuxSend(Xml& xml); bool _sendMetronome; @@ -370,7 +353,6 @@ class AudioTrack : public Track { protected: float** outBuffers; - //float* outBuffers[MAX_CHANNELS]; int _totalOutChannels; int _totalInChannels; @@ -382,7 +364,6 @@ class AudioTrack : public Track { public: AudioTrack(TrackType t); - //AudioTrack(TrackType t, int num_out_bufs = MAX_CHANNELS); AudioTrack(const AudioTrack&, int flags); virtual ~AudioTrack(); @@ -397,7 +378,6 @@ class AudioTrack : public Track { bool prepareRecording(); bool processed() { return _processed; } - //void setProcessed(bool v) { _processed = v; } void addController(CtrlList*); void removeController(int id); @@ -425,8 +405,6 @@ class AudioTrack : public Track { virtual void updateSoloStates(bool noDec); virtual void updateInternalSoloStates(); - //bool soloMode() const { return _soloRefCnt; } - void putFifo(int channels, unsigned long n, float** bp); void record(); @@ -457,11 +435,10 @@ class AudioTrack : public Track { void setPluginCtrlVal(int param, double val); void readVolume(Xml& xml); - //void writeRouting(int, Xml&) const; virtual void preProcessAlways() { _processed = false; } - virtual void addData(unsigned /*samplePos*/, int /*channels*/, int /*srcStartChan*/, int /*srcChannels*/, unsigned /*frames*/, float** /*buffer*/); - virtual void copyData(unsigned /*samplePos*/, int /*channels*/, int /*srcStartChan*/, int /*srcChannels*/, unsigned /*frames*/, float** /*buffer*/); + virtual void addData(unsigned samplePos, int channels, int srcStartChan, int srcChannels, unsigned frames, float** buffer); + virtual void copyData(unsigned samplePos, int channels, int srcStartChan, int srcChannels, unsigned frames, float** buffer); virtual bool hasAuxSend() const { return false; } // automation @@ -539,7 +516,6 @@ class AudioOutput : public AudioTrack { void* jackPort(int channel) { return jackPorts[channel]; } void setJackPort(int channel, void*p) { jackPorts[channel] = p; } virtual void setChannels(int n); -// virtual bool isMute() const; void processInit(unsigned); void process(unsigned pos, unsigned offset, unsigned); void processWrite(); @@ -617,7 +593,6 @@ class WaveTrack : public AudioTrack { virtual void read(Xml&); virtual void write(int, Xml&) const; - //virtual void fetchData(unsigned pos, unsigned frames, float** bp); virtual void fetchData(unsigned pos, unsigned frames, float** bp, bool doSeek); virtual bool getData(unsigned, int ch, unsigned, float** bp); diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp index 96ca599d..aa0036e5 100644 --- a/muse2/muse/transport.cpp +++ b/muse2/muse/transport.cpp @@ -37,11 +37,11 @@ #include "siglabel.h" #include "globals.h" #include "icons.h" -///#include "posedit.h" #include "sync.h" #include "shortcuts.h" #include "gconfig.h" #include "app.h" +#include "audio.h" namespace MusEGui { @@ -76,8 +76,7 @@ static QToolButton* newButton(const QPixmap* pm, const QString& tt, //--------------------------------------------------------- // Handle -// erlaubt das Verschieben eines Root-Windows mit der -// Maus +// allows moving a root-window with the mouse //--------------------------------------------------------- Handle::Handle(QWidget* r, QWidget* parent) @@ -114,7 +113,7 @@ void Handle::mousePressEvent(QMouseEvent* ev) //--------------------------------------------------------- // TempoSig -// Widget f�r Tempo + Signature +// Widget for Tempo + Signature //--------------------------------------------------------- TempoSig::TempoSig(QWidget* parent) @@ -228,10 +227,6 @@ void Transport::setRecord(bool flag) //--------------------------------------------------------- Transport::Transport(QWidget* parent, const char* name) - // : QWidget(0, name, WStyle_Customize | WType_TopLevel | WStyle_Tool - //| WStyle_NoBorder | WStyle_StaysOnTop) - //: QWidget(0, name, Qt::WStyle_Customize | Qt::Window | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop) - //: QWidget(0, name, Qt::Window | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ) // Possibly also Qt::X11BypassWindowManagerHint : QWidget(parent, Qt::Window | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ) // Possibly also Qt::X11BypassWindowManagerHint { setObjectName(name); @@ -326,7 +321,6 @@ Transport::Transport(QWidget* parent, const char* name) marken->setSpacing(0); marken->setContentsMargins(0, 0, 0, 0); - ///tl1 = new PosEdit(0); tl1 = new Awl::PosEdit(0); tl1->setMinimumSize(105,0); tl1->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); @@ -339,7 +333,6 @@ Transport::Transport(QWidget* parent, const char* name) l5->setAlignment(Qt::AlignCenter); marken->addWidget(l5); - ///tl2 = new PosEdit(0); tl2 = new Awl::PosEdit(0); tl2->setMinimumSize(105,0); tl2->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); @@ -364,9 +357,7 @@ Transport::Transport(QWidget* parent, const char* name) QHBoxLayout *hbox1 = new QHBoxLayout; hbox1->setContentsMargins(0, 0, 0, 0); - ///time1 = new PosEdit(0); time1 = new Awl::PosEdit(0); - ///time2 = new PosEdit(0); time2 = new Awl::PosEdit(0); time2->setSmpte(true); time1->setMinimumSize(105,0); @@ -508,8 +499,7 @@ Transport::Transport(QWidget* parent, const char* name) connect(slider,SIGNAL(valueChanged(int)), SLOT(cposChanged(int))); connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool))); connect(tempo, SIGNAL(tempoChanged(int)), MusEGlobal::song, SLOT(setTempo(int))); - ///connect(tempo, SIGNAL(sigChanged(int, int)), MusEGlobal::song, SLOT(setSig(int, int))); - connect(tempo, SIGNAL(sigChanged(const AL::TimeSignature&)), MusEGlobal::song, SLOT(setSig(const AL::TimeSignature&))); + connect(tempo, SIGNAL(sigChanged(const AL::TimeSignature&)), SLOT(sigChange(const AL::TimeSignature&))); connect(MusEGlobal::song, SIGNAL(playChanged(bool)), SLOT(setPlay(bool))); connect(MusEGlobal::song, SIGNAL(songChanged(int)), this, SLOT(songChanged(int))); connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged())); @@ -801,5 +791,11 @@ void Transport::playToggled(bool val) buttons[4]->blockSignals(false); } } + +void Transport::sigChange(const AL::TimeSignature& sig) +{ + MusEGlobal::audio->msgAddSig(MusEGlobal::song->cPos().tick(), sig.z, sig.n); // Add will replace if found. +} + } // namespace MusEGui diff --git a/muse2/muse/transport.h b/muse2/muse/transport.h index 27fd7624..50422b66 100644 --- a/muse2/muse/transport.h +++ b/muse2/muse/transport.h @@ -136,6 +136,7 @@ class Transport : public QWidget void stopToggled(bool); void playToggled(bool); void configChanged(); + void sigChange(const AL::TimeSignature&); public slots: void setTempo(int tempo); diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp index 9cece41c..e12fcedc 100644 --- a/muse2/muse/undo.cpp +++ b/muse2/muse/undo.cpp @@ -151,7 +151,7 @@ void UndoList::clearDelete() } } break; - /* case UndoOp::ModifyTrack: + /* case UndoOp::ModifyTrack: DELETETHIS 50 if(i->oTrack) { // Prevent delete i->oTrack from crashing. @@ -207,7 +207,6 @@ void UndoList::clearDelete() delete i->copyMarker; break; case UndoOp::ModifyTrackName: - //printf("UndoList::clearDelete ModifyTrackName old:%s new:%s\n", i->_oldName, i->_newName); if (i->_oldName) delete i->_oldName; if (i->_newName) @@ -230,9 +229,8 @@ void UndoList::clearDelete() void Song::startUndo() { - //redoList->clear(); // added by flo93: redo must be invalidated when a new undo is started - redoList->clearDelete(); // p4.0.46 Tim - MusEGlobal::redoAction->setEnabled(false); // + redoList->clearDelete(); // redo must be invalidated when a new undo is started + MusEGlobal::redoAction->setEnabled(false); undoList->push_back(Undo()); updateFlags = 0; @@ -299,9 +297,8 @@ bool Song::applyOperationGroup(Undo& group, bool doUndo) } else { - //redoList->clear(); // added by flo93: redo must be invalidated when a new undo is started - redoList->clearDelete(); // p4.0.46 Tim. - MusEGlobal::redoAction->setEnabled(false); // + redoList->clearDelete(); // redo must be invalidated when a new undo is started + MusEGlobal::redoAction->setEnabled(false); } return doUndo; @@ -328,12 +325,11 @@ void Song::doUndo2() break; case UndoOp::DeleteTrack: insertTrack2(i->oTrack, i->trackno); - // Added by T356. chainTrackParts(i->oTrack, true); updateFlags |= SC_TRACK_INSERTED; break; -/* +/* DELETETHIS 130 case UndoOp::ModifyTrack: { //printf("Song::doUndo2 ModifyTrack #1 oTrack %p %s nTrack %p %s\n", i->oTrack, i->oTrack->name().toLatin1().constData(), i->nTrack, i->nTrack->name().toLatin1().constData()); @@ -483,7 +479,7 @@ void Song::doUndo2() removePart(part); updateFlags |= SC_PART_REMOVED; i->oPart->events()->incARef(-1); - //i->oPart->unchainClone(); + //i->oPart->unchainClone(); DELETETHIS unchainClone(i->oPart); } break; @@ -491,7 +487,7 @@ void Song::doUndo2() addPart(i->oPart); updateFlags |= SC_PART_INSERTED; i->oPart->events()->incARef(1); - //i->oPart->chainClone(); + //i->oPart->chainClone(); DELETETHIS chainClone(i->oPart); break; case UndoOp::ModifyPart: @@ -500,7 +496,7 @@ void Song::doUndo2() changePart(i->oPart, i->nPart); i->oPart->events()->incARef(-1); i->nPart->events()->incARef(1); - //i->oPart->replaceClone(i->nPart); + //i->oPart->replaceClone(i->nPart); DELETETHIS replaceClone(i->oPart, i->nPart); if(i->doCtrls) addPortCtrlEvents(i->nPart, i->doClones); @@ -527,22 +523,18 @@ void Song::doUndo2() updateFlags |= SC_EVENT_MODIFIED; break; case UndoOp::AddTempo: - //printf("doUndo2: UndoOp::AddTempo. deleting tempo at: %d\n", i->a); MusEGlobal::tempomap.delTempo(i->a); updateFlags |= SC_TEMPO; break; case UndoOp::DeleteTempo: - //printf("doUndo2: UndoOp::DeleteTempo. adding tempo at: %d, tempo=%d\n", i->a, i->b); MusEGlobal::tempomap.addTempo(i->a, i->b); updateFlags |= SC_TEMPO; break; case UndoOp::AddSig: - ///sigmap.del(i->a); AL::sigmap.del(i->a); updateFlags |= SC_SIG; break; case UndoOp::DeleteSig: - ///sigmap.add(i->a, i->b, i->c); AL::sigmap.add(i->a, AL::TimeSignature(i->b, i->c)); updateFlags |= SC_SIG; break; @@ -581,7 +573,6 @@ void Song::doRedo2() switch(i->type) { case UndoOp::AddTrack: insertTrack2(i->oTrack, i->trackno); - // Added by T356. chainTrackParts(i->oTrack, true); updateFlags |= SC_TRACK_INSERTED; @@ -591,7 +582,7 @@ void Song::doRedo2() updateFlags |= SC_TRACK_REMOVED; break; -/* +/* DELETETHIS 130 case UndoOp::ModifyTrack: { // Unchain the track parts, but don't touch the ref counts. @@ -732,14 +723,14 @@ void Song::doRedo2() addPart(i->oPart); updateFlags |= SC_PART_INSERTED; i->oPart->events()->incARef(1); - //i->oPart->chainClone(); + //i->oPart->chainClone(); DELETETHIS chainClone(i->oPart); break; case UndoOp::DeletePart: removePart(i->oPart); updateFlags |= SC_PART_REMOVED; i->oPart->events()->incARef(-1); - //i->oPart->unchainClone(); + //i->oPart->unchainClone(); DELETETHIS unchainClone(i->oPart); break; case UndoOp::ModifyPart: @@ -748,7 +739,7 @@ void Song::doRedo2() changePart(i->nPart, i->oPart); i->oPart->events()->incARef(1); i->nPart->events()->incARef(-1); - //i->nPart->replaceClone(i->oPart); + //i->nPart->replaceClone(i->oPart); DELETETHIS replaceClone(i->nPart, i->oPart); if(i->doCtrls) addPortCtrlEvents(i->oPart, i->doClones); @@ -775,22 +766,18 @@ void Song::doRedo2() updateFlags |= SC_EVENT_MODIFIED; break; case UndoOp::AddTempo: - //printf("doRedo2: UndoOp::AddTempo. adding tempo at: %d with tempo=%d\n", i->a, i->b); MusEGlobal::tempomap.addTempo(i->a, i->b); updateFlags |= SC_TEMPO; break; case UndoOp::DeleteTempo: - //printf("doRedo2: UndoOp::DeleteTempo. deleting tempo at: %d with tempo=%d\n", i->a, i->b); MusEGlobal::tempomap.delTempo(i->a); updateFlags |= SC_TEMPO; break; case UndoOp::AddSig: - ///sigmap.add(i->a, i->b, i->c); AL::sigmap.add(i->a, AL::TimeSignature(i->b, i->c)); updateFlags |= SC_SIG; break; case UndoOp::DeleteSig: - ///sigmap.del(i->a); AL::sigmap.del(i->a); updateFlags |= SC_SIG; break; @@ -982,7 +969,7 @@ bool Song::doUndo1() case Track::AUDIO_INPUT: connectJackRoutes((AudioTrack*)i->oTrack, false); break; - //case Track::AUDIO_SOFTSYNTH: + //case Track::AUDIO_SOFTSYNTH: DELETETHIS 4 //SynthI* si = (SynthI*)i->oTrack; //si->synth()->init( // break; @@ -1003,22 +990,19 @@ bool Song::doUndo1() { MusECore::MidiTrack* mt = dynamic_cast(i->_propertyTrack); if (mt == 0 || mt->type() == MusECore::Track::DRUM) - //if (mt == 0 || mt->isDrumTrack()) // For Flo later with new drum tracks. p4.0.46 Tim break; if (i->_oldPropValue != mt->outChannel()) { - //mt->setOutChannel(i->_oldPropValue); MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutChannel(mt, i->_oldPropValue); mt->setOutChanAndUpdate(i->_oldPropValue); MusEGlobal::audio->msgIdle(false); + // DELETETHIS 6 //if (mt->type() == MusECore::MidiTrack::DRUM) {//Change channel on all drum instruments // for (int i=0; i_oldPropValue; // } //updateFlags |= SC_CHANNELS; MusEGlobal::audio->msgUpdateSoloStates(); - //updateFlags |= SC_MIDI_TRACK_PROP | SC_ROUTE; updateFlags |= SC_MIDI_TRACK_PROP; } } @@ -1061,19 +1045,17 @@ void Song::doUndo3() insertTrack3(i->oTrack, i->trackno); break; case UndoOp::ModifyTrack: - // Not much choice but to do this - Tim. + // Not much choice but to do this - Tim. DELETETHIS 2 //clearClipboardAndCloneList(); break; case UndoOp::ModifyMarker: { - //printf("performing undo for one marker at copy %d real %d\n", i->copyMarker, i->realMarker); if (i->realMarker) { Marker tmpMarker = *i->realMarker; *i->realMarker = *i->copyMarker; // swap them *i->copyMarker = tmpMarker; } else { - //printf("flipping marker\n"); i->realMarker = _markerList->add(*i->copyMarker); delete i->copyMarker; i->copyMarker = 0; @@ -1112,7 +1094,7 @@ bool Song::doRedo1() case Track::AUDIO_INPUT: connectJackRoutes((AudioTrack*)i->oTrack, false); break; - //case Track::AUDIO_SOFTSYNTH: + //case Track::AUDIO_SOFTSYNTH: DELETETHIS 4 //SynthI* si = (SynthI*)i->oTrack; //si->synth()->init( // break; @@ -1136,22 +1118,19 @@ bool Song::doRedo1() { MusECore::MidiTrack* mt = dynamic_cast(i->_propertyTrack); if (mt == 0 || mt->type() == MusECore::Track::DRUM) - //if (mt == 0 || mt->isDrumTrack()) // For Flo later with new drum tracks. p4.0.46 Tim break; if (i->_newPropValue != mt->outChannel()) { - //mt->setOutChannel(i->_newPropValue); MusEGlobal::audio->msgIdle(true); - //MusEGlobal::audio->msgSetTrackOutChannel(mt, i->_newPropValue); mt->setOutChanAndUpdate(i->_newPropValue); MusEGlobal::audio->msgIdle(false); + // DELETETHIS 5 //if (mt->type() == MusECore::MidiTrack::DRUM) {//Change channel on all drum instruments // for (int i=0; i_newPropValue; // } //updateFlags |= SC_CHANNELS; MusEGlobal::audio->msgUpdateSoloStates(); - //updateFlags |= SC_MIDI_TRACK_PROP | SC_ROUTE; updateFlags |= SC_MIDI_TRACK_PROP; } } @@ -1194,12 +1173,11 @@ void Song::doRedo3() removeTrack3(i->oTrack); break; case UndoOp::ModifyTrack: - // Not much choice but to do this - Tim. + // Not much choice but to do this - Tim. DELETETHIS 2 //clearClipboardAndCloneList(); break; case UndoOp::ModifyMarker: { - //printf("performing redo for one marker at copy %d real %d\n", i->copyMarker, i->realMarker); if (i->copyMarker) { Marker tmpMarker = *i->realMarker; *i->realMarker = *i->copyMarker; // swap them diff --git a/muse2/muse/vst.cpp b/muse2/muse/vst.cpp index f72d426b..1f03e0ac 100644 --- a/muse2/muse/vst.cpp +++ b/muse2/muse/vst.cpp @@ -60,7 +60,6 @@ long vstHostCallback(AEffect* effect, { static VstTimeInfo _timeInfo; -// JackVST* jackvst = effect ? ((JackVST*) effect->user) : NULL; jack_position_t jack_pos; jack_transport_state_t tstate; @@ -300,7 +299,6 @@ static void scanVstDir(const QString& s) FSTInfo* info = fst_get_info(path); if (info) { if (info->numInputs == 0 && info->numOutputs) - //synthis.push_back(new VstSynth(*fi)); synthis.push_back(new VstSynth(*fi, fi->baseName(), QString(), QString(), QString())); fst_free_info(info); } @@ -468,7 +466,7 @@ void* VstSynth::instantiate() undoSetuid(); return 0; } -// int vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, NULL, 0.0f); + undoSetuid(); return fst; } @@ -509,11 +507,8 @@ int VstSynthIF::totalInChannels() const // createSIF //--------------------------------------------------------- -//SynthIF* VstSynth::createSIF() const SynthIF* VstSynth::createSIF(SynthI* s) { - //return new VstSynthIF(); - VstSynthIF* sif = new VstSynthIF(s); sif->init(this, s); return sif; diff --git a/muse2/muse/vst.h b/muse2/muse/vst.h index b41e7137..3490cb39 100644 --- a/muse2/muse/vst.h +++ b/muse2/muse/vst.h @@ -44,7 +44,6 @@ class VstSynth : public Synth { _FSTHandle* fstHandle; public: - //VstSynth(const QFileInfo& fi) : Synth(fi) { fstHandle = 0; } VstSynth(const QFileInfo& fi) : Synth(fi, fi->baseName()) { fstHandle = 0; } @@ -53,7 +52,6 @@ class VstSynth : public Synth { virtual Type synthType() const { return VST_SYNTH; } virtual void incInstances(int val); virtual void* instantiate(); - //virtual SynthIF* createSIF() const; virtual SynthIF* createSIF(SynthI*) const; }; @@ -68,7 +66,6 @@ class VstSynthIF : public SynthIF bool _guiVisible; public: - //VstSynthIF() { _fst = 0; _guiVisible = false; } VstSynthIF(SynthI* s) : SynthIF(s) { _fst = 0; _guiVisible = false; @@ -98,7 +95,6 @@ class VstSynthIF : public SynthIF virtual void deactivate3(); virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool) { return ""; } - //virtual void populatePatchPopup(QMenu*, int, MType, bool) {}; virtual void populatePatchPopup(PopupMenu*, int, MType, bool) {}; virtual void write(int level, Xml& xml) const; virtual float getParameter(unsigned long idx) const; diff --git a/muse2/muse/wave.cpp b/muse2/muse/wave.cpp index f22f6f97..536320d5 100644 --- a/muse2/muse/wave.cpp +++ b/muse2/muse/wave.cpp @@ -48,18 +48,8 @@ namespace MusECore { -/* -const char* audioFilePattern[] = { - "Wave/Binary (*.wav *.ogg *.bin)", - "Wave (*.wav *.ogg)", - "Binary (*.bin)", - "All Files (*)", - 0 - }; -*/ const int cacheMag = 128; -// ClipList* waveClips; SndFileList SndFile::sndFiles; @@ -147,18 +137,14 @@ void SndFile::update() void SndFile::readCache(const QString& path, bool showProgress) { -// printf("readCache %s for %d samples channel %d\n", -// path.toLatin1().constData(), samples(), channels()); - if (cache) { for (unsigned i = 0; i < channels(); ++i) delete [] cache[i]; delete[] cache; } - if (samples() == 0) { -// printf("SndFile::readCache: file empty\n"); + if (samples() == 0) return; - } + csize = (samples() + cacheMag - 1)/cacheMag; cache = new SampleV*[channels()]; for (unsigned ch = 0; ch < channels(); ++ch) @@ -249,10 +235,9 @@ void SndFile::read(SampleV* s, int mag, unsigned pos, bool overwrite) s[ch].rms = 0; } - if (pos > samples()) { -// printf("%p pos %d > samples %d\n", this, pos, samples()); + if (pos > samples()) return; - } + if (mag < cacheMag) { float data[channels()][mag]; @@ -556,7 +541,6 @@ size_t SndFile::write(int srcChannels, float** src, size_t n) if (srcChannels == dstChannels) { for (size_t i = 0; i < n; ++i) { for (int ch = 0; ch < dstChannels; ++ch) - //*dst++ = *(src[ch]+i); // < limitValue ? *(src[ch]+i) : limitValue; if (*(src[ch]+i) > 0) *dst++ = *(src[ch]+i) < limitValue ? *(src[ch]+i) : limitValue; else @@ -648,7 +632,6 @@ SndFile* getWave(const QString& inName, bool readOnlyFlag) } } } -// printf("=====%s %s\n", inName.toLatin1().constData(), name.toLatin1().constData()); // only open one instance of wave file SndFile* f = SndFile::sndFiles.search(name); @@ -669,7 +652,6 @@ SndFile* getWave(const QString& inName, bool readOnlyFlag) QString cacheName = wavinfo.absolutePath() + QString("/") + wavinfo.completeBaseName() + QString(".wca"); QFileInfo wcainfo(cacheName); if (!wcainfo.exists() || wcainfo.lastModified() < wavinfo.lastModified()) { - //printf("wcafile is older or does not exist!\n"); QFile(cacheName).remove(); f->readCache(cacheName,true); } @@ -702,7 +684,6 @@ SndFile* getWave(const QString& inName, bool readOnlyFlag) QString cacheName = wavinfo.absolutePath() + QString("/") + wavinfo.completeBaseName() + QString(".wca"); QFileInfo wcainfo(cacheName); if (!wcainfo.exists() || wcainfo.lastModified() < wavinfo.lastModified()) { - //printf("wcafile is older or does not exist!\n"); QFile(cacheName).remove(); f->readCache(cacheName,true); } @@ -727,7 +708,6 @@ void SndFile::applyUndoFile(const QString& original, const QString& tmpfile, uns // put in the tmpfile, and when redo is eventually called the data is switched again (causing the muted data to be written to the "original" // file. The data is merely switched. - //printf("Applying undofile: orig=%s tmpfile=%s startframe=%d endframe=%d\n", original.toLatin1().constData(), tmpfile.toLatin1().constData(), startframe, endframe); SndFile* orig = sndFiles.search(original); SndFile tmp = SndFile(tmpfile); if (!orig) { @@ -809,6 +789,7 @@ void SndFile::applyUndoFile(const QString& original, const QString& tmpfile, uns MusEGlobal::audio->msgIdle(false); } +// DELETETHIS 170 #if 0 //--------------------------------------------------------- // Clip @@ -983,7 +964,6 @@ int ClipList::idx(const Clip& clip) const // cmdAddRecordedWave //--------------------------------------------------------- -//void Song::cmdAddRecordedWave(WaveTrack* track, const MusECore::Pos& s, const MusECore::Pos& e) void Song::cmdAddRecordedWave(MusECore::WaveTrack* track, MusECore::Pos s, MusECore::Pos e) { if (MusEGlobal::debugMsg) @@ -996,18 +976,11 @@ void Song::cmdAddRecordedWave(MusECore::WaveTrack* track, MusECore::Pos s, MusEC return; } - // Removed by Tim. p3.3.8 - //unsigned startTick = roundDownBar(s.tick()); - //unsigned endTick = roundUpBar(e.tick()); - - // Added by Tim. p3.3.8 - if((MusEGlobal::audio->loopCount() > 0 && s.tick() > lPos().tick()) || (punchin() && s.tick() < lPos().tick())) s.setTick(lPos().tick()); // If we are looping, just set the end to the right marker, since we don't know how many loops have occurred. // (Fixed: Added Audio::loopCount) // Otherwise if punchout is on, limit the end to the right marker. - //if(loop() || (punchout() && e.tick() > rPos().tick()) ) if((MusEGlobal::audio->loopCount() > 0) || (punchout() && e.tick() > rPos().tick()) ) e.setTick(rPos().tick()); // No part to be created? Delete the rec sound file. @@ -1126,13 +1099,6 @@ void SndFileList::clearDelete() // sure) and deletes the entry on its own. while (!empty()) delete *begin(); - - /* this is wrong, because ~SndFile deletes itself from the - * list, causing the iterator to be invalidated -> fail. - for (SndFileList::iterator i = begin(); i != end(); ++i) - delete *i; - clear(); - */ } @@ -1153,7 +1119,6 @@ void MusE::importWave() "a wave track")); return; } - //QString fn = MusEGui::getOpenFileName(MusEGlobal::lastWavePath, audioFilePattern, this, QString fn = MusEGui::getOpenFileName(MusEGlobal::lastWavePath, MusEGlobal::audio_file_pattern, this, tr("Import Wave File"), 0); if (!fn.isEmpty()) { @@ -1186,7 +1151,6 @@ bool MusE::importWaveToTrack(QString& name, unsigned tick, MusECore::Track* trac tr("&Yes"), tr("&No"), QString::null, 0, 1 )) { - //printf("why won't muse let me delete the file object? %d\n", f->getRefCount()); if (f->getRefCount() == 0) delete f; return true; diff --git a/muse2/muse/wave.h b/muse2/muse/wave.h index 535df939..133c0dfd 100644 --- a/muse2/muse/wave.h +++ b/muse2/muse/wave.h @@ -52,7 +52,6 @@ class SndFileList; //--------------------------------------------------------- class SndFile { - //static SndFileList _sndFiles; QFileInfo* finfo; SNDFILE* sf; SNDFILE* sfUI; @@ -242,7 +241,6 @@ class Clip { bool operator==(ClipBase* c) const { return clip == c; } ~Clip(); - // ClipBase* clipBase() const { return clip; } bool isNull() const { return clip == 0; } int getRefCount() const { return clip->getRefCount(); } diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 06b5ab1d..6cad9871 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -80,7 +80,7 @@ void WaveEdit::closeEvent(QCloseEvent* e) WaveEdit::WaveEdit(MusECore::PartList* pl) : MidiEditor(TopWin::WAVE, 1, pl) { - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(Qt::NoFocus); QSignalMapper* mapper = new QSignalMapper(this); QAction* act; @@ -190,6 +190,7 @@ WaveEdit::WaveEdit(MusECore::PartList* pl) solo = new QToolButton(); solo->setText(tr("Solo")); solo->setCheckable(true); + solo->setFocusPolicy(Qt::NoFocus); tb1->addWidget(solo); connect(solo, SIGNAL(toggled(bool)), SLOT(soloChanged(bool))); @@ -230,7 +231,8 @@ WaveEdit::WaveEdit(MusECore::PartList* pl) ymag->setMaximum(256); ymag->setPageStep(256); ymag->setValue(yscale); - + ymag->setFocusPolicy(Qt::NoFocus); + time = new MTScale(&_raster, mainw, xscale, true); ymag->setFixedWidth(16); connect(view, SIGNAL(mouseWheelMoved(int)), this, SLOT(moveVerticalSlider(int))); @@ -250,7 +252,7 @@ WaveEdit::WaveEdit(MusECore::PartList* pl) mainGrid->addWidget(hscroll, 3, 0); mainGrid->addWidget(corner, 3, 1, Qt::AlignBottom | Qt::AlignRight); - view->setFocus(); // Tim. + view->setFocus(); connect(hscroll, SIGNAL(scrollChanged(int)), view, SLOT(setXPos(int))); connect(hscroll, SIGNAL(scaleChanged(int)), view, SLOT(setXMag(int))); diff --git a/muse2/muse/waveevent.cpp b/muse2/muse/waveevent.cpp index 22041bd8..2cbf7cad 100644 --- a/muse2/muse/waveevent.cpp +++ b/muse2/muse/waveevent.cpp @@ -32,7 +32,7 @@ // Added by Tim. p3.3.18 //#define USE_SAMPLERATE -// + //#define WAVEEVENT_DEBUG //#define WAVEEVENT_DEBUG_PRC @@ -141,8 +141,6 @@ void WaveEventBase::write(int level, Xml& xml, const Pos& offset, bool forcePath xml.tag(level++, "event"); PosLen wpos(*this); wpos += offset; -// if (offset) -// wpos.setTick(wpos.tick() + offset); wpos.write(level, xml, "poslen"); xml.intTag(level, "frame", _spos); // offset in wave file @@ -152,7 +150,6 @@ void WaveEventBase::write(int level, Xml& xml, const Pos& offset, bool forcePath // QString path = f.dirPath(); - //if (path.contains(MusEGlobal::museProject)) { if (!forcePath && path.contains(MusEGlobal::museProject)) { // extract MusEGlobal::museProject. QString newName = f.path().remove(MusEGlobal::museProject+"/"); @@ -163,11 +160,6 @@ void WaveEventBase::write(int level, Xml& xml, const Pos& offset, bool forcePath xml.etag(level, "event"); } -//void WaveEventBase::read(unsigned offset, float** buffer, int channel, int n, bool overwrite) -//void WaveEventBase::readAudio(unsigned offset, float** buffer, int channel, int n, bool doSeek, bool overwrite) -//off_t WaveEventBase::readAudio(SRC_STATE* src_state, off_t sfCurFrame, unsigned offset, float** buffer, int channel, int n, bool doSeek, bool overwrite) -//off_t WaveEventBase::readAudio(AudioConverter* audConv, off_t sfCurFrame, unsigned offset, float** buffer, int channel, int n, bool doSeek, bool overwrite) -// p3.3.33 void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffer, int channel, int n, bool /*doSeek*/, bool overwrite) { // Added by Tim. p3.3.17 @@ -175,6 +167,11 @@ void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffe printf("WaveEventBase::readAudio audConv:%p sfCurFrame:%ld offset:%u channel:%d n:%d\n", audConv, sfCurFrame, offset, channel, n); #endif + // DELETETHIS 270. all the below stuff hasn't changed since revision 462, and + // will not compile, and has a TODO in it. + // will this ever be done, or is it completely obsolete? + // even if we keep the #ifdef branch, there's a huge + // comment in it. delete that? // Changed by Tim. p3.3.18 #ifdef USE_SAMPLERATE @@ -182,7 +179,7 @@ void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffe >>>>>>>>>>>+++++++++++++++++++++++++++++ // If we have a valid audio converter then use it to do the processing. Otherwise just a normal seek + read. if(audConv) - //sfCurFrame = audConv->process(f, sfCurFrame, offset + _spos, buffer, channel, n, doSeek, overwrite); + //sfCurFrame = audConv->process(f, sfCurFrame, offset + _spos, buffer, channel, n, doSeek, overwrite); DELETETHIS sfCurFrame = audConv->readAudio(f, sfCurFrame, offset, buffer, channel, n, doSeek, overwrite); else { @@ -192,10 +189,9 @@ void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffe sfCurFrame += f.read(channel, buffer, n, overwrite); } } - //return sfCurFrame; return; - /* + /* DELETETHIS 250 unsigned fsrate = f.samplerate(); int fchan = f.channels(); off_t frame = offset + _spos; @@ -451,18 +447,12 @@ void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffe #else if(f.isNull()) return; - //return sfCurFrame; - //sfCurFrame = f.seek(offset + _spos, 0); + //sfCurFrame = f.seek(offset + _spos, 0); DELETETHIS 2 //sfCurFrame += f.read(channel, buffer, n, overwrite); f.seek(offset + _spos, 0); f.read(channel, buffer, n, overwrite); - // p3.3.41 - //fprintf(stderr, "WaveEventBase::readAudio data: n:%ld %e %e %e %e\n", n, buffer[0][0], buffer[0][1], buffer[0][2], buffer[0][3]); - - - //return sfCurFrame; return; #endif diff --git a/muse2/muse/waveevent.h b/muse2/muse/waveevent.h index 278b0ad3..2c1bf76d 100644 --- a/muse2/muse/waveevent.h +++ b/muse2/muse/waveevent.h @@ -24,7 +24,6 @@ #ifndef __WAVE_EVENT_H__ #define __WAVE_EVENT_H__ -//#include #include #include "eventbase.h" @@ -45,8 +44,6 @@ class WaveEventBase : public EventBase { int _spos; // start sample position in WaveFile bool deleted; - // p3.3.31 - //virtual EventBase* clone() { return new WaveEventBase(*this); } virtual EventBase* clone(); public: @@ -54,7 +51,6 @@ class WaveEventBase : public EventBase { virtual ~WaveEventBase() {} virtual void read(Xml&); - //virtual void write(int, Xml&, const Pos& offset) const; virtual void write(int, Xml&, const Pos& offset, bool forcePath = false) const; virtual EventBase* mid(unsigned, unsigned); @@ -67,15 +63,8 @@ class WaveEventBase : public EventBase { virtual SndFileR sndFile() const { return f; } virtual void setSndFile(SndFileR& sf) { f = sf; } - // Changed by Tim. p3.3.17 - //virtual void read(unsigned offset, float** bpp, int channels, int nn, bool overwrite = true); - //virtual void readAudio(unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/); - //virtual off_t readAudio(SRC_STATE* /*src_state*/, off_t /*sfCurFrame*/, unsigned /*offset*/, - // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/); - //virtual off_t readAudio(AudioConverter* /*audConv*/, off_t /*sfCurFrame*/, unsigned /*offset*/, - // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/); - virtual void readAudio(WavePart* /*part*/, unsigned /*offset*/, - float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/); + virtual void readAudio(WavePart* part, unsigned offset, + float** bpp, int channels, int nn, bool doSeek, bool overwrite); }; } // namespace MusECore diff --git a/muse2/muse/wavetrack.cpp b/muse2/muse/wavetrack.cpp index 0d699cbe..cc788d2d 100644 --- a/muse2/muse/wavetrack.cpp +++ b/muse2/muse/wavetrack.cpp @@ -41,7 +41,6 @@ namespace MusECore { // called from prefetch thread //--------------------------------------------------------- -//void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp) void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSeek) { // Added by Tim. p3.3.17 @@ -53,7 +52,6 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSee for (int i = 0; i < channels(); ++i) memset(bp[i], 0, samples * sizeof(float)); - // p3.3.29 // Process only if track is not off. if(!off()) { @@ -62,8 +60,6 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSee unsigned n = samples; for (iPart ip = pl->begin(); ip != pl->end(); ++ip) { WavePart* part = (WavePart*)(ip->second); - // Changed by Tim. p3.3.17 - //if (part->mute() || isMute()) if (part->mute()) continue; @@ -106,12 +102,6 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSee for (int i = 0; i < channels(); ++i) bpp[i] = bp[i] + dstOffset; - // By T356. Allow overlapping parts or events to mix together ! - // Since the buffers are cleared above, just read and add (don't overwrite) the samples. - //event.read(srcOffset, bpp, channels(), nn); - //event.read(srcOffset, bpp, channels(), nn, false); - //event.readAudio(srcOffset, bpp, channels(), nn, doSeek, false); - // p3.3.33 event.readAudio(part, srcOffset, bpp, channels(), nn, doSeek, false); } @@ -122,22 +112,9 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, float** bp, bool doSee // add denormal bias to outdata for (int i = 0; i < channels(); ++i) for (unsigned int j = 0; j < samples; ++j) - { bp[i][j] +=MusEGlobal::denormalBias; - - /* - // p3.3.41 - if(j & 1) - bp[i][j] -=MusEGlobal::denormalBias; - else - bp[i][j] +=MusEGlobal::denormalBias; - */ - } } - // p3.3.41 - //fprintf(stderr, "WaveTrack::fetchData data: samples:%ld %e %e %e %e\n", samples, bp[0][0], bp[0][1], bp[0][2], bp[0][3]); - _prefetchFifo.add(); } @@ -170,8 +147,6 @@ void WaveTrack::read(Xml& xml) return; case Xml::TagStart: if (tag == "part") { - //Part* p = newPart(); - //p->read(xml); Part* p = 0; p = readXmlPart(xml, this); if(p) @@ -209,7 +184,6 @@ Part* WaveTrack::newPart(Part*p, bool clone) } if(clone) - //p->chainClone(part); chainClone(p, part); return part; @@ -221,22 +195,13 @@ Part* WaveTrack::newPart(Part*p, bool clone) bool WaveTrack::getData(unsigned framePos, int channels, unsigned nframe, float** bp) { - //if(MusEGlobal::debugMsg) - // printf("WaveTrack::getData framePos:%u channels:%d nframe:%u processed?:%d\n", framePos, channels, nframe, processed()); - if ((MusEGlobal::song->bounceTrack != this) && !noInRoute()) { RouteList* irl = inRoutes(); ciRoute i = irl->begin(); if(i->track->isMidiTrack()) - { - //if(MusEGlobal::debugMsg) - // printf("WaveTrack::getData: Error: First route is a midi track route!\n"); return false; - } - // p3.3.38 - //((AudioTrack*)i->track)->copyData(framePos, channels, nframe, bp); + ((AudioTrack*)i->track)->copyData(framePos, channels, - //(i->track->type() == Track::AUDIO_SOFTSYNTH && i->channel != -1) ? i->channel : 0, i->channel, i->channels, nframe, bp); @@ -245,16 +210,9 @@ bool WaveTrack::getData(unsigned framePos, int channels, unsigned nframe, float* for (; i != irl->end(); ++i) { if(i->track->isMidiTrack()) - { - //if(MusEGlobal::debugMsg) - // printf("WaveTrack::getData: Error: Route is a midi track route!\n"); - //return false; continue; - } - // p3.3.38 - //((AudioTrack*)i->track)->addData(framePos, channels, nframe, bp); + ((AudioTrack*)i->track)->addData(framePos, channels, - //(i->track->type() == Track::AUDIO_SOFTSYNTH && i->channel != -1) ? i->channel : 0, i->channel, i->channels, nframe, bp); @@ -276,6 +234,7 @@ bool WaveTrack::getData(unsigned framePos, int channels, unsigned nframe, float* if (!MusEGlobal::audio->isPlaying()) return false; + // DELETETHIS 43 // Removed by T356. Multiple out route cacheing now handled by AudioTrack::copyData and ::addData. /* if (outRoutes()->size() > 1) { @@ -318,14 +277,11 @@ bool WaveTrack::getData(unsigned framePos, int channels, unsigned nframe, float* else { */ - //printf("WaveTrack::getData no out routes\n"); if (MusEGlobal::audio->freewheel()) { // when freewheeling, read data direct from file: // Indicate do not seek file before each read. - // Changed by Tim. p3.3.17 - //fetchData(framePos, nframe, bp); fetchData(framePos, nframe, bp, false); } @@ -348,12 +304,7 @@ bool WaveTrack::getData(unsigned framePos, int channels, unsigned nframe, float* } } } - - // p3.3.41 - //fprintf(stderr, "WaveTrack::getData %s data: nframe:%ld %e %e %e %e\n", name().toLatin1().constData(), nframe, bp[0][0], bp[0][1], bp[0][2], bp[0][3]); - } - //} return true; } diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt index d037f06e..fae0d614 100644 --- a/muse2/muse/widgets/CMakeLists.txt +++ b/muse2/muse/widgets/CMakeLists.txt @@ -45,6 +45,7 @@ QT4_WRAP_CPP (widget_mocs dentry.h didyouknow.h doublelabel.h + doublespinbox.h filedialog.h genset.h mdisettings.h @@ -155,6 +156,7 @@ file (GLOB widgets_source_files dentry.cpp dimap.cpp doublelabel.cpp + doublespinbox.cpp drange.cpp filedialog.cpp genset.cpp diff --git a/muse2/muse/widgets/doublespinbox.cpp b/muse2/muse/widgets/doublespinbox.cpp new file mode 100644 index 00000000..71ca4149 --- /dev/null +++ b/muse2/muse/widgets/doublespinbox.cpp @@ -0,0 +1,102 @@ +//========================================================= +// MusE +// Linux Music Editor +// doublespinbox.cpp (C) Copyright 2012 Tim E. Real (terminator356 at users dot sourceforge dot 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; 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; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +//========================================================= + +#include +#include +#include +#include "doublespinbox.h" + +namespace MusEGui { + +//void DoubleSpinBoxLineEdit::mouseDoubleClickEvent(QMouseEvent* e) +//{ +// QLineEdit::mouseDoubleClickEvent(e); +// emit doubleClicked(); +// if((e->buttons() & Qt::LeftButton) && (e->modifiers() & Qt::ControlModifier)) +// emit ctrlDoubleClicked(); +//} + +void DoubleSpinBoxLineEdit::mousePressEvent(QMouseEvent* e) +{ + QLineEdit::mousePressEvent(e); + //selectAll(); + if((e->buttons() & Qt::LeftButton) && (e->modifiers() & Qt::ControlModifier)) + emit ctrlClicked(); +} + +//--------------------------------------------------------- +// DoubleSpinBox +//--------------------------------------------------------- + +DoubleSpinBox::DoubleSpinBox(QWidget* parent) + : QDoubleSpinBox(parent) +{ + DoubleSpinBoxLineEdit* le = new DoubleSpinBoxLineEdit(this); + setLineEdit(le); + setKeyboardTracking(false); + + //connect(le, SIGNAL(doubleClicked()), this, SIGNAL(doubleClicked())); + //connect(le, SIGNAL(ctrlDoubleClicked()), this, SIGNAL(ctrlDoubleClicked())); + connect(le, SIGNAL(ctrlClicked()), this, SIGNAL(ctrlClicked())); +} + +DoubleSpinBox::DoubleSpinBox(double minValue, double maxValue, double step, QWidget* parent) + : QDoubleSpinBox(parent) +{ + DoubleSpinBoxLineEdit* le = new DoubleSpinBoxLineEdit(this); + setLineEdit(le); + setRange(minValue, maxValue); + setSingleStep(step); + setKeyboardTracking(false); + + //connect(le, SIGNAL(doubleClicked()), this, SIGNAL(doubleClicked())); + //connect(le, SIGNAL(ctrlDoubleClicked()), this, SIGNAL(ctrlDoubleClicked())); + connect(le, SIGNAL(ctrlClicked()), this, SIGNAL(ctrlClicked())); +} + +void DoubleSpinBox::keyPressEvent(QKeyEvent* ev) +{ + switch (ev->key()) { + case Qt::Key_Return: + QDoubleSpinBox::keyPressEvent(ev); + emit returnPressed(); + return; + break; + case Qt::Key_Escape: + emit escapePressed(); + return; + break; + default: + break; + } + QDoubleSpinBox::keyPressEvent(ev); +} + +void DoubleSpinBox::wheelEvent(QWheelEvent* e) +{ + QDoubleSpinBox::wheelEvent(e); + // Need this because Qt doesn't deselect the text if not focused. + if(!hasFocus() && lineEdit()) + lineEdit()->deselect(); +} + +} // namespace MusEGui + diff --git a/muse2/muse/widgets/doublespinbox.h b/muse2/muse/widgets/doublespinbox.h new file mode 100644 index 00000000..f3dfcdb0 --- /dev/null +++ b/muse2/muse/widgets/doublespinbox.h @@ -0,0 +1,73 @@ +//========================================================= +// MusE +// Linux Music Editor +// doublespinbox.h (C) Copyright 2012 Tim E. Real (terminator356 at users dot sourceforge dot 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; 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; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +//========================================================= + +#ifndef __DOUBLESPINBOX_H__ +#define __DOUBLESPINBOX_H__ + +#include +#include + +namespace MusEGui { + +class DoubleSpinBoxLineEdit : public QLineEdit +{ + Q_OBJECT + + protected: + //virtual void mouseDoubleClickEvent(QMouseEvent* e); + virtual void mousePressEvent(QMouseEvent* e); + + signals: + //void doubleClicked(); + //void ctrlDoubleClicked(); + void ctrlClicked(); + + public: + DoubleSpinBoxLineEdit(QWidget* parent = 0) : QLineEdit(parent) {}; +}; + +//--------------------------------------------------------- +// DoubleSpinBox +//--------------------------------------------------------- + +class DoubleSpinBox : public QDoubleSpinBox { + Q_OBJECT + + protected: + virtual void keyPressEvent(QKeyEvent*); + virtual void wheelEvent(QWheelEvent*); + + signals: + //void doubleClicked(); + //void ctrlDoubleClicked(); + void ctrlClicked(); + void returnPressed(); + void escapePressed(); + + public: + DoubleSpinBox(QWidget* parent=0); + DoubleSpinBox(double minValue, double maxValue, double step = 1.0, QWidget* parent=0); +}; + +} // namespace MusEGui + +#endif + diff --git a/muse2/muse/widgets/fdialogbuttons.ui b/muse2/muse/widgets/fdialogbuttons.ui index a2196b66..fdd2a22c 100644 --- a/muse2/muse/widgets/fdialogbuttons.ui +++ b/muse2/muse/widgets/fdialogbuttons.ui @@ -6,7 +6,7 @@ 0 0 - 150 + 154 438 @@ -146,6 +146,29 @@ Configuration + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + write window +states + + + true + + + + + + diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp index 5fbae28b..b41f807e 100644 --- a/muse2/muse/widgets/filedialog.cpp +++ b/muse2/muse/widgets/filedialog.cpp @@ -240,6 +240,7 @@ MFileDialog::MFileDialog(const QString& dir, } buttons.readMidiPortsGroup->setVisible(false); + buttons.writeWinStateGroup->setVisible(false); } } @@ -314,7 +315,7 @@ QString getOpenFileName(const QString &startWith, const char** filters_chararray //--------------------------------------------------------- QString getSaveFileName(const QString &startWith, - const char** filters_chararray, QWidget* parent, const QString& name) + const char** filters_chararray, QWidget* parent, const QString& name, bool* writeWinState) { QStringList filters = localizedStringListFromCharArray(filters_chararray, "file_patterns"); @@ -322,12 +323,20 @@ QString getSaveFileName(const QString &startWith, dlg->setNameFilters(filters); dlg->setWindowTitle(name); dlg->setFileMode(QFileDialog::AnyFile); + if (writeWinState) + { + dlg->buttons.writeWinStateGroup->setVisible(true); + dlg->buttons.writeWinStateButton->setChecked(*writeWinState); + } + QStringList files; QString result; if (dlg->exec() == QDialog::Accepted) { files = dlg->selectedFiles(); if (!files.isEmpty()) result = files[0]; + if (writeWinState) + *writeWinState = dlg->buttons.writeWinStateButton->isChecked(); } // Added by T356. diff --git a/muse2/muse/widgets/filedialog.h b/muse2/muse/widgets/filedialog.h index c9ab8e09..1e2616da 100644 --- a/muse2/muse/widgets/filedialog.h +++ b/muse2/muse/widgets/filedialog.h @@ -91,7 +91,7 @@ class ContentsPreview : public QWidget, public Q3FilePreview { */ QString getSaveFileName(const QString& startWidth, const char** filters, - QWidget* parent, const QString& name); + QWidget* parent, const QString& name, bool* writeWinState=NULL); QString getOpenFileName(const QString& startWidth, const char** filters, QWidget* parent, const QString& name, bool* doReadMidiPorts, MFileDialog::ViewType viewType = MFileDialog::PROJECT_VIEW); QString getImageFileName(const QString& startWith, const char** filters, diff --git a/muse2/muse/widgets/genset.cpp b/muse2/muse/widgets/genset.cpp index 422f5110..60127a0a 100644 --- a/muse2/muse/widgets/genset.cpp +++ b/muse2/muse/widgets/genset.cpp @@ -72,129 +72,9 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent) recDrumGroup->addButton(dontRecMutedButton, MusECore::DONT_REC_MUTED); recDrumGroup->addButton(dontRecBothButton, MusECore::DONT_REC_MUTED_OR_HIDDEN); - for (unsigned i = 0; i < sizeof(rtcResolutions)/sizeof(*rtcResolutions); ++i) { - if (rtcResolutions[i] == MusEGlobal::config.rtcTicks) { - rtcResolutionSelect->setCurrentIndex(i); - break; - } - } - for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) { - if (divisions[i] == MusEGlobal::config.division) { - midiDivisionSelect->setCurrentIndex(i); - break; - } - } - for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) { - if (divisions[i] == MusEGlobal::config.guiDivision) { - guiDivisionSelect->setCurrentIndex(i); - break; - } - } - for (unsigned i = 0; i < sizeof(dummyAudioBufSizes)/sizeof(*dummyAudioBufSizes); ++i) { - if (dummyAudioBufSizes[i] == MusEGlobal::config.dummyAudioBufSize) { - dummyAudioSize->setCurrentIndex(i); - break; - } - } - - for (unsigned i = 0; i < sizeof(minControlProcessPeriods)/sizeof(*minControlProcessPeriods); ++i) { - if (minControlProcessPeriods[i] == MusEGlobal::config.minControlProcessPeriod) { - minControlProcessPeriodComboBox->setCurrentIndex(i); - break; - } - } - - guiRefreshSelect->setValue(MusEGlobal::config.guiRefresh); - minSliderSelect->setValue(int(MusEGlobal::config.minSlider)); - minMeterSelect->setValue(MusEGlobal::config.minMeter); - freewheelCheckBox->setChecked(MusEGlobal::config.freewheelMode); - denormalCheckBox->setChecked(MusEGlobal::config.useDenormalBias); - outputLimiterCheckBox->setChecked(MusEGlobal::config.useOutputLimiter); - vstInPlaceCheckBox->setChecked(MusEGlobal::config.vstInPlace); - dummyAudioRate->setValue(MusEGlobal::config.dummyAudioSampleRate); + updateSettings(); - //DummyAudioDevice* dad = dynamic_cast(audioDevice); - //dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---"); - //dummyAudioRealRate->setText(QString().setNum(sampleRate)); // Not used any more. p4.0.20 - // Just a record of what the gensetbase.ui file contained for dummyAudioRate whats this: - /* - Actual rate used depends on limitations of - timer used. If a high rate timer is available, - short periods can be used with high sample rates. -Period affects midi playback resolution. -Shorter periods are desirable. - */ - - projDirEntry->setText(MusEGlobal::config.projectBaseFolder); projDirOpenToolButton->setIcon(*openIcon); - - startSongEntry->setText(MusEGlobal::config.startSong); - startSongGroup->button(MusEGlobal::config.startMode)->setChecked(true); - - recDrumGroup->button(MusEGlobal::config.newDrumRecordCondition)->setChecked(true); - - showTransport->setChecked(MusEGlobal::config.transportVisible); - showBigtime->setChecked(MusEGlobal::config.bigTimeVisible); - //showMixer->setChecked(MusEGlobal::config.mixerVisible); - showMixer->setChecked(MusEGlobal::config.mixer1Visible); - showMixer2->setChecked(MusEGlobal::config.mixer2Visible); - - mainX->setValue(MusEGlobal::config.geometryMain.x()); - mainY->setValue(MusEGlobal::config.geometryMain.y()); - mainW->setValue(MusEGlobal::config.geometryMain.width()); - mainH->setValue(MusEGlobal::config.geometryMain.height()); - - transportX->setValue(MusEGlobal::config.geometryTransport.x()); - transportY->setValue(MusEGlobal::config.geometryTransport.y()); - - bigtimeX->setValue(MusEGlobal::config.geometryBigTime.x()); - bigtimeY->setValue(MusEGlobal::config.geometryBigTime.y()); - bigtimeW->setValue(MusEGlobal::config.geometryBigTime.width()); - bigtimeH->setValue(MusEGlobal::config.geometryBigTime.height()); - - //mixerX->setValue(MusEGlobal::config.geometryMixer.x()); - //mixerY->setValue(MusEGlobal::config.geometryMixer.y()); - //mixerW->setValue(MusEGlobal::config.geometryMixer.width()); - //mixerH->setValue(MusEGlobal::config.geometryMixer.height()); - mixerX->setValue(MusEGlobal::config.mixer1.geometry.x()); - mixerY->setValue(MusEGlobal::config.mixer1.geometry.y()); - mixerW->setValue(MusEGlobal::config.mixer1.geometry.width()); - mixerH->setValue(MusEGlobal::config.mixer1.geometry.height()); - mixer2X->setValue(MusEGlobal::config.mixer2.geometry.x()); - mixer2Y->setValue(MusEGlobal::config.mixer2.geometry.y()); - mixer2W->setValue(MusEGlobal::config.mixer2.geometry.width()); - mixer2H->setValue(MusEGlobal::config.mixer2.geometry.height()); - - //setMixerCurrent->setEnabled(MusEGlobal::muse->mixerWindow()); - setMixerCurrent->setEnabled(MusEGlobal::muse->mixer1Window()); - setMixer2Current->setEnabled(MusEGlobal::muse->mixer2Window()); - - setBigtimeCurrent->setEnabled(MusEGlobal::muse->bigtimeWindow()); - setTransportCurrent->setEnabled(MusEGlobal::muse->transportWindow()); - - showSplash->setChecked(MusEGlobal::config.showSplashScreen); - showDidYouKnow->setChecked(MusEGlobal::config.showDidYouKnow); - externalWavEditorSelect->setText(MusEGlobal::config.externalWavEditor); - oldStyleStopCheckBox->setChecked(MusEGlobal::config.useOldStyleStopShortCut); - moveArmedCheckBox->setChecked(MusEGlobal::config.moveArmedCheckBox); - projectSaveCheckBox->setChecked(MusEGlobal::config.useProjectSaveDialog); - popsDefStayOpenCheckBox->setChecked(MusEGlobal::config.popupsDefaultStayOpen); - lmbDecreasesCheckBox->setChecked(MusEGlobal::config.leftMouseButtonCanDecrease); - rangeMarkerWithoutMMBCheckBox->setChecked(MusEGlobal::config.rangeMarkerWithoutMMB); - - addHiddenCheckBox->setChecked(MusEGlobal::config.addHiddenTracks); - unhideTracksCheckBox->setChecked(MusEGlobal::config.unhideTracks); - - switch (MusEGlobal::config.drumTrackPreference) - { - case MusEGlobal::ONLY_NEW: onlyNewDrumBtn->setChecked(true); break; - case MusEGlobal::ONLY_OLD: onlyOldDrumBtn->setChecked(true); break; - case MusEGlobal::PREFER_NEW: preferNewDrumBtn->setChecked(true); break; - case MusEGlobal::PREFER_OLD: preferOldDrumBtn->setChecked(true); break; - } - - //updateSettings(); // TESTING - connect(projDirOpenToolButton, SIGNAL(clicked()), SLOT(browseProjDir())); connect(applyButton, SIGNAL(clicked()), SLOT(apply())); @@ -279,7 +159,7 @@ void GlobalSettingsConfig::updateSettings() //DummyAudioDevice* dad = dynamic_cast(audioDevice); //dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---"); - //dummyAudioRealRate->setText(QString().setNum(sampleRate)); // Not used any more. p4.0.20 + //dummyAudioRealRate->setText(QString().setNum(sampleRate)); // Not used any more. p4.0.20 DELETETHIS? projDirEntry->setText(MusEGlobal::config.projectBaseFolder); @@ -290,7 +170,6 @@ void GlobalSettingsConfig::updateSettings() showTransport->setChecked(MusEGlobal::config.transportVisible); showBigtime->setChecked(MusEGlobal::config.bigTimeVisible); - //showMixer->setChecked(MusEGlobal::config.mixerVisible); showMixer->setChecked(MusEGlobal::config.mixer1Visible); showMixer2->setChecked(MusEGlobal::config.mixer2Visible); @@ -307,10 +186,6 @@ void GlobalSettingsConfig::updateSettings() bigtimeW->setValue(MusEGlobal::config.geometryBigTime.width()); bigtimeH->setValue(MusEGlobal::config.geometryBigTime.height()); - //mixerX->setValue(MusEGlobal::config.geometryMixer.x()); - //mixerY->setValue(MusEGlobal::config.geometryMixer.y()); - //mixerW->setValue(MusEGlobal::config.geometryMixer.width()); - //mixerH->setValue(MusEGlobal::config.geometryMixer.height()); mixerX->setValue(MusEGlobal::config.mixer1.geometry.x()); mixerY->setValue(MusEGlobal::config.mixer1.geometry.y()); mixerW->setValue(MusEGlobal::config.mixer1.geometry.width()); @@ -320,7 +195,6 @@ void GlobalSettingsConfig::updateSettings() mixer2W->setValue(MusEGlobal::config.mixer2.geometry.width()); mixer2H->setValue(MusEGlobal::config.mixer2.geometry.height()); - //setMixerCurrent->setEnabled(MusEGlobal::muse->mixerWindow()); setMixerCurrent->setEnabled(MusEGlobal::muse->mixer1Window()); setMixer2Current->setEnabled(MusEGlobal::muse->mixer2Window()); @@ -336,6 +210,7 @@ void GlobalSettingsConfig::updateSettings() popsDefStayOpenCheckBox->setChecked(MusEGlobal::config.popupsDefaultStayOpen); lmbDecreasesCheckBox->setChecked(MusEGlobal::config.leftMouseButtonCanDecrease); rangeMarkerWithoutMMBCheckBox->setChecked(MusEGlobal::config.rangeMarkerWithoutMMB); + smartFocusCheckBox->setChecked(MusEGlobal::config.smartFocus); addHiddenCheckBox->setChecked(MusEGlobal::config.addHiddenTracks); unhideTracksCheckBox->setChecked(MusEGlobal::config.unhideTracks); @@ -370,7 +245,7 @@ void GlobalSettingsConfig::applyMdiSettings() void GlobalSettingsConfig::showEvent(QShowEvent* e) { QDialog::showEvent(e); - //updateSettings(); // TESTING + updateSettings(); } //--------------------------------------------------------- @@ -408,7 +283,6 @@ void GlobalSettingsConfig::apply() MusEGlobal::config.transportVisible = showTransport->isChecked(); MusEGlobal::config.bigTimeVisible = showBigtime->isChecked(); - //MusEGlobal::config.mixerVisible = showMixer->isChecked(); MusEGlobal::config.mixer1Visible = showMixer->isChecked(); MusEGlobal::config.mixer2Visible = showMixer2->isChecked(); @@ -427,10 +301,6 @@ void GlobalSettingsConfig::apply() MusEGlobal::config.geometryBigTime.setWidth(bigtimeW->value()); MusEGlobal::config.geometryBigTime.setHeight(bigtimeH->value()); - //MusEGlobal::config.geometryMixer.setX(mixerX->value()); - //MusEGlobal::config.geometryMixer.setY(mixerY->value()); - //MusEGlobal::config.geometryMixer.setWidth(mixerW->value()); - //MusEGlobal::config.geometryMixer.setHeight(mixerH->value()); MusEGlobal::config.mixer1.geometry.setX(mixerX->value()); MusEGlobal::config.mixer1.geometry.setY(mixerY->value()); MusEGlobal::config.mixer1.geometry.setWidth(mixerW->value()); @@ -449,11 +319,11 @@ void GlobalSettingsConfig::apply() MusEGlobal::config.popupsDefaultStayOpen = popsDefStayOpenCheckBox->isChecked(); MusEGlobal::config.leftMouseButtonCanDecrease = lmbDecreasesCheckBox->isChecked(); MusEGlobal::config.rangeMarkerWithoutMMB = rangeMarkerWithoutMMBCheckBox->isChecked(); + MusEGlobal::config.smartFocus = smartFocusCheckBox->isChecked(); MusEGlobal::config.addHiddenTracks = addHiddenCheckBox->isChecked(); MusEGlobal::config.unhideTracks = unhideTracksCheckBox->isChecked(); - //MusEGlobal::muse->showMixer(MusEGlobal::config.mixerVisible); MusEGlobal::muse->showMixer1(MusEGlobal::config.mixer1Visible); MusEGlobal::muse->showMixer2(MusEGlobal::config.mixer2Visible); @@ -464,11 +334,6 @@ void GlobalSettingsConfig::apply() w->resize(MusEGlobal::config.geometryTransport.size()); w->move(MusEGlobal::config.geometryTransport.topLeft()); } - //w = MusEGlobal::muse->mixerWindow(); - //if (w) { - // w->resize(MusEGlobal::config.geometryMixer.size()); - // w->move(MusEGlobal::config.geometryMixer.topLeft()); - // } w = MusEGlobal::muse->mixer1Window(); if (w) { w->resize(MusEGlobal::config.mixer1.geometry.size()); diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui index aec753f1..2803c198 100644 --- a/muse2/muse/widgets/gensetbase.ui +++ b/muse2/muse/widgets/gensetbase.ui @@ -1470,6 +1470,49 @@ left button behave like the middle button in such areas. + + + + Smart focus (restart required) + + + false + + + + + + + + 0 + 0 + + + + + + + Smart focus + + + After editing, controls will return + focus to their respective canvas + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/muse2/muse/widgets/knob.cpp b/muse2/muse/widgets/knob.cpp index e53e1a05..1c35a3c2 100644 --- a/muse2/muse/widgets/knob.cpp +++ b/muse2/muse/widgets/knob.cpp @@ -340,6 +340,7 @@ void Knob::mousePressEvent(QMouseEvent *e) } setValue(v * halfRange + midValue); SliderBase::valueChange(); + emit sliderMoved(value(),id()); // sliderMoved is used by auxChanged // fake a left-click to make the knob still "stick" to // the mouse. diff --git a/muse2/muse/widgets/midisync.ui b/muse2/muse/widgets/midisync.ui index 81d7451e..a7464aaf 100644 --- a/muse2/muse/widgets/midisync.ui +++ b/muse2/muse/widgets/midisync.ui @@ -391,7 +391,7 @@ Enabled inputs in the list will - Note: Sync delay and MTC sync currently not fully implemeted + Note: Sync delay and MTC sync currently not fully implemented Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp index c02bd7f1..06bf10d2 100644 --- a/muse2/muse/widgets/mtrackinfo.cpp +++ b/muse2/muse/widgets/mtrackinfo.cpp @@ -104,18 +104,43 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, MusECore::Track* sel_track) : QWid //iChanDetectLabel->setPixmap(*darkgreendotIcon); iChanDetectLabel->setPixmap(*darkRedLedIcon); + recEchoButton->setFocusPolicy(Qt::NoFocus); recEchoButton->setIcon((selected && ((MusECore::MidiTrack*)selected)->recEcho()) ? QIcon(*midiThruOnIcon) : QIcon(*midiThruOffIcon)); recEchoButton->setIconSize(midiThruOnIcon->size()); //recEchoButton->setOffPixmap(midiThruOffIcon); //recEchoButton->setOnPixmap(midiThruOnIcon); + iRButton->setFocusPolicy(Qt::NoFocus); iRButton->setIcon(QIcon(*routesMidiInIcon)); iRButton->setIconSize(routesMidiInIcon->size()); //iRButton->setOffPixmap(routesMidiInIcon); + oRButton->setFocusPolicy(Qt::NoFocus); oRButton->setIcon(QIcon(*routesMidiOutIcon)); oRButton->setIconSize(routesMidiOutIcon->size()); //oRButton->setOffPixmap(routesMidiOutIcon); + + recordButton->setFocusPolicy(Qt::NoFocus); + progRecButton->setFocusPolicy(Qt::NoFocus); + volRecButton->setFocusPolicy(Qt::NoFocus); + panRecButton->setFocusPolicy(Qt::NoFocus); + + iOutput->setFocusPolicy(Qt::StrongFocus); + iOutputChannel->setFocusPolicy(Qt::StrongFocus); + iHBank->setFocusPolicy(Qt::StrongFocus); + iLBank->setFocusPolicy(Qt::StrongFocus); + iProgram->setFocusPolicy(Qt::StrongFocus); + iHBank->setFocusPolicy(Qt::StrongFocus); + iLBank->setFocusPolicy(Qt::StrongFocus); + iProgram->setFocusPolicy(Qt::StrongFocus); + iLautst->setFocusPolicy(Qt::StrongFocus); + iLautst->setFocusPolicy(Qt::StrongFocus); + iTransp->setFocusPolicy(Qt::StrongFocus); + iAnschl->setFocusPolicy(Qt::StrongFocus); + iVerz->setFocusPolicy(Qt::StrongFocus); + iLen->setFocusPolicy(Qt::StrongFocus); + iKompr->setFocusPolicy(Qt::StrongFocus); + iPan->setFocusPolicy(Qt::StrongFocus); // MusE-2: AlignCenter and WordBreak are set in the ui(3) file, but not supported by QLabel. Turn them on here. trackNameLabel->setAlignment(Qt::AlignCenter); @@ -180,18 +205,18 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, MusECore::Track* sel_track) : QWid connect(iHBank, SIGNAL(valueChanged(int)), SLOT(iProgHBankChanged())); connect(iLBank, SIGNAL(valueChanged(int)), SLOT(iProgLBankChanged())); connect(iProgram, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); - connect(iHBank, SIGNAL(doubleClicked()), SLOT(iProgramDoubleClicked())); - connect(iLBank, SIGNAL(doubleClicked()), SLOT(iProgramDoubleClicked())); - connect(iProgram, SIGNAL(doubleClicked()), SLOT(iProgramDoubleClicked())); + connect(iHBank, SIGNAL(ctrlClicked()), SLOT(iProgramDoubleClicked())); + connect(iLBank, SIGNAL(ctrlClicked()), SLOT(iProgramDoubleClicked())); + connect(iProgram, SIGNAL(ctrlClicked()), SLOT(iProgramDoubleClicked())); connect(iLautst, SIGNAL(valueChanged(int)), SLOT(iLautstChanged(int))); - connect(iLautst, SIGNAL(doubleClicked()), SLOT(iLautstDoubleClicked())); + connect(iLautst, SIGNAL(ctrlClicked()), SLOT(iLautstDoubleClicked())); connect(iTransp, SIGNAL(valueChanged(int)), SLOT(iTranspChanged(int))); connect(iAnschl, SIGNAL(valueChanged(int)), SLOT(iAnschlChanged(int))); connect(iVerz, SIGNAL(valueChanged(int)), SLOT(iVerzChanged(int))); connect(iLen, SIGNAL(valueChanged(int)), SLOT(iLenChanged(int))); connect(iKompr, SIGNAL(valueChanged(int)), SLOT(iKomprChanged(int))); connect(iPan, SIGNAL(valueChanged(int)), SLOT(iPanChanged(int))); - connect(iPan, SIGNAL(doubleClicked()), SLOT(iPanDoubleClicked())); + connect(iPan, SIGNAL(ctrlClicked()), SLOT(iPanDoubleClicked())); connect(iOutput, SIGNAL(activated(int)), SLOT(iOutputPortChanged(int))); ///connect(iInput, SIGNAL(textChanged(const QString&)), SLOT(iInputPortChanged(const QString&))); connect(recordButton, SIGNAL(clicked()), SLOT(recordClicked())); @@ -200,6 +225,38 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, MusECore::Track* sel_track) : QWid connect(panRecButton, SIGNAL(clicked()), SLOT(panRecClicked())); connect(recEchoButton, SIGNAL(toggled(bool)), SLOT(recEchoToggled(bool))); connect(iRButton, SIGNAL(pressed()), SLOT(inRoutesPressed())); + + connect(iOutputChannel, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iHBank, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iLBank, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iProgram, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iHBank, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iLBank, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iProgram, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iLautst, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iLautst, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iTransp, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iAnschl, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iVerz, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iLen, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iKompr, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(iPan, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + + connect(iOutputChannel, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iHBank, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iLBank, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iProgram, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iHBank, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iLBank, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iProgram, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iLautst, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iLautst, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iTransp, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iAnschl, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iVerz, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iLen, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iKompr, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(iPan, SIGNAL(escapePressed()), SIGNAL(escapePressed())); // TODO: Works OK, but disabled for now, until we figure out what to do about multiple out routes and display values... // Enabled (for Midi Port to Audio Input routing). p4.0.14 Tim. diff --git a/muse2/muse/widgets/mtrackinfo.h b/muse2/muse/widgets/mtrackinfo.h index b816f289..a38dcf20 100644 --- a/muse2/muse/widgets/mtrackinfo.h +++ b/muse2/muse/widgets/mtrackinfo.h @@ -80,6 +80,10 @@ class MidiTrackInfo : public QWidget, public Ui::MidiTrackInfoBase void configChanged(); void songChanged(int); + signals: + void returnPressed(); + void escapePressed(); + public: MidiTrackInfo(QWidget*, MusECore::Track* = 0); MusECore::Track* track() const { return selected; } diff --git a/muse2/muse/widgets/mtrackinfobase.ui b/muse2/muse/widgets/mtrackinfobase.ui index 0bf58d76..c9298a5f 100644 --- a/muse2/muse/widgets/mtrackinfobase.ui +++ b/muse2/muse/widgets/mtrackinfobase.ui @@ -588,7 +588,7 @@ - Bank Select MSB. Double-click on/off. + Bank Select MSB. Ctrl-click on/off. false @@ -641,7 +641,7 @@ - Bank Select LSB. Double-click on/off. + Bank Select LSB. Ctrl-click on/off. false @@ -694,7 +694,7 @@ - Program. Double-click on/off. + Program. Ctrl-click on/off. false @@ -761,7 +761,7 @@ - Volume. Double-click on/off. + Volume. Ctrl-click on/off. false @@ -828,10 +828,10 @@ - Change stereo position. Double-click on/off. + Change stereo position. Ctrl-click on/off. - Change stereo position. Double-click on/off. + Change stereo position. Ctrl-click on/off. false diff --git a/muse2/muse/widgets/musewidgetsplug.cpp b/muse2/muse/widgets/musewidgetsplug.cpp index 6cdc3812..398b6f5c 100644 --- a/muse2/muse/widgets/musewidgetsplug.cpp +++ b/muse2/muse/widgets/musewidgetsplug.cpp @@ -221,7 +221,8 @@ MusEGlobal::GlobalConfigValues config = { MusECore::DONT_REC_MUTED_OR_HIDDEN, true, // addHiddenTracks true, // unhideTracks - MusEGlobal::PREFER_NEW // drumTrackPreference + MusEGlobal::PREFER_NEW, // drumTrackPreference + false // smartFocus }; //--------------------------------------------------------- diff --git a/muse2/muse/widgets/noteinfo.cpp b/muse2/muse/widgets/noteinfo.cpp index 1411b7b5..a5002540 100644 --- a/muse2/muse/widgets/noteinfo.cpp +++ b/muse2/muse/widgets/noteinfo.cpp @@ -45,7 +45,7 @@ NoteInfo::NoteInfo(QWidget* parent) { setObjectName("Note Info"); deltaMode = false; - + //QLabel* label = new QLabel(tr("Start"), this, "Start"); QLabel* label = new QLabel(tr("Start")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -55,6 +55,7 @@ NoteInfo::NoteInfo(QWidget* parent) //selTime = new PosEdit(this, "Start"); ///selTime = new PosEdit(0, "Start"); selTime = new Awl::PosEdit; + selTime->setFocusPolicy(Qt::StrongFocus); selTime->setObjectName("Start"); addWidget(selTime); @@ -65,7 +66,8 @@ NoteInfo::NoteInfo(QWidget* parent) label->setIndent(3); addWidget(label); //selLen = new QSpinBox(0, 100000, 1, this); - selLen = new QSpinBox(); + selLen = new SpinBox(); + selLen->setFocusPolicy(Qt::StrongFocus); selLen->setRange(0, 100000); selLen->setSingleStep(1); addWidget(selLen); @@ -77,6 +79,8 @@ NoteInfo::NoteInfo(QWidget* parent) addWidget(label); //selPitch = new PitchEdit(this, "selPitch"); selPitch = new PitchEdit; + selPitch->setFocusPolicy(Qt::StrongFocus); + selPitch->setDeltaMode(deltaMode); addWidget(selPitch); //label = new QLabel(tr("Velo On"), this, "Velocity On"); @@ -85,7 +89,8 @@ NoteInfo::NoteInfo(QWidget* parent) label->setIndent(3); addWidget(label); //selVelOn = new QSpinBox(0, 127, 1, this); - selVelOn = new QSpinBox(); + selVelOn = new SpinBox(); + selVelOn->setFocusPolicy(Qt::StrongFocus); selVelOn->setRange(0, 127); selVelOn->setSingleStep(1); addWidget(selVelOn); @@ -96,7 +101,8 @@ NoteInfo::NoteInfo(QWidget* parent) label->setIndent(3); addWidget(label); //selVelOff = new QSpinBox(0, 127, 1, this); - selVelOff = new QSpinBox(); + selVelOff = new SpinBox(); + selVelOff->setFocusPolicy(Qt::StrongFocus); selVelOff->setRange(0, 127); selVelOff->setSingleStep(1); addWidget(selVelOff); @@ -106,6 +112,18 @@ NoteInfo::NoteInfo(QWidget* parent) connect(selVelOn, SIGNAL(valueChanged(int)), SLOT(velOnChanged(int))); connect(selVelOff, SIGNAL(valueChanged(int)), SLOT(velOffChanged(int))); connect(selTime, SIGNAL(valueChanged(const MusECore::Pos&)), SLOT(timeChanged(const MusECore::Pos&))); + + connect(selLen, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(selPitch, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(selVelOn, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(selVelOff, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(selTime, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + + connect(selLen, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(selPitch, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(selVelOn, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(selVelOff, SIGNAL(escapePressed()), SIGNAL(escapePressed())); + connect(selTime, SIGNAL(escapePressed()), SIGNAL(escapePressed())); } //--------------------------------------------------------- @@ -114,6 +132,8 @@ NoteInfo::NoteInfo(QWidget* parent) void NoteInfo::setDeltaMode(bool val) { + if(val == deltaMode) + return; deltaMode = val; selPitch->setDeltaMode(val); if (val) { diff --git a/muse2/muse/widgets/noteinfo.h b/muse2/muse/widgets/noteinfo.h index 078ba85c..56079f34 100644 --- a/muse2/muse/widgets/noteinfo.h +++ b/muse2/muse/widgets/noteinfo.h @@ -29,8 +29,6 @@ namespace Awl { //class PitchEdit; }; -class QSpinBox; - ///class PosEdit; namespace MusECore { class Pos; @@ -39,6 +37,7 @@ class Pos; namespace MusEGui { class PitchEdit; +class SpinBox; //--------------------------------------------------------- // NoteInfo @@ -46,17 +45,15 @@ class PitchEdit; class NoteInfo : public QToolBar { Q_OBJECT - + ///PosEdit* selTime; Awl::PosEdit* selTime; - QSpinBox* selLen; + SpinBox* selLen; PitchEdit* selPitch; - QSpinBox* selVelOn; - QSpinBox* selVelOff; + SpinBox* selVelOn; + SpinBox* selVelOff; bool deltaMode; - - public: enum ValType {VAL_TIME, VAL_LEN, VAL_VELON, VAL_VELOFF, VAL_PITCH }; //NoteInfo(QMainWindow* parent); @@ -76,6 +73,8 @@ class NoteInfo : public QToolBar { signals: void valueChanged(MusEGui::NoteInfo::ValType, int); + void returnPressed(); + void escapePressed(); }; } // namespace MusEGui diff --git a/muse2/muse/widgets/pitchedit.cpp b/muse2/muse/widgets/pitchedit.cpp index 3cbe882e..dd7524a2 100644 --- a/muse2/muse/widgets/pitchedit.cpp +++ b/muse2/muse/widgets/pitchedit.cpp @@ -31,7 +31,7 @@ namespace MusEGui { //--------------------------------------------------------- PitchEdit::PitchEdit(QWidget* parent) - : QSpinBox(parent) + : SpinBox(parent) { setMinimum(0); setMaximum(127); diff --git a/muse2/muse/widgets/pitchedit.h b/muse2/muse/widgets/pitchedit.h index bcd77100..83e117fd 100644 --- a/muse2/muse/widgets/pitchedit.h +++ b/muse2/muse/widgets/pitchedit.h @@ -23,7 +23,7 @@ #ifndef __PITCHEDIT_H__ #define __PITCHEDIT_H__ -#include +#include "spinbox.h" namespace MusEGui { @@ -31,7 +31,7 @@ namespace MusEGui { // PitchEdit //--------------------------------------------------------- -class PitchEdit : public QSpinBox { +class PitchEdit : public SpinBox { Q_OBJECT bool deltaMode; diff --git a/muse2/muse/widgets/projectcreate.ui b/muse2/muse/widgets/projectcreate.ui index d03f093c..7d42628e 100644 --- a/muse2/muse/widgets/projectcreate.ui +++ b/muse2/muse/widgets/projectcreate.ui @@ -7,197 +7,208 @@ 0 0 569 - 340 + 378 Create Project - + - + - - - - - Projects folder: - - - - - - - true - - - - - - - ... - - - - + + + Projects folder: + + + + + + + true + + - + + + ... + + + + + + + + + 6 + + + 0 + + + + + Project Name: + + + + + + + Project is a Template + + + + + Qt::Horizontal + + QSizePolicy::Minimum + + + + 60 + 20 + + + + + + + + Write window state + + + true + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + Project song file type: + - - - - - Project Name: - - - - - - - - - - Project is a Template - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 60 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Project Path to song file: + + - - - - - Project song file type: - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - - Project Path to song file: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Create project folder (recommended for audio projects) - - - - + + + Create project folder (recommended for audio projects) + + + + + + - - - - - true - - - - - - - ... - - - - - - - ... - - - - + + + true + + - + - Song information: + ... - + + + ... + + + + + + + + Song information: + + + + + + + + - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + - projectNameEdit templateCheckBox projectFileTypeCB createFolderCheckbox diff --git a/muse2/muse/widgets/projectcreateimpl.cpp b/muse2/muse/widgets/projectcreateimpl.cpp index 665d725e..d34ccd2d 100644 --- a/muse2/muse/widgets/projectcreateimpl.cpp +++ b/muse2/muse/widgets/projectcreateimpl.cpp @@ -76,7 +76,7 @@ ProjectCreateImpl::ProjectCreateImpl(QWidget *parent) : //createFolderCheckbox->setChecked(MusEGlobal::config.projectStoreInFolder && is_new); // Suggest no folder if not new. - connect(templateCheckBox,SIGNAL(clicked()), this, SLOT(templateButtonChanged())); + connect(templateCheckBox,SIGNAL(toggled(bool)), this, SLOT(templateButtonChanged(bool))); //connect(templateCheckBox,SIGNAL(clicked()), this, SLOT(updateDirectoryPath())); connect(projDirToolButton,SIGNAL(clicked()), this, SLOT(browseProjDir())); connect(restorePathButton,SIGNAL(clicked()), this, SLOT(restorePath())); @@ -215,9 +215,10 @@ void ProjectCreateImpl::browseProjDir() } } -void ProjectCreateImpl::templateButtonChanged() +void ProjectCreateImpl::templateButtonChanged(bool v) { - restorePathButton->setEnabled(templateCheckBox->isChecked() ? !overrideTemplDirPath.isEmpty() : !overrideDirPath.isEmpty()); + restorePathButton->setEnabled(v ? !overrideTemplDirPath.isEmpty() : !overrideDirPath.isEmpty()); + winStateCheckbox->setChecked(!v); updateDirectoryPath(); } @@ -231,12 +232,18 @@ void ProjectCreateImpl::restorePath() updateDirectoryPath(); } -/* -bool ProjectCreateImpl::getProjectIsTemplate() const + +bool ProjectCreateImpl::getWriteTopwins() const { - return templateCheckBox->isChecked(); + return winStateCheckbox->isChecked(); } +void ProjectCreateImpl::setWriteTopwins(bool v) +{ + winStateCheckbox->setChecked(v); +} + +/* QString ProjectCreateImpl::getTemplatePath() const { return templDirPath; diff --git a/muse2/muse/widgets/projectcreateimpl.h b/muse2/muse/widgets/projectcreateimpl.h index f08cb1bc..3cee0c52 100644 --- a/muse2/muse/widgets/projectcreateimpl.h +++ b/muse2/muse/widgets/projectcreateimpl.h @@ -42,7 +42,8 @@ public: explicit ProjectCreateImpl(QWidget *parent = 0); QString getProjectPath() const; QString getSongInfo() const; - //bool getProjectIsTemplate() const; + bool getWriteTopwins() const; + void setWriteTopwins(bool); //QString getTemplatePath() const; signals: @@ -54,7 +55,7 @@ protected slots: void ok(); void createProjFolderChanged(); void browseProjDir(); - void templateButtonChanged(); + void templateButtonChanged(bool); void restorePath(); }; diff --git a/muse2/muse/widgets/routepopup.cpp b/muse2/muse/widgets/routepopup.cpp index 3e2ad008..72bcb05d 100644 --- a/muse2/muse/widgets/routepopup.cpp +++ b/muse2/muse/widgets/routepopup.cpp @@ -671,7 +671,7 @@ int RoutePopupMenu::addMidiPorts(MusECore::AudioTrack* t, PopupMenu* pup, int id #ifdef _USE_CUSTOM_WIDGET_ACTIONS_ - PixmapButtonsWidgetAction* wa = new PixmapButtonsWidgetAction(QString::number(i + 1) + ":" + md->name(), + PixmapButtonsWidgetAction* wa = new PixmapButtonsWidgetAction(QString::number(i + 1) + ":" + (md ? md->name() : tr("")), redLedIcon, darkRedLedIcon,MIDI_CHANNELS, chanmask, pup); MusECore::Route srcRoute(i, 0); // Ignore the routing channels - our action holds the channels. //wa->setData(id++); @@ -1331,7 +1331,7 @@ void RoutePopupMenu::prepare() #ifdef _USE_CUSTOM_WIDGET_ACTIONS_ - PixmapButtonsWidgetAction* wa = new PixmapButtonsWidgetAction(QString::number(i + 1) + ":" + md->name(), + PixmapButtonsWidgetAction* wa = new PixmapButtonsWidgetAction(QString::number(i + 1) + ":" + (md ? md->name() : tr("")), redLedIcon, darkRedLedIcon, MIDI_CHANNELS, chanmask, this); MusECore::Route srcRoute(i, 0); // Ignore the routing channels - our action holds the channels. //wa->setData(id++); diff --git a/muse2/muse/widgets/spinbox.cpp b/muse2/muse/widgets/spinbox.cpp index 730e4828..b0b5d4ce 100644 --- a/muse2/muse/widgets/spinbox.cpp +++ b/muse2/muse/widgets/spinbox.cpp @@ -22,10 +22,28 @@ #include #include +#include +#include #include "spinbox.h" namespace MusEGui { +//void SpinBoxLineEdit::mouseDoubleClickEvent(QMouseEvent* e) +//{ +// QLineEdit::mouseDoubleClickEvent(e); +// emit doubleClicked(); +// if((e->buttons() & Qt::LeftButton) && (e->modifiers() & Qt::ControlModifier)) +// emit ctrlDoubleClicked(); +//} + +void SpinBoxLineEdit::mousePressEvent(QMouseEvent* e) +{ + QLineEdit::mousePressEvent(e); + //selectAll(); + if((e->buttons() & Qt::LeftButton) && (e->modifiers() & Qt::ControlModifier)) + emit ctrlClicked(); +} + //--------------------------------------------------------- // SpinBox //--------------------------------------------------------- @@ -33,85 +51,54 @@ namespace MusEGui { SpinBox::SpinBox(QWidget* parent) : QSpinBox(parent) { - _clearFocus = true; + SpinBoxLineEdit* le = new SpinBoxLineEdit(this); + setLineEdit(le); + setKeyboardTracking(false); + + //connect(le, SIGNAL(doubleClicked()), this, SIGNAL(doubleClicked())); + //connect(le, SIGNAL(ctrlDoubleClicked()), this, SIGNAL(ctrlDoubleClicked())); + connect(le, SIGNAL(ctrlClicked()), this, SIGNAL(ctrlClicked())); } SpinBox::SpinBox(int minValue, int maxValue, int step, QWidget* parent) : QSpinBox(parent) { + SpinBoxLineEdit* le = new SpinBoxLineEdit(this); + setLineEdit(le); setRange(minValue, maxValue); setSingleStep(step); - _clearFocus = true; -} + setKeyboardTracking(false); -bool SpinBox::eventFilter(QObject* o, QEvent* ev) -{ - // if (o != (QObject*)editor()) ddskrjo can't find editor() - // return QSpinBox::eventFilter(o,ev); - - bool retval = false; - if(ev->type() == QEvent::KeyPress) - { - QKeyEvent* k = (QKeyEvent*)ev; - if(k->key() == Qt::Key_Up || k->key() == Qt::Key_Down) - { - // stepUp/stepDown will be called. Set this now. - _clearFocus = false; - } - else if (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return) - { - // With this line, two enter presses after an edit will clear focus. - // Without, just one enter press clears the focus. - //if(!editor()->isModified()) - { - clearFocus(); - return true; - } - } - } - else - if(ev->type() == QEvent::MouseButtonDblClick) - { - emit doubleClicked(); - return true; - } - - retval = QSpinBox::eventFilter(o, ev); - - return retval; -} - -void SpinBox::stepUp() -{ - QSpinBox::stepUp(); - if(_clearFocus) - clearFocus(); - else - _clearFocus = true; -} - -void SpinBox::stepDown() -{ - QSpinBox::stepDown(); - if(_clearFocus) - clearFocus(); - else - _clearFocus = true; + //connect(le, SIGNAL(doubleClicked()), this, SIGNAL(doubleClicked())); + //connect(le, SIGNAL(ctrlDoubleClicked()), this, SIGNAL(ctrlDoubleClicked())); + connect(le, SIGNAL(ctrlClicked()), this, SIGNAL(ctrlClicked())); } void SpinBox::keyPressEvent(QKeyEvent* ev) { switch (ev->key()) { case Qt::Key_Return: - clearFocus(); - //emit returnPressed(); - // return; - break; + QSpinBox::keyPressEvent(ev); + emit returnPressed(); + return; + break; + case Qt::Key_Escape: + emit escapePressed(); + return; + break; default: - break; + break; } QSpinBox::keyPressEvent(ev); } +void SpinBox::wheelEvent(QWheelEvent* e) +{ + QSpinBox::wheelEvent(e); + // Need this because Qt doesn't deselect the text if not focused. + if(!hasFocus() && lineEdit()) + lineEdit()->deselect(); +} + } // namespace MusEGui diff --git a/muse2/muse/widgets/spinbox.h b/muse2/muse/widgets/spinbox.h index cd37fb32..261ba05e 100644 --- a/muse2/muse/widgets/spinbox.h +++ b/muse2/muse/widgets/spinbox.h @@ -24,14 +24,43 @@ // Click up/down, or mousewheel, or hit enter with un-modified text (which means enter TWICE for modified text), // and the control will give up focus, thereby allowing you to use global shortcut keys afterwards. // Up/down keys still keep the focus. +// +// < Old. That was the SpinBox behaviour in MusE1 (Qt3). They are still desirable goals for MusE2 (Qt4). +// < Flaw: Calling clearFocus() means nothing has focus, not canvases, not even the active top level window. We want canvases to have it. +// < That requires (here in MusE2) setting top win focus proxies and using Application::focusChanged() to redirect focus to the +// < active window's proxy. +// < Very ugly. And with MDI, even more complicated to give focus back to current sub-window. Tried, was crash-prone. +// < Also, toolbars can be floated, so calling clearFocus() from a SpinBox on a floating toolbar means nothing has focus but the +// < toolbar itself is the active window, which requires setting a focus proxy on the toolbar so that Application::focusChanged() +// < can figure out who to give the focus to! +// < It seems we will have to use signals/slots instead of clearFocus()... +// < Flaw: Clearing focus when up/down clicked (when stepBy() is called), auto-repeat might not work because the control has lost focus. + #ifndef __SPINBOX_H__ #define __SPINBOX_H__ #include -#include +#include namespace MusEGui { +class SpinBoxLineEdit : public QLineEdit +{ + Q_OBJECT + + protected: + //virtual void mouseDoubleClickEvent(QMouseEvent* e); + virtual void mousePressEvent(QMouseEvent* e); + + signals: + //void doubleClicked(); + //void ctrlDoubleClicked(); + void ctrlClicked(); + + public: + SpinBoxLineEdit(QWidget* parent = 0) : QLineEdit(parent) {}; +}; + //--------------------------------------------------------- // SpinBox //--------------------------------------------------------- @@ -39,18 +68,16 @@ namespace MusEGui { class SpinBox : public QSpinBox { Q_OBJECT - bool _clearFocus; - protected: - bool eventFilter(QObject* obj, QEvent* ev); virtual void keyPressEvent(QKeyEvent*); + virtual void wheelEvent(QWheelEvent*); - public slots: - virtual void stepUp(); - virtual void stepDown(); - signals: - void doubleClicked(); + //void doubleClicked(); + //void ctrlDoubleClicked(); + void ctrlClicked(); + void returnPressed(); + void escapePressed(); public: SpinBox(QWidget* parent=0); diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp index 589726a9..60140ee2 100644 --- a/muse2/muse/widgets/tb1.cpp +++ b/muse2/muse/widgets/tb1.cpp @@ -69,6 +69,7 @@ Toolbar1::Toolbar1(QWidget* parent, int r, bool sp) solo = new QToolButton(); solo->setText(tr("Solo")); solo->setCheckable(true); + solo->setFocusPolicy(Qt::NoFocus); addWidget(solo); //--------------------------------------------------- @@ -94,6 +95,7 @@ Toolbar1::Toolbar1(QWidget* parent, int r, bool sp) //--------------------------------------------------- raster = new LabelCombo(tr("Snap"), 0); + raster->setFocusPolicy(Qt::TabFocus); rlist = new QTableWidget(10, 3); rlist->verticalHeader()->setDefaultSectionSize(22); @@ -130,6 +132,7 @@ void Toolbar1::_rasterChanged(int /*i*/) //void Toolbar1::_rasterChanged(int r, int c) { emit rasterChanged(rasterTable[rlist->currentRow() + rlist->currentColumn() * 10]); + //parentWidget()->setFocus(); //emit rasterChanged(rasterTable[r + c * 10]); } diff --git a/muse2/muse/widgets/tempolabel.cpp b/muse2/muse/widgets/tempolabel.cpp index cc628f50..565a61c1 100644 --- a/muse2/muse/widgets/tempolabel.cpp +++ b/muse2/muse/widgets/tempolabel.cpp @@ -80,7 +80,7 @@ QSize TempoLabel::sizeHint() const //--------------------------------------------------------- TempoEdit::TempoEdit(QWidget* parent) - : QDoubleSpinBox(parent) + : DoubleSpinBox(parent) { curVal = -1.0; setSingleStep(1.0); diff --git a/muse2/muse/widgets/tempolabel.h b/muse2/muse/widgets/tempolabel.h index 50d70180..555b985d 100644 --- a/muse2/muse/widgets/tempolabel.h +++ b/muse2/muse/widgets/tempolabel.h @@ -24,7 +24,7 @@ #define __TEMPOLABEL_H__ #include -#include +#include "doublespinbox.h" namespace MusEGui { @@ -54,7 +54,7 @@ class TempoLabel : public QLabel { // TempoEdit //--------------------------------------------------------- -class TempoEdit : public QDoubleSpinBox { +class TempoEdit : public DoubleSpinBox { Q_OBJECT double curVal; diff --git a/muse2/muse/xml.cpp b/muse2/muse/xml.cpp index 1a989366..6f79c3e6 100644 --- a/muse2/muse/xml.cpp +++ b/muse2/muse/xml.cpp @@ -114,11 +114,9 @@ void Xml::nextc() void Xml::token(int cc) { - //char buffer[512]; QByteArray buffer; int i = 0; - //for (; i < 511;) { for (; i < 9999999;) { // Stop at a reasonably large amount 10 million. if (c == ' ' || c == '\t' || c == cc || c == '\n' || c == EOF) break; @@ -136,7 +134,6 @@ void Xml::token(int cc) void Xml::stoken() { - //char buffer[1024*4]; QByteArray buffer; int i = 0; @@ -144,7 +141,6 @@ void Xml::stoken() ++i; next(); - //for (;i < 1024*4-1;) { for (;i < 10000000*4-1;) { // Stop at a reasonably large amount 10 million. if (c == '"') { buffer[i++] = c; @@ -216,8 +212,6 @@ QString Xml::strip(const QString& s) Xml::Token Xml::parse() { - //char buffer[1024*1024]; // increase buffer -rj - //char* p; QByteArray buffer; int idx = 0; @@ -273,21 +267,17 @@ Xml::Token Xml::parse() } if (c == '?') { next(); - //p = buffer; - //p = buffer.data(); idx = 0; for (;;) { if (c == '?' || c == EOF || c == '>') break; - //*p++ = c; buffer[idx++] = c; // TODO: check overflow next(); } - //*p = 0; buffer[idx] = 0; _s1 = QString(buffer); @@ -317,21 +307,17 @@ Xml::Token Xml::parse() } goto again; } - //p = buffer; - //p = buffer.data(); idx = 0; for (;;) { if (c == '/' || c == ' ' || c == '\t' || c == '>' || c == '\n' || c == EOF) break; // TODO: check overflow - //*p++ = c; buffer[idx++] = c; next(); } - //*p = 0; buffer[idx] = 0; _s1 = QString(buffer); @@ -382,8 +368,6 @@ Xml::Token Xml::parse() fprintf(stderr, "XML: level = 0\n"); goto error; } - //p = buffer; - //p = buffer.data(); idx = 0; for (;;) { if (c == EOF || c == '<') @@ -391,32 +375,24 @@ Xml::Token Xml::parse() if (c == '&') { next(); if (c == '<') { // be tolerant with old muse files - - //*p++ = '&'; buffer[idx++] = '&'; continue; } - //char name[32]; - //char* dp = name; QByteArray name; int name_idx = 0; - //*dp++ = c; name[name_idx++] = c; - //for (; dp-name < 31;) { for (; name_idx < 9999999;) { // Stop at a reasonably large amount 10 million. next(); if (c == ';') break; - //*dp++ = c; name[name_idx++] = c; } - //*dp = 0; name[name_idx] = 0; if (strcmp(name, "lt") == 0) @@ -432,14 +408,12 @@ Xml::Token Xml::parse() else c = '?'; } - - //*p++ = c; + buffer[idx++] = c; next(); } - //*p = 0; buffer[idx] = 0; _s1 = QString(buffer); diff --git a/muse2/share/instruments/KORG microSTATION combinations.idf b/muse2/share/instruments/KORG microSTATION combinations.idf new file mode 100755 index 00000000..ed136c06 --- /dev/null +++ b/muse2/share/instruments/KORG microSTATION combinations.idf @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/muse2/share/instruments/KORG microSTATION.idf b/muse2/share/instruments/KORG microSTATION.idf new file mode 100644 index 00000000..8bfd6b13 --- /dev/null +++ b/muse2/share/instruments/KORG microSTATION.idf @@ -0,0 +1,666 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/muse2/share/locale/muse_cs.ts b/muse2/share/locale/muse_cs.ts new file mode 100644 index 00000000..e39e8ffa --- /dev/null +++ b/muse2/share/locale/muse_cs.ts @@ -0,0 +1,16251 @@ + + + + + @default + + + Click this button to enable recording + Klepnout na toto tlačítko pro povolení režimu nahrávání + + + sets amount of quantization: +0 - no quantization +100 - full quantization + Quantisierungsstärke einstellen: +0 - keine Quantisierung +100 - volle Quantisierung + + + + select Pointer Tool: +with the pointer tool you can: + select parts + move parts + copy parts + Nástroj ukazovátka": +Tento nástroj umožňuje: + Vybrat hlasy + Přesunout části + Kopírovat hlasy + + + + Click this button to open a <em>new song</em>.<br>You can also select the <b>Open command</b> from the File menu. + Klepněte na toto tlačítko pro otevření <em>Nové písně</em>.<br> Také můžete v nabídce Soubor vybrat příkaz <b>Nová píseň</b>. + + + + Click this button to save the song you are editing. You will be prompted for a file name. +You can also select the Save command from the File menu. + Klepněte na toto tlačítko pro uložení vámi právě upravované písně s automaticky položeným dotazem na název souboru. +Také můžete v nabídce Soubor vybrat příkaz Uložit. + + + + Create New Song + Vytvořit novou píseň + + + + Click this button to stop playback + Klepněte na toto tlačítko pro zastavení přehrávání + + + + Click this button to start playback + Klepněte na toto tlačítko pro spuštění přehrávání + + + + Click this button to rewind to start position + Klepněte na toto tlačítko pro návrat na začátek + + + + Click this button to rewind + Klepněte na toto tlačítko pro skok o jeden takt zpět + + + + Click this button to forward current play position + Klepněte na toto tlačítko pro skok o jeden takt vpřed + + + don't quantize notes above this tick limit + Keine Note länger als die Taktschlagdauer quantisieren + + + quantize also note len as default + Auch die Notenlänge als Standard quantisieren + + + + loop between left mark and right mark + Smyčka mezi levou značkou a pravou značkou + + + + record starts at left mark + Začít nahrávání na levé značce + + + + record stops at right mark + Ukončit nahrávání na pravé značce + + + + rewind to start position + Skočit na začátek + + + + rewind current position + Skočit o jeden takt zpět + + + + move current position + Skočit o jeden takt vpřed + + + + stop sequencer + Zastavit přehrávání + + + + start sequencer play + Spustit přehrávání + + + + to record press record and then play + Pro nahrávání klepněte nejprve na tlačítko "Nahrávat" a potom na "Přehrávat" + + + + send note off to all midi channels + Poslat příkaz "Nota vypnuta" všem kanálům MIDI + + + + select Pencil Tool: +with the pencil tool you can: + create new parts + modify length of parts + Nástroj tužky": +Tento nástroj umožňuje: + Vytvořit nové části + Změnit délku jednotlivých hlasů + + + + select Delete Tool: +with the delete tool you can delete parts + Nástroj gumy": + Smazat části + + + + select Cut Tool: +with the cut tool you can split a part + Nástroj pro stříhání: +S tímto nástrojem se části rozdělují + + + + select Glue Tool: +with the glue tool you can glue two parts + Nástroj pro přilepení: +S tímto nástrojem se dvě jednotlivé části spojují v jednu + + + + select Score Tool: + + Nástroj pro notový zápis: + + + + + select Quantize Tool: +insert display quantize event + Nástroj pro kvantizaci: +S tímto nástrojem se vkládají události kvantizace + + + + select Drawing Tool + Nástroj tužky na kreslení + + + + select Muting Tool: +click on part to mute/unmute + Nástroj pro ztlumení: +Klepněte na část pro zapnutí/vypnutí ztlumení + + + + Manipulate automation + Pracovat na automatizaci + + + + Cursor tool + Nástroj ukazovátka + + + + pointer + Ukazovátko + + + + pencil + Tužka + + + + cutter + Střihadlo + + + + score + Notový zápis + + + + glue + Lepidlo + + + + quantize + Kvantizace + + + + draw + Tužka na kreslení + + + + mute parts + Ztlumit části + + + + edit automation + Upravit automatizaci + + + + cursor + Ukazovátko + + + + + + + + + + + Off + Vypnuto + + + presets (*.pre *.pre.gz *.pre.bz2) + Vorlagen (*.pre *.pre.gz *.pre.bz2) + + + All Files (*) + Alle Dateien (*) + + + + Add Midi Track + Vytvořit stopu MIDI + + + + Add Drum Track + Vytvořit stopu bicích + + + + Add Wave Track + Vytvořit stopu Wave + + + + Add Audio Output + Vytvořit výstup zvuku + + + + Add Audio Group + Vytvořit skupinu zvuku + + + + Add Audio Input + Vytvořit vstup zvuku + + + + Add Aux Send + Vytvořit Aux Send + + + + eraser + Guma + + + + MESS + MESS + + + + DSSI + DSSI + + + + FST + FST + + + + Add Synth + Přidat syntetizátor + + + + Bar + Takt + + + + Jack + Jack + + + + ALSA: + ALSA: + + + + SYNTH: + SYNTH: + + + + JACK: + JACK: + + + + + + + + + Route + Tok signálu + + + + + + + channel="%1" + Kanál="%1" + + + + + + + + dest + Cíl + + + + + devtype="%1" + Typ zařízení="%1" + + + + + + + + type="%1" + Typ="%1" + + + + + + + + + + name="%1"/ + Název="%1" + + + + + source + Zdroj + + + + Velocity + Rychlost + + + + <none> + <Žádný> + + + + + + channelMask="%1" + KanalMaske="%1" + + + + dssi_synth + dssi_synth + + + + ladspa_efx + ladspa_efx + + + + channels="%1" + Kanály="%1" + + + + remch="%1" + remch="%1" + + + + mport="%1"/ + mport="%1"/ + + + + + Show wave tracks + Ukázat stopy Wave + + + + + Show group tracks + Ukázat stopy skupin + + + + + Show aux tracks + Ukázat stopy Aux + + + + + Show input tracks + Ukázat vstupní stopy + + + + + Show output tracks + Ukázat výstupní stopy + + + + + Show midi tracks + Ukázat stopy MIDI + + + + + Show synth tracks + Ukázat stopy syntetizátorů + + + + AboutBox + + + AboutBox + O programu + + + Keep On Rocking! + Zurück zu MusE! + + + + Version 2 pre-alpha + Verze 2 + + + + (C) Copyright 1999-2010 Werner Schweer and others. +See http://www.muse-sequencer.org for new versions and +more information. + +Published under the GNU Public License + (C) Autorské právo 1999-2010 Werner Schweer a další. +Podívejte se na stránky http://www.muse-sequencer.org na nové verze a +kvůli více informacím. + +Zveřejněno pod GNU Public License + + + + &Keep On Rocking! + &Zůstávejte ve spojení! + + + + Alt+K + Alt+K + + + + Appearance + + + MusE: load image + MusE: Nahrát obrázek + + + + Main application font, and default font for any + controls not defined here. + Hlavní písmo programu a výchozí písmo pro +všechny ovládací prvky, které tu nejsou stanoveny. + + + + For small controls like mixer strips. +Also timescale small numbers, arranger part name overlay, + and effects rack. + Pro malé ovládací prvky, jako jsou proužky směšovače. +Také malá čísla časového rámce, vrstva názvů částí v aranžéru, +a přihrádka s efekty. + + + + Midi track info panel. Transport controls. + Informační panel stop MIDI. Ovládání přesunu. + + + + Controller graph and S/X buttons. Large numbers for time + and tempo scale, and time signature. + Ovladač a tlačítka S/X. Velká čísla pro měřítko času a tempa +a taktové označení. + + + + Time scale markers. + Značky měřítka času. + + + + List editor: meta event edit dialog multi-line edit box. + Editor seznamu:dialog pro úpravy událostí, pole pro víceřádkové úpravy. + + + + Mixer label font. Auto-font-sizing up to chosen font size. +Word-breaking but only with spaces. + Písmo směšovače. Automatická změna velikosti písma až po +vybranou velikost písma. +Zalamování slov, ale pouze mezerami. + + + + Maximum mixer label auto-font-sizing font size. + Největší velikost písma automatické velikosti písma směšovače. + + + + Global opacity (opposite of transparency). + Celková neprůhlednost (protějšek průhlednosti). + + + + Standard + Obvyklý + + + + Custom + Vlastní + + + + Select style sheet + Vybrat styl + + + + Qt style sheets (*.qss) + Styly Qt (*.qss) + + + + AppearanceDialogBase + + MusE: Appearance Settings + MusE: Erscheinungsbild einstellen + + + + Apply + Použít + + + + Ok + OK + + + + Cancel + Zrušit + + + + Arranger + Aranžér + + + + MusE: Appearance settings + MusE: Nastavení vzhledu + + + + Parts + Části + + + + show names + Ukázat názvy + + + + show events + Ukázat události + + + + show Cakewalk Style + Ukázat styl Cakewalk + + + + y-stretch + Pás y + + + + Events + Události + + + + note on + Nota zapnuta + + + + poly pressure + Vícenásobné stisknutí tlačítka + + + + controller + Ovladač + + + + aftertouch + Dodělávka po + + + + pitch bend + Ohyb výšky tónu + + + + program change + Změna programu + + + + special + Zvláštní + + + + Background picture + Obrázek pozadí + + + bg + bg + + + select... + auswählen ... + + + + show snap grid + Ukázat magnetickou mřížku + + + + Colors + Barvy + + + + Items + Položky + + + + Color name: + Název barvy: + + + + Global opacity + Celková neprůhlednost + + + + Style/Fonts + Styl a písmo + + + + QT Theme + Podoba Qt + + + + Windows + Windows + + + + MusE + MusE + + + + Metal + Kov + + + + Norwegian Wood + Norské dřevo + + + + Platinum + Platina + + + + CDE + CDE + + + + Motif + Motif + + + + Motif Plus + Motif Plus + + + + Fonts + Písma + + + + Family + Písmová rodina + + + + Size + Velikost + + + + Font 1 + Písmo 1 + + + + Font 2 + Písmo 2 + + + + Font 3 + Písmo 3 + + + + Font 0 + Písmo 0 + + + + + + + + + + Bold + Tučné + + + + + + + + + + Italic + Kurzíva + + + + + + + + + + + + ... + ... + + + + Font 4 + Písmo 4 + + + + Font 5 + Písmo 5 + + + + Palette + Paleta + + + + add + Přidat + + + + remove + Odstranit + + + + add to palette + Přidat do palety + + + + B + B + + + + S + S + + + + H + H + + + + V + V + + + + G + G + + + + R + L + + + + clear + Smazat + + + + Style Sheet: + Styl: + + + + Font 6 + Písmo 6 + + + + Arranger + + Cursor + Position + + + Snap + Magnet + + + Len + Länge + + + NO + Kein + + + TrackInfo + Spurinfo + + + Track + Spur + + + Type + Typ + + + midi song type + Midi Lied Typ + + + Pitch + Tonhöhenänderung + + + midi pitch + Midi Tonhöhenänderung + + + global midi pitch shift + Globale Midi Tonhöhenänderung + + + Tempo + Tempo + + + midi tempo + Midi Tempo + + + O-Port + Ausgangsanschluss + + + Arranger + Arrangierer + + + Off + Aus + + + Bar + Takt + + + GM + GM + + + GS + GS + + + XG + XG + + + N + N + + + R + R + + + M + M + + + S + S + + + C + C + + + Ch + K + + + T + T + + + Enable Recording + Aufnahme einschalten + + + Solo Indicator + Anzeige "Solo" + + + Track Type + Spurtyp + + + Track Name + Spurname + + + Time Lock + Sperre "Zeit" + + + Notation clef + Notenschlüssel + + + Enable recording. Click to toggle. + Aufnahme einschalten. Klicken zum umschalten. + + + Automation + Automatisierung + + + + ArrangerView + + Undo/Redo tools + Rückgängig/Wiederho + + + panic + Panik + + + C&ut + &Ausschneiden + + + &Copy + &Kopieren + + + &Copy in range + Im Bereich kopieren + + + &Paste + &Einfügen + + + Paste (show dialog) + Einfügen (Dialog zeigen) + + + Paste c&lone + K&lon Einfügen + + + Paste clone (show dialog) + Klon einfügen (Dialog zeigen) + + + &Insert Empty Measure + Leeren &Takt einfügen + + + Delete Selected Tracks + Ausgewählte Spuren löschen + + + Shrink selected parts + Ausgewählte Parts schrumpfen + + + Expand selected parts + Ausgewählte Parts erweitern + + + Clean selected parts + Ausgewählte Parts säubern + + + Add Track + Spur hinzufügen + + + Select + Auswählen + + + Select &All + Alles a&uswählen + + + &Deselect All + Alles ab&wählen + + + Invert &Selection + Auswa&hl umkehren + + + &Inside Loop + Bereich &innerhalb der Schleife + + + &Outside Loop + Bereich außerhalb der Schlei&fe + + + All &Parts on Track + Alle &Parts der Spur + + + Score + Partitur + + + all parts in one staff + alle Parts in einem System + + + one staff per part + ein System pro Part + + + New score window + Neues Partiturfenster + + + Pianoroll + Pianorollen Editor + + + Drums + Schlagzeug Editor + + + List + Listen Editor + + + Wave + Wave-Editor + + + Mastertrack + Masterspur + + + Graphic + Graphischer Editor + + + Midi &Transform + Midi &transformieren + + + Global Cut + Globaler Schnitt + + + Global Insert + Globales Einfügen + + + Global Split + Globales Aufteilen + + + &Edit + &Bearbeiten + + + &Structure + &Struktur + + + Functions + Funktionen + + + &Quantize Notes + Noten quantisieren + + + Change note &length + Notenlänge verändern + + + Change note &velocity + Anschlagsdynamik verändern + + + Crescendo/Decrescendo + Crescendo/Decrescendo + + + Transpose + Transponieren + + + Erase Events (Not Parts) + Events (nicht Parts) löschen + + + Move Events (Not Parts) + Events (nicht Parts) verschieben + + + Set Fixed Note Length + Feste Notenlänge setzen + + + Delete Overlapping Notes + Überlappende Noten entfernen + + + Legato + Legato + + + Window &Config + Fensterkonfiguration + + + New + Neu + + + + AudioMixerApp + + MusE: Mixer + MusE: Mischpult + + + &Create + &Erzeugen + + + &View + &Zeigen + + + Routing + Signalfluss + + + + AudioStrip + + panorama + Panorama + + + aux send level + Aux Send Pegel + + + off + Aus + + + Pan + Balance + + + 1/2 channel + 1/2 Kanal + + + Pre + Pre + + + pre fader - post fader + Vor Regler - nach Regler + + + dB + dB + + + record + Aufnahme + + + mute + still + + + record downmix + Aufnahme Abmischung + + + solo mode (monitor) + Solo Modus (Monitor) + + + pre fader listening + Abhöre vor Regler + + + iR + iR + + + intput routing + Eingangs-Signalfluss + + + oR + oR + + + output routing + Ausgangs-Signalfluss + + + Off + Aus + + + Read + Lesen + + + Touch + Antasten + + + Write + Schreiben + + + automation type + Automationstyp + + + Channel + Kanal + + + + Awl::MidiVolEntry + + + off + Vypnuto + + + + db + dB + + + + Awl::VolEntry + + + off + Vypnuto + + + + BigTime + + MusE: Bigtime + MusE: Zeitanzeige groß + + + minute + Minute + + + second + Sekunde + + + frame + Rahmen + + + subframe + Subrahmen + + + + ClipListEdit + + + MusE: Clip List Editor + MusE: Editor seznamu ukázek + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Window &Config + &Nastavení okna + + + + ClipListEditorBase + + + MusE: ClipList + MusE: Seznam ukázek + + + + Name + Název + + + + Refs + Odkazy + + + + Start + Spustit + + + + Len + Délka + + + + Data + Data + + + + Clip Properties + Vlastnosti ukázek + + + + Pos: + Poloha: + + + + Len: + Délka: + + + + CommentBase + + + Form1 + Formulář1 + + + + Track Comment + Poznámka ke stopě + + + + Track 1 + Stopa 1 + + + + ConfigMidiFileBase + + MusE: Config Midi File Export + MusE: Konfiguration Midi Datei exportieren + + + + &OK + &OK + + + + &Cancel + Z&rušit + + + + 0 (single track) + 0 (jedna stopa) + + + + 1 (multiple tracks) + 1 (více stop) + + + + Format: + Formát: + + + + 96 + 96 + + + + 192 + 192 + + + + 384 + 384 + + + + Division: + Rozdělení: + + + + Copyright: + Autorské právo: + + + Enable extended smf format + Aktiviere erweitertes SMF Format + + + + MusE: Config Midi File Import/Export + MusE: Nastavení zavedení/vyvedení souboru MIDI + + + + Import: + Zavést: + + + + Split tracks into &parts + Rozdělit stopy na čá&sti + + + + Alt+P + Alt+P + + + + Split tracks into parts, or one single part + Rozdělit stopy na části, nebo jednu jedinou část + + + + Export: + Vyvést: + + + + Enable extended smf format (currently not implemented) + Povolit rozšířený formát smf (v současnosti neprovedeno) + + + + Use &2-byte time signatures instead of standard 4 + Použít &2-bajtová taktová označení namísto obvyklých 4 + + + + Alt+2 + Alt+2 + + + + Save space by replacing note-offs with &zero velocity note-ons + Ušetřit místo nahrazením vypnutí not zapnutím not o &nulové rychlosti + + + + Alt+Z + Alt+Z + + + + CrescendoBase + + + MusE: Crescendo/Decrescendo + MusE: Crescendo/Decrescendo + + + + Range + Rozsah + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Values + Hodnoty + + + + Start velocity + Počáteční rychlost + + + + + % + % + + + + End velocity + Koncová rychlost + + + + Absolute + Absolutní + + + + Relative + Poměrná + + + + OK + OK + + + + Cancel + Zrušit + + + + CtrlPanel + + + select controller + Kontroller wählen + + + + remove panel + Kontrolleransicht schließen + + + Sel + Wählen + + + x + Schließen + + + + + Velocity + Rychlost + + + + add new ... + Přidat nový ovladač... + + + + S + S + + + + X + X + + + + manual adjust + Ruční upravení + + + + double click on/off + Dvojité klepnutí pro zapnuto/vypnuto + + + + off + Vypnuto + + + + + Instrument-defined + Vymezení-nástroj + + + + + Add ... + Přidat... + + + + Others + Ostatní + + + + Edit instrument ... + Upravit nástroj... + + + + Common Controls + Obecné ovládání + + + + DeicsOnzeGui + + + Save configuration + Uložit nastavení + + + + + + + + + + + + + Critical Error + Vážná chyba + + + + + + + + Cannot open file %1 + Nelze otevřít soubor %1 + + + + + + + + Parsing error for file %1 + Chyba při zpracování u souboru %1 + + + + + Load category dialog + Nahrát dialog skupiny + + + + Load set dialog + Nahrát dialog nastavení + + + + Save set dialog + Uložit dialog nastavení + + + + New category + Nová skupina + + + + + Delete category + Smazat skupinu + + + + Load category + Nahrát skupinu + + + + Save category + Uložit skupinu + + + + Load set + Nahrát nastavení + + + + Save set + Uložit nastavení + + + + Delete set + Smazat nastavení + + + + New subcategory + Nová podskupina + + + + + Delete subcategory + Smazat podskupinu + + + + Load subcategory + Nahrát podskupinu + + + + Save subcategory + Uložit podskupinu + + + + New preset + Nové přednastavení + + + + + Delete preset + Smazat přednastavení + + + + Load preset + Nahrát přednastavení + + + + Save preset + Uložit přednastavení + + + + No more category supported + Žádná další skupina není podporována + + + + You can not add more categories + Nelze přidat více skupin + + + + + + Do you really want to delete %1 ? + Opravdu chcete smazat %1? + + + + + + &Yes + &Ano + + + + + + &No + &Ne + + + + + No category selected + Nevybrána žádná skupina + + + + + You must first select a category. + Nejprve musíte vybrat skupinu. + + + + + + Replace or add + Nahradit nebo přidat + + + + %1 is supposed to be affected to the hbank number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + Předpokládá se, že %1 bude ovlivněn k vysoké bance číslo %2, ale na tomto místě už jedna je. +Opravdu to chcete nahradit nebo to přidat do dalšího volného místa? + + + + + + &Replace + &Nahradit + + + + + + &Add + &Přidat + + + + + + Download error + Chyba při stahování + + + + There is no more free category slot. + Není žádné další volné místo pro skupinu. + + + + Save category dialog + Uložit dialog skupiny + + + + No more subcategory supported + Žádná další podskupina není podporována + + + + You can not add more subcategories + Nelze přidat více podskupin + + + + + No subcategory selected + Nevybrána žádná podskupina + + + + + You must first select a subcategory. + Nejprve musíte vybrat podskupinu. + + + + Load subcategory dialog + Nahrát dialog podskupiny + + + + %1 is supposed to be affected to the lbank number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + Předpokládá se, že %1 bude ovlivněn k nízké bance číslo %2, ale na tomto místě už jedna je. +Opravdu to chcete nahradit nebo to přidat do dalšího volného místa? + + + + There is no more free subcategory slot. + Není žádné další volné místo pro podskupinu. + + + + Save subcategory dialog + Uložit dialog podskupiny + + + + No more preset supported + Žádné další přednastavení není podporováno + + + + You can not add more presets + Nelze přidat více přednastavení + + + + + + No preset selected + Nevybráno žádné přednastavení + + + + + + You must first select a preset. + Nejprve musíte vybrat přednastavení. + + + + Load preset dialog + Nahrát dialog přednastavení + + + + %1 is supposed to be affected to the prog number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + Předpokládá se, že %1 bude ovlivněn k programu číslo %2, ale na tomto místě už jedna je. +Opravdu to chcete nahradit nebo to přidat do dalšího volného místa? + + + + There is no more free preset slot. + Není žádné další volné místo pro přednastavení. + + + + Save preset dialog + Uložit dialog přednastavení + + + + Browse set dialog + Procházet dialog nastavení + + + + Browse image dialog + Procházet dialog obrázku + + + + DeicsOnzeGuiBase + + + DeicsOnze + + + + + &Preset + &Přednastavit + + + + Program numerous + Program početný + + + + INITVOICE + INITVOICE + + + + LBank + Nízká banka + + + + Subcategory + Podskupina + + + + + Bank numerous + Banka početná + + + + + NONE + ŽÁDNÁ + + + + HBank + Vysoká banka + + + + Category + Skupina + + + + Prog + Program + + + + Preset + Přednastavení + + + + DeicsOnze v0.5.5 Copyright (c) 2004-2006 Nil Geisweiller. Published under GPL licence. + DeicsOnze v0.5.5 Autorské právo (c) 2004-2006 Nil Geisweiller. Zveřejněno pod GPL licencí. + + + + &Global + &Celkové + + + + Pitch Envelope + Obálka výšky tónu + + + + PL3 + PL3 + + + + PL2 + PL2 + + + + PL1 + PL1 + + + + PR1 + PR1 + + + + PR2 + PR2 + + + + PR3 + PR3 + + + + + + + + + + Pitch modulation depth + Hloubka modulace výšky tónu + + + + LFO + NKO + + + + LFO Sync + NKO Sync + + + + Pitch modulation sensitivity + Citlivost modulace výšky tónu + + + + Pitch Modulation Sensitivity + Citlivost modulace výšky tónu + + + + LFO Delay + Zpoždění NKO + + + + LFO delay + Zpoždění NKO + + + + LFO speed + Rychlost NKO + + + + Amplitude modulation depth + Hloubka modulace rozkmitu + + + + Amplitude modulation sensitivity + Citlivost modulace rozkmitu + + + + Amplitude Modulation Sensitivity + Citlivost modulace rozkmitu + + + + AMS + CMR + + + + LFO Waveform + Časový průběh vlny NKO + + + + + Pitch Modulation Depth + Hloubka modulace výšky tónu + + + + PMD + HMVT + + + + LFO Speed + Rychlost NKO + + + + AMD + HMR + + + + Speed + Rychlost + + + + Delay + Zpoždění + + + + PMS + CMVT + + + + + Modulation Matrix + Základ modulace + + + + <b>Algorithm 1</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 2</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by both <i>Op 3</i> and <i>Op 4</i><br> +<b>Algorithm 3</b> : <i>Op 1</i> modulated by both <i>Op 4</i> and <i>Op 2</i> modulated by <i>Op 3</i><br> +<b>Algorithm 4</b> : <i>Op 1</i> modulated by both <i>Op 2</i> and <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 5</b> : (<i>Op 1</i> modulated by <i>Op 2</i>) add to (<i>Op 3</i> modulated by <i>Op 4</i>) <br> +<b>Algorithm 6</b> : addition of the three <i>Op 1, 2, 3</i> all modulated by <i>Op 4</i><br> +<b>Algorithm 7</b> : addition of the three <i>Op 1, 2, 3</i> with <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 8</b> : addition of the four <i>Op 1, 2, 3, 4</i> + <b>Algoritmus 1</b> : <i>Op 1</i> modulováno podle <i>Op 2</i> modulováno podle <i>Op 3</i> modulováno podle <i>Op 4</i><br> +<b>Algoritmus 2</b> : <i>Op 1</i> modulováno podle <i>Op 2</i> modulováno podle jak <i>Op 3</i> tak <i>Op 4</i><br> +<b>Algoritmus 3</b> : <i>Op 1</i>modulováno podle jak <i>Op 4</i> tak <i>Op 2</i> modulováno podle <i>Op 3</i><br> +<b>Algoritmus 4</b> : <i>Op 1</i> modulováno podle jak <i>Op 2</i> tak <i>Op 3</i> modulováno podle <i>Op 4</i><br> +<b>Algoritmus 5</b> : (<i>Op 1</i> modulováno podley <i>Op 2</i>) přidat do (<i>Op 3</i> modulováno podle <i>Op 4</i>) <br> +<b>Algoritmus 6</b> : přidání tří <i>Op 1, 2, 3</i> vše modulováno podle <i>Op 4</i><br> +<b>Algoritmus 7</b> : přidání tří <i>Op 1, 2, 3</i> s <i>Op 3</i> modulováno podle <i>Op 4</i><br> +<b>Algoritmus 8</b> : přidání čtyř <i>Op 1, 2, 3, 4</i> + + + + Op4 Feedback + Zpětná vazba Op4 + + + + + Feedback level of the operator 4 + Úroveň zpětné vazby operátora 4 + + + + + + Transpose + Převést + + + + Op &1 + Operátor &1 + + + + Scaling 1 + Změna velikosti 1 + + + + LS1 + + + + + RS1 + ZVR1 + + + + + + + + + + + Rate Scaling + Změna velikosti rychlosti + + + + + + + + + + + + + + + Attack Rate of the operator 1 + Rychlost náběhu operátora 1 + + + + + + + + + + + Level Scaling + Změna velikosti úrovně + + + + Amplitude Envelope 1 + Obálka rozkmitu 1 + + + + RR1 + RU1 + + + + D1R1 + R1Z1 + + + + D1L1 + Ú1Z1 + + + + D2R1 + R1Z2 + + + + + + + Release Rate + Rychlost uvolnění + + + + + + + 2° Decay Rate + 2° Rychlost zpoždění + + + + + + + 1° Decay Level + 1° Úroveň zpoždění + + + + + + + 1° Decay Rate + 1° Rychlost zpoždění + + + + + + + Attack Rate + Rychlost náběhu + + + + AR1 + RN1 + + + + Detune, OSCWave, EGShift 1 + Rozladění, Vlna OSC, Posun EG 1 + + + + DET1 + ROZ1 + + + + + + + + + + + + Detune + Rozladit + + + + + + + EG Shift + Posun EG + + + + + + + 96dB + 96 dB + + + + + + + 48dB + 48 dB + + + + + + + 24dB + 24 dB + + + + + + + 12dB + 12 dB + + + + + + + Wave form + Tvar vlny + + + + + + + Wave form 1 = <i>sin(<b>t</b>)</i><br> +Wave form 2 = <i>sin(<b>t</b>)*abs(sin(<b>t</b>))</i><br> +Wave form 3 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>) else 0</i><br> +Wave form 4 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>)*abs(sin(<b>t</b>)) else 0</i><br> +Wave form 5 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>) else 0</i><br> +Wave form 6 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*abs(sin(2*<b>t</b>)) else 0</i><br> +Wave form 7 = <i>if <b>t</b>&#060 pi then abs(sin(2*<b>t</b>)) else 0</i><br> +Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin(2*<b>t</b>) else 0</i> + Tvar vlny 1 = <i>sin(<b>t</b>)</i><br> +Tvar vlny 2 = <i>sin(<b>t</b>)*abs(sin(<b>t</b>))</i><br> +Tvar vlny 3 = <i>if <b>t</b>&#060 pi pak sin(<b>t</b>) else 0</i><br> +Tvar vlny 4 = <i>if <b>t</b>&#060 pi pak sin(<b>t</b>)*abs(sin(<b>t</b>)) else 0</i><br> +Tvar vlny 5 = <i>if <b>t</b>&#060 pi pak sin(2*<b>t</b>) else 0</i><br> +Tvar vlny 6 = <i>if <b>t</b>&#060 pi pak sin(2*<b>t</b>)*abs(sin(2*<b>t</b>)) else 0</i><br> +Tvar vlny 7 = <i>if <b>t</b>&#060 pi pak abs(sin(2*<b>t</b>)) else 0</i><br> +Tvar vlny 8 = <i>if <b>t</b>&#060 pi pak sin(2*<b>t</b>)*sin(2*<b>t</b>) else 0</i> + + + + Sensitivity 1 + Citlivost 1 + + + + KVS1 + CRK1 + + + + + + + Amplitude Modulation Enable + Povolení modulace rozkmitu + + + + AME1 + PMR1 + + + + + + + Keyboard Velocity Sensitivity + Citlivost rychlosti klávesnice + + + + + + + Key Velocity Sensitivity + Citlivost rychlosti klávesnice + + + + EBS1 + CZEG1 + + + + + + + EG Bias Sensitivity + Citlivost zkreslení EG + + + + + + + Eg Bias Sensitivity + Citlivost zkreslení EG + + + + Frequency 1 + Kmitočet 1 + + + + Coarse 1 + Hrubý 1 + + + + + + + Coarse Ratio + Hrubý poměr + + + + Fine 1 + Jemný 1 + + + + + + + Fine Ratio + Jemný poměr + + + + Freq 1 + Kmit 1 + + + + + + + Fixed Frequency + Pevný kmitočet + + + + + + + Toggle Fix Frequency + Přepnout pevný kmitočet + + + + + + + FIX + PEV + + + + OUT 1 + VÝS 1 + + + + + + + Output Volume + Hlasitost výstupu + + + + + + + + + Volume + Hlasitost + + + + Op &2 + Operátor &2 + + + + Amplitude Envelope 2 + Obálka rozkmitu 2 + + + + D1R2 + R2Z1 + + + + D1L2 + Ú2Z1 + + + + D2R2 + R2Z2 + + + + RR2 + RU2 + + + + AR2 + RN2 + + + + Frequency 2 + Kmitočet 2 + + + + Coarse 2 + Hrubý 2 + + + + Fine 2 + Jemný 2 + + + + Freq 2 + Kmit 2 + + + + Scaling 2 + Změna velikosti 2 + + + + LS2 + + + + + RS2 + ZVR2 + + + + OUT 2 + VÝS 2 + + + + Detune, OSCWave, EGShift 2 + Rozladění, Vlna OSC, Posun EG 2 + + + + DET2 + ROZ2 + + + + Sensitivity 2 + Citlivost 2 + + + + EBS2 + CZEG2 + + + + KVS2 + CRK2 + + + + AME2 + PMR2 + + + + Op &3 + Operátor &3 + + + + Amplitude Envelope 3 + Obálka rozkmitu 3 + + + + D1R3 + R3Z1 + + + + D1L3 + Ú3Z1 + + + + D2R3 + R3Z2 + + + + RR3 + RU3 + + + + AR3 + RN3 + + + + Scaling 3 + Změna velikosti 3 + + + + LS3 + + + + + RS3 + ZVR3 + + + + OUT 3 + VÝS 3 + + + + Frequency 3 + Kmitočet 3 + + + + Coarse 3 + Hrubý 3 + + + + Fine 3 + Jemný 3 + + + + Freq 3 + Kmit 3 + + + + Detune, OSCWave, EGShift 3 + Rozladění, Vlna OSC, Posun EG 3 + + + + DET3 + ROZ3 + + + + Sensitivity 3 + Citlivost 3 + + + + EBS3 + CZEG3 + + + + KVS3 + CRK3 + + + + AME3 + PMR3 + + + + Op &4 + Operátor &4 + + + + amplitude Envelope 4 + Obálka rozkmitu 4 + + + + AR4 + RN4 + + + + D1R4 + R4Z1 + + + + D1L4 + Ú4Z1 + + + + D2R4 + R4Z2 + + + + RR4 + RU4 + + + + Frequency 4 + Kmitočet 4 + + + + Coarse 4 + Hrubý 4 + + + + Fine 4 + Jemný 4 + + + + Freq 4 + Kmit 4 + + + + Scaling 4 + Změna velikosti 4 + + + + LS4 + + + + + RS4 + ZVR4 + + + + OUT 4 + VÝS 4 + + + + Detune, OSCWave, EGShift 4 + Rozladění, Vlna OSC, Posun EG 4 + + + + DET4 + ROZ4 + + + + Sensitivity 4 + Citlivost 4 + + + + EBS4 + CZEG4 + + + + KVS4 + CRK4 + + + + AME4 + PMR4 + + + + &Func + &Funk + + + + Delay Pan Depth + Hloubka vyvážení zpoždění + + + + Delay Pan LFO Freq + Kmitočet NKO vyvážení zpoždění + + + + Delay Ch Send Level + Úroveň poslání zpoždění kanálu + + + + + + Channel Chorus + Sbor kanálu + + + + Delay Feedback + Zpětná vazba zpoždění + + + + Delay On/Off, Return Level + Zpoždění zapnuto/vypnuto, úroveň navrácení + + + + + + On + Zapnuto + + + + Delay Beat Ratio + Poměr úder zpoždění + + + + Delay BPM + ÚZM zpoždění + + + + Foot Control + Ovládání stopy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pitch Bend Range + Rozsah výšky tónu + + + + + + + Pitch + Výška tónu + + + + + + + Amplitude + Rozkmit + + + + Modulation Wheel + Kolečko modulace + + + + Breath Control + Ovládání dechu + + + + + Pitch Bias + Zkreslení výšky tónu + + + + + Envelope Bias + Zkreslení obálky + + + + After Touch + Dodělávka po + + + + Phony Mode + Předstíraný režim + + + + POLY + POLY + + + + MONO + MONO + + + + Potamento + Portamento + + + + Portamento Mode + Režim portamento + + + + FINGER + PRST + + + + FULL + PLNÝ + + + + PT + ČP + + + + + Portamento Time + Čas portamenta + + + + C&horus + &Sbor + + + + Chorus Parameters + Parametry sboru + + + + + Channel send level + Úroveň poslání kanálu + + + + + On/Off and Return level + Zapnuto/Vypnuto a úroveň navrácení + + + + + Select LADSPA plugin + Vybrat přídavný modul LADSPA + + + + + Change plugin + Změnit přídavný modul + + + + &Reverb + &Ozvěna + + + + Reverb Parameters + Parametry ozvěny + + + + &Config + &Nastavit + + + + Font Size + Velikost písma + + + + Quality + Kvalita + + + + High + Vysoká + + + + Middle + Střední + + + + Low + Nízká + + + + Ultra low + Velice nízká + + + + Filter + Filtr + + + + Save Mode (into the song) + Uložit režim (do písně) + + + + Save only the used presets + Uložit pouze použitá přednastavení + + + + Save the entire set + Uložit celé nastavení + + + + Save the configuration + Uložit nastavení + + + + Configuration File + Soubor s nastavením + + + + Save... + Uložit... + + + + Load... + Nahrát... + + + + Save as default + Uložit jako výchozí + + + + Colors + Barvy + + + + Text + Text + + + + Background + Pozadí + + + + Edit Text + Upravit text + + + + Edit Background + Upravit pozadí + + + + + + Red + Červená + + + + + + Blue + Modrá + + + + + + Green + Zelená + + + + Set Path + Nastavit cestu + + + + Image in the background : + Obrázek na pozadí: + + + + + Browse... + Procházet... + + + + Load the set at the initialization : + Nahrát nastavení při zapnutí: + + + + Set Brightness, Detune, Attack and Release of the current channel to default + Nastavit jas, rozladění, náběh a uvolnění nynějšího kanálu na výchozí + + + + Res. Ctrl + Res. Ctrl + + + + Cut all notes off + Vyjmout všechny noty + + + + Panic! + Nouzové zastavení! + + + + Number of Voices + Počet hlasů + + + + Number of voices + Počet hlasů + + + + Enable + Povolit + + + + Channel + Kanál + + + + Vol + Hlasitost + + + + Channel Ctrl + Kanál Ctrl + + + + Release + Uvolnění + + + + Attack + Náběh + + + + Brightness + Jas + + + + Modulation + Modulace + + + + Pan + Vyvážení + + + + DelOverlapsBase + + + MusE: Delete Overlaps + MusE: Smazat překrytí + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + OK + OK + + + + Cancel + Zrušit + + + + DidYouKnow + + + Did you know? + Víte, že? + + + + Don't show on startup + Neukazovat při spuštění + + + + Next tip + Další rada + + + + Close + Zavřít + + + + DrumEdit + + + Load Map + Nahrát rozložení bicích + + + + Save Map + Uložit rozložení bicích + + + + &Edit + &Úpravy + + + + Cut + Vyjmout + + + + Copy + Kopírovat + + + + Paste + Vložit + + + + Delete Events + Smazat události + + + + Select All + Vybrat vše + + + + Select None + Nevybrat nic + + + + Invert + Obrátit + + + + Inside Loop + Uvnitř smyčky + + + + Outside Loop + Vně smyčky + + + + &Select + &Vybrat + + + + Step Record + Nahrávat po taktu + + + + Midi Input + Vstup MIDI + + + + Add Controller View + Přidat pohled ovladače + + + + M + M + + + + Sound + Zvuk + + + + QNT + QNT + + + + E-Note + Nota E + + + + Len + Délka + + + + A-Note + Nota A + + + + Ch + Kanál + + + + Port + Přípojka + + + + LV1 + LV1 + + + + LV2 + LV2 + + + + LV3 + LV3 + + + + LV4 + LV4 + + + + &File + &Soubor + + + + Load Drummap + Nahrát rozložení bicích + + + + Store Drummap + Uložit rozložení bicích + + + + ctrl + Ctrl + + + drummaps + Schlagzeugbelegungen + + + + Muse: Load Drum Map + MusE: Nahrát rozložení bicích + + + + MusE: Store Drum Map + MusE: Uložit rozložení bicích + + + + Set Fixed Length + Nastavit pevnou délku + + + &Functions + &Funktionen + + + + Modify Velocity + Změnit rychlost: + + + + + mute instrument + Ztlumit nástroj + + + + + sound name + Název zvuku + + + + + volume percent + Procento hlasitosti + + + + + quantisation + Kvantizace + + + + + this input note triggers the sound + Tato vstupní nota spustí zvuk + + + + + note length + Délka noty + + + + + this is the note which is played + Toto je nota, která se přehrává + + + + output channel (hold ctl to affect all rows) + Výstupní kanál (držet klávesu Ctrl pro ovlivnění všech řádků) + + + + + output port + Výstupní přípojka + + + + + shift + control key: draw velocity level 1 + Klávesy Shift + Ctrl: Úroveň 1 rychlosti kreslení + + + + + control key: draw velocity level 2 + Klávesa Ctrl: Úroveň 2 rychlosti kreslení + + + + + shift key: draw velocity level 3 + Klávesa Shift: Úroveň 3 rychlosti kreslení + + + + + draw velocity level 4 + Úroveň 4 rychlosti kreslení + + + + output channel (ctl: affect all rows) + Výstupní kanál (držet klávesu Ctrl pro ovlivnění všech řádků) + + + + Reset GM Map + Nastavit rozložení bicích GM znovu + + + + Copy events in range + Kopírovat události v rozsahu + + + + Paste (with Dialog) + Vložit (s dialogem) + + + + Previous Part + Předchozí část + + + + Next Part + Další část + + + + Fu&nctions + &Funkce + + + + Re-order list + Přeuspořádat seznam + + + + Crescendo/Decrescendo + Crescendo/Decrescendo + + + + Quantize + Kvantizovat + + + + Erase Event + Smazat událost + + + + Move Notes + Přesunout noty + + + + Delete Overlaps + Smazat překrytí + + + + &Plugins + &Přídavné moduly + + + + Window &Config + &Nastavení okna + + + + Drum tools + Nástroje pro bicí + + + + cursor tools + Nástroje ukazovátka + + + + Set step size for cursor edit + Nastavit délku kroku pro režim ukazovátka + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Vol + Hlasitost + + + + Drum map + Rozložení bicích + + + + Reset the drum map with GM defaults? + Nastavit rozložení bicích znovu s výchozím GM? + + + + EditCAfterDialog + + + Time Position + Časová poloha + + + + Pressure + Tlak + + + + MusE: Enter Channel Aftertouch + MusE: Zadat dodělávku kanálu + + + + EditCtrl7DialogBase + + MusE: Enter Controller + MusE: Kontroller eingeben + + + Controller: + Kontroller: + + + Time Position: + Position: + + + Value: + Wert: + + + controller value + Kontroller Wert + + + OK + Bestätigen + + + Cancel + Abbrechen + + + + EditCtrlBase + + + MusE: Edit Controller Event + MusE: Upravit událost ovladače + + + + Time Position + Časová poloha + + + + Available Controller: + Dostupný ovladač. + + + + Create New Controller + Vytvořit nový ovladač + + + + textLabel3 + Popis 3 + + + + Value + Hodnota + + + + Controller + Ovladač + + + + H-Bank + Vysoká banka + + + + L-Bank + Nízká banka + + + + Program + Program + + + + + off + Vypnuto + + + + pushButton4 + Tlačítko 4 + + + + &OK + &OK + + + + &Cancel + Z&rušit + + + + EditEventDialog + + + Ok + OK + + + + Cancel + Zrušit + + + + EditGainBase + + + MusE: Modify gain + MusE: Změnit zesílení + + + + Gain + Zesílení + + + + 200% + 200% + + + + 100% + 100% + + + + 0% + 0% + + + + &Reset + &Nastavit znovu + + + + Alt+R + Alt+R + + + + &Apply + &Použít + + + + Alt+A + Alt+A + + + + &Cancel + Z&rušit + + + + Alt+C + Alt+C + + + + EditInstrument + + + + MusE: Create file failed + MusE: Vytvoření souboru se nezdařilo + + + + MusE: Write File failed + MusE: Zápis souboru se nezdařil + + + + + + + MusE: + MusE: + + + + + The user instrument directory + + Adresář s uživatelovým nástrojem + + + + + + +does not exist yet. Create it now? + + +zatím neexistuje. Vytvořit jej nyní? + + + + + + (You can change the user instruments directory at Settings->Global Settings->Midi) + (Adresář s uživatelovým nástrojem můžete změnit v Nastavení->Celková nastavení->MIDI) + + + + + Unable to create user instrument directory + + Nelze vytvořit adresář s uživatelovým nástrojem + + + + + + MusE: Save Instrument Definition + MusE: Uložit vymezení nástroje + + + + + Instrument Definition (*.idf) + Vymezení nástroje (*.idf) + + + + + MusE: Save instrument as + MusE: Uložit nástroj jako + + + + Enter a new unique instrument name: + Zadat nový jedinečný název nástroje: + + + + The user instrument: + + Uživatelův nástroj: + + + + + +already exists. This will overwrite its .idf instrument file. +Are you sure? + +již existuje. Tímto se přepíše jeho soubor s nástrojem .idf. +Jste si jistý? + + + + MusE: Bad instrument name + MusE: Špatný název nástroje + + + + Please choose a unique instrument name. +(The name might be used by a hidden instrument.) + Vyberte, prosím, jedinečný název nástroje. +(Název může být použit skrytým nástrojem.) + + + + MusE: Bad patch name + MusE: Špatný název záplaty + + + + Please choose a unique patch name + Vyberte, prosím, jedinečný název pro záplatu + + + + MusE: Bad patchgroup name + MusE: Špatný název skupiny záplat + + + + Please choose a unique patchgroup name + Vyberte, prosím, jedinečný název pro skupinu záplat + + + + MusE: Bad controller name + MusE: Špatný název ovladače + + + + Please choose a unique controller name + Vyberte, prosím, jedinečný název pro ovladač + + + + + MusE: Cannot add common controller + MusE: Nelze přidat obecný ovladač + + + + A controller named + Ovladač s názvem + + + + + already exists. + již existuje. + + + + A controller number + Číslo ovladače + + + + + MusE + MusE + + + + + The current Instrument contains unsaved data +Save Current Instrument? + Nynější nástroj obsahuje neuložená data. +Uložit nynější nástroj? + + + + + &Save + &Uložit + + + + + &Nosave + &Neukládat + + + + &Abort + &Zrušit + + + + EditInstrumentBase + + + MusE: Instrument Editor + MusE: Editor nástrojů + + + Patches + Patches + + + Patch Name: + Patch Name: + + + + High Bank: + Vysoká banka: + + + + Low Bank: + Nízká banka: + + + + Program: + Program: + + + d.c. + dont care + d.c. + + + d.c. + d.c. + + + Patch/Group + Patch/Gruppe + + + + + + &Delete + S&mazat + + + + + + Alt+D + Alt+D + + + &New Patch + &Neuer Patch + + + Alt+N + Alt+N + + + New Group + Neue Gruppe + + + + Drum + Bicí + + + + GM + GM + + + + GS + GS + + + + XG + XG + + + Controller + Kontroller + + + Predefined Controller: + Vordefinierte Kontroller: + + + + This is a list of commonly used midi controllers. +Note that in MusE pitch and program changes are +handled like normal controllers. + Toto je seznam často používaných ovladačů MIDI. +MusE ovšem zachází se všemi ovladači jako jsou "výška tónu" a "změny programů" jako s normálními ovladači. + + + + + Properties + Vlastnosti + + + Name + Name + + + Type + Typ + + + + Control7 + Ovladač 7 + + + + Control14 + Ovladač 14 + + + + RPN + RPN + + + + NRPN + NRPN + + + + Pitch + Výška tónu + + + + Program + Program + + + + + H-Ctrl + Vysoký-Ctrl + + + Midi Controller Number High Byte + Midi Kontrollernummer High Byte + + + + + L-Ctrl + Nízký-Ctrl + + + Midi Controller Number Low Byte + Midi Kontrollernummer Low Byte + + + Range + Bereich + + + + Min + Nejméně + + + + Max + Nejvíce + + + Default + Standard + + + + Name + Název + + + + Type + Typ + + + Min Val + Min Wert + + + Max Val + Max Wert + + + list of defined controllers + Liste von definierten Kontrollern + + + This is the MusE list of defined controllers. + Dies ist die MusE Liste von definierten Kontrollern. + + + SysEx + SysEx + + + Initialization + Initialisierung + + + Panic + Panik + + + + Hex Entry: + Hex Eintrag: + + + + &File + &Soubor + + + + Tools + Nástroje + + + + New + Nový + + + + &New + &Nový + + + + Ctrl+N + Ctrl+N + + + + Open + Otevřít + + + + &Open... + &Otevřít... + + + + Ctrl+O + Ctrl+O + + + + Save + Uložit + + + + &Save + &Uložit + + + + Ctrl+S + Ctrl+S + + + + Save As + Uložit jako + + + + Save &As... + Uložit &jako... + + + + Exit + Ukončit + + + + E&xit + &Ukončit + + + + Instrument Name: + Název nástroje: + + + + Selected instrument name. + Vybraný název nástroje. + + + + List of defined instruments. + Seznam s vymezenými nástroji. + + + + Pa&tches + &Záplaty + + + + List of groups and patches. + Seznam skupin a záplat. + + + + Group/Patch + Skupina/Záplata + + + + + + Name: + Název: + + + + + Group or patch name + Název skupiny nebo záplaty + + + + Patch high bank number + Záplatovat číslo vysoké banky + + + + Patch high bank number. --- means don't care. + Záplatovat číslo vysoké banky. --- znamená, nestarat se. + + + + --- + dont care + --- + + + + Patch low bank number + Záplatovat číslo nízké banky + + + + Patch low bank number. --- means don't care. + Záplatovat číslo nízké banky. --- znamená, nestarat se. + + + + --- + --- + + + + + Patch program number + Záplatovat číslo programu + + + + Drum patch + Záplata bicích + + + + If set, the patch is available only for drum channels. + Je-li nastaveno, je záplata dostupná pouze pro kanály bicích. + + + + GM patch + Záplata GM + + + + If set, the patch is available in a 'GM' or 'NO' midi song type. + Je-li nastaveno, je záplata dostupná v typu písně MIDI 'GM' nebo 'NO'. + + + + GS patch + Záplata GS + + + + If set, the patch is available in a 'GS' or 'NO' midi song type. + Je-li nastaveno, je záplata dostupná v typu písně MIDI 'GS' nebo 'NO'. + + + + XG patch + Záplata XG + + + + If set, the patch is available in an 'XG' or 'NO' midi song type. + Je-li nastaveno, je záplata dostupná v typu písně MIDI 'XG' nebo 'NO'. + + + + Delete group or patch + Smazat skupinu nebo záplatu + + + + New patch + Nová záplata + + + + New &Patch + Nová &záplata + + + + Alt+P + Alt+P + + + + New group + Nová skupina + + + + New &Group + Nová &skupina + + + + Alt+G + Alt+G + + + + Contro&ller + &Ovladač + + + + Common: + Obecné: + + + + List of defined controllers + Seznam vymezených ovladačů + + + + List of defined controllers. + Seznam vymezených ovladačů. + + + + Min + Nejméně + + + + Max + Nejvíce + + + + Def + Vymezení + + + + Midi controller name + Název ovladače MIDI + + + + Type: + Typ: + + + + + Midi controller type + Typ ovladače MIDI + + + + RPN14 + RPN14 + + + + NRPN14 + NRPN14 + + + + + Midi controller number high byte + Vysoké bajtové číslo ovladače MIDI + + + + Midi controller number low byte (* means drum controller) + Nízké bajtové číslo ovladače MIDI (* znamená ovladač bicích) + + + + Midi controller number low byte. +If low byte is * then the controller is a + 'drum controller'. For drum tracks and + GS/XG type songs and instruments. +Allows controllers for each instrument in + Muse's drum map. The low byte will be + replaced by the 'ANote' in the drum map. +Examples: The GS and XG instruments' + Drum controllers. + Nízké bajtové číslo ovladače MIDI. +Pokud je nízký bajt *, potom ovladač je +'ovladač bicích'. Pro stopy bicích a písně a nástroje typu +GS/XG. Povoluje ovladače pro každý nástroj v +rozložení bicích Muse. Nízký bajt bude v rozložení bicích +nahrazen 'Notou A'. Příklady: Nástroje GS a XG +Ovladače bících. + + + + * + wild card + * + + + + Range: + Rozsah: + + + + Minimum value. If negative, auto-translate. + Nejmenší hodnota. Pokud je záporná, automatická proměna. + + + + Minimum value. If the minimum value + is negative, the range will automatically + be translated to a positive range. + +Useful for controllers which should be + displayed with zero bias. For example, +'Pan': Minimum: -64 Maximum: 63 +True range: Min: 0 Max: 127 (bias = 64) +'CoarseTuning': Min: -24 Max: 23 +True range: Min: 40 Max: 87 (bias = 64) + +Bias is determined from controller type: +7-bit Controller7 / RPN: Bias = 64 +14-bit Controller14 / RPN14: Bias = 8192 + +Type 'Pitch' is the exception. It is biased + at zero, even with a negative minimum: +'Pitch': Min: -8192 Max: 8191 +True range: Min: -8192 Max: 8191 (bias 0) + Nejmenší hodnota. Pokud je nejmenší hodnota +záporná, bude rozsah automaticky proměněn na kladný. + +To je užitečné u ovladačů, které by měly být zobrazeny s +nulovým zkreslením. Například: +'Vyvážení': Minimum: -64 Maximum: 63 +Opravdový rozsah: Min: 0 Max: 127 (bias = 64) +'Hrubé ladění': Min: -24 Max: 23 +Opravdový rozsah: Min: 40 Max: 87 (bias = 64) + +Zkreslení je určeno z typu ovladače: +7-bit ovladač 7 / RPN: Zkreslení = 64 +14-bit ovladač 14 / RPN14: Zkreslení = 8192 + +Typ 'výška tónu' je výjimka. Je zkreslen na +nulu, i se záporným minimem: +'Výška tónu': Min: -8192 Max: 8191 +Opravdový rozsah: Min: -8192 Max: 8191 (zkreslení 0) + + + + + Maximum value + Největší hodnota + + + + Default: + Výchozí: + + + + L-Bank + Nízká banka + + + + + + + + off + Vypnuto + + + + Progr. + Progr. + + + + ??? + ??? + + + + H-Bank + Vysoká banka + + + + Default value. Off: No default. + Výchozí hodnota. Vypnuto: Žádná výchozí. + + + + Default (initial) value. Off means no default. + +If a default value is chosen, the value will be sent + to the controller when the controller is added to + the song (in piano roll or event editor). When + the song is re-loaded, the value is sent again. +Otherwise the controller remains at its last value. +Controllers are also automatically added to a + song upon reception of a midi controller event. + +Caution! Watch out for controllers such as + 'Sustain' and 'ResetAllController' with default + values. You should probably turn 'off' their + default (in piano roll or drum edit, and + instrument editor). + + + + + off + dont care + Vypnuto + + + + Add common controller + Přidat obecný ovladač + + + + &Add + &Přidat + + + + Alt+A + Alt+A + + + + Delete controller + Smazat ovladač + + + + Create a new controller + Vytvořit nový ovladač + + + + New &Controller + Nový &ovladač + + + + Alt+C + Alt+C + + + + Null Param Hi: + Nulový parametr vysoký: + + + + Null parameter number High byte + Nulový parametr vysoký bajt + + + + + If set, these 'null' parameter numbers will + be sent after each RPN/NRPN event. +This prevents subsequent 'data' events + from corrupting the RPN/NRPN controller. +Typically, set to 127/127, or an unused + RPN/NRPN controller number. + + + + + Lo: + Nulový parametr nízký: + + + + Null parameter number Low byte + Nulový parametr nízký bajt + + + + S&ysEx + S&ysEx + + + + SysEx List: + Seznam SysEx: + + + + New SysE&x + Nový SysE&x + + + + Alt+X + Alt+X + + + + &Help + &Nápověda + + + + + new item + Nová položka + + + + + What's this? + Co je toto? + + + + EditMetaDialog + + + Time Position + Časová poloha + + + + Meta Type + Meta typ + + + + Enter Hex + Zadání Hex + + + + MusE: Enter Meta Event + MusE: Zadání metaudálosti + + + + EditMetaDialogBase + + MusE: Enter Meta Event + MusE: Meta Ereignis eingeben + + + OK + Bestätigen + + + Cancel + Abbrechen + + + TextLabel1 + Beschriftung1 + + + Time Position: + Position: + + + Meta Type: + Meta Typ: + + + Enter Hex + Hex eingeben + + + + EditNoteDialogBase + + + MusE: Enter Note + MusE: Zadat notu + + + + OK + OK + + + + Cancel + Zrušit + + + + Length: + Délka: + + + + Time Position: + Časová poloha: + + + + Pitch: + Výška tónu: + + + + Velocity On: + Rychlost zapnuto: + + + + Velocity Off: + Rychlost vypnuto: + + + + EditPAfterDialog + + + Time Position + Časová poloha + + + + Pitch + Výška tónu + + + + Pressure + Tlak + + + + MusE: Enter Poly Aftertouch + MusE: Zadat vícedodělávku + + + + EditSysexDialogBase + + + MusE: Enter SysEx + MusE: Zadat SysEx + + + + TimePosition: + Časová poloha: + + + + Comment: + Poznámka: + + + + OK + OK + + + + Cancel + Zrušit + + + + EditToolBar + + Edit Tools + Werkzeuge bearbeiten + + + + EffectRack + + effect rack + Effekteinschub + + + move up + Nach oben bewegen + + + move down + Nach unten bewegen + + + remove + entfernen + + + bypass + umleiten + + + show gui + GUI anzeigen + + + new + neu + + + change + ändern + + + + FLUIDGui + + + FLUID: open Soundfile + FLUID: Otevřít zvukové písmo + + + + FLUIDGuiBase + + + Form1 + Formulář1 + + + + Soundfont + Zvukové písmo + + + + Load + Nahrát + + + + FLUIDSynthGuiBase + + + FLUID Synth + FLUID Synth + + + + Load + Nahrát + + + + Delete + Smazat + + + + Dump Info + Vyklopit informace + + + + ID + ID + + + + Fontname + Název písma + + + + Chnl + Kanál + + + + Soundfont + Zvukové písmo + + + + Drum Chnl + Kanál bicích + + + + + Level + Úroveň + + + + Width + Šířka + + + + Damping + Vyklopení + + + + Room Size + Velikost prostoru + + + + Reverb + Ozvěna + + + + CHANNEL SETUP + NASTAVENÍ KANÁLU + + + + Sine + Sinus + + + + Triangle + Trojúhelník + + + + Type + Typ + + + + Number + Číslo + + + + Speed + Rychlost + + + + Depth + Hloubka + + + + Chorus + Sbor + + + + Gain + Zesílení + + + + LOADED SOUNDFONTS + NAHRANÁ ZVUKOVÁ PÍSMA + + + + FileDialogButtons + + Form1 + Form1 + + + + Global + Celkové + + + + User + Uživatel + + + + Project + Projekt + + + Load: + Laden: + + + Songdata + +Cofiguration + Lieddaten + +Konfiguration + + + + only +Songdata + Jen data +písně + + + + fdialogbuttons + TlačítkaProSouborovýDialog + + + + Songdata + +Configuration + Data písně + +Nastavení + + + + FluidSynthGui + + + Choose soundfont + Vybrat zvukové písmo + + + + FontSel + + Size: + Größe: + + + + GateTimeBase + + MusE: Modify Gate Time + MusE: Gate Zeit ändern + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + Selected & Looped + Ausgewählt & innerhalb der Schleife + + + + MusE: Modify Note Length + MusE: Změnit délku noty + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Values + Hodnoty + + + + Rate: + Rychlost: + + + + Offset: + Posun: + + + + % + % + + + + lenNew = (lenOld * rate) + offset + lenNew = (lenOld * rychlost) + posun + + + + OK + OK + + + + Cancel + Zrušit + + + + GlobalSettingsDialogBase + + + MusE: Global Settings + MusE: Celková nastavení + + + + Audio + Zvuk + + + + Mixer + Směšovač + + + + + dB + dB + + + + min. Meter Value + min. Hodnoty regulátoru hladin + + + min.Slider Val + min. Schiebereglerwerte + + + + Midi + MIDI + + + + Ticks + Tiky + + + + + + 1024 + 1024 + + + + + + 2048 + 2048 + + + + 4096 + 4096 + + + 8172 + 8172 + + + + Displayed Resolution +(Ticks/Quarternote) + Zobrazované rozlišení +(Tiky/Čtvrťová nota) + + + + + 48 + 48 + + + + + 96 + 96 + + + + + 192 + 192 + + + + + 384 + 384 + + + + + 768 + 768 + + + + + 1536 + 1536 + + + + + 3072 + 3072 + + + + + 6144 + 61144 + + + + + 12288 + 12288 + + + + RTC Resolution +(Ticks/Sec) + Rozlišení RTC (RealTimeClock) +(Tiy/Sekundy) + + + + GUI + Rozhraní + + + + /sec + /sek + + + + GUI Refresh Rate + Rychlost obnovování rozhraní + + + + Use project save dialog + Použít dialog pro uložení projektu + + + + Some popup menus stay open (else hold Ctrl) + Některé vyskakovací nabídky zůstanou otevřeny (držet Ctrl) + + + + Allows some popup menus to stay open. +Otherwise, hold Ctrl to keep them open. + Umožní, aby některé vyskakovací nabídky zůstanou otevřeny. +Je pro to, aby zůstaly otevřeny, potřeba podržet klávesu Ctrl. + + + + MDI-subwindowness and sharing menus + MDI-podokennost a sdílení nabídek + + + + Presets: + Přednastavení: + + + + traditional MusE SDI + Tradiční MusE SDI + + + + Cakewalk-like MDI + MDI na způsob Cakewalku + + + + Borland-/Mac-like MDI + MDI na způsob Borland/Mac + + + + &Apply + &Použít + + + + &Ok + &OK + + + + &Cancel + Z&rušit + + + Help Browser: + Hilfe Browser: + + + + Application + Program + + + + Start Muse + Spustit MusE + + + + start with last song + Začít s poslední písní + + + + start with song + Začít s určitou písní + + + + start song: + Začáteční píseň: + + + + Views + Pohledy + + + + + + + + y-pos + Poloha y + + + + + + + show + Ukázat + + + + + + + + x-pos + Poloha x + + + + + + + height + Výška + + + + + + + width + Šířka + + + + Big Time + Velký ukazatel času + + + Arranger + Arrangierer + + + + Transport + Přesun + + + + + + + + Cur + Nyní + + + + + + + + set current values + Nastavit nynější hodnoty + + + + start with template: default.med + Začít s předlohou písně: Spustit default.med + + + + show splash screen + Ukázat úvodní obrazovku + + + + Mixer A + Směšovač A + + + + Mixer B + Směšovač B + + + + show "Did you know?" dialog + Ukázat dialog Víte, že? + + + + Start song + Začáteční píseň + + + + min. Slider Val + Nejmenší hodnota posuvníku + + + + Enable denormal protection + Povolit ochranu denormál + + + + Enable output limiter + Povolit omezovač výstupu + + + + External Waveditor + Vnější editor WAV + + + + External Waveditor command + Příkaz pro vnější editor WAV + + + + Note: External editor opened from the internal editor. + Poznámka: Vnější editor otevřený z vnitřního editoru. + + + + Dummy Audio Driver (settings require restart) + Falešný ovladač zvuku (nastavení vyžaduje nové spuštění) + + + + Hz + Hz + + + + Period size (Frames per period): + Velikost periody (snímků za periodu): + + + + + 16 + 16 + + + + Main Window + Hlavní okno + + + + Try to use Jack Freewheel + Zkuste použít volnoběh Jack + + + + Speeds bounce operations + Operace odražení rychlosti + + + + Use Jack Freewheel mode if possible. +This dramatically speeds bounce operations. + Použít volnoběh Jack, je-li to možné. +Tím se dramaticky zrychlí operace odražení. + + + + VST in-place + VST v místě + + + + Enable VST in-place processing (restart required) + Povolit zpracování VST v místě (je vyžadováno nové spuštění) + + + + Enable VST in-place processing. Turn this off if + VST Ladspa effect rack plugins do not work or + feedback loudly, even if they are supposed to + be in-place capable. Setting requires a restart. + + + + + Minimum control period + Nejmenší kontrolní perioda + + + + Minimum audio controller process period (samples). + + Nejmenší perioda procesu ovladače zvuku (vzorky). + + + + + Minimum audio controller process period (samples). +Adjusts responsiveness of audio controls and + controller graphs. Set a low value for fast, smooth + control. If it causes performance problems, set a + higher value. + + + + + 1 + 1 + + + + 2 + 2 + + + + 4 + 4 + + + + 8 + 8 + + + + + 32 + 32 + + + + + 64 + 64 + + + + + 128 + 128 + + + + + 256 + 256 + + + + + 512 + 512 + + + + Sample rate + Vzorkovací kmitočet + + + + Shorter periods give better midi playback resolution. + Kratší periody dávají lepší rozlišení přehrávání MIDI. + + + + 8192 + 8192 + + + + 16384 + 16384 + + + + 32768 + 32768 + + + + Midi Resolution +(Ticks/Quarternote) + Rozlišení MIDI +(Tiky/Čtvrťová nota) + + + + Instruments Directory + Adresář s nástroji + + + + Use old-style stop shortcut: + Použít klávesovou zkratku pro zastavení ve starém stylu: + + + + Move single armed track with selection + Přesunout jednu odjištěnou stopu s výběrem + + + + On Launch + Při spuštění + + + + Behavior + Chování + + + + LMaster + + + new tempo + Nové tempo + + + + new signature + Nové taktové označení + + + + Meter + Metrum + + + + Time + Čas + + + + Type + Typ + + + + Value + Hodnota + + + + MusE: Mastertrack + MusE: Hlavní stopa + + + + Window &Config + &Nastavení okna + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + Tempo + Tempo + + + + Timesig + Taktové označení + + + + &Edit + &Upravit + + + + Insert Tempo + Vložit tempo + + + + Insert Signature + Vložit taktové označení + + + + Insert Key + Vložit klávesu + + + + Edit Positon + Upravit polohu + + + + Edit Value + Upravit hodnotu + + + + Delete Event + Smazat událost + + + + Edit tools + Upravit nástroje + + + + Key + Klávesa + + + + new key + Nová klávesa + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Reposition of the initial tempo and signature events is not allowed + Změna počátečního tempa a taktového označení není dovolena + + + + MusE: List Editor + MusE: Editor seznamu + + + + Input error, conversion not OK or value out of range + Chyba na vstupu. Převod není v pořádku, anebo je hodnota mimo rozsah + + + + Reposition of tempo and signature events to start position is not allowed! + Změna událostí tempa a taktového označení na počáteční polohu není dovolena + + + + LegatoBase + + + MusE: Legato + MusE: Legato + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Settings + Nastavení + + + + ticks + tiky + + + + Minimum Length + Nejmenší délka + + + + Allow shortening notes + Dovolit zkracování not + + + + OK + OK + + + + Cancel + Zrušit + + + + ListEdit + + + &Edit + &Upravit + + + + Cut + Vyjmout + + + + Copy + Kopírovat + + + + Paste + Vložit + + + List Tools + Werkzeuge "Liste" + + + Insert Tools + Werkzeuge "Einfügen" + + + + Delete Events + Smazat události + + + Insert Note + Note einfügen + + + + insert Note + Vložit notu + + + Insert SysEx + SysEx einfügen + + + + insert SysEx + Vložit SysEx + + + Insert Ctrl + Ctrl einfügen + + + + insert Ctrl + Vložit Ctrl + + + Insert Meta + Meta einfügen + + + + insert Meta + Vložit Meta + + + Insert Channel Aftertouch + Channel Aftertouch einfügen + + + + insert Channel Aftertouch + Vložit dodělávku kanálu + + + Insert Key Aftertouch + Key Aftertouch einfügen + + + + insert Poly Aftertouch + Vložit více dodělávku kanálu + + + + Window &Config + &Nastavení okna + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Tick + Tiky + + + + Bar + Takt + + + Typ + Typ + + + + Ch + Kanál + + + + Val A + Hodnota A + + + + Val B + Hodnota B + + + + Val C + Hodnota C + + + + Len + Délka + + + + Comment + Poznámka + + + + Insert tools + Vložit nástroje + + + + Type + Typ + + + + MITTransposeBase + + + MusE: Midi Input Plugin: Transpose + MusE: Přídavný modul pro vstup MIDI: Převedení + + + + On + Zapnuto + + + + TriggerKey + Spouštěcí klávesa + + + + Transpose: + Převést: + + + + +0 + +0 + + + + MPConfig + + none + kein + + + + Port + Přípojka + + + + GUI + Rozhraní + + + + Instrument + Nástroj + + + + Device Name + Název zařízení + + + + State + Stav + + + unknown + unbekannt + + + + I + I - Vstup + + + + O + O - Výstup + + + + MusE: bad device name + MusE: Špatný název zařízení + + + + + Default input connections + Výchozí vstupní spojení + + + + + Are you sure you want to apply to all existing midi tracks now? + Jste si jistý, že chcete použít na všechny existující stopy MIDI nyní? + + + + + Default output connections + Výchozí výstupní spojení + + + + + Setting will apply to new midi tracks. +Do you want to apply to all existing midi tracks now? + Nastavení se použije na nové stopy MIDI. +Chcete použít na všechny existující stopy MIDI nyní? + + + + please choose a unique device name + Vyberte, prosím, jedinečný název pro zařízení + + + + + in + Vstup + + + + + out + Výstup + + + + Show first aliases + Ukázat první přezdívku + + + + Show second aliases + Ukázat druhou přezdívku + + + + + Toggle all + Přepnout vše + + + + + Change all tracks now + Změnit všechny stopy nyní + + + + Create + Vytvořit + + + + device + zařízení + + + + + Port Number + Číslo přípojky + + + + Enable gui + Povolit rozhraní + + + + Enable reading + Povolit čtení + + + + Enable writing + Povolit zápis + + + + Port instrument + Nástroj přípojky + + + + Midi device name. Click to edit (Jack) + Název zařízení MIDI. Klepnout pro úpravu (Jack) + + + + Connections from Jack Midi outputs + Spojení z výstupů MIDI Jack + + + + Connections to Jack Midi inputs + Spojení do výstupů MIDI Jack + + + + Auto-connect these channels to new midi tracks + Automaticky tyto kanály připojit do nových stop MIDI + + + + Auto-connect new midi tracks to these channels + Automaticky připojit nové stopy MIDI do těchto kanálů + + + + Auto-connect new midi tracks to this channel + Automaticky připojit nové stopy MIDI do tohoto kanálu + + + + Auto-connect these channels, on this port, to new midi tracks. + Automaticky připojit tyto kanály, na této přípojce, do nových stop MIDI. + + + + Connect new midi tracks to these channels, on this port. + Připojit nové stopy MIDI do těchto kanálů, na této přípojce. + + + + Connect new midi tracks to this channel, on this port. + Připojit nové stopy MIDI do tohoto kanálu, na této přípojce. + + + + Device state + Stav zařízení + + + + Enable gui for device + Povolit rozhraní pro zařízení + + + + Enable reading from device + Povolit čtení ze zařízení + + + + Enable writing to device + Povolit zápis na zařízení + + + + Name of the midi device associated with this port number. Click to edit Jack midi name. + + + + + Instrument connected to port + Nástroj spojen s přípojkou + + + + Connections from Jack Midi output ports + + + + + Connections to Jack Midi input ports + + + + + State: result of opening the device + Status: Ergebnis des Geräteanschlusses + + + + In routes + + + + + Out routes + + + + + Def in ch + + + + + Def out ch + + + + + <unknown> + <neznámý> + + + + + <none> + <Žádný> + + + + MRConfigBase + + + MusE: Midi Input Plugin: Remote Control + MusE: Přídavný modul pro vstup MIDI: Vzdálené ovládání + + + + Activate + Zapnout + + + + On + Zapnuto + + + + Actions + Činnosti + + + + Stop + Zastavit + + + + Record + Nahrávat + + + + Goto Left Mark + Jít na levou značku + + + + Play + Přehrát + + + + Insert rest (step rec) + Vložit přestávku (step rec) + + + + MTScale + + bar scale + Taktposition + + + + MarkerView + + + Window &Config + &Nastavení okna + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Bar:Beat:Tick + Takt:Doba:Tik + + + + Hr:Mn:Sc:Fr:Sf + Hod:Min:Sek:Sn:SR + + + + Lock + Zámek + + + + Text + Text + + + + Marker Properties + Vlastnosti značky + + + + MusE: Marker + MusE: Značka + + + + add marker + Přidat značku + + + Add Marker + Marker hinzufügen + + + + delete marker + Smazat značku + + + Delete Marker + Marker löschen + + + &File + &Datei + + + + &Edit + &Upravit + + + + edit tools + Nástroje pro úpravy + + + + MasterEdit + + + Cursor + Ukazovátko + + + + Snap + Magnet + + + + time at cursor position + Čas na nynější značce polohy + + + + Window &Config + &Nastavení okna + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + tempo at cursor position + Tempo v poloze ukazovátky + + + + CurPos + NynPol + + + + tempo at current position + Čas na nynější značce polohy + + + + time signature at current position + Taktové označení na nynější značce polohy + + + + MusE: Mastertrack + MusE: Hlavní stopa + + + edit tools + Werkzeuge "Bearbeitung" + + + EnableMaster + Master aktivieren + + + + Info + Informace + + + Off + Aus + + + + + Enable + Povolit + + + + Enable usage of master track + Povolit použití hlavní stopy + + + + Enable master + Povolit hlavní + + + + MdiSettingsBase + + + Form + Formulář + + + + GroupBox + SkupinovýBox + + + + MDI subwin + + + + + Shares menu when subwin + Sdílí nabídku, když subwin + + + + Shares menu when free + Sdílí nabídku, když volný + + + + MetronomeConfigBase + + + MusE: Metronome Config + MusE: Nastavení metronomu + + + + Metronome + Metronom + + + + Audio Beep + Vnitřní reproduktor počítače + + + + MIDI Click + Klik MIDI + + + + Midi Channel + Kanál MIDI + + + + Measure Note + Nota taktu + + + + Measure Velocity + Rychlost taktu + + + + Beat Velocity + Síla úhozu na začátku taktu + + + + Beat Note + Nota doby + + + + Midi Port + Přípojka MIDI + + + + Precount + Předpočítat + + + + enable + Povolit + + + + Bars + Takty + + + + From Mastertrack + Z hlavní stopy + + + + / + / + + + + Signature + Taktové označení + + + + Prerecord + Přednahrát + + + + Preroll + Přetáčení vpřed + + + + &Apply + &Použít + + + + &OK + &OK + + + + &Cancel + Z&rušit + + + + Choose outputs... + Vybrat výstupy... + + + + 50 + 50 + + + + % Audio volume + Hlasitost zvuku % + + + + Hint: Enable metronome in Transportpanel + Rada: Povolte metronom v panelu pro přesun + + + + Alt+A + Alt+A + + + + Alt+O + Alt+O + + + + Alt+C + Alt+C + + + + MidiController + + Velocity + Velocity + + + + MidiControllerEditDialogBase + + Type + Typ + + + Properties + Eigenschaften + + + Type + Typ + + + &New + Neu + + + &Delete + &Löschen + + + &OK + &Bestätigen + + + &Cancel + Abb&rechen + + + MusE: Define Midi Controller + MusE: Midi Kontroller definieren + + + &Add + &Hinzufügen + + + Alt+A + Alt+A + + + create new entry + Neuen Eintrag erzeugen + + + pressing the New button you create a new entry +in the MusE list of defined controllers + Durch Klicken der Schaltfläche "Neu" einen neuen Eintrag erzeugen +in der MusE Liste "Definierte Kontroller" + + + delete selected entry + Ausgewählten Eintrag löschen + + + Predefined Controller: + Vordefinierte Kontroller: + + + Name + Name + + + H-Ctrl + H-Ctrl + + + L-Ctrl + L-Ctrl + + + Min Val + Min Wert + + + Max Val + Max Wert + + + list of defined controllers + Liste definierter Kontroller + + + This is the MusE list of defined controllers. + Dies ist die MusE Liste definierter Kontroller. + + + Managed Controller for Port + Verwendeter Kontroller für Anschluss + + + Channel + Kanal + + + This is a list of commonly used midi controllers. +Note that in MusE pitch and program changes are +handled like normal controllers. + Dies ist eine Liste oft standardisierter Midi Kontroller. +Beachte dass in MusE Tonhöhen- und Programmwechselbefehle wie Midikontroller behandelt werden. + + + Name + Name + + + Min Value + Min Wert + + + Max Value + Max Wert + + + Control7 + Kontroller7 + + + Control14 + Kontroller14 + + + RPN + RPN + + + NRPN + NRPN + + + Pitch + Tonhöhe + + + Program + Programm + + + Midi Controller Number High Byte + Midi Kontrollernummer höchstwertiges Byte + + + Midi Controller Number Low Byte + Midi Kontrollernummer niederwertigstes Byte + + + Range + Bereich + + + + MidiFilterConfigBase + + + MusE: Midi Input Filter + MusE: Vstupní filtr MIDI + + + + Record Filter + Filtr nahrávání + + + + + Note On + Nota zapnuta + + + + + Poly Pressure + Poly tlak úhozu + + + + + Controller + Ovladač + + + + + Program Change + Změna programu + + + + + After Touch + Dodělávka po + + + + + Pitch Bend + Ohyb výšky tónu + + + + + Sysex + Sysex + + + + Thru Filter + Thru filtr + + + + Controller Filter + Filtr ovladače + + + + Channel Filter + Filtr kanálu + + + + 14 + 14 + + + + 10 + 10 + + + + 6 + 6 + + + + 12 + 12 + + + + 4 + 4 + + + + 2 + 2 + + + + 9 + 9 + + + + 8 + 8 + + + + 3 + 3 + + + + 13 + 13 + + + + 15 + 15 + + + + 16 + 16 + + + + 7 + 7 + + + + 11 + 11 + + + + 5 + 5 + + + + 1 + 1 + + + + MidiInputTransformDialog + + + + New + Nový + + + + MidiInputTransformDialogBase + + + MusE: Midi Input Transformator + MusE: Transformátor vstupu MIDI + + + + Filter + Filtr + + + + All + Vše + + + + + + + + Equal + Stejný + + + + + + + + Unequal + Nestejný + + + + Note + Poznámka + + + + + Poly Pressure + Vícenásobné stisknutí tlačítka + + + + + Control Change + Změna ovládání + + + + + Aftertouch + Dodělávka po + + + + + Pitch Bend + Ohyb výšky tónu + + + + + NRPN + NRPN + + + + + RPN + RPN + + + + + + Value 2 + Hodnota 2 + + + + + + + + Value 1 + Hodnota 1 + + + + + Event Type + Typ události + + + + + + + Ignore + Přehlížet + + + + + + + Higher + Vyšší + + + + + + + Lower + Nižší + + + + + + + Inside + Uvnitř + + + + + + + Outside + Vně + + + + + Channel + Kanál + + + + + Port + Přípojka + + + + Processing + Zpracování + + + + + + + + Keep + Zachovat + + + + + + + + Fix + Pevný + + + + + + + Plus + Plus + + + + + + + Minus + Minus + + + + + + + Multiply + Násobit + + + + + + + Divide + Dělit + + + + + + + Invert + Obrátit + + + + ScaleMap + Rozložení not + + + + Flip + Obrátit + + + + + + + Dyn + Dyn + + + + + + + Random + Náhodný + + + + Modules + Moduly + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + enable modul 1 + Povolit modul 1 + + + + enable modul 2 + Povolit modul 2 + + + + enable modul 3 + Povolit modul 3 + + + + enable modul 4 + Povolit modul 4 + + + + Preset + Přednastavení + + + + Name: + Název: + + + + Comment: + Poznámka: + + + + Function + Funkce + + + + &New + &Nový + + + + create new preset + Vytvořit nové přednastavení + + + + &Delete + S&mazat + + + + delete preset + Smazat přednastavení + + + + &Dismiss + &Zahodit + + + + PresetList + Seznam přednastavení + + + + MidiPortRouteBase + + MusE: Midi Port Routing + MusE: Midi Anschluss Signalfluss + + + Port 2 + Anschluss 2 + + + Output + Ausgang + + + Input + Eingang + + + + MidiStrip + + VariationSend + VariationSend + + + Var + Var + + + ReverbSend + ReverbSend + + + Rev + Rev + + + ChorusSend + ChorusSend + + + Cho + Cho + + + off + aus + + + dB + dB + + + Pan/Balance + Pan/Balance + + + Pan + Pan + + + record + Aufnahme + + + mute + still + + + pre fader listening + Vor Regler abhören + + + Route + Signalfluss + + + set routing + Signalfluss einstellen + + + Off + aus + + + Read + lesen + + + Touch + berühren + + + Write + schreiben + + + automation type + Automatisationstyp + + + iR + iR + + + oR + oR + + + output routing + Ausgangs-Signalfluss + + + + MidiSyncConfig + + Port Number + Anschlussnummer + + + Name of the midi device associated with this port number + Name des Midi Gerätes an dieser Anschlussnummer + + + Device Name + Gerätename + + + m + min + + + MusE + MusE + + + &Apply + &Anwenden + + + &No + &Nein + + + &Abort + &Abbrechen + + + <none> + <kein> + + + + MidiSyncConfigBase + + + MusE: Midi Sync + MusE: Seřízení MIDI + + + + Apply + Přehrát + + + + Ok + OK + + + + Cancel + Zrušit + + + + hour + hodina + + + + h + h + + + + minute + minuta + + + + m + m + + + + second + sekunda + + + + s + s + + + + frame + snímek + + + + f + sn + + + + subframe + podsnímek + + + + 24 + 24 + + + + 25 + 25 + + + + 30D + 30D + + + + 30N + 30N + + + Id: + Id: + + + device id + Geräte id + + + Port: + Anschluss: + + + midi port + Midi Anschluss + + + Sync Source + Sync Quelle + + + accept MTC + MTC erlauben + + + accept Midi Clock + Midi Clock erlauben + + + accept MMC + MMC erlauben + + + Sync Gen + Sync Gen + + + Midi Time Code (MTC) + Midi Time Code (MTC) + + + Midi Clock + Midi Clock + + + Midi Machine Control (MMC) + Midi Machine Control (MMC) + + + Sync Mode + Sync Modus + + + Master + Master + + + Slave + Sklave + + + all + alle + + + + MTC + MTC + + + + Type: + Typ: + + + + Offset: + Posun: + + + + Sync receiving and sending + Seřídit přijímání a posílání + + + + Send and receive Jack transport + Poslat a přijmout přesun JACK + + + + Send and receive Jack transport information, + including stop, start and position. + Poslat a přijmout informace o přesunu JACK, +včetně zastavení, spuštění a polohy. + + + + Use Jack transport + Použít přesun JACK + + + + Make MusE the Jack transport Timebase Master + Udělat MusE řízení času pro přesun JACK + + + + Make MusE the Jack transport Timebase Master. +Allows Jack to show time as + MusE Bars, Beats, and Ticks. +MusE will try to become master, but other + Jack clients can also take over later. +You can always click here again for Master. + + + + + Jack transport Timebase Master + + + + + Control MusE timing by external midi clock or MTC sync + + + + + When in slave mode, tempo is + controlled externally. +MusE can sync to midi clock, or MTC quarter frame sync. +Enabled inputs in the list will + be in effect (RMC, RMMC, RMTC). + + + + + Slave to external sync + + + + + Send start to first clock delay + Poslat začátek zpoždění prvních hodin + + + + Allows 'slow sync' devices time + to synchronize to MusE. This value is the + delay from sending start to sending + the first clock. + + + + + ms + ms + + + + Send sync delay + + + + + MidiTrackInfoBase + + + MusE: TrackInfo + MusE: Informace o stopě + + + + output channel + Výstupní kanál + + + all midi events are send to this output channel + Alle Midi Ereignisse werden an diesen Ausgangskanal gesandt + + + Track Info + Spurinfo + + + + + % + % + + + Track Name + Spur Name + + + + output port + Výstupní přípojka + + + + iR + Vst. sign. tok + + + + + + + + + + off + Vypnuto + + + change stereo position + Stereoposition tauschen + + + OCh. + AusgKan. + + + ??? + ??? + + + select instrument patch + Instrumentenpatch auswählen + + + + Transp. + Přesun + + + Volume + Volume + + + + Channel Info + Informace o kanálu + + + + Rec: + Nahr.: + + + + Prog + Prog + + + + Vol + Hlas + + + + Pan + Vyváž + + + + Delay + Zpož + + + + H-Bank + Vys. banka + + + + Compr. + Kompr. + + + + L-Bank + Níz. banka + + + Progr. + Progr. + + + + Velocity + Rychlost + + + + Length + Délka + + + input ports + Eingangsanschlüsse + + + IChan. + EingKan. + + + input channels + Eingangsknäle + + + Events from all configured channels are +recorded to this track. +You can specify more than one channel for +recording: + 1 2 3 record from channel 1 2 and 3 + 1-3 same + 1-3 5 record from channel 1 2 3 and 5 + Ereignisse von allen gewählten Kanälen +werden auf dieser Spur aufgenommen. +Zur Aufnahme können mehrere Kanäle gewählt werden: + 1 2 3 Aufnahme von den Kanälen 1 2 und 3 + 1-3 Aufnahme von den Kanälen 1 2 und 3 + 1-3 5 Aufnahme von den Kanälen 1 2 3 und 5 + + + + record: + aufnehmen: + + + Rec + Aufnahme + + + add settings to song + Einstellungen zum Lied hinzufügen + + + Bank Select LSB + Bank Wahl LSB + + + Bank Select MSB + Bank Wahl MSB + + + + all midi events are sent to this output channel + Všechny události MIDI jsou poslány do tohoto výstupního kanálu + + + + Out ch + Výstupní kanál + + + + input routing + Vstupní signálový tok + + + + output routing + Výstupní signálový tok + + + + oR + Výs. sign. tok + + + + input detect + Zjištění vstupu + + + + Input detect indicator. Detects all note on-off, controller, aftertouch, + program change, and pitchbend (but not sysex or realtime) events + on the selected channels, on the selected midi ports. + + + + + W + W + + + + Midi thru + MIDI thru + + + + Pass input events through ('thru') to output. + Vést vstupní události skrz ('thru') do výstupu. + + + + Select instrument patch + Vybrat záplatu nástroje + + + + <unknown> + <neznámý> + + + + Add all settings to song + Přidat všechna nastavení do písně + + + + All + Vše + + + + Bank Select MSB. Double-click on/off. + Výběr banky MSB. Dvojité klepnutí zapnuto/vypnuto. + + + + Bank Select LSB. Double-click on/off. + Výběr banky LSB. Dvojité klepnutí zapnuto/vypnuto. + + + + Program. Double-click on/off. + Program. Dvojité klepnutí pro zapnuto/vypnuto. + + + + Add bank + prog settings to song + Přidat banku + nastavení programu do písně + + + + Volume. Double-click on/off. + Hlasitost. Dvojité klepnutí pro zapnuto/vypnuto. + + + + Add vol setting to song + Přidat nastavení hlasitosti do písně + + + + + Change stereo position. Double-click on/off. + Změnit polohu sterea. Dvojité klepnutí pro zapnuto/vypnuto. + + + + Add pan setting to song + Přidat nastavení vyvážení do písně + + + + MidiTransformDialogBase + + + MusE: Midi Transformator + MusE: Transformátor MIDI + + + + &New + &Nový + + + + &Delete + S&mazat + + + + &Apply + &Použít + + + + &OK + &OK + + + + &Cancel + Z&rušit + + + + PresetList + Seznam přednastavení + + + + Processing + Zpracování + + + + + Event Type + Typ události + + + + + + + + Keep + Zachovat + + + + + + + Fix + Pevný + + + + + Note + Poznámka + + + + + Poly Pressure + Vícenásobné stisknutí tlačítka + + + + + Control Change + Změna ovládání + + + + + Aftertouch + Dodělávka po + + + + + Pitch Bend + Ohyb výšky tónu + + + + + NRPN + NRPN + + + + + RPN + RPN + + + + + + + Plus + Plus + + + + + + + Minus + Minus + + + + + + + Multiply + Násobit + + + + + + + Divide + Dělit + + + + + + Value 2 + Hodnota 2 + + + + + Invert + Obrátit + + + + ScaleMap + Rozložení not + + + + Flip + Obrátit + + + + + Dyn + Dyn + + + + + Random + Náhodný + + + + + + Value 1 + Hodnota 1 + + + + + Length + Délka + + + + Position + Poloha + + + + Filter + Filtr + + + + All + Vše + + + + + + + + Equal + Stejný + + + + + + + + Unequal + Nestejný + + + + + + + Ignore + Přehlížet + + + + + + + Higher + Vyšší + + + + + + + Lower + Nižší + + + + + + + Inside + Uvnitř + + + + + + + Outside + Vně + + + + Bar Range + Oblast taktu + + + + Preset + Přednastavení: + + + + Name: + Název: + + + + Comment: + Poznámka: + + + + Range + Rozsah + + + + process all events + Zpracovat všechny události + + + + selected tracks + Vybrané stopy + + + + inside loop + Uvnitř smyčky + + + + Function + Funkce + + + + Select + Vybrat + + + + Quantize + Kvantizovat + + + + Delete + Smazat + + + + Transform + Proměnit + + + + Insert + Vložit + + + + Copy + Kopírovat + + + + Extract + Vytáhnout + + + + Quantize Value + Kvantizovat hodnotu + + + + MidiTransformerDialog + + + + New + Nový + + + + MixdownFileDialog + + Wave Files (*.wav);;All Files (*) + Wave Dateien (*.wav);;Alle Dateien (*) + + + + MixdownFileDialogBase + + + MusE: Set Mixdown Wavefile + MusE: Nastavit finální mixáž souboru WAV + + + + &OK + &OK + + + + &Cancel + Z&rušit + + + + File Path + Cesta k souboru + + + + Channel + Kanál + + + + Stereo + Stereo + + + + Mono + Mono + + + + 5.1 + 5.1 + + + + wav,16 Bit + wav, 16 Bit + + + + wav, 24 Bit + wav, 24 Bit + + + + wav, 32 Bit (float) + wav, 32 Bit (float) + + + + Format + Formát + + + + Mixer + + Port + Port + + + + MoveBase + + + MusE: Move Notes + MusE: Přesunout noty + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Value + Hodnota + + + + Move by + Přesunout podle + + + + ticks + tiky + + + + OK + OK + + + + Cancel + Zrušit + + + + MusE + + &File + Lied&datei + + + Open &Recent + &Letztes Lied öffnen + + + Save &As + Lied &sichern als + + + Config &Printer + Druckerkonfiguration + + + Import Midifile + Mididatei importieren + + + Export Midifile + Mididatei exportieren + + + Import Wave File + Wavedatei importieren + + + &Quit + &Beenden + + + &Edit + B&earbeiten + + + C&ut + &Ausschneiden + + + &Copy + &Kopieren + + + &Paste + Ei&nfügen + + + Delete Track + Spur löschen + + + Add Track + Spur hinzufügen + + + Select &All + Alles a&uswählen + + + &Deselect All + Alles ab&wählen + + + Invert &Selection + Auswa&hl umkehren + + + &Inside Loop + Bereich &innerhalb der Schleife + + + &Outside Loop + Bereich außerhalb der Schlei&fe + + + All &Parts on Track + Alle &Parts der Spur + + + Select + Auswählen + + + Drums + Schlagzeug Editor + + + List + Listen Editor + + + Graphic + Graphischer Editor + + + Mastertrack + Masterspur + + + Midi &Transform + Midi &transformieren + + + Modify Gate Time + Gate Zeit ändern + + + Modify Velocity + Velocity ändern + + + Crescendo + Crescendo + + + Transpose + Transponieren + + + Thin Out + Daten ausdünnen + + + Erase Event + Ereignis löschen + + + Note Shift + Notenhöhe ändern + + + Copy Measure + Takt kopieren + + + Erase Measure + Takt löschen + + + Delete Measure + Takt entfernen + + + Create Measure + Takt erzeugen + + + Mix Track + Spur mischen + + + Midi + Midi + + + &Structure + &Struktur + + + Global Cut + Globaler Schnitt + + + Global Insert + Globales Einfügen + + + Global Split + Globales Aufteilen + + + Copy Range + Bereich kopieren + + + Cut Events + Ereignisse ausschneiden + + + Transport Panel + Transportkonsole + + + Bigtime Window + Zeitanzeige groß + + + Don't Follow Song + Fenster folgt nicht dem Lied + + + Follow Page + Fenster folgt dem Lied seitenweise + + + Follow Continuous + Fenster folgt dem Lied ständig + + + Global Settings + Globale Einstellungen + + + Follow Song + Folge dem Lied + + + Metronome + Metronom + + + Midi Sync + Midi Sync + + + Appearance Settings + Erscheinungsbild einstellen + + + Midi Input Transform + Midi Eingang transformieren + + + Midi Input Filter + Midi Eingangsfilter + + + Midi Remote Control + Midi Fernbedienung + + + Random Rhythm Generator + Zufälliger Rhythmusgenerator + + + &Midi + &Midi + + + Mixer + Mischpult + + + Input Plugins + Eingangs-PlugIns + + + Reset Instr. + Rücksetzen Instr. + + + Init Instr. + Initialisieren Instr. + + + Local Off + Lokal off + + + &Audio + &Audio + + + Bounce to Track + Auf Spur abmischen + + + Bounce to File + In Datei abmischen + + + &Help + &Hilfe + + + Browser + Browser + + + About&Qt + Über &Qt + + + MusE: load project + Muse: Projekt laden + + + The current Project contains unsaved data +Save Current Project? + Das aktuelle Projekt enthält ungesicherte Daten +Aktuelles Projekt sichern? + + + &Save + Lied &sichern + + + &Nosave + Lied &nicht Sichern + + + &Abort + &Abbrechen + + + MusE: Save As + MusE: Lied sichern als + + + Nothing to edit + Es gibt Nichts zu editieren + + + The current Project contains unsaved data +Load overwrites current Project: +Save Current Project? + Das aktuelle Projekt enthält ungesicherte Daten +Neues Lied laden überschreibt das aktuelle Projekt: +Aktuelles Projekt sichern? + + + &Overwrite + &Überschreiben + + + no help found at: + Hilfe wurde nicht gefunden: + + + MusE: Open Help + MusE: Hilfe öffnen + + + UndoRedo + Zurück Wiederholen + + + undo + Rücksetzen + + + Und&o + &Rücksetzen + + + redo + Wiederholen + + + Re&do + &Wiederholen + + + undo last change to song + Letzte Änderung am Lied rücksetzen + + + redo last undo + Letztes Rücksetzen wiederholen + + + Transport + Transport + + + loop + Schleife erzeugen + + + Loop + Schleife + + + punchin + Aufnahme am linken Marker beginnen + + + Punchin + Aufnahme am linken Marker beginnen + + + punchout + Aufnahme am rechten Marker beenden + + + Punchout + Aufnahme am rechten Marker beenden + + + start + Start + + + Start + Start + + + rewind + Einen Taktschlag rückwärts + + + Rewind + Einen Taktschlag rückwärts + + + forward + Einen Taktschlag vorwärts + + + Forward + Einen Taktschlag vorwärts + + + stop + Stopp + + + Stop + Stopp + + + play + Wiedergabe + + + Play + Wiedergabe + + + record + Aufnahme + + + Record + Aufnahme + + + panic + Panik + + + Panic + Panik + + + new + Neues Lied + + + &New + &Neues Lied + + + open + Öffnen + + + &Open + Lied &öffnen + + + save + Lied sichern + + + pianoroll + Pianorollen Editor + + + Pianoroll + Pianorollen Editor + + + marker + Marker + + + Marker + Marker + + + File Buttons + Schaltflächen + + + Unknown File Format + Unbekanntes Dateiformat + + + MusE: Write File failed + MusE: Datei schreiben schlug fehl + + + MusE: Song: + MusE: Lied: + + + MusE: Copy Range + MusE: Bereich kopieren + + + not implemented + Nicht umgesetzt + + + MusE: Cut Events + MusE: Ereignisse ausschneiden + + + MusE: Bounce to Track + MusE: Auf Spur abmischen + + + more than one target track selected + Mehr als eine Zielspur ausgewählt + + + wrong target track type, +select wave track as target + Falscher Zielspurtyp, +Wave Spur als Zielspur auswählen + + + no target track selected + Keine Zielspur ausgewählt + + + to import a audio file you have first to selecta wave track + Um eine Audiodatei zu importieren zuerst eine Wave Spur auswählen + + + Delete Selected Tracks + Ausgewählte Spuren löschen + + + View + Ansicht + + + Edit Instrument + Instrument bearbeiten + + + Restart Audio + Audio erneut starten + + + Automation + Automatisierung + + + Mixer Automation + Mischpult Automatisierung + + + Take Snapshot + Schnappschuss aufnehmen + + + Clear Automation Data + Automatisierungsdaten löschen + + + Settings + Einstellungen + + + Configure Shortcuts + Tastenkürzel einstellen + + + Midi File Export + Midi Datei exportieren + + + Midi Ports / Soft Synth + Midi Anschlüsse / Software Synthesizer + + + &Manual + &Handbuch + + + &MusE Homepage + &MusE Webseite + + + &Report Bug... + &Fehler melden ... + + + &About MusE + &Über MusE + + + What's &This? + Was ist &das? + + + Cannot read template + Vorlage nicht lesbar + + + File open error + Fehler beim Datei öffnen + + + File read error + Fehler beim Datei lesen + + + MusE: load template + Muse: Vorlage laden + + + MusE: Bounce + MusE: Abmischen + + + set left/right marker for bounce range + Linken/rechten Marker für Abmischbereich einstellen + + + MusE: Bounce to File + MusE: In Datei abmischen + + + no output track found + Keine Ausgangsspur gefunden + + + MusE: Export Midi + MusE: Midi exportieren + + + MusE: Import Midi + MusE: Midi importieren + + + Add midi file to current project? + + Mididatei zu aktuellem Lied hinzufügen? + + + &Add to Project + Zu Lied hin&zufügen + + + &Replace + Erset&zen + + + reading midifile + + Lese Mididatei + + + +failed: + schlug fehl: + + + &View + &Zeigen + + + New + Neu + + + &Yes + &Ja + + + &No + &Nein + + + + MusEApp::MusE + + + + Failed to start audio! + Nepodařilo se spustit zvuk! + + + + Was not able to start audio, check if jack is running. + + Nepodařilo se spustit zvuk. Ověřte, že JACK běží. + + + + + Timeout waiting for audio to run. Check if jack is running. + + Překročení času při čekání na zvuk. Ověřte, že JACK běží. + + + + + Und&o + &Zpět + + + + Re&do + &Znovu + + + + undo last change to song + Vrátit poslední změnu na písni zpět + + + + redo last undo + Znovu poslední Zpět + + + + Loop + Smyčka + + + + Punchin + Začít nahrávání na levé značce + + + + Punchout + Ukončit nahrávání na pravé značce + + + + Start + Spustit + + + + Rewind + Přetočit zpět + + + + Forward + Vpřed + + + + Stop + Zastavit + + + + Play + Přehrát + + + + Record + Nahrávat + + + + + Panic + Nouzové zastavení + + + + &New + &Nový + + + + &Open + &Otevřít + + + + Open &Recent + Otevřít &nedávný + + + + + + &Save + &Uložit + + + + Save &As + Uložit &jako + + + + Import Midifile + Zavést soubor MIDI + + + + Export Midifile + Vyvést soubor MIDI + + + + Import Part + Zavést část + + + + + Import Wave File + Zavést soubor WAV + + + + Find unused wave files + Najít nepoužívané soubory WAV + + + + &Quit + &Ukončit + + + + Song Info + Informace o písni + + + + Transport Panel + Panel pro přesun + + + + Bigtime Window + Velký ukazatel času + + + + Mixer A + Směšovač A + + + + Mixer B + Směšovač B + + + + Cliplist + Seznam ukázek + + + + Marker View + Pohled se značkami + + + + Arranger View + Pohled s aranžérem + + + + Fullscreen + Celá obrazovka + + + + &Plugins + &Přídavné moduly + + + + Edit Instrument + Upravit nástroj + + + + Input Plugins + Vstupní přídavné moduly + + + + Transpose + Převést + + + + Midi Input Transform + Proměnit vstup MIDI + + + + Midi Input Filter + Filtr pro vstup MIDI + + + + Midi Remote Control + Vzdálené ovládání MIDI + + + + Rhythm Generator + Generátor rytmu + + + + Reset Instr. + Nastavit nástroj znovu + + + + Init Instr. + Zapnout nástroj + + + + Local Off + Místně vypnuto + + + + Bounce to Track + Smíchat do stopy + + + + Bounce to File + Smíchat do souboru + + + + Restart Audio + Spustit zvuk znovu + + + + Mixer Automation + Automatizace mixážního pultu + + + + Take Snapshot + Udělat snímek + + + + Clear Automation Data + Vyprázdnit automatizaci + + + + Cascade + Překrývat + + + + Tile + Uspořádat jedno vedle druhého + + + + In rows + V řádcích + + + + In columns + Ve sloupcích + + + + Global Settings + Celková nastavení + + + + Configure Shortcuts + Nastavit klávesové zkratky + + + + Follow Song + Sledovat píseň + + + + Don't Follow Song + Nesledovat píseň + + + + Follow Page + Sledovat píseň na několika stránkách + + + + Follow Continuous + Sledovat píseň neustále + + + + Metronome + Metronom + + + + Midi Sync + Seřízení MIDI + + + + Midi File Import/Export + Zavedení/Vyvedení souboru MIDI + + + + Appearance Settings + Nastavení vzhledu + + + + Midi Ports / Soft Synth + Přípojky MIDI / Softwarový systetizátor + + + + &Manual + &Příručka + + + + &MusE Homepage + Stránky o &MusE + + + + &Report Bug... + &Nahlásit chybu... + + + + &About MusE + &O programu MusE + + + + File Buttons + Tlačítka pro soubor + + + + Undo/Redo + Zpět/Znovu + + + + Transport + Přesun + + + + &File + &Soubor + + + + &View + &Pohled + + + + &Midi + &Midi + + + + &Audio + &Zvuk + + + + A&utomation + A&utomatizace + + + + &Windows + &Okna + + + + MusE Se&ttings + Nas&tavení MusE + + + + &Help + &Nápověda + + + + Cannot read template + Nelze číst předlohu + + + + File open error + Chyba při otevírání souboru + + + + File read error + Chyba při čtení souboru + + + + Unknown File Format: + Neznámý formát souboru: + + + + + + MusE: Song: + MusE: Píseň: + + + + MusE: load project + Muse: Nahrát projekt + + + + MusE: load template + Muse: Nahrát předlohu + + + + MusE: Write File failed + MusE: Zápis souboru se nezdařil + + + + The current Project contains unsaved data +Save Current Project? + Nynější projekt obsahuje neuložená data. +Uložit nynější projekt? + + + + + S&kip + &Přeskočit + + + + &Cancel + Z&rušit + + + + + MusE: Save As + MusE: Píseň uložit jako + + + + + Nothing to edit + Není co upravovat + + + + + + + + MusE: Bounce to Track + MusE: Smíchat do stopy + + + + No wave tracks found + Nebyly nalezeny žádné stopy WAV + + + + + No audio output tracks found + Nebyly nalezeny žádné zvukové výstupní stopy + + + + Select one audio output track, +and one target wave track + Vyberte jednu zvukovou výstupní stopu +a jednu cílovou stopu WAV + + + + Select one target wave track + Vyberte jednu cílovou stopu WAV + + + + Select one target wave track, +and one audio output track + Vyberte jednu cílovou stopu WAV +a jednu zvukovou výstupní stopu + + + + + MusE: Bounce to File + MusE: Smíchat do souboru + + + + Select one audio output track + Vyberte jednu zvukovou výstupní stopu + + + + MusE: Bounce + MusE: Smíchat + + + + set left/right marker for bounce range + Nastavit levou/pravou značku pro oblast smíchání + + + + The current Project contains unsaved data +Load overwrites current Project: +Save Current Project? + Nynější projekt obsahuje neuložená data. +Nahrání přepíše nynější projekt: +Uložit nynější projekt? + + + + + &Abort + &Zrušit + + + + MusE: Export Midi + MusE: Vyvést MIDI + + + + no help found at: + Nápověda nebyla nalezena: + + + + MusE: Open Help + MusE: Otevřít nápovědu + + + + Unable to launch help + Nelze spustit nápovědu + + + + For some reason MusE has to launch the default +browser on your machine. + Z určitého důvodu musí MusE na vašem stroji +spustit výchozí prohlížeč. + + + + MusE: Import Midi + MusE: Zavést MIDI + + + + Add midi file to current project? + + Přidat soubor MIDI do nynější písně? + + + + &Add to Project + &Přidat do projektu + + + + &Replace + &Nahradit + + + + reading midifile + + Čte se soubor MIDI + + + + +failed: + +selhalo: + + + + Import part is only valid for midi and wave tracks! + Zavedení části je platné pouze pro stopy MIDI a WAV! + + + + MusE: load part + MusE: Nahrát část + + + + No track selected for import + Pro zavedení nebyla vybrána žádná stopa + + + + out of + z + + + + parts + části + + + + part + část + + + + could not be imported. +Likely the track is the wrong type. + se nepodařilo zavést. +Možná je stopa nesprávného typu. + + + + to import an audio file you have first to selecta wave track + pro zavedení zvukového souboru nejprve musíte vybrat stopu WAV + + + + Import Wavefile + Zavést soubor WAV + + + + This wave file has a samplerate of %1, +as opposed to current setting %2. +Do you still want to import it? + Tento soubor WAV má vzorkovací kmitočet %1, +jako protiklad k nynějšímu nastavení %2. +Stále ještě jej chcete zavést? + + + + &Yes + &Ano + + + + &No + &Ne + + + + MusEArranger::Arranger + + + Enable Recording + Povolit nahrávání + + + + Mute/Off Indicator + Ztlumit/Ukazatel vypnuto + + + + Solo Indicator + Ukazatel "Solo" + + + + Track Type + Typ stopy + + + + Track Name + Název stopy + + + + Midi output channel number or audio channels + Číslo kanálu výstupu MIDI nebo zvukové kanály + + + + Midi output port or synth midi port + Přípojka výstupu MIDI nebo přípojka MIDI syntetizátoru + + + + Time Lock + Zámek času + + + + Automation parameter selection + Výběr parametru automatizace + + + + Notation clef + Notový klíč + + + + Enable recording. Click to toggle. + Zapnout nahrávání. Klepněte pro přepnutí. + + + + Mute indicator. Click to toggle. +Right-click to toggle track on/off. +Mute is designed for rapid, repeated action. +On/Off is not! + Ukazatel ztlumení. Klepněte pro přepnutí. +Klepnutí pravým tlačítkem myši pro přepnutí stopy na zapnuto/vypnuto. +Ztlumení je navrženo pro rychlou, opakovanou činnost. +Zapnuto/Vypnuto není! + + + + Solo indicator. Click to toggle. +Connected tracks are also 'phantom' soloed, + indicated by a dark square. + + + + + Track type. Right-click to change + midi and drum track types. + + + + + Track name. Double-click to edit. +Right-click for more options. + + + + + Midi/drum track: Output channel number. +Audio track: Channels. +Mid/right-click to change. + + + + + Midi/drum track: Output port. +Synth track: Assigned midi port. +Left-click to change. +Right-click to show GUI. + + + + + Time lock + + + + + Notation clef. Select this tracks notation clef. + + + + + Arranger + Aranžér + + + + Cursor + Ukazovátko + + + + Snap + Magnet + + + + Len + Délka + + + + + song length - bars + délka písně - takty + + + + Type + Typ + + + + NO + NO + + + + GM + GM + + + + GS + GS + + + + XG + XG + + + + + midi song type + Typ písně MIDI + + + + Pitch + Výška tónu + + + + midi pitch + Změna výšky tónu MIDI + + + + global midi pitch shift + Celková změna výšky tónu MIDI + + + + Tempo + Tempo + + + + + midi tempo + Tempo MIDI + + + + N + N + + + + TrackInfo + Informace o stopě + + + + R + R + + + + M + R + + + + S + S + + + + C + C + + + + Track + Stopa + + + + Port + Přípojka + + + + Ch + Kan + + + + T + T + + + + Automation + Automatizace + + + + Clef + Klíč + + + + MusEArranger::ArrangerView + + + MusE: Arranger + MusE: Aranžér + + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + C&ut + Vyj&mout + + + + &Copy + &Kopírovat + + + &Copy in range + Im Bereich kopieren + + + + Copy in range + Kopírovat v oblasti + + + + &Paste + &Vložit + + + + Paste (show dialog) + Vložit (ukázat dialog) + + + + Paste c&lone + Vložit k&lon + + + + Paste clone (show dialog) + Vložit klon (ukázat dialog) + + + + &Insert Empty Measure + Vložit prázdný &takt + + + + Delete Selected Tracks + Smazat vybrané stopy + + + + Shrink selected parts + Srazit vybrané části + + + + Expand selected parts + Roztáhnout vybrané části + + + + Clean selected parts + Uklidit vybrané části + + + + Add Track + Přidat stopu + + + + Select + Vybrat + + + + Select &All + Vybrat &vše + + + + &Deselect All + &Zrušit výběr všeho + + + + Invert &Selection + Obrátit &výběr + + + + &Inside Loop + &Uvnitř smyčky + + + + &Outside Loop + &Vně smyčky + + + + All &Parts on Track + Všechny čá&sti na stopě + + + + Score + Notový zápis + + + + all parts in one staff + Všechny části v jedné osnově + + + + one staff per part + Jedna osnova na část + + + + New score window + Nové okno s notovým zápisem + + + + Pianoroll + Editor válečku + + + + Drums + Bubny + + + + + List + Seznam + + + + Wave + WAV + + + + Mastertrack + Hlavní stopa + + + + Graphic + Grafický editor + + + + Midi &Transform + &Proměna MIDI + + + + Global Cut + Celkové vyjmutí + + + + Global Insert + Celkové vložení + + + + Global Split + Celkové rozdělení + + + + &Edit + &Upravit + + + + &Structure + &Stavba + + + + Functions + Funkce + + + + &Quantize Notes + &Kvantizovat noty + + + + Change note &length + Změnit &délku noty + + + + Change note &velocity + Změnit &rychlost noty + + + + Crescendo/Decrescendo + Crescendo/Decrescendo + + + + Transpose + Převést + + + + Erase Events (Not Parts) + Smazat události (nikoli části) + + + + Move Events (Not Parts) + Přesunout události (nikoli části) + + + + Set Fixed Note Length + Nastavit pevnou délku noty + + + + Delete Overlapping Notes + Smazat překrývající se noty + + + + Legato + Legáto + + + + Window &Config + &Nastavení okna + + + + + New + Nový + + + + MusEArranger::PartCanvas + + + Cannot copy/move/clone to different Track-Type + Nelze kopírovat/přesunovat/klonovat na jiný typ stopy + + + + C&ut + Vyj&mout + + + + &Copy + &Kopírovat + + + + s&elect + &Vybrat + + + + clones + Klony + + + + rename + Přejmenovat + + + + color + Barva + + + + delete + Smazat + + + + split + Rozdělit + + + + glue + Lepidlo + + + + de-clone + Zrušit klonování + + + + + + save part to disk + Uložit část na disk + + + + wave edit + Editor WAV + + + + file info + Informace o souboru + + + + MusE: save part + MusE: Uložit část + + + + Part name + Název části + + + + Files + Soubory + + + + out of + z + + + + parts + části + + + + part + igitt + část + + + + could not be pasted. +Likely the selected track is the wrong type. + se nepodařilo vložit. +Možná je stopa nesprávného typu. + + + + Cannot paste: multiple tracks selected + Nelze vložit: vybráno více stop + + + + Cannot paste: no track selected + Nelze vložit: nevybrána žádná stopa + + + + Can only paste to midi/drum track + Vložení možné jen do stopy MIDI/Bicí + + + + Can only paste to wave track + Vložení možné jen do stopy WAV + + + + Can only paste to midi or wave track + Vložení možné jen do stopy MIDI nebo WAV + + + + Cannot paste: wrong data type + Nelze vložit: Nesprávný datový typ + + + + MusEArranger::TList + + + <none> + <Žádný> + + + + no clef + Žádný klíč + + + + Treble + Houslový klíč + + + + Bass + Basový klíč + + + + Grand + Oba klíče + + + + MusE: bad trackname + MusE: Špatný název stopy + + + + please choose a unique track name + Vyberte, prosím, jedinečný název pro stopu + + + + + Update drummap? + Obnovit rozložení bicích? + + + + Do you want to use same port for all instruments in the drummap? + Chcete pro všechny nástroje v rozložení bicích použít stejnou přípojku? + + + + + &Yes + &Ano + + + + + &No + &Ne + + + + + show gui + Ukázat rozhraní + + + + + show native gui + Ukázat původní rozhraní + + + + Treble clef + Houslový klíč + + + + Bass clef + Basový klíč + + + + Grand Staff + Oba klíče + + + + Viewable automation + Viditelná automatizace + + + + Delete Track + Smazat stopu + + + + Track Comment + Poznámka ke stopě + + + + Insert Track + Vložit stopu + + + + Midi + MIDI + + + + Drum + Bicí + + + + Do you want to use same port and channel for all instruments in the drummap? + Chcete pro všechny nástroje v rozložení bicích použít stejnou přípojku a týž kanál? + + + + MusEDialog::PasteDialog + + + %n quarter(s) + + %n čtvrťová nota + %n čtvrťové noty + %n čtvrťových not + + + + + quarter + Čtvrťová + + + + quarters + Čtvrťové + + + + MusEDialog::PasteEventsDialog + + + %n quarter(s) + + %n čtvrťová nota + %n čtvrťové noty + %n čtvrťových not + + + + + quarter + Čtvrťová + + + + quarters + Čtvrťové + + + + MusEMixer::AudioMixerApp + + + &Create + &Vytvořit + + + + &View + &Pohled + + + + Routing + Tok signálu + + + + Show Midi Tracks + Ukázat stopy MIDI + + + + Show Drum Tracks + Ukázat stopy bicích + + + + Show Wave Tracks + Ukázat stopy WAV + + + + Show Inputs + Ukázat vstupy + + + + Show Outputs + Ukázat výstupy + + + + Show Groups + Ukázat skupiny + + + + Show Auxs + Ukázat Aux + + + + Show Synthesizers + Ukázat syntetizátory + + + + MusEMixer::AudioStrip + + + panorama + Panorama + + + + aux send level + Úroveň poslání Aux + + + + Pan + Vyvážení (Pan) + + + + 1/2 channel + 1/2 kanály + + + + Pre + Před + + + + pre fader - post fader + Předprolínač - poprolínač + + + + dB + dB + + + + record + Nahrávat + + + + mute + Ztlumit + + + + record downmix + Nahrávat smíchání + + + + + solo mode + Režim sóla + + + + off + Vypnuto + + + + iR + Vst. sign. tok + + + + input routing + Vstupní signálový tok + + + + oR + Výs. sign. tok + + + + output routing + Výstupní signálový tok + + + + Off + Vypnuto + + + + Read + Číst + + + + Touch + Dotknout se + + + + Write + Zapsat + + + + automation type + Typ automatizace + + + + MusEMixer::EffectRack + + + effect rack + Přihrádka s efekty + + + + new + Nový + + + + change + Změnit + + + + move up + Posunout nahoru + + + + move down + Posunout dolů + + + + remove + Odstranit + + + + bypass + Obejít + + + + show gui + Ukázat rozhraní + + + + show native gui + Ukázat původní rozhraní + + + + save preset + Uložit přednastavení + + + + MusE: Save Preset + MusE: Uložit přednastavení + + + + Replace effect + Nahradit efekt + + + + Do you really want to replace the effect %1? + Opravdu chcete nahradit efekt %1? + + + + MusEMixer::MidiStrip + + + + + off + Vypnuto + + + + + double click on/off + Dvojité klepnutí pro zapnuto/vypnuto + + + + VariationSend + PosláníVariace + + + + Var + Var + + + + ReverbSend + PosláníOzvěny + + + + Rev + Ozv + + + + ChorusSend + PosláníSboru + + + + Cho + Sbor + + + + dB + dB + + + + Pan/Balance + Pan/Vyvážení + + + + Pan + Pan + + + + record + Nahrávat + + + + mute + Ztlumit + + + + solo mode + Režim sóla + + + + iR + Vst. sign. tok + + + + input routing + Vstupní signálový tok + + + + oR + Výs. sign. tok + + + + output routing + Výstupní signálový tok + + + + MusEWidget::BigTime + + + format display + Zobrazení formátu + + + + bar + Takt + + + + beat + Doba + + + + + tick + Tik + + + + minute + Minuta + + + + second + Sekunda + + + + + frame + Snímek + + + + subframe + Podsnímek + + + + MusE: Bigtime + MusE: Velký ukazatel času + + + + MusEWidget::EditToolBar + + + Edit Tools + Nástroje pro úpravy + + + + MusEWidget::GlobalSettingsConfig + + + Selects instruments directory + Vybere adresář s nástroji + + + + MusEWidget::Header + + + Track Info Columns + Sloupce s informacemi o stopě + + + + MusEWidget::MTScale + + + bar scale + Měřítko taktu + + + + MusEWidget::MTScaleFlo + + + bar scale + Měřítko taktu + + + + MusEWidget::MidiSyncConfig + + + + Port Number + Číslo přípojky + + + + + Name of the midi device associated with this port number + Název zařízení MIDI spojeného s tímto číslem přípojky + + + + Midi clock input detected + Zjištěn vstup hodin MIDI + + + + + Midi tick input detected + Zjištěn vstup tiku MIDI + + + + Midi real time input detected + Zjištěn vstup MIDI ve skutečném čase (RT) + + + + MMC input detected + Zjištěn vstup MMC + + + + MTC input detected + Zjištěn vstup MTC + + + + Detected SMPTE format + Zjištěn formát SMPTE + + + + Receive id number. 127 = Global. Double click to edit. + Přijmout číslo ID. 127 = Celkové. Dvojité klepnutí pro úpravy. + + + + Accept midi clock input + Přijmout vstup hodin MIDI + + + + Accept midi real time input + Přijmout vstup MIDI ve skutečném čase (RT) + + + + Accept MMC input + Přijmout vstup MMC + + + + Accept MTC input + Přijmout vstup MTC + + + + Receive start rewinds before playing + Přijmout začátek přetočí před přehráváním + + + + Transmit id number. 127 = Global. Double click to edit. + Odeslat číslo ID. 127 = Celkové. Dvojité klepnutí pro úpravy. + + + + Send midi clock output + Poslat výstup hodin MIDI + + + + Send midi realtime output + Poslat výstup MIDI ve skutečném čase (RT) + + + + + Send MMC output + Poslat výstup MMC + + + + + Send MTC output + Poslat výstup MTC + + + + Midi clock input detected. +Current port actually used is red. +Click to force a port to be used. + Zjištěn vstup hodin MIDI. +Nynější skutečně používaná přípojka je červená. +Klepněte pro vynucení přípojky, která se má používat. + + + + Midi realtime input detected, including + start/stop/continue, and song position. + Zjištěn vstup MIDI ve skutečném čase (RT), včetně +spustit/zastavit/pokračovat a polohy písně. + + + + MMC input detected, including stop/play/deferred play, and locate. + Zjištěn vstup MMC, včetně +zastavit/přehrát/odložené přehrávání a určit polohu. + + + + MTC input detected, including forward quarter-frame sync and full-frame locate. +Current port actually used is red. Click to force a port to be current. + + + + + Detected SMPTE format: 24fps, 25fps, 30fps drop frame, or 30fps non-drop +Detects format of MTC quarter and full frame, and MMC locate. + + + + + Receive id number. 127 = global receive all, even if not global. + + + + + Accept midi clock input. Only one input is used for clock. +Auto-acquire: If two or more port realtime inputs are enabled, + the first clock detected is used, until clock is lost, + then another can take over. Best if each turns off its clock + at stop, so MusE can re-acquire the clock from another port. +Click on detect indicator to force another. + + + + + Accept midi realtime input, including + start/stop/continue, and song position. +Non-clock events (start,stop etc) are + accepted by ALL enabled ports. +This means you may have several master + devices connected, and muse will accept + input from them. + + + + + Accept MMC input, including stop/play/deferred play, and locate. + + + + + Accept MTC input, including forward quarter-frame sync and full-frame locate. +See 'rc' column for more help. + + + + + When start is received, rewind before playing. +Note: It may be impossible to rewind fast + enough to synchronize with the external device. + + + + + Transmit id number. 127 = global transmit to all. + + + + + Send midi clock output. If 'Slave to External Sync' is chosen, + muse can re-transmit clock to any other chosen ports. + + + + + Send midi realtime output, including start/stop/continue, + and song position. If 'Slave to external sync' is chosen, + muse can re-transmit midi realtime input messages to any + other chosen ports. This means you may have several slave + devices connected, and muse can re-send realtime messages + to any or all of them. + + + + + Port + Přípojka + + + + Device Name + Název zařízení + + + + c + c + + + + k + + + + + r + n + + + + m + z + + + + t + + + + + type + + + + + rid + + + + + rc + + + + + rr + + + + + rm + + + + + rt + + + + + rw + + + + + tid + + + + + tc + + + + + tr + + + + + tm + + + + + tt + + + + + MusE + MusE + + + + Settings have changed +Apply sync settings? + Nastavení se změnila. +Použít nastavení pro seřízení? + + + + &Apply + &Použít + + + + &No + &Ne + + + + &Abort + &Zrušit + + + + <none> + <Žádný> + + + + MusEWidget::MidiTrackInfo + + + + <unknown> + <neznámý> + + + + MusEWidget::MixdownFileDialog + + + Wave Files (*.wav);;All Files (*) + Soubory WAV (*.wav);;Všechny soubory (*) + + + + MusEWidget::NoteInfo + + + Note Info + Informace o notě + + + + Start + Spustit + + + + Len + Délka + + + + Pitch + Výška tónu + + + + Velo On + Rychlost Zapnuto + + + + Velo Off + Rychlost Vypnuto + + + + MusEWidget::RoutePopupMenu + + + + + + + + + + Channel + Kanál + + + + + + Soloing chain + Řetězec sóla + + + + + Audio returns + Zvuk se vrací + + + + Warning: No midi input devices! + Varování: Žádná zařízení pro vstup MIDI + + + + Open midi config... + Otevřít nastavení MIDI... + + + + + <none> + <Žádný> + + + + Toggle all + Přepnout vše + + + + More... + Více... + + + + Audio sends + Zvuk posílá + + + + Midi port sends + Přípojka MIDI posílá + + + + MusEWidget::ScrollScale + + + next page + Další strana + + + + previous page + Předchozí strana + + + + current page number + Číslo nynější strany + + + + MusEWidget::ShortcutCaptureDialog + + + Ok + OK + + + + Cancel + Zrušit + + + + Shortcut conflicts with + Klávesová zkratka je ve střetu s + + + + Undefined + Nestanovený + + + + MusEWidget::SigScale + + + signature scale + Stupnice metra + + + + MusEWidget::Toolbar1 + + + Solo + Sólo + + + + Cursor + Ukazovátko + + + + Snap + Magnet + + + + MusEWidget::TrackComment + + + MusE: Track Comment + MusE: Poznámka ke stopě + + + + Track Comment: + Poznámka ke stopě + + + + MusEWidget::VisibleTracks + + + Visible track types + Viditelné typy stop + + + + NoteInfo + + Start + Start + + + Len + Länge + + + Pitch + Tonhöhe + + + Velo On + Velo an + + + Velo Off + Velo aus + + + Note Info + Noteninformation + + + + OrganGuiBase + + + MusE: Organ + MusE: Varhany + + + + Drawbars + Táhla + + + + 16' + 16' + + + + 4' + 4' + + + + 2 2/3' + 2 2/3' + + + + 2' + 2' + + + + 5 1/3' + 5 1/3' + + + + 8' + 8' + + + + Envelope Hi + Obálka vysoká + + + + + Release + Uvolnění + + + + + Sustain + Držení tónu + + + + + Decay + Pokles + + + + + Attack + Náběh + + + + + + + + + ms + ms + + + + + cB + Cb + + + + Envelope Lo + Obálka nízká + + + + O-1 + Osc-1 + + + + Oscillator + Oscilátor + + + + Brass + Žesťové nástroje + + + + Reed + Plátkové nástroje + + + + Flute + Flétna + + + + Velocity + Rychlost + + + + PageSettings + + Track Name + Spur Name + + + + PartCanvas + + C&ut + &Ausschneiden + + + &Copy + &Kopieren + + + rename + Umbenennen + + + delete + Löschen + + + split + Schnitt + + + glue + Verbinder + + + pianoroll + Pianorollen Editor + + + list + Listen Editor + + + drums + Schlagzeug Editor + + + Cannot copy/move/clone to different Track-Type + Kopieren/verschieben/klonen auf anderen Spurtyp nicht möglich + + + color + Farbe + + + de-clone + Entklonen + + + wave edit + Wave Editor + + + Cannot paste: multiple tracks selected + Einfügen nicht möglich: mehrere Spuren ausgewählt + + + Cannot paste: no track selected + Einfügen nicht möglich: keine Spur ausgewählt + + + Cannot paste: wrong data type + Einfügen nicht möglich: falscher Datentyp + + + Can only paste to midi/drum track + Einfügen möglich nur in Midi/Drum Spur + + + Can only paste to wave track + Einfügen möglich nur in Wave Spur + + + + PasteDialog + + %n quarter(s) + + %n Viertelnote + %n Viertelnoten + + + + quarter + Viertelnote + + + quarters + Viertelnoten + + + + PasteDialogBase + + + MusE: Paste Parts + MusE: Vložit části + + + + Number and raster + Počet a rastr + + + + insert + Vložit + + + + times + krát + + + + raster + rastr + + + + ticks + tiky + + + + Move, Merge, Clone + Přesunout, sloučit, klonovat + + + + Move everything to the right + Přesunout vše napravo + + + + Move only affected parts to the right + Přesunout ovlivněné části napravo + + + + Put everything into a single track + Dát vše do jedné stopy + + + + Merge with existing parts + Sloučit se stávajícími částmi + + + + Insert as clones (where possible) + Vložit jako klony (tam, kde je to možné) + + + + OK + OK + + + + Cancel + Zrušit + + + + PasteEventsDialogBase + + + MusE: Paste Events + MusE: Vložit události + + + + Number and raster + Počet a rastr + + + + insert + Vložit + + + + times + krát + + + + raster + rastr + + + + + ticks + tiky + + + + Paste options + Volby pro vložení + + + + Always into existing parts + Vždy do stávajících částí + + + + Never into existing parts + Nikdy do stávajících částí + + + + Into existing parts if part has not +to be expanded by more than + Do stávajících částí, pokud část nemá být rozšířena o víc jak + + + + Put everything into the (selected) part + Dát vše do (vybrané) části + + + + OK + OK + + + + Cancel + Zrušit + + + + PatchBay + + MusE: ALSA MIDI Patch Bay + MusE: ALSA Midi Verbindungsübersicht + + + + PatchBayBase + + ALSA Patch Bay + ALSA Verbindungsübersicht + + + + PianoRoll + + + &Edit + &Upravit + + + Cut + Ausschneiden + + + Copy + Kopieren + + + Paste + Einfügen + + + Delete Events + Ereignisse löschen + + + Select All + Alle auswählen + + + Select None + Nichts auswählen + + + Invert + Auswahl umkehren + + + Inside Loop + Auswahl innerhalb Schleife + + + Outside Loop + Auswahl außerhalb Schleife + + + + &Select + &Vybrat + + + blue + Farbe blau + + + pitch colors + Farbe nach Tonhöhe + + + velocity colors + Farbe nach Anschlagsstärke + + + &Config + &Einstellen + + + event color + Ereignisfarbe + + + &Functions + &Funktionen + + + Over Quantize + Überquantisieren + + + Note On Quantize + Wert "Note an" quantisieren + + + Note On/Off Quantize + Wert "Note an/aus" quantisieren + + + Iterative Quantize + Iteratives quantisieren + + + Pianoroll Tools + Werkzeug "Pianorollen Editor" + + + + Step Record + Nahrávat po taktu + + + + Midi Input + Vstup MIDI + + + + Play Events + Přehrát události + + + + Add Controller View + Přidat pohled ovladače + + + Config Quant... + Quantisierung einstellen ... + + + Modify Gate Time + Gate Zeit ändern + + + + Modify Velocity + Změnit rychlost: + + + Crescendo + Crescendo + + + + Transpose + Převést + + + Thin Out + Ausdünnen + + + Erase Event + Ereignis löschen + + + Note Shift + Note verschieben + + + Move Clock + Zeitposition verschieben + + + Copy Measure + Taktmaß kopieren + + + Erase Measure + Taktmaß löschen + + + Delete Measure + Taktmaß löschen + + + Create Measure + Taktmaß erzeugen + + + + ctrl + Ctrl + + + + C&ut + Vyj&mout + + + + &Copy + &Kopírovat + + + + Copy events in range + Kopírovat události v rozsahu + + + + &Paste + &Vložit + + + + &Paste (with dialog) + Vložit (s dialogem) + + + + Delete &Events + Smazat &události + + + + Select &All + Vybrat &vše + + + + &Deselect All + &Zrušit výběr všeho + + + + Invert &Selection + Obrátit &výběr + + + + &Inside Loop + &Uvnitř smyčky + + + + &Outside Loop + &Vně smyčky + + + + &Previous Part + &Předchozí část + + + + &Next Part + &Další část + + + + Fu&nctions + &Funkce + + + + Window &Config + &Nastavení okna + + + + &Event Color + Barva &události + + + + &Blue + &Modrá + + + + &Pitch colors + Barvy pro &výšku tónu + + + + &Velocity colors + Barvy pro &rychlost + + + + Quantize + Kvantizovat + + + + Modify Note Length + Změnit délku noty + + + + Crescendo/Decrescendo + Crescendo/Decrescendo + + + + Erase Events + Smazat událost + + + + Move Notes + Přesunout noty + + + + Set Fixed Length + Nastavit pevnou délku + + + + Delete Overlaps + Smazat překrytí + + + + Legato + Legato + + + + &Plugins + &Přídavné moduly + + + + Pianoroll tools + Nástroje pro váleček + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + PluginDialog + + + Ok + OK + + + + Cancel + Zrušit + + + + MusE: select plugin + MusE: Vybrat přídavný modul + + + + Lib + Lib + + + + Label + Štítek + + + + Name + Název + + + + AI + Al + + + + AO + AO + + + + CI + Cl + + + + CO + CO + + + + IP + IP + + + + id + ID + + + + Maker + Výrobce + + + + Copyright + Autorské právo + + + Select which types of plugins should be visible in the list,<br>beware that 'all' includes plugins that probably are not usable by MusE. + Typen in Liste dargestellter PlugIns auswählen, "all" beinhaltet auch in MusE womöglich nicht nutzbare PlugIns. + + + Stereo and Mono + Stereo und Mono + + + + Stereo + Stereo + + + + Mono + Mono + + + All + alle + + + + Mono and Stereo + Mono a stereo + + + + Show All + Ukázat vše + + + + Select which types of plugins should be visible in the list.<br>Note that using mono plugins on stereo tracks is not a problem, two will be used in parallell.<br>Also beware that the 'all' alternative includes plugins that probably not are usable by MusE. + Vyberte, které typy přídavných modulů by měly být viditelné v seznamu.<br>Uvědomte si, že používání monofonních přídavných modulů na stereo není problém, dva se použijí souběžně.<br>Dejte si ale pozor na to, že alternativa 'vše' zahrnuje přídavné moduly, které se pravděpodobně s MusE použít nedají. + + + + Search in 'Label' and 'Name': + Hledat ve 'Štítek' a 'Název': + + + + PluginGui + + + + bypass plugin + Odklonit přídavný modul pro tok signálu + + + + MusE: load preset + MusE: Nahrát přednastavení + + + + MusE: save preset + MusE: Uložit přednastavení + + + + File Buttons + Tlačítka pro soubor + + + + Load Preset + Nahrát přednastavení + + + + Save Preset + Uložit přednastavení + + + + Error reading preset. Might not be right type for this plugin + Chyba při čtení přednastavení. Nemusí to být správný typ pro tento přídavný modul + + + + ProjectCreate + + + Create Project + Vytvořit projekt + + + + Project Name: + Název projektu: + + + + Project Path to song file: + Cesta projektu k souboru s písní: + + + + Create project folder (recommended for audio projects) + Vytvořit složku s projektem (doporučeno pro projekty se zvukem) + + + + Browse + Procházet + + + + Song information: + Informace o písni: + + + + QHeader + + Port Number + Anschlussnummer + + + enable gui for device + GUI für Gerät einschalten + + + Instrument connected to port + Instrument mit Anschluss verbunden + + + State: result of opening the device + Status: Ergebnis des Geräteanschlusses + + + mute instrument + Instrument still schalten + + + sound name + Klangname + + + quantisation +currently not used + Quantisierung +gegenwärtig nicht benutzt + + + this input note triggers the sound + Diese Eingangsnote löst den Klang aus + + + note length + Notenlänge + + + this note is send for the sound + Diese Note wird für den Klang verwendet + + + output channel +currently not used + Ausgangskanal +gegenwärtig nicht benutzt + + + output port +currently not used + Ausgangsanschluss +gegenwärtig nicht benutzt + + + velocity level 1 + Velocity Pegel 1 + + + velocity level 2 + Velocity Pegel 2 + + + velocity level 3 + Velocity Pegel 3 + + + velocity level 4 + Velocity Pegel 4 + + + quantisation + Quantisierung + + + output channel + Ausgangskanal + + + output port + Ausgangsanschluss + + + Enable Recording + Aufnahme einschalten + + + Mute Indicator + Anzeige "Stille" + + + Solo Indicator + Anzeige "Solo" + + + Track Type + Spurtyp + + + Track Name + Spurname + + + Output Channel Number + Ausgangskanalnummer + + + Output Port + Ausgangsanschluss + + + Time Lock + Sperre "Zeit" + + + Solo/Pre Fader Listening + Solo/Vor Regler Abhöre + + + Name of the midi device associated with this port number + Name des Midi Gerätes an dieser Anschlussnummer + + + enables reading from device + Auslesen vom Gerät ermöglichen + + + enables writing to device + Schreiben zum Gerät ermöglichen + + + + QObject + + + Other + Jiné + + + + + Error + Chyba + + + + + Please first select the range for crescendo with the loop markers. + Nejprve, prosím, zvolte rozsah crescenda se značkami pro smyčku. + + + + QWidget + + + + Cannot convert sysex string + Nelze převést řetězec sysex + + + + + Hex String too long (2048 bytes limit) + Šestnáctkový řetězec je příliš dlouhý (hranice je 2048 bytů) + + + + new + nový + + + + create peakfile for + Vytvořit soubor s vrcholem hladiny pro + + + + MusE: get file name + MusE: Předat název souboru + + + the directory + + Das Verzeichnis + + + +does not exist +create? + Es besteht nicht +Erzeugen? + + + &Create + &Erzeugen + + + Cancel + Abbrechen + + + + MusE: create directory + MusE: Vytvořit adresář + + + + creating dir failed + Vytvoření adresáře se nezdařilo + + + + File + + Soubor + + + +exists + besteht + + + + MusE: write + MusE: Zapsat + + + Overwrite + Überschreiben + + + Quit + Beenden + + + + Open File + + Otevřít soubor + + + + + +failed: + +selhalo: + + + + MusE: Open File + MusE: Otevřít soubor + + + + + None + Žádný + + + + generic midi + Obecné MIDI + + + + No selection. Ignoring + Žádný výběr. Přehlíží se + + + + The directory + + Adresář + + + + + +does not exist. +Create it? + +neexistuje. +Vytvořit jej? + + + + +exists. Overwrite? + +existuje. Přepsat? + + + + QuantBase + + + MusE: Quantize + MusE: Kvantizovat + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Values + Hodnoty + + + + Strength: + Síla: + + + + % + % + + + + Threshold (ticks): + Práh (tiky): + + + + Quantize Len + Délka kvantizace + + + + Raster + Rastr + + + + Whole + Celá + + + + Half + Půlová + + + + Quarter + Čtvrťová + + + + 8th + 1/8 + + + + 16th + 1/16 + + + + 32th + 1/32 + + + + Swing: + Výkyv: + + + + If the proposed change in tick or length is smaller than threshold, nothing is done. +If swing=0, this is normal +If swing is 33, you get a 2:1-rhythm. +If swing is -33, you get a 1:2-rhythm. + + + + + + OK + OK + + + + Cancel + Zrušit + + + + QuantConfig + + Config Quantize + Quantisierung einstellen + + + Strength + Stärke + + + Don´t Quantize + Nicht quantisieren + + + Quant Len + Länge quantisieren + + + MusE: Config Quantize + MusE: Quantisierung einstellen + + + + RemoveBase + + + MusE: Erase Notes + MusE: Vymazat noty + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Thresholds + Prahy + + + + ticks + tiky + + + + Velocity + Rychlost + + + + Length + Délka + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If nothing is checked, everything is removed.</p> +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If velocity is checked, only notes with velo &lt; threshold are removed.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If both are checked, notes with velo &lt; threshold OR with length &lt; threshold are removed.</p></body></html> + + + + + OK + OK + + + + Cancel + Zrušit + + + + RhythmBase + + MusE: Random Rhythm Generator + MusE: Rhythmus Zufallsgenerator + + + Instrument Properties + Instrumenteigenschaften + + + counts/bar + Schläge/Takt + + + steps/count + Schritte/Schlag + + + # bars + # Takte + + + test + testen + + + contrib + beitragen + + + randomize + zufällig anordnen + + + Group 1 + Gruppe 1 + + + Group 2 + Gruppe 2 + + + Group 3 + Gruppe 3 + + + Group 4 + Gruppe 4 + + + Group 5 + Gruppe 5 + + + listen + vorhören + + + Instrument + Instrument + + + Group + Gruppe + + + &New + &Neu + + + create new entry + Neuen Eintrag erzeugen + + + pressing the New button you create a new entry +in the MusE list of defined controllers + Schaltfläche "Neu" klicken um einen neuen Eintrag +in der MusE Liste definierter Kontroller zu erzeugen + + + &Delete + &Löschen + + + delete selected entry + Ausgewählten Eintrag löschen + + + Up + Nach oben + + + Down + Nach unten + + + Instrument + Instrument + + + steps/count + Schritte/Schlag + + + list of defined controllers + Liste definierter Kontroller + + + This is the MusE list of defined controllers. + Dies ist die MusE Liste definierter Kontroller. + + + &File + &Datei + + + &Edit + &Bearbeiten + + + &Help + &Hilfe + + + Tools + Werkzeuge + + + New + Neu + + + Open + Öffnen + + + &Open... + &Öffnen ... + + + Save + Sichern + + + &Save + &Sichern + + + Save As + Sichern als + + + Save &As... + S&ichern als ... + + + Print + Drucken + + + &Print... + &Drucken ... + + + Exit + Beenden + + + E&xit + Bee&nden + + + Undo + Rckgängig + + + &Undo + &Rückgängig + + + Redo + Wiederherstellen + + + &Redo + &Wiederherstellen + + + Cut + Ausschneiden + + + &Cut + A&usschneiden + + + Copy + Kopieren + + + C&opy + Ko&pieren + + + Paste + Einfügen + + + &Paste + Ein&fügen + + + Find + Suchen + + + &Find... + &Suchen ... + + + Contents + Inhalte + + + &Contents... + &Inhalte ... + + + Index + Verzeichnis + + + &Index... + &Verzeichnis ... + + + About + Über + + + &About... + &Über ... + + + <b>Notice!</b><br> +Random Rhythm Generator is not enabled yet! + Merke! +Rhythmus Zufallsgenerator noch nicht eingeführt! + + + Ctrl+N + Strg+N + + + Ctrl+O + Strg+O + + + Ctrl+S + Strg+S + + + Ctrl+P + Strg+P + + + Ctrl+Z + Strg+Z + + + Ctrl+Y + Strg+Y + + + Ctrl+X + Strg+X + + + Ctrl+C + Strg+C + + + Ctrl+V + Strg+V + + + Ctrl+F + Strg+F + + + + RhythmGenerator + + Form3 + Form3 + + + Instrument Settings: + Instrument Einstellungen + + + Instrument + Instrument + + + add + Zufgen + + + delete + Entfernen + + + steps/count + Schritte/Schlag + + + # bars + # Takte + + + Group + Gruppe + + + Group 1 + Gruppe 1 + + + Group 2 + Gruppe 2 + + + Group 3 + Gruppe 3 + + + Group 4 + Gruppe 4 + + + Group 5 + Gruppe 5 + + + contrib + beitragen + + + listen + vorhören + + + Save + Sichern + + + + Project-Id-Version: amarok +Report-Msgid-Bugs-To: http://bugs.kde.org +POT-Creation-Date: 2010-05-20 04:55+0200 +PO-Revision-Date: 2010-05-22 09:34+0200 +Last-Translator: Pavel Fric +Language-Team: Czech <kde-i18n-doc@kde.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +X-Generator: Lokalize 1.0 +Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; + + + + + RouteDialogBase + + + MusE: Routing + MusE: Tok signálu + + + + Add Route + Přidat tok signálu + + + + Source: + Zdroj: + + + + Destination: + Cíl: + + + + Connect + Spojit + + + + connect source to destination + Spojit zdroj s cílem + + + + Current Routes + Nynější toky signálu + + + + Source + Zdroj + + + + Destination + Cíl + + + + Remove + Odstranit + + + + remove selected route + Odstranit vybraný tok signálu + + + + RoutePopupMenu + + Channel + Kanal + + + <none> + <kein> + + + + SS_PluginChooserBase + + + SimpleDrums - Ladspa Plugin Chooser + Jednoduché bubny - volič přídavného modulu LADSPA + + + + Name + Název + + + + Label + Štítek + + + + Inports + Vstupní přípojky + + + + Outports + Výstupní přípojky + + + + Creator + Tvůrce + + + + &Cancel + Z&rušit + + + + Alt+C + Alt+C + + + + &OK + &OK + + + + Alt+O + Alt+O + + + + SS_PluginFront + + + Clear and unload effect + Smazat a vyložit efekt + + + + Load effect + Nahrát efekt + + + + Toggle display of effect parameters + Přepnout zobrazení parametrů efektů + + + + Turn effect on/off + Zapnout/Vypnout efekt + + + + ScoreCanvas + + + Treble + Houslový klíč + + + + Bass + Basový klíč + + + + Grand Staff + Oba klíče + + + + Remove staff + Odstranit osnovu + + + + Ambiguous part + Dvojznačná část + + + + There are two or more possible parts you could add the note to, but none matches the selected part. Please select the destination part by clicking on any note belonging to it and try again, or add a new stave containing only the destination part. + + + + + No part + Žádná část + + + + There are no parts you could add the note to. + Nejsou tu žádné části, do kterých byste mohl přidat notu. + + + + ScoreEdit + + + Undo/Redo tools + Nástroje pro Zpět/Znovu + + + + Step recording tools + Nástroje pro nahrávání po taktu + + + + Step Record + Nahrávat po taktu + + + + panic + Nouzové zastavení + + + + transport + Přesun + + + + Note settings + Nastavení noty + + + + Note length: + Délka noty: + + + + last + poslední + + + + Velocity: + Rychlost: + + + + Off-Velocity: + Rychlost - vypnuto: + + + + Quantisation settings + Nastavení kvantizace + + + + Quantisation: + Kvantizace: + + + + Pixels per whole: + Pixelů na celou: + + + + &Edit + &Upravit + + + + C&ut + Vyj&mout + + + + &Copy + &Kopírovat + + + + Copy events in range + Kopírovat události v rozsahu + + + + &Paste + &Vložit + + + + Paste (with dialog) + Vložit (s dialogem) + + + + Delete &Events + Smazat &události + + + + &Select + &Vybrat + + + + Select &All + Vybrat &vše + + + + &Deselect All + &Zrušit výběr všeho + + + + Invert &Selection + Obrátit &výběr + + + + &Inside Loop + &Uvnitř smyčky + + + + &Outside Loop + &Vně smyčky + + + + Fu&nctions + &Funkce + + + + &Quantize + &Kvantizovat + + + + Change note &length + Změnit &délku noty + + + + Change note &velocity + Změnit &rychlost noty + + + + Crescendo/Decrescendo + Crescendo/Decrescendo + + + + Transpose + Převést + + + + Erase Events + Smazat událost + + + + Move Notes + Přesunout noty + + + + Set Fixed Length + Nastavit pevnou délku + + + + Delete Overlaps + Smazat překrytí + + + + Legato + Legato + + + + Window &Config + &Nastavení okna + + + + Note head &colors + &Barvy pro hlavičky not + + + + &Black + Če&rná + + + + &Velocity + &Rychlost + + + + &Part + Čá&st + + + + Set up &preamble + Nastavit úv&od + + + + Display &key signature + Zobrazit &předznamenání + + + + Display &time signature + Zobrazit &taktové označení + + + + Set Score &name + Nastavit &název notového zápisu + + + + + Enter the new score title + Zadat nový název notového zápisu + + + + Error + Chyba + + + + Changing score title failed: +the selected title is not unique + Změna názvu notového zápisu se nezdařila: +zvolený název není jedinečný + + + + ScrollScale + + next page + Nächste Seite + + + previous page + Vorherige Seite + + + current page number + Aktuelle Seitennummer + + + + SetlenBase + + + MusE: Set Note Length + MusE: Nastavit délku noty + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Value + Hodnota + + + + New length + Nová délka + + + + ticks + tiky + + + + OK + OK + + + + Cancel + Zrušit + + + + ShortcutCaptureDialog + + Ok + Bestätigen + + + Cancel + Abbrechen + + + Undefined + unbestimmt + + + + ShortcutCaptureDialogBase + + + Enter shortcut sequence + Zadat klávesovou zkratku + + + + Press keys to enter shortcut sequence! + Tisknout klávesy pro zadání posloupnosti klávesové zkratky! + + + + Old shortcut: + Stará klávesová zkratka: + + + + + Undefined + Nestanovený + + + + New shortcut: + Nová klávesová zkratka: + + + + OK + OK + + + + Cancel + Zrušit + + + + ShortcutConfigBase + + + Configure Keyboard Shortcuts + Nastavit klávesové zkratky + + + + Shortcut Category + Skupina klávesové zkratky + + + + Description + Popis + + + + Shortcut + Klávesová zkratka + + + + &Clear + &Smazat + + + + Alt+C + Alt+C + + + + &Define + &Vymezit + + + + Alt+D + Alt+D + + + + &Apply + &Použít + + + + Alt+A + Alt+A + + + + SigScale + + signature scale + Skala Taktmaß + + + + SimpleDrumsGuiBase + + + DrumSynth 0.1 + SyntetizátorBicích 0.1 + + + + SimpleSynthGui + + + &Load setup + &Nahrát nastavení + + + + &Save setup + &Uložit nastavení + + + + Load sample dialog + Nahrát dialog ukázky + + + + Song + + + Jack shutdown! + Vypnutí JACK! + + + + Jack has detected a performance problem which has lead to +MusE being disconnected. +This could happen due to a number of reasons: +- a performance issue with your particular setup. +- a bug in MusE (or possibly in another connected software). +- a random hiccup which might never occur again. +- jack was voluntary stopped by you or someone else +- jack crashed +If there is a persisting problem you are much welcome to discuss it +on the MusE mailinglist. +(there is information about joining the mailinglist on the MusE + homepage which is available through the help menu) + +To proceed check the status of Jack and try to restart it and then . +click on the Restart button. + + + + + previous event + Předchozí událost + + + + next event + Další událost + + + + + set event + Nastavit událost + + + + + add event + Přidat událost + + + + + erase event + Vymazat událost + + + + erase range + Vymazat rozsah + + + + clear automation + Smazat automatizaci + + + + Clear all controller events? + Smazat všechny události ovladače? + + + + &Ok + &OK + + + + &Cancel + Z&rušit + + + + MusE - external script failed + MusE: Vnější skript selhal + + + + MusE was unable to launch the script, error message: + + MusE se skript nepodařilo spustit. Chybová zpráva: + + + + + Automation: + Automatizace: + + + + SongInfo + + + Song Information + Informace o písni + + + + Show on song load + Ukázat zátěž na píseň + + + + &Cancel + Z&rušit + + + + Alt+C + Alt+C + + + + &Ok + &OK + + + + Alt+O + Alt+O + + + + SynthConfigBase + + + MusE: Synth Configuration + MusE: Nastavení syntetizátoru + + + + Soft Synthesizer + Softwarový syntetizátor + + + + File + Soubor + + + + Instances + Instance + + + + + Name + Název + + + + list of available software synthesizers + Seznam dostupných sSoftwarových syntetizátorů + + + + Add Instance + Přidat instanci + + + + Remove Instance + Odstranit instanci + + + + Midi Port + Přípojka MIDI + + + + Midi connections + Spojení MIDI + + + + Inst + Inst + + + + Version + Verze + + + + Description + Popis + + + + TList + + Midi + Midi + + + Drum + Drum + + + Delete Track + Spur löschen + + + Track Comment + Spur Kommentar + + + Show Gui + Zeige GUI + + + Add Midi Track + Midi Spur hinzufügen + + + Add Drum Track + Drum Spur hinzufügen + + + Add Wave Track + Wave Spur hinzufügen + + + MusE: bad trackname + MusE: ungeeigneter Spurname + + + please choose a unique track name + Bitte eindeutigen Spurnamen wählen + + + show gui + GUI anzeigen + + + Add Output + Ausgang hinzufügen + + + Add Group + Gruppe hinzufügen + + + Add Input + Eingang hinzufügen + + + Add Aux Send + Aux Send hinzufügen + + + Update drummap? + Drumbelegung aktualisieren? + + + Do you want to use same port for all instruments in the drummap? + Möchten Sie für alle Instrumente der Drumbelegung den selben Anschluss verwenden? + + + &Yes + &Ja + + + &No + &Nein + + + Do you want to use same port and channel for all instruments in the drummap? + Möchten Sie für alle Instrumente der Drumbelegung den selben Anschluss und Kanal verwenden? + + + <none> + <kein> + + + + TempoSig + + + Tempo/Sig + Tempo/Druh taktu + + + + TimeCanvas + + Add Controller View + Kontrolleransicht hinzufügen + + + + Toolbar1 + + Solo + Solo + + + Snap + Magnet + + + Quantize + Quantisieren + + + To + Zu + + + All Events + Alle Ereignisse + + + Looped Ev. + Ereignisse innerhalb Schleife. + + + Selected Ev. + Ausgewählte Ereignisse. + + + Looped+Sel. + Innerhalb Schleife + augewählt. + + + Cursor + Positionsmarker + + + + TopWin + + + As subwindow + Jako podokno + + + + Shares tools and menu + Sdílí nástroje a nabídku + + + + Fullscreen + Celá obrazovka + + + + Piano roll + Váleček + + + + List editor + Editor seznamu + + + + Drum editor + Editor bicích + + + + Master track editor + Editor hlavní stopy + + + + Master track list editor + Editor seznamu hlavní stopy + + + + Wave editor + Editor WAV + + + + Clip list + Seznam ukázek + + + + Marker view + Pohled se značkami + + + + Score editor + Editor notového zápisu + + + + Arranger + Aranžér + + + + <unknown toplevel type> + <Neznámý typ nejvyšší úrovně> + + + + TrackComment + + MusE: Track Comment + MusE: Spur Kommentar + + + Track Comment: + Spur Kommentar: + + + + Transport + + + + Punch In + Začít přepis oblasti + + + + + Loop + Smyčka + + + + + Punch Out + Ukončit přepis oblasti + + + + Left Mark + Levá značka + + + + Right Mark + Pravá značka + + + + Overdub + Přepsat + + + + + Replace + Nahradit + + + + Rec Mode + Režim nahrávání + + + + Normal + Normální + + + + Mix + Směs + + + + Cycle Rec + Nahrávat ve smyčce + + + + punchin + Začít nahrávání na levé značce + + + + loop + Smyčka + + + + punchout + Ukončit nahrávání na pravé značce + + + + rewind to start + Přetočit zpět na začátek + + + + rewind + Přetočit o jeden takt zpět + + + + forward + Přetočit o jeden takt vpřed + + + + stop + Zastavit + + + + play + Přehrát + + + + record + Nahrávat + + + + AC + AC + + + + quantize during record + Kvantizovat během nahrávání + + + + Click + Klepnout + + + + metronom click on/off + Ťukání metronomu zapnuto/vypnuto + + + + Sync + Seřízení + + + + external sync on/off + Vnější seřízení zapnuto/vypnuto + + + + Master + Hlavní + + + + use master track + Použít hlavní stopu + + + + Jack + JACK + + + + Jack transport sync on/off + Seřízení přesunu JACK zapnuto/vypnuto + + + + TransposeBase + + + MusE: Transpose + MusE: Převést + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + Value + Hodnota + + + + Halftone-steps + Kroky po půltónech + + + + OK + OK + + + + Cancel + Zrušit + + + + TransposeDialogBase + + MusE: Midi Transpose + MusE: Midi transponieren + + + Value + Wert + + + halftones + Halbtonschritte + + + Time + Zeit + + + all + alle + + + between markers + Zwischen Markern + + + Parts + Parts + + + all in selected tracks + Alles in ausgewählter Spur + + + OK + Bestätigen + + + Cancel + Abbrechen + + + + UnusedWaveFiles + + + Dialog + Dialog + + + + List of unused audio files in current project directory: + Seznam nepoužívaných zvukových souborů v adresáři s nynějším projektem: + + + + Current project + Nynější projekt + + + + All .med files +in current + directory + Všechny soubory +v adresáři s nynějším +projektem + + + + Move files to 'unused' subdir + Přesunout soubory do adresáře 'nepoužívané' + + + + Cancel + Zrušit + + + + VAMGui + + + MusE: Load VAM Presets + MusE: Nahrát přednastavení VAM + + + + + MusE: Save VAM Presets + MusE: Uložit přednastavení VAM + + + + VAMGuiBase + + + Virtual Analogue for MusE + Virtuální analog pro MusE + + + + LFO + NKO + + + + Freq + Kmit + + + + + + Waveform + Tvar vlny + + + + + + Sine + Sinus + + + + + + Pulse + Pulz + + + + + + Saw + Pila + + + + + + Triangle + Trojúhelník + + + + Filter + Filtr + + + + EnvMod + RežObál + + + + + + Attack + Náběh + + + + + + Decay + Pokles + + + + + + Sustain + Držení tónu + + + + + + Release + Uvolnění + + + + Cutoff + Přerušení + + + + Resonance + Zvučnost + + + + Invert + Obrácení + + + + KeyTrack + TónStopa + + + + Presets + Přednastavení + + + + Set + Nastavit + + + + load preset list + Nahrát seznam přednastavení + + + + save preset list + Uložit seznam přednastavení + + + + save preset list to a new file + Uložit seznam přednastavení do nového souboru + + + + delete preset + Smazat přednastavení + + + + DCO 1 + + + + + + Pitch + Výška tónu + + + + + Detune + Rozladit + + + + + PWM + + + + + + FM + + + + + + PW + + + + + DCO 2 + + + + + On + Na + + + + VAM 1.0beta3 +Virtual Analog for MusE +Released under GPL. +Copyright(C) 2002 +Jotsif Lindman Hörnlund +( jotsif@linux.nu ) +Copyright(C) 2005 +Robert Jonsson +(rj@spamatica.se) + + + + + VelocityBase + + + MusE: Modify Velocity + MusE: Změnit rychlost + + + + Range + Rozsah + + + + All Events + Všechny události + + + + Selected Events + Vybrané události + + + + Looped Events + Události uvnitř smyčky + + + Selected & Looped + Ausgewählt & innerhalb Schleife + + + + Values + Hodnoty + + + + Rate: + Rychlost: + + + + Offset: + Posun: + + + + % + % + + + + Selected Looped + Vybrané události uvnitř smyčky + + + + veloNew = (veloOld * rate) + offset + rychloNová = (rychloStará * rychlost) + posun + + + + OK + OK + + + + Cancel + Zrušit + + + + WTScale + + bar scale + Taktskala + + + + WaveEdit + + Normalize + Normalisieren + + + weTools + Werkzeug "we" + + + + Solo + Sólo + + + + Cursor + Ukazovátko + + + &File + &Datei + + + Functions + Funktionen + + + + &Edit + &Upravit + + + + Func&tions + &Funkce + + + + &Gain + &Zesílení + + + + 200% + 200% + + + + 150% + 150% + + + + 75% + 75% + + + + 50% + 50% + + + + 25% + 25% + + + + Other + Jiné + + + + &Copy + &Kopírovat + + + + C&ut + Vyj&mout + + + + &Paste + &Vložit + + + + Edit in E&xternal Editor + Upravit ve &vnějším editoru + + + + Mute Selection + Ztlumit výběr + + + + Normalize Selection + Normalizovat výběr + + + + Fade In Selection + Postupné zesílení signálu ve výběru + + + + Fade Out Selection + Postupné zeslabení signálu ve výběru + + + + Reverse Selection + Obrátit výběr + + + + Select + Vybrat + + + + Select &All + Vybrat &vše + + + + &Deselect All + &Zrušit výběr všeho + + + + Window &Config + &Nastavení okna + + + + Wave edit tools + Nástroje pro úpravy WAV + + + + transport + Přesun + + + + WaveEdit tools + Nástroje pro úpravy WAV + + + + WaveTrackInfoBase + + MusE: TrackInfo + MusE: Spurinfo + + + Track Info + Spurinfo + + + Track Name + Spurname + + + Output Route: + Ausgangssignalfluss: + + + Input Route: + Eingangssignalfluss: + + + Ports: + Anschlüsse: + + + Mono + Mono + + + Stereo + Stereo + + + + WaveView + + + MusE - external editor failed + MusE - Vnější editor selhal + + + + MusE was unable to launch the external editor +check if the editor setting in: +Global Settings->Audio:External Waveditor +is set to a valid editor. + + + + + MusE - file size changed + MusE: Velikost souboru se změnila + + + + When editing in external editor - you should not change the filesize +since it must fit the selected region. + +Missing data is muted + + + + + freeverb + + + FreeVerb + + + + + Room Size + Velikost prostoru + + + + Damping + Vyklopení + + + + Wet Level + + + + + Tap-Reverberator + + + + + Decay [ms] + Pokles [ms] + + + + + dB + dB + + + + Dry Level [dB] + + + + + Wet Level [dB] + + + + + Preset: + Přednastavení: + + + + AfterBurn + + + + + AfterBurn (Long) + + + + + Ambience + + + + + Ambience (Thick) + + + + + Ambience (Thick) - HD + + + + + Cathedral + Katedrála + + + + Cathedral - HD + Katedrála - HD + + + + Drum Chamber + + + + + Garage + Garáž + + + + Garage (Bright) + Garáž (jasná) + + + + Gymnasium + Gymnázium + + + + Gymnasium (Bright) + Gymnázium (jasné) + + + + Gymnasium (Bright) - HD + Gymnázium (jasné) - HD + + + + Hall (Small) + Hala (malá) + + + + Hall (Medium) + Hala (střední) + + + + Hall (Large) + Hala (velká) + + + + Hall (Large) - HD + Hala (převeliká) + + + + Plate (Small) + + + + + Plate (Medium) + + + + + Plate (Large) + + + + + Plate (Large) - HD + + + + + Pulse Chamber + + + + + Pulse Chamber (Reverse) + + + + + Resonator (96 ms) + Rezonátor (96 ms) + + + + Resonator (152 ms) + Rezonátor (152 ms) + + + + Resonator (208 ms) + Rezonátor (208 ms) + + + + Room (Small) + Pokoj (malý) + + + + Room (Medium) + Pokoj (střední) + + + + Room (Large) + Pokoj (velký) + + + + Room (Large) - HD + Pokoj (převeliký) - HD + + + + Slap Chamber + + + + + Slap Chamber - HD + + + + + Slap Chamber (Bright) + + + + + Slap Chamber (Bright) HD + + + + + Smooth Hall (Small) + + + + + Smooth Hall (Medium) + + + + + Smooth Hall (Large) + + + + + Smooth Hall (Large) - HD + + + + + Vocal Plate + + + + + Vocal Plate - HD + + + + + Warble Chamber + + + + + Warehoouse + + + + + Warehouse - HD + + + + + Comb Filters + + + + + Allpass Filters + + + + + Bandpass Filters + + + + + Enhanced Stereo + + + + diff --git a/muse2/share/locale/muse_de.ts b/muse2/share/locale/muse_de.ts index 85049594..a7ec6963 100644 --- a/muse2/share/locale/muse_de.ts +++ b/muse2/share/locale/muse_de.ts @@ -219,7 +219,7 @@ click on part to mute/unmute Alle Dateien (*) - + Add Midi Track Midispur hinzufügen @@ -253,6 +253,11 @@ click on part to mute/unmute Add Aux Send Aux Send hinzufügen + + + Select project directory + Projektverzeichnis auswählen + eraser Radierer @@ -270,7 +275,7 @@ click on part to mute/unmute FST - + Add Synth Synthesizer hinzufügen @@ -3580,6 +3585,64 @@ Wellenform 8 = <i>wenn <b>t</b>&#060 pi dann sin(2*<b&g Panik + + DuplicateTracksBase + + + Duplicate tracks + Spuren duplizieren + + + + Number of copies + Anzahl der Kopien + + + + Copy all routes + Alle Routen kopieren + + + + Default routing + Standard-Routen + + + + No routes + Keine Routen + + + + Copy parts + Parts kopieren + + + + Copy standard controllers (vol, pan) + Standard-Controller (Vol,Pan) kopieren + + + + Copy effects rack plugins + Effekt-Rack-Plugins kopieren + + + + Copy plugin controllers + Plugin-Controller kopieren + + + + Ok + Bestätigen + + + + Cancel + Abbrechen + + EditCAfterDialog @@ -4946,6 +5009,20 @@ RPN/NRPN-Controllernummer gesetzt. Project Projekt + + + read Midi Port +Configuration + lese Midi-Port- +Konfiguration + + + + write window +states + schreibe +Fenster + Load: Laden: @@ -4957,21 +5034,19 @@ Cofiguration Konfiguration - only Songdata - Nur Lieddaten + Nur Lieddaten - + fdialogbuttons fdialogbuttons - Songdata + Configuration - Lieddaten + + Lieddaten + Konfiguration @@ -7460,7 +7535,7 @@ bis zum Senden des ersten Clocks. Spurinfo - + % % @@ -7470,17 +7545,16 @@ bis zum Senden des ersten Clocks. Spur Name - + output port Ausgangsanschluss - iR - iR + iR - + @@ -7623,7 +7697,7 @@ Zur Aufnahme können mehrere Kanäle gewählt werden: Bank Wahl MSB - + all midi events are sent to this output channel alle MIDI-Events werden zu diesem Ausgangskanal gesendet @@ -7638,17 +7712,16 @@ Zur Aufnahme können mehrere Kanäle gewählt werden: Eingangs-Signalfluss - + output routing Ausgangs-Signalfluss - oR - oR + oR - + input detect Eingangserkennung @@ -7662,7 +7735,7 @@ Zur Aufnahme können mehrere Kanäle gewählt werden: Ereignisse auf den ausgewählten Kanälen auf den gewählten MIDI-Ports. - + W W @@ -7677,7 +7750,7 @@ Zur Aufnahme können mehrere Kanäle gewählt werden: Schleife Eingangsevents durch zum Ausgang. - + Select instrument patch Instrumentenpatch auswählen @@ -9955,7 +10028,7 @@ Wahrscheinlich hat dir ausgewählte Spur den falschen Typ. MusECore::Song - + Jack shutdown! Jack heruntergefahren! @@ -10105,15 +10178,14 @@ Knopf. MusEGui - Select project directory - Projektverzeichnis auswählen + Projektverzeichnis auswählen MusEGui::Appearance - + Main application font, and default font for any controls not defined here. Hauptschriftart, und Standard für alles, was @@ -10209,7 +10281,12 @@ Zeilenumbruch aber nur bei Leerzeichen. Benutzerdefiniert - + + Keep Qt system style + Beim Qt-Systemstil belassen + + + MusE: load image MusE: Bild laden @@ -10566,6 +10643,11 @@ Rechtsklick, um die GUI zu zeigen. Delete Selected Tracks Ausgewählte Spuren löschen + + + Duplicate Selected Tracks + Ausgewählte Spuren duplizieren + Shrink selected parts @@ -10713,7 +10795,7 @@ Rechtsklick, um die GUI zu zeigen. &Bearbeiten - + &Structure &Struktur @@ -10778,7 +10860,7 @@ Rechtsklick, um die GUI zu zeigen. Fenster&konfiguration - + New Neu @@ -10787,7 +10869,7 @@ Rechtsklick, um die GUI zu zeigen. MusEGui::AudioMixerApp - + &Create &Erzeugen @@ -10845,7 +10927,7 @@ Rechtsklick, um die GUI zu zeigen. MusEGui::AudioStrip - + panorama Panorama @@ -10860,7 +10942,7 @@ Rechtsklick, um die GUI zu zeigen. Pan - + 1/2 channel 1/2 Kanäle @@ -10906,22 +10988,20 @@ Rechtsklick, um die GUI zu zeigen. Aus - iR - iR + iR - + input routing Eingangs-Signalfluss - oR - oR + oR - + output routing Ausgangs-Signalfluss @@ -11039,6 +11119,19 @@ Rechtsklick, um die GUI zu zeigen. Aus + + MusEGui::CtrlCanvas + + + Drawing hint: Hold Ctrl to affect only existing events + Hinweis: Halten Sie STRG, um nur existierende Events zu beeinflussen + + + + Use shift + pencil or line tool to draw new events + Benutzen Sie SHIFT+Stift- oder Linienwerkzeug, um neue Events zu zeichnen + + MusEGui::CtrlPanel @@ -12257,18 +12350,18 @@ Möchten Sie sie jetzt auf alle existierende MIDI-Spuren anwenden? - + in ein - - + + out aus - + Show first aliases Zeige erste Aliase @@ -12419,7 +12512,7 @@ Möchten Sie sie jetzt auf alle existierende MIDI-Spuren anwenden? Status: Ergebnis vom Öffnen des Gerätes - + Port Anschluss @@ -12680,14 +12773,14 @@ Möchten Sie sie jetzt auf alle existierende MIDI-Spuren anwenden? MusEGui::MidiStrip - + off aus - - + + double click on/off Doppelklick an/aus @@ -12752,22 +12845,20 @@ Möchten Sie sie jetzt auf alle existierende MIDI-Spuren anwenden? Solo Modus - iR - iR + iR - + input routing Eingangs-Signalfluss - oR - oR + oR - + output routing Ausgangs-Signalfluss @@ -13129,7 +13220,7 @@ Sync-Einstellungen anwenden? MusEGui::MidiTrackInfo - + <unknown> <unbekannt> @@ -13322,13 +13413,13 @@ Sync-Einstellungen anwenden? - - + + &Save &Speichern - + Click this button to save the song you are editing. You will be prompted for a file name. You can also select the Save command from the File menu. @@ -13652,7 +13743,7 @@ Alternativ das Lied mit dem Befehl "Sichern" im Menü "Datei" &Hilfe - + Cannot read template Vorlage nicht lesbar @@ -13667,19 +13758,19 @@ Alternativ das Lied mit dem Befehl "Sichern" im Menü "Datei" Fehler beim Datei lesen - + Unknown File Format: %1 Unbekanntes Dateiformat: %1 - - - + + + MusE: Song: %1 MusE: Lied: %1 - + MusE: load project Muse: Projekt laden @@ -13702,28 +13793,28 @@ Aktuelles Projekt sichern? - + S&kip &Überspringen - + &Cancel &Abbrechen - + MusE: Save As MusE: Speichern unter - + Nothing to edit Es gibt nichts zu editieren - + @@ -13961,12 +14052,12 @@ Möchten Sie sie dennoch importieren? MusEGui::PartCanvas - + Cannot copy/move/clone to different Track-Type Kopieren/verschieben/klonen auf anderen Spurtyp nicht möglich - + C&ut &Ausschneiden @@ -14010,6 +14101,11 @@ Möchten Sie sie dennoch importieren? glue Verbinder + + + super glue (merge selection) + Super-Kleber (Auswahl vereinigen) + de-clone @@ -14033,7 +14129,7 @@ Möchten Sie sie dennoch importieren? Dateiinfo - + MusE: save part MusE: Speichere Part @@ -14045,7 +14141,7 @@ Files: Dateien: - + %n part(s) out of %1 could not be pasted. Likely the selected track is the wrong type. @@ -14353,12 +14449,12 @@ Wahrscheinlich hat die ausgewählte Spur den falschen Typ. MusEGui::PluginDialog - + MusE: select plugin MusE: PlugIn wählen - + Lib Lib @@ -14413,7 +14509,7 @@ Wahrscheinlich hat die ausgewählte Spur den falschen Typ. Copyright - + Ok Bestätigen @@ -14423,32 +14519,32 @@ Wahrscheinlich hat die ausgewählte Spur den falschen Typ. Abbrechen - + Mono and Stereo Mono und Stereo - + Stereo Stereo - + Mono Mono - + Show All Zeige alle - + Select which types of plugins should be visible in the list.<br>Note that using mono plugins on stereo tracks is not a problem, two will be used in parallell.<br>Also beware that the 'all' alternative includes plugins that probably not are usable by MusE. Wählen Sie aus, welche Plugintypen in der Liste sichtbar sein sollen.<br>Das Benutzen von Mono-Plugins auf Stereospuren ist kein Problem, zwei werden parallel benutzt werden.<br>Beachten Sie, dass die "alle"-Alternative Plugings enthält, die wahrscheinlich nicht von MusE benutzt werden können. - + Search in 'Label' and 'Name': Suche in "Beschriftung" und "Name": @@ -14456,7 +14552,7 @@ Wahrscheinlich hat die ausgewählte Spur den falschen Typ. MusEGui::PluginGui - + File Buttons Datei-Knöpfe @@ -14924,7 +15020,7 @@ Titel ist nicht einzigartig MusEGui::Strip - + Remove track? Spur entfernen? @@ -14932,7 +15028,7 @@ Titel ist nicht einzigartig MusEGui::TList - + <none> <kein> @@ -14962,7 +15058,7 @@ Titel ist nicht einzigartig Beide Schlüssel - + MusE: bad trackname MusE: ungeeigneter Spurname @@ -14972,30 +15068,30 @@ Titel ist nicht einzigartig Bitte eindeutigen Spurnamen wählen - - + + Update drummap? Drumbelegung aktualisieren? - + Do you want to use same port for all instruments in the drummap? Möchten Sie für alle Instrumente der Drumbelegung den selben Anschluss verwenden? - + &Yes &Ja - - + + &No &Nein - + show gui GUI anzeigen @@ -15007,7 +15103,7 @@ Titel ist nicht einzigartig Native GUI anzeigen - + Treble clef Violinschlüssel @@ -15042,7 +15138,7 @@ Titel ist nicht einzigartig Spur einfügen - + Midi Midi @@ -15057,7 +15153,7 @@ Titel ist nicht einzigartig Möchten Sie für alle Instrumente der Drumbelegung den selben Anschluss und Kanal verwenden? - + Unused Devices Ungenutzte Geräte @@ -16756,29 +16852,34 @@ erweitert werden muss um nicht mehr als Projekt erzeugen - + Projects folder: Projektverzeichnis: - + ... ...... - + Project Name: Projekt-Name: - + Project is a Template Projekt ist eine Vorlage - + + Write window state + Fenster schreiben + + + Project song file type: Projekt-Lieddatei-Typ: @@ -17025,7 +17126,7 @@ Erzeugen? Verzeichnis erzeugen schlug fehl - + File %1 exists. Overwrite? @@ -19533,17 +19634,17 @@ Signals (Wet Level) [dB] Comb Filters - + Comb-Filter Allpass Filters - + Allpass-Filter Bandpass Filters - + Bandpass-Filter diff --git a/muse2/share/locale/muse_ru.ts b/muse2/share/locale/muse_ru.ts index 04c220ea..f86c108b 100644 --- a/muse2/share/locale/muse_ru.ts +++ b/muse2/share/locale/muse_ru.ts @@ -1,20010 +1,10330 @@ - - - + @default - Click this button to enable recording - Щелкните по этой кнопке для активизации режима записи - - - sets amount of quantization: -0 - no quantization -100 - full quantization - устанавливает объём квантования: -0 - без квантования -100 - полное квантование - - - select Pointer Tool: -with the pointer tool you can: - select parts - move parts - copy parts - выбрать инструмент "Указатель": -при помощи указателя можно: - выделять партии(new line) - перемещать партии(new line) - копировать партии - - - Click this button to stop playback - Щелкните по этой кнопке для остановки воспроизведения - - - Click this button to start playback - Щелкните по этой кнопке, чтобы начать воспроизведение - - - Click this button to rewind to start position - Щелкните по этой кнопке для перемещения к началу - - - Click this button to rewind - Щелкните по этой кнопке для перемотки назад - - - Click this button to forward current play position - Щелкните по этой кнопке для перемещения вперёд - - - don't quantize notes above this tick limit - не квантовать ноты выше этого предела тиков - - - quantize also note len as default - также квантовать длительность нот по умолчанию - - - Click this button to open a <em>new song</em>.<br>You can also select the <b>Open command</b> from the File menu. - Щелкните по этой кнопке для открытия другого проекта. Вы также можете выбрать пункт Открыть в меню "Файл". - - - Click this button to save the song you are editing. You will be prompted for a file name. -You can also select the Save command from the File menu. - Щелкните по этой кнопке для сохранения проекта. Будет предложено ввести имя файла. -Вы также можете выбрать пункт "Сохранить" в меню "Файл". - - - Create New Song - Создать новый проект - - - loop between left mark and right mark - цикл между левым и правым маркерами - - - record starts at left mark - запись начинается с левого маркера - - - record stops at right mark - запись останавливается на правом маркере - - - rewind to start position - перемотать к начальной позиции - - - rewind current position - перемотать к текущей позиции - - - move current position - переместить текущую позицию - - - stop sequencer - остановить секвенсер - - - start sequencer play - начать воспроизведение в секвенсере - - - to record press record and then play - чтобы начать запись нажмите "запись", а затем "воспроизвести" - - - send note off to all midi channels - послать сообщение "note off" на все midi-каналы - - - select Pencil Tool: -with the pencil tool you can: - create new parts - modify length of parts - выбрать инструмент "Карандаш": -с помощью инструмента "Карандаш" вы можете: - создавать новые партии - изменять длину партий - - - select Delete Tool: -with the delete tool you can delete parts - выбрать инструмент "Ластик": -с помощью инструмента "Ластик" вы можете удалять партии - - - select Cut Tool: -with the cut tool you can split a part - выбрать инструмент "Ножницы":(new line) -с помощью инструмента "Ножницы" вы можете разрезать партию - - - select Glue Tool: -with the glue tool you can glue two parts - выбрать инструмент "Клей": -с помощью инструмента "Клей" вы можете соединить две партии - - - select Score Tool: - - выбрать редактор партитур: - - - - select Quantize Tool: -insert display quantize event - выбрать инструмент "Квантование": -вставить отображение квантуемых событий - - - select Drawing Tool - выбрать инструмент "Рисование" - - - select Muting Tool: -click on part to mute/unmute - выбрать инструмент "Не проигрывать партию (Заглушить)": -Щелкните по партии, чтобы "Проигрывать" или "Не проигрывать" ее - - - pointer - указатель - - - pencil - карандаш - - - cutter - ножницы - - - score - партитура - - - glue - клей - - - quantize - квантовать - - - draw - рисовать - - - mute parts - заглушить партии - - - Off - Выкл - - - presets (*.pre *.pre.gz *.pre.bz2) - пресеты (*.pre *.pre.gz *.pre.bz2) - - - All Files (*) - Все файлы (*) - - - Add Midi Track - Добавить Midi Трек + Добавить Midi Трек - Add Drum Track - Добавить трек с ударными + Добавить трек ударных - Add Wave Track - Добавить wave-трек + Добавить Wave-трек - Add Audio Output - Добавить аудиовыход + Добавить аудиовыход - Add Audio Group - Добавить аудиогруппу + Добавить аудиогруппу - Add Audio Input - Добавить аудиовход + Добавить аудиовход - Add Aux Send - Добавить Aux посыл - - - eraser - ластик + Добавить Aux посыл - MESS - MESS - - - DSSI - DSSI - - - FST - FST + Select project directory + Выбрать папку проекта - Add Synth Добавить синтезатор - Bar - Такт - - - Jack - Jack - - - ALSA: - ALSA: - - - SYNTH: - SYNTH: - - - JACK: - JACK: - - - Route Маршрут - channel="%1" - канал="%1" - - - dest - dest - - - devtype="%1" - типУстр="%1" + назн - type="%1" - тип="%1" - - - name="%1"/ имя="%1"/ - source - источник - - - Velocity - Скорость нажатия - - - Warning: No output devices! - + Предупреждение: Нет устройства выхода! - Open midi config... - + Открыть midi конфиг... - Empty ports - + Свободные порты - <none> <ничего> - channelMask="%1" МаскаКанала="%1" - - dssi_synth - dssi_synth - - - ladspa_efx - ladspa_efx - - - channels="%1" - каналы="%1" - - - remch="%1" - remch="%1" - - - mport="%1"/ - mport="%1"/ - AboutBox - AboutBox - Об окне - - - Keep On Rocking! - Рок навсегда! - - - Version 0.7.2pre3 - -(C) Copyright 1999-2005 Werner Schweer and others. -See http://www.muse-sequencer.org for new versions and -more information. - -Published under the GNU Public License - Версия 0.7.2pre3 - -(C) Copyright 1999-2005 Werner Schweer и другие. -Новые версии и дополнительную информацию смотрите на сайте http://www.muse-sequencer.org - -Опубликовано на условиях GNU Public License + Дополнительная информация - Version 2 pre-alpha - Версия 2 пре-альфа + Версия 2.0~rc2 (svn revision: 0) - (C) Copyright 1999-2010 Werner Schweer and others. See http://www.muse-sequencer.org for new versions and more information. Published under the GNU Public License (C) Copyright 1999-2010 Werner Schweer и другие. -На http://www.muse-sequencer.org смотри новые версии и +На http://www.muse-sequencer.org смотрите новые версии и дополнительную информацию. Опубликовано на условиях GNU Public License - &Keep On Rocking! &Продолжим рок! - Alt+K Alt+K - - Appearance - - MusE: load image - MusE: загрузить изображение - - - Main application font, and default font for any - controls not defined here. - Главный шрифт приложения, и шрифт по умолчанию -для всех средств управления, здесь не определены. - - - For small controls like mixer strips. -Also timescale small numbers, arranger part name overlay, - and effects rack. - Для небольших средств контроля, типа линеек микшера. -Также для маленьких цифр на линейке времени, названий партий в компоновщике и рэка эффектов. - - - Midi track info panel. Transport controls. - Инфо-панель Midi-трека. Управление транспортом. - - - Controller graph and S/X buttons. Large numbers for time - and tempo scale, and time signature. - Диаграмма контроллера и S/X кнопки. Большие цифры для -линеек времени и темпа, а также для тактового размера. - - - Time scale markers. - Маркеры на линейке времени. - - - List editor: meta event edit dialog multi-line edit box. - Редактор списка: редактирование мета-события многострочное окно редактирования. - - - Mixer label font. Auto-font-sizing up to chosen font size. -Word-breaking but only with spaces. - Шрифт метки микшера. Автоматическое изменение размера шрифта до выбранного размера. -Переносы только по пробелам. - - - Maximum mixer label auto-font-sizing font size. - Максимальный размер автоматически изменяющегося шрифта метки микшера. - - - <none> - <ничего> - - - Select style sheet - Выберите таблицу стилей - - - Qt style sheets (*.qss) - Таблицы стилей Qt (*.qss) - - AppearanceDialogBase - MusE: Appearance Settings - MusE: Настройки вида - - - Apply Применить - Ok Ok - Cancel Отмена - Arranger Компоновщик - MusE: Appearance settings - + MusE: Настройки внешнего вида - Parts Партии - show names показывать названия - show events показывать события - show Cakewalk Style показывать в стиле Cakewalk - y-stretch - + сжатие по вертикали - Events События - note on нажатие ноты - poly pressure полифоническое нажатие - controller контроллер - aftertouch посленажатие - pitch bend - изменение высоты тона + глиссандо - program change смена программы - special - специальная + специальные - Background picture Фоновое изображение - bg - фон - - - select... - выбрать... - - - show snap grid показывать сетку привязки - Colors Цвета - Items Разделы - Color name: - + Название цвета: - Global opacity - + Общая непрозрачность - Style/Fonts Стиль/Шрифты - QT Theme Тема QT - Windows Окна - MusE MusE - Metal Металл - Norwegian Wood Норвежское дерево - Platinum Платина - CDE КДЕ - Motif Motif - Motif Plus Motif Plus - Fonts Шрифты - Family Семейство - Size Размер - Font 1 Шрифт 1 - Font 2 Шрифт 2 - Font 3 Шрифт 3 - Font 0 Шрифт 0 - - - - - - - Bold Жирный - - - - - - - Italic Курсив - - - - - - - - - ... ... - Font 4 Шрифт 4 - Font 5 Шрифт 5 - Palette Палитра - add - добавить + добавить - remove - удалить + удалить - add to palette Добавить в палитру - B B - S S - H H - V V - G G - R R - clear очистить - Style Sheet: Таблица Стилей: - Font 6 Шрифт 6 - Arranger + Awl::MidiVolEntry - Arranger - Компоновщик + off + выкл - Cursor - Курсор + db + дб + + + Awl::VolEntry - Off - Выкл + off + выкл + + + ClipListEditorBase - Bar - Такт + MusE: ClipList + MusE: Список Клипов - Snap - Привязка + Name + Имя + + + Refs + Ссыл (Refs) + + + Start + К началу Len - Дл + Дл - Type - Тип + Data + Данные - NO - НЕТ + Clip Properties + Свойства Клипа - GM - GM + Pos: + Поз: - GS - GS + Len: + Дл: + + + CommentBase - XG - XG + Form1 + Форма1 - midi song type - тип midi-проекта + Track Comment + Комментарий к треку - Pitch - Высота тона + Track 1 + Трек 1 + + + ConfigMidiFileBase - midi pitch - midi высотность + &OK + &ОК - global midi pitch shift - общий сдвиг midi-высотности + &Cancel + &Отмена - Tempo - Темп + 0 (single track) + 0 (один трек) - midi tempo - midi-темп + 1 (multiple tracks) + 1 (несколько треков) - N - N + Format: + Формат: - TrackInfo - ТрекИнфо + 96 + 96 - R - R + 192 + 192 - M - M + 384 + 384 - S - S + Division: + Разрешение (тиков на четверть): - C - Т + Copyright: + Copyright: - Track - Трек + MusE: Config Midi File Import/Export + MusE: Настроить Импорт/Экспорт Midi-файла - O-Port - Вых. порт + Import: + Импорт: - Ch - Кан + Split tracks into &parts + Разделить треки на &партии - T - Т + Alt+P + Alt+P - Enable Recording - Разрешить запись + Split tracks into parts, or one single part + Разделить треки на партии, или все в одну партию - Mute/Off Indicator - Индикатор глушения вкл/выкл + Export: + Экспорт: - Solo Indicator - Индикатор соло + Enable extended smf format (currently not implemented) + Разрешить расширенный smf формат (в настоящее время не осуществлено) - Track Type - Тип трека + Use &2-byte time signatures instead of standard 4 + Использовать &2-байтные размеры в такте вместо стандартных 4 - Track Name - Имя трека + Alt+2 + Alt+2 - Midi output channel number or audio channels - Номер выходного Midi-канала или аудио каналов + Note: Format 0 uses the FIRST midi track's name/comment in the arranger + Примеч: Формат 0 использует имя/коментарий ПЕРВОГО midi трека в компоновщике - Midi output port or synth midi port - Выходной midi-порт или midi-порт синтезатора + Save space by replacing note-offs with &zero velocity note-ons + Сохранить место, заменяя note-offs на &note-ons с нулевой скоростью нажатия - Time Lock - Изменение времени заблокировано + Alt+Z + Alt+Z + + + CrescendoBase - Enable recording. Click to toggle. - Разрешить запись. Щелкните для переключения. + MusE: Crescendo/Decrescendo + MusE: Крещендо/Диминуэндо - Mute indicator. Click to toggle. -Right-click to toggle track on/off. -Mute is designed for rapid, repeated action. -On/Off is not! - Индикатор заглушки. Щелкните для переключения. -Щелчок правой кнопкой мыши включает/выключает трек. -Заглушка предназначена для быстрых, повторяющихся действий. -А Вкл/Выкл нет! + Range + Диапазон - Solo indicator. Click to toggle. -Connected tracks are also 'phantom' soloed, - indicated by a dark square. - Индикатор Соло. Щелкните для переключения. -Все треки, связанные с этим треком тоже перейдут режим "фантомного" соло, -Они будут обозначены темными квадратами. + Looped Events + События в цикле - Track type. Right-click to change - midi and drum track types. - Тип трека. Щелкните правой кнопкой мыши чтобы -изменить тип трека (midi-трек или трек ударных). + Selected Looped + Выбранные в цикле - Track name. Double-click to edit. -Right-click for more options. - Название трека. Редактирование - двойной щелчок. -Большее количество опций - правый щелчок мыши. + Values + Значения - Midi/drum track: Output channel number. -Audio track: Channels. -Mid/right-click to change. - Трек Midi/Ударных: номер канала выхода. -Аудио трек: Каналы. -Чтобы изменить, щелкните Средней/Правой кнопкой мыши. + Start velocity + Начальная скор. нажатия - Midi/drum track: Output port. -Synth track: Assigned midi port. -Left-click to change. -Right-click to show GUI. - Трек Midi/Ударных: Порт выхода. -Трек синтезатора: Назначенный midi-порт. -Щелчок левой кнопкой - изменить. -Щелчок правой кнопкой - показать ГИП. + % + % - Time lock - Изменение времени заблокировано + End velocity + Конечная скор. нажатия - song length - bars - длина проекта - в тактах + Absolute + Абсолютная - Port - Порт + Relative + Относительная - Automation - Автоматизация + OK + OK - <unknown> - <неизвестно> + Cancel + Отмена - ArrangerView + DeicsOnzeGui - panic - паника + Delete preset + Удалить пресет - transport - транспорт + Do you really want to delete %1 ? + Вы действительно хотите удалить %1 ? - C&ut - &Вырезать + &Yes + &Да - &Copy - С&копировать + &No + &Нет - &Paste - &Вставить + Save configuration + Сохранить конфигурацию - Paste c&lone - Вставить к&лон + Critical Error + Критическая ошибка - &Insert Empty Measure - &Вставить пустой такт + Cannot open file %1 + Не могу открыть файл %1 - Delete Selected Tracks - Удалить выделенные треки + Parsing error for file %1 + Синтаксическая ошибка в файле %1 - Add Track - Добавить трек + Load category dialog + Загрузить диалог категорий - Select - Выделить + Load set dialog + Загрузить диалог настройки - &Deselect All - &Убрать выделение + Save set dialog + Сохранить диалог настройки - &Inside Loop - &Внутри цикла + New category + Новая категория - &Outside Loop - &Вне цикла + Delete category + Удалить категорию - All &Parts on Track - Все &партии в треке + Load category + Загрузить категорию - Pianoroll - Пианоролл + Save category + Сохранить категорию - Drums - Ударные + Load set + Загрузить установку - List - Список + Save set + Сохранить установку - Wave - Wave + Delete set + Удалить установку - Mastertrack - Мастер-трек + New subcategory + Новая подкатегория - Graphic - Графика + Delete subcategory + Удалить подкатегорию - Midi &Transform - &Преобразовать MIDI-сообщения + Load subcategory + Загрузить подкатегорию - Global Cut - Глобальное вырезание + Save subcategory + Сохранить подкатегорию - Global Insert - Глобальная вставка + New preset + Новый пресет - Global Split - Глобальное разделение + Load preset + Загрузить пресет - &Edit - &Правка + Save preset + Сохранить пресет - &Structure - &Структура + No more category supported + Большее количество категорий не поддерживается - Transpose - Транспонировать + You can not add more categories + Вы не можете больше добавлять категории - New - Новый + No category selected + Категория не выбрана - - - AudioMixerApp - MusE: Mixer - MusE: Микшер + You must first select a category. + Сначала нужно выбрать категорию. - &Create - &Добавить + Replace or add + Заменить или добавить - &View - &Вид + %1 is supposed to be affected to the hbank number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + %1 должен изменить номер H-банка %2, но этот слот уже занят. +Хотите заменить его или добавить в следующий слот ? - Routing - Маршрутизация + &Replace + &Заменить - Show Midi Tracks - Показать Midi-треки + &Add + &Добавить - Show Drum Tracks - Показать треки ударных + Download error + Ошибка загрузки - Show Wave Tracks - Показать Wave-треки + There is no more free category slot. + Больше нет свободных слотов для категорий. - Show Inputs - Показать входы + Save category dialog + Сохранить диалог категории - Show Outputs - Показать выходы + No more subcategory supported + Большее количество подкатегорий не поддерживается - Show Groups - Показать группы + You can not add more subcategories + Нельзя добавить больше подкатегорий - Show Auxs - Показать Auxs + No subcategory selected + Подкатегория не выбрана - Show Synthesizers - Показать синтезаторы + You must first select a subcategory. + Сначала нужно выбратьподкатегорию. - - - AudioStrip - panorama - панорама + Load subcategory dialog + Загрузить диалог подкатегории - aux send level - уровень aux посыла + %1 is supposed to be affected to the lbank number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + %1 должен повлиять на номер L-банка %2, но этот слот уже занят. +Хотите заменить его или добавить в следующий слот ? - off - выкл + There is no more free subcategory slot. + Больше нет свободных слотов для подкатегорий. - Pan - Пан + Save subcategory dialog + Сохранть диалог подкатегории - 1/2 channel - стерео-моно + No more preset supported + Большее количество пресетов не поддерживается - Pre - Пре + You can not add more presets + Вы не можете больше добавлять пресеты - pre fader - post fader - пре федер - пост федер + No preset selected + Пресет не выбран - dB - Дб + You must first select a preset. + Сначала выберите пресет. - record - записать + Load preset dialog + Загрузить диалог пресета - mute - заглушить + %1 is supposed to be affected to the prog number %2, but there is already one on this slot. + Do you want to replace it or to add it in the next free slot ? + %1 должен повлиять на номер программы %2, но этот слот уже занят. +Хотите заменить её или добавить в следующий слот ? - record downmix - записать downmix + There is no more free preset slot. + Больше нет свободных слотов для пресета. - solo mode (monitor) - режим соло (монитор) + Save preset dialog + Сохранить диалог пресета - pre fader listening - прослушивание пре федера + Browse set dialog + Просмотр диалога установки - iR - вх + Browse image dialog + Просмотр диалога изображения + + + DeicsOnzeGuiBase - intput routing - маршрут входа + DeicsOnze + DeicsOnze - oR - вых + Subcategory + Подкатегория - output routing - маршрут выхода + NONE + НИЧЕГО - Off - Откл + Category + Категория - Read - Читать + Preset + Пресет - Touch - По касанию + Bank numerous + Несколько банков - Write - Записывать + Prog + Прогр - automation type - тип автоматизации + Program numerous + Несколько программ - Channel - Канал + &Global + &Глобальный - solo mode - режим соло + Coarse Ratio + Грубая пропорция - input routing - маршрут входа + POLY + ПОЛИ - - - Awl::MidiVolEntry - - off - выкл + MONO + МОНО - - db - дб + Pitch Bend Range + Диапозон изменения высоты тона - - - Awl::VolEntry - - off - выкл + LFO + LFO - - - BigTime - MusE: Bigtime - MusE: Хронометр + PMS + PMS - format display - формат дисплея + PMD + PMD - bar - такт + AMD + AMD - beat - доля + Speed + Скорость - tick - тик + Delay + Задержка - minute - минут(а) + AMS + AMS - second - секунд(а) + LFO Waveform + Форма волны LFO - frame - фреймов + LFO Sync + Синхр. LFO - subframe - субфреймов + Amplitude Modulation Sensitivity + Чувствительность Амплитудной Модуляции - - - ClipListEdit - MusE: Clip List Editor - MusE: Редактор списка фрагментов + Pitch Modulation Sensitivity + Чувствительность Частотной Модуляции - panic - паника + Pitch Modulation Depth + Глубина Частотной Модуляции - transport - транспорт + LFO Speed + Скорость LFO - - - ClipListEditorBase - - MusE: ClipList - MusE: Список фрагментов + LFO Delay + Задержка LFO - - Name - Имя + Transpose + Транспонировать - - Refs - Рефс (Refs) + Modulation Matrix + Матрица модуляции - - Start - Начало + Volume + Громкость - - Len - Дл + Detune + Расстройка - - Data - Данные + &Preset + - - Clip Properties - Свойства фрагмента + INITVOICE + - - Pos: - Поз: + LBank + - - Len: - Дл: + HBank + - - - CommentBase - - Form1 - Форма1 + DeicsOnze v0.5.5 Copyright (c) 2004-2006 Nil Geisweiller. Published under GPL licence. + - - Track Comment - Комментарий к треку + Pitch Envelope + - - Track 1 - Трек 1 + PL3 + - - - ConfigMidiFileBase - MusE: Config Midi File Export - Настроить экспорт midi-файла + PL2 + - - &OK - &ОК + PL1 + - - &Cancel - &Отмена + PR1 + - - 0 (single track) - 0 (один трек) + PR2 + - - 1 (multiple tracks) - 1 (несколько треков) + PR3 + - - Format: - Формат: + Pitch modulation depth + - - 96 - 96 + Pitch modulation sensitivity + - - 192 - 192 + LFO delay + - - 384 - 384 + LFO speed + - - Division: - Деление(Division): + Amplitude modulation depth + - - Copyright: - Copyright: + Amplitude modulation sensitivity + - Enable extended smf format - Разрешить расширенный формат SMF + <b>Algorithm 1</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 2</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by both <i>Op 3</i> and <i>Op 4</i><br> +<b>Algorithm 3</b> : <i>Op 1</i> modulated by both <i>Op 4</i> and <i>Op 2</i> modulated by <i>Op 3</i><br> +<b>Algorithm 4</b> : <i>Op 1</i> modulated by both <i>Op 2</i> and <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 5</b> : (<i>Op 1</i> modulated by <i>Op 2</i>) add to (<i>Op 3</i> modulated by <i>Op 4</i>) <br> +<b>Algorithm 6</b> : addition of the three <i>Op 1, 2, 3</i> all modulated by <i>Op 4</i><br> +<b>Algorithm 7</b> : addition of the three <i>Op 1, 2, 3</i> with <i>Op 3</i> modulated by <i>Op 4</i><br> +<b>Algorithm 8</b> : addition of the four <i>Op 1, 2, 3, 4</i> + - - MusE: Config Midi File Import/Export - MusE: Настроить Импорт/Экспорт Midi-файла + Op4 Feedback + - - Import: - Импорт: + Feedback level of the operator 4 + - - Split tracks into &parts - Разделить треки на &партии + Op &1 + - - Alt+P - Alt+P + Scaling 1 + - - Split tracks into parts, or one single part - Разделить треки на партии, или одну партию + LS1 + - - Export: - Экспорт: + RS1 + - - Enable extended smf format (currently not implemented) - Разрешить расширенный smf формат (в настоящее время не осуществлено) + Rate Scaling + - - Use &2-byte time signatures instead of standard 4 - Использовать &2-байтные размеры в такте вместо стандартных 4 + Attack Rate of the operator 1 + - - Alt+2 - Alt+2 + Level Scaling + - - Note: Format 0 uses the FIRST midi track's name/comment in the arranger + Amplitude Envelope 1 - - Save space by replacing note-offs with &zero velocity note-ons - Сохранить место, заменяя note-offs на &note-ons с нулевой скоростью нажатия + RR1 + - - Alt+Z - Alt+Z + D1R1 + - - - CrescendoBase - - MusE: Crescendo/Decrescendo + D1L1 - - Range - Диапазон + D2R1 + - - Looped Events + Release Rate - - - Selected Looped + + 2° Decay Rate - - - Values - Значения + + 1° Decay Level + + + + 1° Decay Rate + - - Start velocity + Attack Rate - - - % + AR1 - - End velocity + Detune, OSCWave, EGShift 1 - - Absolute + DET1 - - Relative + EG Shift - - OK + 96dB - - Cancel - Отмена + 48dB + - - - CtrlPanel - Sel - Выбр + 24dB + - select controller - выбрать контроллер + 12dB + - x - x + Wave form + - remove panel - удалить панель + Wave form 1 = <i>sin(<b>t</b>)</i><br> +Wave form 2 = <i>sin(<b>t</b>)*abs(sin(<b>t</b>))</i><br> +Wave form 3 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>) else 0</i><br> +Wave form 4 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>)*abs(sin(<b>t</b>)) else 0</i><br> +Wave form 5 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>) else 0</i><br> +Wave form 6 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*abs(sin(2*<b>t</b>)) else 0</i><br> +Wave form 7 = <i>if <b>t</b>&#060 pi then abs(sin(2*<b>t</b>)) else 0</i><br> +Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin(2*<b>t</b>) else 0</i> + - Velocity - Скорость нажатия + Sensitivity 1 + - add new ... - Добавить новый... + KVS1 + - S - S + Amplitude Modulation Enable + - X - X + AME1 + - manual adjust - настройка вручную + Keyboard Velocity Sensitivity + - double click on/off - двойной щелчок вкл/выкл + Key Velocity Sensitivity + - off - выкл + EBS1 + - - - DeicsOnzeGui - - - Delete preset - Удалить пресет + EG Bias Sensitivity + - - - - Do you really want to delete %1 ? - Вы действительно хотите удалить %1 ? + Eg Bias Sensitivity + - - - - &Yes - &Да + Frequency 1 + - - - - &No - &Нет + Coarse 1 + - - Save configuration - Сохранить конфигурацию + Fine 1 + - - - - - - - - - - - Critical Error - Критическая ошибка + Fine Ratio + - - - - - - Cannot open file %1 - Не могу открыть файл %1 + Freq 1 + - - - - - - Parsing error for file %1 - Синтаксическая ошибка в файле %1 + Fixed Frequency + - - - Load category dialog - Загрузить диалог категорий + Toggle Fix Frequency + - - Load set dialog + FIX - - Save set dialog + OUT 1 - - New category + Output Volume - - - Delete category + Op &2 - - Load category + Amplitude Envelope 2 - - Save category + D1R2 - - Load set + D1L2 - - Save set + D2R2 - - Delete set + RR2 - - New subcategory + AR2 - - - Delete subcategory + Frequency 2 - - Load subcategory + Coarse 2 - - Save subcategory + Fine 2 - - New preset - Новый пресет + Freq 2 + - - Load preset + Scaling 2 - - Save preset + LS2 - - No more category supported + RS2 - - You can not add more categories + OUT 2 - - - No category selected + Detune, OSCWave, EGShift 2 - - - You must first select a category. + DET2 - - - - Replace or add + Sensitivity 2 - - %1 is supposed to be affected to the hbank number %2, but there is already one on this slot. - Do you want to replace it or to add it in the next free slot ? + EBS2 - - - - &Replace - &Заменить + KVS2 + - - - - &Add - &Добавить + AME2 + - - - - Download error + Op &3 - - There is no more free category slot. + Amplitude Envelope 3 - - Save category dialog + D1R3 - - No more subcategory supported + D1L3 - - You can not add more subcategories + D2R3 - - - No subcategory selected + RR3 - - - You must first select a subcategory. + AR3 - - Load subcategory dialog + Scaling 3 - - %1 is supposed to be affected to the lbank number %2, but there is already one on this slot. - Do you want to replace it or to add it in the next free slot ? + LS3 - - There is no more free subcategory slot. + RS3 - - Save subcategory dialog + OUT 3 - - No more preset supported + Frequency 3 - - You can not add more presets + Coarse 3 - - - - No preset selected + Fine 3 - - - - You must first select a preset. + Freq 3 - - Load preset dialog + Detune, OSCWave, EGShift 3 - - %1 is supposed to be affected to the prog number %2, but there is already one on this slot. - Do you want to replace it or to add it in the next free slot ? + DET3 - - There is no more free preset slot. + Sensitivity 3 - - Save preset dialog + EBS3 - - Browse set dialog + KVS3 - - Browse image dialog + AME3 - - - DeicsOnzeGuiBase - - DeicsOnze - DeicsOnze + Op &4 + - &Presets - &Пресеты + amplitude Envelope 4 + - Load - Загрузить + AR4 + - Save - Сохранить + D1R4 + - Preset Name - Имя пресета + D1L4 + - INIT VOICE - Начальный голос(INIT VOICE) + D2R4 + - - Subcategory - Подкатегория + RR4 + - - - NONE - НИЧЕГО + Frequency 4 + - - Category - Категория + Coarse 4 + - Delete - Удалить + Fine 4 + - - Preset - Пресет + Freq 4 + - New - Новый + Scaling 4 + - Bank - Банк + LS4 + - - - Bank numerous - Несколько банков + RS4 + - - Prog - Прогр - - - - Program numerous - Несколько программ - - - DeicsOnze v0.2.2 Copyright (c) 2004 Nil Geisweiller under GPL licence - DeicsOnze v0.2.2 Copyright (c) 2004 Nil Geisweiller на условиях GPL licence - - - - &Global - &Глобальный - - - Master Volume - Общая Громкость + OUT 4 + - Master volume - Общая громкость + Detune, OSCWave, EGShift 4 + - feedback - обратная связь + DET4 + - - - - - Coarse Ratio - Грубая пропорция + Sensitivity 4 + - Feedback of Op 4 - Обратная связь от Op 4 + EBS4 + - Function - Функция + KVS4 + - - POLY - ПОЛИ + AME4 + - - MONO - МОНО + &Func + - PBR - PBR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pitch Bend Range - Диапозон изменения высоты тона + Delay Pan Depth + - - LFO - LFO + Delay Pan LFO Freq + - - PMS - PMS + Delay Ch Send Level + - - PMD - PMD + Channel Chorus + - - AMD - AMD + Delay Feedback + - - Speed - Скорость + Delay On/Off, Return Level + - - Delay - Задержка + On + Вкл - - AMS - AMS + Delay Beat Ratio + - Saw Up - Пилообразный + Delay BPM + - Square - Прямоугольный + Foot Control + - Triangl - Треугольный + Pitch + Высота тона - S/Hold - S/Hold + Amplitude + - - LFO Waveform - Форма волны LFO + Modulation Wheel + - - LFO Sync - Синхр. LFO + Breath Control + - - Amplitude Modulation Sensitivity - Чувствительность Амплитудной Модуляции + Pitch Bias + - - Pitch Modulation Sensitivity - Чувствительность Частотной Модуляции + Envelope Bias + - - - Pitch Modulation Depth - Глубина Частотной Модуляции + After Touch + Посленажатие - - LFO Speed - Скорость LFO + Phony Mode + - - LFO Delay - Задержка LFO + Potamento + - Transpose and Global Detune - Транспозиция и Общая Расстройка + Portamento Mode + - - - - Transpose - Транспонировать + FINGER + - Global Detune - Общая расстройка + FULL + - Algorithm 1 - Алгоритм 1 + PT + - Algorithm 2 - Алгоритм 2 + Portamento Time + - Algorithm 3 - Алгоритм 3 + C&horus + - Algorithm 4 - Алгоритм 4 + Chorus Parameters + - Algorithm 5 - Алгоритм 5 + Channel send level + - Algorithm 6 - Алгоритм 6 + On/Off and Return level + - Algorithm 7 - Алгоритм 7 + Select LADSPA plugin + - Algorithm 8 - Алгоритм 8 + Change plugin + - - - Modulation Matrix - Матрица модуляции + &Reverb + - - - - - - - Volume - Громкость + Reverb Parameters + - - - - - - - - - - Detune - Расстройка + &Config + &Настроить - - &Preset + Font Size - - INITVOICE + Quality - - LBank + High - - HBank + Middle - - DeicsOnze v0.5.5 Copyright (c) 2004-2006 Nil Geisweiller. Published under GPL licence. + Low - - Pitch Envelope + Ultra low - - PL3 - + Filter + Фильтр - - PL2 + Save Mode (into the song) - - PL1 + Save only the used presets - - PR1 + Save the entire set - - PR2 + Save the configuration - - PR3 + Configuration File - - - - - - - - Pitch modulation depth + Save... - - Pitch modulation sensitivity + Load... - - LFO delay + Save as default - - LFO speed - + Colors + Цвета - - Amplitude modulation depth - + Text + Текст - - Amplitude modulation sensitivity + Background - - <b>Algorithm 1</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by <i>Op 3</i> modulated by <i>Op 4</i><br> -<b>Algorithm 2</b> : <i>Op 1</i> modulated by <i>Op 2</i> modulated by both <i>Op 3</i> and <i>Op 4</i><br> -<b>Algorithm 3</b> : <i>Op 1</i> modulated by both <i>Op 4</i> and <i>Op 2</i> modulated by <i>Op 3</i><br> -<b>Algorithm 4</b> : <i>Op 1</i> modulated by both <i>Op 2</i> and <i>Op 3</i> modulated by <i>Op 4</i><br> -<b>Algorithm 5</b> : (<i>Op 1</i> modulated by <i>Op 2</i>) add to (<i>Op 3</i> modulated by <i>Op 4</i>) <br> -<b>Algorithm 6</b> : addition of the three <i>Op 1, 2, 3</i> all modulated by <i>Op 4</i><br> -<b>Algorithm 7</b> : addition of the three <i>Op 1, 2, 3</i> with <i>Op 3</i> modulated by <i>Op 4</i><br> -<b>Algorithm 8</b> : addition of the four <i>Op 1, 2, 3, 4</i> + Edit Text - - Op4 Feedback + Edit Background - - - Feedback level of the operator 4 + Red - - Op &1 + Blue - - Scaling 1 + Green - - LS1 + Set Path - - RS1 + Image in the background : - - - - - - - - - Rate Scaling + Browse... - - - - - - - - - - - - - Attack Rate of the operator 1 + Load the set at the initialization : - - - - - - - - - Level Scaling + Set Brightness, Detune, Attack and Release of the current channel to default - - Amplitude Envelope 1 + Res. Ctrl - - RR1 + Cut all notes off - - D1R1 + Panic! - - D1L1 + Number of Voices - - D2R1 + Number of voices - - - - - Release Rate - - - - - - - - 2° Decay Rate - - - - - - - - 1° Decay Level - - - - - - - - 1° Decay Rate - + Enable + Разрешить - - - - - Attack Rate - + Channel + Канал - - AR1 - + Vol + Громк - - Detune, OSCWave, EGShift 1 + Channel Ctrl - - DET1 - + Release + Послезвучие - - - - - EG Shift - + Attack + Атака - - - - - 96dB + Brightness - - - - - 48dB + Modulation - - - - - 24dB - + Pan + Пан + + + DelOverlapsBase - - - - - 12dB - + MusE: Delete Overlaps + Удалить Наложения - - - - - Wave form - + Range + Диапазон - - - - - Wave form 1 = <i>sin(<b>t</b>)</i><br> -Wave form 2 = <i>sin(<b>t</b>)*abs(sin(<b>t</b>))</i><br> -Wave form 3 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>) else 0</i><br> -Wave form 4 = <i>if <b>t</b>&#060 pi then sin(<b>t</b>)*abs(sin(<b>t</b>)) else 0</i><br> -Wave form 5 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>) else 0</i><br> -Wave form 6 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*abs(sin(2*<b>t</b>)) else 0</i><br> -Wave form 7 = <i>if <b>t</b>&#060 pi then abs(sin(2*<b>t</b>)) else 0</i><br> -Wave form 8 = <i>if <b>t</b>&#060 pi then sin(2*<b>t</b>)*sin(2*<b>t</b>) else 0</i> - + All Events + Все События - - Sensitivity 1 - + Selected Events + Выбранные события - - KVS1 - + Looped Events + События в Цикле - - - - - Amplitude Modulation Enable - + Selected Looped + Выбранные в Цикле - - AME1 - + OK + OK - - - - - Keyboard Velocity Sensitivity - + Cancel + Отмена + + + DidYouKnow - - - - - Key Velocity Sensitivity - + Did you know? + Знаете ли вы? - - EBS1 - + Don't show on startup + Не показывать при старте программы - - - - - EG Bias Sensitivity - + Next tip + Следующий совет - - - - - Eg Bias Sensitivity - + Close + Закрыть + + + EditCtrlBase - - Frequency 1 - + MusE: Edit Controller Event + MusE: Редактировать контроллер - - Coarse 1 - + Time Position + Позиция по времени - - Fine 1 - + Available Controller: + Доступные контроллеры: - - - - - Fine Ratio - + Create New Controller + Создать новый контроллер - - Freq 1 - + textLabel3 + текстМетка3 - - - - - Fixed Frequency - + Value + Значение - - - - - Toggle Fix Frequency - + Controller + Контроллер - - - - - FIX - + H-Bank + H-банк - - OUT 1 - + L-Bank + L-банк - - - - - Output Volume - + Program + Программа - - Op &2 - + off + выкл - - Amplitude Envelope 2 - + pushButton4 + кнопка нажатия4 - - D1R2 - + &OK + &ОК - - D1L2 - + &Cancel + О&тмена + + + EditGainBase - - D2R2 - + MusE: Modify gain + MusE: Изменить усиление - - RR2 - + Gain + Усиление - - AR2 - + 200% + 200% - - Frequency 2 - + 100% + 100% - - Coarse 2 - + 0% + 0% - - Fine 2 - + &Reset + &Сброс - - Freq 2 - + Alt+R + Alt+R - - Scaling 2 - + &Apply + &Применить - - LS2 - + Alt+A + Alt+A - - RS2 - + &Cancel + &Отмена - - OUT 2 - + Alt+C + Alt+C + + + EditInstrumentBase - - Detune, OSCWave, EGShift 2 - + MusE: Instrument Editor + Редактор инструментов - - DET2 - + High Bank: + H-банк: - - Sensitivity 2 - + Low Bank: + L-банк: - - EBS2 - + Program: + Программа: - - KVS2 - + &Delete + &Удалить - - AME2 - + Alt+D + Alt+D - - Op &3 - + Drum + Ударные - - Amplitude Envelope 3 - + GM + GM - - D1R3 - + GS + GS - - D1L3 - + XG + XG - - D2R3 - + This is a list of commonly used midi controllers. +Note that in MusE pitch and program changes are +handled like normal controllers. + Это список общеупотребительных midi-контроллеров. +Обратите внимание, что изменение программ и звуковысотности в MusE, +такое же, как и управление обычными контроллерами. + - - RR3 - + Properties + Свойства - - AR3 - + Control7 + Контрл7 - - Scaling 3 - + Control14 + Контрл14 - - LS3 - + RPN + RPN - - RS3 - + NRPN + NRPN - - OUT 3 - + Pitch + Высота тона - - Frequency 3 - + Program + Программа - - Coarse 3 - + H-Ctrl + H-Ктрл - - Fine 3 - + L-Ctrl + L-Ктрл - - Freq 3 - + Min + Мин - - Detune, OSCWave, EGShift 3 - + Max + Макс - - DET3 - + Name + Имя - - Sensitivity 3 - - - - - EBS3 - - - - - KVS3 - - - - - AME3 - + Type + Тип - - Op &4 - + Hex Entry: + Шестнадцатиричный Ввод: - - amplitude Envelope 4 - + &File + &Файл - - AR4 - + Tools + Инструменты - - D1R4 - + New + Новый - - D1L4 - + &New + &Новый - - D2R4 - + Ctrl+N + Ctrl+N - - RR4 - + Open + Открыть - - Frequency 4 - + &Open... + &Открыть... - - Coarse 4 - + Ctrl+O + Ctrl+O - - Fine 4 - + Save + Сохранить - - Freq 4 - + &Save + &Сохранить - - Scaling 4 - + Ctrl+S + Ctrl+S - - LS4 - + Save As + Сохранить как - - RS4 - + Save &As... + Сохранить &как... - - OUT 4 - + Exit + Выйти - - Detune, OSCWave, EGShift 4 - + E&xit + В&ыйти - - DET4 - + Instrument Name: + Имя Инструмента: - - Sensitivity 4 - + Selected instrument name. + Имя выбранного инструмента. - - EBS4 - + List of defined instruments. + Список назначенных инструментов. - - KVS4 - + Pa&tches + Па&тчи - - AME4 - + List of groups and patches. + Список групп и патчей. - - &Func - + Group/Patch + Группа/Патч - - Delay Pan Depth - + Name: + Имя: - - Delay Pan LFO Freq - + Group or patch name + Группа или имя патча - - Delay Ch Send Level - + Patch high bank number + Номер H-банка патча - - - - Channel Chorus - + Patch high bank number. --- means don't care. + Номер H-банка патча. --- не важно какой. - - Delay Feedback - + --- + dont care + --- + +не важно - - Delay On/Off, Return Level - + Patch low bank number + Номер L-банка патча - - - - On - Вкл + Patch low bank number. --- means don't care. + Номер L-банка патча. --- не важно какой. - - Delay Beat Ratio - + --- + --- - - Delay BPM - + Patch program number + Програмный номер патча - - Foot Control - + Drum patch + Патч ударных - - - - - Pitch - Высота тона + If set, the patch is available only for drum channels. + Если установлено, то этот патч может использоваться только в каналах ударных. - - - - - Amplitude - + GM patch + GM патч - - Modulation Wheel - + If set, the patch is available in a 'GM' or 'NO' midi song type. + Если установлено, то этот патч может использоваться только в типах midi-проектов "GM" или "NO". - - Breath Control - + GS patch + GS патч - - - Pitch Bias - + If set, the patch is available in a 'GS' or 'NO' midi song type. + Если установлено, то этот патч может использоваться только в типах midi-проектов "GS" или "NO". - - - Envelope Bias - + XG patch + XG патч - - After Touch - Посленажатие + If set, the patch is available in an 'XG' or 'NO' midi song type. + Если установлено, то этот патч может использоваться только в типах midi-проектов "XG" или "NO". - - Phony Mode - + Delete group or patch + Удалить группу или патч - - Potamento - + New patch + Новый патч - - Portamento Mode - + New &Patch + Новый &Патч - - FINGER - + Alt+P + Alt+P - - FULL - + New group + Новая группа - - PT - + New &Group + Новая &Группа - - - Portamento Time - + Alt+G + Alt+G - - C&horus - + Contro&ller + Контро&ллер - - Chorus Parameters - + Common: + Обычный: - - - Channel send level - + List of defined controllers + Список назначенных контроллеров - - - On/Off and Return level - + List of defined controllers. + Список назначенных контроллеров. - - - Select LADSPA plugin - + Min + Мин - - - Change plugin - + Max + Макс - - &Reverb - + Def + Назн - - Reverb Parameters - + Midi controller name + Имя midi-контроллера - - &Config - &Настроить + Type: + Тип: - - Font Size - + Midi controller type + Тип midi-контроллера - - Quality - + RPN14 + RPN14 - - High - + NRPN14 + NRPN14 - - Middle - + Midi controller number high byte + Старший байт midi-контроллера - - Low - + Midi controller number low byte (* means drum controller) + Младший байт midi-контроллера (* означает контроллер ударных) - - Ultra low - - - - - Filter - Фильтр - - - - Save Mode (into the song) - - - - - Save only the used presets - - - - - Save the entire set - - - - - Save the configuration - - - - - Configuration File - - - - - Save... - - - - - Load... - - - - - Save as default - - - - - Colors - Цвета - - - - Text - Текст - - - - Background - - - - - Edit Text - - - - - Edit Background - - - - - - - Red - - - - - - - Blue - - - - - - - Green - - - - - Set Path - - - - - Image in the background : - - - - - - Browse... - - - - - Load the set at the initialization : - - - - - Set Brightness, Detune, Attack and Release of the current channel to default - - - - - Res. Ctrl - - - - - Cut all notes off - - - - - Panic! - - - - - Number of Voices - - - - - Number of voices - - - - - Enable - Разрешить - - - - Channel - Канал - - - - Vol - Громк - - - - Channel Ctrl - - - - - Release - Послезвучие - - - - Attack - Атака - - - - Brightness - - - - - Modulation - - - - - Pan - Пан - - - - DelOverlapsBase - - - MusE: Delete Overlaps - - - - - Range - Диапазон - - - - All Events - - - - - Selected Events - - - - - Looped Events - - - - - Selected Looped - - - - - OK - - - - - Cancel - Отмена - - - - DidYouKnow - - - Did you know? - Знаете ли вы? - - - - Don't show on startup - Не показывать при старте программы - - - - Next tip - Следующий совет - - - - Close - Закрыть - - - - DrumEdit - - &File - &Файл - - - Load Map - Загрузить карту - - - Save Map - Сохранить карту - - - &Edit - &Правка - - - Cut - Вырезать - - - Copy - Копировать - - - Paste - Вставить - - - Delete Events - Удалить события - - - Select All - Выделить всё - - - Select None - Убрать выделение - - - Invert - Инвертировать - - - Inside Loop - Внутри цикла - - - Outside Loop - Вне цикла - - - &Select - &Выделение - - - Load Drummap - Загрузить драм-карту - - - Store Drummap - Сохранить драм-карту - - - Step Record - Пошаговая запись - - - Midi Input - MIDI-вход - - - ctrl - ctrl - - - Add Controller View - Показать контроллеры - - - M - M - - - Sound - Звук - - - QNT - КВНТ - - - E-Note - E-Нота - - - Len - Дл - - - A-Note - A-Нота - - - Ch - Кан - - - Port - Порт - - - LV1 - LV1 - - - LV2 - LV2 - - - LV3 - LV3 - - - LV4 - LV4 - - - drummaps - драм-карты - - - Muse: Load Drum Map - Muse: Загрузить драм-карту - - - MusE: Store Drum Map - Muse: Сохранить драм-карту - - - Set Fixed Length - Установить фикс. длительность - - - &Functions - &Функции - - - Modify Velocity - Изменить скорость нажатия - - - mute instrument - заглушить инструмент - - - sound name - название звука - - - volume percent - громкость в процентах - - - quantisation - квантование - - - this input note triggers the sound - эта входящая нота включает звук - - - note length - длина ноты - - - this is the note which is played - это нота, которая воспроизводится - - - output channel (hold ctl to affect all rows) - канал выхода (удерживайте ctrl, чтобы воздействовать на все ряды) - - - output port - порт выхода - - - shift + control key: draw velocity level 1 - клавиши shift+control: рисовать уровень 1 скорости нажатия - - - control key: draw velocity level 2 - Клавиша control: рисовать уровень 2 скорости нажатия - - - shift key: draw velocity level 3 - Клавиша shift: рисовать уровень 3 скорости нажатия - - - draw velocity level 4 - рисовать уровень 4 скорости нажатия - - - output channel (ctl: affect all rows) - канал выхода (ctrl: действует на все ряды) - - - Reset GM Map - Настроить карту GM по умолчанию - - - Previous Part - Предыдущая партия - - - Next Part - Следующая партия - - - Quantize - Квантовать - - - Erase Event - Удалить событие - - - Delete Overlaps - Удалить наложения - - - &Plugins - &Плагины - - - Drum tools - Инструменты ударных - - - panic - паника - - - transport - транспорт - - - Vol - Громк - - - Drum map - Карта ударных - - - Reset the drum map with GM defaults? - Сброс карты ударных на GM по умолчанию? - - - - EditCAfterDialog - - MusE: Enter Channel Aftertouch - MusE: Ввести Channel Aftertouch - - - Time Position - Позиция по времени - - - Pressure - Давление - - - - EditCtrl7DialogBase - - MusE: Enter Controller - MusE: Ввести контроллер - - - Controller: - Контроллер: - - - Time Position: - Позиция по времени: - - - Value: - Значение: - - - controller value - значение контроллера - - - OK - ОК - - - Cancel - Отмена - - - - EditCtrlBase - - - MusE: Edit Controller Event - MusE: Редактировать контроллер - - - - Time Position - Позиция по времени - - - - Available Controller: - Доступный контроллер: - - - - Create New Controller - Создать новый контроллер - - - - textLabel3 - текстМетка3? - - - - Value - Значение - - - - Controller - Контроллер - - - - H-Bank - H-банк - - - - L-Bank - L-банк - - - - Program - Программа - - - - - off - выкл - - - - pushButton4 - кнопка для нажатия4? - - - - &OK - &ОК - - - - &Cancel - О&тмена - - - - EditEventDialog - - Ok - ОК - - - Cancel - Отмена - - - - EditGainBase - - - MusE: Modify gain - MusE: изменить усиление - - - - Gain - Усиление - - - - 200% - 200% - - - - 100% - 100% - - - - 0% - 0% - - - - &Reset - &Сброс - - - - Alt+R - Alt+R - - - - &Apply - &Применить - - - - Alt+A - Alt+A - - - - &Cancel - &Отмена - - - - Alt+C - Alt+C - - - - EditInstrument - - MusE: Create file failed - MusE: Не удалось создать файл - - - MusE: Write File failed - MusE: Не удалось записать файл - - - MusE: - MusE: - - - The user instrument directory - - Пользовательский инструментальный каталог - - - -does not exist yet. Create it now? - - не существует. Создать? - - - (You can override with the environment variable MUSEINSTRUMENTS) - (Вы можете переписать с переменной окружения MUSEINSTRUMENTS) - - - Unable to create user instrument directory - - Невозможно создать пользовательский инструментальный каталог - - - MusE: Save Instrument Definition - MusE: Сохранить Определение Инструмента - - - Instrument Definition (*.idf) - Определение инструмента (*.idf) - - - MusE: Save instrument as - MusE: Сохранить инструмент как - - - Enter a new unique instrument name: - Введите неповторяющееся имя инструмента: - - - The user instrument: - - Инструмент пользователя: - - - -already exists. This will overwrite its .idf instrument file. -Are you sure? - уже существует. Нажатие на кнопку "ОК" -перепишет .idf файл инструмента. -Вы уверены? - - - MusE: Bad instrument name - MusE: Неверное имя инструмента - - - Please choose a unique instrument name. -(The name might be used by a hidden instrument.) - Пожалуйста, выберите неповторяющееся имя для инструмента. -(Имя может использоваться в скрытых инструментах) - - - MusE: Bad patch name - MusE: Неверное имя патча - - - Please choose a unique patch name - Пожалуйста, выберите неповторяющееся имя патча - - - MusE: Bad patchgroup name - MusE: Неверное имя группы - - - Please choose a unique patchgroup name - Пожалуйста, выберите неповторяющееся имя группы - - - MusE: Bad controller name - MusE: Неверное имя контроллера - - - Please choose a unique controller name - Пожалуйста, выберите неповторяющееся имя для контроллера - - - MusE: Cannot add common controller - MusE: Невозможно добавить обычный контроллер - - - A controller named - Контроллер названый - - - already exists. - уже существует. - - - A controller number - Номер контроллера - - - MusE - MusE - - - The current Instrument contains unsaved data -Save Current Instrument? - Текущий Инструмент содержит несохраненные данные -Сохранить этот Инструмент? - - - &Save - &Сохранить - - - &Nosave - &Не сохранять - - - &Abort - &Отмена - - - - EditInstrumentBase - - - MusE: Instrument Editor - Редактор инструментов - - - Patches - Патчи - - - Patch Name: - Название патча - - - - High Bank: - H-банк: - - - - Low Bank: - L-банк: - - - - Program: - Программа: - - - d.c. - dont care - не важно - - - d.c. - не важно - - - Patch/Group - Патч/Группа - - - - - - &Delete - &Удалить - - - - - - Alt+D - Alt+D - - - &New Patch - &Новый Патч - - - Alt+N - Alt+N - - - New Group - Новая Группа - - - - Drum - Ударные - - - - GM - GM - - - - GS - GS - - - - XG - XG - - - Controller - Контроллер - - - Predefined Controller: - Предустановленный контроллер: - - - - This is a list of commonly used midi controllers. -Note that in MusE pitch and program changes are -handled like normal controllers. - Это список общеупотребительных midi-контроллеров. -Обратите внимание, что управление звуковысотностью(pitch) и изменением программ(program change) в MusE, -такое же, как и управление обычными контроллерами. - - - - - - Properties - Свойства - - - Name - Имя - - - Type - Тип - - - - Control7 - Контрл7 - - - - Control14 - Контрл14 - - - - RPN - RPN - - - - NRPN - NRPN - - - - Pitch - Высота тона - - - - Program - Программа - - - - - H-Ctrl - H-Ктрл - - - Midi Controller Number High Byte - Старший байт midi-контроллера - - - - - L-Ctrl - L-Ктрл - - - Midi Controller Number Low Byte - Младший байт midi-контроллера - - - Range - Диапазон - - - - Min - Миним - - - - Max - Макс - - - Default - По умолчанию - - - - Name - Имя - - - - Type - Тип - - - Min Val - Мин Знач - - - Max Val - Макс Знач - - - list of defined controllers - список назначенных контроллеров - - - This is the MusE list of defined controllers. - Это список назначенных контроллеров для MusE - - - SysEx - SysEx - - - Initialization - Инициализация - - - Panic - Паника - - - - Hex Entry: - Шестнадцатиричный Ввод: - - - - &File - &Файл - - - - Tools - Инструменты - - - - New - Новый - - - - &New - &Новый - - - - Ctrl+N - Ctrl+N - - - - Open - Открыть - - - - &Open... - &Открыть... - - - - Ctrl+O - Ctrl+O - - - - Save - Сохранить - - - - &Save - &Сохранить - - - - Ctrl+S - Ctrl+S - - - - Save As - Сохранить как - - - - Save &As... - Сохранить &как... - - - - Exit - Выйти - - - - E&xit - В&ыйти - - - - Instrument Name: - Имя Инструмента: - - - - Selected instrument name. - Имя выбранного инструмента. - - - - List of defined instruments. - Список назначенных инструментов. - - - - Pa&tches - Па&тчи - - - - List of groups and patches. - Список групп и патчей. - - - - Group/Patch - Группа/Патч - - - - - - Name: - Имя: - - - - - Group or patch name - Группа или имя патча - - - - Patch high bank number - Номер H-банка патча - - - - Patch high bank number. --- means don't care. - Номер H-банка патча. --- не важно какой. - - - - --- - dont care - --- - -всё равно - - - - Patch low bank number - Номер L-банка патча - - - - Patch low bank number. --- means don't care. - Номер L-банка патча. --- не важно какой. - - - - --- - --- - - - - - Patch program number - Програмный номер патча - - - - Drum patch - Патч ударных - - - - If set, the patch is available only for drum channels. - Если установлено, то этот патч может использоваться только в каналах ударных. - - - - GM patch - GM патч - - - - If set, the patch is available in a 'GM' or 'NO' midi song type. - Если установлено, то этот патч может использоваться только в типах midi-проектов "GM" или "НЕТ". - - - - GS patch - GS патч - - - - If set, the patch is available in a 'GS' or 'NO' midi song type. - Если установлено, то этот патч может использоваться только в типах midi-проектов "GS" или "НЕТ". - - - - XG patch - XG патч - - - - If set, the patch is available in an 'XG' or 'NO' midi song type. - Если установлено, то этот патч может использоваться только в типах midi-проектов "XG" или "НЕТ". - - - - Delete group or patch - Удалить группу или патч - - - - New patch - Новый патч - - - - New &Patch - Новый &Патч - - - - Alt+P - Alt+P - - - - New group - Новая группа - - - - New &Group - Новая &Группа - - - - Alt+G - Alt+G - - - - Contro&ller - Контро&ллер - - - - Common: - Обычный: - - - - List of defined controllers - Список назначенных контроллеров - - - - List of defined controllers. - Список назначенных контроллеров. - - - - Min - Мин - - - - Max - Макс - - - - Def - Def - - - - Midi controller name - Имя midi-контроллера - - - - Type: - Тип: - - - - - Midi controller type - Тип midi-контроллера - - - - RPN14 - RPN14 - - - - NRPN14 - NRPN14 - - - - - Midi controller number high byte - Старший байт midi-контроллера - - - - Midi controller number low byte (* means drum controller) - Младший байт midi-контроллера (* означает контроллер ударных) - - - - Midi controller number low byte. -If low byte is * then the controller is a - 'drum controller'. For drum tracks and - GS/XG type songs and instruments. -Allows controllers for each instrument in - Muse's drum map. The low byte will be - replaced by the 'ANote' in the drum map. -Examples: The GS and XG instruments' - Drum controllers. - Младший байт midi-контроллера. -Если младший байт "*", тогда контроллер является -"контроллером ударных". Для треков ударных и -GS/XG типов проектов и инструментов. -Разрешает контроллеры для каждого инструмента в -карте ударных MusE. Младший байт будет -заменен "ANote" в карте ударных. -Примеры: Контроллеры ударных для GS и XG -инструментов. - - - - * - wild card - * - -универсальный шаблон - - - - Range: - Диапазон: - - - - Minimum value. If negative, auto-translate. - Минимальное значение. Если отрицательное, то авто-перевод. - - - - Minimum value. If the minimum value - is negative, the range will automatically - be translated to a positive range. - -Useful for controllers which should be - displayed with zero bias. For example, -'Pan': Minimum: -64 Maximum: 63 -True range: Min: 0 Max: 127 (bias = 64) -'CoarseTuning': Min: -24 Max: 23 -True range: Min: 40 Max: 87 (bias = 64) - -Bias is determined from controller type: -7-bit Controller7 / RPN: Bias = 64 -14-bit Controller14 / RPN14: Bias = 8192 - -Type 'Pitch' is the exception. It is biased - at zero, even with a negative minimum: -'Pitch': Min: -8192 Max: 8191 -True range: Min: -8192 Max: 8191 (bias 0) - Минимальное значение. Если минимальное -значение отрицательное, то диапазон -автоматически переводится в положительный. - -Полезно для контроллеров отображаемых -с нулевым смещением. Например, "Пан": -Минимум: -64 Максимум: 63 Реальный диапазон: -Мин: 0 Макс: 127 (смещение = 64) -"Грубая настройка": Мин: -24 Макс: 23 -Реальный диапазон: Мин: 40 Макс: 87 (смещение = 64) - -Контроллер "Высота тона" является исключением. -Его смещение равно нулю, даже при отрицательных -значениях. "Высота тона" Мин: -8192 Макс: 8191 -Реальный диапазон: Мин: -8192 Макс:8191 (смещение = 0) - - - - - Maximum value - Максимальное значение - - - - Default: - По умолчанию: - - - - L-Bank - L-банк - - - - - - - - off - выкл - - - - Progr. - Прогр. - - - - ??? - ??? - - - - H-Bank - H-банк - - - - Default value. Off: No default. - Значение по умолчанию. Выкл: Нет значения по умолчанию. - - - - Default (initial) value. Off means no default. - -If a default value is chosen, the value will be sent - to the controller when the controller is added to - the song (in piano roll or event editor). When - the song is re-loaded, the value is sent again. -Otherwise the controller remains at its last value. -Controllers are also automatically added to a - song upon reception of a midi controller event. - -Caution! Watch out for controllers such as - 'Sustain' and 'ResetAllController' with default - values. You should probably turn 'off' their - default (in piano roll or drum edit, and - instrument editor). - Значение по умолчанию (начальное). Выкл означает, -что значения по умолчанию нет. - -Если выбрано "по умолчанию", то значение будет -послано контроллеру, когда он будет добавлен в проект -(в пианоролле или редакторе списка). При перезагрузке -проекта значение будет послано снова. Или же будет -применено последнее значение контроллера. Контроллеры -также автоматически добавляются в проект при получении -midi-сообщений о контроллерах. - -Внимание! Будте осторожны с такими контроллерами как -"Sustain" и "ResetAllController". Вероятнее всего, что вы назначите -"выкл" для этих контроллеров (в пианоролле, редакторе ударных -или редакторе инструментов). - - - - off - dont care - выкл - - - - Add common controller - Добавить обычный контроллер - - - - &Add - &Добавить - - - - Alt+A - Alt+A - - - - Delete controller - Удалить контроллер - - - - Create a new controller - Добавить новый контроллер - - - - New &Controller - Новый &Контроллер - - - - Alt+C - Alt+C - - - - Null Param Hi: - Нулевой Парам Ст: - - - - Null parameter number High byte - Старший байт нулевого параметра - - - - - If set, these 'null' parameter numbers will - be sent after each RPN/NRPN event. -This prevents subsequent 'data' events - from corrupting the RPN/NRPN controller. -Typically, set to 127/127, or an unused - RPN/NRPN controller number. - Если установлено, то это значение "нулевого" -параметра будет послано после каждого -события RPN/NRPN. Это предотвращает искажение -"данных" последующих событий контроллером RPN/NRPN. -Обычно, устанавливается 127/127, или "не использовать". - - - - Lo: - Мл: - - - - Null parameter number Low byte - Младший байт нулевого параметра - - - - S&ysEx - S&ysEx - - - - SysEx List: - Список SysEx: - - - - New SysE&x - Новый SysE&x - - - - Alt+X - Alt+X - - - - &Help - &Помощь - - - - - new item - новый пункт - - - - - What's this? - Что это? - - - - EditMetaDialog - - MusE: Enter Meta Event - MusE: Ввести метасобытие - - - Time Position - Позиция по времени - - - Meta Type - Метатип - - - Enter Hex - Ввести Hex - - - - EditMetaDialogBase - - MusE: Enter Meta Event - MusE: Ввести метасобытие - - - OK - ОК - - - Cancel - Отмена - - - TextLabel1 - ТекстоваяМетка1 - - - Time Position: - Позиция по времени: - - - Meta Type: - Метатип: - - - Enter Hex - Ввести Hex - - - - EditNoteDialogBase - - - MusE: Enter Note - MusE: Ввести ноту - - - - OK - ОК - - - - Cancel - Отмена - - - - Length: - Длина: - - - - Time Position: - Позиция по времени: - - - - Pitch: - Высота тона: - - - - Velocity On: - Скорость наж: - - - - Velocity Off: - Скорость снятия: - - - - EditPAfterDialog - - MusE: Enter Poly Aftertouch - MusE: Ввести полиф. посленажатие - - - Time Position - Позиция по времени - - - Pitch - Высота тона - - - Pressure - Давление - - - - EditSysexDialogBase - - - MusE: Enter SysEx - MusE: Ввести SysEx - - - - TimePosition: - Время: - - - - Comment: - Комментарий: - - - - OK - ОК - - - - Cancel - Отмена - - - - EditToolBar - - Edit Tools - Инструменты редактирования - - - - EffectRack - - effect rack - рэк эффектов - - - move up - сдвинуть выше - - - move down - сдвинуть ниже - - - remove - удалить - - - bypass - обойти - - - show gui - показать ГИП - - - new - новый - - - change - изменить - - - Replace effect - Заменить эффект - - - Do you really want to replace the effect %1? - Вы действительно хотите заменить эффект %1? - - - &Yes - &Да - - - &No - &Нет - - - show native gui - показать ГИП - - - save preset - сохранить пресет - - - MusE: Save Preset - MusE: Сохранить Пресет - - - - FLUIDGui - - - FLUID: open Soundfile - FLUID: открыть звуковой файл - - - - FLUIDGuiBase - - - Form1 - Форма1 - - - - Soundfont - Soundfont - - - - Load - Загрузить - - - - FLUIDSynthGuiBase - - - FLUID Synth - FLUID Synth - - - - Gain - Усиление - - - - - Level - Уровень - - - - Width - Ширина - - - - Damping - Демпфирование - - - - Room Size - Размер помещения - - - - Reverb - Реверб - - - - Delete - Удалить - - - - Load - Загрузить - - - - Sine - Синусоида - - - - Triangle - Треугольная - - - - Type - Тип - - - - Number - Число - - - - Speed - Скорость - - - - Depth - Глубина - - - - Chorus - Хорус - - - - CHANNEL SETUP - НАСТРОЙКА КАНАЛА - - - - ID - ID - - - - Fontname - Назв. SF-банка - - - - Chnl - Канал - - - - Soundfont - Банк - - - - LOADED SOUNDFONTS - ЗАГРУЖЕННЫЕ БАНКИ - - - - Dump Info - Дамп Инфо - - - - Drum Chnl - Канал ударных - - - - FileDialogButtons - - Form1 - Форма1 - - - - Global - Общий - - - - User - Пользователь - - - - - Project - Проект - - - Load: - Загрузить: - - - Songdata + -Cofiguration - Данные проекта+ -Конфигурация - - - - only -Songdata - Только -Данные проекта - - - - fdialogbuttons - КнопкиДиалогаФайлов - - - - Songdata + -Configuration - ДанныеПроекта+ -Конфигурация - - - - FluidSynthGui - - - Choose soundfont - Выберите soundfont - - - - FontSel - - Size: - Размер: - - - - GateTimeBase - - MusE: Modify Gate Time - MusE: Изменить время звучания - - - - Range - Диапазон - - - - All Events - Все события - - - - Selected Events - Выбранные события - - - - Looped Events - События в цикле - - - Selected & Looped - Выбранные и в цикле - - - - MusE: Modify Note Length - - - - - Selected Looped - - - - - Values - Значения - - - - Rate: - Величина: - - - - Offset: - Смещение: - - - - % - % - - - - lenNew = (lenOld * rate) + offset - - - - - OK - ОК - - - - Cancel - Отмена - - - - GlobalSettingsDialogBase - - - MusE: Global Settings - MusE: Общие настройки - - - - Use project save dialog - - - - - Some popup menus stay open (else hold Ctrl) - - - - - Allows some popup menus to stay open. -Otherwise, hold Ctrl to keep them open. - - - - - In some areas, the middle mouse button decreases -values, while the right button increases. Users without a -middle mouse button can select this option to make the -left button behave like the middle button in such areas. - - - - - Use left mouse button for decreasing values - - - - - Shift + Right click sets left range marker - - - - - Allow adding hidden tracks in track list menu - - - - - Unhide tracks when adding hidden tracks - - - - - GUI Style - - - - - MDI-subwindowness and sharing menus - - - - - Presets: - - - - - traditional MusE SDI - - - - - Cakewalk-like MDI - - - - - Borland-/Mac-like MDI - - - - - &Apply - &Применить - - - - &Ok - &ОК - - - - &Cancel - &Отмена - - - - Audio - Аудио - - - - Mixer - Микшер - - - - - dB - Дб - - - - min. Meter Value - мин. значение индикатора - - - min.Slider Val - мин. значение ползунка - - - - Midi - Midi - - - - Ticks - Тактовые импульсы (тики) - - - - - - 1024 - 1024 - - - - - - 2048 - 2048 - - - - 4096 - 4096 - - - 8172 - 8172 - - - - Displayed Resolution -(Ticks/Quarternote) - Отображаемое разрешение -(Тиков/на четверть) - - - - - 48 - 48 - - - - - 96 - 96 - - - - - 192 - 192 - - - - - 384 - 384 - - - - - 768 - 768 - - - - - 1536 - 1536 - - - - - 3072 - 3072 - - - - - 6144 - 6144 - - - - - 12288 - 12288 - - - - RTC Resolution -(Ticks/Sec) - RTC-разрешение -(тиков/в сек) - - - GUI - ГИП - - - Help Browser: - В чём читать справку: - - - - GUI Refresh Rate - Частота обновления ГИП - - - - /sec - /сек - - - - Application - Приложение - - - - Start Muse - Запустить Muse - - - - start with last song - запустить с последним проектом - - - - start with song - запустить с проектом - - - - start song: - запустить проект: - - - - Views - Виды - - - - - - - - y-pos - y-поз. - - - - - - - show - показать - - - - - - - - x-pos - x-поз. - - - - - - - height - высота - - - - - - - width - ширина - - - - Big Time - Хронометр - - - Arranger - Компоновщик - - - - Transport - Транспорт - - - - - - - - Cur - Тек - - - - - - - - set current values - установить текущее значение - - - - start with template: default.med - начать с шаблона: default.med - - - - show splash screen - показывать заставку - - - - External Waveditor - Внешний аудиоредактор - - - - External Waveditor command - Команда вызова внешнего аудиоредактора - - - - Mixer A - Микшер А - - - - Mixer B - Микшер В - - - - show "Did you know?" dialog - показывать окно "Знаете ли вы?" - - - - Start song - Запустить проект - - - - min. Slider Val - мин. значение слайдера - - - Use Jack freewheel mode if possible. -(Speeds up bounce operations). - Использовать Jack freewheel mode, если возможно. -(Ускоряет операции сведения). - - - - Enable denormal protection - Разрешить защиту от нарушений режима - - - - Enable output limiter - Разрешить ограничитель выхода - - - Enable in-place processing for VST plugins. -(Requires restart.) - Разрешить быструю обработку для VST-плагинов. -(Требуется перезагрузка.) - - - Turn this off if VST Ladspa effect rack plugins do not work or feedback loudly, even if they are supposed to be in-place capable. - Отключите, если VST Ladspa-плагины в рэке эффектов не работают или слишком громко звучат, даже если они, предположительно, могут быть быстро обработаны. - - - - Note: External editor opened from the internal editor. - Примечание: Внешний редактор открывается из внутреннего редактора. - - - - Dummy Audio Driver (settings require restart) - Фиктивный Аудио Драйвер (требует перезагрузки) - - - Preferred sample rate - Предпочитаемый sample rate (скорость измерения аудиосэмплов) - - - Actual rate used depends on limitations of - timer used. If a high rate timer is available, - short periods can be used with high sample rates. -Period affects midi playback resolution. -Shorter periods are desirable. - Реальный sample rate зависит от ограничений таймера, -который используется. Если используется таймер с -высоким sample rate, то могут применяться более короткие -периоды (отсчеты). Периоды (отсчеты) влияют на midi-воспроизведение. -Желательны более короткие периоды. - - - - Hz - Гц - - - Actual rate used now (dummy or not): - Реальный "sample rate" (фиктивный или нет): - - - --- - --- - - - - Period size (Frames per period): - Размер периода (Фреймов на период): - - - - - 16 - 16 - - - - Project directory - - - - - Projects: - - - - - ... - ... - - - - Main Window - - - - - Try to use Jack Freewheel - - - - - Speeds bounce operations - - - - - Use Jack Freewheel mode if possible. -This dramatically speeds bounce operations. - - - - - VST in-place - - - - - Enable VST in-place processing (restart required) - - - - - Enable VST in-place processing. Turn this off if - VST Ladspa effect rack plugins do not work or - feedback loudly, even if they are supposed to - be in-place capable. Setting requires a restart. - - - - - Minimum control period - - - - - Minimum audio controller process period (samples). - - - - - - Minimum audio controller process period (samples). -Adjusts responsiveness of audio controls and - controller graphs. Set a low value for fast, smooth - control. If it causes performance problems, set a - higher value. - - - - - 1 - 1 - - - - 2 - 2 - - - - 4 - 4 - - - - 8 - 8 - - - - - 32 - 32 - - - - - 64 - 64 - - - - - 128 - 128 - - - - - 256 - 256 - - - - - 512 - 512 - - - - Sample rate - - - - - Shorter periods give better midi playback resolution. - - - - - 8192 - 8192 - - - - 16384 - 16384 - - - - 32768 - 32768 - - - - Midi Resolution -(Ticks/Quarternote) - Midi-Разрешение -(Тиков/На четвертную ноту) - - - - GUI Behaviour - - - - - Use old-style stop shortcut: - Использовать старую "горячую клавишу" для остановки: - - - - Move single armed track with selection - Назначать "для записи" выбранный трек - - - - On Launch - - - - - Behavior - - - - - LMaster - - MusE: Mastertrack - MusE: Мастер-трек - - - Tempo - Темп - - - Timesig - Размер - - - new tempo - новый темп - - - new signature - новый размер - - - Meter - Индикатор - - - Time - Время - - - Type - Тип - - - Value - Значение - - - &Edit - &Правка - - - Insert Tempo - Вставить темп - - - Insert Signature - Вставить размер - - - Edit Positon - Изменить позицию - - - Edit Value - Изменить значение - - - Delete Event - Удалить событие - - - panic - паника - - - transport - транспорт - - - Reposition of the initial tempo and signature events is not allowed - Изменение начального темпа и размера запрещено - - - MusE: List Editor - MusE: Редактор списка событий - - - Input error, conversion not OK or value out of range - Ошибка ввода, неверная конверсия или значение вне диапазона - - - Reposition of tempo and signature events to start position is not allowed! - Изменение темпа и размера запрещено - - - Master tools - Основные инструменты - - - Edit tools - Инструменты редактирования - - - - LegatoBase - - - MusE: Legato - - - - - Range - Диапазон - - - - All Events - - - - - Selected Events - - - - - Looped Events - - - - - Selected Looped - - - - - Settings - Настройки - - - - ticks - - - - - Minimum Length - - - - - Allow shortening notes - - - - - OK - - - - - Cancel - Отмена - - - - ListEdit - - Insert Note - Вставить ноту - - - insert Note - вставить Ноту - - - Insert SysEx - Вставить SysEx - - - insert SysEx - вставить SysEx - - - Insert Ctrl - Вставить кнтрл - - - insert Ctrl - Вставить кнтрл - - - Insert Meta - Вставить Meta - - - insert Meta - вставить Meta - - - Insert Channel Aftertouch - Вставить Channel Aftertouch - - - insert Channel Aftertouch - вставить Channel Aftertouch - - - Insert Key Aftertouch - Вставить Key Aftertouch - - - insert Poly Aftertouch - вставить Poly Aftertouch - - - &Edit - &Правка - - - Cut - Вырезать - - - Copy - Скопировать - - - Paste - Вставить - - - Delete Events - Удалить события - - - List Tools - Показать список инструментов - - - Insert Tools - Вставить инструменты - - - Tick - Тик - - - Bar - Такт - - - Typ - Тип - - - Ch - Кан - - - Val A - Знач. А - - - Val B - Знач. B - - - Val C - Знач. С - - - Len - Дл - - - Comment - Комментарий - - - List tools - Инструменты редактора списка - - - Insert tools - Инструменты для вставки - - - panic - паника - - - transport - транспорт - - - Type - Тип - - - - MITTransposeBase - - - MusE: Midi Input Plugin: Transpose - MusE: Midi-плагин на входе: Транспонирование - - - - On - Вкл - - - - TriggerKey - Кнопка запуска - - - - Transpose: - Транспонировать: - - - - +0 - +0 - - - - MPConfig - - none - ничего - - - Port - Порт - - - GUI - ГИП - - - Instrument - Инструмент - - - Device Name - Имя устройства - - - State - Состояние - - - unknown - неизвестно - - - I - Вх - - - O - Вых - - - MusE: bad device name - MusE: неверное имя устройства - - - please choose a unique device name - пожалуйста выберите неповторяющееся имя для устройства - - - in - в - - - out - вне (из) - - - Show first aliases - Показать первые псевдонимы - - - Show second aliases - Показать вторые псевдонимы - - - Create - Создать - - - device - устройство - - - Port Number - Номер порта - - - Enable gui - Разрешить ГИП - - - Enable reading - Разрешить чтение - - - Enable writing - Разрешить запись - - - Port instrument - Инструмент, назначенный на порт - - - Midi device name. Click to edit (Jack) - Имя midi-устройства. Щелкните для редактирования (Jack) - - - Connections from Jack Midi outputs - Соединения от midi-выходов Jack - - - Connections to Jack Midi inputs - Соединения к midi-входам Jack - - - Connect these to new midi tracks - Подсоединить к новым midi-трекам - - - Connect new midi tracks to this (first listed only) - Подсоединять новые midi-треки сюда (только к первому в списке) - - - Device state - Состояние устройства - - - Enable gui for device - Разрешить ГИП для устройства - - - Enable reading from device - Разрешить чтение с устройства - - - Enable writing to device - Разрешить запись на устройство - - - Name of the midi device associated with this port number. Click to edit Jack midi name. - Имя midi-устройства связано с номером порта "Jack". Щелкните, чтобы редактировать его. - - - Instrument connected to port - Инструмент, подсоединённый к порту - - - Connections from Jack Midi output ports - Соединения от выходных midi-портов Jack - - - Connections to Jack Midi input ports - Соединения с входными midi-портами Jack - - - Connect these channels, on this port, to new midi tracks. -Example: - 1 2 3 channel 1 2 and 3 - 1-3 same - 1-3 5 channel 1 2 3 and 5 - all all channels - none no channels - Соединить каналы этого порта с новыми midi-треками. -Пример: -1 2 3 каналы 1 2 и 3 -1-3 то же самое -1-3 5 каналы 1 2 3 и 5 -все все каналы -ничего нет каналов - - - Connect new midi tracks to these channels, on this port. -See default in channels. -NOTE: Currently only one output port and channel supported (first found) - Соединить новые midi-треки с этими каналами данного порта. -См. вх. каналы по умолчанию -Примечание: Пока поддерживается только один порт и канал -(первый найденный) - - - State: result of opening the device - Состояние: результат открытия устройства - - - In routes - Маршруты входа - - - Out routes - Маршруты выхода - - - Def in ch - вх кан по ум - - - Def out ch - вых кан по ум - - - <unknown> - <неизвестно> - - - <none> - <ничего> - - - - MRConfigBase - - - MusE: Midi Input Plugin: Remote Control - MusE: Входной MIDI-плагин: Дистанц. управление - - - - Activate - Активировать - - - - On - Вкл - - - - Actions - Действия - - - - Stop - Остановить - - - - Record - Записать - - - - Goto Left Mark - Перейти к левому маркеру - - - - Play - Воспроизвести - - - - Insert rest (step rec) - - - - - MTScale - - bar scale - шкала тактов - - - - MarkerView - - MusE: Marker - MusE: Маркер - - - add marker - добавить маркер - - - Add Marker - Добавить Маркер - - - delete marker - удалить маркер - - - Delete Marker - Удалить Маркер - - - &File - &Файл - - - &Edit - &Правка - - - panic - паника - - - transport - транспорт - - - Bar:Beat:Tick - Такт:Доля:Тик - - - Hr:Mn:Sc:Fr:Sf - Чс:Мин:Сек:Фрм:Субфрм - - - Lock - Закрыть - - - Text - Текст - - - Marker Properties - Свойства маркера - - - marker-tools - инструменты маркера - - - edit tools - инструменты редактирования - - - - MasterEdit - - MusE: Mastertrack - MusE: Мастер-трек - - - edit tools - инструменты редактирования - - - EnableMaster - Разрешить(Мастер) - - - Info - Инфо - - - Cursor - Курсор - - - Off - выкл - - - Snap - Привязка - - - time at cursor position - время в позиции курсора - - - panic - паника - - - transport - транспорт - - - tempo at cursor position - темп в позиции курсора - - - CurPos - КурсПоз - - - tempo at current position - темп в текущей позиции - - - time signature at current position - размер в текущей позиции - - - Enable - Разрешить - - - Enable usage of master track - Разрешить использование мастер-трека - - - Master tools - Основные инструменты - - - Enable master - Разрешить мастер(а) - - - - MdiSettingsBase - - - Form - - - - - GroupBox - - - - - MDI subwin - - - - - Shares menu when subwin - - - - - Shares menu when free - - - - - MetronomeConfigBase - - - MusE: Metronome Config - MusE: Настройка метронома - - - - Metronome - Метроном - - - - Audio Beep - Звуковой сигнал - - - - MIDI Click - MIDI-щелчок - - - - Midi Channel - MIDI-канал - - - - Measure Note - Нота на первую долю такта - - - - Measure Velocity - Громкость первой доли такта - - - - Beat Velocity - Громкость слабых долей такта - - - - Beat Note - Нота на слабые доли такта - - - - Midi Port - MIDI-порт - - - - Precount - Предварительный отсчет - - - - enable - разрешить - - - - Bars - Такт(ов) - - - - From Mastertrack - Из Мастер-трека - - - - / - / - - - - Signature - Размер - - - - Prerecord - Предзапись - - - - Preroll - Предвоспроизведение - - - - &Apply - &Применить - - - - &OK - &ОК - - - - &Cancel - &Отмена - - - - Choose outputs... - Выбрать выходы... - - - - 50 - 50 - - - - % Audio volume - % Громкость аудио - - - - Hint: Enable metronome in Transportpanel - Подсказка: Активируйте метроном на Транспортной панели - - - - Alt+A - Alt+A - - - - Alt+O - Alt+O - - - - Alt+C - Alt+C - - - - MidiController - - Velocity - Скорость нажатия ноты - - - - MidiControllerEditDialogBase - - MusE: Define Midi Controller - MusE: Назначить MIDI-контроллер - - - Name - Имя - - - Type - Тип - - - H-Ctrl - H-Ctrl - - - L-Ctrl - L-Ctrl - - - Min Val - Мин знач - - - Max Val - Макс знач - - - list of defined controllers - Список назначенных контроллеров - - - This is the MusE list of defined controllers. - Это список назначенных в MusE контроллеров. - - - Properties - Свойства - - - Name - Имя - - - Max Value - Макс значение - - - Min Value - Мин значение - - - Control7 - Контрл7 - - - Control14 - Контрл14 - - - RPN - RPN - - - NRPN - NRPN - - - Type - Тип - - - create new entry - Создать новую запись - - - pressing the New button you create a new entry -in the MusE list of defined controllers - По нажатию кнопки "Новая" создаётся новая -запись в список назначенных в MusE контроллеров - - - &Delete - &Удалить - - - delete selected entry - Удалить выделенную запись - - - &OK - &OK - - - &Cancel - &Отмена - - - &Add - &Добавить - - - Alt+A - Alt+A - - - Predefined Controller: - Уже назначенный контроллер: - - - Managed Controller for Port - Настроенный контроллер для порта - - - Channel - Канал - - - This is a list of commonly used midi controllers. -Note that in MusE pitch and program changes are -handled like normal controllers. - Это список общеупотребительных midi-контроллеров. -Обратите внимание, что управление высотой тона(pitch) и изменением программ(program change) в MusE, -такое же, как и управление обычными контроллерами. - - - RPN14 - RPN14 - - - NRPN14 - NRPN14 - - - Pitch - Высота тона - - - Program - Программа - - - Midi Controller Number High Byte - Значение Старшего Байта Midi-контроллера - - - Midi Controller Number Low Byte - Значение Младшего Байта Midi-контроллера - - - Range - Диапазон - - - - MidiFilterConfigBase - - - MusE: Midi Input Filter - MusE: Фильтр входящих Midi-событий - - - - Record Filter - Фильтр записи - - - - - Note On - Нажатие ноты - - - - - Poly Pressure - Полифоническое давление - - - - - Controller - Контроллер - - - - - Program Change - Смена программы - - - - - After Touch - Посленажатие - - - - - Pitch Bend - Изменение высоты тона - - - - - Sysex - SysEx - - - - Thru Filter - Фильтр сквозного канала - - - - Controller Filter - Фильтр контроллеров - - - - Channel Filter - Фильтр каналов - - - - 14 - 14 - - - - 10 - 10 - - - - 6 - 6 - - - - 12 - 12 - - - - 4 - 4 - - - - 2 - 2 - - - - 9 - 9 - - - - 8 - 8 - - - - 3 - 3 - - - - 13 - 13 - - - - 15 - 15 - - - - 16 - 16 - - - - 7 - 7 - - - - 11 - 11 - - - - 5 - 5 - - - - 1 - 1 - - - - MidiInputTransformDialog - - New - Новый - - - - MidiInputTransformDialogBase - - - MusE: Midi Input Transformator - MusE: Преобразователь входящих MIDI-сообщений - - - - Filter - Фильтр - - - - All - Все - - - - - - - - Equal - Равно - - - - - - - - Unequal - Не равно - - - - Note - Нота - - - - - Poly Pressure - Полифоническое давление - - - - - Control Change - Смена контроллера - - - - - Aftertouch - Посленажатие - - - - - Pitch Bend - Изменение высоты тона - - - - - NRPN - NRPN - - - - - RPN - RPN - - - - - - Value 2 - Значение 2 - - - - - - - - Value 1 - Значение 1 - - - - - Event Type - Тип события - - - - - - - Ignore - Игнорировать - - - - - - - Higher - Выше - - - - - - - Lower - Ниже - - - - - - - Inside - Внутри - - - - - - - Outside - Вне - - - - - Channel - Канал - - - - - Port - Порт - - - - Processing - Обработка - - - - - - - - Keep - Сохранить - - - - - - - - Fix - Исправить - - - - - - - Plus - Плюс - - - - - - - Minus - Минус - - - - - - - Multiply - Умножить - - - - - - - Divide - Разделить - - - - - - - Invert - Инвертировать - - - - ScaleMap - Шкала - - - - Flip - Обратить - - - - - - - Dyn - Дин - - - - - - - Random - Случайно - - - - Modules - Модули - - - - 1 - 1 - - - - 2 - 2 - - - - 3 - 3 - - - - 4 - 4 - - - - enable modul 1 - разрешить модуль 1 - - - - enable modul 2 - разрешить модуль 2 - - - - enable modul 3 - разрешить модуль 3 - - - - enable modul 4 - разрешить модуль 4 - - - - Preset - Пресет - - - - Name: - Имя: - - - - Comment: - Комментарий: - - - - Function - Функция - - - - &New - &Новый - - - - create new preset - создать новый пресет - - - - &Delete - &Удалить - - - - delete preset - удалить пресет - - - - &Dismiss - &Отклонить - - - - PresetList - Список пресетов - - - - MidiPortRouteBase - - MusE: Midi Port Routing - MusE: маршруты MIDI-портов - - - Port 2 - Порт 2 - - - Output - Выход - - - Input - Вход - - - - MidiStrip - - VariationSend - Вариационный посыл - - - Var - Вар - - - ReverbSend - Посыл Реверберации - - - Rev - Ревер - - - ChorusSend - Посыл Хоруса - - - Cho - Хорус - - - off - выкл - - - dB - Дб - - - Pan/Balance - Пан/Баланс - - - Pan - Пан - - - record - запись - - - mute - заглушить - - - pre fader listening - прослушивание пре федера - - - Route - Маршрут - - - set routing - настроить маршрут - - - Off - Выкл - - - Read - Читать - - - Touch - По касанию - - - Write - Писать - - - automation type - тип автоматизации - - - double click on/off - двойной щелчок вкл/выкл - - - solo mode - режим соло - - - iR - вх - - - input routing - маршрут входа - - - oR - вых - - - output routing - маршрут выхода - - - - MidiSyncConfig - - Port Number - Номер порта - - - Name of the midi device associated with this port number - Имя MIDI-устройства, ассоциированного с номером этого порта - - - Midi clock input detected - Обнаружен вход midi-clock - - - Midi tick input detected - Обнаружен вход midi-тика - - - Midi real time input detected - Обнаружен midi-вход реального времени - - - MMC input detected - Обнаружен вход MMC - - - MTC input detected - Обнаружен вход MTC - - - Detected SMPTE format - Обнаруженые SMPTE форматы - - - Receive id number. 127 = Global. Double click to edit. - Получить id номер. 127 = Глобально. Двойной щелчок для редактирования. - - - Accept midi clock input - Принять вход Midi-clock - - - Accept midi real time input - Принять midi-вход реального времени - - - Accept MMC input - Принять вход MMC - - - Accept MTC input - Принять вход MTC - - - Receive start rewinds before playing - Получить перед воспроизведением сообщение о начале перемотки - - - Transmit id number. 127 = Global. Double click to edit. - Передать номер id. 127 = Общий. Двойной щелчок для редактирования. - - - Send midi clock output - Послать выход midi-clock - - - Send midi realtime output - Послать midi-выход реального времени - - - Send MMC output - Послать выход MMC - - - Send MTC output - Послать выход MTC - - - Midi clock input detected. -Current port actually used is red. -Click to force a port to be used. - Обнаружен вход midi-clock. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -использовать порт. - - - Midi realtime input detected, including - start/stop/continue, and song position. - Обнаружен midi-вход реального времени, -с "старт/стоп/продолжить" и позицией проекта. - - - MMC input detected, including stop/play/deferred play, and locate. - Обнаружен MMC-вход c "старт/стоп/отложенное воспроизведение" - и локацией. - - - MTC input detected, including forward quarter-frame sync and full-frame locate. -Current port actually used is red. Click to force a port to be current. - Обнаружен MTC-вход, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -сделать порт текущим. - - - Detected SMPTE format: 24fps, 25fps, 30fps drop frame, or 30fps non-drop -Detects format of MTC quarter and full frame, and MMC locate. - Обнаруженые форматы SMPTE: 24fps, 25fps, 30fps с пропущенным -фреймом, или 30fps без пропущенного фрейма -Обнаруживает MTC-формат четверть и полно-фреймовый, и MMC локацию. - - - Receive id number. 127 = global receive all, even if not global. - Получить номер id. 127 =глобальный получает все, даже если не глобальный. - - - Accept midi clock input. Only one input is used for clock. -Auto-acquire: If two or more port realtime inputs are enabled, - the first clock detected is used, until clock is lost, - then another can take over. Best if each turns off its clock - at stop, so MusE can re-acquire the clock from another port. -Click on detect indicator to force another. - Принять вход midi-clock. Только один вход используется для "clock". -Авто-получение: если разрешены два или более входов реального времени на порт, то будут использован первый обнаруженный "clock", пока он не будет потерян, затем будет использован другой. Самое лучшее, если каждый отключит свой "clock" во время остановки, чтобы MusE снова получил "clock" с другого порта. Щелкните по индикатору обнаружения, чтобы сделать по другому. - - - Accept midi realtime input, including - start/stop/continue, and song position. -Non-clock events (start,stop etc) are - accepted by ALL enabled ports. -This means you may have several master - devices connected, and muse will accept - input from them. - Принять midi-вход реального времени -с "старт/стоп/продолжить" и позицией проекта. -События "Non-clock" (старт, стоп, и т. п.) принимаются -ВСЕМИ разрешенными портами. Это означает, что вы -можете иметь несколько подсоединенных мастер-устройств, -и MusE примет вход от них. - - - Accept MMC input, including stop/play/deferred play, and locate. - Принять вход MMC, с "стоп/старт/отложенным воспроизведением" и локацией. - - - Accept MTC input, including forward quarter-frame sync and full-frame locate. -See 'rc' column for more help. - Принять вход MTC, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -См. колонку "rc" для получения помощи. - - - When start is received, rewind before playing. -Note: It may be impossible to rewind fast - enough to synchronize with the external device. - Когда сообщение "старт" получено, перемотать перед -воспроизведением. Примечание: может быть -так, что перемотка окажется недостаточно быстрой -для синхронизации с внешним устройством. - - - Transmit id number. 127 = global transmit to all. - Передавать номер id. 127 =общая передача для всех. - - - Send midi clock output. If 'Slave to External Sync' is chosen, - muse can re-transmit clock to any other chosen ports. - Посылать выход midi-clock. Если выбрано "Slave to External Sync", -то MusE может снова передать "clock" на любой другой выбранный порт. - - - Send midi realtime output, including start/stop/continue, - and song position. If 'Slave to external sync' is chosen, - muse can re-transmit midi realtime input messages to any - other chosen ports. This means you may have several slave - devices connected, and muse can re-send realtime messages - to any or all of them. - Послать midi-выход реального времени, с "старт/стоп/продолжить" -и позицией проекта. Если выбрано "Slave to External Sync", -то MusE может снова передать сообщения с midi-входа реального -времени на любой другой выбранный порт. Это значит, что вы можете -иметь несколько присоединенных ведомых устройств, и MusE может снова послать сообщения реального времени на любое из них или на все. - - - Port - Порт - - - Device Name - Имя устройства - - - c - c - - - k - k - - - r - r - - - m - m - - - t - t - - - type - тип - - - rid - rid - - - rc - rc - - - rr - rr - - - rm - rm - - - rt - rt - - - rw - rw - - - tid - tid - - - tc - tc - - - tr - tr - - - tm - tm - - - tt - tt - - - MusE - MusE - - - Settings have changed -Apply sync settings? - Настройки изменились -Применить настройки синхронизации? - - - &Apply - &Применить - - - &No - &Нет - - - &Abort - &Отмена - - - <none> - <ничего> - - - - MidiSyncConfigBase - - - MusE: Midi Sync - MusE: MIDI-синхр. - - - Sync Mode - Режим синхр. - - - Master - Мастер - - - Slave - Подчиненный - - - Sync Source - Источник синхр. - - - accept MTC - принять MTC - - - accept Midi Clock - принять MIDI Clock - - - accept MMC - принять MMC - - - Id: - Id: - - - device id - id устройства - - - Port: - Порт: - - - all - все - - - midi port - midi-порт - - - Sync Gen - Генератор синхроимпульсов - - - Midi Time Code (MTC) - Midi Time Code (MTC) - - - Midi Clock - MIDI Время - - - Midi Machine Control (MMC) - Midi Machine Control (MMC) - - - - Apply - Применить - - - - Ok - ОК - - - - Cancel - Отмена - - - - MTC - MТC - - - - Type: - Тип: - - - - 24 - 24 - - - - 25 - 25 - - - - 30D - 30D - - - - 30N - 30N - - - - Offset: - Смещение: - - - - hour - часов - - - - h - ч - - - - minute - минут(а) - - - - m - м - - - - second - секунд(а) - - - - s - с - - - - frame - фреймов - - - - f - ф - - - - subframe - субфреймов - - - - Sync receiving and sending - Получение и отправление синхронизации - - - - Send and receive Jack transport - Отсылать и получать транспорт "Jack" - - - - Send and receive Jack transport information, - including stop, start and position. - Отсылать и получать информацию с транспорта -"Jack", стоп, старт, и позицию. - - - - Use Jack transport - Использовать транспорт "Jack" - - - - Make MusE the Jack transport Timebase Master - Сделать MusE Мастером Базы времени для транспорта "Jack" - - - - Make MusE the Jack transport Timebase Master. -Allows Jack to show time as - MusE Bars, Beats, and Ticks. -MusE will try to become master, but other - Jack clients can also take over later. -You can always click here again for Master. - Сделать MusE Мастером Базы времени для транспорта "Jack" -Позволяет "Jack" показывать время как в "MusE", -то есть Такты, Доли и Тики. MusE будет пытаться стать Мастером, -но другие клиенты могут позже взять верх. Вы должны каждый раз -щелкнуть здесь, чтобы MusE снова стал Мастером. - - - - Jack transport Timebase Master - Мастер Базы времени транспорта "Jack" - - - - Control MusE timing by external midi clock or MTC sync - Контролировать Muse через внешний midi-clock или MTC синхр - - - - When in slave mode, tempo is - controlled externally. -MusE can sync to midi clock, or MTC quarter frame sync. -Enabled inputs in the list will - be in effect (RMC, RMMC, RMTC). - В режиме ведомого темп контролируется -извне. MusE может синхр. с midi-clock, или с -четверть-фреймовой синхр. MTC. Разрешенные -входы в списке будут задействованы. (RMC, RMMC, RMTC). - - - - Slave to external sync - Ведомый для внешней синхронизации - - - - Send start to first clock delay - Посылать "старт" первой задержке "clock" - - - - Allows 'slow sync' devices time - to synchronize to MusE. This value is the - delay from sending start to sending - the first clock. - Позволяет "медленно синхр." устройствам -синхронизироваться с MusE. Это значение -является задержкой от посылки старта до -посылки первого "clock". - - - - ms - мс - - - - Send sync delay - Посылать синхр. задержку - - - - Note: Sync delay and MTC sync currently not fully implemeted - - - - - MidiTrackInfo - - <unknown> - <неизвестно> - - - - MidiTrackInfoBase - - - MusE: TrackInfo - MusE: ТрекИнфо - - - - output channel - канал выхода - - - all midi events are send to this output channel - все midi-события посылаются в этот канал выхода - - - Track Info - Трек Инфо - - - - - % - % - - - Track Name - Имя трека - - - - output port - порт выхода - - - - iR - вх - - - - - - - - - - off - выкл - - - change stereo position - изменить стереопозицию - - - OCh. - Вых.канал - - - ??? - ??? - - - select instrument patch - выбрать патч инструмента - - - - Transp. - Трансп. - - - Volume - Громкость - - - - Channel Info - Инфо о канале - - - - Rec: - - - - - Prog - - - - - Vol - Громк - - - - Pan - Пан - - - - Delay - Задержка - - - - H-Bank - H-банк - - - - Compr. - Компр. - - - - L-Bank - L-банк - - - Progr. - Прогр. - - - - Velocity - Скорость нажатия - - - - Length - Длина - - - input ports - порты входа - - - IChan. - Вх.канал - - - input channels - каналы входа - - - Events from all configured channels are -recorded to this track. -You can specify more than one channel for -recording: - 1 2 3 record from channel 1 2 and 3 - 1-3 same - 1-3 5 record from channel 1 2 3 and 5 - События со всех настроенных каналов -записываются в этот трек. -Вы можете указать несколько каналов для -записи: - 1 2 3 записывать с каналов 1, 2 и 3 - 1-3 то же самое - 1-3 5 записывать с каналов 1, 2, 3 и 5 - - - record: - Записать: - - - Rec - Зап - - - add settings to song - добавить настройки к проекту - - - Bank Select LSB - Выбор Банка LSB - - - Bank Select MSB - Выбор Банка MSB - - - - all midi events are sent to this output channel - все midi-события посланы на этот канал выхода - - - - Out ch - Вых кан - - - - input routing - маршрут входа - - - Inputs - Входы - - - - output routing - маршрут выхода - - - - oR - вых - - - - input detect - активность входа - - - - Input detect indicator. Detects all note on-off, controller, aftertouch, - program change, and pitchbend (but not sysex or realtime) events - on the selected channels, on the selected midi ports. - Индикатор активности входа. Обнаруживает ноты, контроллеры, смену программы, и изменение высоты тона (но не sysex или realtime) на -выделенных каналах выделенных midi-портов. - - - - W - W - - - - Midi thru - Сквозной midi-канал - - - - Pass input events through ('thru') to output. - Пропускать входные события через сквозной канал на выход. - - - - Select instrument patch - Выбрать патч инструмента - - - - <unknown> - <неизвестно> - - - Record: - Записать: - - - - Add all settings to song - Добавить все настройки к проекту - - - - All - Все - - - - Bank Select MSB. Double-click on/off. - Банк Выбрать MSB. Двойной щелчок вкл/выкл. - - - - Bank Select LSB. Double-click on/off. - Банк Выбрать LSB. Двойной щелчок вкл/выкл. - - - - Program. Double-click on/off. - Программа. Двойной щелчок вкл/выкл. - - - - Add bank + prog settings to song - Добавить банк и программу в проект - - - Prog. - Прог. - - - - Volume. Double-click on/off. - Громкость. Двойной щелчок вкл/выкл. - - - - Add vol setting to song - Добавить настройки громк. в проект - - - Vol. - Громк. - - - - - Change stereo position. Double-click on/off. - Изменить стерео позицию. Двойной щелчок вкл/выкл. - - - - Add pan setting to song - Добавить настройки панорамы к проекту - - - - MidiTransformDialogBase - - - MusE: Midi Transformator - MusE: Преобразователь MIDI-сообщений - - - - &New - &Новая - - - - &Delete - У&далить - - - - &Apply - &Применить - - - - &OK - &ОК - - - - &Cancel - &Отмена - - - - PresetList - Список пресетов - - - - Processing - Обработка - - - - - Event Type - Тип события - - - - - - - - Keep - Сохранить - - - - - - - Fix - Исправить - - - - - Note - Нота - - - - - Poly Pressure - Полифоническое нажатие - - - - - Control Change - Смена контроллера - - - - - Aftertouch - Посленажатие - - - - - Pitch Bend - Смена высоты тона - - - - - NRPN - NRPN - - - - - RPN - RPN - - - - - - - Plus - Плюс - - - - - - - Minus - Минус - - - - - - - Multiply - Умножить - - - - - - - Divide - Разделить - - - - - - Value 2 - Значение 2 - - - - - Invert - Инвертировать - - - - ScaleMap - Шкала - - - - Flip - Обратить - - - - - Dyn - Дин - - - - - Random - Случайно - - - - - - Value 1 - Значение 1 - - - - - Length - Длина - - - - Position - Позиция - - - - Filter - Фильтр - - - - All - Все - - - - - - - - Equal - Равные - - - - - - - - Unequal - Не равные - - - - - - - Ignore - Игнорировать - - - - - - - Higher - Выше - - - - - - - Lower - Ниже - - - - - - - Inside - Внутри - - - - - - - Outside - Вне - - - - Bar Range - Диапазон тактов - - - - Preset - Пресет - - - - Name: - Имя: - - - - Comment: - Комментарий: - - - - Range - Диапазон - - - - process all events - обработать все события - - - - selected tracks - выделенные треки - - - - inside loop - Внутри цикла - - - - Function - Функция - - - - Select - Выделить - - - - Quantize - Квантовать - - - - Delete - Удалить - - - - Transform - Преобразовать - - - - Insert - Вставить - - - - Copy - Скопировать - - - - Extract - Извлечь - - - - Quantize Value - Значение квантования - - - - MidiTransformerDialog - - New - Новый - - - - MixdownFileDialog - - Wave Files (*.wav);;All Files (*) - Файлы Wave (*.wav);;Все файлы (*) - - - - MixdownFileDialogBase - - - MusE: Set Mixdown Wavefile - MusE: Настроить параметры Wave-файла - - - - &OK - &OK - - - - &Cancel - О&тменить - - - - File Path - Путь к файлу - - - - Channel - Канал - - - - Stereo - Стерео - - - - Mono - Моно - - - - 5.1 - 5.1 - - - - wav,16 Bit - wav, 16 бит - - - - wav, 24 Bit - wav, 24 бита - - - - wav, 32 Bit (float) - wav, 32 бита (float) - - - - Format - Формат - - - - MoveBase - - - MusE: Move Notes - - - - - Range - Диапазон - - - - All Events - - - - - Selected Events - - - - - Looped Events - - - - - Selected Looped - - - - - Value - Значение - - - - Move by - - - - - ticks - - - - - OK - - - - - Cancel - Отмена - - - - MusE - - Import Wave File - Импортировать WAV-файл - - - UndoRedo - Отменить/Повторить - - - undo - отменить действие - - - Und&o - &Отменить действие - - - redo - повторить - - - Re&do - &Повторить - - - undo last change to song - отменить последнее изменение в проекте - - - redo last undo - повторить последнюю отмену - - - Transport - Транспорт - - - loop - цикл - - - Loop - Цикл - - - punchin - начало врезки - - - Punchin - Начало врезки - - - punchout - конец врезки - - - Punchout - Конец врезки - - - start - к началу - - - Start - К началу - - - rewind - перемотать назад - - - Rewind - Перемотать назад - - - forward - перемотать вперёд - - - Forward - Перемотать вперёд - - - stop - остановить - - - Stop - Остановить - - - play - воспроизвести - - - Play - Воспроизвести - - - record - записать - - - Record - Записать - - - panic - паника - - - Panic - Паника - - - new - новый - - - &New - &Новый - - - open - открыть - - - &Open - &Открыть - - - save - сохранить - - - &Save - &Сохранить - - - pianoroll - пианорол - - - Pianoroll - Пианоролл - - - File Buttons - Файловые кнопки - - - &File - &Файл - - - Open &Recent - Открыть &Недавние - - - Save &As - Сохранить &Как - - - Import Midifile - Импортировать MIDI-файл - - - Export Midifile - Экспортировать MIDI-файл - - - &Quit - Вы&йти - - - &Edit - &Правка - - - C&ut - &Вырезать - - - &Copy - С&копировать - - - &Paste - &Вставить - - - Add Track - Добавить трек - - - Select &All - Выделить &всё - - - &Deselect All - &Убрать выделение - - - Invert &Selection - Обратить в&ыделение - - - &Inside Loop - &Внутри цикла - - - &Outside Loop - &Вне цикла - - - All &Parts on Track - Все &партии в треке - - - Select - Выделить - - - Drums - Ударные - - - List - Список - - - Graphic - Графика - - - Mastertrack - Мастер-трек - - - Midi &Transform - &Преобразовать MIDI-сообщения - - - Modify Gate Time - Изменить время звучания - - - Modify Velocity - Изменить скорость нажима - - - Crescendo - Крещендо - - - Transpose - Транспонировать - - - Thin Out - Удалить дубли - - - Erase Event - Удалить событие - - - Note Shift - Сдвиг ноты - - - Move Clock - Передвинуть время - - - Copy Measure - Скопировать такт - - - Erase Measure - Стереть такт - - - Delete Measure - Удалить такт - - - Create Measure - Создать такт - - - Mix Track - Микшировать трек - - - Midi - Midi - - - &Structure - &Структура - - - Global Cut - Глобальное вырезание - - - Global Insert - Глобальная вставка - - - Global Split - Глобальное разделение - - - Copy Range - Скопировать диапазон - - - Cut Events - Вырезать события - - - Transport Panel - Панель транспорта - - - Bigtime Window - Окно хронометра - - - Don't Follow Song - не следовать за проектом - - - Follow Page - следовать постранично - - - Follow Continuous - следовать плавно - - - Global Settings - Общие настройки - - - Follow Song - следовать за проектом - - - Metronome - Метроном - - - Midi Sync - MIDI-синхр - - - Appearance Settings - Настройки вида - - - Midi Input Transform - Преобразование входящих MIDI-сообщений - - - Midi Input Filter - Фильтр входящих MIDI-событий - - - Midi Remote Control - Дистанционное управление MIDI - - - &Midi - &MIDI - - - Mixer - Микшер - - - Input Plugins - Плагины на входе - - - Reset Instr. - Перезагрузить Инстр. - - - Init Instr. - Запустить Инстр. - - - Local Off - откл. локальное управление - - - &Audio - &Аудио - - - Bounce to Track - Свести в трек - - - Bounce to File - Свести в файл - - - &Help - &Помощь - - - About&Qt - О &Qt - - - Unknown File Format - Неизвестный формат файла - - - MusE: load project - MusE: Открыть проект - - - MusE: Write File failed - MusE: Попытка записать файл не удалась - - - The current Project contains unsaved data -Save Current Project? - Текущий проект содержит не сохранённые данные. -Сохранить текущий проект? - - - &Abort - &Отмена - - - MusE: Save As - MusE: Сохранить как - - - MusE: Song: - MusE: Проект: - - - MusE: Import Midi - MusE: Импорт MIDI - - - MusE: Export Midi - MusE:Экспорт MIDI - - - reading midifile - - читается MIDI-файл - - - - - Nothing to edit - Нечего редактировать - - - MusE: Copy Range - MusE: Скопировать диапазон - - - not implemented - не реализовано - - - MusE: Cut Events - MusE: Вырезать события - - - MusE: Bounce to Track - MusE: Сведение в Трек - - - more than one target track selected - выбрано больше одного трека - - - wrong target track type, -select wave track as target - неверный тип трека, -выберите звуковой трек - - - no target track selected - трек не выбран - - - The current Project contains unsaved data -Load overwrites current Project: -Save Current Project? - Текущий проект содержит не сохранённые данные. -Загрузка нового проекта приведёт к перезаписи данных текущего проекта. -Сохранить текущий проект? - - - no help found at: - справка не найдена в: - - - MusE: Open Help - MusE: Открыть справку - - - Midi Ports / Soft Synth - MIDI-порты / Прогр. синтезаторы - - - to import a audio file you have first to selecta wave track - чтобы импортировать аудио-файл, вы должны сначала выделить звуковой трек - - - Delete Selected Tracks - Удалить выделенные треки - - - View - Вид - - - Restart Audio - Перезапустить аудио - - - Automation - Автоматизация - - - Mixer Automation - Автоматизация микшера - - - Take Snapshot - Сделать снимок - - - Clear Automation Data - Удалить Данные Автоматизации - - - Settings - Настройки - - - Configure Shortcuts - Настроить горячие клавиши - - - Midi File Export - Экспорт Midi Файла - - - &Manual - &Руководство - - - &MusE Homepage - &Домашняя страница MusE - - - &Report Bug... - &Сообщить об ошибке... - - - &About MusE - &О программе MusE - - - What's &This? - Что &Это - - - Cannot read template - Не могу прочитать шаблон - - - File open error - Ошибка при открытии файла - - - File read error - Ошибка прочтения файла - - - MusE: load template - MusE: открыть шаблон - - - MusE: Bounce - MusE: Свести - - - set left/right marker for bounce range - настройте левый/правый маркеры для установки диапазона сведения - - - MusE: Bounce to File - MusE: Свести в файл - - - no output track found - выходной трек не найден - - - Add midi file to current project? - - Добавить midi файл в текущий проект? - - - - &Add to Project - &Добавить в Проект - - - &Replace - &Заменить - - - -failed: - -не удалось: - - - Import Part - Импортировать Партию - - - Marker View - Маркеры - - - &Skip - Не сохранять - - - Import part is only valid for midi tracks! - Импорт партии действителен только для midi треков! - - - MusE: load part - MusE: открыть партию - - - No track selected for import - Не выбран трек для импорта - - - Failed to start audio! - Не могу воспроизводить аудио! - - - Was not able to start audio, check if jack is running. - - Не могу воспроизводить аудио, проверте работает ли "Jack". - - - - Timeout waiting for audio to run. Check if jack is running. - - Ожидание запуска аудио. Проверте, работает ли "Jack". - - - - &Insert - &Вставить - - - Paste c&lone - Вставить к&лон - - - Paste to &track - Вставить в &трек - - - Paste clone to trac&k - Вставить клон в &трек - - - &Insert Empty Measure - &Вставить пустой такт - - - Wave - Wave - - - Song Info - Проект инфо - - - Mixer A - Микшер А - - - Mixer B - Микшер В - - - Cliplist - Список фрагментов - - - &Plugins - &Плагины - - - Edit Instrument - Редактировать Инструмент - - - Rhythm Generator - Генератор Ритма - - - Midi File Import/Export - Импорт/Экспорт midi-файла - - - &View - &Вид - - - Unknown File Format: - Несзвестный формат файла: - - - New - Новый - - - No wave tracks found - wave-треки не найдены - - - No audio output tracks found - Выходные аудио треки не найдены - - - Select one audio output track, -and one target wave track - Выберите один трек аудио выхода -и один wave-трек, как цель - - - Select one target wave track - Выделите один wave-трек, как цель (трек назначения) - - - Select one target wave track, -and one audio output track - Выберите один wave-трек, как цель, -(трек назначения) и один трек аудио выхода - - - Select one audio output track - Выделите один трек аудио выхода - - - Import part is only valid for midi and wave tracks! - Импортирование партий допустимо только для midi и wave треков! - - - out of - за - - - parts - партии - - - part - партия - - - could not be imported. -Likely the track is the wrong type. - не может быть импортирована -Возможно неверный тип трека. - - - to import an audio file you have first to selecta wave track - чтобы импортировать аудио файл, вы должны сначала выделить wave-трек - - - Import Wavefile - Импортировать wave-файл - - - This wave file has a samplerate of %1, -as opposed to current setting %2. -Do you still want to import it? - Samplerate этого wave-файла %1, -в то время как текущий Samplerate %2. -Хотите ли вы импортировать его? - - - &Yes - &Да - - - &No - &Нет - - - - MusEApp::MusE - - Failed to start audio! - Не могу воспроизводить аудио! - - - Was not able to start audio, check if jack is running. - - Не могу воспроизводить аудио, проверте работает ли "Jack". - - - - Timeout waiting for audio to run. Check if jack is running. - - Ожидание запуска аудио. Проверте, работает ли "Jack". - - - - Und&o - &Отменить действие - - - Re&do - &Повторить - - - undo last change to song - отменить последнее изменение в проекте - - - redo last undo - повторить последнюю отмену - - - Loop - Цикл - - - Punchin - Начало врезки - - - Punchout - Конец врезки - - - Rewind - Перемотать назад - - - Forward - Перемотать вперёд - - - Stop - Остановить - - - Play - Воспроизвести - - - Record - Записать - - - Panic - Паника - - - &Open - &Открыть - - - Open &Recent - Открыть &Недавние - - - &Save - &Сохранить - - - Save &As - Сохранить &Как - - - Import Midifile - Импортировать MIDI-файл - - - Export Midifile - Экспортировать MIDI-файл - - - Import Part - Импортировать Партию - - - Import Wave File - Импортировать WAV-файл - - - &Quit - Вы&йти - - - Song Info - Проект инфо - - - Transport Panel - Панель транспорта - - - Bigtime Window - Окно хронометра - - - Mixer A - Микшер А - - - Mixer B - Микшер В - - - Cliplist - Список фрагментов - - - Marker View - Маркеры - - - &Plugins - &Плагины - - - Edit Instrument - Редактировать Инструмент - - - Input Plugins - Плагины на входе - - - Transpose - Транспонировать - - - Midi Input Transform - Преобразование входящих MIDI-сообщений - - - Midi Input Filter - Фильтр входящих MIDI-событий - - - Midi Remote Control - Дистанционное управление MIDI - - - Rhythm Generator - Генератор Ритма - - - Reset Instr. - Перезагрузить Инстр. - - - Init Instr. - Запустить Инстр. - - - Local Off - откл. локальное управление - - - Bounce to Track - Свести в трек - - - Bounce to File - Свести в файл - - - Restart Audio - Перезапустить аудио - - - Mixer Automation - Автоматизация микшера - - - Take Snapshot - Сделать снимок - - - Clear Automation Data - Удалить Данные Автоматизации - - - Global Settings - Общие настройки - - - Configure Shortcuts - Настроить горячие клавиши - - - Follow Song - следовать за проектом - - - Don't Follow Song - не следовать за проектом - - - Follow Page - следовать постранично - - - Follow Continuous - следовать плавно - - - Metronome - Метроном - - - Midi Sync - MIDI-синхр - - - Midi File Import/Export - Импорт/Экспорт midi-файла - - - Appearance Settings - Настройки вида - - - Midi Ports / Soft Synth - MIDI-порты / Прогр. синтезаторы - - - &Manual - &Руководство - - - &MusE Homepage - &Домашняя страница MusE - - - &Report Bug... - &Сообщить об ошибке... - - - &About MusE - &О программе MusE - - - File Buttons - Файловые кнопки - - - Transport - Транспорт - - - &File - &Файл - - - &View - &Вид - - - &Midi - &MIDI - - - &Audio - &Аудио - - - Cannot read template - Не могу прочитать шаблон - - - File open error - Ошибка при открытии файла - - - File read error - Ошибка прочтения файла - - - Unknown File Format: - Несзвестный формат файла: - - - MusE: Song: - MusE: Проект: - - - MusE: load project - MusE: Открыть проект - - - MusE: load template - MusE: открыть шаблон - - - The current Project contains unsaved data -Save Current Project? - Текущий проект содержит не сохранённые данные. -Сохранить текущий проект? - - - MusE: Save As - MusE: Сохранить как - - - Nothing to edit - Нечего редактировать - - - MusE: Bounce to Track - MusE: Сведение в Трек - - - No wave tracks found - wave-треки не найдены - - - No audio output tracks found - Выходные аудио треки не найдены - - - Select one audio output track, -and one target wave track - Выберите один трек аудио выхода -и один wave-трек, как цель - - - Select one target wave track - Выделите один wave-трек, как цель (трек назначения) - - - Select one target wave track, -and one audio output track - Выберите один wave-трек, как цель, -(трек назначения) и один трек аудио выхода - - - MusE: Bounce to File - MusE: Свести в файл - - - Select one audio output track - Выделите один трек аудио выхода - - - MusE: Bounce - MusE: Свести - - - set left/right marker for bounce range - настройте левый/правый маркеры для установки диапазона сведения - - - The current Project contains unsaved data -Load overwrites current Project: -Save Current Project? - Текущий проект содержит не сохранённые данные. -Загрузка нового проекта приведёт к перезаписи данных текущего проекта. -Сохранить текущий проект? - - - &Abort - &Отмена - - - MusE: Export Midi - MusE:Экспорт MIDI - - - no help found at: - справка не найдена в: - - - MusE: Open Help - MusE: Открыть справку - - - MusE: Import Midi - MusE: Импорт MIDI - - - Add midi file to current project? - - Добавить midi файл в текущий проект? - - - - &Add to Project - &Добавить в Проект - - - &Replace - &Заменить - - - reading midifile - - читается MIDI-файл - - - - - -failed: - -не удалось: - - - Import part is only valid for midi and wave tracks! - Импортирование партий допустимо только для midi и wave треков! - - - MusE: load part - MusE: открыть партию - - - No track selected for import - Не выбран трек для импорта - - - parts - партии - - - could not be imported. -Likely the track is the wrong type. - не может быть импортирована -Возможно неверный тип трека. - - - to import an audio file you have first to selecta wave track - чтобы импортировать аудио файл, вы должны сначала выделить wave-трек - - - Import Wavefile - Импортировать wave-файл - - - This wave file has a samplerate of %1, -as opposed to current setting %2. -Do you still want to import it? - Samplerate этого wave-файла %1, -в то время как текущий Samplerate %2. -Хотите ли вы импортировать его? - - - &Yes - &Да - - - &No - &Нет - - - - MusEArranger::Arranger - - Enable Recording - Разрешить запись - - - Mute/Off Indicator - Индикатор глушения вкл/выкл - - - Solo Indicator - Индикатор соло - - - Track Type - Тип трека - - - Track Name - Имя трека - - - Midi output channel number or audio channels - Номер выходного Midi-канала или аудио каналов - - - Midi output port or synth midi port - Выходной midi-порт или midi-порт синтезатора - - - Time Lock - Изменение времени заблокировано - - - Enable recording. Click to toggle. - Разрешить запись. Щелкните для переключения. - - - Mute indicator. Click to toggle. -Right-click to toggle track on/off. -Mute is designed for rapid, repeated action. -On/Off is not! - Индикатор заглушки. Щелкните для переключения. -Щелчок правой кнопкой мыши включает/выключает трек. -Заглушка предназначена для быстрых, повторяющихся действий. -А Вкл/Выкл нет! - - - Solo indicator. Click to toggle. -Connected tracks are also 'phantom' soloed, - indicated by a dark square. - Индикатор Соло. Щелкните для переключения. -Все треки, связанные с этим треком тоже перейдут режим "фантомного" соло, -Они будут обозначены темными квадратами. - - - Track type. Right-click to change - midi and drum track types. - Тип трека. Щелкните правой кнопкой мыши чтобы -изменить тип трека (midi-трек или трек ударных). - - - Track name. Double-click to edit. -Right-click for more options. - Название трека. Редактирование - двойной щелчок. -Большее количество опций - правый щелчок мыши. - - - Midi/drum track: Output channel number. -Audio track: Channels. -Mid/right-click to change. - Трек Midi/Ударных: номер канала выхода. -Аудио трек: Каналы. -Чтобы изменить, щелкните Средней/Правой кнопкой мыши. - - - Midi/drum track: Output port. -Synth track: Assigned midi port. -Left-click to change. -Right-click to show GUI. - Трек Midi/Ударных: Порт выхода. -Трек синтезатора: Назначенный midi-порт. -Щелчок левой кнопкой - изменить. -Щелчок правой кнопкой - показать ГИП. - - - Time lock - Изменение времени заблокировано - - - Arranger - Компоновщик - - - Cursor - Курсор - - - Snap - Привязка - - - Len - Дл - - - song length - bars - длина проекта - в тактах - - - Type - Тип - - - NO - НЕТ - - - GM - GM - - - GS - GS - - - XG - XG - - - midi song type - тип midi-проекта - - - Pitch - Высота тона - - - midi pitch - midi высотность - - - global midi pitch shift - общий сдвиг midi-высотности - - - Tempo - Темп - - - midi tempo - midi-темп - - - N - N - - - TrackInfo - ТрекИнфо - - - R - R - - - M - M - - - S - S - - - C - Т - - - Track - Трек - - - Port - Порт - - - Ch - Кан - - - T - Т - - - Automation - Автоматизация - - - - MusEArranger::ArrangerView - - panic - паника - - - transport - транспорт - - - C&ut - &Вырезать - - - &Copy - С&копировать - - - &Paste - &Вставить + Midi controller number low byte. +If low byte is * then the controller is a + 'drum controller'. For drum tracks and + GS/XG type songs and instruments. +Allows controllers for each instrument in + Muse's drum map. The low byte will be + replaced by the 'ANote' in the drum map. +Examples: The GS and XG instruments' + Drum controllers. + Младший байт midi-контроллера. +Если младший байт - *, тогда контроллер является +"контроллером ударных". Для треков ударных и +GS/XG типов проектов и инструментов. +Разрешает контроллеры для каждого инструмента в +карте ударных MusE. Младший байт будет +заменен "ANote" в карте ударных. +Примеры: Контроллеры ударных для GS и XG +инструментов. - Paste c&lone - Вставить к&лон + * + wild card + * + +универсальный шаблон - &Insert Empty Measure - &Вставить пустой такт + Range: + Диапазон: - Delete Selected Tracks - Удалить выделенные треки + Minimum value. If negative, auto-translate. + Минимальное значение. Если отрицательное, то авто-перевод. - Add Track - Добавить трек + Minimum value. If the minimum value + is negative, the range will automatically + be translated to a positive range. + +Useful for controllers which should be + displayed with zero bias. For example, +'Pan': Minimum: -64 Maximum: 63 +True range: Min: 0 Max: 127 (bias = 64) +'CoarseTuning': Min: -24 Max: 23 +True range: Min: 40 Max: 87 (bias = 64) + +Bias is determined from controller type: +7-bit Controller7 / RPN: Bias = 64 +14-bit Controller14 / RPN14: Bias = 8192 + +Type 'Pitch' is the exception. It is biased + at zero, even with a negative minimum: +'Pitch': Min: -8192 Max: 8191 +True range: Min: -8192 Max: 8191 (bias 0) + Минимальное значение. Если минимальное +значение отрицательное, то диапазон +автоматически переводится в положительный. + +Полезно для контроллеров отображаемых +с нулевым смещением. Например, "Пан": +Минимум: -64 Максимум: 63 Реальный диапазон: +Мин: 0 Макс: 127 (смещение = 64) +"Грубая настройка": Мин: -24 Макс: 23 +Реальный диапазон: Мин: 40 Макс: 87 (смещение = 64) + +Контроллер "Высота тона" является исключением. +Его смещение равно нулю, даже при отрицательных +значениях. "Высота тона" Мин: -8192 Макс: 8191 +Реальный диапазон: Мин: -8192 Макс:8191 (смещение = 0) - Select - Выделить + Maximum value + Максимальное значение - &Deselect All - &Убрать выделение + Default: + По умолчанию: - &Inside Loop - &Внутри цикла + L-Bank + L-банк - &Outside Loop - &Вне цикла + off + выкл - All &Parts on Track - Все &партии в треке + Progr. + Прогр. - Pianoroll - Пианоролл + ??? + ??? - Drums - Ударные + H-Bank + H-банк - List - Список + Default value. Off: No default. + Значение по умолчанию. Выкл: Нет значения по умолчанию. - Wave - Wave + Default (initial) value. Off means no default. + +If a default value is chosen, the value will be sent + to the controller when the controller is added to + the song (in piano roll or event editor). When + the song is re-loaded, the value is sent again. +Otherwise the controller remains at its last value. +Controllers are also automatically added to a + song upon reception of a midi controller event. + +Caution! Watch out for controllers such as + 'Sustain' and 'ResetAllController' with default + values. You should probably turn 'off' their + default (in piano roll or drum edit, and + instrument editor). + Значение по умолчанию (начальное). Выкл означает, +что значения по умолчанию нет. + +Если выбрано "по умолчанию", то значение будет +послано контроллеру, когда он будет добавлен в проект +(в пианоролле или редакторе списка). При перезагрузке +проекта значение будет послано снова. Или же будет +применено последнее значение контроллера. Контроллеры +также автоматически добавляются в проект при получении +midi-сообщений о контроллерах. + +Внимание! Будте осторожны с такими контроллерами как +"Sustain" и "ResetAllController". Вероятнее всего, что вы назначите +"выкл" для этих контроллеров (в пианоролле, редакторе ударных +или редакторе инструментов). - Mastertrack - Мастер-трек + off + dont care + выкл - Graphic - Графика + Add common controller + Добавить обычный контроллер - Midi &Transform - &Преобразовать MIDI-сообщения + &Add + &Добавить - Global Cut - Глобальное вырезание + Alt+A + Alt+A - Global Insert - Глобальная вставка + Delete controller + Удалить контроллер - Global Split - Глобальное разделение + Create a new controller + Добавить новый контроллер - &Edit - &Правка + New &Controller + Новый &Контроллер - &Structure - &Структура + Alt+C + Alt+C - Transpose - Транспонировать + Null Param Hi: + Нулевой Парам Ст: - New - Новый + Null parameter number High byte + Нулевой параметр значения Старшего байта - - - MusEArranger::PartCanvas - Cannot copy/move/clone to different Track-Type - Невозможно копировать/перемещать/клонировать данные в другие типы дорожек + If set, these 'null' parameter numbers will + be sent after each RPN/NRPN event. +This prevents subsequent 'data' events + from corrupting the RPN/NRPN controller. +Typically, set to 127/127, or an unused + RPN/NRPN controller number. + Если установлено, то это значение "нулевого" +параметра будет послано после каждого +события RPN/NRPN. Это предотвращает искажение +"данных" последующих событий контроллером RPN/NRPN. +Обычно, устанавливается 127/127, или "не использовать". - C&ut - &Вырезать + Lo: + Мл: - &Copy - С&копировать + Null parameter number Low byte + Нулевой параметр Младшего байта - s&elect - В&ыбрать + S&ysEx + S&ysEx - clones - клоны + SysEx List: + Список SysEx: - rename - Переименовать + New SysE&x + Новый SysE&x - color - цвет + Alt+X + Alt+X - delete - удалить + &Help + &Помощь - split - разделить + new item + новый пункт - de-clone - деклонировать + What's this? + Что это? + + + EditNoteDialogBase - wave edit - Редактор семплов + MusE: Enter Note + MusE: Ввести ноту - file info - файл-инфо + OK + ОК - MusE: save part - MusE: сохранить партию + Cancel + Отмена - Part name - Имя партии + Length: + Длина: - Files - Файлы + Time Position: + Позиция по времени: - parts - партии + Pitch: + Высота тона: - could not be pasted. -Likely the selected track is the wrong type. - не может быть вставлена. -Возможно выбранный трек не того типа. + Velocity On: + Скорость наж: - Cannot paste: multiple tracks selected - Вставка невозможна: выделено несколько треков + Velocity Off: + Скорость снятия: + + + EditSysexDialogBase - Cannot paste: no track selected - Вставка невозможна: не выделено ни одного трека + MusE: Enter SysEx + MusE: Ввести SysEx - Can only paste to midi/drum track - Можно вставить только в midi/drum трек + TimePosition: + Время: - Can only paste to wave track - Можно вставить только в звуковой трек + Comment: + Комментарий: - Can only paste to midi or wave track - Можно вставить только в midi или wave треки + OK + ОК - Cannot paste: wrong data type - Вставка невозможна: неверный тип данных + Cancel + Отмена - MusEArranger::TList - - <none> - <ничего> - + FLUIDGui - MusE: bad trackname - MusE: неверное имя трека + FLUID: open Soundfile + FLUID: открыть звуковой файл + + + FLUIDGuiBase - please choose a unique track name - Выберите неповторяющееся имя для трека + Form1 + Форма1 - Update drummap? - Обновить карту ударных? + Soundfont + Soundfont - Do you want to use same port for all instruments in the drummap? - Вы хотите использовать один и тот же порт для всех инструментов в списке ударных? + Load + Загрузить + + + FLUIDSynthGuiBase - &Yes - &Да + FLUID Synth + Синтезатор FLUID - &No - &Нет + Gain + Усиление - show gui - показать ГИП + Level + Уровень - show native gui - показать ГИП + Width + Ширина - Delete Track - Удалить трек + Damping + Демпфирование - Track Comment - Комментарий к треку + Room Size + Размер помещения - Drum - Ударные + Reverb + Реверб - Do you want to use same port and channel for all instruments in the drummap? - Вы хотите использовать один и тот же порт и канал для всех инструментов в списке ударных? + Delete + Удалить - - - MusECore::Song - - Jack shutdown! - Jack прекратил работу! + Load + Загрузить - - Jack has detected a performance problem which has lead to -MusE being disconnected. -This could happen due to a number of reasons: -- a performance issue with your particular setup. -- a bug in MusE (or possibly in another connected software). -- a random hiccup which might never occur again. -- jack was voluntary stopped by you or someone else -- jack crashed -If there is a persisting problem you are much welcome to discuss it -on the MusE mailinglist. -(there is information about joining the mailinglist on the MusE - homepage which is available through the help menu) - -To proceed check the status of Jack and try to restart it and then . -click on the Restart button. - Проблемы в работе "Jack", привели к его рассоединению с "MusE". -Это могло произойти по разным причинам: --проблемы в работе, вызванные особенностью ваших настроек. --баг в "MusE" (или, возможно, в других подсоединенных программах). --случайное выключение, которое больше никогда не повторится. --"Jack" остановлен вами или кем-нибудь еще. --"Jack" рухнул -Если это постоянная проблема мы приглашаем вас обсудить её -в почтовой рассылке "MusE". -(в меню "Помощь" есть информация о том, как присоединиться -к почтовой рассылке "MusE") - -Чтобы продолжить работу, проверте состояние "Jack", постарайтесь -перезапустить его, а затем щелкните по кнопке "Перезапустить". - - + Sine + Синусоида - - - Automation: - + Triangle + Треугольная - - previous event - предыдущее событие + Type + Тип - - next event - следующее событие + Number + Число - - - set event - настроить событие + Speed + Скорость - - - add event - добавить событие + Depth + Глубина - - - erase event - стереть событие + Chorus + Хорус - - erase range - стереть диапазон + CHANNEL SETUP + НАСТРОЙКА КАНАЛА - - clear automation - Очистить автоматизацию + ID + ID - - Clear all controller events? - Очистить все события контроллеров? + Fontname + Назв. SF-банка - - &Ok - &ОК + Chnl + Канал - - &Cancel - + Soundfont + Банк - - MusE - external script failed - MusE - ошибка запуска внешнего скрипта + LOADED SOUNDFONTS + ЗАГРУЖЕННЫЕ БАНКИ - - MusE was unable to launch the script, error message: -%1 - + Dump Info + Дамп Инфо - - - MusEGui - - Select project directory - + Drum Chnl + Канал ударных - MusEGui::Appearance - - - Main application font, and default font for any - controls not defined here. - Главный шрифт приложения, и шрифт по умолчанию -для всех средств управления, здесь не определены. - + FileDialogButtons - For small controls like mixer strips. -Also timescale small numbers, arranger part name overlay, - and effects rack. - Для небольших средств контроля, типа линеек микшера. -Также для маленьких цифр на линейке времени, названий партий в компоновщике и рэка эффектов. + Global + Общий - Midi track info panel. Transport controls. - Инфо-панель Midi-трека. Управление транспортом. + User + Пользователь + - Controller graph and S/X buttons. Large numbers for time - and tempo scale, and time signature. - Диаграмма контроллера и S/X кнопки. Большие цифры для -линеек времени и темпа, а также для тактового размера. + Project + Проект - Time scale markers. - Маркеры на линейке времени. + read Midi Port +Configuration + читать конфигурацию +midi порта - List editor: meta event edit dialog multi-line edit box. - Редактор списка: редактирование мета-события многострочное окно редактирования. + fdialogbuttons + КнопкиДиалогаФайлов + + + FluidSynthGui - Mixer label font. Auto-font-sizing up to chosen font size. -Word-breaking but only with spaces. - Шрифт метки микшера. Автоматическое изменение размера шрифта до выбранного размера. -Переносы только по пробелам. + Choose soundfont + Выберите soundfont + + + GateTimeBase - - Mixer strips and effects racks. Midi track info panel. -Midi control panel entry box. - + Range + Диапазон - - Transport controls. - + All Events + Все события - - Time scale upper, and time signature. -Controller graph and S/X buttons. - + Selected Events + Выбранные события - - Time scale lower, and arranger part name overlay. - + Looped Events + События в цикле - - Tempo scale, and markers. - + MusE: Modify Note Length + MusE: Изменить длину ноты - - Mixer labels. Auto-font-sizing up to chosen font size. -Word-breaking but only with spaces. - + Selected Looped + Выбранные в цикле - - Maximum mixer label auto-font-sizing font size. - Максимальный размер автоматически изменяющегося шрифта метки микшера. + Values + Значения - - Global opacity (opposite of transparency). - + Rate: + Скорость: - - Standard - + Offset: + Смещение: - - Custom - + % + % - - MusE: load image - MusE: загрузить изображение + lenNew = (lenOld * rate) + offset + Нов.дл = (Ст.дл * скор.) + смещ - - Select style sheet - Выберите таблицу стилей + OK + ОК - - Qt style sheets (*.qss) - Таблицы стилей Qt (*.qss) + Cancel + Отмена - MusEGui::Arranger - - - Enable Recording - Разрешить запись - + GlobalSettingsDialogBase - - Mute/Off Indicator - Индикатор глушения вкл/выкл + MusE: Global Settings + MusE: Общие настройки - - Solo Indicator - Индикатор соло + Use project save dialog + Использ. диалог сохр. проекта - - Track Type - Тип трека + Some popup menus stay open (else hold Ctrl) + Некоторые всплыв. меню останутся открытыми (или удерживайте Ctrl) - - Track Name - Имя трека + Allows some popup menus to stay open. +Otherwise, hold Ctrl to keep them open. + Разрешает некоторым всплыв. меню оставаться +открытыми. Или удерживайте Ctrl. - - Midi output channel number or audio channels - Номер выходного Midi-канала или аудио каналов + In some areas, the middle mouse button decreases +values, while the right button increases. Users without a +middle mouse button can select this option to make the +left button behave like the middle button in such areas. + В некоторых местах средняя кнопка мыши уменьшает +значение, а правая увеличивает. Пользователи без +средней кнопки могут выбрать эту опцию, чтобы левая +кнопка мыши в таких местах вела себя как правая. - - Midi output port or synth midi port - Выходной midi-порт или midi-порт синтезатора + Use left mouse button for decreasing values + Используйте левую кнопку мыши для уменьшения - - Time Lock - Изменение времени заблокировано + Shift + Right click sets left range marker + Shift + щелчок пр. кнопкой - устанавливает левый маркер - - Automation parameter selection - + Allow adding hidden tracks in track list menu + Разрешает добавление скрытых треков в меню списка треков - - Notation clef - + Unhide tracks when adding hidden tracks + Показывать треки, когда добавляются скрытые - - Enable recording. Click to toggle. - Разрешить запись. Щелкните для переключения. + GUI Style + Стиль ГИП - - Mute indicator. Click to toggle. -Right-click to toggle track on/off. -Mute is designed for rapid, repeated action. -On/Off is not! - Индикатор заглушки. Щелкните для переключения. -Щелчок правой кнопкой мыши включает/выключает трек. -Заглушка предназначена для быстрых, повторяющихся действий. -А Вкл/Выкл нет! + MDI-subwindowness and sharing menus + Общие меню и подменю MDI - - Solo indicator. Click to toggle. -Connected tracks are also 'phantom' soloed, - indicated by a dark square. - Индикатор Соло. Щелкните для переключения. -Все треки, связанные с этим треком тоже перейдут режим "фантомного" соло, -Они будут обозначены темными квадратами. + Presets: + Пресеты: - - Track type. Right-click to change - midi and drum track types. - Тип трека. Щелкните правой кнопкой мыши чтобы -изменить тип трека (midi-трек или трек ударных). + traditional MusE SDI + традиционное MusE SDI - - Track name. Double-click to edit. -Right-click for more options. - Название трека. Редактирование - двойной щелчок. -Большее количество опций - правый щелчок мыши. + Cakewalk-like MDI + MDI в стиле Cakewalk - - Midi/drum track: Output channel number. -Audio track: Channels. -Mid/right-click to change. - Трек Midi/Ударных: номер канала выхода. -Аудио трек: Каналы. -Чтобы изменить, щелкните Средней/Правой кнопкой мыши. + Borland-/Mac-like MDI + MDI в стиле Borland-/Mac - - Midi/drum track: Output port. -Synth track: Assigned midi port. -Left-click to change. -Right-click to show GUI. - Трек Midi/Ударных: Порт выхода. -Трек синтезатора: Назначенный midi-порт. -Щелчок левой кнопкой - изменить. -Щелчок правой кнопкой - показать ГИП. + &Apply + &Применить - - Time lock - Изменение времени заблокировано + &Ok + &ОК - - Notation clef. Select this tracks notation clef. - + &Cancel + &Отмена - - Arranger - Компоновщик + Audio + Аудио - - Cursor - Курсор + Mixer + Микшер - - Off - + dB + Дб - - Bar - Такт + min. Meter Value + мин. знач. индикатора - - Snap - Привязка + Midi + Midi - - Len - Дл + Ticks + Тики - - - song length - bars - длина проекта - в тактах + 1024 + 1024 - - Type - Тип + 2048 + 2048 - - NO - НЕТ + 4096 + 4096 - - GM - GM + Displayed Resolution +(Ticks/Quarternote) + Отображаемое разрешение +(Тиков/на четверть) - - GS - GS + 48 + 48 - - XG - XG + 96 + 96 - - - midi song type - тип midi-проекта + 192 + 192 - - Pitch - Высота тона + 384 + 384 - - midi pitch - midi высотность + 768 + 768 - - global midi pitch shift - общий сдвиг midi-высотности + 1536 + 1536 - - Tempo - Темп + 3072 + 3072 - - - midi tempo - midi-темп + 6144 + 6144 - - N - N + 12288 + 12288 - - TrackInfo - ТрекИнфо + RTC Resolution +(Ticks/Sec) + RTC-разрешение +(тиков/в сек) - - R - R + GUI Refresh Rate + Частота обновления ГИП - - M - M + /sec + /сек - - S - S + Application + Приложение - - C - Т + Start Muse + Запустить Muse - - Track - Трек + start with last song + запустить с последним проектом - - Port - Порт + start with song + запустить с проектом - - Ch - Кан + start song: + запустить проект: - - T - Т + Views + Виды - - Automation - Автоматизация + y-pos + y-поз. - - Clef - + show + показать - - - MusEGui::ArrangerView - - MusE: Arranger - + x-pos + x-поз. - - Undo/Redo tools - + height + высота - - panic - паника + width + ширина - - transport - транспорт + Big Time + Хронометр - - C&ut - &Вырезать + Transport + Транспорт - - &Copy - С&копировать + Cur + Тек - - Copy in range - + set current values + установить текущее значение - - &Paste - &Вставить + start with template: default.med + начать с шаблона: default.med - - Paste (show dialog) - + show splash screen + показывать заставку - - Paste c&lone - Вставить к&лон + External Waveditor + Внешний аудиоредактор - - Paste clone (show dialog) - + External Waveditor command + Команда вызова внешнего аудиоредактора - - &Insert Empty Measure - &Вставить пустой такт + Mixer A + Микшер А - - Delete Selected Tracks - Удалить выделенные треки + Mixer B + Микшер В - - Shrink selected parts - + show "Did you know?" dialog + показывать окно "Знаете ли вы?" - - Expand selected parts - + Start song + Запустить проект - - Clean selected parts - + min. Slider Val + мин. значение слайдера - - Add Track - Добавить трек + Enable denormal protection + Разрешить защиту от нарушений режима - - Select - Выделить + Enable output limiter + Разрешить лимитер выхода - - Select &All - + Note: External editor opened from the internal editor. + Примечание: Внешний редактор открывается из внутреннего редактора. - - &Deselect All - &Убрать выделение + Dummy Audio Driver (settings require restart) + Фиктивный Аудио Драйвер (требует перезагрузки) - - Invert &Selection - + Hz + Гц - - &Inside Loop - &Внутри цикла + Period size (Frames per period): + Размер периода (Фреймов на период): - - &Outside Loop - &Вне цикла + 16 + 16 - - All &Parts on Track - Все &партии в треке + Project directory + Папка проекта - - Score - + Projects: + Проекты: - - all tracks in one staff - + ... + ... - - one staff per track - + Main Window + Главное окно - - New score window - + Try to use Jack Freewheel + Попробуйте использавать режим "Jack Freewheel" - - Pianoroll - Пианоролл + Speeds bounce operations + Ускоряет операции сведения - - Drums - Ударные + Use Jack Freewheel mode if possible. +This dramatically speeds bounce operations. + Используйте режим Jack freewheel, если возможно. +Значительно ускоряет операции сведения. - - - List - Список + VST in-place + Быстрая обработка для VST-плагинов - - Wave - Wave + Enable VST in-place processing (restart required) + Разрешить быструю обработку для VST-плагинов. (Требуется перезагрузка) + - - Mastertrack - Мастер-трек + Enable VST in-place processing. Turn this off if + VST Ladspa effect rack plugins do not work or + feedback loudly, even if they are supposed to + be in-place capable. Setting requires a restart. + Возможность быстрой обработки VST. Отключите, +если плагины эффектов рэка "VST Ladspa" не +работают, или звучат очень громко, хотя и не +должны. Требуется перезагрузка. - - Graphic - Графика + Minimum control period + Минимальный контрольный период - - Midi &Transform - &Преобразовать MIDI-сообщения + Minimum audio controller process period (samples). + + Минимальный период аудио обработки (сэмпл). + - - Global Cut - Глобальное вырезание + Minimum audio controller process period (samples). +Adjusts responsiveness of audio controls and + controller graphs. Set a low value for fast, smooth + control. If it causes performance problems, set a + higher value. + Минимальный период аудио обработки (сэмпл). +Отрегулируйте чувствительность кнопок и линеек. +Установите, сначала, небольшие значения. При +возникновении проблем - увеличьте. - - Global Insert - Глобальная вставка + 1 + 1 - - Global Split - Глобальное разделение + 2 + 2 - - Global Cut - selected tracks - + 4 + 4 - - Global Insert - selected tracks - + 8 + 8 - - Global Split - selected tracks - + 32 + 32 - - &Edit - &Правка + 64 + 64 - - &Structure - &Структура + 128 + 128 - - Functions - + 256 + 256 - - &Quantize Notes - + 512 + 512 - - Change note &length - + Sample rate + - - Change note &velocity - + Shorter periods give better midi playback resolution. + Меньшие периоды дают лучшее разрешение проигрывания midi. - - Crescendo/Decrescendo - + 8192 + 8192 - - Transpose - Транспонировать + 16384 + 16384 - - Erase Events (Not Parts) - + 32768 + 32768 - - Move Events (Not Parts) - + Midi Resolution +(Ticks/Quarternote) + Midi-Разрешение +(Тиков/На четверть) - - Set Fixed Note Length - + GUI Behaviour + Поведение ГИП - - Delete Overlapping Notes - + Use old-style stop shortcut: + Использовать старую "горячую клавишу" для остановки: - - Legato - + Move single armed track with selection + Назначать "для записи" выбранный трек - - Window &Config - + On Launch + При запуске - - - New - Новый + Behavior + Поведение - MusEGui::AudioMixerApp - - - &Create - - + LegatoBase - - &View - &Вид + MusE: Legato + MusE: Легато - - Routing - Маршрутизация + Range + Диапазон - - Show Midi Tracks - Показать Midi-треки + All Events + Все события - - Show Drum Tracks - Показать треки ударных + Selected Events + Выбранные события - - Show Wave Tracks - Показать Wave-треки + Looped Events + События в цикле - - Show Inputs - Показать входы + Selected Looped + Выбранные ы цикле - - Show Outputs - Показать выходы + Settings + Настройки - - Show Groups - Показать группы + ticks + тик(и) - - Show Auxs - Показать Auxs + Minimum Length + Минимальная Длина - - Show Synthesizers - Показать синтезаторы + Allow shortening notes + Разрешить сокращение нот - - - MusEGui::AudioStrip - - panorama - панорама + OK + OK - - aux send level - уровень aux посыла + Cancel + Отмена + + + MITTransposeBase - - Pan - Пан + MusE: Midi Input Plugin: Transpose + MusE: Midi-плагин на входе: Транспонирование - - 1/2 channel - стерео-моно + On + Вкл - - Pre - Пре + TriggerKey + Кнопка запуска - - pre fader - post fader - пре федер - пост федер + Transpose: + Транспонировать: - - dB - + +0 + +0 + + + MRConfigBase - - record - + MusE: Midi Input Plugin: Remote Control + MusE: Входной MIDI-плагин: Дистанц. управление - - mute - заглушить + Activate + Активировать - - record downmix - записать downmix + On + Вкл - - - solo mode - режим соло + Actions + Действия - - off - выкл + Stop + Остановить - - iR - вх + Record + Записать - - input routing - маршрут входа + Goto Left Mark + Перейти к левому маркеру - - oR - вых + Play + Воспроизвести - - output routing - маршрут выхода + Insert rest (step rec) + Вставить паузу (пошаг. зап) + + + MdiSettingsBase - - Off - + Form + Form - - Read - Читать + GroupBox + Окно Группы - - Touch - По касанию + MDI subwin + MDI под-окно - - Write - + Shares menu when subwin + Общее меню в под-окне - - automation type - тип автоматизации + Shares menu when free + Общее меню всегда - MusEGui::BigTime - - - format display - формат дисплея - + MetronomeConfigBase - - bar - такт + MusE: Metronome Config + MusE: Настройка метронома - - beat - доля + Metronome + Метроном - - - tick - тик + Audio Beep + Аудио щелчок - - minute - минут(а) + MIDI Click + MIDI щелчок - - second - секунд(а) + Midi Channel + MIDI-канал - - - frame - фреймов + Measure Note + Нота на первую долю такта - - subframe - субфреймов + Measure Velocity + Громкость первой доли такта - - MusE: Bigtime - MusE: Хронометр + Beat Velocity + Громкость слабых долей такта - - - MusEGui::ClipListEdit - - MusE: Clip List Editor - MusE: Редактор списка фрагментов + Beat Note + Нота на слабые доли такта - - Undo/Redo tools - + Midi Port + MIDI-порт - - panic - паника + Precount + Предварительный отсчет - - transport - транспорт + enable + разрешить - - Window &Config - + Bars + Такт(ов) - - - MusEGui::ComboQuant - - - - Off - + From Mastertrack + Из Мастер-трека - - - MusEGui::CtrlPanel - - S - S + / + / - - select controller - выбрать контроллер + Signature + Размер - - X - X + Prerecord + Предзапись - - remove panel - удалить панель + Preroll + Предвоспроизведение - - manual adjust - настройка вручную + &Apply + &Применить - - double click on/off - двойной щелчок вкл/выкл + &OK + &ОК - - off - выкл + &Cancel + &Отмена - - - Velocity - + Choose outputs... + Выбрать выходы... - - add new ... - Добавить новый... + 50 + 50 - - - Instrument-defined - + % Audio volume + % Громкость аудио - - - Add ... - + Hint: Enable metronome in Transportpanel + Подсказка: Активируйте метроном на Транспортной панели - - Others - + Alt+A + Alt+A - - Edit instrument ... - + Alt+O + Alt+O - - Common Controls - + Alt+C + Alt+C - MusEGui::DrumEdit + MidiControllerEditDialogBase - - - mute instrument - заглушить инструмент + MusE: Define Midi Controller + MusE: Назначить MIDI-контроллер - - - sound name - название звука + Name + Имя - - - volume percent - громкость в процентах + Type + Тип - - - quantisation - квантование + H-Ctrl + H-Ctrl - - - this input note triggers the sound - + L-Ctrl + L-Ctrl - - - note length - длина ноты + Min Val + Мин знач - - - this is the note which is played - это нота, которая воспроизводится + Max Val + Макс знач - - output channel (hold ctl to affect all rows) - канал выхода (удерживайте ctrl, чтобы воздействовать на все ряды) + list of defined controllers + Список назначенных контроллеров - - output port (hold ctl to affect all rows) - + This is the MusE list of defined controllers. + Это список назначенных в MusE контроллеров. - - - shift + control key: draw velocity level 1 - клавиши shift+control: рисовать уровень 1 скорости нажатия + Properties + Свойства - - - control key: draw velocity level 2 - Клавиша control: рисовать уровень 2 скорости нажатия + Name + Имя - - - shift key: draw velocity level 3 - Клавиша shift: рисовать уровень 3 скорости нажатия + Max Value + Макс значение - - - draw velocity level 4 - рисовать уровень 4 скорости нажатия + Min Value + Мин значение - - output channel (ctl: affect all rows) - канал выхода (ctrl: действует на все ряды) + Control7 + Контрл7 - - output port (ctl: affect all rows) - + Control14 + Контрл14 - - &File - &Файл + RPN + RPN - - Load Map - Загрузить карту + NRPN + NRPN - - Save Map - Сохранить карту + Type + Тип - - Reset GM Map - Настроить карту GM по умолчанию + create new entry + создать новую запись - - &Edit - &Правка + pressing the New button you create a new entry +in the MusE list of defined controllers + При нажатии на кнопку "Новая", создаётся новая +запись в списке назначенных в MusE контроллеров - - Cut - Вырезать + &Delete + &Удалить - - Copy - + delete selected entry + удалить выделенную запись - - Copy events in range - + &OK + &OK - - Paste - Вставить + &Cancel + &Отмена - - Paste (with Dialog) - + &Add + &Добавить - - Delete Events - Удалить события + Alt+A + Alt+A - - &Select - + A&pply + &Применить - - Select All - Выделить всё + Predefined Controller: + Уже назначенный контроллер: - - Select None - Убрать выделение + Managed Controller for Port + Настроенный контроллер для порта - - Invert - Инвертировать + Channel + Канал - - Inside Loop - Внутри цикла + This is a list of commonly used midi controllers. +Note that in MusE pitch and program changes are +handled like normal controllers. + Это список общеупотребительных midi-контроллеров. +Обратите внимание, что изменение высоты тона и программ в MusE, +такое же, как и управление обычными контроллерами. - - Outside Loop - Вне цикла + RPN14 + RPN14 - - Previous Part - Предыдущая партия + NRPN14 + NRPN14 - - Next Part - Следующая партия + Pitch + Высота тона - - Fu&nctions - + Program + Программа - - Re-order list - + Midi Controller Number High Byte + Значение Старшего Байта Midi-контроллера - - Set Fixed Length - + Midi Controller Number Low Byte + Значение Младшего Байта Midi-контроллера - - Modify Velocity - + Range + Диапазон + + + MidiFilterConfigBase - - Crescendo/Decrescendo - + MusE: Midi Input Filter + MusE: Фильтр входящих Midi-событий - - Quantize - Квантовать + Record Filter + Фильтр записи - - Erase Event - Удалить событие + Note On + Нажатие ноты - - Move Notes - + Poly Pressure + Полифоническое давление - - Delete Overlaps - Удалить наложения + Controller + Контроллер - - &Plugins - &Плагины + Program Change + Смена программы - - Window &Config - + After Touch + Посленажатие - - Drum tools - Инструменты ударных + Pitch Bend + Изменение высоты тона - - Load Drummap - Загрузить драм-карту + Sysex + SysEx - - Store Drummap - Сохранить драм-карту + Thru Filter + Фильтр сквозного канала - - Step Record - Пошаговая запись + Controller Filter + Фильтр контроллеров - - Midi Input - MIDI-вход + Channel Filter + Фильтр каналов - - cursor tools - + 14 + 14 - - Set step size for cursor edit - + 10 + 10 + + + 6 + 6 + + + 12 + 12 - - panic - паника + 4 + 4 - - transport - транспорт + 2 + 2 - - ctrl - + 9 + 9 - - Add Controller View - + 8 + 8 - - M - M + 3 + 3 - - Sound - Звук + 13 + 13 - - Vol - Громк + 15 + 15 - - QNT - КВНТ + 16 + 16 - - E-Note - E-Нота + 7 + 7 - - Len - Дл + 11 + 11 - - A-Note - A-Нота + 5 + 5 - - Ch - Кан + 1 + 1 + + + MidiInputTransformDialogBase - - Port - Порт + MusE: Midi Input Transformator + MusE: Преобразователь входящих MIDI-событий - - LV1 - LV1 + Filter + Фильтр - - LV2 - LV2 + All + Все - - LV3 - LV3 + Equal + Равно - - LV4 - LV4 + Unequal + Не равно - - Muse: Load Drum Map - Muse: Загрузить драм-карту + Note + Нота - - MusE: Store Drum Map - Muse: Сохранить драм-карту + Poly Pressure + Полифоническое давление - - Drum map - Карта ударных + Control Change + Смена контроллера - - Reset the drum map with GM defaults? - Сброс карты ударных на GM по умолчанию? + Aftertouch + Посленажатие - - - MusEGui::EditCAfterDialog - - MusE: Enter Channel Aftertouch - MusE: Ввести Channel Aftertouch + Pitch Bend + Изменение высоты тона - - Time Position - Позиция по времени + NRPN + NRPN - - Pressure - Давление + RPN + RPN - - - MusEGui::EditEventDialog - - Ok - + Value 2 + Значение 2 - - Cancel - Отмена + Value 1 + Значение 1 - - - MusEGui::EditInstrument - - - MusE: Create file failed - MusE: Не удалось создать файл + Event Type + Тип события - - MusE: Write File failed - + Ignore + Игнорировать - MusE: - MusE: + Higher + Выше - - - MusE: Save Instrument Definition - MusE: Сохранить Определение Инструмента + Lower + Ниже - - - Instrument Definition (*.idf) - Определение инструмента (*.idf) + Inside + Внутри - - - MusE: Save instrument as - MusE: Сохранить инструмент как + Outside + Вне - - Enter a new unique instrument name: - Введите неповторяющееся имя инструмента: + Channel + Канал - - The user instrument '%1' already exists. This will overwrite its .idf instrument file. -Are you sure? - + Port + Порт - - MusE: Bad instrument name - MusE: Неверное имя инструмента + Processing + Обработка - - Please choose a unique instrument name. -(The name might be used by a hidden instrument.) - Пожалуйста, выберите неповторяющееся имя для инструмента. -(Имя может использоваться в скрытых инструментах) + Keep + Сохранить - - MusE: Bad patch name - MusE: Неверное имя патча + Fix + Исправить - - Please choose a unique patch name - Пожалуйста, выберите неповторяющееся имя патча + Plus + Плюс - - MusE: Bad patchgroup name - MusE: Неверное имя группы + Minus + Минус - - Please choose a unique patchgroup name - Пожалуйста, выберите неповторяющееся имя группы + Multiply + Умножить - - MusE: Bad controller name - MusE: Неверное имя контроллера + Divide + Разделить - - Please choose a unique controller name - Пожалуйста, выберите неповторяющееся имя для контроллера + Invert + Инвертировать - - - MusE: Cannot add common controller - MusE: Невозможно добавить обычный контроллер + ScaleMap + Шкала - - A controller named '%1' already exists. - + Flip + Обратить - - A controller number %1 already exists. - + Dyn + Дин - - - MusE - MusE + Random + Случайно - - - The current Instrument contains unsaved data -Save Current Instrument? - Текущий Инструмент содержит несохраненные данные -Сохранить этот Инструмент? + Modules + Модули - - - &Save - &Сохранить + 1 + 1 - - - &Nosave - &Не сохранять + 2 + 2 - - &Abort - &Отмена + 3 + 3 - - - MusEGui::EditMetaDialog - - MusE: Enter Meta Event - MusE: Ввести метасобытие + 4 + 4 - - Time Position - Позиция по времени + enable modul 1 + разрешить модуль 1 - - Meta Type - Метатип + enable modul 2 + разрешить модуль 2 - - Enter Hex - Ввести Hex + enable modul 3 + разрешить модуль 3 - - - MusEGui::EditPAfterDialog - - MusE: Enter Poly Aftertouch - MusE: Ввести полиф. посленажатие + enable modul 4 + разрешить модуль 4 - - Time Position - Позиция по времени + Preset + Пресет - - Pitch - Высота тона + Name: + Имя: - - Pressure - Давление + Comment: + Комментарий: - - - MusEGui::EditToolBar - - select Pointer Tool: -with the pointer tool you can: - select parts - move parts - copy parts - выбрать инструмент "Указатель": -при помощи указателя можно: - выделять партии(new line) - перемещать партии(new line) - копировать партии + Function + Функция - - select Pencil Tool: -with the pencil tool you can: - create new parts - modify length of parts - выбрать инструмент "Карандаш": -с помощью инструмента "Карандаш" вы можете: - создавать новые партии - изменять длину партий + &New + &Новый - - select Delete Tool: -with the delete tool you can delete parts - выбрать инструмент "Ластик": -с помощью инструмента "Ластик" вы можете удалять партии + create new preset + создать новый пресет - - select Cut Tool: -with the cut tool you can split a part - выбрать инструмент "Ножницы":(new line) -с помощью инструмента "Ножницы" вы можете разрезать партию + &Delete + &Удалить - - select Glue Tool: -with the glue tool you can glue two parts - выбрать инструмент "Клей": -с помощью инструмента "Клей" вы можете соединить две партии + delete preset + удалить пресет - - select Score Tool: - - выбрать редактор партитур: - + &Dismiss + &Отклонить - - select Quantize Tool: -insert display quantize event - выбрать инструмент "Квантование": -вставить отображение квантуемых событий + PresetList + Список пресетов + + + MidiSyncConfigBase - - select Drawing Tool - выбрать инструмент "Рисование" + MusE: Midi Sync + MusE: Midi-синхронизация - - select Muting Tool: -click on part to mute/unmute - выбрать инструмент "Не проигрывать партию (Заглушить)": -Щелкните по партии, чтобы "Проигрывать" или "Не проигрывать" ее + Apply + Применить - - Manipulate automation - + Ok + ОК - - Cursor tool - + Cancel + Отмена - - pointer - указатель + MTC + MТC - - pencil - карандаш + Type: + Тип: - - eraser - ластик + 24 + 24 - - cutter - ножницы + 25 + 25 - - score - партитура + 30D + 30D - - glue - + 30N + 30N - - quantize - квантовать + Offset: + Смещение: - - draw - рисовать + hour + часов - - mute parts - заглушить партии + h + ч - - edit automation - + minute + минут(а) - - cursor - + m + м - - Edit Tools - Инструменты редактирования + second + секунд(а) - - - MusEGui::EffectRack - - effect rack - рэк эффектов + s + с - - new - новый + frame + фреймов - - change - изменить + f + ф - - move up - сдвинуть выше + subframe + субфреймов - - move down - сдвинуть ниже + Sync receiving and sending + Получение и отправление синхронизации - - remove - удалить + Send and receive Jack transport + Отсылать и получать транспорт "Jack" - - bypass - обойти + Send and receive Jack transport information, + including stop, start and position. + Отсылать и получать информацию с транспорта +"Jack", стоп, старт, и позицию. - - show gui - показать ГИП + Use Jack transport + Использовать транспорт "Jack" - - show native gui - показать ГИП + Make MusE the Jack transport Timebase Master + Сделать MusE Мастером Базы времени для транспорта "Jack" - - save preset - сохранить пресет + Make MusE the Jack transport Timebase Master. +Allows Jack to show time as + MusE Bars, Beats, and Ticks. +MusE will try to become master, but other + Jack clients can also take over later. +You can always click here again for Master. + Сделать MusE Мастером Базы времени для транспорта "Jack" +Позволяет "Jack" показывать время как в "MusE", +то есть Такты, Доли и Тики. MusE будет пытаться стать Мастером, +но другие клиенты могут позже взять верх. Вы должны каждый раз +щелкнуть здесь, чтобы MusE снова стал Мастером. - - MusE: Save Preset - MusE: Сохранить Пресет + Jack transport Timebase Master + Мастер Базы времени транспорта "Jack" - - Replace effect - Заменить эффект + Control MusE timing by external midi clock or MTC sync + Контролировать Muse через внешний midi-clock или MTC синхр - - Do you really want to replace the effect %1? - Вы действительно хотите заменить эффект %1? + When in slave mode, tempo is + controlled externally. +MusE can sync to midi clock, or MTC quarter frame sync. +Enabled inputs in the list will + be in effect (RMC, RMMC, RMTC). + В режиме ведомого темп контролируется +извне. MusE может синхр. с midi-clock, или с +четверть-фреймовой синхр. MTC. Разрешенные +входы в списке будут задействованы. (RMC, RMMC, RMTC). - - - MusEGui::Header - - Track Info Columns - + Slave to external sync + Ведомый для внешней синхронизации - - - MusEGui::LMaster - - MusE: Mastertrack - MusE: Мастер-трек + Send start to first clock delay + Посылать "старт" первой задержке "clock" - - &Edit - &Правка + Allows 'slow sync' devices time + to synchronize to MusE. This value is the + delay from sending start to sending + the first clock. + Позволяет "медленно синхр." устройствам +синхронизироваться с MusE. Это значение +является задержкой от посылки старта до +посылки первого "clock". - - Insert Tempo - Вставить темп + ms + мс - - Insert Signature - Вставить размер + Send sync delay + Посылать синхр. задержку - - Insert Key - + Note: Sync delay and MTC sync currently not fully implemeted + Примеч: Задержка синхр. и MTC синхр. в наст. время реализованы не полностью + + + MidiTrackInfoBase - - Edit Positon - Изменить позицию + MusE: TrackInfo + MusE: Трек Инфо - - Edit Value - Изменить значение + output channel + канал выхода - - Delete Event - Удалить событие + % + % - - Window &Config - + output port + порт выхода - - Undo/Redo tools - + off + выкл - - Edit tools - Инструменты редактирования + Transp. + Трансп. - - Tempo - Темп + Channel Info + Канал-инфо - - Timesig - Размер + Rec: + Зап: - - Key - + Prog + Прог - - new tempo - новый темп + Vol + Громк - - new signature - новый размер + Pan + Пан - - new key - + Delay + Задержка - - panic - паника + H-Bank + H-банк - - transport - транспорт + Compr. + Компр. - - Meter - Индикатор + L-Bank + L-банк - - Time - Время + Velocity + Скорость нажатия - - Type - Тип + Length + Длина - - Value - Значение + all midi events are sent to this output channel + все midi-события посланы на этот канал выхода - - Reposition of the initial tempo and signature events is not allowed - Изменение начального темпа и размера запрещено + Out ch + Вых кан - - MusE: List Editor - MusE: Редактор списка событий + input routing + маршрут входа - - Input error, conversion not OK or value out of range - Ошибка ввода, неверная конверсия или значение вне диапазона + output routing + маршрут выхода - - Reposition of tempo and signature events to start position is not allowed! - Изменение темпа и размера запрещено + input detect + активность входа - - - MusEGui::ListEdit - - insert Note - вставить Ноту + Input detect indicator. Detects all note on-off, controller, aftertouch, + program change, and pitchbend (but not sysex or realtime) events + on the selected channels, on the selected midi ports. + Индикатор активности входа. Обнаруживает ноты, контроллеры, смену программы, и изменение высоты тона (но не sysex или realtime) на +выбранных каналах выбранных midi-портов. - - insert SysEx - вставить SysEx + W + W - - insert Ctrl - Вставить кнтрл + Midi thru + Сквозной midi-канал - - insert Meta - вставить Meta + Pass input events through ('thru') to output. + Пропускать входные события через сквозной канал на выход. - - insert Channel Aftertouch - вставить Channel Aftertouch + Select instrument patch + Выбрать патч инструмента - - insert Poly Aftertouch - вставить Poly Aftertouch + <unknown> + <неизвестно> - - &Edit - &Правка + Add all settings to song + Добавить все настройки в проект - - Cut - Вырезать + All + Все - - Copy - + Bank Select MSB. Double-click on/off. + Банк Выбрать MSB. Двойной щелчок вкл/выкл. - - Paste - Вставить + Bank Select LSB. Double-click on/off. + Банк Выбрать LSB. Двойной щелчок вкл/выкл. - - Delete Events - Удалить события + Program. Double-click on/off. + Программа. Двойной щелчок вкл/выкл. - - Window &Config - + Add bank + prog settings to song + Добавить банк и программу в проект - - Undo/Redo tools - + Volume. Double-click on/off. + Громкость. Двойной щелчок вкл/выкл. - - Insert tools - Инструменты для вставки + Add vol setting to song + Добавить настройки громк. в проект - - panic - паника + Change stereo position. Double-click on/off. + Изменить стерео позицию. Двойной щелчок вкл/выкл. - - transport - транспорт + Add pan setting to song + Добавить настройки панорамы в проект + + + MidiTransformDialogBase - - Tick - Тик + MusE: Midi Transformator + MusE: Преобразователь MIDI-сообщений - - Bar - Такт + &New + &Новая - - Type - Тип + &Delete + У&далить - - Ch - Кан + &Apply + &Применить - - Val A - Знач. А + &OK + &ОК - - Val B - Знач. B + &Cancel + &Отмена - - Val C - Знач. С + PresetList + Список пресетов - - Len - Дл + Processing + Обработка - - Comment - Комментарий + Event Type + Тип события - - - MusEGui::MPConfig - - - Default input connections - + Keep + Сохранить - - - Are you sure you want to apply to all existing midi tracks now? - + Fix + Исправить - - - Default output connections - + Note + Нота - - - Setting will apply to new midi tracks. -Do you want to apply to all existing midi tracks now? - + Poly Pressure + Полифоническое нажатие - - MusE: bad device name - MusE: неверное имя устройства + Control Change + Смена контроллера - - please choose a unique device name - пожалуйста выберите неповторяющееся имя для устройства + Aftertouch + Посленажатие - - - in - в + Pitch Bend + Смена высоты тона - - - out - вне (из) + NRPN + NRPN - - Show first aliases - Показать первые псевдонимы + RPN + RPN - - Show second aliases - Показать вторые псевдонимы + Plus + Плюс - - - Toggle all - + Minus + Минус - - - Change all tracks now - + Multiply + Умножить - Create - Создать + Divide + Разделить - device - устройство + Value 2 + Значение 2 - - Create Jack device - + Invert + Инвертировать - - - Port Number - Номер порта + ScaleMap + Шкала - - Enable gui - Разрешить ГИП + Flip + Обратить - - Enable reading - Разрешить чтение + Dyn + Дин - - Enable writing - Разрешить запись + Random + Случайно - - Port instrument - Инструмент, назначенный на порт + Value 1 + Значение 1 - - Midi device name. Click to edit (Jack) - Имя midi-устройства. Щелкните для редактирования (Jack) + Length + Длина - - Connections from Jack Midi outputs - Соединения от midi-выходов Jack + Position + Позиция - - Connections to Jack Midi inputs - Соединения к midi-входам Jack + Filter + Фильтр - - Auto-connect these channels to new midi tracks - + All + Все - - Auto-connect new midi tracks to these channels - + Equal + Равные - - Auto-connect new midi tracks to this channel - + Unequal + Не равные - - Device state - Состояние устройства + Ignore + Игнорировать - - Enable gui for device - Разрешить ГИП для устройства + Higher + Выше - - Enable reading from device - Разрешить чтение с устройства + Lower + Ниже - - Enable writing to device - Разрешить запись на устройство + Inside + Внутри - - Name of the midi device associated with this port number. Click to edit Jack midi name. - Имя midi-устройства связано с номером порта "Jack". Щелкните, чтобы редактировать его. + Outside + Вне - - Instrument connected to port - Инструмент, подсоединённый к порту + Bar Range + Диапазон тактов - - Connections from Jack Midi output ports - Соединения от выходных midi-портов Jack + Preset + Пресет - - Connections to Jack Midi input ports - Соединения с входными midi-портами Jack + Name: + Имя: - - Auto-connect these channels, on this port, to new midi tracks. - + Comment: + Комментарий: - - Connect new midi tracks to these channels, on this port. - + Range + Диапазон - - Connect new midi tracks to this channel, on this port. - + process all events + обработать все события - - State: result of opening the device - Состояние: результат открытия устройства + selected tracks + выделенные треки - - Port - Порт + inside loop + Внутри цикла - - GUI - ГИП + Function + Функция - - I - Вх + Select + Выделить - - O - Вых + Quantize + Квантовать - - Instrument - Инструмент + Delete + Удалить - - Device Name - Имя устройства + Transform + Преобразовать - - In routes - Маршруты входа + Insert + Вставить - - Out routes - Маршруты выхода + Copy + Скопировать - - Def in ch - вх кан по ум + Extract + Извлечь - - Def out ch - вых кан по ум + Quantize Value + Значение квантования + + + MixdownFileDialogBase - - State - Состояние + MusE: Set Mixdown Wavefile + MusE: Настроить параметры Wave-файла - - <unknown> - <неизвестно> + &OK + &OK - - - <none> - <ничего> + &Cancel + О&тменить - - - MusEGui::MTScale - - bar scale - + File Path + Путь к файлу - - - MusEGui::MTScaleFlo - - bar scale - + Channel + Канал - - - MusEGui::MarkerView - - MusE: Marker - MusE: Маркер + Stereo + Стерео - - add marker - добавить маркер + Mono + Моно - - delete marker - удалить маркер + 5.1 + 5.1 - - &Edit - &Правка + wav,16 Bit + wav, 16 бит - - Window &Config - + wav, 24 Bit + wav, 24 бита - - Undo/Redo tools - + wav, 32 Bit (float) + wav, 32 бита (float) - - edit tools - инструменты редактирования + Format + Формат + + + MoveBase - - panic - паника + MusE: Move Notes + MusE: Сдвинуть ноты - - transport - транспорт + Range + Диапазон - - Bar:Beat:Tick - Такт:Доля:Тик + All Events + Все события - - Hr:Mn:Sc:Fr:Sf - Чс:Мин:Сек:Фрм:Субфрм + Selected Events + Выбранные события - - Lock - Закрыть + Looped Events + События в цикле - - Text - Текст + Selected Looped + Выбранные в цикле - - Marker Properties - Свойства маркера + Value + Значение - - - MusEGui::MasterEdit - - MusE: Mastertrack - MusE: Мастер-трек + Move by + Сдвинуть на - - Window &Config - + ticks + тик(а, ов) - - Undo/Redo tools - + OK + OK - - panic - паника + Cancel + Отмена + + + MusECore::Song - - transport - транспорт + Jack shutdown! + Jack прекратил работу! - - Enable master - Разрешить мастер(а) + Jack has detected a performance problem which has lead to +MusE being disconnected. +This could happen due to a number of reasons: +- a performance issue with your particular setup. +- a bug in MusE (or possibly in another connected software). +- a random hiccup which might never occur again. +- jack was voluntary stopped by you or someone else +- jack crashed +If there is a persisting problem you are much welcome to discuss it +on the MusE mailinglist. +(there is information about joining the mailinglist on the MusE + homepage which is available through the help menu) + +To proceed check the status of Jack and try to restart it and then . +click on the Restart button. + Проблемы в работе "Jack", привели к его рассоединению с "MusE". +Это могло произойти по разным причинам: +-проблемы в работе, вызванные особенностью ваших настроек. +-баг в "MusE" (или, возможно, в других подсоединенных программах). +-случайное выключение, которое больше никогда не повторится. +-"Jack" остановлен вами или кем-нибудь еще. +-"Jack" рухнул +Если это постоянная проблема мы приглашаем вас обсудить её +в почтовой рассылке "MusE". +(в меню "Помощь" есть информация о том, как присоединиться +к почтовой рассылке "MusE") + +Чтобы продолжить работу, проверте состояние "Jack", постарайтесь +перезапустить его, а затем щелкните по кнопке "Перезапустить". + + - - Enable - Разрешить + Automation: + Автоматизация: - - Enable usage of master track - Разрешить использование мастер-трека + previous event + предыдущее событие - - Info - Инфо + next event + следующее событие - - Cursor - Курсор + set event + настроить событие - - time at cursor position - время в позиции курсора + add event + добавить событие - - tempo at cursor position - темп в позиции курсора + erase event + стереть событие - - Off - + erase range + стереть диапазон - - Bar - Такт + clear automation + очистить автоматизацию - - Snap - Привязка + Clear all controller events? + Очистить все события контроллеров? - - CurPos - КурсПоз + &Ok + &ОК - - tempo at current position - темп в текущей позиции + &Cancel + &Отмена - - time signature at current position - размер в текущей позиции + MusE - external script failed + MusE - ошибка запуска внешнего скрипта - - - MusEGui::MidiInputTransformDialog - - - New - Новый + MusE was unable to launch the script, error message: +%1 + MusE не смог запустить скрипт, ошибка: +%1 - MusEGui::MidiStrip + MusEGui::Appearance - - - - off - выкл + Main application font, and default font for any + controls not defined here. + Главный шрифт приложения, и шрифт по умолчанию +для кнопок управления, назначаются не здесь. - - - double click on/off - двойной щелчок вкл/выкл + Mixer strips and effects racks. Midi track info panel. +Midi control panel entry box. + Линейки микшера и рэки эффектов. Инфо-панель Midi-трека. +Окно ввода контрольной панели Midi. - - VariationSend - Вариационный посыл + Transport controls. + Контроль транспорта. - - Var - Вар + Time scale upper, and time signature. +Controller graph and S/X buttons. + Шкала времени вверху и тактовый размер. +Графы контроллеров и кнопки S/X. - - ReverbSend - Посыл Реверберации + Time scale lower, and arranger part name overlay. + Шкала времени внизу и название партии. - - Rev - Ревер + Tempo scale, and markers. + Шкала темпа и маркеры. - - ChorusSend - Посыл Хоруса + Mixer labels. Auto-font-sizing up to chosen font size. +Word-breaking but only with spaces. + Надписи в микшере. Авто-размер шрифта до выбр. +размера. Разрыв слов - только пробелом. - - Cho - Хорус + Maximum mixer label auto-font-sizing font size. + Максимальный размер авто-шрифта для надписей в микшере. - - dB - + Global opacity (opposite of transparency). + Общая непрозрачность (в противоположность прозрачности). - - Pan/Balance - Пан/Баланс + Standard + Стандартный - - Pan - Пан + Custom + По выбору - - record - + MusE: load image + MusE: загрузить изображение - - mute - заглушить + Select style sheet + Выберите стиль - - solo mode - режим соло + Qt style sheets (*.qss) + Таблицы стилей Qt (*.qss) + + + MusEGui::Arranger - - iR - вх + Enable Recording + Разрешить запись - - input routing - маршрут входа + Mute/Off Indicator + Без звука - - oR - вых + Solo Indicator + Соло - - output routing - маршрут выхода + Track Type + Тип трека - - - MusEGui::MidiSyncConfig - - - Port Number - Номер порта + Track Name + Имя трека - - - Name of the midi device associated with this port number - Имя MIDI-устройства, ассоциированного с номером этого порта + Midi output channel number or audio channels + Номер выходного Midi-канала или аудио каналов - - Midi clock input detected - Обнаружен вход midi-clock + Midi output port or synth midi port + Выходной midi-порт или midi-порт синтезатора - - - Midi tick input detected - Обнаружен вход midi-тика + Time Lock + Блокировка времени - - Midi real time input detected - Обнаружен midi-вход реального времени + Automation parameter selection + Выбор параметра автоматизации - - MMC input detected - Обнаружен вход MMC + Notation clef + Ключ нотации - - MTC input detected - Обнаружен вход MTC + Enable recording. Click to toggle. + Разрешить запись. Щелкните для переключения. - - Detected SMPTE format - Обнаруженые SMPTE форматы + Mute indicator. Click to toggle. +Right-click to toggle track on/off. +Mute is designed for rapid, repeated action. +On/Off is not! + Индикатор "Без звука". Щелкните для переключения. +Щелчок правой кнопкой мыши включает/выключает трек. +Индикатор "Без звука" предназначен для быстрых, повторных +действий. А Вкл/Выкл нет! - - Receive id number. 127 = Global. Double click to edit. - Получить id номер. 127 = Глобально. Двойной щелчок для редактирования. + Solo indicator. Click to toggle. +Connected tracks are also 'phantom' soloed, + indicated by a dark square. + Индикатор Соло. Щелкните для переключения. +Все треки, связанные с этим треком тоже перейдут режим "фантомного" соло, +Они будут обозначены темными квадратами. - - Accept midi clock input - Принять вход Midi-clock + Track type. Right-click to change + midi and drum track types. + Тип трека. Щелкните правой кнопкой мыши чтобы +изменить тип трека (midi-трек или трек ударных). - - Accept midi real time input - Принять midi-вход реального времени + Track name. Double-click to edit. +Right-click for more options. + Имя трека. Редактирование - двойной щелчок. +Большее количество опций - правый щелчок мыши. - - Accept MMC input - Принять вход MMC + Midi/drum track: Output channel number. +Audio track: Channels. +Mid/right-click to change. + Трек Midi/Ударных: номер канала выхода. +Аудио трек: Каналы. +Чтобы изменить, щелкните Средней/Правой кнопкой мыши. - - Accept MTC input - Принять вход MTC + Midi/drum track: Output port. +Synth track: Assigned midi port. +Left-click to change. +Right-click to show GUI. + Трек Midi/Ударных: Порт выхода. +Трек синтезатора: Назначенный midi-порт. +Щелчок левой кнопкой - изменить. +Щелчок правой кнопкой - показать ГИП. - - Receive start rewinds before playing - Получить перед воспроизведением сообщение о начале перемотки + Time lock + Блокировка времени - - Transmit id number. 127 = Global. Double click to edit. - Передать номер id. 127 = Общий. Двойной щелчок для редактирования. + Notation clef. Select this tracks notation clef. + Ключ нотации. Выберите ключ для этого трека. - - Send midi clock output - Послать выход midi-clock + Arranger + Компоновщик - - Send midi realtime output - Послать midi-выход реального времени + Cursor + Курсор - - - Send MMC output - Послать выход MMC + Off + Выкл - - - Send MTC output - Послать выход MTC + Bar + Такт - - Midi clock input detected. -Current port actually used is red. -Click to force a port to be used. - Обнаружен вход midi-clock. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -использовать порт. + Snap + Привязка - - Midi realtime input detected, including - start/stop/continue, and song position. - Обнаружен midi-вход реального времени, -с "старт/стоп/продолжить" и позицией проекта. + Len + Дл - - MMC input detected, including stop/play/deferred play, and locate. - Обнаружен MMC-вход c "старт/стоп/отложенное воспроизведение" - и локацией. + song length - bars + длина проекта - в тактах - - MTC input detected, including forward quarter-frame sync and full-frame locate. -Current port actually used is red. Click to force a port to be current. - Обнаружен MTC-вход, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -сделать порт текущим. + Type + Тип - - Detected SMPTE format: 24fps, 25fps, 30fps drop frame, or 30fps non-drop -Detects format of MTC quarter and full frame, and MMC locate. - Обнаруженые форматы SMPTE: 24fps, 25fps, 30fps с пропущенным -фреймом, или 30fps без пропущенного фрейма -Обнаруживает MTC-формат четверть и полно-фреймовый, и MMC локацию. + NO + NO - - Receive id number. 127 = global receive all, even if not global. - Получить номер id. 127 =глобальный получает все, даже если не глобальный. + GM + GM - - Accept midi clock input. Only one input is used for clock. -Auto-acquire: If two or more port realtime inputs are enabled, - the first clock detected is used, until clock is lost, - then another can take over. Best if each turns off its clock - at stop, so MusE can re-acquire the clock from another port. -Click on detect indicator to force another. - Принять вход midi-clock. Только один вход используется для "clock". -Авто-получение: если разрешены два или более входов реального времени на порт, то будут использован первый обнаруженный "clock", пока он не будет потерян, затем будет использован другой. Самое лучшее, если каждый отключит свой "clock" во время остановки, чтобы MusE снова получил "clock" с другого порта. Щелкните по индикатору обнаружения, чтобы сделать по другому. + GS + GS - - Accept midi realtime input, including - start/stop/continue, and song position. -Non-clock events (start,stop etc) are - accepted by ALL enabled ports. -This means you may have several master - devices connected, and muse will accept - input from them. - Принять midi-вход реального времени -с "старт/стоп/продолжить" и позицией проекта. -События "Non-clock" (старт, стоп, и т. п.) принимаются -ВСЕМИ разрешенными портами. Это означает, что вы -можете иметь несколько подсоединенных мастер-устройств, -и MusE примет вход от них. + XG + XG - - Accept MMC input, including stop/play/deferred play, and locate. - Принять вход MMC, с "стоп/старт/отложенным воспроизведением" и локацией. + midi song type + тип midi-проекта - - Accept MTC input, including forward quarter-frame sync and full-frame locate. -See 'rc' column for more help. - Принять вход MTC, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -См. колонку "rc" для получения помощи. + Pitch + Высота тона - - When start is received, rewind before playing. -Note: It may be impossible to rewind fast - enough to synchronize with the external device. - Когда сообщение "старт" получено, перемотать перед -воспроизведением. Примечание: может быть -так, что перемотка окажется недостаточно быстрой -для синхронизации с внешним устройством. + midi pitch + midi высотность - - Transmit id number. 127 = global transmit to all. - Передавать номер id. 127 =общая передача для всех. + global midi pitch shift + общий сдвиг midi-высотности - - Send midi clock output. If 'Slave to External Sync' is chosen, - muse can re-transmit clock to any other chosen ports. - Посылать выход midi-clock. Если выбрано "Slave to External Sync", -то MusE может снова передать "clock" на любой другой выбранный порт. + Tempo + Темп - - Send midi realtime output, including start/stop/continue, - and song position. If 'Slave to external sync' is chosen, - muse can re-transmit midi realtime input messages to any - other chosen ports. This means you may have several slave - devices connected, and muse can re-send realtime messages - to any or all of them. - Послать midi-выход реального времени, с "старт/стоп/продолжить" -и позицией проекта. Если выбрано "Slave to External Sync", -то MusE может снова передать сообщения с midi-входа реального -времени на любой другой выбранный порт. Это значит, что вы можете -иметь несколько присоединенных ведомых устройств, и MusE может снова послать сообщения реального времени на любое из них или на все. + midi tempo + midi-темп - - Port - Порт + N + N - - Device Name - Имя устройства + TrackInfo + ТрекИнфо - - c - c + R + R - - k - k + M + M - - r - r + S + S - - m - + C + Т - - t - t + Track + Трек - - type - тип + Port + Порт - - rid - rid + Ch + Кан - - rc - rc + T + Т - - rr - rr + Automation + Автоматизация - - rm - rm + Clef + Ключ + + + MusEGui::ArrangerView - - rt - rt + MusE: Arranger + MusE: Компоновщик - - rw - rw + Undo/Redo tools + Инструменты Отмена/Повтор - - tid - tid + panic + паника - - tc - tc + transport + транспорт - - tr - tr + C&ut + &Вырезать - - tm - tm + &Copy + С&копировать - - tt - tt + Copy in range + Копировать диапазон - - MusE - MusE + &Paste + &Вставить - - Settings have changed -Apply sync settings? - Настройки изменились -Применить настройки синхронизации? + Paste (show dialog) + Вставить (показать диалог) - - &Apply - &Применить + Paste c&lone + Вставить к&лон - - &No - &Нет + Paste clone (show dialog) + Вставить клон (показать диалог) - - &Abort - &Отмена + &Insert Empty Measure + &Вставить пустой такт - - <none> - <ничего> + Delete Selected Tracks + Удалить выделенные треки - - - MusEGui::MidiTrackInfo - - - <unknown> - <неизвестно> + Duplicate Selected Tracks + Дублировать выбранные треки - - - MusEGui::MidiTransformerDialog - - - New - Новый + Shrink selected parts + Сжать выбранные партии - - - MusEGui::MixdownFileDialog - - Wave Files (*.wav);;All Files (*) - Файлы Wave (*.wav);;Все файлы (*) + Expand selected parts + Расширить выбранные партии - - - MusEGui::MusE - - - Failed to start audio! - Не могу воспроизводить аудио! + Clean selected parts + Очистить выбранные партии - - Was not able to start audio, check if jack is running. - - Не могу воспроизводить аудио, проверте работает ли "Jack". - + Add Track + Добавить трек - - Timeout waiting for audio to run. Check if jack is running. - - Ожидание запуска аудио. Проверте, работает ли "Jack". - + Select + Выделить - - Und&o - &Отменить действие + Select &All + Выделить &Всё - - Re&do - &Повторить + &Deselect All + &Снять выделение - - undo last change to song - отменить последнее изменение в проекте + Invert &Selection + Инвертировать &Выделенное - - redo last undo - повторить последнюю отмену + &Inside Loop + &Внутри цикла - - Loop - Цикл + &Outside Loop + &Вне цикла - - loop between left mark and right mark - цикл между левым и правым маркерами + All &Parts on Track + Все &Партии в Треке - - Punchin - Начало врезки + Score + Партитура - - record starts at left mark - запись начинается с левого маркера + all tracks in one staff + все треки на один стан - - Punchout - Конец врезки + one staff per track + один трек на стан - - record stops at right mark - запись останавливается на правом маркере + New score window + Окно новой партитуры - - Start - + Pianoroll + Пианоролл - - rewind to start position - перемотать к начальной позиции + Drums + Ударные - - Rewind - Перемотать назад + List + Список - - rewind current position - перемотать к текущей позиции + Wave + Wave - - Forward - Перемотать вперёд + Mastertrack + Мастер-трек - - move current position - переместить текущую позицию + Graphic + График - - Stop - Остановить + Midi &Transform + &Трансформация MIDI - - stop sequencer - остановить секвенсер + Global Cut + Общая вырезка - - Play - Воспроизвести + Global Insert + Общая вставка - - start sequencer play - начать воспроизведение в секвенсере + Global Split + Общее разделение - - Record - Записать + Global Cut - selected tracks + Общая вырезка - выбр. треки - - to record press record and then play - чтобы начать запись нажмите "запись", а затем "воспроизвести" + Global Insert - selected tracks + Общая вставка - выбр. треки - - - Panic - Паника + Global Split - selected tracks + Общее разделение - выбр. треки - - send note off to all midi channels - послать сообщение "note off" на все midi-каналы + &Edit + &Правка - - &New - + &Structure + &Структура - - - Create New Song - Создать новый проект + Functions + Функции - - &Open - &Открыть + &Quantize Notes + &Квантовать ноты - - - Click this button to open a <em>new song</em>.<br>You can also select the <b>Open command</b> from the File menu. - Щелкните по этой кнопке для открытия другого проекта. Вы также можете выбрать пункт Открыть в меню "Файл". + Change note &length + Изменить длину &ноты - - Open &Recent - Открыть &Недавние + Change note &velocity + Изменить скорость нажатия &ноты - - - - &Save - &Сохранить + Crescendo/Decrescendo + Крещендо/Диминуэндо - - - Click this button to save the song you are editing. You will be prompted for a file name. -You can also select the Save command from the File menu. - Щелкните по этой кнопке для сохранения проекта. Будет предложено ввести имя файла. -Вы также можете выбрать пункт "Сохранить" в меню "Файл". + Transpose + Транспонировать - - Save &As - Сохранить &Как + Erase Events (Not Parts) + Удалить события (не партии) - - Import Midifile - Импортировать MIDI-файл + Move Events (Not Parts) + Передвинуть события (не партии) - - Export Midifile - Экспортировать MIDI-файл + Set Fixed Note Length + Установить фикс. длину ноты - - Import Part - Импортировать Партию + Delete Overlapping Notes + Удалить наложения - - - Import Wave File - Импортировать WAV-файл + Legato + Легато - - Find unused wave files - + Window &Config + &Конфигурация окна - - &Quit - Вы&йти + New + Новый + + + MusEGui::AudioMixerApp - - Song Info - Проект инфо + &Create + &Создать - - Transport Panel - Панель транспорта + &View + &Вид - - Bigtime Window - Окно хронометра + Routing + Маршрутизация - - Mixer A - Микшер А + Show Midi Tracks + Показать Midi-треки - - Mixer B - Микшер В + Show Drum Tracks + Показать треки ударных - - Cliplist - Список фрагментов + Show Wave Tracks + Показать Wave-треки - - Marker View - Маркеры + Show Inputs + Показать входы - - Arranger View - + Show Outputs + Показать выходы - - Fullscreen - + Show Groups + Показать Группы - - &Plugins - &Плагины + Show Auxs + Показать Auxs - - Edit Instrument - Редактировать Инструмент + Show Synthesizers + Показать синтезаторы + + + MusEGui::AudioStrip - - Input Plugins - Плагины на входе + panorama + панорама - - Transpose - Транспонировать + aux send level + уровень aux посыла - - Midi Input Transform - Преобразование входящих MIDI-сообщений + Pan + Пан - - Midi Input Filter - Фильтр входящих MIDI-событий + 1/2 channel + стерео-моно - - Midi Remote Control - Дистанционное управление MIDI + Pre + Пре - - Rhythm Generator - Генератор Ритма + pre fader - post fader + пре федер - пост федер + + + dB + дБ + + + record + запись + + + mute + без звука - - Reset Instr. - Перезагрузить Инстр. + record downmix + записать микс - - Init Instr. - Запустить Инстр. + solo mode + соло - - Local Off - откл. локальное управление + off + выкл - - Bounce to Track - Свести в трек + input routing + маршрут входа - - Bounce to File - Свести в файл + output routing + маршрут выхода - - Restart Audio - Перезапустить аудио + Off + Выкл - - Mixer Automation - Автоматизация микшера + Read + Читать - - Take Snapshot - Сделать снимок + Touch + По касанию - - Clear Automation Data - Удалить Данные Автоматизации + Write + Писать - - Cascade - + automation type + тип автоматизации + + + MusEGui::BigTime - - Tile - + format display + формат дисплея - - In rows - + bar + такт - - In columns - + beat + доля - - Global Settings - Общие настройки + tick + тик - - Configure Shortcuts - Настроить горячие клавиши + minute + минут(а) - - Follow Song - следовать за проектом + second + секунд(а) - - Don't Follow Song - не следовать за проектом + frame + фреймов - - Follow Page - следовать постранично + subframe + субфреймов - - Follow Continuous - следовать плавно + MusE: Bigtime + MusE: Хронометр + + + MusEGui::ClipListEdit - - Metronome - Метроном + MusE: Clip List Editor + MusE: Редактор списка клипов - - Midi Sync - MIDI-синхр + Undo/Redo tools + Инструменты Отменить/Вернуть - - Midi File Import/Export - Импорт/Экспорт midi-файла + panic + паника - - Appearance Settings - Настройки вида + transport + транспорт - - Midi Ports / Soft Synth - MIDI-порты / Прогр. синтезаторы + Window &Config + Конфигурация &окна + + + MusEGui::ComboQuant - - &Manual - &Руководство + Off + Выкл + + + MusEGui::CtrlCanvas - - &MusE Homepage - &Домашняя страница MusE + Drawing hint: Hold Ctrl to affect only existing events + Совет: Удерживайте Ctrl, чтобы править только существующие события - - &Report Bug... - &Сообщить об ошибке... + Use shift + pencil or line tool to draw new events + Используйте shift + карандаш или линию, чтобы рисовать новые события + + + MusEGui::CtrlPanel - - &About MusE - &О программе MusE + S + S - - File Buttons - Файловые кнопки + select controller + выбрать контроллер - - Undo/Redo - + X + X - - Transport - Транспорт + remove panel + удалить панель - - &File - &Файл + manual adjust + настройка вручную - - &View - &Вид + double click on/off + двойной щелчок вкл/выкл - - &Midi - &MIDI + off + выкл - - &Audio - &Аудио + Velocity + Скорость нажатия - - A&utomation - + add new ... + Добавить новый... - - &Windows - + Instrument-defined + Определенный инструментом - - MusE Se&ttings - + Add ... + Добавить... - - &Help - + Others + Другие - - Cannot read template - Не могу прочитать шаблон + Edit instrument ... + Редактировать инструмент... - - File open error - Ошибка при открытии файла + Common Controls + Обычные кнопки + + + MusEGui::DrumEdit - - File read error - Ошибка прочтения файла + mute instrument + заглушить инструмент - - Unknown File Format: %1 - + sound name + название звука - - - - MusE: Song: %1 - + volume percent + громкость в процентах - - MusE: load project - MusE: Открыть проект + quantisation + квантование - - MusE: load template - MusE: открыть шаблон + this input note triggers the sound + эта входящая нота включает звук - - MusE: Write File failed - + note length + длина ноты - - The current Project contains unsaved data -Save Current Project? - Текущий проект содержит не сохранённые данные. -Сохранить текущий проект? + this is the note which is played + нота, которая воспроизводится - - - S&kip - + output channel (hold ctl to affect all rows) + канал выхода (удерживайте ctrl, чтобы воздействовать на все ряды) - - &Cancel - + output port (hold ctl to affect all rows) + порт выхода (удерживайте ctrl, чтобы воздействовать на все ряды) - - MusE: Save As - MusE: Сохранить как + shift + control key: draw velocity level 1 + клавиши shift+control: рисовать уровень 1 скорости нажатия - - - Nothing to edit - Нечего редактировать + control key: draw velocity level 2 + Клавиша control: рисовать уровень 2 скорости нажатия - - - - - - MusE: Bounce to Track - MusE: Сведение в Трек + shift key: draw velocity level 3 + Клавиша shift: рисовать уровень 3 скорости нажатия - - No wave tracks found - wave-треки не найдены + draw velocity level 4 + рисовать уровень 4 скорости нажатия - - - No audio output tracks found - Выходные аудио треки не найдены + output channel (ctl: affect all rows) + канал выхода (ctrl: действует на все ряды) - - Select one audio output track, -and one target wave track - Выберите один трек аудио выхода -и один wave-трек, как цель + output port (ctl: affect all rows) + порт выхода (ctrl: действует на все ряды) - - Select one target wave track - Выделите один wave-трек, как цель (трек назначения) + &File + &Файл - - Select one target wave track, -and one audio output track - Выберите один wave-трек, как цель, -(трек назначения) и один трек аудио выхода + Load Map + Загрузить карту - - - MusE: Bounce to File - MusE: Свести в файл + Save Map + Сохранить карту - - Select one audio output track - Выделите один трек аудио выхода + Reset GM Map + Настроить карту GM по умолчанию - - MusE: Bounce - MusE: Свести + &Edit + &Правка - - set left/right marker for bounce range - настройте левый/правый маркеры для установки диапазона сведения + Cut + Вырезать - - The current Project contains unsaved data -Load overwrites current Project: -Save Current Project? - Текущий проект содержит не сохранённые данные. -Загрузка нового проекта приведёт к перезаписи данных текущего проекта. -Сохранить текущий проект? + Copy + Копировать - - - &Abort - &Отмена + Copy events in range + Копировать события в диапазоне - - MusE: Export Midi - MusE:Экспорт MIDI + Paste + Вставить - - no help found at: - справка не найдена в: + Paste (with Dialog) + Вставить (с диалогом) - - MusE: Open Help - MusE: Открыть справку + Delete Events + Удалить события - - Unable to launch help - + &Select + &Выделить - - For some reason MusE has to launch the default -browser on your machine. - + Select All + Выделить всё - - MusE: Import Midi - MusE: Импорт MIDI + Select None + Снять выделение - - Add midi file to current project? - - Добавить midi файл в текущий проект? - + Invert + Инвертировать - - &Add to Project - &Добавить в Проект + Inside Loop + Внутри цикла - - &Replace - &Заменить + Outside Loop + Вне цикла - - reading midifile - - читается MIDI-файл - - + Previous Part + Предыдущая партия - - -failed: - -не удалось: + Next Part + Следующая партия - - Import part is only valid for midi and wave tracks! - Импортирование партий допустимо только для midi и wave треков! + Fu&nctions + &Функции - - MusE: load part - MusE: открыть партию + Re-order list + Изменить порядок списка - - No track selected for import - Не выбран трек для импорта + Set Fixed Length + Установит Фиксир. Длину - - - %n part(s) out of %1 could not be imported. -Likely the selected track is the wrong type. - - - + + Modify Velocity + Изменить Скорость наж - - - %n part(s) could not be imported. -Likely the selected track is the wrong type. - - - + + Crescendo/Decrescendo + Крещендо/Диминуэндо - - to import an audio file you have first to selecta wave track - чтобы импортировать аудио файл, вы должны сначала выделить wave-трек + Quantize + Квантовать - - Import Wavefile - Импортировать wave-файл + Erase Event + Удалить событие - - This wave file has a samplerate of %1, -as opposed to current setting %2. -Do you still want to import it? - Samplerate этого wave-файла %1, -в то время как текущий Samplerate %2. -Хотите ли вы импортировать его? + Move Notes + Передвинуть ноты - - &Yes - &Да + Delete Overlaps + Удалить наложения - - &No - &Нет + &Plugins + &Плагины - - - MusEGui::NoteInfo - - Note Info - Информация о ноте + Window &Config + Конфигурация &окна - - Start - + Drum tools + Инструменты ударных - - Len - Дл + Load Drummap + Загрузить карту ударных - - Pitch - Высота тона + Store Drummap + Сохранить карту ударных - - Velo On - Скор. наж + Step Record + Пошаговая запись - - Velo Off - Скор. снятия + Midi Input + MIDI-вход - - - MusEGui::PartCanvas - - Cannot copy/move/clone to different Track-Type - Невозможно копировать/перемещать/клонировать данные в другие типы дорожек + cursor tools + инструменты курсора - - C&ut - &Вырезать + Set step size for cursor edit + Установить размер шага для курсора - - &Copy - С&копировать + panic + паника - - s&elect - В&ыбрать + transport + транспорт - - clones - клоны + ctrl + ctrl - - rename - Переименовать + Add Controller View + Добавить панель - - color - цвет + M + M - - delete - удалить + Sound + Звук - - split - разделить + Vol + Громк - - glue - + QNT + КВНТ - - de-clone - деклонировать + E-Note + E-Нота - - - - save part to disk - + Len + Дл - - wave edit - Редактор семплов + A-Note + A-Нота - - file info - файл-инфо + Ch + Кан - - MusE: save part - MusE: сохранить партию + Port + Порт - - Part name: %1 -Files: - - - - - %n part(s) out of %1 could not be pasted. -Likely the selected track is the wrong type. - - - + LV1 + УР1 - - - %n part(s) could not be pasted. -Likely the selected track is the wrong type. - - - + + LV2 + УР2 - - Cannot paste: multiple tracks selected - Вставка невозможна: выделено несколько треков + LV3 + УР3 - - Cannot paste: no track selected - Вставка невозможна: не выделено ни одного трека + LV4 + УР4 - - Can only paste to midi/drum track - Можно вставить только в midi/drum трек + Muse: Load Drum Map + Muse: Загрузить карту ударных - - Can only paste to wave track - Можно вставить только в звуковой трек + MusE: Store Drum Map + Muse: Сохранить карту ударных - - Can only paste to midi or wave track - Можно вставить только в midi или wave треки + Drum map + Карта ударных - - Cannot paste: wrong data type - Вставка невозможна: неверный тип данных + Reset the drum map with GM defaults? + Сбросить карту ударных на GM? - MusEGui::PasteDialog - - - %n quarter(s) - - - + MusEGui::EditCAfterDialog + + MusE: Enter Channel Aftertouch + MusE: Ввести Channel Aftertouch - - %1 quarter - for floating-point arguments like 1.5 - + Time Position + Позиция по времени - - %1 quarters - for floating-point arguments like 1.5 - + Pressure + Давление - MusEGui::PasteEventsDialog - - - %n quarter(s) - - - - + MusEGui::EditEventDialog - - %1 quarter - for floating-point arguments like 1.5 - + Ok + Ok - - %1 quarters - for floating-point arguments like 1.5 - + Cancel + Отмена - MusEGui::PianoRoll + MusEGui::EditInstrument - - &Edit - &Правка + MusE: Create file failed + MusE: Не удалось создать файл - - C&ut - &Вырезать + MusE: Write File failed + MusE: Не удалось записать файл - - &Copy - С&копировать + MusE: Save Instrument Definition + MusE: Сохранить Определение Инструмента - - Copy events in range - + Instrument Definition (*.idf) + Определение инструмента (*.idf) - - &Paste - &Вставить + MusE: Save instrument as + MusE: Сохранить инструмент как - - Paste (with dialog) - + Enter a new unique instrument name: + Введите неповторяющееся имя инструмента: - - Delete &Events - Удалить &События + The user instrument '%1' already exists. This will overwrite its .idf instrument file. +Are you sure? + Инструмент пользователя '%1' уже существует. Файл инструмента .idf будет +переписан. Вы уверены? - - &Select - + MusE: Bad instrument name + MusE: Неверное имя инструмента - - Select &All - + Please choose a unique instrument name. +(The name might be used by a hidden instrument.) + Пожалуйста, выберите неповторяющееся имя для инструмента. +(Имя может использоваться в скрытых инструментах) - - &Deselect All - &Убрать выделение + MusE: Bad patch name + MusE: Неверное имя патча - - Invert &Selection - + Please choose a unique patch name + Пожалуйста, выберите неповторяющееся имя патча - - &Inside Loop - &Внутри цикла + MusE: Bad patchgroup name + MusE: Неверное имя группы - - &Outside Loop - &Вне цикла + Please choose a unique patchgroup name + Пожалуйста, выберите неповторяющееся имя группы - - &Previous Part - &Предыдущая партия + MusE: Bad controller name + MusE: Неверное имя контроллера - - &Next Part - &Следующая партия + Please choose a unique controller name + Пожалуйста, выберите неповторяющееся имя для контроллера - - Fu&nctions - + MusE: Cannot add common controller + MusE: Невозможно добавить обычный контроллер - - Quantize - Квантовать + A controller named '%1' already exists. + Контроллер '%1' уже существует. - - Modify Note Length - + A controller number %1 already exists. + Контроллер номер '%1' уже существует. - - Modify Velocity - + MusE + MusE - - Crescendo/Decrescendo - + The current Instrument contains unsaved data +Save Current Instrument? + Текущий Инструмент содержит несохраненные данные +Сохранить Инструмент? - - Transpose - Транспонировать + &Save + &Сохранить - - Erase Events - + &Nosave + &Не сохранять - - Move Notes - + &Abort + &Отмена + + + MusEGui::EditMetaDialog - - Set Fixed Length - + MusE: Enter Meta Event + MusE: Ввести метасобытие - - Delete Overlaps - Удалить наложения + Time Position + Позиция по времени - - Legato - + Meta Type + Метатип - - &Plugins - &Плагины + Enter Hex + Ввести Hex + + + MusEGui::EditPAfterDialog - - Window &Config - + MusE: Enter Poly Aftertouch + MusE: Ввести полиф. посленажатие - - &Event Color - &Цвет события + Time Position + Позиция по времени - - &Blue - &Синий + Pitch + Высота тона - - &Pitch colors - &Цвета высоты тона + Pressure + Давление + + + MusEGui::EditToolBar - - &Velocity colors - &Цвета скорости нажатия + select Pointer Tool: +with the pointer tool you can: + select parts + move parts + copy parts + выбрать инструмент "Указатель": +при помощи Указателя можно: + выделять партии + перемещать партии + копировать партии - - Pianoroll tools - Инструменты пианоролла + select Pencil Tool: +with the pencil tool you can: + create new parts + modify length of parts + выбрать инструмент "Карандаш": +инструментом Карандаш вы можете: + создавать новые партии + изменять длину партий - - Step Record - Пошаговая запись + select Delete Tool: +with the delete tool you can delete parts + выбрать инструмент "Ластик": +инструментом "Ластик" вы можете удалять партии - - Midi Input - MIDI-вход + select Cut Tool: +with the cut tool you can split a part + выбрать инструмент "Ножницы": +инструментом Ножницы вы можете резать партию - - Play Events - Воспроизвести события + select Glue Tool: +with the glue tool you can glue two parts + выбрать инструмент "Клей": +инструментом Клей вы можете соединять партии - - panic - паника + select Score Tool: + + выбрать инструмент партитуры: + + - - transport - транспорт + select Quantize Tool: +insert display quantize event + выбрать инструмент "Квантование": +квантует отображаемые события - - ctrl - + select Drawing Tool + выбрать инструмент "Рисование" - - Add Controller View - + select Muting Tool: +click on part to mute/unmute + выбрать инструмент "Без звука": +Щелкните по партии, чтоб переключать "Без зв./Звук" - - - MusEGui::PluginDialog - - MusE: select plugin - MusE: выбрать плагин + Manipulate automation + Управлять автоматизацией - - Lib - Библ. + Cursor tool + Инструмент Курсор - - Label - Метка + pointer + указатель - - Name - Имя + pencil + карандаш - - AI - AI + eraser + ластик - - AO - AO + cutter + ножницы - - CI - CI + score + партитура - - CO - CP + glue + клей - - IP - IP + quantize + квантовать - - id - id + draw + рисовать - - Maker - Создатель + mute parts + заглушить партию - - Copyright - Copyright + edit automation + править автоматизацию - - Ok - + cursor + курсор - - Cancel - Отмена + Edit Tools + Инструменты правки + + + MusEGui::EffectRack - - Mono and Stereo - Моно и Стерео + effect rack + рэк эффектов - - Stereo - Стерео + new + новый - - Mono - Моно + change + изменить - - Show All - Показать Все + move up + передвинуть выше - - Select which types of plugins should be visible in the list.<br>Note that using mono plugins on stereo tracks is not a problem, two will be used in parallell.<br>Also beware that the 'all' alternative includes plugins that probably not are usable by MusE. - Выберите типы плагинов, которые будут видны в списке.<br>Обратите внимание, что можно использовать моно плагины в стерео треках, два будут использованы параллельно.<br>Также будте осторожны с плагинами категории "все" альтернативные, возможно их нельзя использовать в MusE. + move down + передвинуть ниже - - Search in 'Label' and 'Name': - Искать по "Меткам" и "Именам": + remove + удалить - - - MusEGui::PluginGui - - File Buttons - Файловые кнопки + bypass + обойти - - Load Preset - Загрузить пресет + show gui + показать ГИП - - Save Preset - Сохранить пресет + show native gui + показать родной ГИП - - - bypass plugin - обойти плагин + save preset + сохранить пресет - - MusE: load preset - MusE: загрузить пресет + MusE: Save Preset + MusE: Сохранить Пресет - - Error reading preset. Might not be right type for this plugin - Ошибка прочтения пресета. Возможно неверный тип для этого плагина + Replace effect + Заменить эффект - - MusE: save preset - MusE: сохранить пресет + Do you really want to replace the effect %1? + Вы действительно хотите заменить эффект %1? - MusEGui::ProjectCreateImpl + MusEGui::Header - - Select directory - + Track Info Columns + Трек-инфо - MusEGui::RoutePopupMenu + MusEGui::LMaster - - - - - - - - - Channel - Канал + MusE: Mastertrack + MusE: Мастер-трек - - - - Soloing chain - + &Edit + &Правка - - - Audio returns - + Insert Tempo + Вставить темп - - Warning: No input devices! - + Insert Signature + Вставить размер - - Open midi config... - + Insert Key + Вставить ключ - - - <none> - <ничего> + Edit Positon + Изменить позицию - - Toggle all - + Edit Value + Изменить значение - - More... - + Delete Event + Удалить событие - - Audio sends - + Window &Config + Кофигурация &окна - - Midi port sends - + Undo/Redo tools + инструменты Отменить/Повторить - - - MusEGui::ScoreCanvas - - Treble - + Edit tools + Инструменты правки - - Bass - + Tempo + Темп - - Grand Staff - + Timesig + Размер - - Remove staff - + Key + Ключ - - Ambiguous part - + new tempo + новый темп - - There are two or more possible parts you could add the note to, but none matches the selected part. Please select the destination part by clicking on any note belonging to it and try again, or add a new stave containing only the destination part. - + new signature + новый размер - - No part - + new key + новый ключ - - There are no parts you could add the note to. - + panic + паника - - - MusEGui::ScoreEdit - - Undo/Redo tools - + transport + транспорт - - Step recording tools - + Meter + Индикатор - - Step Record - Пошаговая запись + Time + Время - - panic - паника + Type + Тип - - transport - транспорт + Value + Значение - - Note settings - + Reposition of the initial tempo and signature events is not allowed + Изменение начального темпа и размера запрещено - - Note length: - + MusE: List Editor + MusE: Редактор списка - - last - + Input error, conversion not OK or value out of range + Ошибка ввода, неверная конверсия или значение вне диапазона - - - - Apply to new notes: - + Reposition of tempo and signature events to start position is not allowed! + Изменение темпа и размера запрещено! + + + MusEGui::ListEdit - - - Apply to selected notes: - + insert Note + вставить Ноту - - Velocity: - + insert SysEx + вставить SysEx - - Off-Velocity: - + insert Ctrl + Вставить кнтрл - - Quantisation settings - + insert Meta + вставить Meta - - Quantisation: - + insert Channel Aftertouch + вставить Channel посленажатие - - Pixels per whole: - + insert Poly Aftertouch + вставить Полиф. Посленаж - &Edit - &Правка - - - - C&ut - &Вырезать + &Правка - - &Copy - С&копировать + Cut + Вырезать - - Copy events in range - + Copy + Копировать - - &Paste - &Вставить + Paste + Вставить - - Paste (with dialog) - + Delete Events + Удалить события - - Delete &Events - Удалить &События + Window &Config + Конфигурация &окна - - &Select - + Undo/Redo tools + Инструменты Отменить/Вернуть - - Select &All - + Insert tools + Инструменты вставки - - &Deselect All - &Убрать выделение + panic + паника - - Invert &Selection - + transport + транспорт - - &Inside Loop - &Внутри цикла + Tick + Тик - - &Outside Loop - &Вне цикла + Bar + Такт - - Fu&nctions - + Type + Тип - - &Quantize - + Ch + Кан - - Change note &length - + Val A + Знач. А - - Change note &velocity - + Val B + Знач. B - - Crescendo/Decrescendo - + Val C + Знач. С - - Transpose - Транспонировать + Len + Дл - - Erase Events - + Comment + Комментарий + + + MusEGui::MPConfig - - Move Notes - + Default input connections + Вх. соединения по умолч - - Set Fixed Length - + Are you sure you want to apply to all existing midi tracks now? + Уверены, что хотите применить ко всем существующим midi трекам? - - Delete Overlaps - Удалить наложения + Default output connections + Вых. соединения по умолч - - Legato - + Setting will apply to new midi tracks. +Do you want to apply to all existing midi tracks now? + Настройка будет применена к новым midi трекам. +Хотите применить её ко всем уже существующим midi трекам? - - Window &Config - + MusE: bad device name + MusE: неверное имя устройства - - Note head &colors - + please choose a unique device name + пожалуйста, выберите неповторяющееся имя для устройства - - &Black - + in + в - - &Velocity - + out + вне (из) - - &Part - + Show first aliases + Показать первые псевдонимы - - Set up &preamble - + Show second aliases + Показать вторые псевдонимы - - Display &key signature - + Toggle all + Переключить все - - Display &time signature - + Change all tracks now + Изменить все треки - - Set Score &name - + Create Jack device + Создать Jack-устройство - - - Enter the new score title - + Port Number + Номер порта - - Error - + Enable gui + Разрешить ГИП - - Changing score title failed: -the selected title is not unique - + Enable reading + Разрешить чтение - - - MusEGui::ScrollScale - - next page - след страница + Enable writing + Разрешить запись - - previous page - пред страница + Port instrument + Инструмент - - current page number - номер текущей страницы + Midi device name. Click to edit (Jack) + Имя устройства midi. Щелкните для правки (Jack) - - - MusEGui::ShortcutCaptureDialog - - Ok - + Connections from Jack Midi outputs + Соединения с midi-выходами Jack - - Cancel - Отмена + Connections to Jack Midi inputs + Соединения с midi-входами Jack - - Shortcut conflicts with %1 - + Auto-connect these channels to new midi tracks + Авто-соединение этих каналов с новыми midi-треками - - Undefined - Не назначено + Auto-connect new midi tracks to these channels + Авто-соединение новых midi-треков с этими каналами - - - MusEGui::SigScale - - signature scale - шкала ключей + Auto-connect new midi tracks to this channel + Авто-соединение новых midi-треков с этим каналом - - - MusEGui::Strip - - Remove track? - + Device state + Состояние устройства - - - MusEGui::TList - - <none> - <ничего> + Enable gui for device + Разрешить ГИП для устройства - - visible - + Enable reading from device + Разрешить чтение с устройства - - no clef - + Enable writing to device + Разрешить запись на устройство - - Treble - + Name of the midi device associated with this port number. Click to edit Jack midi name. + Имя midi-устройства связано с этим номером порта "Jack". Щелкните для правки. - - Bass - + Instrument connected to port + Инструмент - - Grand - + Connections from Jack Midi output ports + Соединения с выходными midi-портами Jack - - MusE: bad trackname - MusE: неверное имя трека + Connections to Jack Midi input ports + Соединения с входными midi-портами Jack - - please choose a unique track name - Выберите неповторяющееся имя для трека + Auto-connect these channels, on this port, to new midi tracks. + Авто-соединение этих каналов, этого порта с новыми midi треками. - - Unused Devices - + Connect new midi tracks to these channels, on this port. + Соединять новые midi треки с этими каналами, этого порта. - - - Update drummap? - Обновить карту ударных? + Connect new midi tracks to this channel, on this port. + Соединять новые midi треки с этим каналом, этого порта. - - Do you want to use same port for all instruments in the drummap? - Вы хотите использовать один и тот же порт для всех инструментов в списке ударных? + State: result of opening the device + Состояние: результат открытия устройства - - - &Yes - &Да + Port + Порт - - - &No - &Нет + GUI + ГИП - - - show gui - показать ГИП + I + Вх - - - show native gui - показать ГИП + O + Вых - - Treble clef - + Instrument + Инструмент - - Bass clef - + Device Name + Имя устройства - - Grand Staff - + In routes + Вх. маршруты - - Viewable automation - + Out routes + Вых. маршруты - - Delete Track - Удалить трек + Def in ch + вх кан по ум - - Track Comment - Комментарий к треку + Def out ch + вых кан по ум - - Insert Track - + State + Состояние - - Midi - + <unknown> + <неизвестно> - - Drum - Ударные + <none> + <ничего> + + + MusEGui::MTScale - - Do you want to use same port and channel for all instruments in the drummap? - Вы хотите использовать один и тот же порт и канал для всех инструментов в списке ударных? + bar scale + шкала тактов - MusEGui::TempoSig + MusEGui::MTScaleFlo - - Tempo/Sig - Темп/Знаки альтерации + bar scale + шкала тактов - MusEGui::Toolbar1 + MusEGui::MarkerView - - - - Off - + MusE: Marker + MusE: Маркер - - Solo - Соло + add marker + добавить маркер - - Cursor - Курсор + delete marker + удалить маркер - - Snap - Привязка + &Edit + &Правка - - - MusEGui::TopWin - - As subwindow - + Window &Config + Конфигурация &окна - - Shares tools and menu - + Undo/Redo tools + инструменты Отменить/Вернуть - - Fullscreen - + edit tools + инструменты правки - - Piano roll - + panic + паника - - List editor - + transport + транспорт - - Drum editor - + Bar:Beat:Tick + Такт:Доля:Тик - - Master track editor - + Hr:Mn:Sc:Fr:Sf + Чс:Мин:Сек:Фрм:Субфрм - - Master track list editor - + Lock + Закрыть - - Wave editor - + Text + Текст - - Clip list - + Marker Properties + Свойства маркера + + + MusEGui::MasterEdit - - Marker view - + MusE: Mastertrack + MusE: Мастер-трек - - Score editor - + Window &Config + Конфигурация &окна - - Arranger - Компоновщик + Undo/Redo tools + инструменты Отменить/Вернуть - - <unknown toplevel type> - + panic + паника - - - MusEGui::TrackComment - - MusE: Track Comment - MusE: Комментарий к треку + transport + транспорт - - Track Comment: - Комментарий к треку: + Enable master + Разрешить мастер(а) - - - MusEGui::Transport - - Overdub - Наложить + Enable + Разрешить - - - Replace - Заменить + Enable usage of master track + Разрешить использование мастер-трека - - Rec Mode - Режим записи + Info + Инфо - - Normal - Норм. + Cursor + Курсор - - Mix - Смешать + time at cursor position + время в позиции курсора - - Cycle Rec - Циклич. запись + tempo at cursor position + темп в позиции курсора - - punchin - + Off + Выкл - - loop - цикл + Bar + Такт - - punchout - + Snap + Привязка - - - Punch In - Начало врезки + CurPos + КурсПоз - - - Loop - Цикл + tempo at current position + темп в текущей позиции - - - Punch Out - Конец врезки + time signature at current position + размер в текущей позиции + + + MusEGui::MidiInputTransformDialog - - Left Mark - Левый маркер + New + Новый + + + MusEGui::MidiStrip - - Right Mark - Правый маркер + off + выкл - - rewind to start - перемотать к началу + double click on/off + двойной щелчок вкл/выкл - - Click this button to rewind to start position - Щелкните по этой кнопке для перемещения к началу + VariationSend + Вариационный посыл - - rewind - перемотать назад + Var + Вар - - Click this button to rewind - Щелкните по этой кнопке для перемотки назад + ReverbSend + Посыл Реверберации - - forward - перемотать вперёд + Rev + Ревер - - Click this button to forward current play position - Щелкните по этой кнопке для перемещения вперёд + ChorusSend + Посыл Хоруса - - stop - остановить + Cho + Хорус - - Click this button to stop playback - Щелкните по этой кнопке для остановки воспроизведения + dB + дБ - - play - воспроизвести + Pan/Balance + Пан/Баланс - - Click this button to start playback - Щелкните по этой кнопке, чтобы начать воспроизведение + Pan + Пан - record - + запись - - Click this button to enable recording - Щелкните по этой кнопке для активизации режима записи + mute + без звука - - AC - AC + solo mode + соло + + + input routing + маршрут входа + + + output routing + маршрут выхода + + + MusEGui::MidiSyncConfig - - quantize during record - квантовать при записи + Port Number + Номер порта - - Click - Метр. + Name of the midi device associated with this port number + Имя MIDI-устройства, ассоциированного с номером этого порта - - metronom click on/off - Метроном вкл/выкл + Midi clock input detected + Обнаружен вход midi-clock - - Sync - Синхр. + Midi tick input detected + Обнаружен вход midi-тика - - external sync on/off - Вкл/выкл внешн. синхр. + Midi real time input detected + Обнаружен midi-вход реального времени - - Jack - Jack + MMC input detected + Обнаружен вход MMC - - Jack transport sync on/off - Синхр. транспорта "Jack" вкл/выкл + MTC input detected + Обнаружен вход MTC - - Master - Мастер + Detected SMPTE format + Обнаруженые SMPTE форматы - - use master track - использовать мастер-трек + Receive id number. 127 = Global. Double click to edit. + Получить id номер. 127 = Общий. Двойной щелчок - правка. - - - MusEGui::VisibleTracks - - - Show wave tracks - + Accept midi clock input + Принять вход Midi-clock - - - Show group tracks - + Accept midi real time input + Принять midi-вход реального времени - - - Show aux tracks - + Accept MMC input + Принять вход MMC - - - Show input tracks - + Accept MTC input + Принять вход MTC - - - Show output tracks - + Receive start rewinds before playing + Получить перед воспроизведением сообщение о начале перемотки - - - Show midi tracks - + Transmit id number. 127 = Global. Double click to edit. + Передать номер id. 127 = Общий. Двойной щелчок - правка. - - - Show synth tracks - + Send midi clock output + Послать выход midi-clock - - Visible track types - + Send midi realtime output + Послать midi-выход реального времени - - - MusEGui::WaveEdit - - &Edit - &Правка + Send MMC output + Послать выход MMC - - Func&tions - Фу&нкции + Send MTC output + Послать выход MTC - - &Gain - &Усиление + Midi clock input detected. +Current port actually used is red. +Click to force a port to be used. + Обнаружен вход midi-clock. +Фактически используемый +текущий порт - красный. +Щелкните, чтобы принудительно +использовать порт. - 200% - 200% + Midi realtime input detected, including + start/stop/continue, and song position. + Обнаружен midi-вход реального времени, +с "старт/стоп/продолжить" и позицией проекта. - 150% - 150% + MMC input detected, including stop/play/deferred play, and locate. + Обнаружен MMC-вход c "старт/стоп/отложенное воспроизведение" + и локацией. - 75% - 75% + MTC input detected, including forward quarter-frame sync and full-frame locate. +Current port actually used is red. Click to force a port to be current. + Обнаружен MTC-вход, с четверть-фреймовой +синхронизацией и полно-фреймовой локацией. +Фактически используемый +текущий порт - красный. +Щелкните, чтобы принудительно +сделать порт текущим. - 50% - 50% + Detected SMPTE format: 24fps, 25fps, 30fps drop frame, or 30fps non-drop +Detects format of MTC quarter and full frame, and MMC locate. + Обнаруженые форматы SMPTE: 24fps, 25fps, 30fps с пропущенным +фреймом, или 30fps без пропущенного фрейма +Обнаруживает MTC-формат четверть и полно-фреймовый, и MMC локацию. - 25% - 25% + Receive id number. 127 = global receive all, even if not global. + Получить номер id. 127 =общий получает все, даже если не общий. - - Other - Другой + Accept midi clock input. Only one input is used for clock. +Auto-acquire: If two or more port realtime inputs are enabled, + the first clock detected is used, until clock is lost, + then another can take over. Best if each turns off its clock + at stop, so MusE can re-acquire the clock from another port. +Click on detect indicator to force another. + Принять вход midi-clock. Только один вход используется для "clock". +Авто-получение: если разрешены два или более входов реального времени на порт, то будут использован первый обнаруженный "clock", пока он не будет потерян, затем будет использован другой. Самое лучшее, если каждый отключит свой "clock" во время остановки, чтобы MusE снова получил "clock" с другого порта. Щелкните по индикатору обнаружения, чтобы сделать по другому. - - &Copy - С&копировать + Accept midi realtime input, including + start/stop/continue, and song position. +Non-clock events (start,stop etc) are + accepted by ALL enabled ports. +This means you may have several master + devices connected, and muse will accept + input from them. + Принять midi-вход реального времени +с "старт/стоп/продолжить" и позицией проекта. +События "Non-clock" (старт, стоп, и т. п.) принимаются +ВСЕМИ разрешенными портами. Это означает, что вы +можете иметь несколько подсоединенных мастер-устройств, +и MusE примет вход от них. - - C&ut - &Вырезать + Accept MMC input, including stop/play/deferred play, and locate. + Принять вход MMC, с "стоп/старт/отложенным воспроизведением" и локацией. - - &Paste - &Вставить + Accept MTC input, including forward quarter-frame sync and full-frame locate. +See 'rc' column for more help. + Принять вход MTC, с четверть-фреймовой +синхронизацией и полно-фреймовой локацией. +См. колонку "rc" для получения помощи. - - Edit in E&xternal Editor - Редактировать во &внешнем редакторе + When start is received, rewind before playing. +Note: It may be impossible to rewind fast + enough to synchronize with the external device. + Когда сообщение "старт" получено, перемотать перед +воспроизведением. Примечание: может быть +так, что перемотка окажется недостаточно быстрой +для синхронизации с внешним устройством. - - Mute Selection - Заглушить выделенное + Transmit id number. 127 = global transmit to all. + Передавать номер id. 127 = общая передача для всех. - - Normalize Selection - Нормализовать выделенное + Send midi clock output. If 'Slave to External Sync' is chosen, + muse can re-transmit clock to any other chosen ports. + Посылать выход midi-clock. Если выбрано "Slave to External Sync", +то MusE может снова передать "clock" на любой другой выбранный порт. - - Fade In Selection - Нарастание звука в выделенном + Send midi realtime output, including start/stop/continue, + and song position. If 'Slave to external sync' is chosen, + muse can re-transmit midi realtime input messages to any + other chosen ports. This means you may have several slave + devices connected, and muse can re-send realtime messages + to any or all of them. + Послать midi-выход реального времени, с "старт/стоп/продолжить" +и позицией проекта. Если выбрано "Slave to External Sync", +то MusE может снова передать сообщения с midi-входа реального +времени на любой другой выбранный порт. Это значит, что вы можете +иметь несколько присоединенных ведомых устройств, и MusE может снова послать сообщения реального времени на любое из них или на все. - - Fade Out Selection - Затихание звука в выделенном + Port + Порт - - Reverse Selection - Перевернуть выделенное + Device Name + Имя устройства - - Select - Выделить + c + c - - Select &All - + k + k - - &Deselect All - &Убрать выделение + r + r - - Window &Config - + m + m - - Wave edit tools - Инструменты редактирования Wave + t + t - - transport - транспорт + type + тип - - WaveEdit tools - + rid + rid - - Solo - Соло + rc + rc - - Cursor - Курсор + rr + rr - - - MusEGui::WaveView - - MusE - external editor failed - MusE - ошибка запуска внешнего редактора + rm + rm - - MusE was unable to launch the external editor -check if the editor setting in: -Global Settings->Audio:External Waveditor -is set to a valid editor. - "MusE" не может запустить внешний редактор. -Проверте, действительно ли в: -Общие настройки->Аудио:Внешний редактор -выбран правильный редактор. + rt + rt - - MusE - file size changed - MusE - размер файла изменился + rw + rw - - When editing in external editor - you should not change the filesize -since it must fit the selected region. - -Missing data is muted - При редактировании во внешнем редакторе - не изменяйте размер файла -так как он должен соответствовать выбранной области. - -Утерянные данные заглушены + tid + tid - - - MusEMixer::AudioMixerApp - &View - &Вид + tc + tc - Routing - Маршрутизация + tr + tr - Show Midi Tracks - Показать Midi-треки + tm + tm - Show Drum Tracks - Показать треки ударных + tt + tt - Show Wave Tracks - Показать Wave-треки + MusE + MusE - Show Inputs - Показать входы + Settings have changed +Apply sync settings? + Настройки изменились +Применить настройки синхронизации? - Show Outputs - Показать выходы + &Apply + &Применить - Show Groups - Показать группы + &No + &Нет - Show Auxs - Показать Auxs + &Abort + &Отмена - Show Synthesizers - Показать синтезаторы + <none> + <ничего> - MusEMixer::AudioStrip - - panorama - панорама - - - aux send level - уровень aux посыла - + MusEGui::MidiTrackInfo - Pan - Пан + <unknown> + <неизвестно> + + + MusEGui::MidiTransformerDialog - 1/2 channel - стерео-моно + New + Новый + + + MusEGui::MixdownFileDialog - Pre - Пре + Wave Files (*.wav);;All Files (*) + Файлы Wave (*.wav);;Все файлы (*) + + + MusEGui::MusE - pre fader - post fader - пре федер - пост федер + Failed to start audio! + Не могу воспроизвести аудио! - mute - заглушить + Was not able to start audio, check if jack is running. + + Не могу воспроизвести аудио, проверьте работает ли "Jack". + - record downmix - записать downmix + Timeout waiting for audio to run. Check if jack is running. + + Ожидание запуска аудио. Проверьте, работает ли "Jack". + - solo mode - режим соло + Und&o + &Отменить - off - выкл + Re&do + &Повторить - iR - вх + undo last change to song + отменить последнее изменение в проекте - input routing - маршрут входа + redo last undo + повторить последнюю отмену - oR - вых + Loop + Цикл - output routing - маршрут выхода + loop between left mark and right mark + цикл между левым и правым маркерами - Read - Читать + Punchin + Начало врезки - Touch - По касанию + record starts at left mark + запись начинается с левого маркера - automation type - тип автоматизации + Punchout + Конец врезки - - - MusEMixer::EffectRack - effect rack - рэк эффектов + record stops at right mark + запись останавливается на правом маркере - new - новый + Start + К началу - change - изменить + rewind to start position + перемотать к начальной позиции - move up - сдвинуть выше + Rewind + Перемотать назад - move down - сдвинуть ниже + rewind current position + перемотать к текущей позиции - remove - удалить + Forward + Перемотать вперёд - bypass - обойти + move current position + переместить текущую позицию - show gui - показать ГИП + Stop + Остановить - show native gui - показать ГИП + stop sequencer + остановить секвенсер - save preset - сохранить пресет + Play + Воспроизвести - MusE: Save Preset - MusE: Сохранить Пресет + start sequencer play + начать воспроизведение в секвенсере - Replace effect - Заменить эффект + Record + Записать - Do you really want to replace the effect %1? - Вы действительно хотите заменить эффект %1? + to record press record and then play + чтобы начать запись нажмите "запись", а затем "воспроизвести" - - - MusEMixer::MidiStrip - off - выкл + Panic + Паника - double click on/off - двойной щелчок вкл/выкл + send note off to all midi channels + посылает сообщение "note off" на все midi-каналы - VariationSend - Вариационный посыл + &New + &Новый - Var - Вар + Create New Song + Создать Новый Проект - ReverbSend - Посыл Реверберации + &Open + &Открыть - Rev - Ревер + Click this button to open a <em>new song</em>.<br>You can also select the <b>Open command</b> from the File menu. + Щелкните по этой кнопке для открытия другого проекта. Вы также можете выбрать пункт Открыть в меню "Файл". - ChorusSend - Посыл Хоруса + Open &Recent + Открыть &Недавние - Cho - Хорус + &Save + &Сохранить - Pan/Balance - Пан/Баланс + Click this button to save the song you are editing. You will be prompted for a file name. +You can also select the Save command from the File menu. + Щелкните по этой кнопке для сохранения проекта. Будет предложено ввести имя файла. +Вы также можете выбрать пункт "Сохранить" в меню "Файл". - Pan - Пан + Save &As + Сохранить &Как - mute - заглушить + Import Midifile + Импортировать MIDI-файл - solo mode - режим соло + Export Midifile + Экспортировать MIDI-файл - iR - вх + Import Part + Импортировать Партию - input routing - маршрут входа + Import Wave File + Импортировать Wave-файл - oR - вых + Find unused wave files + Найти не используемые wave-файлы - output routing - маршрут выхода + &Quit + Вы&йти - - - MusEWidget::BigTime - format display - формат дисплея + Song Info + Информация о Проекте - bar - такт + Transport Panel + Панель транспорта - beat - доля + Bigtime Window + Окно хронометра - tick - тик + Mixer A + Микшер А - minute - минут(а) + Mixer B + Микшер В - second - секунд(а) + Cliplist + Список клипов - frame - фреймов + Marker View + Маркеры - subframe - субфреймов + Arranger View + Показывать Компоновщик - MusE: Bigtime - MusE: Хронометр + Fullscreen + Во весь экран - - - MusEWidget::EditToolBar - Edit Tools - Инструменты редактирования + &Plugins + &Плагины - - - MusEWidget::MidiSyncConfig - Port Number - Номер порта + Edit Instrument + Редактировать Инструмент - Name of the midi device associated with this port number - Имя MIDI-устройства, ассоциированного с номером этого порта + Input Plugins + Плагины на входе - Midi clock input detected - Обнаружен вход midi-clock + Transpose + Транспонировать - Midi tick input detected - Обнаружен вход midi-тика + Midi Input Transform + Преобразовать входящие Midi-события - Midi real time input detected - Обнаружен midi-вход реального времени + Midi Input Filter + Фильтр входящих Midi-событий - MMC input detected - Обнаружен вход MMC + Midi Remote Control + Дистанционное управление Midi - MTC input detected - Обнаружен вход MTC + Rhythm Generator + Генератор Ритма - Detected SMPTE format - Обнаруженые SMPTE форматы + Reset Instr. + Перезагрузить Инстр. - Receive id number. 127 = Global. Double click to edit. - Получить id номер. 127 = Глобально. Двойной щелчок для редактирования. + Init Instr. + Запустить Инстр. - Accept midi clock input - Принять вход Midi-clock + Local Off + откл. локальное управление - Accept midi real time input - Принять midi-вход реального времени + Bounce to Track + Свести в трек - Accept MMC input - Принять вход MMC + Bounce to File + Свести в файл - Accept MTC input - Принять вход MTC + Restart Audio + Перезапустить аудио - Receive start rewinds before playing - Получить перед воспроизведением сообщение о начале перемотки + Mixer Automation + Автоматизация микшера - Transmit id number. 127 = Global. Double click to edit. - Передать номер id. 127 = Общий. Двойной щелчок для редактирования. + Take Snapshot + Сделать снимок - Send midi clock output - Послать выход midi-clock + Clear Automation Data + Удалить Данные Автоматизации - Send midi realtime output - Послать midi-выход реального времени + Cascade + Каскадом - Send MMC output - Послать выход MMC + Tile + Черепицей - Send MTC output - Послать выход MTC + In rows + В ряд - Midi clock input detected. -Current port actually used is red. -Click to force a port to be used. - Обнаружен вход midi-clock. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -использовать порт. + In columns + Колонками - Midi realtime input detected, including - start/stop/continue, and song position. - Обнаружен midi-вход реального времени, -с "старт/стоп/продолжить" и позицией проекта. + Global Settings + Общие настройки - MMC input detected, including stop/play/deferred play, and locate. - Обнаружен MMC-вход c "старт/стоп/отложенное воспроизведение" - и локацией. + Configure Shortcuts + Настроить горячие клавиши - MTC input detected, including forward quarter-frame sync and full-frame locate. -Current port actually used is red. Click to force a port to be current. - Обнаружен MTC-вход, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -Фактически используемый -текущий порт - красный. -Щелкните, чтобы принудительно -сделать порт текущим. + Follow Song + Следовать за проектом - Detected SMPTE format: 24fps, 25fps, 30fps drop frame, or 30fps non-drop -Detects format of MTC quarter and full frame, and MMC locate. - Обнаруженые форматы SMPTE: 24fps, 25fps, 30fps с пропущенным -фреймом, или 30fps без пропущенного фрейма -Обнаруживает MTC-формат четверть и полно-фреймовый, и MMC локацию. + Don't Follow Song + не следовать за проектом - Receive id number. 127 = global receive all, even if not global. - Получить номер id. 127 =глобальный получает все, даже если не глобальный. + Follow Page + следовать постранично - Accept midi clock input. Only one input is used for clock. -Auto-acquire: If two or more port realtime inputs are enabled, - the first clock detected is used, until clock is lost, - then another can take over. Best if each turns off its clock - at stop, so MusE can re-acquire the clock from another port. -Click on detect indicator to force another. - Принять вход midi-clock. Только один вход используется для "clock". -Авто-получение: если разрешены два или более входов реального времени на порт, то будут использован первый обнаруженный "clock", пока он не будет потерян, затем будет использован другой. Самое лучшее, если каждый отключит свой "clock" во время остановки, чтобы MusE снова получил "clock" с другого порта. Щелкните по индикатору обнаружения, чтобы сделать по другому. + Follow Continuous + следовать непрерывно - Accept midi realtime input, including - start/stop/continue, and song position. -Non-clock events (start,stop etc) are - accepted by ALL enabled ports. -This means you may have several master - devices connected, and muse will accept - input from them. - Принять midi-вход реального времени -с "старт/стоп/продолжить" и позицией проекта. -События "Non-clock" (старт, стоп, и т. п.) принимаются -ВСЕМИ разрешенными портами. Это означает, что вы -можете иметь несколько подсоединенных мастер-устройств, -и MusE примет вход от них. + Metronome + Метроном - Accept MMC input, including stop/play/deferred play, and locate. - Принять вход MMC, с "стоп/старт/отложенным воспроизведением" и локацией. + Midi Sync + Midi-Cинхр - Accept MTC input, including forward quarter-frame sync and full-frame locate. -See 'rc' column for more help. - Принять вход MTC, с четверть-фреймовой -синхронизацией и полно-фреймовой локацией. -См. колонку "rc" для получения помощи. + Midi File Import/Export + Импорт/Экспорт midi-файла - When start is received, rewind before playing. -Note: It may be impossible to rewind fast - enough to synchronize with the external device. - Когда сообщение "старт" получено, перемотать перед -воспроизведением. Примечание: может быть -так, что перемотка окажется недостаточно быстрой -для синхронизации с внешним устройством. + Appearance Settings + Настройки внешнего вида - Transmit id number. 127 = global transmit to all. - Передавать номер id. 127 =общая передача для всех. + Midi Ports / Soft Synth + MIDI-порты/Прогр. синтезаторы - Send midi clock output. If 'Slave to External Sync' is chosen, - muse can re-transmit clock to any other chosen ports. - Посылать выход midi-clock. Если выбрано "Slave to External Sync", -то MusE может снова передать "clock" на любой другой выбранный порт. + &Manual + &Руководство - Send midi realtime output, including start/stop/continue, - and song position. If 'Slave to external sync' is chosen, - muse can re-transmit midi realtime input messages to any - other chosen ports. This means you may have several slave - devices connected, and muse can re-send realtime messages - to any or all of them. - Послать midi-выход реального времени, с "старт/стоп/продолжить" -и позицией проекта. Если выбрано "Slave to External Sync", -то MusE может снова передать сообщения с midi-входа реального -времени на любой другой выбранный порт. Это значит, что вы можете -иметь несколько присоединенных ведомых устройств, и MusE может снова послать сообщения реального времени на любое из них или на все. + &MusE Homepage + &Домашняя страница MusE - Port - Порт + &Report Bug... + &Сообщить об ошибке... - Device Name - Имя устройства + &About MusE + &О программе MusE - c - c + File Buttons + Файловые кнопки - k - k + Undo/Redo + Отменить/Вернуть - r - r + Transport + Транспорт - t - t + &File + &Файл - type - тип + &View + &Вид - rid - rid + &Midi + &Midi - rc - rc + &Audio + &Аудио - rr - rr + A&utomation + &Автоматизация - rm - rm + &Windows + &Окна - rt - rt + MusE Se&ttings + Н&астройки - rw - rw + &Help + &Справка - tid - tid + Cannot read template + Не могу прочитать шаблон - tc - tc + File open error + Ошибка открытия файла - tr - tr + File read error + Ошибка прочтения файла - tm - tm + Unknown File Format: %1 + Неизвестный Формат Файла: %1 - tt - tt + MusE: Song: %1 + MusE: Проект: %1 - MusE - MusE + MusE: load project + MusE: Открыть проект - Settings have changed -Apply sync settings? - Настройки изменились -Применить настройки синхронизации? + MusE: load template + MusE: открыть шаблон - &Apply - &Применить + MusE: Write File failed + MusE: Не удалось записать файл - &No - &Нет + The current Project contains unsaved data +Save Current Project? + Текущий проект содержит не сохранённые данные. +Сохранить текущий проект? - &Abort - &Отмена + S&kip + Не &сохранять - <none> - <ничего> + &Cancel + &Отмена - - - MusEWidget::MidiTrackInfo - <unknown> - <неизвестно> + MusE: Save As + MusE: Сохранить как - - - MusEWidget::MixdownFileDialog - Wave Files (*.wav);;All Files (*) - Файлы Wave (*.wav);;Все файлы (*) + Nothing to edit + Нечего редактировать - - - MusEWidget::NoteInfo - Note Info - Информация о ноте + MusE: Bounce to Track + MusE: Свести в Трек - Len - Дл + No wave tracks found + wave-треки не найдены - Pitch - Высота тона + No audio output tracks found + Выходные аудио треки не найдены - Velo On - Скор. наж + Select one audio output track, +and one target wave track + Выберите один трек аудио выхода +и один wave-трек, как цель - Velo Off - Скор. снятия + Select one target wave track + Выберите один wave-трек, как трек назначения - - - MusEWidget::RoutePopupMenu - Channel - Канал + Select one target wave track, +and one audio output track + Выберите один wave-трек, как цель, +(трек назначения) и один трек аудио выхода - <none> - <ничего> + MusE: Bounce to File + MusE: Свести в файл - - - MusEWidget::ScrollScale - next page - след страница + Select one audio output track + Выберите один трек аудио выхода - previous page - пред страница + MusE: Bounce + MusE: Свести - current page number - номер текущей страницы + set left/right marker for bounce range + настройте левый/правый маркеры для установки диапазона сведения - - - MusEWidget::ShortcutCaptureDialog - Cancel - Отмена + The current Project contains unsaved data +Load overwrites current Project: +Save Current Project? + Текущий проект содержит не сохранённые данные. +Загрузка нового проекта приведёт к перезаписи данных текущего проекта. +Сохранить текущий проект? - Shortcut conflicts with - "Горячая клавиша" конфликтует с + &Abort + &Отмена - Undefined - Не назначено + MusE: Export Midi + MusE:Экспорт MIDI - - - MusEWidget::SigScale - signature scale - шкала ключей + no help found at: + справка не найдена в: - - - MusEWidget::Toolbar1 - Solo - Соло + MusE: Open Help + MusE: Открыть справку - Cursor - Курсор + Unable to launch help + Невозможно открыть справку - Snap - Привязка + For some reason MusE has to launch the default +browser on your machine. + По некоторым причинам MusE вынужден запустить +на вашей машине броузер по умолчанию. - - - MusEWidget::TrackComment - MusE: Track Comment - MusE: Комментарий к треку + MusE: Import Midi + MusE: Импорт MIDI - Track Comment: - Комментарий к треку: + Add midi file to current project? + + Добавить midi файл в текущий проект? + - - - NewPreset - New preset - Новый пресет + &Add to Project + &Добавить в Проект - Preset Name - Имя пресета + &Replace + &Заменить - INIT VOICE - НАЧАЛЬНЫЙ ГОЛОС + reading midifile + + читается Midi-файл + + - Subcategory - Субкатегория + +failed: + +не удалось: - NONE - НИЧЕГО + Import part is only valid for midi and wave tracks! + Импортирование партий допустимо только для midi и wave треков! - Category - Категория + MusE: load part + MusE: открыть партию - Bank - Банк + No track selected for import + Не выбран трек для импорта - Bank numerous - Несколько банков + %n part(s) out of %1 could not be imported. +Likely the selected track is the wrong type. + %n парти(я, и, ий) из %1 не могут быть импортированы. +Возможно выбранный трек неверного типа. + - Prog - Прог + %n part(s) could not be imported. +Likely the selected track is the wrong type. + %n парти(я, и, ий) могут быть импортированы. +Возможно выбранный трек неверного типа. + - Program numerous - Несколько программ + to import an audio file you have first to selecta wave track + чтобы импортировать аудио файл, вы должны сначала выбрать wave-трек - &Cancel - &Отмена + Import Wavefile + Импортировать wave-файл - Alt+C - Alt+C + This wave file has a samplerate of %1, +as opposed to current setting %2. +Do you still want to import it? + Samplerate этого wave-файла %1, +в то время как текущий Samplerate %2. +Хотите вы всё же импортировать его? - &Ok - &ОК + &Yes + &Да - Alt+O - Alt+O + &No + &Нет - NoteInfo + MusEGui::NoteInfo Note Info - Информация о ноте + Информация о ноте Start - Начало + Начало Len - Дл + Дл Pitch - Высота тона + Высота тона Velo On - Скор. наж + Скор. наж Velo Off - Скор. снятия + Скор. снятия - OrganGuiBase + MusEGui::PartCanvas - - MusE: Organ - MusE: Орган + Cannot copy/move/clone to different Track-Type + Невозможно копировать/перемещать/клонировать данные в разные типы дорожек - - O-1 - O-1 + C&ut + &Вырезать - - Oscillator - Осциллятор + &Copy + С&копировать - - Brass - Медные духовые + s&elect + в&ыбрать - - Reed - Язычковые деревянные духовые + clones + клоны - - Flute - Флейта + rename + переименовать - - 16' - 16' + color + цвет - - 4' - 4' + delete + удалить - - 2 2/3' - 2 2/3' + split + разделить - - 2' - 2' + glue + клей - - 8' - 8' + super glue (merge selection) + супер клей (смешать выделенное) - - 5 1/3' - 5 1/3' + de-clone + де-клонировать - - - Release - Послезвучие + save part to disk + сохранить партию на диске - - - Sustain - Стационарная часть звука + wave edit + правка сэмплов - - - Decay - Спад огибающей + file info + Информация о файле - - - Attack - Атака + MusE: save part + MusE: сохранить партию - - - - - - - ms - мс + Part name: %1 +Files: + Имя партии: +Файлы: - - Velocity - Скорость нажатия + %n part(s) out of %1 could not be pasted. +Likely the selected track is the wrong type. + %n парти(я)(и)(й) из %1 не могут быть вставлены. +Неверный формат, выбранного трека. + - - Drawbars - Слайдеры регистров + %n part(s) could not be pasted. +Likely the selected track is the wrong type. + %n парти(я)(и)(й) не могут быть вставлены. +Неверный формат, выбранного трека. + - - Envelope Hi - Верх огибающей + Cannot paste: multiple tracks selected + Вставка невозможна: выбрано несколько треков - - - cB - cB + Cannot paste: no track selected + Вставка невозможна: нет выбранного трека - - Envelope Lo - Низ огибающей + Can only paste to midi/drum track + Можно вставить только в midi/drum трек + + + Can only paste to wave track + Можно вставить только в wave-трек + + + Can only paste to midi or wave track + Можно вставить только в midi или wave треки + + + Cannot paste: wrong data type + Вставка невозможна: неверный тип данных - PartCanvas + MusEGui::PasteDialog - Cannot copy/move/clone to different Track-Type - Невозможно копировать/перемещать/клонировать данные в другие типы дорожек + %n quarter(s) + %n четверт(и) + + + + %1 quarter + for floating-point arguments like 1.5 + %n четверть + + + %1 quarters + for floating-point arguments like 1.5 + %n четверти + + + + MusEGui::PasteEventsDialog + + %n quarter(s) + %n четверт(и) + + + + %1 quarter + for floating-point arguments like 1.5 + %n четверть + + + %1 quarters + for floating-point arguments like 1.5 + %n четверти + + + + MusEGui::PianoRoll + + &Edit + &Правка + + + C&ut + &Вырезать + + + &Copy + С&копировать - C&ut - &Вырезать + Copy events in range + Копировать события в диапазоне - &Copy - С&копировать + &Paste + &Вставить - rename - Переименовать + Paste (with dialog) + Вставить (с диалогом) - color - цвет + Delete &Events + Удалить &События - delete - удалить + &Select + &Выделить - split - разделить + Select &All + Выделить &Всё - glue - склеить + &Deselect All + &Снять выделение - de-clone - деклонировать + Invert &Selection + Инвертировать &Выделенное - pianoroll - Пианорол + &Inside Loop + &Внутри цикла - list - Редактор списка событий + &Outside Loop + &Вне цикла - drums - Редактор ударных + &Previous Part + &Предыдущая партия - wave edit - Редактор семплов + &Next Part + &Следующая партия - Cannot paste: multiple tracks selected - Вставка невозможна: выделено несколько треков + Fu&nctions + &Функции - Cannot paste: no track selected - Вставка невозможна: не выделено ни одного трека + Quantize + Квантовать - Cannot paste: wrong data type - Вставка невозможна: неверный тип данных + Modify Note Length + Изменить Длину Ноты - Can only paste to midi/drum track - Можно вставить только в midi/drum трек + Modify Velocity + Изменить скорость наж - Can only paste to wave track - Можно вставить только в звуковой трек + Crescendo/Decrescendo + Крещендо/Диминуэндо - export - экспорт + Transpose + Транспонировать - MusE: save part - MusE: сохранить партию + Erase Events + Удалить События - s&elect - В&ыбрать + Move Notes + Передвинуть Ноты - clones - клоны + Set Fixed Length + Установить Фиксир. Длину - file info - файл-инфо + Delete Overlaps + Удалить наложения - Part name - Имя партии + Legato + Легато - Files - Файлы + &Plugins + &Плагины - out of - из + Window &Config + Конфигурация &окна - parts - партии + &Event Color + &Цвет события - part - партия + &Blue + &Синий - could not be pasted. -Likely the selected track is the wrong type. - не может быть вставлена. -Возможно выбранный трек не того типа. + &Pitch colors + &Цвета высоты тона - Can only paste to midi or wave track - Можно вставить только в midi или wave треки + &Velocity colors + &Цвета скорости нажатия - - - PasteDialogBase - - MusE: Paste Parts - + Pianoroll tools + Инструменты пианоролла - - Number and raster - + Step Record + Пошаговая запись - - insert - + Midi Input + Midi-вход - - times - + Play Events + Воспроизвести события - - raster - + panic + паника - - ticks - + transport + транспорт - - Move, Merge, Clone - + ctrl + ctrl - - Move everything to the right - + Add Controller View + Добавить панель + + + MusEGui::PluginDialog - - Move only affected parts to the right - + MusE: select plugin + MusE: выбрать плагин - - Put everything into a single track - + Lib + Библ - - Merge with existing parts - + Label + Метка - - Insert as clones (where possible) - + Name + Имя - - OK - + AI + AI - - Cancel - Отмена + AO + AO - - - PasteEventsDialogBase - - MusE: Paste Events - + CI + CI - - Number and raster - + CO + CO - - insert - + IP + IP - - times - + id + id - - raster - + Maker + Создатель - - - ticks - + Copyright + Copyright - - Paste options - + Ok + Ok - - Always into existing parts - + Cancel + Отмена - - Never into existing parts - + Mono and Stereo + Моно и Стерео - - Into existing parts if part has not -to be expanded by more than - + Stereo + Стерео - - Put everything into the (selected) part - + Mono + Моно - - OK - + Show All + Показать Все - - Cancel - Отмена + Select which types of plugins should be visible in the list.<br>Note that using mono plugins on stereo tracks is not a problem, two will be used in parallell.<br>Also beware that the 'all' alternative includes plugins that probably not are usable by MusE. + Выберите типы плагинов, которые будут видны в списке.<br>Обратите внимание, что можно использовать моно плагины в стерео треках, два будут использованы параллельно.<br>Также будте осторожны с плагинами категории "все" альтернативные, возможно их нельзя использовать в MusE. - - - PatchBay - MusE: ALSA MIDI Patch Bay - MusE: ALSA MIDI Patch Bay + Search in 'Label' and 'Name': + Искать по "Меткам" и "Именам": - PatchBayBase + MusEGui::PluginGui - ALSA Patch Bay - ALSA Patch Bay + File Buttons + Файловые кнопки - - - PianoRoll - &Edit - &Правка + Load Preset + Загрузить пресет - Cut - Вырезать + Save Preset + Сохранить пресет - Copy - Скопировать + bypass plugin + обойти плагин - Paste - Вставить + MusE: load preset + MusE: загрузить пресет - Delete Events - Удалить события + Error reading preset. Might not be right type for this plugin + Ошибка прочтения пресета. Возможно неверный тип для этого плагина - Select All - Выделить всё + MusE: save preset + MusE: сохранить пресет + + + MusEGui::ProjectCreateImpl - Select None - Убрать выделение + Select directory + Выбрать папку + + + MusEGui::RoutePopupMenu - Invert - Инвертировать + Channel + Канал - Inside Loop - Внутри цикла + Soloing chain + Соло цепи - Outside Loop - Вне цикла + Audio returns + Аудио возвраты - &Select - &Выбрать + Warning: No input devices! + Предупреждение: Нет входных устройств! - blue - голубой + Open midi config... + Открыть midi конфиг... - pitch colors - цвета высоты тона + <none> + <ничего> - velocity colors - цвета скорости нажатия + Toggle all + Переключить все - &Config - &Настроить + More... + Ещё... - event color - цвет события + Audio sends + Аудио посылы - &Functions - &Функции + Midi port sends + Посылы midi порта + + + MusEGui::ScoreCanvas - Over Quantize - Квантовка + Treble + Скрипичный - Note On Quantize - Квантовка начала ноты + Bass + Басовый - Note On/Off Quantize - Квантовка начала/окончания ноты + Grand Staff + Большой стан - Iterative Quantize - Повторная квантовка + Remove staff + Удалить стан - Config Quant... - Настройка квантования + Ambiguous part + Неопределенная партия - Modify Gate Time - Изменить время звучания + There are two or more possible parts you could add the note to, but none matches the selected part. Please select the destination part by clicking on any note belonging to it and try again, or add a new stave containing only the destination part. + Существуют две или более партии, куда вы можете добавить ноту, но ни одна из них не совпадает с выбранной партией. Щелкните по любой ноте в партии, чтобы выбрать её как партию назначения и повторите попытку. Или добавьте нотный стан с партией назначения. - Modify Velocity - Изменить скорость нажатия + No part + Нет партии - Crescendo - Крещендо + There are no parts you could add the note to. + Нет партий, куда вы могли бы добавить ноту. + + + MusEGui::ScoreEdit - Transpose - Транспонировать + Undo/Redo tools + Инструменты Отменить/Вернуть - Thin Out - Удалить дубли + Step recording tools + Инструменты пошаговой записи - Erase Event - Удалить событие + Step Record + Пошаговая запись - Note Shift - Сдвиг ноты + panic + паника - Move Clock - Сдвинуть время + transport + транспорт - Copy Measure - Скопировать такт + Note settings + Настройки ноты - Erase Measure - Стереть такт + Note length: + Длина ноты: - Delete Measure - Удалить такт + last + - Create Measure - Создать такт + Apply to new notes: + Применить к новым нотам: - Pianoroll Tools - Инструменты пианорола + Apply to selected notes: + Применить к выбранным нотам: - Step Record - Пошаговая запись + Velocity: + Скорость наж: - Midi Input - MIDI-вход + Off-Velocity: + Скорость отп: - Play Events - Воспроизвести события + Quantisation settings + Настройки квантования - ctrl - кнтр + Quantisation: + Квантование: - Add Controller View - Добавить панель контроллеров + Pixels per whole: + Пикселей на целую: - Set Fixed Length - Установить фикс. длину + &Edit + &Правка C&ut - &Вырезать + &Вырезать &Copy - С&копировать + С&копировать + + + Copy events in range + Копировать события в диапазоне &Paste - &Вставить + &Вставить + + + Paste (with dialog) + Вставить (с диалогом) Delete &Events - Удалить &События + Удалить &События + + + &Select + &Выделить Select &All - Выбрать &Всё + Выделить &Всё &Deselect All - &Убрать выделение + &Снять выделение Invert &Selection - Обратить В&ыделение + &Инвертировать выделенное &Inside Loop - &Внутри цикла + &Внутри цикла &Outside Loop - &Вне цикла + &Вне цикла - &Previous Part - &Предыдущая партия + Fu&nctions + &Функции - &Next Part - &Следующая партия + &Quantize + &Квантовать - &Event Color - &Цвет события + Change note &length + Изменить длину &ноты - &Blue - &Синий + Change note &velocity + Изменить &скорость наж. ноты - &Pitch colors - &Цвета высоты тона + Crescendo/Decrescendo + Крещендо/Диминуэндо - &Velocity colors - &Цвета скорости нажатия + Transpose + Транспонировать + + + Erase Events + Удалить события + + + Move Notes + Передвинуть события - Quantize - Квантовать + Set Fixed Length + Установить фикс. длину Delete Overlaps - Удалить наложения + Удалить наложения - &Plugins - &Плагины + Legato + Легато - Pianoroll tools - Инструменты пианоролла + Window &Config + &Настройка окна - panic - паника + Note head &colors + &Цвет головки ноты - transport - транспорт + &Black + &Черный - - - PluginDialog - MusE: select plugin - MusE: выбрать плагин + &Velocity + &Скорость нажатия - Lib - Библ. + &Part + &Партия - Label - Метка + Set up &preamble + &Настроить преамбулу - Name - Имя + Display &key signature + &Показывать знаки при ключе - AI - AI + Display &time signature + &Показывать тактовый размер - AO - AO + Set Score &name + Назн. имя &партитуры - CI - CI + Enter the new score title + Ввести название партитуры - CO - CP + Error + Ошибка - IP - IP + Changing score title failed: +the selected title is not unique + Не удалось изменить название: +Такое название уже существует + + + MusEGui::ScrollScale - id - id + next page + след. страница - Maker - Создатель + previous page + предыд. страница - Copyright - Copyright + current page number + номер текущей страницы + + + MusEGui::ShortcutCaptureDialog Ok - Ok + Ok Cancel - Отмена + Отмена - Stereo and Mono - Стерео и Моно + Shortcut conflicts with %1 + "Горячая клавиша" конфликтует с %1 - Stereo - Стерео + Undefined + Не назначено + + + MusEGui::SigScale - Mono - Моно + signature scale + линейка ключей + + + MusEGui::Strip - All - Все + Remove track? + Удалить трек? + + + MusEGui::TList - Select which types of plugins should be visible in the list.<br>Note that using mono plugins on stereo tracks is not a problem, two will be used in parallell.<br>Also beware that the 'all' alternative includes plugins that probably not are usable by MusE. - Выберите типы плагинов, которые будут видны в списке.<br>Обратите внимание, что можно использовать моно плагины в стерео треках, два будут использованы параллельно.<br>Также будте осторожны с плагинами категории "все" альтернативные, возможно их нельзя использовать в MusE. + <none> + <ничего> - Mono and Stereo - Моно и Стерео + visible + видимые - Show All - Показать Все + no clef + без ключа - Search in 'Label' and 'Name': - Искать по "Меткам" и "Именам": + Treble + Скрипичный - - - PluginGui - File Buttons - Файловые кнопки + Bass + Басовый - Load Preset - Загрузить пресет + Grand + Большой стан - Save Preset - Сохранить пресет + MusE: bad trackname + MusE: неверное имя трека - bypass plugin - обойти плагин + please choose a unique track name + Выберите неповторяющееся имя для трека - MusE: load preset - MusE: загрузить пресет + Unused Devices + Неиспользованные устройства - MusE: save preset - MusE: сохранить пресет + Update drummap? + Обновить карту ударных? - Error reading preset. Might not be right type for this plugin - Ошибка прочтения пресета. Возможно неверный тип для этого плагина + Do you want to use same port for all instruments in the drummap? + Вы хотите использовать один порт для всех инструментов в списке ударных? - - - ProjectCreate - - Create Project - + &Yes + &Да - - Projects folder: - + &No + &Нет - - - - ... - ... + show gui + показать ГИП - - Project Name: - + show native gui + показать родной ГИП - - Project is a Template - + Treble clef + Скрипичный - - Project song file type: - + Bass clef + Басовый - - Project Path to song file: - + Grand Staff + Большой стан - - Create project folder (recommended for audio projects) - + Viewable automation + Видимая автоматизация - - Song information: - + Delete Track + Удалить трек - - - QHeader - Port Number - Номер порта + Track Comment + Комментарий к треку - enable gui for device - разрешить ГИП для устройства + Insert Track + Добавить трек - Name of the midi device associated with this port number - Имя MIDI-устройства, ассоциированного с номером этого порта + Midi + Midi - Instrument connected to port - Инструмент, подсоединённый к порту + Drum + Ударные - State: result of opening the device - Состояние: результат открытия устройства + Do you want to use same port and channel for all instruments in the drummap? + Вы хотите использовать тот же порт и канал для всех инструментов в списке ударных? + + + MusEGui::TempoSig - mute instrument - заглушить инструмент + Tempo/Sig + Темп/Размер + + + MusEGui::Toolbar1 - sound name - название звука + Off + Выкл - quantisation -currently not used - квантование -сейчас не используется + Solo + Соло - this input note triggers the sound - эта входящая нота переключает звук + Cursor + Курсор - note length - длина ноты + Snap + Привязка + + + MusEGui::TopWin - this note is send for the sound - это нота послана для звука + As subwindow + Как подокно - output channel -currently not used - канал выхода -сейчас не используется + Shares tools and menu + Общие инструменты и меню - output port -currently not used - порт выхода -сейчас не используется + Fullscreen + Во весь экран - velocity level 1 - Уровень 1 силы нажатия + Piano roll + Пианоролл - velocity level 2 - Уровень 2 силы нажатия + List editor + Редактор списка - velocity level 3 - Уровень 3 силы нажатия + Drum editor + Редактор ударных - velocity level 4 - Уровень 4 силы нажатия + Master track editor + Редактор мастер-трека (график) - quantisation - квантование + Master track list editor + Редактор мастер-трека (список) - output channel - канал выхода + Wave editor + Wave редактор - output port - порт выхода + Clip list + Редактор списка клипов - Enable Recording - Разрешить запись + Marker view + Редактор маркеров - Mute Indicator - Индикатор заглушки звука + Score editor + Партитурный редактор - Solo Indicator - Индикатор соло + Arranger + Компоновщик - Track Type - Тип трека + <unknown toplevel type> + <неизвестный тип уровня> + + + MusEGui::TrackComment - Track Name - Имя трека + MusE: Track Comment + MusE: Комментарий к треку - Output Channel Number - Номер канала выхода + Track Comment: + Комментарий к треку: + + + MusEGui::Transport - Output Port - Порт выхода + Overdub + Наложить - Time Lock - Изменение времени заблокировано + Replace + Заменить - Solo/Pre Fader Listening - Прослушивание Соло/Пре Федера + Rec Mode + Режим записи - enables reading from device - разрешает чтение с устройства + Normal + Нормальный - enables writing to device - разрешает запись на устройство + Mix + Смешать - - - QObject - Other - Другой + Cycle Rec + Циклич. запись - - - Error - + punchin + начало врезки - - - Please first select the range for crescendo with the loop markers. - + loop + цикл - - - QWidget - - - Cannot convert sysex string - Невозможно конвертировать строку SysEx + punchout + конец врезки - - - Hex String too long (2048 bytes limit) - Hex-строка слишком длинная (предел составляет 2048 байтов) + Punch In + Начало врезки - - generic midi - обычный MIDI + Loop + Цикл - - new - новый + Punch Out + Конец врезки - - create peakfile for - создать пиковый файл для + Left Mark + Левый маркер - - MusE: get file name - MusE: получить имя файла + Right Mark + Правый маркер - the directory - - каталог - + rewind to start + перемотать к началу - -does not exist -create? - -не существует -Создать? + Click this button to rewind to start position + Щелкните по этой кнопке для перемещения к началу - &Create - &Создать + rewind + перемотать назад - Cancel - Отмена + Click this button to rewind + Щелкните по этой кнопке для перемотки назад - - The directory -%1 -does not exist. -Create it? - + forward + перемотать вперёд - - MusE: create directory - MusE: создать каталог + Click this button to forward current play position + Щелкните по этой кнопке для перемещения вперёд - - creating dir failed - создание каталога не удалось + stop + остановить - - File -%1 -exists. Overwrite? - + Click this button to stop playback + Щелкните по этой кнопке для остановки воспроизведения - - Open File -%1 -failed: %2 - + play + воспроизвести - File - - Файл + Click this button to start playback + Щелкните по этой кнопке, чтобы начать воспроизведение - -exists - -существует + record + запись - - MusE: write - MusE: записать + Click this button to enable recording + Щелкните по этой кнопке, чтобы разрешить запись - Overwrite - Перезаписать + AC + AC - Quit - Выйти + quantize during record + квантовать при записи - Open File - - Открыть файл + Click + Метроном - -failed: - -не удалось: + metronom click on/off + метроном вкл/выкл - - MusE: Open File - MusE: Открыть файл + Sync + Синхр - - - None - Ничего + external sync on/off + Вкл/выкл внешн. синхр - - No selection. Ignoring - Не выделено. Игнорируется + Jack + Jack - The directory - - Директория - + Jack transport sync on/off + Синхр. транспорта "Jack" вкл/выкл - -does not exist. -Create it? - -не существует. -Создать? + Master + Мастер - -exists. Overwrite? - -существует. Переписать? + use master track + использовать мастер-трек - QuantBase + MusEGui::VisibleTracks - - MusE: Quantize - + Show wave tracks + Показать wave-треки - - Range - Диапазон + Show group tracks + Показать групповые треки - - All Events - + Show aux tracks + Показать aux треки - - Selected Events - + Show input tracks + Показать входные треки - - Looped Events - + Show output tracks + Показать выходные треки - - Selected Looped - + Show midi tracks + Показать midi треки - - Values - Значения + Show synth tracks + Показать треки синтезаторов - - Strength: - + Visible track types + Видимые типы треков + + + MusEGui::WTScale - - % - % + bar scale + шкала тактов + + + MusEGui::WaveEdit - - Threshold (ticks): - + &Edit + &Правка - - Quantize Len - + Func&tions + Фу&нкции - - Raster - + &Gain + &Усиление - - Whole - + Other + Другой - - Half - + &Copy + С&копировать - - 4th - + C&ut + &Вырезать - - 4th Triplet - + &Paste + &Вставить - - 8th - + Edit in E&xternal Editor + Редактировать во &внешнем редакторе - - 8th Triplet - + Mute Selection + Заглушить выделенное - - 16th - + Normalize Selection + Нормализовать выделенное - - 16th Triplet - + Fade In Selection + Нарастание звука в выделенном - - 32th - + Fade Out Selection + Затихание звука в выделенном - - 32th Triplet - + Reverse Selection + Перевернуть выделенное - - Swing: - + Select + Выделить - - If the proposed change in tick or length is smaller than threshold, nothing is done. -If swing=0, this is normal -If swing is 33, you get a 2:1-rhythm. -If swing is -33, you get a 1:2-rhythm. - - + Select &All + Выделить &Всё - - OK - + &Deselect All + &Снять выделение - - Cancel - Отмена + Window &Config + Конфигурация &окна - - - QuantConfig - MusE: Config Quantize - MusE: Настройка Квантования + Wave edit tools + Инструменты правки wave - Config Quantize - Настройка Квантования + transport + транспорт - Strength - Степень + WaveEdit tools + Инструменты правки wave - Don´t Quantize - Не Квантовать + Solo + Соло - Quant Len - Квант Дл + Cursor + Курсор - RemoveBase + MusEGui::WaveView - - MusE: Erase Notes - + MusE - external editor failed + MusE - ошибка запуска внешнего редактора - - Range - Диапазон + MusE was unable to launch the external editor +check if the editor setting in: +Global Settings->Audio:External Waveditor +is set to a valid editor. + "MusE" не может запустить внешний редактор. +Проверьте, действительно ли в: +Общие настройки->Аудио:Внешний редактор +выбран правильный редактор. - - All Events - + MusE - file size changed + MusE - размер файла изменился - - Selected Events - + When editing in external editor - you should not change the filesize +since it must fit the selected region. + +Missing data is muted + При редактировании во внешнем редакторе - не изменяйте размер файла +так как он должен соответствовать выбранной области. + +Утерянные данные заглушены + + + OrganGuiBase - - Looped Events - + MusE: Organ + MusE: Орган - - Selected Looped - + O-1 + O-1 - - Thresholds - + Oscillator + Осциллятор - - ticks - + Brass + Медные духовые - - Velocity - + Reed + Язычковые деревянные духовые - - Length - Длина + Flute + Флейта - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If nothing is checked, everything is removed.</p> -<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If velocity is checked, only notes with velo &lt; threshold are removed.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If both are checked, notes with velo &lt; threshold OR with length &lt; threshold are removed.</p></body></html> - + 16' + 16' - - OK - + 4' + 4' - - Cancel - Отмена + 2 2/3' + 2 2/3' - - - RhythmBase - MusE: Random Rhythm Generator - MusE: Генератор случайного ритма + 2' + 2' - Instrument Properties - Свойства Инструмента + 8' + 8' - counts/bar - счет/такт + 5 1/3' + 5 1/3' - steps/count - шаги/счет + Release + Послезвучие - # bars - #такты + Sustain + Стационарная часть звука - test - тест + Decay + Спад огибающей - contrib - внести + Attack + Атака - randomize - случайным образом + ms + мс - Group 1 - Группа 1 + Velocity + Скорость нажатия - Group 2 - Группа 2 + Drawbars + Слайдеры регистров - Group 3 - Группа 3 + Envelope Hi + Верх огибающей - Group 4 - Группа 4 + cB + cB - Group 5 - Группа 5 + Envelope Lo + Низ огибающей + + + PasteDialogBase - listen - слушать + MusE: Paste Parts + MusE: Вставить партии - Instrument - Инструмент + Number and raster + Номер и растр - Group - Группа + insert + вставить - &New - &Новый + times + раз - create new entry - создать новую запись + raster + растр - pressing the New button you create a new entry -in the MusE list of defined controllers - нажав кнопку "Новая" вы создаёте новую запись -в списке назначенных в MusE контроллеров + ticks + тик(ов) - &Delete - &Удалить + Move, Merge, Clone + Передвинуть, Смешать, Клонировать - delete selected entry - удалить выделенную запись + Move everything to the right + Передвинуть всё вправо - Up - Вверх + Move only affected parts to the right + Передвинуть только задействованные партии вправо + + + Put everything into a single track + Поместить всё в один трек - Down - Вниз + Merge with existing parts + Смешать с существующими партиями - Instrument - Инструмент + Insert as clones (where possible) + Вставить как клоны (где возможно) - steps/count - шаги/счет + OK + OK - list of defined controllers - список назначенных контроллеров + Cancel + Отмена + + + PasteEventsDialogBase - This is the MusE list of defined controllers. - Это список назначенных контроллеров для MusE + MusE: Paste Events + MusE: Вставить события - &File - &Файл + Number and raster + Номер и растр - &Edit - &Правка + insert + вставить - &Help - П&омощь + times + раз - Tools - Инструменты + raster + растр - New - Новый + ticks + тик(ов) - Open - Открыть + Paste options + Опции вставки - &Open... - &Открыть... + Always into existing parts + Всегда в существующие партии - Save - Сохранить + Never into existing parts + Никогда в существующие партии - &Save - &Сохранить + Into existing parts if part has not +to be expanded by more than + В существующие партии, если партия +не будет расширена больше чем - Save As - Сохранить как + Put everything into the (selected) part + Поместить всё в (выбранную) партию - Save &As... - Сохранить &как... + OK + OK - Print - Печать + Cancel + Отмена + + + ProjectCreate - &Print... - &Печать... + Create Project + Создать Проект - Exit - Выйти + Projects folder: + Папка проекта: - E&xit - В&ыйти + ... + ... - Undo - Отмена + Project Name: + Название проекта: - &Undo - &Отмена + Project is a Template + Проект является Шаблоном - Redo - Повторить + Project song file type: + Тип файла сонга в проекте: - &Redo - П&овторить + Project Path to song file: + Путь к файлу сонга в проекте: - Cut - Вырезать + Create project folder (recommended for audio projects) + Создать папку пректа (рекомендуется для аудио проектов) - &Cut - &Вырезать + Song information: + Информация о сонге: + + + QObject - Copy - Скопировать + Error + Ошибка - C&opy - С&копировать + Please first select the range for crescendo with the loop markers. + Выберите сначала маркерами диапазон для крещендо. + + + QWidget - Paste - Вставить + Cannot convert sysex string + Невозможно конвертировать строку SysEx - &Paste - &Вставить + Hex String too long (2048 bytes limit) + Hex-строка слишком длинная (предел 2048 байтов) - Find - Найти + generic midi + обычный MIDI - &Find... - &Найти... + new + новый - Contents - Содержание + create peakfile for + создать пиковый файл для - &Contents... - &Содержание... + MusE: get file name + MusE: получить имя файла - Index - Индекс + The directory +%1 +does not exist. +Create it? + Папка +%1 +не существует. +Создать её? - &Index... - &Индекс... + MusE: create directory + MusE: создать папку - About - О программе + creating dir failed + создание папки не удалось - &About... - &О программе... + File +%1 +exists. Overwrite? + Файл +%1 +уже существует. Переписать? - <b>Notice!</b><br> -Random Rhythm Generator is not enabled yet! - <b>Уведомление!</b><br> -Генератора Случайного Ритма пока ещё нет! + Open File +%1 +failed: %2 + Открытие файла +%1 +не удалось: %2 - Ctrl+N - Ctrl+N + MusE: write + MusE: записать - Ctrl+O - Ctrl+O + MusE: Open File + MusE: Открыть файл - Ctrl+S - Ctrl+S + None + Ничего - Ctrl+P - Ctrl+P + No selection. Ignoring + Не выделено. Игнорируется + + + QuantBase - Ctrl+Z - Ctrl+Z + MusE: Quantize + Квантование - Ctrl+Y - Ctrl+Y + Range + Диапазон - Ctrl+X - Ctrl+X + All Events + Все События - Ctrl+C - Ctrl+C + Selected Events + Выбранные События - Ctrl+V - Ctrl+V + Looped Events + События в Цикле - Ctrl+F - Ctrl+F + Selected Looped + Выбранные в цикле - - - RhythmGenerator - Form3 - Форма3 + Values + Значения - Instrument Settings: - Настройки инструмента: + Strength: + Сила: - Instrument - Инструмент + % + % - Hi-Hat - Хай-хэт + Threshold (ticks): + Порог (тики): - add - добавить + Quantize Len + Квантовать длину - delete - удалить + Raster + Растр - Group Settings: - Настройки группы: + Whole + Целая - Group - Группа + Half + Половинная - Group 1 - Группа 1 + 4th + 1/4 - Group 2 - Группа 2 + 4th Triplet + 1/4 Триоль - Group 3 - Группа 3 + 8th + 1/8 - Group 4 - Группа 4 + 8th Triplet + 1/8 Триоль - Group 5 - Группа 5 + 16th + 1/16 - contrib - внести + 16th Triplet + 1/16 Триоль - listen - слушать + 32th + 1/32 - Randomize - Случайным образом + 32th Triplet + 1/32 Триоль - Rhythm Style: - Ритмический Стиль: + Swing: + Свинг: - Clear - Очистить + If the proposed change in tick or length is smaller than threshold, nothing is done. +If swing=0, this is normal +If swing is 33, you get a 2:1-rhythm. +If swing is -33, you get a 1:2-rhythm. + + Если предложенные изменения длины (или тиков) меньше порогового значения, +ничего не произойдет. +если свинг=0, это норма +если свинг = 33, это ритм (2:1). +если свинг = -33, то это ритм (1:2). - Open... - Открыть... + OK + OK - Save - Сохранить + Cancel + Отмена + + + RemoveBase - Save as... - Сохранить как... + MusE: Erase Notes + MusE: Стереть ноты - Generate - Сгенерировать + Range + Диапазон - Close - Закрыть + All Events + Все события - - + Selected Events + Выбранные события - steps/count - шаги/счет + Looped Events + События в цикле - count/bar - счет/такт + Selected Looped + Выбранные в цикле - # bars - #такты + Thresholds + Порог - - - RouteDialogBase - - MusE: Routing - MusE: Маршруты + ticks + тик(ов) - - Add Route - Добавить маршрут + Velocity + Скорость нажатия - - Source: - Источник: + Length + Длина - - Destination: - Назначение: + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If nothing is checked, everything is removed.</p> +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If velocity is checked, only notes with velo &lt; threshold are removed.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If both are checked, notes with velo &lt; threshold OR with length &lt; threshold are removed.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">(new line) +<html><head><meta name="qrichtext" content="1" /><style type="text/css">(new line) +p, li { white-space: pre-wrap; }(new line) +</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">(new line) +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If nothing is checked, everything is removed.</p>(new line) +<p style=" margin-top:0px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If velocity is checked, only notes with velo &lt; threshold are removed.</p>(new line) +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If both are checked, notes with velo &lt; threshold OR with length &lt; threshold are removed.</p></body></html> - - Connect - Соединить + OK + OK - - connect source to destination - Соединить источник с назначением + Cancel + Отмена + + + RhythmBase - - Current Routes - Текущие маршруты + MusE: Random Rhythm Generator + MusE: Генератор случайного ритма - - Source - Источник + Instrument Properties + Свойства Инструмента - - Destination - Назначение + counts/bar + счет/такт - - Remove - Удалить + steps/count + шаги/счет - - remove selected route - Удалить выбранный маршрут + # bars + # такты - - - RoutePopupMenu - Channel - Канал + test + тест - <none> - <ничего> + contrib + внести - - - SS_PluginChooserBase - - SimpleDrums - Ladspa Plugin Chooser - SimpleDrums - Выбор LADSPA-плагина + randomize + случайным образом - - Name - Имя + Group 1 + Группа 1 - - Label - Метка + Group 2 + Группа 2 - - Inports - Порты входа + Group 3 + Группа 3 - - Outports - Порты выхода + Group 4 + Группа 4 - - Creator - Создатель + Group 5 + Группа 5 - - &Cancel - &Отменить + listen + слушать - - Alt+C - Alt+C + Instrument + Инструмент - - &OK - &ОК + Group + Группа - - Alt+O - Alt+О + &New + &Новый - - - SS_PluginFront - - Clear and unload effect - Очистить и выгрузить эффект + create new entry + создать новую запись - - Load effect - Загрузить эффект + pressing the New button you create a new entry +in the MusE list of defined controllers + нажав кнопку "Новая" вы создаёте новую запись +в списке назначенных в MusE контроллеров - - Toggle display of effect parameters - Переключить дисплей параметров эффекта + &Delete + &Удалить - - Turn effect on/off - Эффект вкл/выкл + delete selected entry + удалить выделенную запись - - - ScoreEdit - Step Record - Пошаговая запись + Up + Вверх - panic - паника + Down + Вниз - transport - транспорт + Instrument + Инструмент - &Edit - &Правка + steps/count + шаги/счет - C&ut - &Вырезать + list of defined controllers + список назначенных контроллеров - &Copy - С&копировать + This is the MusE list of defined controllers. + Это список назначенных контроллеров для MusE. - &Paste - &Вставить + &File + &Файл - Delete &Events - Удалить &События + &Edit + &Правка - &Deselect All - &Убрать выделение + &Help + &Справка - &Inside Loop - &Внутри цикла + Tools + Инструменты - &Outside Loop - &Вне цикла + New + Новый - Transpose - Транспонировать + Open + Открыть - Delete Overlaps - Удалить наложения + &Open... + &Открыть... - - - ScrollScale - next page - след страница + Save + Сохранить - previous page - пред страница + &Save + &Сохранить - current page number - номер текущей страницы + Save As + Сохранить как - - - SetlenBase - - MusE: Set Note Length - + Save &As... + Сохранить &как... - - Range - Диапазон + Print + Печать - - All Events - + &Print... + &Печать... - - Selected Events - + Exit + Выйти - - Looped Events - + E&xit + В&ыйти - - Selected Looped - + Undo + Отмена - - Value - Значение + &Undo + &Отмена - - New length - + Redo + Повторить - - ticks - + &Redo + П&овторить - - OK - + Cut + Вырезать - - Cancel - Отмена + &Cut + &Вырезать - - - ShortcutCaptureDialog - Ok - OK + Copy + Копировать - Cancel - Отмена + C&opy + &Копировать - Shortcut conflicts with - "Горячая клавиша" конфликтует с + Paste + Вставить - Undefined - Не назначено + &Paste + &Вставить - - - ShortcutCaptureDialogBase - - Enter shortcut sequence - Введите последовательность "горячих клавиш" + Find + Найти - - Press keys to enter shortcut sequence! - Нажмите клавиши для задания "горячих клавиш"! + &Find... + &Найти... - - Old shortcut: - Старое сочетание: + Contents + Содержание - - - Undefined - Не назначено + &Contents... + &Содержание... - - New shortcut: - Новое сочетание: + Index + Индекс - - OK - ОК + &Index... + &Индекс... - - Cancel - Отмена + About + О программе - - - ShortcutConfigBase - - Configure Keyboard Shortcuts - Настроить "горячие клавиши" + &About... + &О программе... - - Shortcut Category - Категория "горячих клавиш" + <b>Notice!</b><br> +Random Rhythm Generator is not enabled yet! + <b>Уведомление!</b><br> +Генератора Случайного Ритма пока ещё нет! - - Description - Описание + Ctrl+N + Ctrl+N - - Shortcut - "Горячая клавиша" + Ctrl+O + Ctrl+O - - &Clear - &Очистить + Ctrl+S + Ctrl+S - - Alt+C - Alt+C + Ctrl+P + Ctrl+P - - &Define - Н&азначить + Ctrl+Z + Ctrl+Z - - Alt+D - Alt+D + Ctrl+Y + Ctrl+Y - - &Apply - &Применить + Ctrl+X + Ctrl+X - - Alt+A - Alt+A + Ctrl+C + Ctrl+C - - - SigScale - signature scale - шкала ключей + Ctrl+V + Ctrl+V - - - SimpleDrumsGuiBase - - DrumSynth 0.1 - DrumSynth 0.1 + Ctrl+F + Ctrl+F - SimpleSynthGui + RhythmGenerator - - &Load setup - З&агрузить настройки + Form3 + Форма3 - - &Save setup - &Сохранить настройки + Instrument Settings: + Настройки инструмента: - - Load sample dialog - Загрузить диалог сэмплов + Instrument + Инструмент - - - Song - Jack shutdown! - Jack прекратил работу! + Hi-Hat + Хай-хэт - Jack has detected a performance problem which has lead to -MusE being disconnected. -This could happen due to a number of reasons: -- a performance issue with your particular setup. -- a bug in MusE (or possibly in another connected software). -- a random hiccup which might never occur again. -- jack was voluntary stopped by you or someone else -- jack crashed -If there is a persisting problem you are much welcome to discuss it -on the MusE mailinglist. -(there is information about joining the mailinglist on the MusE - homepage which is available through the help menu) - -To proceed check the status of Jack and try to restart it and then . -click on the Restart button. - Проблемы в работе "Jack", привели к его рассоединению с "MusE". -Это могло произойти по разным причинам: --проблемы в работе, вызванные особенностью ваших настроек. --баг в "MusE" (или, возможно, в других подсоединенных программах). --случайное выключение, которое больше никогда не повторится. --"Jack" остановлен вами или кем-нибудь еще. --"Jack" рухнул -Если это постоянная проблема мы приглашаем вас обсудить её -в почтовой рассылке "MusE". -(в меню "Помощь" есть информация о том, как присоединиться -к почтовой рассылке "MusE") - -Чтобы продолжить работу, проверте состояние "Jack", постарайтесь -перезапустить его, а затем щелкните по кнопке "Перезапустить". - - + add + добавить - previous event - предыдущее событие + delete + удалить - next event - следующее событие + Group Settings: + Настройки группы: - set event - настроить событие + Group + Группа - add event - добавить событие + Group 1 + Группа 1 - erase event - стереть событие + Group 2 + Группа 2 - erase range - стереть диапазон + Group 3 + Группа 3 - clear automation - Очистить автоматизацию + Group 4 + Группа 4 - Clear all controller events? - Очистить все события контроллеров? + Group 5 + Группа 5 - &Ok - &ОК + contrib + внести - &Cancel - &Отменить + listen + слушать - MusE - external script failed - MusE - ошибка запуска внешнего скрипта + Randomize + Случайным образом - MusE was unable to launch the script - - MusE не может запустить скрипт + Rhythm Style: + Ритмический Стиль: - - - SongInfo - - Song Information - Информация о проекте + Clear + Очистить - - Show on song load - + Open... + Открыть... - - &Cancel - &Отменить + Save + Сохранить - - Alt+C - Alt+C + Save as... + Сохранить как... - - &Ok - &ОК + Generate + Сгенерировать - - Alt+O - Alt+O + Close + Закрыть - - - SynthConfigBase - MusE: Synth Configuration - MusE: Настройка програм. синт. + + - - Soft Synthesizer - Программный синтезатор + steps/count + шаги/счет - - File - Файл + count/bar + счет/такт - - Instances - Выбранный + # bars + # такты + + + RouteDialogBase - - - Name - Имя + MusE: Routing + MusE: Маршруты - - list of available software synthesizers - список доступных программных синтезаторов + Add Route + Добавить маршрут - - Add Instance - Добавить выбранный + Source: + Источник: - - Remove Instance - Удалить выбранный + Destination: + Назначение: - - Midi connections - MIDI-соединения + Connect + Соединить - - Midi Port - MIDI-порт + connect source to destination + Соединить источник с назначением - - Midi Port and Soft Synth Configuration - + Current Routes + Текущие маршруты - - - Type - Тип + Source + Источник - - Inst - Инстр + Destination + Назначение - - Version - Версия + Remove + Удалить - - Description - Описание + remove selected route + Удалить выбранный маршрут - TList + SS_PluginChooserBase - Show Gui - Показать ГИП + SimpleDrums - Ladspa Plugin Chooser + SimpleDrums - Выбор LADSPA-плагина - Add Midi Track - Добавить MIDI-трек + Name + Имя - Add Drum Track - Добавить трек с ударными + Label + Метка - Add Wave Track - Добавить Wave-трек + Inports + Порты входа - Delete Track - Удалить трек + Outports + Порты выхода - Track Comment - Комментарий к треку + Creator + Создатель - Midi - MIDI + &Cancel + &Отменить - Drum - Ударные + Alt+C + Alt+C - MusE: bad trackname - MusE: неверное имя трека + &OK + &ОК - please choose a unique track name - Выберите неповторяющееся имя для трека + Alt+O + Alt+О + + + SS_PluginFront - show gui - показать ГИП + Clear and unload effect + Очистить и выгрузить эффект - show native gui - показать ГИП + Load effect + Загрузить эффект - Add Output - Добавить Выход + Toggle display of effect parameters + Переключить дисплей параметров эффекта - Add Group - Добавить Группу + Turn effect on/off + Эффект вкл/выкл + + + SetlenBase - Add Input - Добавить Вход + MusE: Set Note Length + MusE: Установить длину ноты - Add Aux Send - Добавить Aux Посыл + Range + Диапазон - Update drummap? - Обновить карту ударных? + All Events + Все события - Do you want to use same port for all instruments in the drummap? - Вы хотите использовать один и тот же порт для всех инструментов в списке ударных? + Selected Events + Выбранные события - &Yes - &Да + Looped Events + События в цикле - &No - &Нет + Selected Looped + Выбранные в цикле - Do you want to use same port and channel for all instruments in the drummap? - Вы хотите использовать один и тот же порт и канал для всех инструментов в списке ударных? + Value + Значение - <none> - <ничего> + New length + Новая длина - - - TempoSig - Tempo/Sig - Темп/Знаки альтерации + ticks + тиков - - - TimeCanvas - Ctrl - Ctrl - + OK + OK - Add Controller View - Добавить Панель Контроллеров + Cancel + Отмена - Toolbar1 + ShortcutCaptureDialogBase - Solo - Соло + Enter shortcut sequence + Введите последовательность "горячих клавиш" - Cursor - Курсор + Press keys to enter shortcut sequence! + Нажмите клавиши для задания "горячих клавиш"! - Snap - Привязка + Old shortcut: + Старое сочетание: - Quantize - Квантовать + Undefined + Не назначено - To - К + New shortcut: + Новое сочетание: - All Events - Все события + OK + ОК + + + Cancel + Отмена + + + ShortcutConfigBase - Looped Ev. - Соб. в цикле + Configure Keyboard Shortcuts + Настроить "горячие клавиши" - Selected Ev. - Выделенное соб. + Shortcut Category + Категория "горячих клавиш" - Looped+Sel. - В цикле+Выделенн. + Description + Описание - - - TopWin - Arranger - Компоновщик + Shortcut + "Горячая клавиша" - - - TrackComment - MusE: Track Comment - MusE: Комментарий к треку + &Clear + &Очистить - Track Comment: - Комментарий к треку: + Alt+C + Alt+C - - - Transport - Overdub - Наложить + &Define + Н&азначить - Replace - Заменить + Alt+D + Alt+D - Rec Mode - Режим записи + &Apply + &Применить - Normal - Норм. + Alt+A + Alt+A + + + SimpleDrumsGuiBase - Mix - Смешать + DrumSynth 0.1 + DrumSynth 0.1 + + + SimpleSynthGui - Cycle Rec - Циклич. запись + &Load setup + З&агрузить настройки - punchin - нач. врезки + &Save setup + &Сохранить настройки - loop - цикл + Load sample dialog + Загрузить диалог сэмплов + + + SongInfo - punchout - кнц. врезки + Song Information + Информация о проекте - Punch In - Начало врезки + Show on song load + Показывать при загрузке - Loop - Цикл + &Cancel + &Отменить - Punch Out - Конец врезки + Alt+C + Alt+C - Left Mark - Левый маркер + &Ok + &ОК - Right Mark - Правый маркер + Alt+O + Alt+O + + + SynthConfigBase - rewind to start - перемотать к началу + Soft Synthesizer + Программный синтезатор - rewind - перемотать назад + File + Файл - forward - перемотать вперёд + Instances + Выбранный - stop - остановить + Name + Имя - play - воспроизвести + list of available software synthesizers + список доступных программных синтезаторов - record - записать + Add Instance + Добавить выбранный - AC - AC + Remove Instance + Удалить выбранный - quantize during record - квантовать при записи + Midi connections + MIDI-соединения - Click - Метр. + Midi Port + MIDI-порт - metronom click on/off - Метроном вкл/выкл + Midi Port and Soft Synth Configuration + Midi-порт и Конфигурация Синтезатора - Sync - Синхр. + Type + Тип - external sync on/off - Вкл/выкл внешн. синхр. + Inst + Инстр - Master - Мастер + Version + Версия - use master track - использовать мастер-трек + Description + Описание + + + TimeCanvas - Jack - Jack + Ctrl + Ctrl + - Jack transport sync on/off - Синхр. транспорта "Jack" вкл/выкл + Add Controller View + Добавить Панель TransposeBase - MusE: Transpose - + MusE: Транспонировать - Range - Диапазон + Диапазон - All Events - + Все События - Selected Events - + Выбранные События - Looped Events - + События в Цикле - Selected Looped - + Выбранные в Цикле - Value - Значение + Значение - Halftone-steps - + Полутоновые шаги - OK - - - - - Cancel - Отмена - - - - TransposeDialogBase - - MusE: Midi Transpose - MusE: MIDI-транспонирование - - - Value - Значение - - - halftones - полутонов - - - Time - Время - - - all - всё - - - between markers - между маркерами - - - Parts - Партии - - - all in selected tracks - все в выбранных треках - - - OK - ОК + OK Cancel - Отмена + Отмена UnusedWaveFiles - Dialog - + Диалог - List of unused audio files in current project directory: - + Список неиспользуемых аудио файлов в папке проекта: - Current project - + Текущий проект - All .med files in current directory - + Все .med файлы +в текущей +папке - Move files to 'unused' subdir - + Переместить файлы в подпапку 'unused' - Cancel - Отмена + Отмена VAMGui - MusE: Load VAM Presets MusE: загрузить пресеты VAM - - MusE: Save VAM Presets MusE: сохраненить пресеты VAM @@ -20012,948 +10332,563 @@ in current VAMGuiBase - Virtual Analogue for MusE Виртуальный Аналог для MusE - LFO LFO - Freq Частота - - - Waveform Форма волны - - - Sine Синусоида - - - Pulse Пульс - - - Saw Пилообразная - - - Triangle Треугольная - Filter Фильтр - EnvMod Режим Огибающей - - - Attack Атака - - - Decay Спад - - - Sustain Стационарная часть - - - Release Послезвучие - Cutoff Отсечка - Resonance Резонанс - Invert Инвертировать - KeyTrack Трекинг клавиатуры - Presets Пресеты - Set Установить - load preset list Загрузить список пресетов - save preset list Сохранить список пресетов - save preset list to a new file Сохранить список пресетов в новый файл - delete preset Удалить пресет - DCO 1 DCO 1 - - Pitch Высота тона - - Detune Расстройка - - PWM PWM - - FM FM - - PW PW - DCO 2 DCO 2 - On Вкл - - VAM 1.0beta2 -Virtual Analog for MusE -Released under GPL. -Copyright(C) 2002 -Jotsif Lindman Hörnlund -( jotsif@linux.nu ) - VAM 1.0beta2 -Виртуальный Аналог для MusE -Выпущено на условиях GPL. -Copyright(C) 2002 -Jotsif Lindman Hörnlund -( jotsif@linux.nu ) - - - + VAM 1.0beta3 -Virtual Analog for MusE -Released under GPL. -Copyright(C) 2002 -Jotsif Lindman Hörnlund -( jotsif@linux.nu ) -Copyright(C) 2005 -Robert Jonsson -(rj@spamatica.se) - VAM 1.0бета3 -Виртуальный Аналог для MusE -Выпущен на условиях GPL. -Copyright(C) 2002 -Jotsif Lindman Hörnlund -( jotsif@linux.nu ) -Copyright(C) 2005 -Robert Jonsson -(rj@spamatica.se) - - - - VelocityBase - - - MusE: Modify Velocity - MusE: Изменить скорость нажатия - - - - Range - Диапазон - - - - All Events - Все События - - - - Selected Events - Выбранные События - - - - Looped Events - События в Цикле - - - Selected & Looped - Выбранные & в Цикле - - - - Values - Значения - - - - Rate: - Частота: - - - - Offset: - Смещение: - - - - % - % - - - - Selected Looped - - - - - veloNew = (veloOld * rate) + offset - - - - - OK - - - - - Cancel - Отмена - - - - WTScale - - bar scale - линейка тактов - - - - WaveEdit - - &File - &Файл - - - weTools - weTools - - - Solo - Соло - - - Cursor - Курсор - - - &Edit - &Правка - - - Func&tions - Фу&нкции - - - 200% - 200% - - - 150% - 150% - - - 75% - 75% - - - 50% - 50% - - - 25% - 25% - - - Other - Другой - - - &Gain - &Усиление - - - &Copy - С&копировать - - - C&ut - &Вырезать - - - &Paste - &Вставить - - - Edit in E&xternal Editor - Редактировать во &внешнем редакторе - - - Mute Selection - Заглушить выделенное - - - Normalize Selection - Нормализовать выделенное - - - Fade In Selection - Нарастание звука в выделенном - - - Fade Out Selection - Затихание звука в выделенном - - - Reverse Selection - Перевернуть выделенное - - - Select &All - Выделить &Всё - - - &Deselect All - &Убрать выделение - - - Select - Выделить - - - Wave edit tools - Инструменты редактирования Wave - - - transport - транспорт - - - Pianoroll tools - Инструменты пианоролла +Virtual Analog for MusE +Released under GPL. +Copyright(C) 2002 +Jotsif Lindman Hörnlund +( jotsif@linux.nu ) +Copyright(C) 2005 +Robert Jonsson +(rj@spamatica.se) + VAM 1.0бета3 +Виртуальный Аналог для MusE +Выпущен на условиях GPL. +Copyright(C) 2002 +Jotsif Lindman Hörnlund +( jotsif@linux.nu ) +Copyright(C) 2005 +Robert Jonsson +(rj@spamatica.se) - WaveTrackInfoBase + VelocityBase - MusE: TrackInfo - MusE: Трекинфо + MusE: Modify Velocity + MusE: Изменить скорость нажатия - Track Info - Трек Инфо + Range + Диапазон - Track Name - Имя трека + All Events + Все События - Output Route: - Маршрут выхода: + Selected Events + Выбранные События - Input Route: - Маршрут входа: + Looped Events + События в Цикле - Ports: - Порты: + Values + Значения - Mono - Моно + Rate: + Частота: - Stereo - Стерео + Offset: + Смещение: - - - WaveView - MusE - file size changed - MusE - размер файла изменился + % + % - When editing in external editor - you should not change the filesize -since it must fit the selected region. - -Missing data is muted - При редактировании во внешнем редакторе - не изменяйте размер файла -так как он должен соответствовать выбранной области. - -Утерянные данные заглушены + Selected Looped + Выбранные в Цикле - MusE - external editor failed - MusE - ошибка запуска внешнего редактора + veloNew = (veloOld * rate) + offset + Скор.нажНовая = (скор.нажСтарая * частоту) + смещение - MusE was unable to launch the external editor -check if the editor setting in: -Global Settings->Audio:External Waveditor -is set to a valid editor. - "MusE" не может запустить внешний редактор. -Проверте, действительно ли в: -Общие настройки->Аудио:Внешний редактор -выбран правильный редактор. + OK + + + + Cancel + Отмена file_patterns - Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2) - + Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2) - Midi (*.mid *.MID *.mid.gz *.mid.bz2) - + Midi/Kar (*.mid *.MID *.kar *.KAR *.mid.gz *.mid.bz2) - Karaoke (*.kar *.KAR *.kar.gz *.kar.bz2) - + Караоке (*.kar *.KAR *.kar.gz *.kar.bz2) - - - - - - - - - - - - All Files (*) - Все файлы (*) + Все файлы (*) - Midi (*.mid) - + Midi (*.mid) - Karaoke (*.kar) - + Караоке (*.kar) - all known files (*.med *.med.gz *.med.bz2 *.mid *.midi *.kar) - + все известные файлы (*.med *.med.gz *.med.bz2 *.mid *.midi *.kar) - med Files (*.med *.med.gz *.med.bz2) - + Файлы med (*.med *.med.gz *.med.bz2) - - - Uncompressed med Files (*.med) - + Несжатые файлы med (*.med) - - - gzip compressed med Files (*.med.gz) - + Сжатые файлы med (*.med.gz) - - - bzip2 compressed med Files (*.med.bz2) - + Сжатые файлы med (*.med.bz2) - mid Files (*.mid *.midi *.kar *.MID *.MIDI *.KAR) - + Файлы mid (*.mid *.midi *.kar *.MID *.MIDI *.KAR) - (*.jpg *.gif *.png) - + (*.jpg *.gif *.png) - (*.jpg) - + (*.jpg) - (*.gif) - + (*.gif) - (*.png) - + (*.png) - part Files (*.mpt *.mpt.gz *.mpt.bz2) - + Файлы партии (*.mpt *.mpt.gz *.mpt.bz2) - part Files (*.mpt) - + Файлы партии (*.mpt) - gzip compressed part Files (*.mpt.gz) - + Сжатые файлы партии (*.mpt.gz) - bzip2 compressed part Files (*.mpt.bz2) - + Сжатые файлы партии (*.mpt.bz2) - Presets (*.pre *.pre.gz *.pre.bz2) - + Пресеты (*.pre *.pre.gz *.pre.bz2) - Presets (*.pre) - + Пресеты (*.pre) - gzip compressed presets (*.pre.gz) - + Сжатые пресеты (*.pre.gz) - bzip2 compressed presets (*.pre.bz2) - + Сжатые пресеты (*.pre.bz2) - Presets (*.map *.map.gz *.map.bz2) - + Пресеты (*.map *.map.gz *.map.bz2) - Presets (*.map) - + Пресеты (*.map) - gzip compressed presets (*.map.gz) - + Сжатые пресеты (*.map.gz) - bzip2 compressed presets (*.map.bz2) - + Сжатые пресеты (*.map.bz2) - Wave/Binary (*.wav *.ogg *.bin) - + Wave/Бинарные (*.wav *.ogg *.bin) - Wave (*.wav *.ogg) - + Wave (*.wav *.ogg) - Binary (*.bin) - + Бинарные (*.bin) freeverb - FreeVerb FreeVerb - Rooom Size - Размер помещения - - - Damping Демпфирование - Wet Level Уровень "Влажного" сигнала - Tap-Reverberator Пленочный Ревербератор - Decay [ms] Спад(мсек) - - dB дБ - Dry Level [dB] Уровень "Сухого" сигнала [дб] - Wet Level [dB] Уровень "Влажного" сигнала [Дб] - Preset: Пресет: - AfterBurn Запаздывающее Нарастание - AfterBurn (Long) Запаздывающее Нарастание (Длинное) - Ambience Окружение - Ambience (Thick) Окружение (Плотное) - Ambience (Thick) - HD Окружение (Плотное) - HD - Cathedral Кафедральный Собор - Cathedral - HD Кафедральный Собор - HD - Drum Chamber Комната для Ударных - Garage Гараж - Garage (Bright) Гараж (Яркий) - Gymnasium Гимнастический зал - Gymnasium (Bright) Гимнастический зал (Яркий) - Gymnasium (Bright) - HD Гимнастический зал (Яркий) - HD - Hall (Small) Зал (Небольшой) - Hall (Medium) Зал (Средний) - Hall (Large) Зал (Большой) - Hall (Large) - HD Зал (Большой) - HD - Plate (Small) Plate реверб (Маленькая) - Plate (Medium) Plate реверб (Средняя) - Room Size Размер помещения - Plate (Large) Plate реверб (Большая) - Plate (Large) - HD Plate реверб (Большая) - HD - Pulse Chamber Пульсирующая комната - Pulse Chamber (Reverse) Пульсирующая комната (Реверс) - Resonator (96 ms) Резонатор (96 мсек) - Resonator (152 ms) Резонатор (152 мсек) - Resonator (208 ms) Резонатор (208 мсек) - Room (Small) Помещение (Маленькое) - Room (Medium) Помещение (Среднее) - Room (Large) Помещение (Большое) - Room (Large) - HD Помещение (Большое) - HD - Slap Chamber Комната "slap" - Slap Chamber - HD Комната "slap" - HD - Slap Chamber (Bright) Комната "slap" (Яркая) - Slap Chamber (Bright) HD Комната "slap" (Яркая) HD - Smooth Hall (Small) Ровный зал (Небольшой) - Smooth Hall (Medium) Ровный зал (Средний) - Smooth Hall (Large) Ровный зал (Большой) - Smooth Hall (Large) - HD Ровный зал (Большой) - HD - Vocal Plate Вокальная Plate-реверб - Vocal Plate - HD Вокальная Plate-реверб - HD - Warble Chamber Журчащая комната - Warehoouse Склад - Warehouse - HD Склад - HD - Comb Filters Причесывающие фильтры - Allpass Filters Широкополосный фильтр - Bandpass Filters Полосовой фильтр - Enhanced Stereo Расширенное стерео @@ -20961,875 +10896,700 @@ is set to a valid editor. shortcuts - Transport: Start playback from current location - + Транспорт: Начать проигрывание с текущей позиции - Transport: Toggle metronome - + Транспорт: Метроном вкл/выкл - Transport: Stop Playback - + Транспорт: Стоп - Transport: Goto Start - + Транспорт:: Перейти к началу - Transport: Play, Stop, Rewind - + Транспорт: Воспр., Стоп, Перемотка - Transport: Goto left marker - + Транспорт: Перейти к левому маркеру - Transport: Goto right marker - + Транспорт: Перейти к правому маркеру - Transport: Toggle Loop section - + Транспорт: Цикл вкл/выкл - Transport: Toggle Record - + Транспорт: Запись вкл/выкл - Transport: Clear all rec enabled tracks - + Транспорт: Снять назначенную запись со всех треков - Toggle fullscreen - + Полный экран вкл/выкл - Edit: Copy - + Правка: Копировать - Edit: Copy in range - + Правка: Копировать диапазон - Edit: Undo - + Правка: Отменить - Edit: Redo - + Правка: Вернуть - Edit: Cut - + Правка: Вырезать - Edit: Paste - + Правка: Вставить - Edit: Paste (with dialog) - + Правка: Вставить (с диалогом) - Edit: Delete - + Правка: Удалить - File: New project - + Файл: Новый проект - File: Open from disk - + Файл: Открыть с диска - File: Save project - + Файл: Сохранить проект - File: Open recent file - + Файл: Открыть недавние - File: Save as - + Файл: Сохранить как - File: Load template - + Файл: Загрузить шаблон - File: Import midi file - + Файл: Импортировать midi файл - File: Export midi file - + Файл: Экспортировать midi файл - File: Import midi part - + Файл: Импортировать midi партию - File: Import audio file - + Файл: Импортировать аудио файл - File: Quit MusE - + Файл: Выйти из программы - Edit: Select parts on track - + Правка: Выбрать партии в треке - Open pianoroll - + Открыть пианоролл - Open drumeditor - + Открыть редактор ударных - Open listeditor - + Открыть редактор списка - Open waveeditor - + Открыть wave-редактор - Open graphical mastertrack editor - + Открыть редактор графика мастер-трека - Open list mastertrack editor - + Открыть редактор списка мастер-трека - Open midi transformer - + Открыть преобразователь midi-событий - Add midi track - + Добавить midi-трек - Add drum track - + Добавить трек ударных - Add wave track - + Добавить wave-трек - Add audio output - + Добавить аудио выход - Add audio group - + Добавить аудио-группу - Add audio input - + Добавить аудио вход - Add audio aux - + Добавить аудио aux - Structure: Global cut - + Структура: Общая вырезка - Structure: Global insert - + Структура: Общая вставка - Structure: Global split - + Структура: Общее разделение - Structure: Cut events - + Структура: Вырезать события - View: Open mixer #1 window - + Вид: Открыть окно микшера #1 - View: Open mixer #2 window - + Вид: Открыть окно микшера #2 - View: Toggle transport window - + Вид: Откр/закр окно транспорта - View: Toggle bigtime window - + Вид: Откр/закр окно хронометра - View: Open marker window - + Вид: Открыть окно маркеров - Settings: Follow song by page - + Настройки: Следовать за проектом постранично - Settings: Follow song off - + Настройки: Не следовать за проектом - Settings: Follow song continuous - + Настройки: Следовать за проектом непрерывно - Settings: Global configuration - + Настройки: Общая конфигурация - Settings: Configure shortcuts - + Настройки: Настроить "горячие клавиши" - Settings: Configure metronome - + Настройки: Настроить метроном - Settings: Midi sync configuration - + Настройки: Конфигурация midi-синхр - Settings: Midi file import/export configuration - + Настройки: Настройка экспорта/импорта Midi-файла - Settings: Appearance settings - + Настройки: Настройки внешнего вида - Settings: Midi ports / Soft Synth - + Настройки: Midi-порты / Синтезаторы - Settings: Audio subsystem configuration - + Настройки: Конфигурация аудио-подсистемы - Midi: Edit midi instruments - + Midi: Редактировать midi-инструмент - Midi: Open midi input transform - + Midi: Открыть преобразователь midi-входа - Midi: Open midi input filter - + Midi: Открыть фильтр midi-входа - Midi: Midi input transpose - + Midi: Транспозиция midi-входа - Midi: Midi remote control - + Midi: Дистанционный midi-контроль - Midi: Random rhythm generator - + Midi: Генератор случайного ритма - Midi: Reset midi - + Midi: Сброс настроек midi - Midi: Init midi - + Midi: Инициализация midi - Midi: Midi local off - + Midi: Локальное управление отключено - Audio: Bounce audio to track - + Аудио: Свести аудио в трек - Audio: Bounce audio to file - + Аудио: Свести аудио в файл - Audio: Restart audio - + Аудио: Перезапустить аудио - Automation: Mixer automation - + Автоматизация: Автоматизация микшера - Automation: Take mixer snapshot - + Automation: Сделать снимок микшера - Automation: Clear mixer automation - + Automation: Очистить автоматизацию микшера - Help: Open Manual - + Справка: Открыть руководство - Help: Toggle whatsthis mode - + Справка: Что это? - - Edit: Edit selected part - + Правка: Редактировать выбранную партию - Edit: Select nearest part on track above - + Правка: Выбрать ближайшую партию треком выше - Edit: Add nearest part on track above - + Правка: Добавить ближайшую партию треком выше - Edit: Select nearest part on track below - + Правка: Выбрать ближайшую партию треком ниже - Edit: Add nearest part on track below - + Правка: Добавить ближайшую партию треком ниже - Edit: Insert empty measure - + Правка: Вставить пустой такт - Edit: Paste as clones - + Правка: Вставить как клон - Edit: Paste as clones (with dialog) - + Правка: Вставить как клон (с диалогом) - Select track above - + Выбрать трек выше - Select track below - + Выбрать трек ниже - Midi: Transpose - + Midi: Транпонировать - Edit: Select all - + Правка: Выбрать всё - Edit: Select none - + Правка: Снять выделение - Edit: Invert Selection - + Правка: Инвертировать выделенное - Edit: Select events/parts inside locators - + Правка: Выбрать события/партии внутри локаторов - Edit: Select events/parts outside locators - + Правка: Выбрать события/партии вне локаторов - Edit: Select previous part - + Правка: Выбрать предыдущую партию - Edit: Select next part - + Правка: Выбрать следующую партию - Edit: Select nearest part/event to the left or move cursor - + Правка: Выбрать ближайшую партию/событие слева или передвинуть курсор - Edit: Add nearest part/event to the left to selection - + Правка: Добавить к выделенному ближайшую партию/событие слева - Edit: Select nearest part/event to the right or move cursor - + Правка: Выбрать ближайшую партию/событие справа или передвинуть курсор - Edit: Add nearest part/event to the right to selection - + Правка: Добавить к выделенному ближайшую партию/событие справа - Edit: Set locators to selection - + Правка: Поставить локаторы на выбранный диапазон - Edit: Increase pitch - + Правка: Повысить высоту тона - Edit: Decrease pitch - + Правка: Понизить высоту тона - Edit: Increase event position - + Правка: Увеличить позицию события - Edit: Decrease event position - + Правка: Уменьшить позицию события - View: Zoom in - + Вид: Увеличить - View: Zoom out - + Вид: Уменьшить - View: Goto Current Position - + Вид: Перейти к текущей позиции - - View: Scroll left - + Вид: Прокрутить влево - Edit: Set Fixed Length on Midi Events - + Правка: Установить фикс. длину midi-событий - Quantize - Квантовать + Квантовать - Modify Note Length - + Изменить длительность ноты - Modify Velocity - + Изменить скорость нажатия - Edit: Crescendo - + Правка: Крещендо - Edit: Thin Out - + Правка: Сделать выборку - Edit: Erase Event - + Правка: Удалить событие - Edit: Delete Overlaps - + Правка: Убрать наложения - Edit: Note Shift - + Правка: Сдвиг ноты - Edit: Move Clock - + Правка: Передвинуть время - Edit: Copy Measure - + Правка: Скопировать такт - Edit: Erase Measure - + Правка: Убрать такт - Edit: Delete Measure - + Правка: Удалить такт - Edit: Create Measure - + Правка: Создать такт - Edit: Change Event Color - + Правка: Изменить цвет события - Tool: Pointer - + Инструменты: Указатель - Tool: Pencil - + Инструменты: Карандаш - Tool: Eraser - + Инструменты: Ластик - Tool: Line Draw - + Инструменты: Рисовать линию - Tool: Cursor - + Инструменты: Курсор - Add note velocity 1 - + Добавить скорость нажатия 1 - Add note velocity 2 - + Добавить скорость нажатия 2 - Add note velocity 3 - + Добавить скорость нажатия 3 - Add note velocity 4 - + Добавить скорость нажатия 4 - Cursor step size: larger - + Размер шага курсора: больше - Cursor step size: smaller - + Размер шага курсора: меньше - Instrument/Cursor up - + Инструмент/Курсор вверх - Instrument/Cursor down - + Инструмент/Курсор вниз - Tool: Scissor - + Tool: Ножницы - Tool: Glue - + Tool: Клей - Tool: Mute - + Tool: Без звука - Transport: Increase current position - + Транспорт: Увеличить тек. позицию - Transport: Decrease current position - + Транспорт: Уменьшить тек. позицию - Transport: Increase current position, no snap - + Транспорт: Увеличить тек. позицию, без привязки - Transport: Decrease current position, no snap - + Транспорт: Уменьшить тек. позицию, без привязки - Quantize: Set quantize to 1/1 note - + Квантование: Квантовать целыми (1/1) - Quantize: Set quantize to 1/2 note - + Квантование: Квантовать половинными (1/2) - Quantize: Set quantize to 1/4 note - + Квантование: Квантовать четвертными (1/4) - Quantize: Set quantize to 1/8 note - + Квантование: Квантовать восьмыми (1/8) - Quantize: Set quantize to 1/16 note - + Квантование: Квантовать шестнадцатыми (1/16) - Quantize: Set quantize to 1/32 note - + Квантование: Квантовать тридцатьвторыми (1/32) - Quantize: Set quantize to 1/64 note - + Квантование: Квантовать шестьдесятчетвертыми (1/64) - Quantize: Toggle triol quantization - + Квантование: Вкл/выкл триоль - Quantize: Toggle punctuation quantization - + Квантование: Вкл/выкл точку - Quantize: Toggle punctuation quantization (2) - + Квантование: Вкл/выкл двойную точку - Edit: Insert at location - + Правка: Вставить сюда - Edit: Increase length - + Правка: Увеличить длину - Edit: Decrease length - + Правка: Уменьшить длину - Insert Note - Вставить ноту + Вставить ноту - Insert SysEx - Вставить SysEx + Вставить SysEx - Insert Ctrl - Вставить кнтрл + Вставить кнтрл - Insert Meta - Вставить Meta + Вставить Meta - Insert Channel Aftertouch - Вставить Channel Aftertouch + Вставить Channel Aftertouch - Insert Key Aftertouch - Вставить Key Aftertouch + Вставить Key Aftertouch - Insert Tempo - Вставить темп + Вставить темп - Insert Signature - Вставить размер + Вставить размер - Change Event Position - + Изменить позицию события - Edit Event Value - + Редактировать значение события - Insert Key - + Вставить ключ - Goto Next Marker - + Перейти к след. маркеру - Goto Prev Marker - + Перейти к предыд. маркеру diff --git a/muse2/share/templates/MusE.cfg b/muse2/share/templates/MusE.cfg index 3c13b834..875a29a5 100644 --- a/muse2/share/templates/MusE.cfg +++ b/muse2/share/templates/MusE.cfg @@ -54,6 +54,7 @@ 0 0 0 + 1 arial,10,-1,5,50,0,0,0,0,0 arial,7,-1,5,50,0,0,0,0,0 arial,10,-1,5,50,0,0,0,0,0 diff --git a/muse2/share/templates/audio.med b/muse2/share/templates/audio.med index 0e0abd55..8fc7d9b5 100644 --- a/muse2/share/templates/audio.med +++ b/muse2/share/templates/audio.med @@ -17,8 +17,10 @@ 0 0 0 - - + + + 1 + 0 0 0 @@ -53,10 +55,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -67,10 +93,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,10 +131,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -95,10 +169,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -109,10 +207,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -123,10 +245,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -137,10 +283,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -151,10 +321,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -165,10 +359,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -179,10 +397,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -193,10 +435,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -207,10 +473,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -221,10 +511,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -235,10 +549,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -249,10 +587,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -263,10 +625,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -289,7 +675,7 @@ 1 90 0 - 3 + 2 0 1 @@ -329,7 +715,7 @@ 0 1 - 384 + 1536 0 0 @@ -575,14 +961,14 @@ - + - + @@ -647,4 +1033,6 @@ + + diff --git a/muse2/share/templates/default.med b/muse2/share/templates/default.med index a33ffc3d..f9518959 100644 --- a/muse2/share/templates/default.med +++ b/muse2/share/templates/default.med @@ -17,6 +17,10 @@ 0 0 0 + + + 1 + 0 0 0 @@ -51,10 +55,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -65,10 +93,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -79,10 +131,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -93,10 +169,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -107,10 +207,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -121,10 +245,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -135,10 +283,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -149,10 +321,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -163,10 +359,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -177,10 +397,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -191,10 +435,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -205,10 +473,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -219,10 +511,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -233,10 +549,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -247,10 +587,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -261,10 +625,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,7 +675,7 @@ 1 90 0 - 3 + 2 0 1 @@ -327,7 +715,7 @@ 0 1 - 384 + 1536 0 0 @@ -382,11 +770,11 @@ - + - + - + @@ -412,5 +800,6 @@ + + - diff --git a/muse2/share/templates/midiGM.med b/muse2/share/templates/midiGM.med index 19b74dff..c21f6d0f 100644 --- a/muse2/share/templates/midiGM.med +++ b/muse2/share/templates/midiGM.med @@ -17,8 +17,10 @@ 0 0 0 - - + + + 1 + 0 0 0 @@ -55,10 +57,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -72,10 +98,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -89,10 +139,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -106,10 +180,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -123,10 +221,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -140,10 +262,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -157,10 +303,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -174,10 +344,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -191,10 +385,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -208,10 +426,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -225,10 +467,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -242,10 +508,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -259,10 +549,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -276,10 +590,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -293,10 +631,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -310,10 +672,34 @@ 0 + + + + + + + + + + + + + + + + + + + + + + + + @@ -337,7 +723,7 @@ 1 90 0 - 3 + 2 0 1 @@ -377,7 +763,7 @@ 0 1 - 384 + 1536 0 0 @@ -560,4 +946,6 @@ + + diff --git a/muse2/share/templates/monorecord.med b/muse2/share/templates/monorecord.med index 738cab17..77207417 100644 --- a/muse2/share/templates/monorecord.med +++ b/muse2/share/templates/monorecord.med @@ -17,8 +17,10 @@ 0 0 0 - - + + + 1 + 0 0 0 @@ -53,10 +55,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -67,10 +93,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,10 +131,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -95,10 +169,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -109,10 +207,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -123,10 +245,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -137,10 +283,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -151,10 +321,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -165,10 +359,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -179,10 +397,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -193,10 +435,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -207,10 +473,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -221,10 +511,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -235,10 +549,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -249,10 +587,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -263,10 +625,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -274,7 +660,7 @@ - generic midi + General Midi @@ -405,7 +791,7 @@ - generic midi + General Midi @@ -536,7 +922,7 @@ - generic midi + General Midi @@ -682,7 +1068,7 @@ 1 90 0 - 3 + 2 0 1 @@ -722,7 +1108,7 @@ 0 1 - 384 + 1536 0 0 @@ -853,4 +1239,6 @@ + + diff --git a/muse2/share/templates/synti.med b/muse2/share/templates/synti.med index 461e315a..86e01660 100644 --- a/muse2/share/templates/synti.med +++ b/muse2/share/templates/synti.med @@ -17,8 +17,10 @@ 0 0 0 - - + + + 1 + 0 0 0 @@ -57,10 +59,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -71,10 +97,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -85,10 +135,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -99,10 +173,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -113,10 +211,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -127,10 +249,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -141,10 +287,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -155,10 +325,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -169,10 +363,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,10 +401,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -197,10 +439,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -211,10 +477,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -225,10 +515,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -239,10 +553,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -253,10 +591,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -267,10 +629,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -412,7 +798,7 @@ - generic midi + General Midi @@ -692,7 +1078,7 @@ 1 90 0 - 3 + 2 0 1 @@ -732,7 +1118,7 @@ 0 1 - 384 + 1536 0 0 @@ -862,7 +1248,7 @@ 0 0 - + @@ -897,7 +1283,7 @@ 3 0 - + @@ -919,7 +1305,7 @@ - + @@ -933,22 +1319,10 @@ - - - - - - - - - - - - 0 @@ -971,4 +1345,6 @@ + + diff --git a/muse2/synti/fluid/fluid.cpp b/muse2/synti/fluid/fluid.cpp index 48d68fb4..8a2fd13b 100644 --- a/muse2/synti/fluid/fluid.cpp +++ b/muse2/synti/fluid/fluid.cpp @@ -154,6 +154,8 @@ bool ISynth::setController(int ch, int ctrl, int val) break; case MusECore::CTRL_PITCH: + // MusE's range is from -8192 to +8191, fluidsynth seems to be [0, 16384] + val +=8192; fluid_synth_pitch_bend (_fluidsynth, ch, val); break; @@ -378,8 +380,9 @@ bool ISynth::processEvent(const MusECore::MidiPlayEvent& ev) { switch(ev.type()) { case MusECore::ME_CONTROLLER: - setController(ev.channel(), ev.dataA(), ev.dataB()); - return true; + setController(ev.channel(), ev.dataA(), ev.dataB()); + //return true; // ?? + break; case MusECore::ME_NOTEON: return playNote(ev.channel(), ev.dataA(), ev.dataB()); case MusECore::ME_NOTEOFF: diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp index fded650d..a42954f3 100644 --- a/muse2/synti/fluidsynth/fluidsynti.cpp +++ b/muse2/synti/fluidsynth/fluidsynti.cpp @@ -488,7 +488,8 @@ bool FluidSynth::processEvent(const MusECore::MidiPlayEvent& ev) printf("%x ", ev.data()[i]); } setController(ev.channel(), ev.dataA(), ev.dataB(), false); - return true; + //return true; // ?? + break; case MusECore::ME_NOTEON: return playNote(ev.channel(), ev.dataA(), ev.dataB()); case MusECore::ME_NOTEOFF: diff --git a/muse2/synti/simpledrums2/CMakeLists.txt b/muse2/synti/simpledrums2/CMakeLists.txt index bf0c33d8..172ce616 100644 --- a/muse2/synti/simpledrums2/CMakeLists.txt +++ b/muse2/synti/simpledrums2/CMakeLists.txt @@ -74,9 +74,14 @@ set (FILES_TO_TRANSLATE # libsimpledrums.so # - use precompiled header files # + +if ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease ) + SET(SIMPLEDRUMS_OPTFLAGS "-O6") +endif ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease ) + set_target_properties ( simpledrums PROPERTIES PREFIX "" - COMPILE_FLAGS "-O6 -fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h" + COMPILE_FLAGS "${SIMPLEDRUMS_OPTFLAGS} -fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h" ) ## diff --git a/muse2/synti/simpledrums2/simpledrums.cpp b/muse2/synti/simpledrums2/simpledrums.cpp index c7c2c85f..945abbb0 100644 --- a/muse2/synti/simpledrums2/simpledrums.cpp +++ b/muse2/synti/simpledrums2/simpledrums.cpp @@ -366,7 +366,8 @@ bool SimpleSynth::processEvent(const MusECore::MidiPlayEvent& ev) printf("%x ", ev.data()[i]); } setController(ev.channel(), ev.dataA(), ev.dataB(), false); - return true; + //return true; // ?? + return false; case MusECore::ME_NOTEON: return playNote(ev.channel(), ev.dataA(), ev.dataB()); case MusECore::ME_NOTEOFF: diff --git a/muse2/synti/simpledrums2/ssplugingui.cpp b/muse2/synti/simpledrums2/ssplugingui.cpp index 5b6e57b6..4ccb9bcc 100644 --- a/muse2/synti/simpledrums2/ssplugingui.cpp +++ b/muse2/synti/simpledrums2/ssplugingui.cpp @@ -536,8 +536,10 @@ SS_PluginGui::SS_PluginGui(QWidget* parent) connect(pluginFronts[i], SIGNAL(sizeChanged(int, int)), SLOT(pluginFrontSizeChanged(int, int))); connect(pluginFronts[i], SIGNAL(effectParameterChanged(int, int, int)), simplesynthgui_ptr, SLOT(effectParameterChanged(int, int, int))); } - setMinimumSize(QSize(SS_PLUGINGUI_WIDTH, geometry().height())); - setMaximumSize(QSize(SS_PLUGINGUI_MAX_WIDTH, geometry().height())); + + // FIXME: These are causing window height to be fixed way too small - can't see anything. Why? It was working before. Tim p4.0.49 + //setMinimumSize(QSize(SS_PLUGINGUI_WIDTH, geometry().height())); + //setMaximumSize(QSize(SS_PLUGINGUI_MAX_WIDTH, geometry().height())); } -- cgit v1.2.3