Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX committed Dec 31, 2021
1 parent cb4467b commit 885e3cb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion include/MidiClip.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class LMMS_EXPORT MidiClip : public Clip
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
return "clip";
//TODO: rename to "midiClip"
return "pattern";
}

inline InstrumentTrack * instrumentTrack() const
Expand Down
8 changes: 4 additions & 4 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Song::Song() :
m_isCancelled( false ),
m_playMode( Mode_None ),
m_length( 0 ),
m_clipToPlay( nullptr ),
m_midiClipToPlay( nullptr ),
m_loopClip( false ),
m_elapsedTicks( 0 ),
m_elapsedBars( 0 ),
Expand Down Expand Up @@ -228,9 +228,9 @@ void Song::processNextBuffer()
break;

case Mode_PlayClip:
if (m_clipToPlay)
if (m_midiClipToPlay)
{
clipNum = m_clipToPlay->getTrack()->getClipNum(m_clipToPlay);
clipNum = m_midiClipToPlay->getTrack()->getClipNum(m_midiClipToPlay);
trackList.push_back(m_clipToPlay->getTrack());
}
break;
Expand Down Expand Up @@ -288,7 +288,7 @@ void Song::processNextBuffer()
frameOffsetInTick -= elapsedTicks * framesPerTick;
getPlayPos().setCurrentFrame(frameOffsetInTick);

// If we are playing a BB track, or a clip with no loop enabled,
// If we are playing a BB track, or a MIDI clip with no loop enabled,
// loop back to the beginning when we reach the end
if (m_playMode == Mode_PlayBB)
{
Expand Down
6 changes: 3 additions & 3 deletions src/gui/LmmsStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ QLinearGradient getGradient( const QColor & _col, const QRectF & _rect )
qreal saturation = _col.saturationF();

QColor c = _col;
c.setHsvF( hue, 0.42 * saturation, 0.98 * value ); // TODO: clip: 1.08
c.setHsvF( hue, 0.42 * saturation, 0.98 * value ); // TODO: MIDI clip: 1.08
g.setColorAt( 0, c );
c.setHsvF( hue, 0.58 * saturation, 0.95 * value ); // TODO: clip: 1.05
c.setHsvF( hue, 0.58 * saturation, 0.95 * value ); // MIDI TODO: clip: 1.05
g.setColorAt( 0.25, c );
c.setHsvF( hue, 0.70 * saturation, 0.93 * value ); // TODO: clip: 1.03
c.setHsvF( hue, 0.70 * saturation, 0.93 * value ); // MIDI TODO: clip: 1.03
g.setColorAt( 0.5, c );

c.setHsvF( hue, 0.95 * saturation, 0.9 * value );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MidiClipView.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MidiClipView.cpp - implementation of class clip which holds notes
* MidiClipView.cpp - implementation of class MidiClipView which displays notes
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2007 Danny McRae <khjklujn/at/yahoo.com>
Expand Down
4 changes: 2 additions & 2 deletions src/tracks/InstrumentTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,8 @@ bool InstrumentTrack::play( const TimePos & _start, const fpp_t _frames,
for( clipVector::Iterator it = clips.begin(); it != clips.end(); ++it )
{
MidiClip* c = dynamic_cast<MidiClip*>( *it );
// everything which is not a clip won't be played
// A clip playing in the Piano Roll window will always play
// everything which is not a MIDI clip won't be played
// A MIDI clip playing in the Piano Roll window will always play
if(c == nullptr ||
(Engine::getSong()->playMode() != Song::Mode_PlayClip
&& (*it)->isMuted()))
Expand Down
2 changes: 1 addition & 1 deletion src/tracks/MidiClip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void MidiClip::saveSettings( QDomDocument & _doc, QDomElement & _this )
_this.setAttribute( "color", color().name() );
}
// as the target of copied/dragged clip is always an existing
// clip, we must not store actual position, instead we store -1
// MIDI clip, we must not store actual position, instead we store -1
// which tells loadSettings() not to mess around with position
if( _this.parentNode().nodeName() == "clipboard" ||
_this.parentNode().nodeName() == "dnddata" )
Expand Down

0 comments on commit 885e3cb

Please sign in to comment.