Nodes/RyanOnTheInside/Pitch Range By Note βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Pitch Range By Note βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Gate pitch detection to specific notes or a chord

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Pitch Range By Note βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • previous_range_collection
  • PITCH_RANGE_COLLECTION
β—„chord_onlyfalseβ–Ί
β—„pitch_tolerance_percent100.0β–Ί
β—„notesβ€”β–Ί

Where PitchRange works in raw Hz and PitchRangePreset works in named vocal categories, this one is musically literal: give it specific MIDI note numbers, and it builds a detection window around exactly those notes. Use it when you want an effect to trigger on a particular note or chord - the root note of a song, a recurring riff's key notes - rather than a generic frequency band.

How it works

notes takes a comma-separated list of MIDI note numbers - the actual notes you want the range built around. pitch_tolerance_percent (0–100, default 100) controls how forgiving the match is around those exact notes; at 100% it's at its most permissive, tightening it down narrows how close to the exact pitch a detected note has to be before it counts.

chord_only is the interesting fork: off, and detecting any one of your listed notes counts as a match. On, and it only counts when all of the listed notes are present simultaneously - turning this from "did any of these notes play" into "did this exact chord play." That's a meaningfully different trigger condition, and worth being deliberate about which one your effect actually needs.

previous_range_collection (optional) chains this into a combined PITCH_RANGE_COLLECTION alongside other range nodes, same pattern as PitchRange and PitchRangePreset.

The inputs and outputs that matter

  • notes (required, string) - comma-separated MIDI note numbers, not note names.
  • chord_only (default false) - require all listed notes simultaneously vs. any single one.
  • pitch_tolerance_percent (default 100, 0–100) - how forgiving the match is.
  • previous_range_collection (optional, PITCH_RANGE_COLLECTION) - chain with earlier ranges.

Output is a single PITCH_RANGE_COLLECTION, which plugs into PitchFeatureExtractor's opt_pitch_range_collections input.

How to install it

ComfyUI Manager: search "RyanOnTheInside", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart. Pure note-range definition - no model download.

Common issues & troubleshooting

Entered note names instead of numbers. notes expects MIDI note numbers (0–127 integers), not letters like "C4" or "A#3" - if the field seems to do nothing, this is the first thing to check.

chord_only set on and it never triggers. Requiring every listed note to sound at the same instant is a strict condition - real performances rarely hit notes with perfect simultaneity. Loosen pitch_tolerance_percent, or double check the chord is actually being played together (not arpeggiated) in your source audio, before assuming the node is broken.

Wired into PitchFeatureExtractor but detection still looks like it's listening to everything. Confirm opt_pitch_range_collections on PitchFeatureExtractor is actually connected to this node's output - without that link, the note-gating never applies and the extractor just runs unrestricted.

CategoryRyanOnTheInside/FlexFeatures/Sources/Audio

Inputs (4)

NameTypeDefaultDescription
chord_onlyBOOLEANfalseIf true, only detects when all specified notes are present simultaneously
pitch_tolerance_percentFLOAT100.00–100Tolerance percentage for pitch detection (0.0 to 100.0)
notesSTRINGComma-separated list of MIDI note numbers
previous_range_collectionoptPITCH_RANGE_COLLECTIONOptional previous pitch range collection to append to

Outputs (1)

NameTypeDescription
PITCH_RANGE_COLLECTIONPITCH_RANGE_COLLECTIONβ€”