Changeset 642

Show
Ignore:
Timestamp:
11/12/08 03:31:23 (2 months ago)
Author:
wolke
Message:

midi keyboard record correct notelenght into instrument = piano mode

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/new_fx_rack_and_sample_fun/gui/src/PatternEditor/DrumPatternEditor.cpp

    r601 r642  
    314314                        nLen = -1; 
    315315                } 
    316                 m_pDraggedNote->set_lenght( nLen ); 
     316 
     317                float fNotePitch = m_pDraggedNote->m_noteKey.m_nOctave * 12 + m_pDraggedNote->m_noteKey.m_key; 
     318                float fStep = pow( 1.0594630943593, ( double )fNotePitch ); 
     319 
     320                m_pDraggedNote->set_lenght( nLen * fStep); 
    317321 
    318322                Hydrogen::get_instance()->getSong()->__is_modified = true; 
     
    484488        }                
    485489        else { 
     490                float fNotePitch = note->m_noteKey.m_nOctave * 12 + note->m_noteKey.m_key; 
     491                float fStep = pow( 1.0594630943593, ( double )fNotePitch ); 
     492 
    486493                uint x = 20 + (pos * m_nGridWidth); 
    487                 int w = m_nGridWidth * note->get_lenght()
     494                int w = m_nGridWidth * note->get_lenght() / fStep
    488495                w = w - 1;      // lascio un piccolo spazio tra una nota ed un altra 
    489496 
  • branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor_UI.ui

    r632 r642  
    2222    </rect> 
    2323   </property> 
     24   <property name="cursor" > 
     25    <cursorShape>SplitHCursor</cursorShape> 
     26   </property> 
    2427   <property name="frameShape" > 
    2528    <enum>QFrame::StyledPanel</enum> 
     
    199202       </size> 
    200203      </property> 
     204      <property name="cursor" > 
     205       <cursorShape>SplitHCursor</cursorShape> 
     206      </property> 
    201207      <property name="frameShape" > 
    202208       <enum>QFrame::StyledPanel</enum> 
     
    267273   </property> 
    268274  </widget> 
    269   <widget class="QWidget" name="" > 
     275  <widget class="QWidget" name="layoutWidget" > 
    270276   <property name="geometry" > 
    271277    <rect> 
  • branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/IO/midi_input.cpp

    r598 r642  
    242242        Instrument *pInstr = pSong->get_instrument_list()->get( nInstrument ); 
    243243 
     244        float fStep = pow( 1.0594630943593, (nNote -36) ); 
     245        if ( !Preferences::getInstance()->__playselectedinstrument )  
     246                fStep = 1; 
     247 
    244248        if ( pInstr ){ //set the notelength 
    245                 AudioEngine::get_instance()->get_sampler()->setPlayingNotelenght( pInstr, notelenght, __noteOnTick ); 
     249                AudioEngine::get_instance()->get_sampler()->setPlayingNotelenght( pInstr, notelenght * fStep, __noteOnTick ); 
    246250        } 
    247251