|
JJS
Posts: 102
|
 |
« Reply #2 on: 26 Oct '08 - 18:52 » |
Quote
|
I'm not sure what you mean.
I have a class called MidiStreamEvent. I create an instance of a MidiStreamEvent-derived class for each BASSMIDIEvent that I'm interested in (program changes, reverb, chorus, tempo and so on).
The MidiStreamEvent class encapsulates the SYNCPROC, the .NET events to keep the UI updated, and variables so that the user can override the particular MIDI parameter, and enable or disable the override on-the-fly.
When a stream is created, I "connect" the stream to the MidiStreamEvent objects.
Recall that to override a midi parameter, you must call BASS_MIDI_StreamEvent() in the syncproc, and when changing position, you must call BASS_MIDI_StreamEvent manually.
This design greatly simplifies adding BASSMIDIEvent managers to my app. To further simplify my app, I want each MidiStreamEvent object to have it's own setpos and streamfree sync, so that it can internally keep itself updated as external events occur.
I coded it this way to test my concept, and it seems to work. Each MidiStreamEvent object (currently, there are 20) has it's own setpos and streamfree sync.
-JJS
|