Vasparittya User Manual
Vasparittya (pronounce something like “wash-par-it-ya”, meaning: iron-sling) is a tool for easily playing custom sound effects using any kind of input device available to a Windows PC. This includes: keyboards, mice and any DirectInput or XInput compatible joystick devices.
The sound effects can be things like contemporary pop-culture references, or background effects for some party or quiz game you're hosting. All bound to an input device by which you can easily trigger it.
This guide will walk you through the process of creating your own sound libraries.
Table of Contents
1. Acquisition of Sound Effects
Internet. Google is your friend. There are dozens of websites offering free sounds for download, whatever you're looking for just include the words "free sound" in the search and you'll see.
You can also get sound effects from video games. Doing this might be very easy or very hard, as some games have their resources wide open in some folders, while others have them in a package file that might require special software to open.
Movies or television series with a massive fandom could have a website dedicated to sharing all kinds of stuff, including iconic sound effects. Here's an example for Star Trek: http://trekcore.com/audio/.
From wherever you end up sourcing your sound effects, keep in mind that these might be copyrighted materials! For personal use it's fine, but as soon as you use it publicly (like on a convention or in a stream), you could end up violating copyright law.
2. Editing Sound Effects
You might need to edit the sound, like removing some extra silence at the beginning, or cut out one particular part. If you don't know where to start, I suggest trying out Audacity. It's free and easy to use.
3. Creating a Sound Library
3.1. Create a folder next to "Vasparittya.exe". The folder's name will be the name of the sound library. It can even have accented characters.
3.2. Copy your sound effects into this folder. The supported file formats are as follows:
- RIFF WAVE (*.wav)
- Ogg Vorbis (*.ogg)
- MPEG-1 Audio Layer 3 (*.mp3)
- Free Lossless Audio Codec (*.flac)
- Amiga Modules (*.mod)
- Impulse Tracker (*.it)
- Scream Tracker 3 (*.s3m)
- Fast Tracker 2 (*.xm)
3.3. Now comes the coding part. Create a new file called "program.xml", and copy the following code:
<?xml version="1.0" encoding="utf-8"?> <program volume="100"> </program>Now the new sound library will show up in the app (after the app is restarted), and it will randomly play any of the supported files from the folder upon each button press. Of course if there is only one file then it will always play just that one.
3.4. If you want to set the sound volume separately for each file, then you have to reference them manually, one by one:
<?xml version="1.0" encoding="utf-8"?> <program volume="100"> <sound file="one.wav" volume="80" /> <sound file="another.wav" volume="100" /> <sound file="third.wav" volume="65" /> </program>In this case the app will only chose from this list of files, disregarding any other file in the folder, even if they are supported.
3.5. A few attributes are available to fully tweak and customize the behavior of the sound library. These must be included in the "<program>" element (see next chapter on how).
|attribute||value range||default value||description|
|The name of the sound library that will be visible in the app. The only reason to set this is if you want to use characters that you can't have in the folder name, such as these: < > : " / \ | ? *. Note, that in order to have accented or other non-English characters, the file must be saved with UTF-8 encoding! Notepad++ handles this perfectly.|
|volume||from 1 to 100||100||Global sound volume for all files in the sound library.|
|continuous||"true" or "false"||false||If "true", sound is played in a loop until the button is released.|
|If continuous="true", the following attributes are used:|
|fade-in||from 0 to 60
|0||The time (in seconds) it takes for the sound to reach full volume from zero after playback has started. Decimal separator can be either period or comma.|
|fade-out||from 0 to 60
|0||Same as with fade-in, except it is for when the button is released, and the sound fades out.|
|analog||"true" or "false"||true||If set "true" and the button bound is also analog (like a gamepad trigger), then fade-in and fade-out are ignored, and instead sound volume is controlled directly by the user.|
|restart||"true" or "false"||false||If set "true", sound playback will start from the beginning each time. If set "false", playback will pick up from where it left off.|
|If continuous="false", the following attributes are used:|
|overlap||"true" or "false"||true||If set "true", sound effects can be started again even while previous playback is still going. If set "false", previous playback is terminated before starting a new.|
|wait||from 0 to 600
|0.5||Cooldown timer to prevent triggering the sound effect too often. Value is in seconds.|
The default value will be used for any attribute that is not specifically set. Numbers with decimals can use both period and comma for the decimal separator.
4.1. Continuous sound that will fade in upon button press, then fade out upon release. The duration of the fading is 1.5 seconds in both cases. (Relevant parts are highlighted in red).
<?xml version="1.0" encoding="utf-8"?> <program title="Left 4 Dead: Witch Encroacher" continuous="true" fade-in="1.5" fade-out="1.5" volume="80"> <sound file="WitchEncroacher.ogg" volume="100" /> </program>
4.2. Sounds can overlap, but there is a 2 second cooldown after each button press.
<?xml version="1.0" encoding="utf-8"?> <program overlap="true" wait="2"> <sound file="hacks01.wav" volume="100" /> <sound file="thehacks01.wav" volume="100" /> </program>
4.3. Overlap is disabled, each button press will restart the sound effect, terminating previous playback.
<?xml version="1.0" encoding="utf-8"?> <program title="Air horn" overlap="false" wait="0"> </program>
4.4. The absolute minimalist implementation. Every attribute is set to its default value, and the name of the sound library is the name of the folder. Still, "program.xml" must be included to mark the folder as a sound library.
<?xml version="1.0" encoding="utf-8"?> <program> </program>