Site archive. SpicyNodes was active 2005-2018.

Share |

Home > Archive > Developers/reference > Recipes & mashups > Custom Sounds

Using your own custom sounds

The API is still being finalized. This is a preview...

SpicyNodes supports interactive sound effects and provides approximately 20 professionally-designed sound families, ranging from subtle and professional to more playful and unusual. These sounds add depth to the user experience, similar to the experience of walking into a zoo and hearing the distinctive utterances of each animal in the park.

Sounds can be customized to achieve a unique SpicyNodes implementation. Customization options range from choosing one of the pre-defined sound sets to incorporating your own sound effects. The latter option enables you to become the zookeeper, determining the sound to which each node-animal will respond.

When you want to create custom sounds

By using an XML sound configuration file, you can set a sound scheme for your entire nodemap. Still, there may be occasions when you want to single out a specific node by defining a custom sound to load for it. The “How to Set Special Sounds for Singled-Out Nodes” section below guides you through that process.

On other occasions, you may wish to enhance your nodemap with your own recorded sounds. The “How to Use Your Own Recordings” section below walks you through the steps to achieve that goal.

How to set special sounds for single nodes

The nodemap configuration XML file acts like a set of zoo regulations. To change the rules, you need to insert the “sound” attribute and provide the location of the sound file as a URL inside the tag for each node you’d like to modify:

<node name="myNode" label="testing" sound=”http://www.yoursite.com/path/to/sound1.mp3” />

You can also make use of additional configuration options, such as “soundPan”, “soundVolume”, and “soundRepeat”. These are further explained in the Nodemap XML file section.

How to use your own recordings

If you want to create your own sound effects or soundscapes, you first need to professionally record the sounds you plan to use. Sound editing software is quite useful in developing unique tones. It’s best to keep sound effects short; not only will short sounds load faster at run-time, but they also work better with the user interface and are less likely to interfere with one another in complex interactions.

Finalize the sound files by converting them to either MP3 or ACC file formats. Then upload them to your server or to another location where they will be stored.

Decide which actions of your SpicyNodes implementation you wish to dub and create the XML configuration file, consulting the Custom Sounds section for the allowed actions and possible values. This is where you can make a parrot roar like a bear or a fox trumpet like an elephant.

Finally, link the sound configuration XML file to the settings XML file, consulting the Reference section if necessary. Conduct a test to verify that your changes have been correctly implemented, and then enjoy the rhapsody you’ve created.

Explanation

Whether you opt to use one of the pre-defined sound sets or wish to create your own custom sounds, you need to modify an XML-based sound configuration file. Once created, it needs to be linked from the settings XML file, which defines the visual and behavioral style of a SpicyNodes implementation. The “Reference” section provides you with all of the relevant details.

In the sound configuration file, you need to specify the “sound” attribute for each action to which you’d like to attach an effect. The allowed actions to dub are listed in the Custom Sounds section. After all, just as you can’t teach a reptile to bark, some actions must remain silent; therefore, no sounds can be defined for them.

The sound for the desired effect should be available in a sound file stored on your server. The sound file’s location is specified inside each “sound” attribute by providing its URL via a nested “src” attribute. All sounds should be in one directory, and that directory must be at the same or deeper level than the swf file that will load the sound(s).

Below is a sample XML file that illustrates sound attributes:

<?xml version="1.0" encoding="UTF-8"?>
<soundset label="Sound library A" base="http://www.yoursite.com/path/to/soundLibA/">
	<sound src="backwards.mp3" pan="mono" repeat="1" action="backward" volume="0.7"/>
	<sound src="click.mp3" pan="stereo" repeat="1" action="click" volume="0.2"/>
	<sound src="contract.mp3" pan="stereo" repeat="1" action="contract" volume="0.7"/>
	<sound src="drag.mp3" pan="stereo" repeat="0" action="drag" volume="0.7"/>
	<sound src="expand.mp3" pan="stereo" repeat="1" action="expand" volume="0.7"/>
	<sound src="forward.mp3" pan="stereo" repeat="1" action="forward" volume="0.7"/>
	<sound src="home.mp3" pan="stereo" repeat="1" action="home" volume="0.7"/>
	<sound src="hover.mp3" pan="stereo" repeat="1" action="hover" volume="0.7"/>
	<sound src="mouse_in.mp3" pan="stereo" repeat="1" action="mousein" volume="0.7"/>
	<sound src="mouse_out.mp3" pan="stereo" repeat="1" action="mouseout" volume="0.7"/>
	<sound src="refocus.mp3" pan="stereo" repeat="1" action="refocus" volume="0.7"/>
	<sound src="search.mp3" pan="stereo" repeat="1" action="search" volume="0.7"/>
	<sound src="select.mp3" pan="stereo" repeat="1" action="select" volume="0.7"/>
	<sound src="zoom_in.mp3" pan="stereo" repeat="1" action="zoomin" volume="0.7"/>
	<sound src="zoom_out.mp3" pan="stereo" repeat="1" action="zoomout" volume="0.7"/>
</soundset>

Share |