Aller au contenu

Working with audio

It is possible to record audio tracks from the computer's microphone in VRmaze. VRmaze will use the default Windows microphone for its recordings.

Audio source selection

It is possible, via the software preferences, to specify a microphone by its index in the list of microphones. The preferences provide a parameter for selecting the microphone to be used. The index can take any low positive value (since there are never thousands of microphones connected to a computer) representing the index of the microphone in the list. It is also possible to specify a value of -1, which is the default value, and which automatically uses the default microphone.

Record an audio stream

Two possibilities are offered in VRmaze. Depending on the needs, it is possible to record the audio stream of a complete experiment, or on the contrary, to record the audio stream trial by trial. The entity allowing the recording is the microphone recorder. This entity has two properties, one specifying the sound file name prefix, and the second parameter concerning the maximum recording duration. Regarding the filename, only a prefix is needed since the audio file will be saved in the SoundFiles folder of the data folder.

Maximum recording time

Beyond this duration, the audio stream is no longer recorded. However, it is important to estimate as closely as possible to limit the impact on memory usage. In the event that the trial ends before the end of the recording, the latter is finished and the file will have a length corresponding to the trial hosting the recorder.

Audio compilation

VRmaze provides an audio compilation tool to obtain an audio file of a complete experiment from all recordings of all trials in the experiment. Therefore, it is best to use the recording trial by trial.

File format

The audio file format is .wav.

Replaying a sound file

Image title 2

The SoundDataRecord and its graphic representation.

VRmaze stores sound in a special form, a specific DataRecord named SoundDataRecord. This container contains no audio data, it only contains the reference to the audio file in .wav format. The interest of this SoundDataRecord is to allow a graphic visualization of the audio curve in addition to being able to read again the file in question directly in the editor.

Storing audio data

The audio data is only stored in the audio file linked to the DataRecord. If the .wav file is lost, all audio data is lost.

Audio compilation tool

VRmaze provides an audio compilation tool to generate an audio file per experiment for a given protocol. The compilation will put the audio files of the trials end to end and mark each trial start with a small signal. It is thus easier to analyze the audio file with this marking. In case some of the audio files from the trials are missing, the compiled audio file will have signal sequences of the length of the trial.

Image title 2

A compiled audio file with some missing data opened in Audacity.