oversampled vibed to get hq-mode and regular mode to sound the same

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@415 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Danny McRae
2006-09-25 16:18:59 +00:00
parent 2b38b8c0e8
commit 60abfb14d7
4 changed files with 15 additions and 6 deletions

View File

@@ -1,3 +1,13 @@
2006-09-25 Danny McRae <khjklujn/at/users/dot/sourceforge/dot/net>
* plugins/vibed/vibrating_string.cpp:
2x oversampling in non-hq-mode to get the instument to sound the
same in both modes
* configure.in:
* plugins/ladspa_effect/Makefile.am:
removed references to CAPS (sorry about that Toby, but I couldn't get
anything to build with them--there's no make info in the CAPS dir)
2006-09-25 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/vst_effect/vst_control_dialog.cpp:

View File

@@ -508,7 +508,6 @@ AC_CONFIG_FILES([Makefile
plugins/flp_import/Makefile
plugins/ladspa_base/Makefile
plugins/ladspa_effect/Makefile
plugins/ladspa_effect/caps/Makefile
plugins/midi_import/Makefile
plugins/organic/Makefile
plugins/plucked_string_synth/Makefile

View File

@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = caps
#SUBDIRS = caps
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I../ladspa_base/

View File

@@ -26,7 +26,7 @@
#include "vibrating_string.h"
#include "templates.h"
#include "interpolation.h"
#include "mixer.h"
vibratingString::vibratingString( float _pitch,
float _pick,
@@ -39,7 +39,7 @@ vibratingString::vibratingString( float _pitch,
float _string_loss,
float _detune,
bool _state ) :
m_oversample( _oversample ),
m_oversample( 2 * _oversample / (int)( _sample_rate / SAMPLE_RATES[0] ) ),
m_randomize( _randomize ),
m_stringLoss( 1.0f - _string_loss ),
m_state( 0.1f )
@@ -47,10 +47,10 @@ vibratingString::vibratingString( float _pitch,
m_outsamp = bufferAllocator::alloc<sample_t>( m_oversample );
int string_length;
string_length = static_cast<int>( m_oversample *_sample_rate /
string_length = static_cast<int>( m_oversample * _sample_rate /
_pitch ) + 1;
string_length += static_cast<int>( string_length * -_detune );
int pick = static_cast<int>( ceil( string_length * _pick ) );
if( not _state )