Krzysztof Foltman wrote:
One more thing (not a true programming error, but still feels defective to me): the max decay/release time is too short (10000 samples of the original sound). It's impossible to use it to slightly shorten the crash or ride cymbals, because they usually need to last longer than <0.25s (the current max). I've attached a patch that increases that time to 100ksamples and uses quadratic scale so that you can still specify very short times if needed.

This works great... and I like it...

BUT... on the TR808 kit (where we just fixed the clicking noise) -- this patch makes it very easy to bring the clicking noise back when editing the instrument. :-)

How about from 10,000 to 50,000 samples (about 1.1 sec. @ 44kHz)? That patch is attached. What do you think?

Peace,
Gabriel

Index: gui/src/InstrumentEditor/InstrumentEditor.cpp
===================================================================
--- gui/src/InstrumentEditor/InstrumentEditor.cpp	(revision 876)
+++ gui/src/InstrumentEditor/InstrumentEditor.cpp	(working copy)
@@ -302,10 +302,10 @@
 		m_pNameLbl->setText( m_pInstrument->get_name() );
 
 		// ADSR
-		m_pAttackRotary->setValue( m_pInstrument->get_adsr()->__attack / 10000.0 );
-		m_pDecayRotary->setValue( m_pInstrument->get_adsr()->__decay / 10000.0 );
+		m_pAttackRotary->setValue( sqrtf(m_pInstrument->get_adsr()->__attack / 50000.0) );
+		m_pDecayRotary->setValue( sqrtf(m_pInstrument->get_adsr()->__decay / 50000.0) );
 		m_pSustainRotary->setValue( m_pInstrument->get_adsr()->__sustain );
-		m_pReleaseRotary->setValue( m_pInstrument->get_adsr()->__release / 10000.0 );
+		m_pReleaseRotary->setValue( sqrtf(m_pInstrument->get_adsr()->__release / 50000.0) );
 		//~ ADSR
 
 		// filter
@@ -368,16 +368,16 @@
 			m_pInstrument->set_filter_resonance( fVal );
 		}
 		else if ( ref == m_pAttackRotary ) {
-			m_pInstrument->get_adsr()->__attack = fVal * 10000;
+			m_pInstrument->get_adsr()->__attack = fVal * fVal * 50000;
 		}
 		else if ( ref == m_pDecayRotary ) {
-			m_pInstrument->get_adsr()->__decay = fVal * 10000;
+			m_pInstrument->get_adsr()->__decay = fVal * fVal * 50000;
 		}
 		else if ( ref == m_pSustainRotary ) {
 			m_pInstrument->get_adsr()->__sustain = fVal;
 		}
 		else if ( ref == m_pReleaseRotary ) {
-			m_pInstrument->get_adsr()->__release = fVal * 10000;
+			m_pInstrument->get_adsr()->__release = fVal * fVal * 50000;
 		}
 		else if ( ref == m_pLayerGainRotary ) {
 			fVal = fVal * 5.0;
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to