Hi there

Applause for your work on this branch. Its' nitty gritty work that IMO needs 
doing! I tested it a bit.

ABOUT NO SOUND

The "zomby" version can indeed produce sounds. But it seems to load all the 
different values with wrong numbers. After loading a song, going to the mixer 
and turning up the instrument- and master faders, going to the pattern view 
and adjusting the velocity AND pan, I managed to get some of the notes to 
play.

Another way is to create a new instrument, add a sample to it and play some 
notes on that instrument. The 'play sample' button on the load sample UI 
didn't work for me though.

Tried to add som _INFOLOG lines at various places, and it seems that every 
float being loaded from a file gets rounded to 0 (or occasionally 1) somehow, 
I can't figure out how to fix this though. (Will try the debugger later.)


ABOUT REAL-TIME MEMORY MANAGEMENT

Every note that gets played still causes a `new Note` being issued in 
hydrogen.cpp -- am I right that this is potentially a problem? If so, we 
should create an intermediate storage with room for, say, 128 notes, allocate 
the memory when the program starts, and have the notes live there (they 
eventually get `delete`'d in sampler.cpp, som we can reuse that memory)

Also, there's a very old patch of mine (attached) that I think ought to be 
considered for this branch (there is a priority queue of Note*'s using 
comparison of Note&'s, and I _suspect_ this causes the Note( Note* ) 
constructor to take effect "behind the scenes" -- this is C++, right? )

Hugs
 -- Jakob
Index: libs/hydrogen/src/hydrogen.cpp
===================================================================
--- libs/hydrogen/src/hydrogen.cpp	(revision 333)
+++ libs/hydrogen/src/hydrogen.cpp	(working copy)
@@ -108,12 +108,15 @@
 MidiInput *m_pMidiDriver = NULL;	///< MIDI input
 
 // overload the the > operator of Note objects for priority_queue
-bool operator> (const Note& pNote1, const Note &pNote2) {
-	return (pNote1.m_nHumanizeDelay + pNote1.get_position() * m_pAudioDriver->m_transport.m_nTickSize) > \
-		(pNote2.m_nHumanizeDelay + pNote2.get_position() * m_pAudioDriver->m_transport.m_nTickSize);
+struct compare_Notes {
+bool operator() ( Note* pNote1, Note* pNote2) {
+	return (pNote1->m_nHumanizeDelay + pNote1->get_position() * m_pAudioDriver->m_transport.m_nTickSize) > \
+		(pNote2->m_nHumanizeDelay + pNote2->get_position() * m_pAudioDriver->m_transport.m_nTickSize);
 }
+};
 
-std::priority_queue<Note*, std::deque<Note*>, std::greater<Note> > m_songNoteQueue;	/// Song Note FIFO
+//std::priority_queue<Note*, std::deque<Note*>, std::greater<Note> > m_songNoteQueue;	/// Song Note FIFO
+std::priority_queue<Note*, std::deque<Note*>, compare_Notes > m_songNoteQueue;	/// Song Note FIFO
 std::deque<Note*> m_midiNoteQueue;	///< Midi Note FIFO

------------------------------------------------------------------------------
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to