Monday, December 01, 2008

Scripting for the non technical

For some reason I got a bug about building an indoor fountain. So I started throwing prims around and came up with this.



Of course the water had to move. At this point I am pretty good with a rotation script. I can copy and past a script into a prim just like the pros. Still, I was not satisfied with motion alone because a silent fountain makes no sense. The water needed to make soft tinkling and splashing noises.

What to do? At first I started to look for sounds in a prim. Lots of places sell these so you can add life to your build. You can find ambient sounds for everything imaginable from industrial scenes to medieval villages or haunted forests. I searched and searched for the soft bubbling of a small indoor fountain and found the object of my desires elusive.

It began to be obvious that I would have to get a sound file and rig a script to make the sound file loop. I was beginning to think I was in over my head on this little project. Rather than give in to my absolute certainty that I could not get this little bit of scripting done I started to think -- "dammit I am going to do this." It just can't be that hard. Much to my surprise it really was pretty easy.

First I had to find the perfect sound file. As luck would have it the search tool eventually led me to Sound Shack owned by the most helpful Loren Tone. Loren sells his sound files full perm, which was important as I wanted to be able to make multiple copies of this fountain and I planned to give it away. I have no need to modify the sound file, not that I would know how to anyway.

Back to the point. Loren had several different sounds that worked perfectly for my project. Beyond that he was very helpful and gave me a few open source scripts that I could fiddle with to make the sounds loop. Loren explained how to use the scripts and was generally very kind. So, if you are looking for sound files and good customer service I do recommend his shop Sound Shack.


I took the simple sound looping script and added it to a prim. Then I added the sound file, recompiled the script and shazam the prim made tinkly, bubbly, flowing fountain sounds. Finally, I made the prim transparent, put it in the bowl of the fountain, linked it up and was done. Come to think of it I could reduce the prims on the fountain by adding the sound to one of the pieces of the fountain itself. See? Building is a process of iteration and refinement.

Creating this silly fountain and not shying away from the challenge of figuring out how to loop sounds was very rewarding. And, as a side benefit of the process, I now have an object that creates a soft sound scape for my home. There is something about the sound of moving water that I find very relaxing. If you do too just IM me and I am happy to drop a copy of the fountain on you.

2 comments:

ahuva18 said...

I LOVE my fountain - thank you again! I was stretched out on my bed last night, IM'ing and working on pictures for Flickr, listening to the soothing sounds of the running water. Congratulations on a job well done! (And the style fits very nicely with my current furnishings)

Zippora Zabelin said...

I do SO understand what you are talking about!
I was building a waterfall lately and first was fiddling with the texture and rotations script (and finally left it because I found wonderful sculpted modules, lol) After that I wanted to add sound as well. I found the necessary script in my inventory, found the sound I liked and arghh.. it was in a prim! Easy to hide in a waterfall though, but next time I will stop by in Sound Shack! Thanks for sharing :)