-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
I’m trying to integrate Tone.PitchShift
with an HTML <video>
element in my project, but the pitch shifting functionality isn’t working as expected. Here’s a summary of my setup and the issue:
Setup:
- Tone.js Version: v14.7.39
- Browser: Safari
- Code Snippet:
constructor() {
this.player = new CustomPlayer();
}
setupPitchShift = () => {
this.pitchShift = new Tone.PitchShift().toDestination();
const mediaSource = Tone.context.createMediaElementSource(
this.player.container
);
Tone.connect(mediaSource, this.pitchShift);
};
Issue:
- The video plays, but the pitch shifting does not apply to the audio.
Steps to Reproduce:
- Initialize a
Tone.PitchShift
node. - Connect an HTML
<video>
element as the audio source. - Attempt to modify the pitch using
pitchShift.pitch
.
Questions:
- Is there a specific configuration or connection order required for
MediaElementSource
andPitchShift
? - Are there any known limitations with using
PitchShift
on<video>
elements?
Any guidance would be greatly appreciated.
Best regards