\hypertarget{a00901}{}\doxysection{Hybrid Processing architecture}
\label{a00901}\index{Hybrid Processing architecture@{Hybrid Processing architecture}}


\doxysubsection{ }
An architecture combining low-\/latency and high-\/latency audio processing. 

 \hypertarget{a00901_additionalFeatures_Hybrid_overview}{}\doxysubsection{Overview of Hybrid}\label{a00901_additionalFeatures_Hybrid_overview}
Hybrid processing is an optional feature that allows a single plug-\/in to simultaneously render data on the host\textquotesingle{}s low-\/ and high-\/latency signal networks. In many large plug-\/ins this can be very useful. For example, consider a reverb algorithm with both early reflection and tail processing. With AAX Hybrid, this plug-\/in can process the early reflections at low latency while allowing the tail algorithm to be handled at higher latency (and thus higher efficiency.) Other kinds of algorithms that could benefit from Hybrid processing are noise reductions, analyzers, multi-\/effect suites, and instruments.

Because the low-\/latency AAX signal network may be run on DSP hardware, AAX DSP plug-\/ins that incorporate Hybrid processing can split audio processing between the DSP and the host. This provides the benefits of low latency, highly deterministic DSP-\/based processing while also allowing the plug-\/in to leverage the high-\/latency power of the Intel core where appropriate.

AAX Hybrid is an internal feature and is not exposed to users, except in terms of better plug-\/in performance and more efficient DSP usage.

\begin{DoxyNote}{Note}
AAX Hybrid may be protected by one or more U.\+S. and non-\/\+U.\+S. patents. Details are available at \href{https://www.avid.com/patents}{\texttt{ www.\+avid.\+com/patents}}.
\end{DoxyNote}
\hypertarget{a00901_additionalFeatures_Hybrid_adding}{}\doxysubsection{Implementing Hybrid processing}\label{a00901_additionalFeatures_Hybrid_adding}
{\itshape For an example of Hybrid processing, see the \mbox{\hyperlink{a00944_DemoDelay_Hybrid}{Demo\+Delay\+\_\+\+Hybrid}} example plug-\/in}

To register for Hybrid processing, a plug-\/in should add values for \mbox{\hyperlink{a00901_ga13e384f22825afd3db6d68395b79ce0da33a950bc2e02d38fc3be0a0ad8cc89b1}{AAX\+\_\+e\+Property\+\_\+\+Hybrid\+Input\+Stem\+Format}} and \mbox{\hyperlink{a00901_ga13e384f22825afd3db6d68395b79ce0dac30a4e73772e37267dfef39ae3122705}{AAX\+\_\+e\+Property\+\_\+\+Hybrid\+Output\+Stem\+Format}} to the associated Process\+Proc property map. Once these values have been registered, both the Process\+Proc callback and the Hybrid render function in the plug-\/in\textquotesingle{}s data model will be invoked during processing.

Hybrid processing context information is provided via a dedicated \mbox{\hyperlink{a02070}{Hybrid processing context structure}}. It is not possible to register additional fields on this context. However, unlike a normal algorithm Process\+Proc, the Hybrid render method is implemented directly within the plug-\/in\textquotesingle{}s effect parameters object and has direct access to the data model memory. This is possible since the render method will always run on the host, and makes it easier to implement algorithms that require access to the data model, e.\+g. for direct access to impulse responses, etc.

The AAX host provides dedicated audio buffers in both the Process\+Proc context and the Hybrid processing context. These buffers can be used to pass audio data between the low-\/latency Proces\+Proc and the Hybrid render contexts. \begin{DoxyItemize}
\item The plug-\/in may pass output from the low-\/latency Process\+Proc to the Hybrid render method using additional audio buffers that are added at the end of the Process\+Proc context\textquotesingle{}s normal output buffer array. The Process\+Proc may perform any pre-\/processing that is desired before passing audio to the Hybrid render context via these buffers. The \mbox{\hyperlink{a00901_ga13e384f22825afd3db6d68395b79ce0dac30a4e73772e37267dfef39ae3122705}{AAX\+\_\+e\+Property\+\_\+\+Hybrid\+Output\+Stem\+Format}} property defines how many buffers will be sent from the Process\+Proc to the Hybrid render method. \item Similarly, the plug-\/in may pass samples from the Hybrid processing callback to the low-\/latency Process\+Proc using additional audio buffers that are added at the end of the Process\+Proc context\textquotesingle{}s normal input buffer array. The \mbox{\hyperlink{a00901_ga13e384f22825afd3db6d68395b79ce0da33a950bc2e02d38fc3be0a0ad8cc89b1}{AAX\+\_\+e\+Property\+\_\+\+Hybrid\+Input\+Stem\+Format}} property defines how many buffers will be sent from the Hybrid render method to the Process\+Proc.\end{DoxyItemize}
Samples which are sent from the Process\+Proc to the Hybrid processing callback and back to the Process\+Proc are delayed by a fixed amount relative to the normal input samples that are processed directly by the Process\+Proc to its output buffers. The number of samples of delay that are added in this round-\/trip is available to the plug-\/in via \mbox{\hyperlink{a00901_ga47b471c438fcad0798964b860d74609e}{AAX\+\_\+\+IController\+::\+Get\+Hybrid\+Signal\+Latency()}} .\hypertarget{a00901_additionalFeatures_Hybrid_subtleties}{}\doxysubsection{Additional information}\label{a00901_additionalFeatures_Hybrid_subtleties}
\hypertarget{a00901_additionalFeatures_Hybrid_parametertiming}{}\doxysubsubsection{Parameter update timing}\label{a00901_additionalFeatures_Hybrid_parametertiming}
Because updates are not passed to the \mbox{\hyperlink{a02070}{Hybrid processing context}} using the normal AAX port infrastructure, any parameter updates from automation will be reflected in this context a little bit ahead of time ($\sim$21 ms at 44.\+1 k\+Hz.) See the \mbox{\hyperlink{a00917}{Parameter update timing}} page for a discussion of parameter timing accuracy and some suggestions of how you can maintain accurate parameter update timing.\hypertarget{a00901_additionalFeatures_Hybrid_hostsupport}{}\doxysubsubsection{Host support and alternatives}\label{a00901_additionalFeatures_Hybrid_hostsupport}
Not all \mbox{\hyperlink{a00948}{AAX}} hosts support \mbox{\hyperlink{a00948}{AAX}} Hybrid processing. See the \mbox{\hyperlink{a00941}{Host Support}} page for additional information.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{a00899}{Direct data access interface}} for another approach for transferring non-\/audio data between the algorithm callback and the plug-\/in\textquotesingle{}s data model. 
\end{DoxySeeAlso}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{a02070}{AAX\+\_\+\+SHybrid\+Render\+Info}}
\begin{DoxyCompactList}\small\item\em Hybrid render processing context. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Hybrid audio methods}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a00542_a4d8f69a697df7f70c3a8e9b8ee130d2f}{AAX\+\_\+\+Result}} \mbox{\hyperlink{a00901_gae6139041de22f51f3146d26a01c54c1b}{AAX\+\_\+\+IACFEffect\+Parameters\+\_\+\+V2\+::\+Render\+Audio\+\_\+\+Hybrid}} (\mbox{\hyperlink{a02070}{AAX\+\_\+\+SHybrid\+Render\+Info}} $\ast$io\+Render\+Info)=0
\begin{DoxyCompactList}\small\item\em Hybrid audio render function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{MIDI methods}
Methods to access the plug-\/in\textquotesingle{}s host-\/managed MIDI information. \begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a00542_a4d8f69a697df7f70c3a8e9b8ee130d2f}{AAX\+\_\+\+Result}} \mbox{\hyperlink{a00901_ga47b471c438fcad0798964b860d74609e}{AAX\+\_\+\+IController\+::\+Get\+Hybrid\+Signal\+Latency}} (int32\+\_\+t $\ast$out\+Samples) const =0
\begin{DoxyCompactList}\small\item\em CALL\+: Returns the latency between the algorithm normal input samples and the inputs returning from the hyrbid component. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{a00901_gae6139041de22f51f3146d26a01c54c1b}\label{a00901_gae6139041de22f51f3146d26a01c54c1b}} 
\index{Hybrid Processing architecture@{Hybrid Processing architecture}!RenderAudio\_Hybrid@{RenderAudio\_Hybrid}}
\index{RenderAudio\_Hybrid@{RenderAudio\_Hybrid}!Hybrid Processing architecture@{Hybrid Processing architecture}}
\doxysubsubsection{\texorpdfstring{RenderAudio\_Hybrid()}{RenderAudio\_Hybrid()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{a00542_a4d8f69a697df7f70c3a8e9b8ee130d2f}{AAX\+\_\+\+Result}} AAX\+\_\+\+IACFEffect\+Parameters\+\_\+\+V2\+::\+Render\+Audio\+\_\+\+Hybrid (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{a02070}{AAX\+\_\+\+SHybrid\+Render\+Info}} $\ast$}]{io\+Render\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Hybrid audio render function. 

This method is called from the host to render audio for the hybrid piece of the algorithm.

\begin{DoxyNote}{Note}
To use this method plug-\/in should register some hybrid inputs and ouputs in \char`\"{}\+Describe\char`\"{} 
\end{DoxyNote}


Implemented in \mbox{\hyperlink{a01850_a2b68c51ddd302b43c0df250fdd3ba239}{AAX\+\_\+\+CEffect\+Parameters}}.

\mbox{\Hypertarget{a00901_ga47b471c438fcad0798964b860d74609e}\label{a00901_ga47b471c438fcad0798964b860d74609e}} 
\index{Hybrid Processing architecture@{Hybrid Processing architecture}!GetHybridSignalLatency@{GetHybridSignalLatency}}
\index{GetHybridSignalLatency@{GetHybridSignalLatency}!Hybrid Processing architecture@{Hybrid Processing architecture}}
\doxysubsubsection{\texorpdfstring{GetHybridSignalLatency()}{GetHybridSignalLatency()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{a00542_a4d8f69a697df7f70c3a8e9b8ee130d2f}{AAX\+\_\+\+Result}} AAX\+\_\+\+IController\+::\+Get\+Hybrid\+Signal\+Latency (\begin{DoxyParamCaption}\item[{int32\+\_\+t $\ast$}]{out\+Samples }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



CALL\+: Returns the latency between the algorithm normal input samples and the inputs returning from the hyrbid component. 

This method provides the number of samples that the AAX host expects the plug-\/in to delay a signal. The host will use this value when accounting for latency across the system.

\begin{DoxyNote}{Note}
This value will generally scale up with sample rate, although it\textquotesingle{}s not a simple multiple due to some fixed overhead. This value will be fixed for any given sample rate regardless of other buffer size settings in the host app.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em out\+Samples} & The number of samples of hybrid signal delay \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{a02378_abc03b972e785569e1a0e89a12a6ed372}{AAX\+\_\+\+VController}}.

Collaboration diagram for Hybrid Processing architecture\+:
% FIG 0
