Skip to content

Releases: 3DTune-In/3dti_AudioToolkit_UnityWrapper

v3.1

08 Dec 16:41
Compare
Choose a tag to compare
  • Update MacOS plugin binaries to add support for ARM-based Macs. NB SOFA files are not supported on ARM-based architectures.
  • Remove some unnecessary files from the asset package.

Known issues

The package includes a 3DTI mixer. Sometimes if you try to delete the Hearing Aid or Hearing Loss plugin from the mixer, it will cause Unity to freeze. If you do not need to use either of these plugins then you can delete the mixer and create a new one with just the Spatializer Core (this provides the reverb return). Note however that the mixer contains exposed parameters for the plugins, so you may want to avoid this step if you are using either of them.

This issue seems to be caused by a repetitive re-initialization of the Baere-Moore frequency smearing. There may be alternative workarounds by changing the frequency smearing method or disabling this before deleting the plugins. (If the Inspector for HA and HL does not appear when selecting the mixer then ensure you have added the HA and HL components to your scene somewhere.)

v3.0

23 Sep 16:29
Compare
Choose a tag to compare

Version 3.0 of the toolkit.

In addition to the updates up until v3.0rc6, in this release:

  • Fix incorrect preset values on Baer-Moore frequency smearing on the Hearing Loss simluator.
  • Update the About text.

v3.0-rc6

07 Aug 13:47
Compare
Choose a tag to compare
v3.0-rc6 Pre-release
Pre-release
  • Fixed a bug causing Hearing Loss to be very quiet. This was caused by the Calibration parameter erroneously being marked as a bool instead of a float, causing its value to be 1 instead of 100.
  • Update Unity version in demo scene to 2019.4.40f1

Note: Even with spatialization disabled, audio outputted from Unity still appears to be slightly quieter than other applications. You may wish to apply some gain to the master mixer to compensate for this.

v3.0-rc5

17 Jun 13:23
Compare
Choose a tag to compare
v3.0-rc5 Pre-release
Pre-release

This should be the final release candidate for v3.0!

v3.0rc4 includes new features:

  • HearingAid has been updated to the new Parameter API in addition to HearingLoss. All components have now been moved to use the new minimal interface.
  • SOFA support for BRIR on Windows and Mac
  • SONICOM dataset labels (48kHz instead of 48000) are now supported (thanks to @rapolasd).
  • Update docs to make it clearer how to add your own HRTF binary files.

And bug fixes:

  • The package should now load with the toolkit's default parameters
  • Fig6 calculations were wrong. This has now been fixed.
  • Fixed a bug causing the spatializer to continually reinitialize when redrawing the Inspector GUI.

v3.0-rc4

26 May 16:40
Compare
Choose a tag to compare
v3.0-rc4 Pre-release
Pre-release

This is an interim update prior to v3.0 that addresses the following:

  • The Spatializer now exposes the Reverb Distance Attenuation parameter
  • Anaechioc Distance Attenuation default value is corrected to -6.02 dB
  • Bugfix for issue where the Spatializer reinitializes continually when the mouse moves over its Inspector GUI component.
  • Add in separate build for iOS Spatializer.

v3.0 Release Candidate 3

07 Jan 14:06
Compare
Choose a tag to compare
Pre-release

NB, This introduces a few breaking changes on v3.0rc2 in the naming of components and namespaces.

  • Update BuildUnityWrapper project to Unity 2019.4.30f
  • Rename components to remove API_3DTI prefix and instead put them in the API_3DTI namespace.
    • API_3DTI_Spatializer -> Spatializer
    • API_3DTI_HA -> HearingAid
    • API_3DTI_HL -> HearingLoss
  • Merge API_3DTI_Common namespace with API_3DTI namespace
  • Update iOS binaries to include full bitcode for submission to App Store
  • Update 3DTI Mixer default parameters to use Graf based frequency smearing on both channels (this reduces an inadvertent slowdown when launching a project that contains the mixer, see #1).

v3.0 Release Candidate 2

09 Nov 20:07
Compare
Choose a tag to compare
Pre-release

A few bugfixes compared to 3.0rc1 and SOFA support enabled on MacOS.

Here is the changelog for version 3.0:

General:

  • Warning: Version 3.0 introduces a new API and is not backwards compatible with scripts controlling the toolkit with version 2.0. However, the new API is lightweight and, particularly for the Spatializer, requires much less work to integrate.
  • A new API for parameters has been introduced with the aim of reducing the maintenance overhead of exposing 3DTI Toolkit features:
    • Currently this is implemented for HearingLoss (and the Spatializer - see below). HearingAid is yet to be updated.
    • Parameters are defined by a single enum in the effects component script: API_3DTI_HL.Parameter and API_3DTI_Spatializer.SpatializerParameter.
    • The parameter enums have attributes which declares all required properties. The components have generic functions SetParameter and GetParameter. E.g.,
      • to turn on hearing loss: SetParameter(API_3DTI_HL.Parameter.HLOn, true, T_ear.BOTH)
      • to get the multiband expansion attack in the left ear: GetParameter<float>(API_3DTI_HL.Parameter.MultibandExpansionNumFiltersPerBand, T_ear.LEFT)
    • There is a big reduction in variables within the C# code that duplicate the state of the audio plugins, opting instead to read these values from the plugins where needed. In the spatializer where this isn't possible, parameter values are stored in a single serialized array.

Binaural spatializer and reverb:

  • The API has been rewritten following a similar pattern to that introduced for Hearing Loss.
  • SOFA format HRTF files are now supported (Windows x64 / MacOS only).
  • Binaural reverb is now supported. Reverb is calculated for all spatialized audio sources in a single pass. Add the SpatializerReverb audio plugin to a mixer strip to get the reverberation signal.
    • AudioSources may be individually set in terms of whether their signal is sent to the reverb.
  • The Spatializer has been split into two effects:
    • SpatializerSource is attached to each spatialized audio source
    • SpatializerReverb is a mixer effect which handles spatialization parameters and processes the return of the binaural reverb
  • The Spatializer scripts now communicate directly with the native audio plugin code, rather than going through the Unity AudioMixer interface. This greatly simplifies passing complex parameters such as paths for binary resource files.
    • Spatializer parameters follow a similar patterns as the new HearingLoss parameters but without the pluginName and mixerName attributes which are no longer needed, and with additional parameters: min, max, defaultValue, isSourceParameter
    • Spatializer parameters where isSourceParameter is true may be set individually on specific audio sources. The API_3DTI_SpatializerSetParameter has an extra argument to specify the audio source. This may only be specified for parameters where isSourceParameter is true. If isSourceParameter is true but the source is left as null then the default value for this parameter used on new audio sources is set.
    • The GUI for the Spatializer has been redesigned with an aim to clarify which parameters are per-source and which are global.
    • Spatializer binary resources such as impulse responses are no longer defined using the Parameter enums. There are now specific functions:
    • public bool SetBinaryResourcePath(BinaryResourceRole role, TSampleRateEnum sampleRate, string path)
    • public string GetBinaryResourcePath(BinaryResourceRole role, TSampleRateEnum sampleRate)
  • Debug logging to text files is being phased out as it had a huge overhead of code to maintain. If you need details of what's happening in the native plugin, you can build from source and attach the debugger to Unity. For mobile, the error console can be accessed using adb on Android and Xcode on iOS.
  • Many bugs have been fixed through the above simplification, including the following (thanks to Kevin for reporting these):
    • Glitching noises when replaying a scene after a source had previously had Stop() called on it.
    • Comb filtering effect on an audio source when another source is loaded to play on awake but has no AudioClip loaded.
    • Incorrect amplitude (and otherwise incorrect values) of AudioSources when PlayOnAwake is set which is corrected when a subsequent source is played.

v3.0 Release Candidate 1

27 Sep 20:19
Compare
Choose a tag to compare
Pre-release

First release candidate for version 3.0 of the wrapper. Full changelog to come. Highlights are:

  • Spatializer has been significantly.
  • Parameter system rewritten (currently for Spatializer and Hearing Aid - Hearing Loss still to come).
  • New parameter API has a much slimmer set of C# functions but should expose more functionality. It no longer uses the Unity audio parameter system and is no longer bound with the mixer. Parameter values are instead passed directly to the plugin.
  • Reverb support has been added. To hear reverb, you need to add a Reverb plugin to the mixer to get the return channel.
  • New simplified GUI system to generate controls directly from parameter definitions, in an effort to reduce the maintenance burden of managing all the parameters.
  • Stronger threading protection for Spatializer.

3DTI AudioToolkit UnityWrapper V2.0 M20210507

07 May 08:34
2be9dd9
Compare
Choose a tag to compare

The 3DTI Unity Wrapper allows integration of some of these components of the 3DTI Toolkit in any Unity Scene. The 3DTI Toolkit which is located here: https://github.com/3DTune-In/3dti_AudioToolkit,. These components are packed in the form of a Unity Package requiring Unity 2019.4 or above. The current version of the package is built to support the following platforms:

  • As Host: Microsoft Windows 10, MacOS.
  • As Target: Microsoft Windows x64, MacOS, Android (4.4 or above), iOS. (We also include binaries for Windows x86 but they are not tested on a 32 bit computer so are not officially supported.)

In its current version, the following parts of the 3DTI Toolkit are made available to a Unity application:

  • Binaural anechoic spatializer (reverb simulation not included)
  • Hearing loss simulation
  • Hearing aid simulation

Technical details about the 3D Tune-In Toolkit spatialiser are described in:

Cuevas-Rodríguez M, Picinali L, González-Toledo D, Garre C, de la Rubia-Cuestas E, Molina-Tanco L and Reyes-Lecuona A. (2019) 3D Tune-In Toolkit: An open-source library for real-time binaural spatialisation. PLOS ONE 14(3): e0211899. https://doi.org/10.1371/journal.pone.0211899