• 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: getting host tempo in an Audio Unit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting host tempo in an Audio Unit


  • Subject: Re: getting host tempo in an Audio Unit
  • From: Artemiy Pavlov <email@hidden>
  • Date: Sat, 26 Aug 2006 19:57:03 +0300

Hello Stiwi,

nice to meet you here and thanks for the reply!

I used this code inside my Process() function:

Float64 Tempo;

OSStatus err = AUBase::CallHostBeatAndTempo(NULL, &Tempo);

But I get this error when trying to build the project:
http://artemio.net/tmp/Picture 1.png

Are there any special things to define first?


Thanks again,

Artemiy.


On 26 Aug 2006, at 7:20 PM, stiwi wrote:

Hi Artemiy,

in AUBase.h you will find this utility method.

OSStatus CallHostBeatAndTempo (Float64 *outCurrentBeat, Float64 *outCurrentTempo)
{
return (mHostCallbackInfo.beatAndTempoProc ? (*mHostCallbackInfo.beatAndTempoProc) (mHostCallbackInfo.hostUserData, outCurrentBeat, outCurrentTempo) : -1);
}


I use it in my render call like this

	Float64		tempo;
	OSStatus	err	= AUBase::CallHostBeatAndTempo(NULL, &tempo);

	if (err == noErr)
	{
		do whatever needs to be done;
	}

The tempo value is returned as beats per minutes (bpm)


On 26.08.2006, at 17:35, Artemiy Pavlov wrote:

Hello all!

This is a quite too simple question, but I can't easily find an answer in the Core Audio docs.

How do I go about getting the host's tempo in an Audio Unit effect? Should probably be as simple as GetSampleRate() but just can't find it, sorry.


Thanks!


With best wishes,

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


This email sent to email@hidden


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


This email sent to email@hidden

_______________________________________________ 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: getting host tempo in an Audio Unit
      • From: stiwi <email@hidden>
References: 
 >getting host tempo in an Audio Unit (From: Artemiy Pavlov <email@hidden>)
 >Re: getting host tempo in an Audio Unit (From: stiwi <email@hidden>)

  • Prev by Date: Re: getting host tempo in an Audio Unit
  • Next by Date: Re: getting host tempo in an Audio Unit
  • Previous by thread: Re: getting host tempo in an Audio Unit
  • Next by thread: Re: getting host tempo in an Audio Unit
  • Index(es):
    • Date
    • Thread