Feel From Ref
feel_from_refApplies a reference recording's timing and level to track notes, aligning each note to nearby onsets so a mechanical or quantized draft follows the record's feel.
Instructions
Write a reference's per-note timing and level into a track's notes. It follows the record's beats over bars
[a, b] from the project grid and its bar 1 (each beat snaps to the strongest nearby onset, so a drifting or
rubato take stays locked, and it says where it lost the beat), then for every note of track on a slot (a beat,
or the 8ths (per_beat=2) or 16ths (per_beat=4) spread evenly between the followed beats) it reads the record's
onset within window_ms of the slot in band ([lo, hi] Hz, default [600, 4000]: the band the part sounds in),
and the slot's peak level there over its first 60 % against the mean of its bar (the bar's own loudness stays
with the score and the faders), clipped to +-6 dB. Each note moves to its slot plus time x the record's offset
against its own beat (time=1.0: the record's place; written as the note's @offset nudge, so it stays on its
beat in notes_read) and its velocity scales by 10**(level x dB / 20). The project plays one tempo: the record's
drift is not written, only each note's place against its beat. Notes on slots with no clear onset, off the
slots, or on beats it could not follow are left alone. dry_run=True prints what it would change. undo() takes
it back; run it once per draft (velocities scale again on a second run). Reach for it when a draft sounds MIDI,
mechanical or quantized against a reference: analyze_feel(source='render', against='ref') first, then this.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band | No | ||
| bars | Yes | ||
| time | No | ||
| level | No | ||
| track | Yes | ||
| source | No | ref | |
| dry_run | No | ||
| project | Yes | ||
| per_beat | No | ||
| window_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |