Skip to content
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

Slide sound effect only works once #520

Closed
fgallaire opened this issue Feb 16, 2024 · 4 comments
Closed

Slide sound effect only works once #520

fgallaire opened this issue Feb 16, 2024 · 4 comments

Comments

@fgallaire
Copy link
Contributor

fgallaire commented Feb 16, 2024

pyxel.sounds[0].set("e2", "p", "3", "s", 20)
pyxel.play(0, pyxel.sounds[0])
pyxel.play(0, pyxel.sounds[0])

The sound is played "Slide" only once then is played "None".

@fgallaire
Copy link
Contributor Author

fgallaire commented Feb 16, 2024

When playing an other sound with "Slide" effect it doesn't work neither. Only changing the channel makes the "Slide" effect works once again.

@kitao
Copy link
Owner

kitao commented Mar 17, 2024

The effect of the slide effect is to smoothly connect the sound that was played before with the next sound. Therefore, the effect will not occur unless two pitches are played. (Since there is no previous sound on the first time, it will slide from the lowest pitch.)

@fgallaire
Copy link
Contributor Author

Thanks for the explanation. As it's not obvious, maybe something to add in the documentation ?

@kitao
Copy link
Owner

kitao commented Mar 22, 2024

In the latest Pyxel, the slide effect works only for the second and later notes now.
I'll think about modifying documents when I remake the official API reference (it's the next major change in Pyxel 2.x)

@kitao kitao closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants