Discuss Scratch

PoIygon
Scratcher
1000+ posts

Longer Sounds

MDCCCLXVII wrote:

jvt_cappi wrote:

i would like to add my music but it would not allow because of it is 2 minute long if scratch would pls make the time longer that would be appreciated.


Sicerly, jvt_cappi
so that means support
yes
GoogleInScratch
Scratcher
1000+ posts

Longer Sounds

No support, this would break Scratch

Or they should make the sound be no more than 5 minutes.
Flowermanvista
Scratcher
1000+ posts

Longer Sounds

There's a lot of outdated or incorrect information in this thread (especially in the older posts), so I'll clarify:

The sounds that you can and cannot import into Scratch has nothing to do with how long it is and everything to do with how large it is - specifically, sounds cannot be over 10 MB (10,000,000 bytes) in size. For example, this means that about 1 minute of CD-quality WAV audio, 2 minutes of mono 16bit/44.1kHz WAV audio, or about 5 minutes of 256 kbps MP3 audio can all be imported.

In addition, Scratch does not apply any compression or format conversion of any type on imported audio, as long as you do not edit the sound - this means that the sound in the project is exactly the same (and takes up the same amount of space) as the sound you imported. If you do edit the sound, it will be converted to a mono WAV file, if it isn't already. This will increase the size of sounds that were originally MP3s, but will decrease the size of what was originally a CD-quality WAV file. (It's worth noting that if the edited file would exceed the 10 MB limit, the edit will fail.)

Take this information into consideration before you say anything for or against this suggestion.

As for the suggestion itself, I'm not sure if I could support this. Unlike project.json (which I could potentially support increasing the limit on), sound files (particularly MP3s) are far less compressible* and tend to take up much more space than a project.json file. In addition, projects that have a large amount of music are far more common than projects that come up against the project.json limit.

*I have no idea if projects are stored compressed on the servers, but if they are, then that makes me even less likely to support this in comparision with increasing the limit on project.json.
lifeloop
Scratcher
1 post

Longer Sounds

None of these help
bignatefranko
Scratcher
5 posts

Longer Sounds

-SystemError- wrote:

PrincessFlowerTV wrote:

No support.
The reason that sounds can't be super long is because people could make Scratch record sounds, then leave the tab open and leave the computer.
Not only will this possibly crash the server, but it's just ridiculous to have a eight-hour sound.

This suggestion probably stems from Scratch's intolerance of audio longer than 2 minutes. I think that maybe 2-4 minutes is a reasonable length for a piece of audio, but most of the time audio longer than 2 minutes stops Scratch from saving. It doesn't necessarily mean that the OP wants 8-hour audio (but I do I agree that we don't need 8-hour audio).
I agree with them but we need at least 10 minute sounds so I think the scratch team should add up to that because then we have to cut it and make a new sound play .1 seconds after it and

VFDan wrote:

-SystemError- wrote:

PrincessFlowerTV wrote:

No support.
The reason that sounds can't be super long is because people could make Scratch record sounds, then leave the tab open and leave the computer.
Not only will this possibly crash the server, but it's just ridiculous to have a eight-hour sound.

This suggestion probably stems from Scratch's intolerance of audio longer than 2 minutes. I think that maybe 2-4 minutes is a reasonable length for a piece of audio, but most of the time audio longer than 2 minutes stops Scratch from saving. It doesn't necessarily mean that the OP wants 8-hour audio (but I do I agree that we don't need 8-hour audio).

I've used audio longer than 2 minutes, and it saves for me.
How is this possible???
bignatefranko
Scratcher
5 posts

Longer Sounds

Flowermanvista wrote:

There's a lot of outdated or incorrect information in this thread (especially in the older posts), so I'll clarify:

The sounds that you can and cannot import into Scratch has nothing to do with how long it is and everything to do with how large it is - specifically, sounds cannot be over 10 MB (10,000,000 bytes) in size. For example, this means that about 1 minute of CD-quality WAV audio, 2 minutes of mono 16bit/44.1kHz WAV audio, or about 5 minutes of 256 kbps MP3 audio can all be imported.

In addition, Scratch does not apply any compression or format conversion of any type on imported audio, as long as you do not edit the sound - this means that the sound in the project is exactly the same (and takes up the same amount of space) as the sound you imported. If you do edit the sound, it will be converted to a mono WAV file, if it isn't already. This will increase the size of sounds that were originally MP3s, but will decrease the size of what was originally a CD-quality WAV file. (It's worth noting that if the edited file would exceed the 10 MB limit, the edit will fail.)

Take this information into consideration before you say anything for or against this suggestion.

As for the suggestion itself, I'm not sure if I could support this. Unlike project.json (which I could potentially support increasing the limit on), sound files (particularly MP3s) are far less compressible* and tend to take up much more space than a project.json file. In addition, projects that have a large amount of music are far more common than projects that come up against the project.json limit.

*I have no idea if projects are stored compressed on the servers, but if they are, then that makes me even less likely to support this in comparision with increasing the limit on project.json.
I did what you said and it is 2021 and I cannot do it.
DJUmbreon2
Scratcher
100+ posts

Longer Sounds

-SystemError- wrote:

PrincessFlowerTV wrote:

No support.
The reason that sounds can't be super long is because people could make Scratch record sounds, then leave the tab open and leave the computer.
Not only will this possibly crash the server, but it's just ridiculous to have a eight-hour sound.

This suggestion probably stems from Scratch's intolerance of audio longer than 2 minutes. I think that maybe 2-4 minutes is a reasonable length for a piece of audio, but most of the time audio longer than 2 minutes stops Scratch from saving. It doesn't necessarily mean that the OP wants 8-hour audio (but I do I agree that we don't need 8-hour audio).
I know, this is why my songs are less than 170 seconds aka 2 min 50 secs
dhuls
Scratcher
1000+ posts

Longer Sounds

bignatefranko wrote:

VFDan wrote:

I've used audio longer than 2 minutes, and it saves for me.
How is this possible???
Sound length doesn't matter. What matters is file size. If a sound is greater than 10MB in size, the project won't save and the backpack won't work if you try to backpack it. This issue mostly stems from the use of the uncompressed .WAV file instead of the lossy .MP3 file. WAV files are around 10MB per minute, while MP3's are around 1MB per minute. When editing a sound in Scratch, if it's an MP3 it will be converted to WAV (although, according to @Flowermanvista, if the file size after the edit would be greater than 10MB it will refuse to save the edit) forcing you to use external sound editors. No support for increasing the size limit as sound files can't be compressed easily. I would rather have Scratch use MP3 instead of WAV (or allow FLAC support and use that as the default as it has lossless compression)
raidoes-4
New Scratcher
1 post

Longer Sounds

I want to put in ultra instinct theme song but can only put a little bit of it.Can you please let us put longer sounds. :^
SamriddhoTitanic
Scratcher
1 post

Longer Sounds

I just need 5 minutes sound
6d66yh
Scratcher
100+ posts

Longer Sounds

You could make use of some calculations:

Given the sample rate (for example, 48000Hz), the amount of samples is the amount of seconds multiplied by the sample rate. So for instance, for 300 seconds, a 48000Hz sound would take 14.4 million samples, but using a 32000Hz sample rate makes it 9.6 million samples.

Then there is the amount of bits per sample.
16-bit linear PCM takes 16 bits per sample.
8-bit linear PCM takes 8 bits per sample, however, μ-Law and A-Law also have 8 bits per sample but have higher dynamic range than 8-bit linear.
Then there are ADPCM compression methods: IMA ADPCM takes 4 bits per sample and has been used extensively in Scratch 2.0. There are also more complicated ADPCM compressions like G.726 and G.727, which both give a choice between 2/3/4/5 bits per sample, however, I'm not sure of what their support is like in different environments (especially Scratch 3.0). And forget about MP3 because it is extremely much more complicated and virtually no free environment will be able to parse this format directly anyway.
You have to multiply the bits per sample by the amount of samples, also double it if using stereo sound. That is the total amount of bits in the sound (excluding the headers). Note that 8 bits is 1 byte, so the amount of bits can be divided by 8 to get the amount of bytes. You could then continue on the chain of 1024 bytes = 1 kilobyte, and 1024 kilobytes = 1 megabyte.

Another thing is that you should avoid external user interfaces for audio like Audacity. They don't provide anything useful over creating the sound file format manually. You are better off reading the WAV specification, printing out the bytes in Scratch, then putting it in a hex editor and saving it. Of course, this process becomes more efficient if you use a language that supports direct file output. That's why I have all reason to believe Audacity is completely useless.
scratchering_coder
Scratcher
500+ posts

Longer Sounds

No support, you don't need that block,
you can just make:
when green flag clicked
repeat (A number that makes the song play for 8 hours)
play sound [song v] until done
end
nekl
Scratcher
46 posts

Longer Sounds

Yeah it still breaks scratch.
I'd rather repeat it in a loop

when green flag clicked
forever
play sound [music v] until done
end
anneke5accs
Scratcher
1 post

Longer Sounds

It would be nice if some of the loops on scratch were longer.
Dharmannlover4567428
Scratcher
7 posts

Longer Sounds

pls ScratchTeam i need a 8 minute song a for a meme called kraken music from hotel transylvania 3 for my meme soundboard
PaperMarioFan2022
Scratcher
1000+ posts

Longer Sounds

scratchering_coder wrote:

No support, you don't need that block,
you can just make:
when green flag clicked
repeat (A number that makes the song play for 8 hours)
play sound [song v] until done
end

I don't think that works, so your wrong there.
cs3868895
Scratcher
1000+ posts

Longer Sounds

Dharmannlover4567428 wrote:

pls ScratchTeam i need a 8 minute song a for a meme called kraken music from hotel transylvania 3 for my meme soundboard
no for copyright
Dharmannlover4567428
Scratcher
7 posts

Longer Sounds

cs3868895 wrote:

Dharmannlover4567428 wrote:

pls ScratchTeam i need a 8 minute song a for a meme called kraken music from hotel transylvania 3 for my meme soundboard
no for copyright

sorry ScratchTeam
gdfsgdfsgdfg
Scratcher
1000+ posts

Longer Sounds

Dharmannlover4567428 wrote:

pls ScratchTeam i need a 8 minute song a for a meme called kraken music from hotel transylvania 3 for my meme soundboard


Congrats you revived an old post
PaperMarioFan2022
Scratcher
1000+ posts

Longer Sounds

gdfsgdfsgdfg wrote:

Dharmannlover4567428 wrote:

pls ScratchTeam i need a 8 minute song a for a meme called kraken music from hotel transylvania 3 for my meme soundboard


Congrats you revived an old post

Wow, I didn't even think that would be possible

Powered by DjangoBB