Re: Bit surprised there aren't more virtual listbox controls/code available
- From: MM <kylix_is@xxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 21:48:39 +0000
On Thu, 28 Feb 2008 16:41:22 -0000, "Dave O." <nobody@xxxxxxxxxxx>
wrote:
"MM" <kylix_is@xxxxxxxxxxx> wrote in message
news:nrmds31bbj09e8dlj458nccnv1e733f0eo@xxxxxxxxxx
On Thu, 28 Feb 2008 11:13:29 -0000, "Dave O." <nobody@xxxxxxxxxxx>
Okay, what's the alternative? I'm never going to get anywhere near a
ListCount of 1,000,000, but a few thousand more than 32767 would be
nice. So until I come up with an alternative solution I'm just using
the MSFlexGrid that comes free with VB6.
How about stick the MIDI data into a recordset then as a listbox can only
show a few items, the rest being "above" or "below" what's visible, just
pull from the recordset those items in "view", a scroll bar to one side
would scroll the list as if it was a normal full listbox. This will keep the
amount of data displayed small so it should be very responsive.
You mean, display, say, 20 rows in the list box (e.g events 0 through
19), then when the user scrolls down to the bottom row, have some
logic do RemoveItem to remove the top one and AddItem to add another
on the end? I could see how this might work. Dunno how responsive it
would be, though, if the user were constantly clicking the down arrow,
i.e. causing a cascade of RemoveItem/AddItem. Interesting. Too late
now, But I'll take a look tomorrow.
Can you convert the MIDI data into a linear plot? If you can you could do
the whole thing graphically, display the piece as an oscilloscope trace and
just draw a box around a part to play it, put in drag & drop for editing,
could be an better way to do it.
I don't think that approach would suit, sorry. I want to see the
actual event data right in front of me, for each event - or scroll up
or down to another part of the data stream. The data comprises,
amongst other things, MIDI note number, channel, on/off, velocity
(volume), all of which one can change on the fly, either for a single
event or for a range of events.
I'm sure there are dozens of ways to approach this that do not require all
the MIDI data to be loaded into a visible control. I would strongly suggest
looking at the techniques employed for databases as MIDI data is no
different from any other numerical data. If was doing this I'd have a
temporary database and I would load the .MID file into that and then all my
processing would be standard database stuff.
I would agree if this were just about any other kind of data, but MIDI
data is kind of special, in that *all* the data is needed to run the
playback, like a piece of string. I need to be able to click on any
event, maybe change its parameters to have the note move up or down an
octave or play at a different volume (aka velocity). It's not like
running a query on a names and addresses database to pull up only
those customers living in Watford. I don't really see a problem with a
listbox that could hold the events needed in any small to medium MIDI
file. Access is instantaneous, and scrolling also. Sure, if I had a
listbox with 500,000 names in it (assuming a Long for ListCount) in a
different application altogether, then I wouldn't fancy scrolling
through it, looking for Mrs Bloggs at 5 Acacia Gardens, but I wouldn't
do it like that anyway, given that I could just query an underlying
database for Mrs Bloggs and narrow down the dataset to maybe a dozen
hits. Here, I don't want to narrow anything down. There IS nothing to
be narrowed down! Running a query, say, to display events 200 to 600
might be interesting as an academic exercise, but it's not anything
I'd want to do. Anyway, I'm just rambling on now, so it's time to
sleep on it!
MM
.
- Follow-Ups:
- Re: Bit surprised there aren't more virtual listbox controls/code available
- From: Karl E. Peterson
- Re: Bit surprised there aren't more virtual listbox controls/code available
- References:
- Bit surprised there aren't more virtual listbox controls/code available
- From: MM
- Re: Bit surprised there aren't more virtual listbox controls/code available
- From: Dave O.
- Re: Bit surprised there aren't more virtual listbox controls/code available
- From: MM
- Re: Bit surprised there aren't more virtual listbox controls/code available
- From: Dave O.
- Bit surprised there aren't more virtual listbox controls/code available
- Prev by Date: Re: Why New does not work on one machine?
- Next by Date: Re: Bit surprised there aren't more virtual listbox controls/code
- Previous by thread: Re: Bit surprised there aren't more virtual listbox controls/code available
- Next by thread: Re: Bit surprised there aren't more virtual listbox controls/code available
- Index(es):
Relevant Pages
|