Skip to content

feat: implement granular pitch shifter#729

Draft
ford442 wants to merge 1 commit into
mainfrom
feature/granular-pitch-shifter-3393911044770456537
Draft

feat: implement granular pitch shifter#729
ford442 wants to merge 1 commit into
mainfrom
feature/granular-pitch-shifter-3393911044770456537

Conversation

@ford442
Copy link
Copy Markdown
Owner

@ford442 ford442 commented Jun 7, 2026

This PR implements the Granular Pitch Shifter, fulfilling an idea from the Innovation Lab.

It introduces a new grainPitchShift parameter that operates within the rubberband-processor AudioWorklet. This parameter independently modulates the pitch scale (-36 to +36 semitones) on top of the base pitch tracking, enabling advanced granular smearing and crystalline synthesis effects.

Changes

  • DSP: Calculated and applied pitchMultiplier based on grainPitchShift in the Web Audio worklet.
  • State & Engine: Plumbed the parameter through SamplerBankParams, Note overrides, SingingVoice.ts, and useAudioEngine.ts.
  • UI: Exposed the control via a new Knob in SamplerPanel.tsx and a Slider in NoteSelector.tsx for automation.
  • Maintenance: Added public/*.js, public/*.wasm, src/wasm/ outputs to .gitignore and removed accidentally tracked artifacts to clean up the diff. Updated agent_plan.md to check off the task and add a new architectural goal.

Tests have been updated and are passing.


PR created automatically by Jules for task 3393911044770456537 started by @ford442

- Added `grainPitchShift` parameter (-36 to +36 st) to `SamplerBankParams` and `Note` interfaces.
- Implemented core DSP in `rubberband-processor.ts` to shift pitch independently of tempo tracking via `Math.pow(2.0, grainPitchShift / 12.0)`.
- Updated `SingingVoice.ts` and `useAudioEngine.ts` to push global and per-step automation overrides to the worklet.
- Added UI controls (Knob and Slider) to `SamplerPanel.tsx` and `NoteSelector.tsx`.
- Ignored compiled JS/WASM outputs in .gitignore and cleaned from index.
- Updated `agent_plan.md` to track progress and added new vocoder idea.

Co-authored-by: ford442 <9397845+ford442@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 7, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2689bcf-c55c-4fc0-94f9-7cb86641508b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/granular-pitch-shifter-3393911044770456537

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Successfully merging this pull request may close these issues.

1 participant