New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio does not take the time multiplier into account. #669

Open
jojolepro opened this Issue Apr 25, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@jojolepro
Collaborator

jojolepro commented Apr 25, 2018

The audio system should change the audio playing speed of rodio depending on the time scale in the Time resource.
It should be configurable (disable/enable time scaling on a per sink basis)

@Xaeroxe

This comment has been minimized.

Show comment
Hide comment
@Xaeroxe

Xaeroxe Apr 25, 2018

Member

This feature would likely result in hilarious "chipmunk" sfx.

So of course I'm all for it :P

Member

Xaeroxe commented Apr 25, 2018

This feature would likely result in hilarious "chipmunk" sfx.

So of course I'm all for it :P

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 25, 2018

Collaborator

You could create a pink unicorn sound and make the pitch awfully low when they attack you :P

Collaborator

jojolepro commented Apr 25, 2018

You could create a pink unicorn sound and make the pitch awfully low when they attack you :P

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 30, 2018

Member

Time scale != pitch, but would be hilarious anyways :P

Member

Rhuagh commented Apr 30, 2018

Time scale != pitch, but would be hilarious anyways :P

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 30, 2018

Collaborator

Actually yes because you are effectively changing the frequency of the sound by accelerating it.

Collaborator

jojolepro commented Apr 30, 2018

Actually yes because you are effectively changing the frequency of the sound by accelerating it.

@Xaeroxe

This comment has been minimized.

Show comment
Hide comment
@Xaeroxe

Xaeroxe Apr 30, 2018

Member

@Rhuagh Time scale can be adjusted independent of pitch, but it requires a more advanced analysis of the sound samples to preserve the wavelengths produced. You can't just haphazardly omit samples every X samples, you have to actually analyze the waves produced.

Member

Xaeroxe commented Apr 30, 2018

@Rhuagh Time scale can be adjusted independent of pitch, but it requires a more advanced analysis of the sound samples to preserve the wavelengths produced. You can't just haphazardly omit samples every X samples, you have to actually analyze the waves produced.

@OvermindDL1

This comment has been minimized.

Show comment
Hide comment
@OvermindDL1

OvermindDL1 May 1, 2018

Technically the pitch should be adjusted with the time, that is how it works in the real world after all. ^.^

Technically the pitch should be adjusted with the time, that is how it works in the real world after all. ^.^

@magnonellie

This comment has been minimized.

Show comment
Hide comment
@magnonellie

magnonellie Jul 5, 2018

Contributor

So I was thinking of taking this one but I noticed that Output doesn't actually have access to the time scale. Should the different functions take a time_scale: Option<f32> parameter or something like that?

Contributor

magnonellie commented Jul 5, 2018

So I was thinking of taking this one but I noticed that Output doesn't actually have access to the time scale. Should the different functions take a time_scale: Option<f32> parameter or something like that?

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Jul 5, 2018

Collaborator

https://github.com/amethyst/amethyst/blob/develop/amethyst_audio/src/systems/audio.rs. you can add time to this system and then do the things you need to do so that the audio frames are played faster or slower. Either make it actually play faster, or compress the frames.

Collaborator

jojolepro commented Jul 5, 2018

https://github.com/amethyst/amethyst/blob/develop/amethyst_audio/src/systems/audio.rs. you can add time to this system and then do the things you need to do so that the audio frames are played faster or slower. Either make it actually play faster, or compress the frames.

@Xaeroxe

This comment has been minimized.

Show comment
Hide comment
@Xaeroxe

Xaeroxe Jul 5, 2018

Member

This is actually a rather complex issue involving multi-threaded communication channels so I'm removing the good first issue recommendation.

Member

Xaeroxe commented Jul 5, 2018

This is actually a rather complex issue involving multi-threaded communication channels so I'm removing the good first issue recommendation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment