Note::Note( Instrument* instrument, int position, float velocity, float pan_l, float pan_r, int length, float pitch ) : Object( __class_name ), __instrument( instrument ), __instrument_id( 0 ), __position( position ), __velocity( velocity ), __pan_l( PAN_MAX ), __pan_r( PAN_MAX ), __length( length ), __pitch( pitch ), __key( C ), __octave( P8 ), __adsr( 0 ), __lead_lag( 0.0 ), __cut_off( 1.0 ), __resonance( 0.0 ), __humanize_delay( 0 ), __sample_position( 0.0 ), __bpfb_l( 0.0 ), __bpfb_r( 0.0 ), __lpfb_l( 0.0 ), __lpfb_r( 0.0 ), __pattern_idx( 0 ), __midi_msg( -1 ), __note_off( false ), __just_recorded( false ) { if ( __instrument != 0 ) { __adsr = __instrument->copy_adsr(); __instrument_id = __instrument->get_id(); } set_pan_l(pan_l); set_pan_r(pan_r); }
Note::Note( Instrument* instrument, int position, float velocity, float pan_l, float pan_r, int length, float pitch ) : Object( __class_name ), __instrument( instrument ), __instrument_id( 0 ), __specific_compo_id( -1 ), __position( position ), __velocity( velocity ), __pan_l( PAN_MAX ), __pan_r( PAN_MAX ), __length( length ), __pitch( pitch ), __key( C ), __octave( P8 ), __adsr( 0 ), __lead_lag( 0.0 ), __cut_off( 1.0 ), __resonance( 0.0 ), __humanize_delay( 0 ), __bpfb_l( 0.0 ), __bpfb_r( 0.0 ), __lpfb_l( 0.0 ), __lpfb_r( 0.0 ), __pattern_idx( 0 ), __midi_msg( -1 ), __note_off( false ), __just_recorded( false ), __probability( 1.0f ) { if ( __instrument != 0 ) { __adsr = __instrument->copy_adsr(); __instrument_id = __instrument->get_id(); for (std::vector<InstrumentComponent*>::iterator it = __instrument->get_components()->begin() ; it !=__instrument->get_components()->end(); ++it) { InstrumentComponent *pCompo = *it; SelectedLayerInfo *sampleInfo = new SelectedLayerInfo; sampleInfo->SelectedLayer = -1; sampleInfo->SamplePosition = 0; __layers_selected[ pCompo->get_drumkit_componentID() ] = sampleInfo; } } set_pan_l(pan_l); set_pan_r(pan_r); }