From 023844e908af171aae519010f1c5197a732aba05 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 27 Feb 2006 09:01:13 +0000 Subject: [PATCH] added basic envelope for all notes to avoid clicks git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@91 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 6 ++++++ configure.in | 4 ++-- include/note_play_handle.h | 2 +- src/core/note_play_handle.cpp | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8482e6666..f0cb68d2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-25 Tobias Doerffel + + * src/tracks/channel_track.cpp: + apply a very basic envelope at the beginning and the end of a note for + avoiding these "typical" clicks which were there before + 2006-02-22 Tobias Doerffel * configure.in: diff --git a/configure.in b/configure.in index fc87a7d82..ec66f61a4 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.1.4-cvs20060222, tobydox/at/users/dot/sourceforge/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060222) +AC_INIT(lmms, 0.1.4-cvs20060225, tobydox/at/users/dot/sourceforge/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.1.4-cvs20060225) AM_CONFIG_HEADER(config.h) diff --git a/include/note_play_handle.h b/include/note_play_handle.h index d6c8c1f96..64c9e12a3 100644 --- a/include/note_play_handle.h +++ b/include/note_play_handle.h @@ -56,7 +56,7 @@ public: virtual inline bool done( void ) const { return( ( m_released && m_framesBeforeRelease == 0 && - m_releaseFramesDone >= m_releaseFramesToDo ) || + m_releaseFramesDone >= m_releaseFramesToDo ) || m_channelTrack == NULL ); } diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index ff0f0a190..ececd7968 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -51,7 +51,7 @@ notePlayHandle::notePlayHandle( channelTrack * _chnl_trk, m_framesAhead( _frames_ahead ), m_totalFramesPlayed( 0 ), m_framesBeforeRelease( 0 ), - m_releaseFramesToDo( 0 ), + m_releaseFramesToDo( 0 ), m_releaseFramesDone( 0 ), m_released( FALSE ), m_baseNote( TRUE ), @@ -246,8 +246,8 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) m_framesBeforeRelease = _s; if( m_channelTrack != NULL ) { - m_releaseFramesToDo = - m_channelTrack->m_envWidget->releaseFrames(); + m_releaseFramesToDo = tMax( 10, + m_channelTrack->m_envWidget->releaseFrames() ); if( !configManager::inst()->value( "ui", "manualchannelpiano" ).toInt() ) { @@ -264,7 +264,7 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) } else { - m_releaseFramesToDo = 0; + m_releaseFramesToDo = 10; } m_released = TRUE;