extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[IDEA] Sound effects extension

Open Meehdrescher opened this issue 1 year ago • 20 comments

When trying to create some more realistic soundscapes, like the sound of a sports car doing a pull in a tunnel, I'd want to use certain effects to achieve it like a low pass filter and reverb, but these are obviously absent from Scratch. Such an extension could made achieved with a web api library like this one: https://alemangui.github.io/pizzicato/ I am not skilled at making Turbowarp extensions whatsoever, but it might be worth looking into.

Meehdrescher avatar May 04 '24 13:05 Meehdrescher

Sounds like a cool idea, also, the ID number is the amount of minutes in a day!

mcnole25 avatar May 19 '24 22:05 mcnole25

this is cool

AshimeeAlt avatar May 19 '24 23:05 AshimeeAlt

Working on it 🥱

SharkPool-SP avatar May 21 '24 16:05 SharkPool-SP

Looks like SharkPool is already done with the extension, am therefore closing this issue

Meehdrescher avatar May 25 '24 18:05 Meehdrescher

Looks like SharkPool is already done with the extension, am therefore closing this issue

Oh you saw? 👀

SharkPool-SP avatar May 25 '24 18:05 SharkPool-SP

Looks like SharkPool is already done with the extension, am therefore closing this issue

Oh you saw? 👀

I check the extension gallery every other day so I saw the TuneShark legacy update before you released TuneShark V3 lol

Meehdrescher avatar May 25 '24 19:05 Meehdrescher

Looks like SharkPool is already done with the extension, am therefore closing this issue

Oh you saw? 👀

I check the extension gallery every other day so I saw the TuneShark legacy update before you released TuneShark V3 lol

Lmao, well it's out! I'm gonna pr v3 to turbowarp too after I fix some minor bugs

SharkPool-SP avatar May 25 '24 20:05 SharkPool-SP

Lmao, well it's out! I'm gonna pr v3 to turbowarp too after I fix some minor bugs

One thing I'd suggest is a different method of pitching sounds up and down. I am used to systems like the Unity engine where the base pitch is 1, half speed and pitch is 0.5 and double speed and pitch is 2 instead of scratch where the pitch is... weird to say the least, like +100 pitch is double and -100 is half pitch. Is it possible to implement that? I wouldn't have to create overly complex calculations just to achieve the same effect.

Meehdrescher avatar May 25 '24 22:05 Meehdrescher

Lmao, well it's out! I'm gonna pr v3 to turbowarp too after I fix some minor bugs

One thing I'd suggest is a different method of pitching sounds up and down. I am used to systems like the Unity engine where the base pitch is 1, half speed and pitch is 0.5 and double speed and pitch is 2 instead of scratch where the pitch is... weird to say the least, like +100 pitch is double and -100 is half pitch. Is it possible to implement that? I wouldn't have to create overly complex calculations just to achieve the same effect.

It was like that in Tune Shark V2, but its changed to match scratches system. If you really want to you can make an equation do it for you

SharkPool-SP avatar May 25 '24 22:05 SharkPool-SP

It was like that in Tune Shark V2, but its changed to match scratches system. If you really want to you can make an equation do it for you

What would that look like? I've tried to make one myself but I can't figure it out because I'm not even sure if 100 is actually the correct value for pitching a sound up an octave (aka double pitch)

Meehdrescher avatar May 25 '24 22:05 Meehdrescher

It was like that in Tune Shark V2, but its changed to match scratches system. If you really want to you can make an equation do it for you

What would that look like? I've tried to make one myself but I can't figure it out because I'm not even sure if 100 is actually the correct value for pitching a sound up an octave (aka double pitch)

100 is 2x pitch.

Equation would be: ((input - 1) * 100)

SharkPool-SP avatar May 25 '24 22:05 SharkPool-SP

Equation would be: ((input - 1) * 100)

That only works if the pitch I want to achieve is greater than 1. If I try to go down in pitch, it gets much worse. For 0.25, the equation would return -75, but it should return -200. For 0.5, it would return -50 instead of -100. I tried some approaches to solve this (will be using x as a substitute for the pitch): -100/x - returns -400 for 0.25, -200 for 0.5, and -100 for 1 Derived from that approach, I tried: (-100/x)+100 - returns 0 for 1 and -100 for 0.5, but -300 for 0.25 It just doesn't work, and I'd be aiming for a derivable function (where the "incline" of the function doesn't snap to a different value) and that appears to be impossible even with a function that is effectively 3 different functions defined for 3 different intervals.

Meehdrescher avatar May 25 '24 23:05 Meehdrescher

Equation would be: ((input - 1) * 100)

That only works if the pitch I want to achieve is greater than 1. If I try to go down in pitch, it gets much worse. For 0.25, the equation would return -75, but it should return -200. For 0.5, it would return -50 instead of -100. I tried some approaches to solve this (will be using x as a substitute for the pitch): -100/x - returns -400 for 0.25, -200 for 0.5, and -100 for 1 Derived from that approach, I tried: (-100/x)+100 - returns 0 for 1 and -100 for 0.5, but -300 for 0.25 It just doesn't work, and I'd be aiming for a derivable function (where the "incline" of the function doesn't snap to a different value) and that appears to be impossible even with a function that is effectively 3 different functions defined for 3 different intervals.

that would be correct though. In the Tune Shark 3 code (and scratch) thats equation (but reversed) is how it determines pitch

SharkPool-SP avatar May 25 '24 23:05 SharkPool-SP

It hasn't been merged so leave this open

GarboMuffin avatar May 26 '24 04:05 GarboMuffin

that would be correct though. In the Tune Shark 3 code (and scratch) thats equation (but reversed) is how it determines pitch

I just experimented around a bit and found out that your extension handles pitch different to the method Scratch uses and the equation does in fact work, and I just made an fmod-like sound system for engine sounds with this, please excuse my stupidity

Meehdrescher avatar May 27 '24 13:05 Meehdrescher

that would be correct though. In the Tune Shark 3 code (and scratch) thats equation (but reversed) is how it determines pitch

I just experimented around a bit and found out that your extension handles pitch different to the method Scratch uses and the equation does in fact work, and I just made an fmod-like sound system for engine sounds with this, please excuse my stupidity

What? What's different between scratch's pitch and mine??

SharkPool-SP avatar May 27 '24 14:05 SharkPool-SP

What? What's different between scratch's pitch and mine??

With your extension, setting the pitch to -100 is sufficient for effectively pausing the sound. The vanilla Scratch is weird so -100 would be one octave lower than standard pitch and pausing the sound requires a pitch of negative infinity lol, but please keep it like this, it makes things so much easier

Meehdrescher avatar May 27 '24 14:05 Meehdrescher

What? What's different between scratch's pitch and mine??

With your extension, setting the pitch to -100 is sufficient for effectively pausing the sound.

The vanilla Scratch is weird so -100 would be one octave lower than standard pitch and pausing the sound requires a pitch of negative infinity lol, but please keep it like this, it makes things so much easier

Oh ok 👍

SharkPool-SP avatar May 27 '24 14:05 SharkPool-SP

After some more experimenting, I have come to the conclusion that this extension is overpowered, thank you SharkPool for making this possible... :D sound demos.zip

Meehdrescher avatar May 28 '24 12:05 Meehdrescher

After some more experimenting, I have come to the conclusion that this extension is overpowered, thank you SharkPool for making this possible... :D

sound demos.zip

Thanks! :D

SharkPool-SP avatar May 28 '24 13:05 SharkPool-SP