Re: Midi Issues with Logic Pro (start/stop with BFD)
Re: Midi Issues with Logic Pro (start/stop with BFD)
- Subject: Re: Midi Issues with Logic Pro (start/stop with BFD)
- From: "Angus F. Hewlett" <email@hidden>
- Date: Thu, 25 Mar 2004 22:10:04 +0000
OK, here's the definitive take. This has been discussed before on the
CoreAudio list, and I'm pretty sure the good folk at Apple are aware of
this for the next rev of AU (it appears that time sync in AU2 was a fairly
late addition... it's possible to do it better than any of the existing
APIs currently do... sample accurate song start, stop and jump events
please!!)
BFD is coded internally as a VST plug-in, and traditionally relies on
kVstTransportChanged and kVstTransportPlaying to start and stop correctly.
AU does not provide this functionality (other APIs do), so we have to
"guess". The most reliable guess approach we found so far is to watch the
song position reported by the AU host to the plugin at each Render() call.
If the song position changes between Render() calls, we can be reasonably
sure that the transport is playing. If it does not, we can be reasonably
sure that it is stopped. At any frame where we detect transition from
stopped to playing, we raise the kVstTransportChanged flag in VST-land so
that the plug knows things have changed.
This mostly works reasonably well. However, the one unfortunate side effect
is that the transport-changed flag tends to be raised one frame too late. Why?
Reported frame time
00 : 00 : 00 (song with transport stopped)
00 : 00 : 00
00 : 00 : 00
00 : 00 : 00 (playback started at 00 : 00 : 00)
00 : 00 : 01 (song counter has changed, AU layer detects transport change)
That's fine in a lot of cases... Groove Agent works correctly in Logic
(when not in the active audio track) out of sheer dumbness - it doesn't
actually CARE about transport changes, it just syncs to the current song
position. It gives the appearance of having stopped when you hit STOP on
the Logic transport simply because Logic stops streaming audio to plug-ins
not on the active track when the transport is stopped.
As to iDrum... I don't know how that does it. It may take the same approach
as Groove Agent, for all I know - it only has to work in GarageBand and
Logic after all. This stuff is a piece of cake when you only have to care
about one host... getting it to work across 20 is much harder. BFD has to
have proper knowledge of start and stop, as, for a start, it has to work
properly in other hosts that stream continuously on all tracks even when
the transport is stopped. Until such time as I have a fully working AU to
VST or AU to RTAS adapter, I won't be able to find out how iDrum does it
and how easy it is to break :-)
Regards,
Angus.
At 10:29 AM 3/25/2004 -0800, Stefan Garr wrote:
>
On Mar 25, 2004, at 9:20 AM, Howard Moon wrote:
>
>
> I'd be REALLY interested in how this was done, because that's one of
>
> the main stumbling blocks we have in making our software into an AU
>
> (either directly or using the FXpansion wrapper). A primary feature
>
> of our software simply does not function if we cannot accurately
>
> detect the start/stop of the transport.
>
>
Ok, I'm not really a programmer, but I have a feeling that the issue
>
centers around whether or not the rhythmic plugin in question is truly
>
in "Slave" mode and synced to the host Daw via MTC or some other sync
>
code. In the "IDrum" plug-in there's a conspicuous box that selects
>
"slave to host" It must be doing so via some timecode that it can
>
read, as it doesn't matter where in a song/sequence that you start or
>
stop, IDrum happily starts from that exact point.
>
>
I have a feeling that BFD took a different approach. I think that
>
while it goes and "fetches" the BPM tempo of the host, it then depends
>
on syncing to the clock of the computer ONLY without regard to what the
>
DAW is actually doing.
>
>
I suspect that for this to work. The DAW clock MUST slave to the
>
Computers hardware drive clock, or possibly Core Audio must sync to the
>
hardware clock, then the DAW must sync to Core Audio, then plugin must
>
sync directly to the only sync parent it "knows"...the DAW where it's
>
being hosted.
>
>
So, one of the questions that was posed earlier was whether an AU can
>
"hear or see" MTC. Maybe this is the first big question?
>
>
I hope that some of you knowledgeable people can shed some light on the
>
subject.
>
>
Thanks
>
>
Stefan Garr
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
>
>
>
=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd -
http://www.fxpansion.com
=======================================================
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.