Re: [Musickit-users] Cursor in SndView?
Brought to you by:
leighsmith
From: Leigh S. <le...@le...> - 2003-08-29 01:36:59
|
I haven't really dug into the SndView for sometime but I think you are right, the cursor code is not yet implemented. We really need the concept of several identifiable cursors, since you should be able to mark several points in the view (canonically with a vertical line) and the ability to nominate one of them to be updated by a playing Snd (i.e one SndPerformance), such that the cursor tracks across the view as the Snd is playing. However, this may actually not be what you want. :^) If I understand correctly, you want to retrieve from a SndPerformance the last sample that was played when the performance was stopped (recall you can have many simultaneous performances of a single Snd). This is independent of the view, being legitimate for a command line program, for example. You do this with: SndPerformance -playIndex. You would then update the position of a SndView cursor with the performance's last played sample. This is obviously more lightweight than play tracking, since we don't need to redraw a cursor across a SndView from some updating cursor position, but from a user interface standpoint, it may be confusing, i.e, a moving cursor is expected to stop at a location, whereas a cursor updating at some location in the file could appear in a different location than the user expects, possibly out of view if the scale is high. SndView as I forewarned is one of the least overhauled SndKit classes, and it's architecture is probably the closest to the original SoundKit, which did not have a concept of SndPerformances, nor the rest of the streaming architecture. In particular, the play and record methods need revision, including identifying the SndPerformance being used and assigning it as the cursor tracker. This is left as an exercise for the reader :^)...or I'll get to it, circa V2.4...since SndView is also using the decidedly unhealthy SndSoundStruct which needs removal. However, my projects don't have need for a SndView anytime soon, so I can't justify much time at it now. Perhaps in discussion with the whole mail lists, the API interface can at least be fleshed out, prior to implementation. -- Leigh Smith mailto:le...@le... http://www.leighsmith.com |