Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Music Archanoxs_Free_Music_Script  

Archanoxs_Free_Music_Script

Archanox's Free Music Script.lsl

Category: Music
By : Archanox Underthorn
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Archanoxs_Free_Music_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Archanoxs_Free_Music_Script_1.lsl
1
2 //----------------------------------
3 //I am freely distributing this script with only three conditions:
4 //1: Please do not change the name of the script
5 //2: Please do NOT try to sell this script individually(with music is OK)
6 //3: If you modify my script(within reason), please distribute it freely as well
7 //
8 //Just doing my part to improve SL's music community
9 //Archanox Underthorn
10 //-----------------------------------
11
12 string stringnum(integer number, integer digits)
13 {
14 string curstring = (string)number;
15
16 while(llStringLength(curstring) < digits)
17 {
18 curstring = "0" + curstring;
19 }
20
21 return curstring;
22 }
23
24
25 default
26 {
27 touch_start(integer total_number)
28 {
29
30
31 //----------------------------
32 //You only need to setup these 7 variables
33
34 //------------
35 //firstsongname is the text that comes before the file number and secondsongname is what comes after it
36 //put "" if either of them need to be blank
37 //REMEMBER to include .wav if its there
38 //i.e.- in Gorillaz001.wav:
39 //firstsongname is "Gorillaz" - secondsongname is ".wav"
40 //-------------
41 string firstsongname = "";
42 string secondsongname = " - Nine Inch Nails - Closer.wav";
43
44 //only change curfile if you want the song to start off on a specific file
45 integer curfile = 1;
46
47 //digits tells the script how many digit places the file numbering is
48 //i.e.- Gorillaz001.wav : there are 3 digits
49 integer digits = 2;
50
51 integer totalfiles = 38;
52 float volume = 2;
53
54 //---------------------------
55
56
58 llPreloadSound(firstsongname + stringnum(1,digits) + secondsongname);
59 llPreloadSound(firstsongname + stringnum(2,digits) + secondsongname);
60 llSleep(10);
61
62 integer preloadfile = 3;
63
64 while(curfile <= totalfiles)
65 {
66 llPlaySound(firstsongname + stringnum(curfile,digits) + secondsongname, volume);
67 if(preloadfile <= totalfiles)
68 {
69 llPreloadSound(firstsongname + stringnum(preloadfile,digits) + secondsongname);
70 }
71 llSleep(9.7);
72 curfile += 1;
73 preloadfile += 1;
74 }
75 }
76
77 on_rez(integer param)
78 {
80 }
81 }
82 // END //

Back to the Best Free Tools in Second Life and OpenSim.