Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with the TunePlayer and TuneQueue()



Chris Corbell wrote:

>I'm having trouble getting the QuickTime TunePlayer to work
>properly. I wonder if anyone can clue me in on what the
>"rules" are or if there is another way to use the TunePlayer.
>I've looked at both the QTMusic.c sample code and the
>QuickTime Music chapter of the developer docs.
>
>I'm finding it difficult to get sounds produced in the way
>I expect based on fields for pitch, velocity and duration.
>In particular:

What version of QuickTime are you using - QT 4 is perfect, QT 5
is buggy and QT 6 is (mostly) OK.

>- A note with velocity zero does not seem to be a supported thing.
>It stops all tune playback, instead of just silencing the sounding
>pitch.

I haven't seen this, but I mostly use zero velocity to mute one
part of a multi-part piece. It certainly doesn't stop the other
parts from playing.

>- Duration does not seem to always be honored. Subsequent events
>seem to be able to truncate a sounding note and I haven't figured
>out the rules for this. Sometimes a rest event seems to trigger
>this, but other times a rest event will just mark the next event
>and not end sounding notes.

Again, this shouldn't be happening.

>- Rest events seem to be required even when there is no actual
>rest, as a way of telling the tune player when the next event
>starts. I've had some success with this approach but the item
>above still applies.

Rests in a QT tune are quite different from musical rests, and
determine the delay until the next event, rather than specifying
a period of silence. The sum of all rest events is the duration
of the tune.

>Right now I'm only using extended-note events and rest-events in
>the actual tune sequence (plus the end marker). What I'd like
>is to figure out how to make the TunePlayer work basically the
>same way a live Note Channel / Note Allocator component works,
>or at least clarify the rules.
>
>Can anyone offer any advice? Is there any better example than
>QTMusic.c?

There's also QTMusicToo, but it doesn't take you much further.

There seem to be very few programs which make use of QTMA, probably
because the documentation is so hard to understand. It can produce
impressive results though. If you want to play with a working
program, download my program BarFly from:

http://www.barfly.dial.pipex.com

Phil Taylor
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.