Replies: 3 comments 3 replies
-
Hi, thank you for the suggestion! The suggestion seems good, and we need more discussion.
This should be worth considering. Do you mean changing pitch and speed at the same time? If not, i.e., if you want to change only pitch, this is not a trivial issue. There is an internal resampling implementation: https://github.com/hajimehoshi/ebiten/blob/master/audio/internal/convert/resampling.go but this implementation might be inefficient. There is a tradeoff between quality and efficiency.
There is an example to do that: https://github.com/hajimehoshi/ebiten/blob/master/examples/audiopanning/main.go There are multiple ways to do that, so we would need further discussion (See also #1224)
I think that's a valid option. Fortunately the |
Beta Was this translation helpful? Give feedback.
-
Thanks! How did I miss the panning example... For pitch, I meant just changing the pitch and keeping the speed the same. For example, to support musical instruments in game from one original audio file/sample. |
Beta Was this translation helpful? Give feedback.
-
I see. Then, this is not a trivial issue. Fourier transforming would solve this but I don't know if this is efficient and fast enough for real-time audio. |
Beta Was this translation helpful? Give feedback.
-
👋 Hi there - I was looking into https://github.com/faiface/beep recently, and noticed two features that would be nice to replicate in Ebiten:
Would these be the kinds of features we could support in Ebiten? I thought of moving to use beep but it would require completely moving away from Ebiten audio, I think.
Beta Was this translation helpful? Give feedback.
All reactions