Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Preload Gesture Sounds

Jim Bunderfeld
The Coder
Join date: 1 Mar 2004
Posts: 161
06-01-2006 12:34
This script Preloads all the sounds inside the prim, it is meant to be an attachment.
To preload the sounds just type /13 preload
CODE

// This script is meant to be worn as an attachment
// Either, insert all of the gesture sounds you use on a regular basis,
// then the script, and then Reset after inserting the script.
//*OR* Put the script in first and then the sounds, slowly so that it
// has time to execute build_list
// Scripted by: Jim Bunderfeld
// Released for the Second Life Community
// Use this script as you want OEPN SOURCE
// Thank you :-)
//
build_list(list sounds)
{
sounds = [];
integer num = llGetInventoryNumber(INVENTORY_SOUND);
integer i;
for(i = 0;i < num;i++)
{
sounds = sounds + [ llGetInventoryName(INVENTORY_SOUND,i)];
//llSay(0,llGetInventoryName(INVENTORY_SOUND,i));
}

}
list soundlist;
list keys;

default
{
state_entry()
{
build_list(soundlist);
llListen(13,"",llGetOwner(),"preload");
}
changed(integer change)
{
if(change == CHANGED_INVENTORY)
{
build_list(soundlist);
}
}

listen(integer c,string n,key i,string m)
{
integer listlength = llGetListLength(soundlist);
integer i;
for(i = 0;i <= listlength;i++)
{
string sound = llList2String(soundlist,i);
llPreloadSound(sound);

}
}
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
06-02-2006 06:51
/15/10/111004/1.html#post1069660
_____________________
i've got nothing. ;)
Gigs Taggart
The Invisible Hand
Join date: 12 Feb 2006
Posts: 406
06-03-2006 19:23
From: Jim Bunderfeld

// Use this script as you want but please DO NOT SELL IT


So if anyone sells a script that preloads sounds dynamically detected from inventory (like a bunch of scripts do), you are going to be mad?

CODE

//This script is free, BUT DO NOT SELL IT OR PRODUCTS BASED ON IT!
string stuff="Change this to what you want to say";
llSay(0, stuff);


There. Now everyone owes me a royalty. Better pay up!
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
06-03-2006 20:15
From: Gigs Taggart
So if anyone sells a script that preloads sounds dynamically detected from inventory (like a bunch of scripts do), you are going to be mad?

CODE

//This script is free, BUT DO NOT SELL IT OR PRODUCTS BASED ON IT!
string stuff="Change this to what you want to say";
llSay(0, stuff);


There. Now everyone owes me a royalty. Better pay up!

The man wrote a script, he can make any request he cares to make in the comments. He even said "please". What exactly is your problem with this?

And did you not notice the improbable leap of logic between his wording (please do not sell this script, the implication in my mind being that it is unethical to resell that which is available for free) and your inflammatory example (DO NOT sell this script or anything else related to it or vaguely similar)?

Please.
Ayrn Wake
Registered User
Join date: 7 Jan 2006
Posts: 39
06-04-2006 10:06
On topic here...

I noticed a fatal flaw with this. Its use, according to the topic title at least, is to preload gesture sounds. Now, the problem comes in that unless you actually make the gesture yourself, you're unlikely to have the sound file thats used in it. Its a good example of preloading a list of sounds in inventory, but thats not partically hard anyways, just use llPreloadSound (soundname);, where soundname the inventory name or key of the sound in question.

A far better implementation would be to somehow grab the key of a sound played from gesture (if thats at all possible), and save it to a list, so that when you relog, the list is intact and will preload the sounds for you. Actually, thinking about it, it isn't possible, at least in current SL implementation, and would be more practical on LL's behalf to add a preload sound function to gestures themselves than to the LSL parser.
Neb Soyer
Really good looking.
Join date: 9 Apr 2006
Posts: 45
06-04-2006 10:12
From: Gigs Taggart
So if anyone sells a script that preloads sounds dynamically detected from inventory (like a bunch of scripts do), you are going to be mad?

CODE

//This script is free, BUT DO NOT SELL IT OR PRODUCTS BASED ON IT!
string stuff="Change this to what you want to say";
llSay(0, stuff);


There. Now everyone owes me a royalty. Better pay up!


I think by 'Based On it' Jim means that you can use the code freely for personal use, and develop upon it, but if you develop on it, you still cannot sell what you made from it.

-neb
_____________________
down in the ghetto.
Gigs Taggart
The Invisible Hand
Join date: 12 Feb 2006
Posts: 406
06-04-2006 14:24
From: Anti Antonelli
The man wrote a script, he can make any request he cares to make in the comments. He even said "please". What exactly is your problem with this?

And did you not notice the improbable leap of logic between his wording (please do not sell this script, the implication in my mind being that it is unethical to resell that which is available for free) and your inflammatory example (DO NOT sell this script or anything else related to it or vaguely similar)?

Please.



It's not a request, it's a license. People releasing very simple scripts under restrictive licenses like this one exposes us all to DMCA complaints.
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
06-04-2006 15:15
From: Gigs Taggart
It's not a request, it's a license. People releasing very simple scripts under restrictive licenses like this one exposes us all to DMCA complaints.
a) I don't see anything indicating it is a license - such as the word "license", or "released under the articles of the blah blah of which you should have received a copy etc etc", for example.

b) He never mentions anything about derived work or even objects using the script, only the script itself. That other stuff was added by you. You've already got one guy in this thread thinking that language is in the original script, whether you meant to or not.

I'd even be inclined, like you, to interpret it as an overly restrictive license were any of that language present; as it stands though, it strikes me as a simple request from a guy who doesn't want his free stuff being resold.

I'm done cluttering up the thread with this off-topic crap. I just think you misinterpreted the intent of those words, and did the man a disservice by jumping down his throat over it.
Gigs Taggart
The Invisible Hand
Join date: 12 Feb 2006
Posts: 406
06-06-2006 06:20
From: Anti Antonelli
a) I don't see anything indicating it is a license - such as the word "license", or "released under the articles of the blah blah of which you should have received a copy etc etc", for example.

I'm done cluttering up the thread with this off-topic crap. I just think you misinterpreted the intent of those words, and did the man a disservice by jumping down his throat over it.


If it wasn't a license, then we have no right to use the script at all. By default work is "all rights reserved" unless there's some other license granting others a right to use it.

If people around here would just use normal open source licenses like the GPL or BSD license then this wouldn't be an issue.

Don't get me wrong, it's very nice that people release open source scripts. But we need to be careful what licenses we use to protect both the consumer and the creator of such scripts.
Jim Bunderfeld
The Coder
Join date: 1 Mar 2004
Posts: 161
06-06-2006 07:15
I have changed the commenting around a little bit, it is OPEN SOURCE, do what ever you want with it I don't care. I'm just trying to help out :D
Gigs Taggart
The Invisible Hand
Join date: 12 Feb 2006
Posts: 406
06-07-2006 18:45
From: Jim Bunderfeld
I have changed the commenting around a little bit, it is OPEN SOURCE, do what ever you want with it I don't care. I'm just trying to help out :D



Thanks Jim! Your work is appreciated. I'm a strong supporter of open source. In the open source community we learned a long time ago, it's important to be careful about your license terms.