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

Sound pitch #2727

Closed
KenneyNL opened this Issue May 27, 2015 · 7 comments

Comments

Projects
None yet
9 participants
@KenneyNL

KenneyNL commented May 27, 2015

Similar to how Minecraft makes 'random' sounds by slightly changing the pitch of the sounds played, could be added to the SoundParameters property. This would eliminate a lot of sounds, thus file size.

minetest.sound_play("testmod_foobar", {
    to_player = "foo",
    gain = 2.0,
    pitch = math.random(-1, 1),
})

Previous discussion:
https://forum.minetest.net/viewtopic.php?f=5&t=11031

@KenneyNL KenneyNL closed this May 27, 2015

@KenneyNL KenneyNL reopened this May 27, 2015

@KenneyNL KenneyNL changed the title from [Request] Sound pitch to [Feature request] Sound pitch May 27, 2015

@KenneyNL KenneyNL changed the title from [Feature request] Sound pitch to Sound pitch May 27, 2015

@celeron55

This comment has been minimized.

Show comment
Hide comment
@celeron55

celeron55 May 31, 2015

Member

This has one important design concern: SimpleSoundSpecs are stored statically in for example node definitions for the footstep sounds. In those cases a simple numeric pitch parameter does not allow making random pitches because the pitch would be the same all the time.

As random pitches are likely needed for footsteps and similarly defined sounds, something like {random_pitch = [0.9, 1.1]} needs to be supported instead or additionally.

OK with a different API.

Member

celeron55 commented May 31, 2015

This has one important design concern: SimpleSoundSpecs are stored statically in for example node definitions for the footstep sounds. In those cases a simple numeric pitch parameter does not allow making random pitches because the pitch would be the same all the time.

As random pitches are likely needed for footsteps and similarly defined sounds, something like {random_pitch = [0.9, 1.1]} needs to be supported instead or additionally.

OK with a different API.

@FreeLikeGNU

This comment has been minimized.

Show comment
Hide comment
@FreeLikeGNU

FreeLikeGNU Sep 6, 2015

It would be nice to set pitch of a sound played through the lua api for doing things like mining punching etc. Sounds can get tedious without this. Is just adding multiple copies of the same sound file at different pitches acceptable?

FreeLikeGNU commented Sep 6, 2015

It would be nice to set pitch of a sound played through the lua api for doing things like mining punching etc. Sounds can get tedious without this. Is just adding multiple copies of the same sound file at different pitches acceptable?

@HybridDog

This comment has been minimized.

Show comment
Hide comment
@HybridDog

HybridDog Sep 7, 2015

Contributor

There's a minetest.sound_play and minetest.sound_stop function, l don't think adding a minetest.sound_pitch function would be very difficult.

Contributor

HybridDog commented Sep 7, 2015

There's a minetest.sound_play and minetest.sound_stop function, l don't think adding a minetest.sound_pitch function would be very difficult.

@rubenwardy

This comment has been minimized.

Show comment
Hide comment
@rubenwardy

rubenwardy Sep 7, 2015

Member

You have to remember about latency and lag, that's the problem. Sounds and effect would be better managed by client side lua - although that should stop setting the sound_play() pitch.

Member

rubenwardy commented Sep 7, 2015

You have to remember about latency and lag, that's the problem. Sounds and effect would be better managed by client side lua - although that should stop setting the sound_play() pitch.

@HybridDog

This comment has been minimized.

Show comment
Hide comment
@HybridDog

HybridDog Sep 7, 2015

Contributor

you could also add sound modifiers similar to the texture modifiers

Contributor

HybridDog commented Sep 7, 2015

you could also add sound modifiers similar to the texture modifiers

@thePalindrome

This comment has been minimized.

Show comment
Hide comment
@thePalindrome

thePalindrome Apr 15, 2017

Contributor

I'd like to see this happen sometime, it's pretty easy from openal, just using alSourcef(source, AL_PITCH, pitch_variable)

Perhaps we could get this going for 0.4.16?

Contributor

thePalindrome commented Apr 15, 2017

I'd like to see this happen sometime, it's pretty easy from openal, just using alSourcef(source, AL_PITCH, pitch_variable)

Perhaps we could get this going for 0.4.16?

@Rui-Minetest

This comment has been minimized.

Show comment
Hide comment
@Rui-Minetest
Contributor

Rui-Minetest commented Jun 11, 2017

ff73c7a

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