[directmusic] Re: Tracks & segments in real time ?

  • From: "Todor Fay" <todor@xxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Wed, 18 Dec 2002 08:04:28 -0800


You can do it, but it's a little more work. Each track knows how to read
data in its file format. So, you parse the data into the file format,
and then feed it to the track. How? Each track exposes an IPersistStream
interface with a Load method. Map the track data into a memory buffer
and then create an IStream with Read and Seek methods. Pass it to the
track's Load and it will gobble up your data. I think there's an OS
function for creating an IStream that points to memory, but I can't
remember what it's called...

You might start with a really simple track type, like tempo or time
signature to test it out and work out the kinks. Then, attack the
biggies.

Todor 

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx] On Behalf Of Ziggy
Sent: Wednesday, December 18, 2002 1:49 AM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Tracks & segments in real time ?


Hello the list.
I'm new on directx, and i'm interested by directmusic cause I'm doing a
midi editor prog.
But after looking it I 'can't see how to pass custom midi message on
tracks and so on make segment for using effects features and the other
stuff....
Tell me if I'm wrong , but the only way to pass datas on tracks and
segment is to load a file , a script or a resource. I need to pass
buffers that my sequencer generated. I can't see any exemples to do
this, Is it possible ?
Is it possible to create my Own "pattern" in real time and use it on a
track ?

For now I'v made my own pattern and track classes, and I'm using DX8
only for port and timer features.
The port give me Midimessage that a record on my pattern buffers , and
create tracks whithe it, next I pulse the messages directly to the out
ports, But I can't use segment and tracks features.....

Your help , tutorials and sample codes are welcome.

Thank you all




Other related posts: