I have a few questions about the merged midi_out code. I'm of course 
perfectly happy with merging the midi_out branch into other branches.. Looking 
at the changes made in the new_fx_rack_and_sample_fun branch, it looks like the 
timing concerns of the note off events have been removed.

    What I mean, is in the queuedNoteOffs vector, I added in the frame in which 
I wanted the note off event to actually occur. Is the timing of this still 
preserved in the merged stuff? I haven't tried it yet, admittedly. From the 
sounds of it, you're using render note to indicate when the note ends, which 
isn't what I intended. For example, say I want to simply drive a hardware drum 
machine, and fill all the instrument sounds in Hydrogen with short and empty 
.wavs, simply as dummy sound data because I only care about midi messages, not 
audio. For notes that have a long note length specified, render_note will 
potentially indicate they finish before they've actually be defined as 
finishing. 

    I could be wrong, and I'll test out the branch soon, but I think without 
specifying and checking the actual frame for the note off, the timing of the 
midi messages is incorrect.

    Also, did the changed instrument editor panel .png get merged into the 
new_fx_rack_and_sample_fun branch?





________________________________
From: "[email protected]" <[email protected]>
To: hydrogen-devel <[email protected]>
Sent: Monday, February 23, 2009 9:02:33 PM
Subject: [Hydrogen-devel] midi_out

hi michael,

today i have merge local the midi_out branch into the fx_and_samplefun branch. 
i make some changes. so class note_key will give the note_on/off_messages. now 
you can listen to melody's.
also i change the note off handling.

the main sample process now push back a note into queuedNoteOffs queue. if 
render_note returns 1 what means, note is ended. this method also include all 
notelength functions of hydrogen.




    while ( i < __playing_notes_queue.size() ) {
        pNote = __playing_notes_queue[ i ];        // recupero una nuova
        nota unsigned res = __render_note( pNote, nFrames, pSong );
        if ( res == 1 ) {    // la nota e' finita
            __playing_notes_queue.erase( __playing_notes_queue.begin() + i );
            pNote->get_instrument()->dequeue();
            __queuedNoteOffs.push_back( pNote );
//            delete pNote;
//            pNote = NULL;
        } else {
            ++i; // carico la prox nota
        }
    }
    
    //Queue midi note off messages for notes that have a length specified for 
them

    while (!__queuedNoteOffs.empty()) {
        pNote =  __queuedNoteOffs[0];
        Hydrogen::get_instance()->getMidiOutput()->handleQueueNoteOff( 
pNote->get_instrument()->get_midi_out_channel(),
                                          (pNote->m_noteKey.m_nOctave +3 ) * 12 
+ pNote->m_noteKey.m_key
                                        + 
pNote->get_instrument()->get_midi_out_note() -60, 
                                        pNote->get_velocity() * 127 );
        __queuedNoteOffs.erase(__queuedNoteOffs.begin());
        delete pNote;
        pNote = NULL;
    }//while

the second thing i changed is the get_midi_out_note() value. now its relative 
to m_noteKey.m_key and m_noteKey.m_nOctave. 
default note_key in h2 is c3. so get_midi_out_note() will now adjust a offset. 
it's make exactly the same than before. but its also possible to change 
individual note->noteKey's. 

my question :-). is it's ok for you, or for all others if i merge this little 
bit modified midi_out feature into the fx_and_sample_fun branch?

greetings wolke 

  

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to