Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
140 stars 2 forks source link

PlayOneShot with Pitch change without changing length #3193

Open charlie-sans opened 4 days ago

charlie-sans commented 4 days ago

Is your feature request related to a problem? Please describe.

when playing a one shot using the play one shot node, changing the pitch changes the length of the sample.

Describe the solution you'd like

a play oneshot node that does not warp the sample when changing the pitch.

Describe alternatives you've considered

creating a map of sounds for each of the pitches and switching between them

Additional Context

No response

Requesters

charlie-san

shiftyscales commented 4 days ago

a play oneshot node that does not warp the sample when changing the pitch.

Real-time pitch scaling (and time stretching) would likely be something that could be accomplished implicitly by #567. To accomplish either of these (changing the pitch without changing the tempo, or changing the tempo without changing the pitch) we would need to resample / filter / interpolate the audio clips.

However, separately- we could possibly include additional processing options on the audio clip alongside the options to trim them so that users can create new variants of the asset on-platform, similar to how we have various ways to process texture assets. This would be a nice additional option in the long term to give users more flexibility to manipulate their audio assets on-platform without resorting to additional third-party software.

creating a map of sounds for each of the pitches and switching between them

For now, if you need to do audio processing- I would recommend using dedicated software like Audacity to bake additional clips at your desired pitch / tempo.

Frooxius commented 3 days ago

Pitch scaling / stretching won't be implicitly handled by #567 - it's a filter that we'll need to implement/integrate.

What we really need first is actually have this filter implemented before we can add feature like this, that will open doors to using it in various ways.

@BlueCyro would you be able to check if SoundPipe actually has one? We don't have to prioritize the integration right now, but it would be helpful to know if there's one present.