Need a public address/microphone system
|
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
|
12-02-2004 13:11
I am not even sure where to start with this one. Here's the situation. I have built a new theater venue. However, if you are seated near the back, you are more than 20 meters from the stage. Thus, you cannot "hear" in chat what's being said on stage. I thought, for sure, someone has already created a localized "repeater" type of script/object, but so far, I have not found it. This is probably a no-brainer to many of you, but I'm doing good to edit door/vector scripts.  I just need a microphone-like object for the stage that will broadcast local chat to a speaker-like object near the back of the venue. Or, there may be a better way to approach this. It would be helpful to be able to fine-tune the broadcast parameters to avoid spamming neighbors. If something like this already exists, please please post where I might find it. If not, please let me know how it might be possible to amplify chat to ~30 meters in radius vs. 20. I would consider paying a reasonable sum for such a system. Thanks very much!
|
pandastrong Fairplay
all bout the BANG POW NOW
Join date: 16 Aug 2004
Posts: 2,920
|
12-02-2004 13:31
From: Paolo Portocarrero I am not even sure where to start with this one. Here's the situation. I have built a new theater venue. However, if you are seated near the back, you are more than 20 meters from the stage. Thus, you cannot "hear" in chat what's being said on stage. I thought, for sure, someone has already created a localized "repeater" type of script/object, but so far, I have not found it. This is probably a no-brainer to many of you, but I'm doing good to edit door/vector scripts.  I just need a microphone-like object for the stage that will broadcast local chat to a speaker-like object near the back of the venue. Or, there may be a better way to approach this. It would be helpful to be able to fine-tune the broadcast parameters to avoid spamming neighbors. If something like this already exists, please please post where I might find it. If not, please let me know how it might be possible to amplify chat to ~30 meters in radius vs. 20. I would consider paying a reasonable sum for such a system. Thanks very much! ooooh.. I have something like this.. it was given to me for an event. Not sure who the builder was, but if you contact me IW I will check and let you know. 
_____________________
"Honestly, you are a gem -- fun, creative, and possessing strong social convictions. I think LL should be paying you to be in their game."~ Ulrika Zugzwang on the iconography of pandastrong in the media "That's no good. Someone is going to take your place as SL's cutest boy while you're offline."~ Ingrid Ingersoll on the topic of LL refusing to pay pandastrong for being in their game.
|
Punklord Drago
Registered User
Join date: 8 Sep 2004
Posts: 22
|
12-02-2004 16:16
i can make u one if u have not found one, just IM me in game.
|
Ainsley Skye
Registered User
Join date: 21 Oct 2004
Posts: 90
|
12-02-2004 16:46
From: Paolo Portocarrero I am not even sure where to start with this one. Here's the situation. I have built a new theater venue. However, if you are seated near the back, you are more than 20 meters from the stage. Thus, you cannot "hear" in chat what's being said on stage. I thought, for sure, someone has already created a localized "repeater" type of script/object, but so far, I have not found it. This is probably a no-brainer to many of you, but I'm doing good to edit door/vector scripts.  I just need a microphone-like object for the stage that will broadcast local chat to a speaker-like object near the back of the venue. Or, there may be a better way to approach this. It would be helpful to be able to fine-tune the broadcast parameters to avoid spamming neighbors. If something like this already exists, please please post where I might find it. If not, please let me know how it might be possible to amplify chat to ~30 meters in radius vs. 20. I would consider paying a reasonable sum for such a system. Thanks very much! Dione Jacques and her friend (sorry i don't know your name) have made a microphone like this, IM her for details. I use it all of Club Erotica events, it is very cooool!!!
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
12-02-2004 16:51
This code is untested, as I do not have access to SL. It's also very, very basic. Put this script in your microphone. integer Chatnel = 8888; //The channel you wish your objects to communicate with each other on.
default { state_entry() { listen(0,"","",""); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llShout(Chatnel,message); llSetObjectName("Microphone"); } } Put this script in your speaker(s). They must be within 100m of the microphone. integer Chatnel = 8888; //Must be identical to the Chatnel of the microphone script.
default { state_entry() { listen(Chatnel,"","",""); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llSay(0,message); llSetObjectName("Repeater"); } }
_____________________
</sarcasm>
|
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
|
12-03-2004 00:42
Just a thought. You will need to make sure that your "speakers" are not within 40m of each other, and are strategically placed or else some of your audience members may hear the same dialogue more than once (from different speakers), which would no doubt be very annoying for them.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
12-04-2004 03:32
One thing you could do to reduce echoing, and spam. As part of the mic script. Compare the key of each message sent. Only repeater message sent by avatars, and only avatars that are in your 'acting' group. That way you don't need a list of actor keys, and don't have to worry about the audience talking.
|
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
|
12-06-2004 08:00
Thank you, Moleculor! I've finally gotten the scripts to compile, but I haven't quite gotten the system working, yet. I had to replace the two lines with the listen command ( listen(0,"","",""); ) with the llListen function call. Those changes allowed the script to compile, but I am a bit unclear about which arguments to plug into the llListen's properties array. Any suggestions? Also, I re-named both the "mic" and "speaker" objects to match the llSetObjectName arg, but I was also wondering if I have to somehow link the two objects? Given that they will be about 60 meters apart,(about 40 meters back and 20 meters up), so if linking will be necessary, I could use some suggestions on how to go about it. Thanks! From: Moleculor Satyr This code is untested, as I do not have access to SL. It's also very, very basic. Put this script in your microphone. integer Chatnel = 8888; //The channel you wish your objects to communicate with each other on.
default { state_entry() { //listen(0,"","",""); llListen(integerchannel,stringname,keyid,stringmsg); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llShout(Chatnel,message); llSetObjectName("Microphone"); } } Put this script in your speaker(s). They must be within 100m of the microphone. integer Chatnel = 8888; //Must be identical to the Chatnel of the microphone script.
default { state_entry() { //listen(Chatnel,"","",""); llListen(integerchannel,stringname,keyid,stringmsg); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llSay(0,message); llSetObjectName("Repeater"); } }
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
12-09-2004 08:39
Argh. Ok, now... see, this is what I get for not being able to test the code before releasing it. Ugly, bad code. Ok, instead of replacing the lines like you did there, simply replace listen(0,"","",""); with llListen(0,"","",""); . I forgot the "ll" in front of the function call. Same for the "chatnel" one, 'cept use the variable instead of 0. However, this creates a new problem. Microphone will say what the speaker says if they're within 20m of each other. There's several ways you can fix this... Personally, because I'm both lazy, and tired after a 10 hour graveyard shift of shoving large and heavy objects around, I'm going to do this the kludgy way. Use this in your microphone instead. integer Chatnel = 8888; //The channel you wish your objects to communicate with each other on.
default { state_entry() { llListen(0,"","",""); } listen(integer channel,string name,key id, string message) { if(ZERO_VECTOR != llGetAgentSize(id)) { llSetObjectName(name); llShout(Chatnel,message); llSetObjectName("Microphone"); } } } That code is slightly kludgy, and won't pick up speech if someone speaks in one sim while the microphone is in another, but it's the quickest fix I could think of before passing out. Another solution (that I could help you with, if you want it instead) would be to add in special characters to the object name of the speaker when it speaks, like ()'s around the name or something, and then test to make sure that whatever is speaking DOESN'T have those characters before repeating it out to the microphones.
_____________________
</sarcasm>
|
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
|
12-09-2004 10:08
Thanks, man! I'll owe you one if I can get this to work. 
|
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
|
12-09-2004 21:42
*Edited: Figured it out! My bad - I had accidentally un-checked the running checkbox on the script when I posted the original question. Here is the working code: //begin mic script integer Chatnel = 8888; //The channel you wish your objects to communicate with each other on.
default { state_entry() { llListen(0,"","",""); } listen(integer channel,string name,key id, string message) { if(ZERO_VECTOR != llGetAgentSize(id)) { llSetObjectName(name); llShout(Chatnel,message); llSetObjectName("Microphone"); } } }
//begin speaker script integer Chatnel = 8888; //Must be identical to the Chatnel of the microphone script.
default { state_entry() { llWhisper(0,"Public Address Speaker enabled."); llListen(Chatnel,"","",""); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llSay(0,message); llSetObjectName("Repeater"); } }
Thanks, again, for your help on this!
|
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
|
Question for Moleculor Satyr on Owner Activation
12-10-2004 12:06
Moleculor - Now that I've gotten the base script working, I decided that it would be better to enable a touch_start sub-routine. On touch, the owner could activate or inactivate the speaker/repeater object. I forgot to Email the code to myself (doh). I"m replying from work and don't have game access, but basically what I did is this: Within the default routine, I set up the listeners and variables. I set a default state of "inactive". I then created to state routines, one active and one inactive -- basically, on touch_start, the owner can toggle between the two modes. I moved the Chatnel listen function into the active state routine. On touch, the whisper that precedes the listener displays in chat history, as expected. However, the speaker no longer repeats Chatnel channel messages. I think the code looked something like this (ignore any obvious syntax errors...): state active { llListen(Chatnel,"","",""); llWhisper(0,"Speaker is now active.") touch_start { listen(integer channel,string name,key id, string message) { <insert conditional logic for if key owner == id -- don't remember specifics off hand...> llSetObjectName(name); llSay(0,message); llSetObjectName("Repeater"); } } }
Anyway, doesn't seem to listen correctly when inside of the active state. The script compiles and the llWhisper command works, but no repeater functionality. Any suggestions?
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
12-10-2004 14:26
I can't debug that. It's got syntax errors in so many places, I'll just start from scratch. I personally don't use states much, but... //begin mic script integer Chatnel = 8888; //The channel you wish your objects to communicate with each other on. integer listenkey;
default { touch_start(integer num_detected) { state active; } }
state active { state_entry() { listenkey = llListen(0,"","",""); } listen(integer channel,string name,key id, string message) { if(ZERO_VECTOR != llGetAgentSize(id)) { llSetObjectName(name); llShout(Chatnel,message); llSetObjectName("Microphone"); } } touch_start(integer num_detected) { llListenRemove(listenkey); state default; } } //begin speaker script integer Chatnel = 8888; //Must be identical to the Chatnel of the microphone script. integer listenkey;
default { touch_start(integer num_detected) { state active; } }
state active { state_entry() { llWhisper(0,"Public Address Speaker enabled."); listenkey = llListen(Chatnel,"","",""); } listen(integer channel,string name,key id, string message) { llSetObjectName(name); llSay(0,message); llSetObjectName("Repeater"); } touch_start(integer num_detected) { llListenRemove(listenkey); state default; } }
_____________________
</sarcasm>
|