# Design and Application of the BiVib Audio-Tactile Piano Sample Library
## 2 Creation of the BiVib library
### Sample Library Organization  
The sample library was organized for playback with the 'Kontakt Player' software--a free version of Native Instruments' Kontakt sampler, ([[https://www.native-instruments.com/en/products/komplete/samplers/kontakt-5-player/](https://www.native-instruments.com/en/products/komplete/samplers/kontakt-5-player/)]([https://www.native-instruments.com/en/products/komplete/samplers/kontakt-5-player/](https://www.native-instruments.com/en/products/komplete/samplers/kontakt-5-player/))) available for Windows and Mac OS systems. The full version of Kontakt 5 was instead used to develop Kontakt project files as described below. The resulting library is organized into several folders, named 'Instruments', 'Multis', 'Resources', and 'Samples'.  
The 'Samples' folder--whose total size amounts to about 65 GB--held separate subfolders for the binaural and vibration samples, respectively, which contain further subfolders for each sample set (see Table 1), for example 'grand-open' under the 'binaural' folder.  
Independent of their type, sample files were named according to the following mask:  
[note][octave #]_[lower MIDI velocity]_[upper MIDI velocity].wav,  
where [note] follows the English note-naming convention, [octave #] ranges from 0 to 8, [lower MIDI velocity] equals the MIDI velocity (range 12-111) used during recording and is the smallest velocity value mapped to that sample in Kontakt (see below), [upper MIDI velocity] is the largest velocity value mapped to that sample in Kontakt. As an example, the file A4_100_110.wav corresponds to the note A from the 4 th octave (fundamental frequency 440 Hz) recorded at MIDI  
Figure 3: Vibration signal recorded on the grand Disklavier by playing the note A2 at MIDI velocity 12. Picture from [12].  
velocity 100, and mapped to the velocity range 100-110 in Kontakt. Since the lowest recorded velocity value was 12, for consistency no samples were mapped to the velocity range 1-11 in Kontakt.  
Following the terminology used in Kontakt, each instrument reproduces a sample set (e.g., binaural recording of the grand piano with lid open), while each multi combines two instruments respectively reproducing one binaural and one vibration sample set belonging to the same piano. The two instruments in each multi are configured so as to receive MIDI input data on channel 1, thus playing back at once, while their respective outputs are routed to different virtual channels in Kontakt: binaural samples are routed to a pair of stereo channels (numbered 1-2), while vibration samples are played through a mono channel (numbered 3). In this way, when using audio interfaces offering more than two physical outputs, it is possible to render synchronized binaural and vibrotactile cues at the same time by routing the audio signal to headphones and, in parallel, the vibration signal to an amplifier driving one or more actuators.  
In each instrument, sample mapping was implemented relying on the 'auto-map' feature found in the full version of Kontakt: this parses file names and uses the recognized tokens for assigning samples to e.g., a pitch and velocity range. The chosen file naming template made it straightforward to batch-import the samples.  
The amplitude of the recorded signals was not altered, that is, no dynamic processing or amplitude normalization was applied. The volume of all Kontakt instruments was set to 0 dB. Because of this setting and of the adopted velocity mapping strategy, sample playback was kept as transparent as possible for simplifying the setup of acoustic and vibratory analysis procedures, experiments and interactive applications (see Sections 3 and 4).