<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BNVIB_%28File_Format%29</id>
	<title>BNVIB (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BNVIB_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BNVIB_(File_Format)&amp;action=history"/>
	<updated>2026-04-07T20:34:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=BNVIB_(File_Format)&amp;diff=134&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BNVIB_(File_Format)&amp;diff=134&amp;oldid=prev"/>
		<updated>2024-05-01T17:17:04Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;BNVIB&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;inary &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039;X &amp;#039;&amp;#039;&amp;#039;VIB&amp;#039;&amp;#039;&amp;#039;ration) is a file format used on the [[Nintendo Switch]]. It contains controller rumble data.&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
The file byte order is always little endian.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
The file format starts with a section that contains metadata information:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Metadata size&amp;#039;&amp;#039;&amp;#039;, excluding this value itself.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Format ID&amp;#039;&amp;#039;&amp;#039;. Always 3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Sampling rate&amp;#039;&amp;#039;&amp;#039; in hertz. Always 200.&lt;br /&gt;
|- bgcolor=&amp;quot;#CCCCCC&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;#039;&amp;#039;&amp;#039;If [[#Metadata|Metadata size]] ≥ 0xC&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|- bgcolor=&amp;quot;#DDDDDD&amp;quot;&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Loop start sample position&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|- bgcolor=&amp;quot;#DDDDDD&amp;quot;&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Loop end sample position&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|- bgcolor=&amp;quot;#CCCCCC&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;#039;&amp;#039;&amp;#039;If [[#Metadata|Metadata size]] = 0x10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|- bgcolor=&amp;quot;#DDDDDD&amp;quot;&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Loop interval&amp;#039;&amp;#039;&amp;#039; in samples, from the end of the loop to the start of the loop.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vibration Data ==&lt;br /&gt;
This section contains information about the rumble sample data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Data size&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;), excluding this value.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32[&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; / 4] || &amp;#039;&amp;#039;&amp;#039;[[#Vibration Sample Data|Vibration sample data]]&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vibration Sample Data ===&lt;br /&gt;
Each vibration value represents a sample, comprised in 4 bytes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Low band amplitude&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Low band frequency&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;High band amplitude&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;High band frequency&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Converting Amplitude Values ====&lt;br /&gt;
The amplitude value recorded in a byte &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039; can be converted using the following formula into an amplitude value in float:&lt;br /&gt;
&lt;br /&gt;
 Amplitude = &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039; / 255&lt;br /&gt;
&lt;br /&gt;
==== Converting Frequency Values ====&lt;br /&gt;
The frequency value recorded in a byte &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039; can be converted using the following formula into a frequency value in float:&lt;br /&gt;
&lt;br /&gt;
 Frequency = 10 * 2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;/32&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* The default frequency for low bandwidths is 160 Hz.&lt;br /&gt;
* The default frequency for high bandwidths is 320 Hz.&lt;br /&gt;
* The conversion from audio data to vibration data is processed by resampling the audio to 8000 Hz and using either the Butterworth or Chebyshev filters (Butterworth by default). The samples are recalculated to fit with the controller&amp;#039;s rumble sampling rate, which is 200 Hz.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle BNVIB files:&lt;br /&gt;
* (none)&lt;br /&gt;
&lt;br /&gt;
[[Category:Switch File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>