Sounds longer than 10 seconds?

Creating sounds and music
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Sounds longer than 10 seconds?

Post by Constance Peregrine »

Yes!

I just discovered that I can now upload sounds longer than 10 seconds!

In a discussion in another place someone mentioned that the Meerkat viewer could upload longer sound files. Here that is, choose your own flavor but I used "Meerkat_0-2-2-211_Setup.exe"

https://code.google.com/archive/p/meerk ... /downloads

I got some long files from https://www.freesound.org/people/Dstruct/sounds/88522/ (that is one file I used to test it)

Used http://www.audacityteam.org/ to change the project rate (bottom left side of the program) to "44100".

I then exported it as a type ".wav microsoft signed 16 bit pcm"

Then started Meerkat in my own simonastick, it worked there, so then on Kitely. I uploaded it and it played. I then put it in a prim with a touch to start sound script and it played there as well.

I can imagine quite a few ways I can use this. I don't yet know how long the file can be, perhaps someone may test that, the one on freesound is almost 1 minute long.

Have fun and let me know how it goes for you also, if you wish-)
These users thanked the author Constance Peregrine for the post (total 2):
Dot MatrixSelby Evans
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Selby Evans
Posts: 591
Joined: Wed Sep 04, 2013 6:00 pm
Has thanked: 1631 times
Been thanked: 751 times

Re: Sounds longer than 10 seconds?

Post by Selby Evans »

Thanks, Constance. May I pick this up for my blog as an invited article?
-- Selby
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

Selby Evans wrote:Thanks, Constance. May I pick this up for my blog as an invited article?
-- Selby
yes-)
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Selby Evans
Posts: 591
Joined: Wed Sep 04, 2013 6:00 pm
Has thanked: 1631 times
Been thanked: 751 times

Re: Sounds longer than 10 seconds?

Post by Selby Evans »

Thanks. I will post in Kitely Forums when it runs
These users thanked the author Selby Evans for the post:
Constance Peregrine
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

ok, in my 1st additional testing while Meerkat can upload and play a 4 minute song, but only a minute of it. Firestorm does not play it at all.

So it appears, so far, 1 minute is the maximum size...still considerably better than 10 seconds.

More tests will follow and hopefully others may do so also and post here.
These users thanked the author Constance Peregrine for the post (total 3):
Dot MatrixSelby EvansMike Lorrey
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

Ok, final testing showed that 2 minute files can be uploaded but still plays only 1 minute in Meerkat.

Does not play at all in firestorm.

Uploaded 1 minute file via Meerkat and it played, switched to firestorm and it played also.

Here is a completed 1 minute file anyone can test with;

https://www.dropbox.com/s/9ejm07d9vka0b ... e.wav?dl=0

testing done but a number of possibilities are now possible using this method.

If anyone tests this please post results here...for example, does it work in singularity.
These users thanked the author Constance Peregrine for the post (total 2):
Selby EvansDot Matrix
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

ok, I found a script that preloads sounds which seems to work pretty nicely.

Code: Select all

// Script Name: Music_Box.lsl
// CATEGORY: Music
// AUTHOR: Ferd Frederix
// COMPATIBILITY: Second Life, Opensim
// Sensor Script - Put this in a prim along with the Music script and as many 60 second or less sound clips as you want.   This will detect any avatar coming nearby and trigger the music from the beginning.   You can leave this script out and just use the music player. Start the music by touching the prim
//////////////////////// ORIGINAL AUTHORS CODE BEGINS ////////////////////////////////////////////
// Music player script.   Can play up to 254 10 second clips in sequence.  Trigger it with a link message, the above sensor script, or touch the prim
// 10-09-2012 by Ferd Frederix
// May be triggered to run continually, start it by touching it or use the sensor script when someone gets nearby.
// This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
// http://creativecommons.org/licenses/by-nc/3.0/deed.en_US
// This script cannot be sold even as part of another object, it must always remain free and fully modifiable.
// Drop 10 second song clips in the inventory of the obect, and touch to play.
// A great free tool to make these files is the slice audio file splitter at http://www.nch.com.au/splitter/index.html
// Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.
// Scriptable Control:
// Send a link message string of 'play' and 'stop' for use with external control scripts.
// Or just touch the prim to play
//modified for 60 second or less sounds when Meerkat viewer uploads them Isolde Caron  3.11.16
//https://code.google.com/archive/p/meerkat-viewer/downloads
integer loop = TRUE;                // set to TRUE to loop again and again
float set_text_alpha = 1;            // the text transparency fo alpha text. Set this to 0 to disable hovertext
// Stuff that you should not mess with:
integer debugflag = FALSE;           // chat debug info to owner if TRUE
integer waves_to_preload = 2;       // wave files to Preload ahead of the wav being played.
float preload_load_time = 0.0;      // seconds pause between each preloaded wave file attempt b4 play commences
integer secret_channel = 54345;     // just a magic number
vector set_text_colour = <1,1,1>;   // colour of floating text label ( white)
float timer_interval = 60.0;         // time interval between requesting server to play the next 60 second wave
// times just below 60 seconds are suitable as we use sound queueing
integer total_wave_files;           // number of wave files
integer i_playcounter;              // used by timer() player
string preloading_wave_name;        // the name of the wave file being preloaded
string playing_wave_name;           // the name of the wave being played
DEBUG (string msg)
{
    if (debugflag) llOwnerSay(msg);
}
go(integer play) {

    if (play)
    {
        sound();
    } else {
        llSetTimerEvent(0.0);
        llStopSound();
    }
}
sound() {
    total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
    integer counter = 0;        //do full preload of sound
    llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
    integer local_total_wave_files = total_wave_files -1 ;
    float length = total_wave_files * 60.0;
    for (counter = 0 ; counter < waves_to_preload ; counter++)  //preload X wave files b4 we play
    {
        //since wavs are numbered from 0 we minus 1
        preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, counter);
        //Attempt to preload first x wave files to local machines cache!
        llPreloadSound(preloading_wave_name);
        llSleep(preload_load_time);
    }
    llSetTimerEvent(0.1);   // start playing
    i_playcounter=0;
    counter=0;
}
default
{
    state_entry()
    {
        //set text above object to the name of the object
        //llSetText(llGetObjectName() + "\n.", <1,0,0>, set_text_alpha);
    }
    touch_start(integer total_number)
    {
                go(TRUE);
    }

    timer()
    {
        llSetTimerEvent(timer_interval);
        if( i_playcounter > (total_wave_files -1) )
        {
            if (!loop)
            {
                llSetTimerEvent(0);
            }
            else
            {
                sound();
            }

        }  else {
                playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
                      llTriggerSound(playing_wave_name, 1.0);
            if(i_playcounter + waves_to_preload <= (total_wave_files -1))
            {
                preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload);
                llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload));
            }
        }
        i_playcounter++;     //increment for next wave file in sequence!
    }
    link_message(integer sender_number, integer number, string message, key id)
    {
        if (message == "play")
        {
            go(TRUE);
        }
        else if (message == "stop")
        {
            go(FALSE);
        }
    }

    on_rez(integer param)
    {
        llResetScript();
    }
}
These users thanked the author Constance Peregrine for the post (total 3):
Dot MatrixGraham MillsSelby Evans
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

On 11 February 2016 I created this blogpage:

http://minethere.blogspot.com/2016/02/o ... ounds.html

due to some conversations on g+ and my own testing. I am using these in my varregion in Metropolis to play songs and it is pretty cool.

I have given most of them to a couple of friends and they love it.

I created a firestorm jira:

http://jira.phoenixviewer.com/browse/FIRE-17812 (using Isolde Caron name) (on 14 February 2016)

in which I added information I found just now at:

https://alchemy.atlassian.net/browse/ALCH-412

Where Cinder Roxley added the code 22 March 2016.

It seems she liked it enough to create the code and I am happy I started the conversation.

Typically I need no approbation but I think in all fairness I should be noted as the one supplying the information and idea. (either Isolde or Minethere)

I just think that would be fun to see-))

However, in any case, it looks like we will all be getting this ability soon and whether or not I am noted I am happy that I helped us all to more fully enjoy our OpenSim experience.

If I am not officially noted please consider this as a historical note.
These users thanked the author Constance Peregrine for the post:
Louis-Francis De_Beauharnois
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
Graham Mills
Posts: 1058
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 677 times
Been thanked: 809 times

Re: Sounds longer than 10 seconds?

Post by Graham Mills »

Many thanks, Constance. I'm sure many educators will find this invaluable.

What I don't "get" is why the limit existed in the first place. I've seen it suggested that it was to discourage copyright violations or to limit memory use and avoid performance hits (and, I guess, possibly griefing) but nothing in any way definitive.
User avatar
Constance Peregrine
Posts: 2328
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2766 times
Been thanked: 1428 times

Re: Sounds longer than 10 seconds?

Post by Constance Peregrine »

Graham Mills wrote:Many thanks, Constance. I'm sure many educators will find this invaluable.

What I don't "get" is why the limit existed in the first place. I've seen it suggested that it was to discourage copyright violations or to limit memory use and avoid performance hits (and, I guess, possibly griefing) but nothing in any way definitive.
Yes, Cinder had commented to me that "they" asked around about this also. As well it was mentioned that in a talk with "Oz" it was mentioned (maybe this was the root of both comments from 2 different people), and he saw no reason for it either.

Cinder did say she capped her code at 60 seconds as it caused issues when longer...some performance issue I don't have a clue about.

It could be just plain old limits put in place in the beginning that no longer applies, also, it seems to me.

I can see many possible uses for sure.
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
Post Reply