STHeadphoneVirt
Overview
ST Headphone Virtualization module
Discussion
The HPV module provides functions to handle audio virtualization on headphones. Goals of this module are to have a virtualization effect and to feel sounds less aggressively for the ears. Front channels (from stereo or multichannel files) are not heard on the side close to the ears but are narrowed in front of the listener, while surround and rear sounds are played around the listener. Some reverberation and Out of Head effects inside the algorithm gives greater virtualization and allows feeling smoother sounds (attenuation of HP vibrations).
The HPV module supports 1.0, 2.0, 5.1 and 7.1 interleaved 32-bit I/O data at a 48 kHz sampling frequency, with a minimum input frame size of 2ms (96 samples per channel). For MIPS optimization reasons, frame length must be a multiple of 4 samples.
Type Definition
typedef struct _ModuleSTHeadphoneVirt
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 nAPIResult; // Return status for last call into the ST API
INT32 audioMode; // Audio mode 1 - C, 2 - L,R, 7 - L,R,C,Ls,Rs, 11 - L,R,C,Ls,Rs,Csl,Csr
INT32 lfeEnable; // Enable LFE on input stream
INT32 enable; // Block enable
INT32 strength; // Strength (0 - 100)
INT32 enableHeadTracking; // Enable head tracking
INT32 azimuth; // Head rotation (-179 - 180) degrees
void * pGlobals; // Points to the global variables structure
} ModuleSTHeadphoneVirtClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
nAPIResult | int | state | 0 | 0 | Unrestricted | |
audioMode | int | const | 0 | 2 | Unrestricted | |
lfeEnable | int | const | 0 | 0 | Unrestricted | |
enable | int | parameter | 0 | 1 | 0:1:1 | |
strength | int | parameter | 0 | 0 | 0:1:100 | |
enableHeadTracking | int | parameter | 0 | 0 | 0:1:1 | |
azimuth | int | parameter | 0 | 0 | -179:1:180 | degrees |
pGlobals | void * | const | 1 | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
Data type: fract32
Channel range: 2
Block size range: 96:4:480
Sample rate range: 48000
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: st_hpv_module.m
M = st_hpv_module(NAME, AUDIOMODE, LFE_ENABLE)
Audio Weaver wrapper for the ST Headphone Virtualization module. Arguments:
NAME - name of the module.
AUDIOMODE - 1 - C, 2 - L,R, 7 - L,R,C,Ls,Rs, 11 - L,R,C,Ls,Rs,Csl,Csr
LFE_ENABLE - enable LFE on input stream
Copyright (c) 2017 DSP Concepts, Inc. All Rights Reserved.
Author: Chris Perry