diff --git a/ChangeLog b/ChangeLog index 7f557794e6..8c4cb98af3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2006-05-20 Tobias Doerffel + + * data/locale/de.ts: + updated German translation + + * src/core/bb_editor.cpp: + added button in bb-editor for adding new beat/bassline + + * include/track.h: + * src/core/track.cpp: + * src/tracks/bb_track.cpp: + * src/tracks/instrument_track.cpp: + * src/tracks/pattern.cpp: + * src/tracks/sample_track.cpp: + added "muted"-property to track-content-objects for being able to mute + single patterns, samples etc. either via context-menu or using + and middle mousebutton + 2006-05-19 Tobias Doerffel * src/core/track_container.cpp: @@ -1901,7 +1919,7 @@ 2005-12-08 Tobias Doerffel * src/core/midi_tab_widget.cpp: - - always un-check items in port-menus when disabling receceiving or + - always un-check items in port-menus when disabling receiving or sending MIDI-events - small GUI improvements @@ -2087,8 +2105,8 @@ added so called audio-ports which are important for transporting sound from it's origin through the mixer and the effect-board (the latter one isn't existing yet but coming quite soon) - another important - point is ability of having output-ports for each channel/sample-track - with JACK + point is the ability of having output-ports for each channel/sample- + track with JACK * src/tracks/channel_track.cpp: translate default-channel-name "Default" diff --git a/TODO b/TODO index 57f6bfb536..b902f37aae 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ +- add/remove-steps button in bb-editor for adding/removing according number of steps to/from all patterns of visible beat/baseline - replace rest of wizard by simple directory-selection-dialog for working-dir when running the first time -- do REAL release in envelopes (can't be precalculated as it depends on key-press-duration/rest of envelope) - correctly load steps/dots from FLP-files - convert FL-Plucked!-parameters to Vibed-parameters - in flp-import-filter: merge play-list-items if possible @@ -11,11 +11,10 @@ - undo/redo-support in note/track etc. - save tco-settings in trackContentWidget::saveSettings() etc. instead of track::... - restore stacking-order of windows when loading project -- bristol-bindings +- bristol-bindings? - resample sample-track-tcos when using hq-mode - add support for panes-interface (like blender) (instead of MDI etc.) - message to user when importing unsupported MIDI-file (track-count = 0) -- volume-knobs for each sample-track - AMS/OMS-bindings - remove binary-embed-system - recording-functionality @@ -38,8 +37,6 @@ - speed up painting of sampleTCO - solve problems with different keyboard-layouts when playing channel-track with pc-keyboard -> use tr() - panning env+lfo -- plucked-string-synth: knob for metallic -> use noise as wave-shape -- finish qt4-port and make LMMS usable when compiling with Qt4 - rewrite export-project-dialog using layout-mechanism - dynamic pitch-change - make piano-roll use the global clipboard?? @@ -53,7 +50,6 @@ - effect-board -> live-fx from input - chord-editor? - WAVE/OGG/MP3-Import -> FFT-analysis -> write notes -- FLP-Import - classical note-edit-window -> also ability of printing and maybe later scanning & recognition of notes - add FLAC as export-format? diff --git a/data/locale/de.qm b/data/locale/de.qm index b0cfe5c1a8..bc034e8e09 100755 Binary files a/data/locale/de.qm and b/data/locale/de.qm differ diff --git a/data/locale/de.ts b/data/locale/de.ts index d864bfab06..ba36eab7d0 100755 --- a/data/locale/de.ts +++ b/data/locale/de.ts @@ -649,6 +649,10 @@ http://lmms.sourceforge.net Beat+Baseline Editor Beat+Baseline Editor + + Add beat/bassline + Beat/Bassline hinzufügen + bbTCO @@ -842,28 +846,28 @@ Bitte wählen Sie ein Verzeichnis: For using the ready presets and samples of LMMS and enjoying the demo-songs the according files have to be copied or linked into your LMMS-working-directory. When copying files, you can modify them, but they need additional space in your working-directory. If you link files, you cannot modify them, but they need no extra space. So it's recommended to copy presets and demo-projects and link samples, which are bigger in size. - Damit Sie die fertigen Presets und Samples von LMMS nutzen können und mit den Demo-Songs herumspielen können, müssen die entsprechenden Dateien in Ihr LMMS-Arbeitsverzeichnis kopiert oder verknüpft werden. + Damit Sie die fertigen Presets und Samples von LMMS nutzen können und mit den Demo-Songs herumspielen können, müssen die entsprechenden Dateien in Ihr LMMS-Arbeitsverzeichnis kopiert oder verknüpft werden. Kopierte Dateien können Sie ändern, aber gleichzeitig belegen diese auch zusätzlichen Speicherplatz in Ihrem Arbeitsverzeichnis. Wenn Sie Dateien verknüpfen, können Sie diese nicht verändern, brauchen dafür aber auch keinen extra Speicherplatz. Deshalb wird empfohlen, Presets und Demo-Projekte zu kopieren und die Samples zu verknüpfen, da letztere doch eine gewisse Größe haben. samples: - Samples: + Samples: copy - Kopieren + Kopieren link - Verknüpfen + Verknüpfen presets: - Presets: + Presets: demo projects: - Demo Projekte: + Demo Projekte: Welcome to LMMS @@ -875,7 +879,7 @@ Kopierte Dateien können Sie ändern, aber gleichzeitig belegen diese auch zusä Copy or link files - Dateien kopieren oder verknüpfen + Dateien kopieren oder verknüpfen Directory not existing @@ -1533,6 +1537,10 @@ Stellen Sie sicher, dass Sie Schreibzugriff auf die gewählte Datei/Gerät haben Please wait, loading sample for preview... Bitte warten, Sample wird für Vorschau geladen.... + + --- Factory files --- + + mainWindow @@ -1763,6 +1771,14 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS.Send MIDI-events MIDI-Ereignisse senden + + Default velocity for all input-events + Standardlautstärke für alle einkommenden Ereignisse + + + Default velocity for all output-events + Standardlautstärke für alle ausgehende Ereignisse + mixer @@ -1884,11 +1900,11 @@ Bitte besuchen Sie http://wiki.mindrules.net für Dokumentationen über LMMS. Channel muted - Kanal stumm geschalten + Kanal stumm geschalten The channel this pattern belongs to is currently muted therefore freezing makes no sense! Do you still want to continue? - Der Kanal, zu dem dieser Pattern gehört, ist derzeit stumm geschaltet, weshalb das Einfrieren keinen Sinn ergibt! Wollen Sie trotzdem fortfahren? + Der Kanal, zu dem dieser Pattern gehört, ist derzeit stumm geschaltet, weshalb das Einfrieren keinen Sinn ergibt! Wollen Sie trotzdem fortfahren? Add steps @@ -1912,6 +1928,14 @@ use mouse wheel to set volume of a step Doppelklick, um diesen Pattern im Piano-Roll zu öffnen Lautstärke eines Steps kann mit Mausrad geändert werden + + Pattern muted + Pattern stummgeschaltet + + + The track this pattern belongs to or the pattern itself is currently muted therefore freezing makes no sense! Do you still want to continue? + Die Spur, zu der dieser Pattern gehört oder dieser Pattern selbst sind derzeit stummgeschaltet, weshalb das Einfrieren keinen Sinn ergibt. Wollen Sie trotzdem fortfahren? + patternFreezeStatusDialog @@ -2104,6 +2128,10 @@ Lautstärke eines Steps kann mit Mausrad geändert werden simple sampler with various settings for using samples (e.g. drums) in an instrument-track Einfacher Sampler mit verschiedenen Einstellungen zur Nutzung von Samples (z.B. Drums) in einer Instrument-Spur + + Filter for importing FL Studio projects into LMMS + Filter für Import von FL Studio Projekten in LMMS + projectNotes @@ -2283,6 +2311,22 @@ Lautstärke eines Steps kann mit Mausrad geändert werden Sample track Sample-Spur + + Channel volume + Kanal Lautstärke + + + Channel volume: + Kanal Lautstärke: + + + VOL + LAUT + + + With this knob you can set the volume of the opened channel. + Mit diesem Knopf können Sie die Lautstärke des geöffneten Kanals ändern. + setupDialog @@ -2420,6 +2464,18 @@ Latenz: %2 ms Choose artwork-theme directory Artwork-Verzeichnis wählen + + Display volume as dbV + Lautstärke als in dbV anzeigen + + + FL Studio installation directory + FL Studio Installationsverzeichnis + + + Choose FL Studio installation directory + FL Studio Installationsverzeichnis wählen + setupWidget @@ -2558,7 +2614,7 @@ Wollen Sie diese überschreiben? MIDI-files (*.mid) - MIDI-Dateien (*.mid) + MIDI-Dateien (*.mid) TEMPO/BPM @@ -2620,6 +2676,10 @@ Bitte stellen Sie sicher, dass Sie Schreibrechte auf diese Datei besitzen und ve Edit mode (select and move) Editier-Modus (auswählen und verschieben) + + Auto limiter + Autolimiter + surroundArea @@ -2794,7 +2854,7 @@ Bitte stellen Sie sicher, dass Sie Schreibrechte auf diese Datei und das Verzeic Couldn't find a filter for importing file %1. You should convert this file into a format supported by LMMS using another software. - Konnte keinen Filter finden, um die Datei %1 zu importieren. + Konnte keinen Filter finden, um die Datei %1 zu importieren. Sie sollten diese Datei mit Hilfe einer anderen Software in ein Format konvertieren, das von LMMS unterstützt wird. @@ -2807,6 +2867,16 @@ Please make sure you have read-permission to the file and the directory containi Konnte Datei %1 nicht zum Lesen öffnen. Bitte stellen Sie sicher, dass Sie Lese-Rechte auf diese Datei sowie das Verzeichnis besitzen und probieren es erneut! + + Couldn't find a filter for importing file %1. +You should convert this file into a format supported by LMMS using another software. + Es konnte kein Filter gefunden werden, um die Datei %1 zu importieren. +Sie sollten diese Datei mit Hilfe anderer Software in ein von LMMS unterstützes Format umwandeln. + + + Importing FLP-file... + Importiere FLP-Datei... + trackContentObject @@ -2850,6 +2920,10 @@ Bitte stellen Sie sicher, dass Sie Lese-Rechte auf diese Datei sowie das Verzeic Press <Ctrl> for free resizing. Drücken Sie <Strg> für freie Größenänderung. + + Mute/unmute (<Ctrl> + middle click) + Stumm/Laut schalten (<Strg> + Mittelklick) + trackOperationsWidget @@ -3274,4 +3348,15 @@ Die LED rechts unterhalb der Wellenform gibt an, ob die Saite aktiviert ist.klicken, um Visualisierung des Masterausgangs an-/auszuschalten + + volumeKnob + + Please enter a new value between -96.0 dbV and 6.0 dbV: + Bitte geben Sie einen Wert zwischen -96.0 dbV und 6.0 dbV ein: + + + Please enter a new value between %1 and %2: + Bitte geben Sie einen neuen Wert zwischen %1 und %2 ein: + + diff --git a/data/presets/TripleOscillator/SawReso.cs.xml b/data/presets/TripleOscillator/SawReso.cs.xml new file mode 100644 index 0000000000..b3c9570fe4 --- /dev/null +++ b/data/presets/TripleOscillator/SawReso.cs.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/data/presets/Vibed/Harpsichord.cs.xml b/data/presets/Vibed/Harpsichord.cs.xml new file mode 100644 index 0000000000..f9834baacb --- /dev/null +++ b/data/presets/Vibed/Harpsichord.cs.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/data/presets/Vibed/SadPad.cs.xml b/data/presets/Vibed/SadPad.cs.xml new file mode 100644 index 0000000000..43d64ace93 --- /dev/null +++ b/data/presets/Vibed/SadPad.cs.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/data/themes/default/muted.png b/data/themes/default/muted.png new file mode 100644 index 0000000000..99449ac4da Binary files /dev/null and b/data/themes/default/muted.png differ diff --git a/include/track.h b/include/track.h index ddc9d4a4fe..01dedd3c6a 100644 --- a/include/track.h +++ b/include/track.h @@ -103,6 +103,11 @@ public: return( m_length ); } + bool muted( void ) const + { + return( m_muted ); + } + bool fixedTCOs( void ); virtual void FASTCALL movePosition( const midiTime & _pos ); @@ -137,6 +142,7 @@ protected slots: void cut( void ); void copy( void ); void paste( void ); + void toggleMute( void ); private: @@ -154,6 +160,8 @@ private: bool m_autoResize; Sint16 m_initialMouseX; + bool m_muted; + textFloat * m_hint; midiTime m_oldTime;// used for undo/redo while mouse-button is pressed diff --git a/src/core/bb_editor.cpp b/src/core/bb_editor.cpp index 6606cebab3..5e1f145b4c 100644 --- a/src/core/bb_editor.cpp +++ b/src/core/bb_editor.cpp @@ -114,6 +114,12 @@ bbEditor::bbEditor( engine * _engine ) : tr( "Stop playing of current beat/bassline (Space)" ), this, SLOT( stop() ), m_toolBar ); + toolButton * add_bb_track = new toolButton( + embed::getIconPixmap( "add_bb_track" ), + tr( "Add beat/bassline" ), + eng()->getSongEditor(), SLOT( addBBTrack() ), + m_toolBar ); + #ifdef QT4 m_playButton->setWhatsThis( @@ -144,6 +150,8 @@ bbEditor::bbEditor( engine * _engine ) : tb_layout->addWidget( m_stopButton ); tb_layout->addSpacing( 20 ); tb_layout->addWidget( m_bbComboBox ); + tb_layout->addSpacing( 10 ); + tb_layout->addWidget( add_bb_track ); tb_layout->addStretch(); tb_layout->addWidget( l ); tb_layout->addSpacing( 15 ); @@ -198,7 +206,7 @@ void bbEditor::setCurrentBB( int _bb ) tact bbEditor::lengthOfBB( csize _bb ) { midiTime max_length; - + trackVector tv = tracks(); for( trackVector::iterator it = tv.begin(); it != tv.end(); ++it ) { diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp index 4d8e9604fc..83936e4180 100644 --- a/src/core/mixer.cpp +++ b/src/core/mixer.cpp @@ -154,16 +154,16 @@ bool mixer::criticalXRuns( void ) const void mixer::setClipScaling( bool _state ) { m_mixMutex.lock(); - + m_scaleClip = _state; - + if( _state ) { m_poolDepth = 3; m_readBuffer = 0; m_analBuffer = m_readBuffer + 1; m_writeBuffer = m_poolDepth - 1; - + for( ch_cnt_t chnl=0; chnl < m_audioDev->channels(); ++chnl ) { m_clipped[chnl] = FALSE; @@ -172,6 +172,9 @@ void mixer::setClipScaling( bool _state ) m_previousSample[chnl] = 0.0; m_newBuffer[chnl] = FALSE; } + // FIXME: why assign buffer-ptr to m_readBuf just for calling + // another method? + // clearAudioBuffer(m_bufferPool[i],...) would do as well for( Uint8 i = 0; i < 3; i++ ) { m_readBuf = m_bufferPool[i]; @@ -185,7 +188,7 @@ void mixer::setClipScaling( bool _state ) m_writeBuffer = 1; m_analBuffer = 1; } - + m_mixMutex.unlock(); } @@ -239,16 +242,16 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) // qSwap( m_curBuf, m_nextBuf ); m_writeBuffer++; m_writeBuffer %= m_poolDepth; - + m_readBuffer++; m_readBuffer %= m_poolDepth; - + m_analBuffer++; m_analBuffer %= m_poolDepth; - + m_writeBuf = m_bufferPool[m_writeBuffer]; m_readBuf = m_bufferPool[m_readBuffer]; - + // clear last audio-buffer clearAudioBuffer( m_writeBuf, m_framesPerAudioBuffer ); @@ -280,9 +283,8 @@ const surroundSampleFrame * mixer::renderNextBuffer( void ) { if( ( *it )->m_bufferUsage != audioPort::NONE ) { - processBuffer( - ( *it )->firstBuffer(), - ( *it )->nextFxChannel() ); + processBuffer( ( *it )->firstBuffer(), + ( *it )->nextFxChannel() ); ( *it )->nextPeriod(); } } diff --git a/src/core/track.cpp b/src/core/track.cpp index 60a7bbdf5e..04bf574de1 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -95,6 +95,7 @@ trackContentObject::trackContentObject( track * _track ) : m_action( NONE ), m_autoResize( FALSE ), m_initialMouseX( 0 ), + m_muted( FALSE ), m_hint( NULL ) { if( s_textFloat == NULL ) @@ -225,6 +226,7 @@ void trackContentObject::mousePressEvent( QMouseEvent * _me ) if( m_track->getTrackContainer()->allowRubberband() == TRUE && _me->button() == Qt::LeftButton ) { + // if rubberband is active, we can be selected if( m_track->getTrackContainer()->rubberBandActive() == FALSE ) { if( @@ -246,11 +248,13 @@ void trackContentObject::mousePressEvent( QMouseEvent * _me ) } else if( getTrack()->eng()->getMainWindow()->isShiftPressed() == TRUE ) { + // add/remove object to/from selection selectableObject::mousePressEvent( _me ); } else if( _me->button() == Qt::LeftButton && getTrack()->eng()->getMainWindow()->isCtrlPressed() == TRUE ) { + // start drag-action multimediaProject mmp( multimediaProject::DRAG_N_DROP_DATA ); saveState( mmp, mmp.content() ); #ifdef QT4 @@ -272,6 +276,7 @@ void trackContentObject::mousePressEvent( QMouseEvent * _me ) /* eng()->getMainWindow()->isShiftPressed() == FALSE &&*/ fixedTCOs() == FALSE ) { + // move or resize setJournalling( FALSE ); m_initialMouseX = _me->x(); @@ -307,12 +312,17 @@ void trackContentObject::mousePressEvent( QMouseEvent * _me ) mouseMoveEvent( _me ); s_textFloat->show(); } - else if( ( _me->button() == Qt::MidButton/* || - ( _me->button() == Qt::LeftButton && - eng()->getMainWindow()->isShiftPressed() == TRUE )*/ ) && - fixedTCOs() == FALSE ) + else if( _me->button() == Qt::MidButton ) { - close(); + if( getTrack()->eng()->getMainWindow()->isCtrlPressed() ) + { + toggleMute(); + } + else if( fixedTCOs() == FALSE ) + { + // delete ourself + close(); + } } } @@ -464,9 +474,10 @@ void trackContentObject::contextMenuEvent( QContextMenuEvent * _cme ) tr( "Copy" ), this, SLOT( copy() ) ); contextMenu.addAction( embed::getIconPixmap( "edit_paste" ), tr( "Paste" ), this, SLOT( paste() ) ); - //contextMenu.insertSeparator(); - //contextMenu.insertItem( tr( "&Help" ), this, SLOT( displayHelp() ) ); - + contextMenu.insertSeparator(); + contextMenu.addAction( embed::getIconPixmap( "muted" ), + tr( "Mute/unmute ( + middle click)" ), + this, SLOT( toggleMute() ) ); constructContextMenu( &contextMenu ); contextMenu.exec( QCursor::pos() ); @@ -559,6 +570,15 @@ void trackContentObject::paste( void ) +void trackContentObject::toggleMute( void ) +{ + m_muted = !m_muted; + update(); +} + + + + void trackContentObject::setAutoResizeEnabled( bool _e ) { m_autoResize = _e; @@ -1215,8 +1235,7 @@ void trackWidget::changePosition( const midiTime & _new_pos ) for( csize i = 0; i < tcos; ++i ) { - trackContentObject * tco = - m_trackContentWidget.getTCO( i ); + trackContentObject * tco = m_trackContentWidget.getTCO( i ); tco->changeLength( tco->length() ); Sint32 ts = tco->startPosition(); Sint32 te = tco->endPosition(); diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 8242e3389f..3f228392b1 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -135,7 +135,7 @@ void bbTCO::mouseDoubleClickEvent( QMouseEvent * ) void bbTCO::paintEvent( QPaintEvent * ) { QColor col = m_color; - if( getTrack()->muted() ) + if( getTrack()->muted() || muted() ) { col = QColor( 160, 160, 160 ); } @@ -189,7 +189,13 @@ void bbTCO::paintEvent( QPaintEvent * ) p.setFont( pointSize<7>( p.font() ) ); p.setPen( QColor( 0, 0, 0 ) ); - p.drawText( 2, QFontMetrics( p.font() ).height() - 1, m_name ); + p.drawText( 2, p.fontMetrics().height() - 1, m_name ); + + if( muted() ) + { + p.drawPixmap( 3, p.fontMetrics().height() + 1, + embed::getIconPixmap( "muted", 16, 16 ) ); + } #ifndef QT4 bitBlt( this, rect().topLeft(), &pm ); @@ -211,6 +217,7 @@ void bbTCO::saveSettings( QDomDocument & _doc, QDomElement & _this ) _this.setAttribute( "pos", startPosition() ); } _this.setAttribute( "len", length() ); + _this.setAttribute( "muted", muted() ); _this.setAttribute( "color", m_color.rgb() ); } @@ -225,6 +232,11 @@ void bbTCO::loadSettings( const QDomElement & _this ) movePosition( _this.attribute( "pos" ).toInt() ); } changeLength( _this.attribute( "len" ).toInt() ); + if( _this.attribute( "muted" ).toInt() != muted() ) + { + toggleMute(); + } + if( _this.attribute( "color" ).toUInt() != 0 ) { m_color.setRgb( _this.attribute( "color" ).toUInt() ); @@ -384,7 +396,8 @@ bool FASTCALL bbTrack::play( const midiTime & _start, for( vlist::iterator it = tcos.begin(); it != tcos.end(); ++it ) { - if( ( *it )->startPosition() >= lastPosition ) + if( !( *it )->muted() && + ( *it )->startPosition() >= lastPosition ) { lastPosition = ( *it )->startPosition(); lastLen = ( *it )->length(); diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 8a0fed3c59..6bcb2086a5 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -891,7 +891,8 @@ bool FASTCALL instrumentTrack::play( const midiTime & _start, it != tcos.end(); ++it ) { pattern * p = dynamic_cast( *it ); - if( p == NULL ) + // everything which is not a pattern or muted won't be played + if( p == NULL || ( *it )->muted() ) { continue; } diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 604e3eea53..a3cd1214ee 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -132,7 +132,7 @@ pattern::~pattern() // us before if( eng()->getSongEditor()->playing() && eng()->getSongEditor()->playMode() == - songEditor::PLAY_PATTERN ) + songEditor::PLAY_PATTERN ) { eng()->getSongEditor()->playPattern( NULL ); } @@ -427,6 +427,7 @@ void pattern::saveSettings( QDomDocument & _doc, QDomElement & _this ) _this.setAttribute( "pos", startPosition() ); } _this.setAttribute( "len", length() ); + _this.setAttribute( "muted", muted() ); _this.setAttribute( "steps", m_steps ); _this.setAttribute( "frozen", m_frozenPattern != NULL ); @@ -456,6 +457,10 @@ void pattern::loadSettings( const QDomElement & _this ) movePosition( _this.attribute( "pos" ).toInt() ); } changeLength( midiTime( _this.attribute( "len" ).toInt() ) ); + if( _this.attribute( "muted" ).toInt() != muted() ) + { + toggleMute(); + } clearNotes(); @@ -556,7 +561,7 @@ void pattern::freeze( void ) QMessageBox::Ok ); return; } - if( m_instrumentTrack->muted() ) + if( m_instrumentTrack->muted() || muted() ) { if( QMessageBox:: #if QT_VERSION >= 0x030200 @@ -565,9 +570,10 @@ void pattern::freeze( void ) information #endif - ( 0, tr( "Channel muted" ), - tr( "The channel this pattern " - "belongs to is " + ( 0, tr( "Pattern muted" ), + tr( "The track this pattern " + "belongs to or the " + "pattern itself is " "currently muted " "therefore " "freezing makes no " @@ -786,11 +792,6 @@ void pattern::mouseDoubleClickEvent( QMouseEvent * _me ) void pattern::mousePressEvent( QMouseEvent * _me ) { -/* if( _me->button() != Qt::LeftButton ) - { - return; -}*/ - if( _me->button() == Qt::LeftButton && m_patternType == pattern::BEAT_PATTERN && ( pixelsPerTact() >= 192 || @@ -1001,7 +1002,7 @@ void pattern::paintEvent( QPaintEvent * ) height() - 2 * TCO_BORDER_WIDTH ); } - if( getTrack()->muted() ) + if( getTrack()->muted() || muted() ) { p.setPen( QColor( 160, 160, 160 ) ); } @@ -1110,9 +1111,21 @@ void pattern::paintEvent( QPaintEvent * ) } p.setFont( pointSize<7>( p.font() ) ); - p.setPen( QColor( 32, 240, 32 ) ); - p.drawText( 2, 9, m_name ); - if( m_frozenPattern != NULL ) + if( muted() || getTrack()->muted() ) + { + p.setPen( QColor( 192, 192, 192 ) ); + } + else + { + p.setPen( QColor( 32, 240, 32 ) ); + } + p.drawText( 2, p.fontMetrics().height() - 1, m_name ); + if( muted() ) + { + p.drawPixmap( 3, p.fontMetrics().height() + 1, + embed::getIconPixmap( "muted", 16, 16 ) ); + } + else if( m_frozenPattern != NULL ) { p.setPen( QColor( 0, 224, 255 ) ); p.drawRect( 0, 0, width(), height() - 1 ); diff --git a/src/tracks/sample_track.cpp b/src/tracks/sample_track.cpp index 81f839a105..a83c37b566 100644 --- a/src/tracks/sample_track.cpp +++ b/src/tracks/sample_track.cpp @@ -192,7 +192,7 @@ void sampleTCO::paintEvent( QPaintEvent * _pe ) { #ifdef QT4 QPainter p( this ); - // TODO: set according brush/pen for gradient! +#warning TODO: set according brush for gradient! p.fillRect( _pe->rect(), QColor( 64, 64, 64 ) ); #else // create pixmap for our widget @@ -218,7 +218,7 @@ void sampleTCO::paintEvent( QPaintEvent * _pe ) p.setPen( QColor( 0, 0, 0 ) ); p.drawRect( 0, 0, width(), height() ); - if( getTrack()->muted() ) + if( getTrack()->muted() || muted() ) { p.setPen( QColor( 128, 128, 128 ) ); } @@ -236,6 +236,13 @@ void sampleTCO::paintEvent( QPaintEvent * _pe ) p.drawLine( r.x() + r.width(), r.y() + r.height() / 2, width() - 2, r.y() + r.height() / 2 ); } + + p.translate( 0, 0 ); + if( muted() ) + { + p.drawPixmap( 3, 8, embed::getIconPixmap( "muted", 16, 16 ) ); + } + #ifndef QT4 bitBlt( this, _pe->rect().topLeft(), &pm ); #endif @@ -266,6 +273,7 @@ void FASTCALL sampleTCO::saveSettings( QDomDocument & _doc, _this.setAttribute( "pos", startPosition() ); } _this.setAttribute( "len", length() ); + _this.setAttribute( "muted", muted() ); _this.setAttribute( "src", sampleFile() ); if( sampleFile() == "" ) { @@ -290,6 +298,10 @@ void FASTCALL sampleTCO::loadSettings( const QDomElement & _this ) m_sampleBuffer.loadFromBase64( _this.attribute( "data" ) ); } changeLength( _this.attribute( "len" ).toInt() ); + if( _this.attribute( "muted" ).toInt() != muted() ) + { + toggleMute(); + } } @@ -451,7 +463,7 @@ bool FASTCALL sampleTrack::play( const midiTime & _start, it != tcos.end(); ++it ) { sampleTCO * st = dynamic_cast( *it ); - if( st != NULL ) + if( st != NULL && !st->muted() ) { st->play( buf, _start_frame + static_cast( _start.getTact() *