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