Changeset 598

Show
Ignore:
Timestamp:
10/27/08 14:57:15 (2 months ago)
Author:
wolke
Message:

note off recording in keyboard instrument mode

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/IO/midi_input.cpp

    r597 r598  
    252252        const int nLenght = 1; 
    253253        const float fPitch = 0.0f; 
     254 
     255        if ( Preferences::getInstance()->__playselectedinstrument ) 
     256                pInstr= pEngine->getSong()->get_instrument_list()->get( pEngine->getSelectedInstrumentNumber()); 
     257 
    254258        Note *pNewNote = new Note( pInstr, nPosition, fVelocity, fPan_L, fPan_R, nLenght, fPitch ); 
    255259 
  • branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/hydrogen.cpp

    r597 r598  
    20112011                        int notehigh = msg1 - (12 * divider); 
    20122012 
    2013                         ERRORLOG( QString( "octave: %1, note: %2, instrument %3" ).arg( octave ).arg(notehigh).arg(instrument)); 
     2013                        //ERRORLOG( QString( "octave: %1, note: %2, instrument %3" ).arg( octave ).arg(notehigh).arg(instrument)); 
    20142014                        note2->m_noteKey.m_nOctave = octave; 
    20152015                        if ( notehigh == 0) note2->m_noteKey.m_key = H2Core::NoteKey::C; 
  • branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/sampler/sampler.cpp

    r593 r598  
    795795                                                Note *pNote = pos->second; 
    796796                                                if ( pNote!=NULL ) { 
    797                                                         if ( pNote->get_instrument() == instrument 
    798                                                         && pNote->get_position() == noteOnTick ) { 
    799                                                                 AudioEngine::get_instance()->lock("Sample::setnotelenght_event"); 
    800                  
    801                                                                 if ( ticks >  patternsize )  
    802                                                                         ticks = patternsize - noteOnTick; 
    803                                                                 pNote->set_lenght( ticks ); 
    804                                                                 Hydrogen::get_instance()->getSong()->__is_modified = true; 
    805                                                                 AudioEngine::get_instance()->unlock(); // unlock the audio engine 
    806                                                                                                                          
     797                                                        if( !Preferences::getInstance()->__playselectedinstrument ){ 
     798                                                                        if ( pNote->get_instrument() == instrument 
     799                                                                        && pNote->get_position() == noteOnTick ) { 
     800                                                                                AudioEngine::get_instance()->lock("Sample::setnotelenght_event"); 
     801                                                 
     802                                                                                        if ( ticks >  patternsize )  
     803                                                                                        ticks = patternsize - noteOnTick; 
     804                                                                                pNote->set_lenght( ticks ); 
     805                                                                                Hydrogen::get_instance()->getSong()->__is_modified = true; 
     806                                                                                AudioEngine::get_instance()->unlock(); // unlock the audio engine 
     807                                                                                        } 
     808                                                                }else 
     809                                                                {       if ( pNote->get_instrument() == pEngine->getSong()->get_instrument_list()->get( pEngine->getSelectedInstrumentNumber()) 
     810                                                                        && pNote->get_position() == noteOnTick ) { 
     811                                                                                AudioEngine::get_instance()->lock("Sample::setnotelenght_event"); 
     812                                                                                if ( ticks >  patternsize )  
     813                                                                                        ticks = patternsize - noteOnTick; 
     814                                                                                pNote->set_lenght( ticks ); 
     815                                                                                Hydrogen::get_instance()->getSong()->__is_modified = true; 
     816                                                                                AudioEngine::get_instance()->unlock(); // unlock the audio engine 
     817                                                                                         
     818                                                                                         
     819                                                                }        
    807820                                                        } 
    808821                                                }