• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Converting AU transport info to VST time info?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting AU transport info to VST time info?


  • Subject: Re: Converting AU transport info to VST time info?
  • From: Howard Moon <email@hidden>
  • Date: Fri, 3 Dec 2004 08:30:32 -0800

I finally managed to trace into what's really happening here, and it looks like the outCurrentSampleInTimeLine value as returned in both Logic and Digital Performer is always 0! Or perhaps it's just a small fraction...in any case when casting to a long, or even if multiplying by the sample rate (just in case that's what I needed to do), it comes out as 0. No help there!

As Angus said, I need a way (in hosts that support the call, at least), to get the absolute position, in samples. Otherwise, I'll have to keep using the value from the Render call. (But even then, I don't know that doing so is reliable... so far my tests show it always starts at zero and goes upwards, but I'm not sure there isn't a case where that might change!)

I can even live with a "relative" position in samples, where it always starts at zero when the transport starts (as the Render call's value seems to do), as long as it's reliable. I'd just have to document that for our users so they know why their pitch graph is always positioned at time zero. But a true absolute position is definitely preferable.

Anyone with any insights into this?

Thanks much,
	Howard

On Dec 3, 2004, at 1:50 AM, Angus F. Hewlett wrote:

Just to clarify,

Howard is looking to get the absolute position, in samples, in the sequencer time line (in VstTimeInfo, this is samplePos).

Previously, in VST-AU, we used the time counter passed to Render(). This works fine for most things, but it seems that it's actually a count from whenever the audio engine was last started / flushed (usually happens at transport start), rather than an absolute position in the song. So, it's OK when the song is started from the beginning, but not when it's started at some other point, as Howard's plug needs to track the absolute song position in samples.

outCurrentSampleInTimeLine should be providing that, but is it? Also, why is it a Float64, when sample position at the start of a render call is always an integer? Simply because it's possible to represent numbers >2x10^31 without a special datatype, or some other reason?

Also, Howard:- bear in mind that CallHostTransportState is a new part of the AU API, and isn't supported on all hosts (which is why we check the variable transportSafe first). So, code based on this call should work fine on Logic 7 and DP4.5, but that code will never be reached if the host is older.

Regards,
      Angus.














Howard Moon wrote:

Hi all,

I'm working on a vst plug-in "wrapped" as an Audio Unit, and am implementing the CallHostTransportState time & transport information in the AUBase class. I've looked at some code from a couple sources (including DestroyFX), but don't see anyone setting the particular information I need. In particular, I need to set the VstTimeInfo member, samplePos. The third parameter of the CallHostTransportState function (outCurrentSampleInTimeLine) seems to be what I need, but I need to know how to convert it to the samplePos that my wrapped vst plug-in needs. Simply assigning it doesn't seem to be working, perhaps because that parameter needs to be converted and/or offset somehow? In any case, if you've got any advice as to how I can compute samplePos from the outCurrentSampleInTimeLine parameter, I'd appreciate hearing it.

Thanks much,
Howard


---------------------------------------------------------------------- --


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden



--
=========================================================
 Angus F. Hewlett, Managing Director (CEO)
 FXpansion Audio UK Ltd   -   http://www.fxpansion.com
 Registered in the UK - #4455834 - VAT: GB 798 7782 33
=========================================================


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Converting AU transport info to VST time info?
      • From: Stefan Gretscher <email@hidden>
    • coreaudio in cocoa/objC/objC++/c++
      • From: paul webb <email@hidden>
References: 
 >Converting AU transport info to VST time info? (From: Howard Moon <email@hidden>)
 >Re: Converting AU transport info to VST time info? (From: "Angus F. Hewlett" <email@hidden>)

  • Prev by Date: Re: Proper API for selecting devices
  • Next by Date: coreaudio in cocoa/objC/objC++/c++
  • Previous by thread: Re: Converting AU transport info to VST time info?
  • Next by thread: coreaudio in cocoa/objC/objC++/c++
  • Index(es):
    • Date
    • Thread