Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

[ENHANCEMENT] Chart Editor - Random sound pitch

Open Lasercar opened this issue 9 months ago • 18 comments

Does this PR close any issues? If so, link them below.

Closes #2435

Briefly describe the issue(s) fixed.

Random sound pitch for the chart editor sfxs so that you don't go crazy hearing the exact same funkin click sound over and over and over and over.................

Randomly pitches the click and stretch sfxs by 0.2, and note lay, note erase, undo, hitsounds and window sfxs by 0.1. The note lay sound played for dragging notes only has a 0.05 variation.

Also adds an option to play hitsounds at a different pitch for each note direction: Left: 0.75 Down: 0.65 Up: 1 Right: 0.85

Lemme know if I should change the pitches above to something different! For example, maybe I should instead set them to: Left: 0.95 Down: 0.8 Up: 1.25 Right: 1.1

Requires this https://github.com/FunkinCrew/funkin.assets/pull/137 assets PR.

Include any relevant screenshots or videos.

first version/video

https://github.com/user-attachments/assets/2b39cb22-32f8-49eb-85fb-a343e8638f37

https://github.com/user-attachments/assets/96ac7179-cf10-4387-8fba-4936716007b4

Hitsounds pitch variation:

https://github.com/user-attachments/assets/5f70cd39-0caf-4f95-94ac-e700deed05d3

Hitsounds pitch variation + note direction pitch:

https://github.com/user-attachments/assets/6b2c6fd5-8c61-406c-8a49-42e19a1d7812

Lasercar avatar Mar 01 '25 05:03 Lasercar

Nice! Will this be an option? (For example, in the Audio section of the Chart Editor).

What? Uhh, no? Would you actually prefer to choose whether or not you hear the exact same click sound every time... ?

Lasercar avatar Mar 01 '25 06:03 Lasercar

I can't really hear it for video one but the effect on video 2 is pretty neat! Will ask what the rest of the team thinks

EliteMasterEric avatar Mar 01 '25 07:03 EliteMasterEric

I can't really hear it for video one but the effect on video 2 is pretty neat! Will ask what the rest of the team thinks

Cool, thankyou! I was pleasantly surprised by how a little variation went to making it sound much better (now it's as if someone is playing the drums). I was originally wasn't going to touch them.

It was only after I recorded that first video that I realised that I didn't change the pitch of the sounds played by the chart editor command classes. Though once I added a 0.2 variation to them and recorded a video it was clear that it wouldn't quite work out. Maybe I should try again with half that (0.1)?

Update: After changing the command sounds to a variation of 0.1 and getting a video and asking for feedback - it sounds much better - I'm going to return the changes above with that value.

That said though, I've set the drag note lay sound to 0.05, as that's being played nearly every frame and that extra 5% variation could be too noticeable and distracting.

I've updated the first video with the one I used to get feedback for, if you want to check it out (also, I ran it through an encoder if you're wondering why the sound has that ring in part of it).

Lasercar avatar Mar 01 '25 09:03 Lasercar

Nice! Will this be an option? (For example, in the Audio section of the Chart Editor).

What? Uhh, no? Would you actually prefer to choose whether or not you hear the exact same click sound every time... ?

Yeah… (just kidding) but I feel like it would give the chart editor more customization.

JVNpixels avatar Mar 01 '25 16:03 JVNpixels

maybe the hit sounds should not be random! you could set them a certain pitch! in an editor i made i made it like this

left -0.5 down -1 up 1 right 0.5

amyspark-ng avatar Mar 02 '25 23:03 amyspark-ng

Nice! Will this be an option? (For example, in the Audio section of the Chart Editor).

What? Uhh, no? Would you actually prefer to choose whether or not you hear the exact same click sound every time... ?

i would !! even tho this feature is cool id prefer consistent sounds when charting it could just be a little checkbox in the audio panel or something

cyn0x8 avatar Mar 04 '25 00:03 cyn0x8

i would !! even tho this feature is cool id prefer consistent sounds when charting it could just be a little checkbox in the audio panel or something

Alright, I'll do both of these then.

Just note that it'll mean that it won't be getting merged anytime soon, because it requires assets stuff.

Lasercar avatar Mar 04 '25 09:03 Lasercar

i would !! even tho this feature is cool id prefer consistent sounds when charting it could just be a little checkbox in the audio panel or something

Alright, I'll do both of these then.

Just note that it'll mean that it won't be getting merged anytime soon, because it requires assets stuff.

PRs that modify assets can still be merged (#3028), I think it's just asset-only PRs that aren't being merged right now. (Side note I literally posted this in the wrong PR (#4148) and didn't even notice lol)

AbnormalPoof avatar Mar 04 '25 09:03 AbnormalPoof

PRs that modify assets can still be merged (#3028), I think it's just asset-only PRs that aren't being merged right now.

Oh, hmm, that's nice to know. I guess I'm holding back on editing the assets for code PRs for nothing!

But still, I'd have to comment out the UI variables so that it doesn't crash when it tries to access them.

Lasercar avatar Mar 04 '25 09:03 Lasercar

maybe the hit sounds should not be random! you could set them a certain pitch! in an editor i made i made it like this

left -0.5 down -1 up 1 right 0.5

@amyspark-ng I've just tried doing this and it doesn't quite work properly? The sounds don't play in reverse with a reverse pitch?

Ok, that's weird, they do, only after you unfocus and then focus the window again, lol:

https://github.com/user-attachments/assets/9edfa9b5-2d8e-46be-8937-b7af1d6eb93c

And this doesn't happen once, it'll do this as long as the sound still exists too, and after a while of continuing to play the song, the hitsounds just stop entirely (though that'll probably be fixed once the sounds play and delete themselves properly with negative pitches).

~~Idk how to fix this.~~

I've chosen to simply make them all positive, it's a thing with the sound library used and can't really be changed.

Lasercar avatar Mar 04 '25 11:03 Lasercar

oh well i hasn't thought that maybe haxe handles it in a different way! in the game engine i use pitch is handled with detune so it's different

i simply meant it in a way that down would be the lowest pitch, up the highest and left the middle way to the lowest and right the middle way to the highest

amyspark-ng avatar Mar 04 '25 14:03 amyspark-ng

oh well i hasn't thought that maybe haxe handles it in a different way! in the game engine i use pitch is handled with detune so it's different

i simply meant it in a way that down would be the lowest pitch, up the highest and left the middle way to the lowest and right the middle way to the highest

Ah, hmm. If a fix for this can't be worked out then I'll change the pitches to that. It wouldn't be an optimal change though, as the down note hitsound would last for a little too long and it'd be very noticeable on a series of down notes without steps in-between.

Lasercar avatar Mar 05 '25 12:03 Lasercar

why would the down note hitsound be longer than the rest how is pitch related to speed

amyspark-ng avatar Mar 05 '25 15:03 amyspark-ng

Changing the pitch property in FlxSound/FunkinSound affects speed as well. The lower the pitch the slower it is and vice versa.

AbnormalPoof avatar Mar 05 '25 15:03 AbnormalPoof

ohhhh i get that then, but it's not possible to change pitch withoout changing the speed? that's kinda weird

amyspark-ng avatar Mar 05 '25 15:03 amyspark-ng

Nice! Will this be an option? (For example, in the Audio section of the Chart Editor).

What? Uhh, no? Would you actually prefer to choose whether or not you hear the exact same click sound every time... ?

Yes, actually; I think it's cool to have that as a choice, but I would much rather have my chart editor sounds be consistent rather than random. Like, I might enjoy different hit sounds for each note direction, seeing as it is still consistent to each note, but I wouldn't want variance, it would throw me off, so having all of these being options would be very good.

Average-FNF-Modder avatar Apr 08 '25 16:04 Average-FNF-Modder

I think that's fair, notes having different pitches but the rest having the same pitch

amyspark-ng avatar Apr 08 '25 16:04 amyspark-ng

Nice! Will this be an option? (For example, in the Audio section of the Chart Editor).

What? Uhh, no? Would you actually prefer to choose whether or not you hear the exact same click sound every time... ?

Yes, actually; I think it's cool to have that as a choice, but I would much rather have my chart editor sounds be consistent rather than random. Like, I might enjoy different hit sounds for each note direction, seeing as it is still consistent to each note, but I wouldn't want variance, it would throw me off, so having all of these being options would be very good.

Yes, I added options for both a month ago...

Lasercar avatar Apr 08 '25 18:04 Lasercar