reaper jsfx
Experiments with JSFX, REAPER's scripting format for audio and MIDI effects. Two MIDI harmony tools, an artificial double tracker and three pedal-inspired audio effects, each in a single file you can copy into REAPER.
This is a personal playground, so expect rough edges. Ideas and bug reports are welcome: open an issue if something sounds wrong.
Install
- Get the
.jsfxfiles you want from the Download tab or from each effect's tab. - In REAPER, open Options > Show REAPER resource path in explorer/finder.
- Copy the files into the
Effectsfolder (or a subfolder of it). - In the FX browser press F5 to refresh, or restart REAPER.
- Add the effect to a track. MIDI effects go on a track before the instrument and are meant to work with realtime polyphonic MIDI input. Audio effects go on a track with some audio content.
REAPER stores slider values with the project and with FX presets. If you change defaults in a file and an old instance still shows the old values, add a fresh instance. Reordering sliders changes how saved presets and automation map to controls.
Download
Get every effect at once, or pick single files. After downloading, follow the Install steps.
Download all (ZIP)Open the repositorySingle files
| Effect | Type | File |
|---|---|---|
| Harmony | MIDI | DownloadView source |
| Block Chords | MIDI | DownloadView source |
| ADT Double Tracker | Audio | DownloadView source |
| Boss CE-1 Chorus Ensemble | Audio | DownloadView source |
| Dallas Arbiter Rangemaster Treble Booster | Audio | DownloadView source |
| Maestro FZ-1 Fuzz-Tone | Audio | DownloadView source |
If a file opens as text in the browser, use Save link as, or save the page with Ctrl+S, and keep the .jsfx extension.
Harmony
A scale and chord processor. Each key you play becomes a chord built from a scale, and every step is adjustable: the scale, a chain of scale transforms, the chord rule, and a chain of chord transforms. A port of the "pitchwheel" web tool, with live chord names, a 3D helix visualizer that draws every held chord (polychords included) and a scale analysis card. The scale library comes from Francesco Balena's The Scale Omnibus.
Download Harmony.jsfxUser manual
Quick start
- Put it on a MIDI track before your instrument and open the editor.
- Pick a scale in the Scale panel using the category arrows and list, the search box, or another source.
- Choose an Input mode and play. With the defaults every key plays a major triad built on itself.
- Shape the chord in the Chord and Chord Transform panels.
Editor
The editor scales to the window. The keyboard strip shows the live scale (blue), the chords of every held key (orange) and held keys. Values can be dragged or scrolled. Click the left or right half to step down or up, and right-click to reset to the default. In chord rule lists each number is a chip: click adds 1, right-click subtracts 1, shift-click deletes, and the + chip adds an entry. Lists hold up to 64 entries.
Editor size and layout
The editor opens at 1500 x 826 and scales evenly to fit the window. The space for the Scale Analysis card is always reserved at the bottom, so showing or hiding it changes nothing else. If the window is smaller than the design, everything scales down together. REAPER remembers window sizes, so drag an existing instance taller once (about 826 pixels at the default width).
Visualizer
The helix to the right of the panels (the Visualizer button in the header turns it on and off) shows 120 notes, 10 octaves of 12 pitch classes, on a helix with one ring per octave. The colours match the legend in its top-left corner: root (light orange), scale (blue), degree (red, the scale degree the chord is built from) and chord (orange). Other notes stay dim. Chord and degree light up only while a key is held. With Chord Negative on, it shows the reflected scale the chord is picked from.
The helix is polyphonic: every held key owns a chord, and all of them are shown at once, so a polychord is drawn as it sounds. Hold C and D in Root mode and it lights a C triad and a D triad together. Each chord gets its own closed orange polygon through its notes, from the lowest note up to the highest and back to the lowest (a two-note chord is a single line), so you can see which notes belong to which chord. A note shared by two chords is lit once, and the chord notes are drawn on top of the lines. The polygons follow the notes that actually sound, so Spread, Close, Resize and Auto-voicing change their shape. The helix covers MIDI 12 to 131 (C0 to B9), so lower notes are not drawn.
Drag to rotate and scroll to zoom. The controls above the view are Expand (the helix fills the whole window, and the control bar appears when the mouse is over the top strip. Back or Esc returns), play/pause, speed (0.25x to 4x) and Reset (back to the default view and zoom). The helix turns all the time at a steady, clock-based speed (about 1 degree per second at 1.00x). Dragging, zooming, clicking and resetting never pause it, and only the pause button stops it. The square's bottom edge lines up with the bottom of the panels.
Scale Analysis
The Scale Analysis button in the Scale Transform panel opens a card at the bottom of the editor. It analyses the scale with only Mode, Mirror and Negative applied (Root, Degree and Invert only move or rotate the scale without changing its intervals), with the lowest pitch class at 0. It needs at least two notes. The top row shows the scale in four notations. For C major:
| Notation | Shows | Example |
|---|---|---|
| Positions | The notes as semitones above the lowest one | 0 2 4 5 7 9 11
|
| Intervals | The inter-onset intervals, step to step (the last one wraps to the octave) | 2 2 1 2 2 2 1
|
| Onsets | The 12 pitch classes, 1 if the note is in the scale | 1 0 1 0 1 1 0 1 0 1 0 1
|
| Bitmask | The onsets as a number, with bit n set for position n (the same number the library uses) | 2741
|
- Properties: Euclidean, Winograd-deep, Erdos-deep, Palindrome, Balanced and Chiral.
- Distances: how many times each distance (1 to 6 semitones) occurs, plus regression evenness and rhythmic oddity.
- Binary string: Shannon entropy, transition complexity and longest run of the onsets.
- Symmetry: rotational and reflective axes. Generation: the generator m that builds the scale, if there is one.
- Distribution spectra: for each number of steps, the interval sizes it spans, its width w (0 is strict, 1 is Myhill) and the mean width.
Input modes
- Root: each key sets the scale root to its pitch class and plays that chord in the key's own octave. Chord Octave 4 puts a middle C chord on C4.
- Degree: white keys play consecutive scale degrees starting at middle C (degree 0). Black keys are ignored. Chord Octave moves the starting key.
- Direct: polyphonic pass-through.
- Auto: play in any key. If the held keys leave the live scale, the plugin changes the scale so it contains them all. Modal Interchange rotates through the scale's modes on the same root, and the editor shows the name of the new scale. Transposition keeps the mode and transposes, and the editor shows the new root. Adaptive (the default) keeps the number of notes but reshapes the scale around what you play: each held note takes over the closest scale note, inside the octave of the original scale, and the adapted scale stays until you reset. Distance From measures against the Original scale or the Current one (default for every sub-mode). In Adaptive it is the scale that gets reshaped: the original each time, or the already adapted one so the changes accumulate. Adaptive remembers its own Distance From setting. Autoreset returns to the initial scale on a fresh key press. The Reset button also returns to it and stops sounding chords. In Adaptive, changing any Scale or Scale Transform control restarts the adaptation from the new scale.
In every mode except Direct each held key owns its own chord. Common Notes decides whether a note shared by two chords is held (legato) or retriggered.
The four panels
| Panel | Contents |
|---|---|
| 1 Scale | Source: Library (402 scales, 9 categories, searchable), Euclid, C-D (Clough-Douthett), Deep, or Custom (type a list or click the 12 cells). Generators use Events and, for Deep, Multiplicity. |
| 2 Scale Transform | In order: Root, Mode (rotate the pattern on the same root), Degree (same notes from another degree), Invert (with axis), Mirror, Negative (negative harmony). |
| 3 Chord | Octave, criterion type (Position: list of degrees, default 0 2 4. Interval: stacked steps, default 2), Degree, Rotation, Voices (0 uses the list length).
|
| 4 Chord Transform | In order: Position (inversion), Offset (semitones), Mode, Invert (with axis), Mirror, Close, Spread (with Spread Octaves), Resize (start/end), Auto-voicing. Negative picks the chord from the negative-harmony scale. |
Spread keeps the lowest note and gives every other note the octave that brings the gaps between neighbouring notes closest to a target profile: about 9 semitones for the first gap, then 7.8, 6.8 and so on, narrowing towards 3 at the top. Gaps under a minor third are penalised. Spread Octaves (1 to 8, default 2) sets the range of the voicing. The plugin starts from a profile that just fills that range and tightens it until the chord fits, so a triad stretches over several octaves when you ask for it. At 1 you get the closed voicing. Spread works on chords of up to 16 notes.
Auto-voicing picks the inversion and octave closest to the previous chord. The Reset button next to it forgets it. Chord tones outside MIDI 0 to 127 are dropped, and notes that land on the same pitch are merged. All other MIDI messages pass through, and CC 123 and 120 stop every chord.
Automation: all 39 settings are sliders (hidden from the default UI, shown in the editor) so they can be automated. Output Channel: Same as input or 1 to 16. The chord lists and custom scale are saved with the project and FX presets but cannot be automated. Chord view and the Visualizer button are editor settings: they are not sliders and they return to their defaults when the effect is reloaded.
Note names
Every note name in the editor (keyboard labels, the scale and chord notes in the header, the Root value and the pitch-class cells) is spelled to fit the live scale, so a flat key shows Eb and not D#. The Names setting in the header decides how.
- Auto: a seven-note scale gets one letter per degree whenever possible, with the fewest accidentals, so Eb major reads Eb F G Ab Bb C D. Sharps win a tie, except that a white-key root keeps its plain name (F Locrian, not E# Locrian). A scale that cannot be spelled this way (for example, one needing double accidentals) and every scale with another number of notes keep their white keys plain and use the sharps or flats that match the scale. Minor-type scales are judged by their relative major, so C minor uses flats.
- Sharps / Flats: prefer that kind of accidental everywhere.
Notes outside the scale, such as chord tones, follow the same direction. All twelve pitch-class cells follow it too, including the unlit ones, and so does the root in the detected scale name. The octave belongs to the letter, so B#3 is MIDI note 60 and Cb4 is MIDI note 59.
Detected scale
The title of the Scale panel always starts with the root of the live scale, followed by its name. It switches to the detected scale when Input is Auto, when the Source is Euclid, C-D, Deep or Custom, or when Mode, Degree, Invert, Mirror or Negative is active (Root alone does not trigger it). A library scale keeps its own name until a transform changes it. The plugin looks up the shape of the live scale in the library and shows its root and name, for example C Dorian. An orange from ... next to the SCALE label shows where it came from: the same scale without transforms, or in Auto the initial scale. It only appears when something changed.
- Modal Interchange: the root stays and the name changes.
- Transposition: the name stays and the root changes.
- Adaptive: the scale is reshaped, so the original root may not fit. The adapted scale is read from the original root first. If that shape is not in the library, each note of the adapted scale is tried as the root and the closest match to the original root wins (ties go upward). C major with C# held reads
C# Altered Dominant, and with Bb and C# held it readsC# Ultralocrian. - Degree: named from its new first note. Degree 1 of C major reads
D Dorian. - Negative: named from the Root setting when that note is in the result. C major reads
C Aeolian (Natural Minor). - Not in the library: the title shows the root and
(not in library). - Shared shapes: when several entries have the same shape, the name comes from the category of the library scale you chose, otherwise from list order. No tradition is favoured.
Chord names
The CHORD column of the header names what is sounding, in the same large type as the scale name, with steps (the scale steps of the chord) and notes (the spelled note names) below it. With no key held the name shows -. The Chord view buttons decide how several held keys are named:
- Whole (default): every sounding note of every held chord is merged, sorted and read as one chord, so a polychord gets a single name. Holding C and F in Root mode (C4 E4 G4 and F4 A4 C5) reads
C6 add4. Steps and notes are merged the same way, without duplicates. - Per chord: one name per held key, in key order, separated by
|, for exampleC | F. Steps and notes are grouped per chord too. A long list drops to the smaller font.
The name is read from the notes that actually sound, after every transform, so Spread, Close, Resize and Auto-voicing can change it. It is an analysis of the pitches, not a lookup, and it never silently drops a note. No root is assumed: every distinct pitch class is tried as the root, each reading gets a penalty for anything odd (a missing third or fifth, leftover tones, a bass that is not the root), and the lowest penalty wins, with the lowest note breaking ties. Triad inversions come out as slash chords (E G C reads C/E). Where another root explains the notes more simply it wins instead, so E G B C can read Emin addb6. Root and bass are spelled like every other note name, so the Names setting applies.
| Part of the name | Meaning | Examples |
|---|---|---|
| bare root | major triad | C
|
| min, dim, aug | minor, diminished, augmented triad | Cmin, Cdim, Caug
|
| 5 | root and fifth only | C5
|
| sus2, sus4 | suspended, no third | Csus4, C7sus4
|
| 6, 6/9 | natural sixth, with or without the ninth | C6, C6/9
|
| 7, maj7 | dominant or minor seventh, major seventh | C7, Cmin7, Cmaj7
|
| dim7, min7b5, min/maj7 | diminished seventh, half-diminished, minor-major seventh | Cdim7, Cmin7b5, Cmin/maj7
|
| b5, (b5) | flat fifth | C7b5, Cmaj(b5)
|
| 9, 11, 13 | stacked extensions, used when a seventh is present | C9, Cmaj9, Cmin11, C13
|
| add... | extra notes on a chord without a seventh | C add9, Cmin add9, C add4
|
| (...) | extra or altered tones after a seventh | C7(b9), C7(b9,#11), Cmaj7(#11)
|
| (omit 3), (omit 5), (omit 3,5) | a missing third or fifth | C7 (omit 3), Cmaj (omit 5)
|
| /note | the bass is not the root | C/E, C7/Bb
|
Without a seventh, an added note is named by its octave: a second, fourth or sixth within the first octave above the root note (C add2, C add4), a ninth, eleventh or thirteenth when it sits an octave or more above it (C add9, C add11). With a seventh present those tones always use the 9, 11 and 13 names.
Defaults
Input Root. Auto sub-mode Adaptive, Distance From Current, Autoreset off. Common Notes Hold. Names Auto. Chord view Whole. Visualizer on. Output channel Same as input. Library scale Ionian (Major), generator Events 7 and Multiplicity 7, custom scale 0 2 4 5 7 9 11. Scale transforms at 0 or off, root C. Chord Octave 4, Position criterion 0 2 4, Interval criterion 2, Voices 0. Chord transforms off, Spread Octaves 2, Resize 0 to 3.
Developer notes
- Sliders (39): Scale source (1 to 5), scale transform (6 to 12), chord (13 to 17), chord transform (18 to 31, with 27 the Spread Octaves), input and output (32 to 39, with 39 the note-name accidentals). Names start with
-, which hides them from the standard slider UI. Keep this order: presets and automation depend on it. - Pipeline:
src_mask()builds the base set,mask_to_pos()gives positions,build_scale()applies the transform chain intoA_SC,chord_select()picks the notes,chord_transforms()applies the chord chain, andchord_finalize()maps to MIDI notes inA_CHM(dropping out-of-range and duplicate notes).rebuild_scale()andrebuild_chord()run them. - Change detection:
SH[]shadows every slider.handle_changes()in@blockcompares them and rebuilds only when something changed. Useset_sl()when code changes a slider so the shadow stays in sync and it does not count as a user edit. The GUI usesset_sl_ui(), which callsslider_automate. - Library: 402 12-bit masks in
M_LIB, withM_CATSandM_CATNfor category starts and sizes, andlib_name()as an if-chain of names. A new scale needs a mask, a name at the matching index, and updated category tables andNLIB. - Polyphony:
V_ACT,V_CNT,V_CHandV_NOTEShold one voice per held key.O_REFcounts owners per (channel, note).out_on()sends a note-on only on 0 to 1 (or always when Common Notes is Retrigger).out_off()sends a note-off only when the count reaches 0. - Auto mode:
auto_changed()checkscontains_notes()against the held-key stack, thenic_pick()(Modal Interchange) ormod_pick()(Transposition) chooses by Manhattan distance. The baseline is stored byauto_enter()and restored byauto_restore(). - Adaptive:
adapt_collect()gathers the unique pitch classes of the held keys (oldest first).adapt_apply()gives each one the closest unused degree, breaking ties withmax_gap()and then the distance to the scale edge, and keeps every note inside the octave window of the original scale. The result lives inA_ADS, the persistent adapted scale aligned withA_PRE, andrebuild_scale()copies it intoA_SCwhileadapt_actis set. Original starts fromA_PREon every adaptation, Current continues fromA_ADS.ref_adaptandref_otherremember Distance From separately for Adaptive and for the other sub-modes, andhandle_changes()swaps them withset_sl(34, ...)when the sub-mode changes. - Scale detection:
rebuild_scale()keeps two descriptors, current (ad_*, fromA_PRE) and reference (ab_*, fromA_BASEin Auto, otherwise the untransformed scale inA_TMP2), each with shape mask, library index and root.shape_mask()builds the 12-bit shape relative to a root,pick_anchor()chooses that root (the first note, or the Root setting with Negative), andlib_find()returns the best library match, preferring the selected category, then list order. In Adaptive,adapt_find_root()runs after the first lookup: if the adapted scale is not in the library when read from the original anchor, it tries every degree as the root, nearest first and upward on ties. Names are built in@gfx, so the audio thread only stores numbers. - Note naming:
nn_spell()spells all 12 pitch classes into letter and accidental arrays (NN_LET,NN_ACCI). For seven-note scalesnn_search()is an iterative DFS over the candidate letters inNN_CAND(up to three per pitch class). It needs strictly ascending letters, scores accidentals by the Names setting, and rejects a spelling with a double accidental or one that renames a white key while mixing sharps and flats. Pitch classes the scale does not spell usenn_fallback(), with the sharp or flat direction taken from the scale.nn_tables()precomputes the spelling of the Root value for all 12 roots (NN_RL,NN_RA), so the editor shows the right name the moment a root is chosen.nn_name(),nn_rname()andnn_name_oct()build the printable names. - Spread: EEL2 has no recursion, so
op_spread()keeps the bass and picks an octave for each upper note against the target gap profileflr + (first - flr) * 0.8^k, scored bysp_cost()(distance to the target, plus a penalty for gaps under 3 semitones). Up to 11 upper notesspread_dp()runs an exact dynamic program over subsets (tablesDP_B,DP_P,DP_G, 2^11 subsets x 12). Beyond thatspread_greedy()takes the best next note one gap at a time. Spread Octaves (cx_width) sets the rangeT = 12 * N. The profile scale starts atT / spanand shrinks (x0.88, or x0.7 above 8 upper notes) for up to 14 tries until the voicing fits. N = 1 usesspread_closed(). Chords of 2 to 16 notes are spread. - Persistence:
@serializesaves the three lists (A_CRP,A_CRI,A_SCP) with their lengths.lists_vertriggers a rebuild after loading. - GUI:
@gfx 1500 826. The page is designed at 1100 x (576 +AH) units, withAH = 250always reserved for the analysis card, so the scale never depends onan_open. With the helix shown,usx = usy = min(gfx_w / 1500, gfx_h / PGH). Without it the editor stretches to the window and the text followsuis = min(usx, usy).hx_fullgives the helix the whole window. Helpers includebtn,stepper,chips,tf_run(text field) anddraw_kbd. Coordinates go throughfr()andft(), which apply the scale and offset. - Visualizer: software 3D in EEL2 (
hx_render). 120 lattice points (HX_N = 200000) are projected through an orbit camera kept as an orthonormal basis, so there is no gimbal lock. Depth is sorted with an insertion sort (painter's algorithm), and the scene is drawn into off-screen image 1 and blitted. Role flags per note: 1 scale, 2 root, 4 chord, 8 degree. The orbit ishx_rotate(-0.016 * hx_speed * hx_dt, 0)every frame unlesshx_paused, usingtime_precise()withhx_dtclamped to 0.1 s. Dragging, zooming andhx_reset_view()only change the camera, so the orbit never stops. The square isHS = min(DWE - LW - 10, 530)and ends at y = 566, the bottom of the panels. Chords are drawn per voice:hx_renderloops overV_ACT, takes each voice's notes fromV_NOTES(minus 12, so C0 is step 0, and anything outside 0 to 119 is skipped), sorts them withsort_ascand draws every edge including highest to lowest (a single segment for two notes), then redraws the chord spheres over the lines. The chord flag is set from every active voice, and the degree flag only while at least one voice is active. - Chord names: built in
@gfxfrom the voice tables, so the audio thread never sees them.cn_mode0 (Whole) collects every active voice'sV_NOTESthroughkb_flags()intoCN_NT(sorted, distinct) and itsV_STEPSintoCN_ST, then callscn_analyze()once.cn_mode1 sorts each voice's notes and calls it once per voice, joining the results with|.cn_analyze()tries every distinct pitch class as the root, builds a 12-bit pitch-class setPrelative to it (bit 0 is the root) plusE, the classes that sit an octave or more above the root note, and askscn_eval()for a name and a penalty. The lowest penalty wins, and because candidates are tried from the lowest note up with a strict less-than, the lowest note breaks ties.cn_eval()decides third and fifth quality, suspension and the seventh, then either the 9, 11 and 13 shorthand (only with a seventh, and not on dim7 or b5 chords) or 6 and 6/9 (no seventh). What is left is written bycn_lab(): in brackets after a seventh, asaddnotes otherwise, whereEpicks 2, 4, 6 over 9, 11, 13. Root and bass are spelled withnn_name(), so they follow the Names setting.CN_NT,CN_FLandCN_STare private memory blocks at 206000, 206300 and 230000.cn_modeis a plain variable, so it is not saved. - Scale analysis: private memory at
AN = 210000, so it never touches the audio thread.an_build()applies Mode, Mirror and Negative to the base positions and normalises the lowest pitch class to 0 intoAN_P.an_stats()fills the numbers andan_draw()draws them. The notation strip is built there: positions fromAN_P, intervals as differences (the last wraps to 12), onsets fromAN_BIN, and the bitmask as the sum of2^AN_P[i].
Block Chords
Turns single-note melodies into block chords. Every note you play is treated as the top voice of the melody. A port of the "blockchords" web tool.
Download Block Chords.jsfxUser manual
Quick start
- Put the effect on a MIDI track, before your instrument.
- Pick a root, a scale and a base shape.
- Play single notes. Each one comes out as a chord.
How a note is harmonized
- Notes in the base shape use the inversion of that shape that puts the melody note on top.
- Other scale degrees get descending thirds along the scale. A voice that would form a tritone with the melody moves up one scale step.
- Notes outside both are treated as a chromatic alteration of the nearest in-scale note. You choose whether the whole chord moves with it or only the melody note.
- Bass doubling adds the melody an octave below. Drop 2 / 3 / 4 move the second, third or fourth voice an octave below that doubling.
Overlapping chords share notes safely: releasing one chord never cuts a note another chord still holds. Notes outside the harmonize range pass through unchanged.
Controls
| Control | What it does |
|---|---|
| Root (key) | C to B. Applies to both the scale and the base shape. |
| Scale category + list | Pick a category, then a scale in the matching list. Categories: major and minor modes, European, Asian, Indian (three lists), pentatonic, modal (two lists), jazz, symmetric, misc. |
| Custom scale toggles | Choose Custom as the category to reveal 12 toggles (relative to the root). |
| Base shape category + list | Triads, sixths, sevenths, ninths, elevenths, thirteenths, altered dominants, suspended and added tone, symmetric and cluster, polychords and hybrids, classical chromatic harmony. |
| Custom shape toggles | Choose Custom as the shape category for 12 toggles. |
| Drop voice 2 / 3 / 4 | Drops that voice an octave below the bass doubling. |
| Out-of-scale notes: transpose whole chord | On: the chord moves with the alteration. Off: only the melody note changes. |
| Bass doubling | Adds the melody an octave below. |
| Harmony velocity | 10 to 150% of the melody velocity. |
| Harmonize from / up to | MIDI note range that gets harmonized. Others pass through. |
Defaults: root C, Ionian (Major), Major Sixth (6), velocity 85%, range 60 to 127, transpose whole chord on, bass doubling on, drops off.
Developer notes
- Slider map: 1 root, 2 scale category, 3 to 14 one picker per scale category (12 groups,
SB = 3), 15 to 26 custom scale toggles (CSB = 15), 27 shape category (CGRP), 28 to 38 one picker per shape category (HB = 28), 39 to 50 custom shape toggles (CHB = 39), 51 to 53 drops, 54 transpose, 55 bass doubling, 56 velocity, 57 and 58 range.@sliderhides the pickers that do not apply withslider_show. - Library format: each scale or shape is a 12-bit mask (bit b set means b semitones above the root). Masks are loaded with
ls()andlh()in@initintoLS(1000) andLH(2000).GSS[]andGSC[]hold the first library index of each category. - Adding a scale: insert the mask with
ls()at the end of its category, shift the laterGSSentries, then raise that picker's slider range and add its name in the slider definition. The list order must match the mask order. - Core functions:
harm_shape()builds the inversion with the melody on top.step_scale()moves a note by scale steps and returns -9999 if the note is not in the scale.harmonize()assemblesOUT[]including alteration, bass doubling and drops. - Note bookkeeping:
CNT[ch*128+note]counts the chord notes per held input note.STOREkeeps up to 8 output pitches per input note.REFCreference-counts output pitches: a note-on resends a note-off first if the count is above 0, and a note-off is sent only when the count returns to 0. CC 120 and 123 clear the counters for that channel. - Named strings are not accessible inside functions, so string handles (
NMS,CHS) are assigned in@initand used as globals.
ADT Double Tracker
A stereo artificial double tracker. It adds a second, slightly late copy of the signal, the way a real second take sits a little behind the first, with separate pan, drive and level for each path. Moving the delay bends the pitch of the delayed copy, like a nudged tape varispeed.
Download ADT Double Tracker.jsfxUser manual
Quick start
- Put it on an audio track with a single part, such as a vocal or a guitar.
- Choose the Input Source: L+R for a stereo track, or Left or Right to double one channel.
- Set Varispeed Delay for how late the second take is. Small values thicken the sound, and larger ones separate the two takes.
- Place the paths with SRC Pan and ADT Pan, and add a slow drift with the LFO.
The two paths
- SRC: the original signal.
- ADT: the delayed second take.
Varispeed Delay sets how far apart they are. Positive delays ADT relative to SRC, negative delays SRC relative to ADT, so the sign decides which path is late. The window shows a ruler from -40 to +40 ms with an ADT marker at the current delay. It dims when the ADT path is muted or off.
Each path has its own Pan, Drive, Level, Mute and Phase. Drive is a tanh saturator before the delay, with up to 24 dB of pre-gain and partial level compensation. At 0 it is bypassed. With Input Source on Left or Right the pan is constant-power (-3 dB at the centre). With L+R the stereo image is kept and the pan works as a balance control.
Delay and LFO
The delay moves toward its target with a time constant of about 20 ms, so changing it, or letting the LFO move it, bends the pitch of the delayed path and never clicks. The LFO modulates the delay by +/- LFO Range around the Varispeed Delay, and the total is limited to +/-40 ms.
- Shape: Sine, Triangle, or Random, which picks a new value each cycle and glides to it.
- Sync off: the rate is set in Hz.
- Sync on: the rate is set in bars. While the transport plays the phase is locked to the song position, using the project's time signature.
For a sine LFO the peak pitch swing is about 11 cents x Rate (Hz) x Range (ms), so the defaults give roughly +/-3 cents. This is approximate, worked out from the speed of the delay. The smoothing also rounds off the LFO, so rates above about 8 Hz lose depth (roughly 40% less at 10 Hz).
Monitor: Mono sums the output to mono on both channels, to check how the double sounds in mono. The plugin reports 2 samples of latency to REAPER for plugin delay compensation.
Controls
| Control | Range | What it does |
|---|---|---|
| Input Source | Left, L+R, Right | Which input channel feeds the effect. Left and Right feed that channel to both sides. |
| Monitor | Stereo, Mono | Mono sums the output to mono, to check the double in mono. |
| SRC / ADT Pan | -100 to +100 | Position of each path. |
| SRC / ADT Drive | 0 to 100 | Saturation before the delay. 0 is off. |
| SRC / ADT Level (dB) | -60 to +12 | Level of each path. -60 turns it off. |
| SRC / ADT Mute | Off, On | Silences the path. |
| SRC / ADT Phase | Normal, Inverted | Flips the polarity of the path. |
| Varispeed Delay (ms) | -40 to +40 | Delay between the paths. Positive delays ADT, negative delays SRC. |
| Varispeed Range (+/- ms) | 1 to 40 | Caps the Varispeed Delay at plus or minus this value. |
| LFO | Off, On | Switches the delay modulation. |
| LFO Range (+/- ms) | 0 to 20 | Depth of the modulation around the Varispeed Delay. |
| LFO Rate (Bars) | 0.25 to 16 | Cycle length in bars. Shown when Sync is on. |
| LFO Rate (Hz) | 0.05 to 10 | LFO speed. Shown when Sync is off. |
| LFO Sync | Off, On | Locks the LFO to the project tempo and song position. |
| LFO Shape | Sine, Triangle, Random | Waveform of the modulation. |
| Output Gain (dB) | -24 to +12 | Level out. |
Defaults: Input L+R, Monitor Stereo, SRC Pan -30, ADT Pan +30, Drive 0, Level 0 dB, Mute off, Phase Normal, Varispeed Delay 15 ms, Range 20 ms, LFO on, LFO Range 0.5 ms, 2 bars or 0.5 Hz, Sync off, Sine, Output 0 dB.
Developer notes
- Sliders (21): 1 and 2 input and monitor, 3 to 7 SRC, 8 to 12 ADT, 13 and 14 varispeed, 15 to 20 LFO, 21 output. Add new controls at the end so saved presets keep their mapping.
- Buffers: four 65536-sample circular buffers (SRC left and right, ADT left and right) at 0, 65536, 131072 and 196608, with one write pointer
wpmasked by& 65535. Drive is applied when writing, so each path has its own saturator ahead of its delay. - Reads:
hrd(b, wpos, d)is a 4-point Hermite read and needsdof at least 2 samples.dly_src = 2 + max(0, -ms)anddly_adt = 2 + max(0, ms), so the sign of the varispeed picks the late path. The fixed 2 samples are reported withpdc_delay = 2,pdc_bot_ch = 0andpdc_top_ch = 2. - Smoothing:
dsfollows the target delay with a one-pole (dcoef, 20 ms) and the gains follow withgcoef(10 ms). The smoothed delay is what bends the pitch and what the GUI draws. On the first sample all smoothed values start at their targets. - Drive:
drive(x, pre, mk)istanh(x*pre)*mkwithpre = 10^(drive*0.01*24/20)andmk = 1/sqrt(pre). The argument is clamped to +/-15 before the exponential. - Pan:
pan_l()andpan_r()use a constant-power law for a mono source (mono = ins != 1) and a balance law for L+R. - LFO:
lfo_phruns 0 to 1. Free:inc = Hz/srate. Sync:inc = tempo/60/srate/(bars*bpb)withbpb = ts_num*4/ts_denom, and whileplay_state & 1the block start resets the phase to the fractional part ofbeat_position/(bars*bpb). Random keeps two valuesr0andr1, redrawn on each wrap, and blends them with a cosine curve.slider_showhides the Bars or Hz slider that does not apply. - GUI:
@gfx 600 95draws a -40 to +40 ms ruler (a tick per ms, a major tick every 5) and the ADT marker atds. It is display only.
Boss CE-1 Chorus Ensemble
A chorus and vibrato inspired by the 1976 CE-1. A modulated delay line stands in for the original's bucket-brigade chip.
Download Boss CE-1 Chorus Ensemble.jsfxUser manual
Quick start
- Put it on track with audio content.
- Choose Chorus or Vibrato with Mode.
- Chorus: set Chorus Intensity, which sets the speed, not the depth. Vibrato: set Vibrato Rate and Vibrato Depth.
- Choose an Output Mode and match the level with Output.
The two modes
- Chorus: only Chorus Intensity is active. It sets the LFO rate (about 1 to 3 Hz). The delay sweep is fixed (3 to 5 ms). The output is the direct signal plus the delayed signal, each at -3 dB.
- Vibrato: Vibrato Rate (3.2 to 11.6 Hz) and Vibrato Depth are active. The dry signal is muted for a true pitch vibrato. At default settings the swing is roughly +/-40 cents at depth 10 and 5 Hz, and roughly +/-95 cents at depth 10 and the fastest rate.
Output modes
- Mono Mix: one output. The stereo input is summed first.
- Classic Stereo (default): left is the Direct output, right is the Effect output (wet only), like the original's two jacks.
- Dual: two CE-1s, one per input channel, with LFOs 90 degrees apart. The input stays stereo.
Controls
| Control | Range | What it does |
|---|---|---|
| Mode | Chorus, Vibrato | Selects the effect. Only that mode's controls are active. |
| Chorus Intensity | 0 to 10 | Chorus only. LFO rate, 1 to 3 Hz (exponential). |
| Vibrato Rate | 0 to 10 | Vibrato only. Rate between Vibrato Rate Min and Max. |
| Vibrato Depth | 0 to 10 | Vibrato only. Widens the delay sweep. |
| Input Sensitivity | 80 mV, 10 mV | 10 mV adds 18 dB into the preamp. Use it for quiet sources. |
| Level | 0 to 10 | Level into the preamp. 7 is unity, 10 is about +6 dB. Higher clips harder. |
| Output Mode | 3 options | See above. |
| Output (dB) | -24 to +12 | Level out. |
| BBD Bandwidth (kHz) | 3 to 16 | Low-pass on the delayed signal. Lower sounds darker, like a worn BBD. |
| BBD Noise (%) | 0 to 100 | Hiss on the delayed signal. 100% is about -60 dB. |
| LFO Drift (%) | 0 to 100 | Slow random wander of the LFO rate. 100% is about +/-5%. |
| Min Delay (ms) | 1 to 6 | Shortest delay, where the sweep starts. |
| Chorus Sweep Max (ms) | 3 to 9 | Longest delay in Chorus mode. |
| Chorus LFO Shape | 0 to 100 | Blends the LFO from triangle (0) to sine (100). Higher softens pitch changes at the sweep ends. |
| Vibrato Sweep Max @ Depth 0 / 10 (ms) | 3 to 9 | Longest delay in Vibrato mode at depth 0 and depth 10. Raise the second for wilder vibrato. |
| Vibrato Rate Min / Max (Hz) | 0.5 to 20 / 1 to 30 | LFO rate at Vibrato Rate 0 and 10. |
Defaults: Chorus mode, Intensity 5, Vibrato Rate 5, Depth 5, 80 mV, Level 7, Classic Stereo, Output 0 dB, bandwidth 9 kHz, noise 0, drift 25, min delay 3 ms, chorus sweep 5 ms, shape 50, vibrato sweep 3.3 to 4.5 ms, vibrato rate 3.2 to 11.6 Hz.
The rate and delay ranges come from one published measurement of a single unit, so they are not verified. The advanced sliders let you match a real CE-1. The preamp is not oversampled, so very high Level or the Mic setting with a hot input can alias slightly.
Developer notes
- Sliders (18): 1 to 4 main, 5 to 8 input and output, 9 to 11 sound character, 12 to 18 advanced tuning. Sliders are declared as
slider1:mode_sw=0<...>, so each has a named variable. - Delay law:
delay = dmin / (1 - k*u)withk = 1 - dmin/dmaxanduthe LFO in 0 to 1, which mimics a clock-modulated BBD (delay is inversely proportional to clock rate). Reads use 4-point Hermite interpolation inreadtap(). - Buffers: two delay lines of 16384 samples in memory (line A at 0, line B at
BUFSIZE), written atwp. Line B is only read in Dual mode. - LFO:
lfoshape(p, m)blends triangle and sine. Phase B is offset by 0.25 for Dual. Drift is a smoothed random target, redrawn every 0.3 s, scaling the rate by up to +/-5%. - Preamp:
tanh_(x*g_pre + 0.15)minus its DC value, normalised bypnormso small signals have unity gain.g_pre = g_sens * (level/7)^2. - Smoothing: rate, delay, shape and dry/wet gains use a 30 ms one-pole (
smc) toward targets set in@slider, so changing mode does not click. - BBD filter: two cascaded one-poles at the bandwidth setting (clamped to 0.45 x
srate). Noise is added before them. - Output:
omode0 mono mix, 1 Direct/Effect, 2 Dual. No oversampling around the preamp, which is the known aliasing limitation.
Dallas Arbiter Rangemaster Treble Booster
A stereo treble booster inspired by the single germanium transistor pedal behind many 1960s and 70s lead tones.
Download Dallas Arbiter Rangemaster Treble Booster.jsfxUser manual
Quick start
- Put it on an audio track, first in the chain, before any amp sim or other drive.
- Set Range for the boost and Output to match your level.
- Shape the tone with Input Cap and Hi-Cut, and the clipping with Bias, Germanium Asymmetry and Battery.
At defaults the small-signal response runs from about -14 dB at 100 Hz to about +9 dB at 4 kHz. Very quiet signals (-40 dBFS or lower) stay fairly clean even at full Range, while a typical guitar DI (-20 to -10 dBFS) drives the stage much harder. If it is too clean, raise Input Trim, lower Battery or raise Bias. The graph shows the linear response only, so it does not react to Bias, Asymmetry, Battery or Warmth. Feed it a DI'd guitar: the interaction with a real pickup is not modelled.
Controls
| Control | Range | What it does |
|---|---|---|
| Range | 0 to 10 | Stage gain, about -4 dB to +26 dB. Also sets how hard the transistor is driven. |
| Input Cap (nF) | 1 to 100 | Input coupling cap. Stock is 5 nF. Try 10 to 47 nF for the "fuller" mod. |
| Transistor hFE | 30 to 150 | Sets input impedance and so the input high-pass corner (higher hFE, lower corner), plus a slight gain change. |
| Bias (%) | -50 to +50 | Shifts the operating point. Away from 0 the half-waves clip unevenly. Positive and negative are mirror images. |
| Germanium Asymmetry (%) | 0 to 100 | How much more headroom one half-wave has. 0 is symmetric. |
| Battery (V) | 4 to 9.6 | Supply voltage. A weaker battery clips earlier and sounds more compressed. |
| Hi-Cut (Hz) | 2000 to 20000 | One-pole low-pass after the clipper. |
| Input Trim (dB) | -24 to +24 | Level into the stage. |
| Output (dB) | -36 to +12 | Level out. |
| Warmth (%) | 0 to 100 | Extra even-order harmonics. |
| Oversampling | Off, 2x, 4x, 8x | Higher is cleaner and uses more CPU. |
Defaults: Range 7, Input Cap 5 nF, hFE 75, Bias 0, Asymmetry 60, Battery 9 V, Hi-Cut 12000 Hz, Trim 0, Output -6 dB, Warmth 25, Oversampling 4x.
Developer notes
- Sliders: 1 Range, 2 Input Cap (log), 3 hFE, 4 Bias, 5 Asymmetry, 6 Battery, 7 Hi-Cut (log), 8 Trim, 9 Output, 10 Warmth, 11 Oversampling index (0 to 3, factor = 2^index).
- Memory map: 0 to 14 oversampling filter coefficients (3 biquads x 5), 100+ upsampling states (6 per channel), 120+ downsampling states (6 per channel), 200+ one-pole states (8 per channel).
- Input network: a one-pole high-pass with
rin = 59.4k || (hFE*500)and the input cap. The corner is clamped to 0.45 xsrate. Output coupling is 20 nF into 150k (about 53 Hz) and also removes the DC from asymmetric clipping. - Clipper:
sh(x, hpos, hneg)is an asymmetric tanh saturator. Headroomhp = 0.5*battery/9andhn = hp*(1 + 1.2*asym).vbshifts the operating point andy0is the static offset subtracted afterwards. Warmth adds0.4*warm*v*v. - Oversampling: zero-stuff by
osf(input scaled byosf), filter with a 6th-order Butterworth made of three biquads (Q 0.5176, 0.7071, 1.9319) atmin(0.45*srate, 20000), clip, filter again and keep the first output of each group. IIR filters, so no latency is reported. - Smoothing: gain and output are smoothed with a 10 ms one-pole to avoid zipper noise.
- The component values were tuned by ear. Change them in
@slider(therin,fc_outand headroom lines).
Maestro FZ-1 Fuzz-Tone
A stereo fuzz inspired by the Maestro FZ-1. The two channels are processed independently, so it works on mono or stereo tracks.
Download Maestro FZ-1 Fuzz Tone.jsfxUser manual
Quick start
- Put it on an audio track, ideally first in the chain so it sees the raw instrument.
- Set Fuzz for the amount and Volume to match your level.
- Shape the sound with Bias, Tone and Sag.
Controls
| Control | Range | What it does |
|---|---|---|
| Fuzz | 0 to 100 | Drive. Raises the first-stage gain from -6 dB to +44 dB and lowers the pre-clip low-pass from 9 kHz to 4 kHz. |
| Volume (dB) | -40 to +12 | Level of the processed signal. |
| Bias | 0 to 100 | DC offset ahead of the clippers, for more asymmetric clipping. High settings get ragged and can starve the signal. |
| Tone | 0 to 100 | Output low-pass from about 1 kHz to 12 kHz. |
| Sag | 0 to 100 | Level-dependent bias drop in the second stage. Loud passages compress and thin out, and notes can sputter as they decay. |
| Mix (%) | 0 to 100 | Dry/wet blend. Volume only affects the wet signal. |
Defaults: Fuzz 60, Volume -12 dB, Bias 35, Tone 50, Sag 25, Mix 100.
Signal path
90 Hz input high-pass, first clipper, 250 Hz coupling high-pass, a low-pass that darkens with Fuzz, a second clipper with envelope-driven bias sag (about 2 ms attack, 150 ms release), tone low-pass, 20 Hz DC blocker. Both clippers are asymmetric: the positive half clips softly and the negative half has a lower ceiling, which adds even-order harmonics. The fuzz path runs at 2x oversampling.
Developer notes
- Sliders: 1 Fuzz, 2 Volume, 3 Bias, 4 Tone, 5 Sag, 6 Mix. All coefficients are computed in
@sliderat twice the sample rate (fs2 = 2*srate). - Structure:
fz()is an instance function (state inz1..z5,env). Each channel is an instance (chL,chR) configured byfz_set(). Parameters are passed as arguments so both channels share the same coefficients. - Nonlinearity:
tanhf()is a rational tanh approximation that is exactly +/-1 beyond |x| = 3.ge()uses it for the positive half and0.7*tanhf(x/0.7)for the negative half. - Oversampling: each input sample produces two fuzz outputs. The first uses the average of the previous and current input (linear interpolation), the second uses the input itself. A 4th-order Butterworth low-pass at 0.45 x
srate(two biquads, Q 0.5412 and 1.3066, run atfs2) filters both. The first output is discarded after being run through the filter, and the second is the output sample. - Sag: the envelope follower tracks the post-filter signal and subtracts
sg*envfrom the second stage's bias. - Adding a control: add a
sliderNline at the end (so existing presets keep their mapping), compute its coefficient in@slider, and pass it throughfz_set().
General developer notes
- Each effect is one file at the top level of the repository, so installing means copying a single file.
- JSFX uses EEL2. There is no recursion, named strings are not reachable inside functions, and slider numbers are positional, so add new controls at the end to keep saved presets valid.
- Audio effects process per channel and compute coefficients in
@slider. Anything that depends on the sample rate belongs there, because it reruns when the rate changes. - The oversampled effects use IIR filters and report no latency. Test changes by A/B-ing against the oversampling set to Off, and look for aliasing with a high sine sweep.
- To report a bug, open an issue with the effect name, the settings, and a short description of what you expected.