CHORDELLE - patch for Organelle (Critter & Guitari)
Chords and notes always in key, looper, generative engine, effects and samplers.
Pure Data vanilla, no externals.
(Istruzioni in italiano: LEGGIMI.txt)

INSTALLATION
- Load Chordelle onto the Organelle like any other patch: through the Organelle's
  web interface, or by copying it into the Patches folder of a USB stick.
- Presets live in chordelle_presets.txt and chordelle_presets2.txt inside the patch
  folder. Before updating Chordelle, copy them somewhere safe and put them back into
  the new folder (same for the samples folder with your own samples).

KEYBOARD (24 keys, plus the separate Aux key)
  Low octave, white keys   = the 7 CHORDS of the scale (I ii iii IV V vi vii in major)
  High octave, white keys  = the 7 NOTES of the scale
  Low octave, black keys (hold them, they can be combined):
      C#  sus2      D#  sus4      F#  7th      G#  9th      A#  strum
      sus2: the 3rd becomes the 2nd (e.g. C D G); sus4: the 3rd becomes the 4th (C F G).
      The suspended note is re-attacked (with pianos and bell it changes without a new strike).
      If both are held, sus4 wins. The chord keeps the same level with 3, 4 or 5 voices.
  High octave, black keys (hold them, they can be combined):
      C#  octave down  D#  octave up  F#  vibrato  G#  pitch +2 semitones  A#  tremolo

STRUM (low A#, Strum page: cell 1 of screen 6)
  Hold a chord and tap A#: the chord is strummed like a guitar, with 5 strings.
  Holding A# while pressing a chord strums it straight away. With strum the chord
  spreads to 5 voices (root and 3rd an octave up, or the 7th and 9th if you are using
  them). Works in the looper too.
  STRUM HOLD: the Strum cell (screen 6) opens the Strum page the first time; pressed
  again it switches HOLD on ("Strum:HOLD"): strum stays always on, and the low A# does
  the opposite, removing strum while you hold it. Press the cell again to switch HOLD
  off (Panic switches it off too).
  Strum page:
  1 Dir     strum direction: AUTO (taps alternate down and up; with a rhythm it follows
            the pattern), DOWN (always low to high), UP (always high to low),
            RANDOM (strings in random order on every strum)
  2 Speed   time between the strings, from 10 ms (very fast) to 300 ms (almost an
            arpeggio); 45 ms by default
  3 Rhythm  OFF = one strum per tap. The others: while you hold A# (and the chord is
            sounding) the strum repeats IN TIME (BPM or MIDI clock), down and up:
              1/4     one down-strum per beat
              1/8     down on the beat, up on the offbeat
              FOLK    down, down-up, up-down-up (the classic acoustic guitar pattern)
              REGGAE  offbeats only, up-strums (the "skank")
              GALLOP  sixteenth-note gallop (down, down-up)
              FUNK    syncopated sixteenths
              EUCLID  strums spread evenly over 16 steps
              RANDOM  random strums, down or up
            With a rhythm on, each strum mutes the previous one (like guitar strings: no
            tails piling up, even with long Releases) and a strum never lasts more than
            half a pattern step (Speed is shortened if needed), so strings don't overlap.
  4 Var     makes everything more alive and generative. On the fixed patterns it drops
            some strums and adds others at random (0 = exact pattern); on EUCLID it
            sets how many strums (2 to 12 out of 16); on RANDOM how dense it is. With a
            rhythm on it also adds a little timing looseness, like a real player.
  Everything is saved in presets.

AUX MENU
  Hold Aux: after a moment a grid of 10 cells appears and stays while Aux is held.
  Cells are selected with the 10 BLACK KEYS (left column = low black keys,
  right column = high black keys).
  The menu has FIVE screens and always opens on the first one. To change screen use
  the "More >" cell or, with the menu open, TURN THE ENCODER
  (the top line shows "Menu 1/6", "Menu 2/6"...).

  SCREEN 1 (looper)                     SCREEN 2 (sound)
  C#   1 Loop: Play/Stop   6 Pg:Main      C#   1 Ch Sound   6 Nt Sound
  D#   2 Rec               7 Gate On/Off  D#   2 Ch Filter  7 Nt Filter
  F#   3 Dub               8 Metronome    F#   3 Ch ADSR    8 Nt ADSR
  G#   4 Undo              9 Quantize     G#   4 Scale      9 Link:Off/On
  A#   5 Clear            10 More >       A#   5 Octave    10 More >

  SCREEN 3 (effects and generative)     SCREEN 4 (samplers)
  C#   1 G: Gate     6 Gen Ch             C#   1 S1 Play     6 S2 Play
  D#   2 X: Crush    7 Gen Nt             D#   2 S1 Level    7 S2 Level
  F#   3 Tape        8 Gen:Play/Stop      F#   3 S1 Grain    8 S2 Grain
  G#   4 Drive       9 EQ                 G#   4 S1 Shape    9 S2 Shape
  A#   5 LFO        10 More >             A#   5 Accorda    10 More >

  SCREEN 5 (SAMPLERATOR)
  C#   1 SR:Start/Stop   6 Test
  D#   2 SR Note         7 Esporta (export)
  F#   3 SR Tempi        8 Importa (import)
  G#   4 SR Loop         9 Cancella (delete)
  A#   5 SR Opzioni     10 More >

  SCREEN 6 (strum, delay, tempo, presets, outputs)
  C#   1 Strum/HOLD      6 Preset
  D#   2 Delay           7 Save N
  F#   3 Tap tempo       8 Load N
  G#   4 Sync: Int/MIDI  9 Out: Stereo/Split
  A#   5 Keys           10 Panic

  The menu reopens on the screen where you left it. If you changed knob page in
  the meantime, it opens on the screen of that page's section (e.g. on a sampler
  page on screen 4). For the others: turn the encoder.
  Link: the first press opens the Link page, further presses switch Link on/off
  (see LINK).
  G: and X: cells - the first press opens the page (Gate or Crush), further presses
  step to the next algorithm.
  The active cell is highlighted. While the menu is open the keys do not play.
  Quantize: 1/16 -> 1/8 -> 1/4 -> Off.   Scale: the first press opens the Scale
  page, further presses step to the next scale.
  Sync: Int = internal BPM; MIDI = BPM taken from incoming MIDI clock (see TEMPO).
  Tap tempo: tap in time 2 or more times (only with Sync:Int); it also takes you to
  the BPM page, where knob 1 sets the BPM (see TEMPO).
  Keys: external keyboard and velocity options (see EXTERNAL KEYBOARD).
  Gen: Play/Stop stops and restarts the generative engine without touching the knobs.
  Out:Split = chords on the LEFT output only, notes on the RIGHT only (see SPLIT OUTPUT).
  Panic: releases stuck notes and modifiers (does not stop looper or generative).
  Aux + encoder turned right away (before the menu appears) = next/previous scale.
  Aux + encoder click = Organelle system menu.
  Short tap on Aux while the looper is recording: closes the loop and starts playback.

LOOPER (records the keys: chords, notes and modifiers)
  Rec    from stop or play: 1 bar count-in (click), then records.
         Rec again (or a short tap on Aux): closes the loop and plays it at once.
         Length is rounded to the nearest bar, 16 bars maximum.
  Play   starts / stops the loop (restarts from the top).
  Dub    adds parts over the loop; Dub again to go back to play.
  Undo   undoes the last recording, overdub or clear (press again = redo).
  Clear  erases the loop.
  LED: red = count-in / REC, purple = overdub, green = HOLD.

KNOB PAGES (each page remembers its values; chords and notes are independent)
  At startup: volume 60, filter 99 (open), reverb and delay 0.
  Main      1 Chord volume   2 Chord cutoff   3 Note volume   4 Note cutoff
  Ch Sound  1 Chord sound   2 Detune   3 Reverb send   4 Delay send
            Detune: with SIN, TRI, SAW, SQR, SUPER and CHOIR it detunes the voice's
            second oscillator; with all other sounds (sampled, ORGAN, BELL, GLASS, ...)
            it adds two copies of the sound, one tuned up and one down (up to 35
            cents): beating and a wider sound, like two instruments slightly out of
            tune. At 0 it is off.
  Ch Filter 1 Type   2 Cutoff   3 Resonance   4 Env
  Ch ADSR   1 Attack (3-3000 ms)  2 Decay (10-3000 ms)  3 Sustain (%)  4 Release (10-5000 ms)
            Every note restarts the envelope from zero, even when playing fast or legato.
  Nt Sound / Nt Filter / Nt ADSR   same as above, for the notes
  Octave    1 Chord octave  2 Note octave  (-2 to +2; 0 = chords from C3, notes from C4)
  Gate      1 Rate   2 Var   3 Len   4 Depth (0 = effect off)
  Crush     1 Bits   2 Down   3 Var   4 Mix (0 = effect off)
  Tape      1 Wow   2 Flutter   3 Age   4 Amount (0 = effect off)
  Drive     1 Drive   2 Type   3 Tone   4 Mix (0 = effect off)
  EQ        1 Low   2 Mid   3 High   4 Pump
  LFO       1 Rate   2 Shape   3 Depth   4 Phase
  Link      1 Sound   2 Filter   3 ADSR   4 Reverb and delay  (left = Off, right = On)
  Scale     1 ChShift   2 Spread   3 Shift (notes)   4 Key
  Strum     1 Dir   2 Speed   3 Rhythm   4 Var
  Gen Ch    1 Chord algorithm   2 Rate   3 Var   4 Len
  Gen Nt    1 Note algorithm   2 Rate   3 Dens   4 Rng
  Delay     1 Algorithm   2 Delay division   3 Feedback   4 Repeat tone
  BPM       1 BPM   (the other knobs do nothing)
  S1 Play / S2 Play     1 Slot (1-8)   2 Mode   3 Start   4 Len
  S1 Level / S2 Level   1 Gain   2 Tune   3 Fine   4 Tone
  S1 Grain / S2 Grain   1 Size   2 Dens   3 Scan   4 Spray
  S1 Shape / S2 Shape   1 Fade In   2 Fade Out   3 Loop   4 Rnd
  Keys      1 Chord vel   2 Note vel   3 Mod (wheel)   4 VelF
  SR Note   1 From (lowest note)   2 To (highest note)   3 Step   4 Monitor
  SR Tempi  1 Hold   2 Tail   3 Mode (MANUALE / MIDI-ch1...16)   4 Velocity
  SR Loop   1 Loop start (OFF / 5-90%)   2 Loop end   3 Fade   4 -
  SR Opzioni 1 Slot (1-4)   2 Mem: samples on SD / USB   3 Archive (1-99, on USB)   4 Input
  Preset    1 Slot (1-8)

  KNOB PICK-UP: after a page change, a preset load or at startup, a knob does not
  change the value until it passes over it. The bottom line tells you where to go,
  e.g. "Knob2: 23 -> 67" (the knob is at 23, the value is 67): turn it towards 67;
  as soon as it crosses the value it picks it up and follows it.

SOUNDS (knob 1 of the Ch Sound / Nt Sound pages, left to right)
  -- generated in Pure Data --
  SIN          "analog" sine, modelled on the sine output of a Doepfer A-110 VCO:
               warm and full (with SIN the chords play one octave higher)
  TRI          Minimoog Model D style triangle: rounded tips and slightly different
               rise/fall, like the real instruments; soft and warm, clean in the highs
  SAW          sawtooth
  SQR          square
  SUPER        supersaw: 7 detuned saws; Detune sets how wide they spread
  JUPITER-4    Roland Jupiter-4 style PWM strings, rebuilt in Pure Data from the samples:
               near-square pulse with fast PWM (6.8 Hz) + square one octave up
  HS-80        Roland HS-80 "wide open", rebuilt in Pure Data: narrow pulse + saw one
               octave up, open filter and a swirling chorus
  GLASS        FM electric piano: bright attack and pure tail
  CHIP         80s console 8-bit with an octave trill IN TIME (sixteenth notes,
               follows the BPM or the MIDI clock)
  CHOIR        choir: vocal formants slowly moving from "a" to "o"
  WARBLE       pulse with tape wow & flutter and moving pulse width
  ORGAN        full drawbar organ (light 16', percussion and key click, Leslie)
  BELL         small bell / glockenspiel: sharp, ringing strike, then a pure "ding"
  -- sampled (piano/ and instr/ folders) --
  GRANDPIANO   piano: samples from Critter & Guitari's "Cinematic Piano" (12 zones)
  BRIGHTPIANO  bright upright piano (13 zones)
  ARPA         concert harp (10 zones)
  VIOLIN       sampled violin, one zone every 4 semitones from G3 to G6 (10 zones):
               real bow attack, sustains while the key is held. Chords use dedicated
               samples with more body and fewer highs, so they don't clash with the melody
  CELLO        sampled solo cello: slow, full-bodied attack
  TRUMPET      trumpet, sustains while the key is held. Notes: firm attack (11 zones);
               chords: soft attack, swelling in, with more low-end body (13 zones)
  TROMBONE     trombone with vibrato, sustains while the key is held (6 zones)
  SAX          tenor sax, sustains while the key is held. Notes: firm attack (11 zones);
               chords: softer attack and more low-end body (9 zones)
  DONNA AH     sampled female voice singing "ah" (5 zones)
  DONNA LA     sampled female voice singing "la" (5 zones)
  -- your own samples --
  SAMPLER1/2   your own samples: two independent samplers (see SAMPLER)
  SYNTH1-4     instruments made by the SAMPLERATOR by sampling your synth (see SAMPLERATOR)
  GRANDPIANO, BRIGHTPIANO, ARPA and BELL decay on their
  own: they also sound good with high Sustain. Strings, brass and voices hold the note
  while the key is held.
  DETUNE (knob 2): with ALL sounds, samples included, each voice slowly drifts in pitch
  at its own speed, so the notes of a chord move apart (ensemble / chorus effect), up
  to +-15 cents. On the synthetic waves (SIN TRI SAW SQR) a second oscillator also
  opens up to 35 cents (on SIN and TRI it also fades in with the knob); on SUPER the 7 saws spread up to 80 cents. 0 = perfectly in tune.
  Reverb and delay are shared: each part decides how much to send.
  Reverb: more send = more reverb AND a longer tail (from ~1.5 s to over 4 s);
  clearly audible at halfway, fully right is an ambient wash.

FILTERS (Ch Filter and Nt Filter pages: one for chords, one for notes)
  The filter is "Moog style": soft and warm, fully signal-rate (turning the knobs or
  the envelope never makes it click), with a little saturation that makes it sing.
  1 Type       LP    12 dB low-pass (soft)
               MOOG  24 dB low-pass, the classic Moog (starting type)
               HP    high-pass (removes the lows)
               BP    band-pass (only one band, "nasal" sound)
               NOTCH removes a narrow band
  2 Cutoff     filter frequency, 30 Hz to 17 kHz (shown in Hz).
               LP/MOOG fully right = filter open.
  3 Resonance  emphasis at the cutoff frequency: from soft to very strong; towards
               the right the filter sings. As on a Moog, the lows drop a little as you
               raise it; in the highs it damps itself, so it never whistles.
  4 Env        on every attack the filter opens (up to 6 octaves above Cutoff) and
               closes again: fast at first and then slowly, like analog synths
               (wah / pluck). How fast it closes is set by the Decay of the same
               section's ADSR page. You hear it with a low Cutoff: with the filter
               already fully open there is no room to open further.

SCALE (cell 4 "Scale" of screen 2: the first press opens the page)
  1 ChShift (display: ChSh) moves the CHORDS -7 to +7 degrees inside the
            scale. E.g. +1: the I key plays ii, V plays vi (in C: C->Dm, G->Am);
            +4: I becomes V. +-7 = one octave up/down. Also applies to the looper
            and the generative engine (arpeggios follow). 0 = normal.
            The display shows the name of the chord actually playing.
  2 Spread  chord voicing: CLOSE (notes close together), OPEN (fifth an octave up),
            BASS (plus the root an octave down, like a bass line),
            WIDE (plus the third an octave up: very wide chord)
  3 Shift   (display: NtSh) the same for the NOTES (harmonizes): moves them from -7 to +7 degrees INSIDE the scale,
            so they always stay in key. E.g. +2 = a third above (press C, hear E),
            +4 = a fifth above, -2 = a third below. 0 = normal.
  4 Key     key of the notes relative to the main key, from -6 to +6 semitones
            (the chords stay where they are). E.g. chords in C and notes in G = -5.
            The notes follow the same scale, shifted.
  Saved in presets.

OCTAVES (Octave page, cell 5 of screen 2)
  By default chords start from C3 and notes from C4 (the melody sits above).
  1 Ch oct / 2 Nt oct move chords and notes from -2 to +2 octaves.
  The line below shows where they start (e.g. "Ch da C3  Nt da C4"); centre = 0.

GATE (rhythmic cut)
  Acts on the whole sound (reverb and delay included), in time with the BPM;
  when the looper starts, the pattern restarts from the first step.
  Patterns (cell "G:" of screen 3, each press steps to the next):
    EVEN    every step                TRANCE  1011011010110111
    OFFBT   offbeats only             DOTTED  every 3 steps
    TRESIL  3+3+2 (tresillo)          HALF    2 on, 2 off
    EUCLID  N hits spread over 16 (N with Var)
    RANDOM  random steps (probability with Var)
    MANUAL  you cut it: Var below half = sound off, above = on
    LFO     the level follows the wave of the LFO page (tempo-synced tremolo)
  1 Rate   step length: 1/4, 1/8, 1/8T, 1/16, 1/16T, 1/32
  2 Var    shifts the pattern by N steps (EUCLID: number of hits, RANDOM: probability)
  3 Len    how long each step stays open: staccato (left) to legato (right)
  4 Depth  how deep it cuts: 0 = off, fully right = full silence
  Gate On/Off (cell 7 of screen 1) switches it on and off on the fly.

CRUSH (bitcrusher, cell "X:" of screen 3)
  Reduces bit depth and sample rate. An algorithm decides step by step how much to
  crush (same timing and Rate as the Gate):
    STATIC  fixed at Bits and Down (Var = small random changes on each step)
    GATE    on the active steps of the Gate pattern (even with Gate Depth at 0)
    INVERT  on the inactive steps of the Gate pattern
    RAMP    rises over the 16 steps and restarts (Var moves the starting point)
    LFO     follows the wave of the LFO page
    RANDOM  random amount on each step (Var = how often)
    BURST   random full hits (Var = probability)
  1 Bits  from 8 bits (light) to 1 bit (digital fuzz); about 4 bits at half.
          Bits are reduced relative to the actual level: it sounds the same at any volume
  2 Down  how much the sample rate is lowered, down to about 120 Hz: metallic
          aliasing, more and more "robotic" towards the right (no filter)
  3 Var   adjusts the algorithm
  4 Mix   0 = off, fully right = crushed sound only (the clean sound fades out faster
          than the crushed one fades in, so it never sounds "hollow" halfway)

LFO (cell 5 of screen 3)
  A tempo-synced wave that moves the Gate (G:LFO algorithm) and the Crush (X:LFO).
  1 Rate   length of one cycle: 4BAR, 2BAR, 1BAR, 1/2, 1/4, 1/8, 1/16
  2 Shape  SIN, TRI, RAMP+ (up), RAMP- (down), SQR (square),
           STEP (8 steps of different levels, one per cycle, repeating)
  3 Depth  how much it moves (0 = still at maximum, fully right = from zero to maximum)
  4 Phase  shifts the wave within the cycle
  Follows the BPM or the MIDI clock. Saved in presets.

LINK (cell 9 of screen 2)
  Ties chords and notes together: with Link on, the groups enabled on the Link page are
  the same for both parts, and changing one (on any page) also changes the other.
  1 Sound    the instrument (Ch Sound / Nt Sound, knob 1)
  2 Filter   type, cutoff, resonance and env (Ch Filter / Nt Filter and Main pages)
  3 ADSR     attack, decay, sustain and release
  4 FX       reverb and delay sends
  Each knob: left = Off, right = On (at first only Sound is on).
  When you switch on Link or a group, the notes take the chord values.
  The Link cell: the first press opens the page, then it switches Link on and off.
  Saved in presets.

TAPE (worn cassette, cell 3 of screen 3)
  At startup Amount is 0 = effect off: raise Amount to hear it.
  1 Wow      slow, irregular pitch drift
  2 Flutter  fast pitch wobble
  3 Age      the tape "lives" in time: it drags a little on every beat, has random
             volume drops on sixteenths and, past halfway, at the end of every
             2 bars it sometimes brakes and restarts on the downbeat; plus saturation
             and softened highs
  4 Amount   overall amount of the effect

DRIVE (distortion, cell 4 of screen 3)
  1 Drive  how hard to push (the level is compensated)
  2 Type   SOFT warm, HARD hard clipping, FUZZ asymmetric and rough,
           FOLD wavefolding (metallic sounds)
  3 Tone   dark (left) / bright (right)
  4 Mix    0 = off, fully right = distorted sound only

EQ (equalizer and Pump on the final mix, cell 9 of screen 3)
  1 Low    lows (below ~180 Hz), -15 to +15 dB; centre = flat
  2 Mid    mids (~800 Hz), -15 to +15 dB; a small cut makes the bass sound fuller
  3 High   highs (above ~6 kHz), -15 to +15 dB
  4 Pump   sidechain-style "breathing" in time: on every beat the mix ducks and
           comes back. 0 = off
  When you boost a band the rest of the mix is lowered a little, so the boosted band
  really stands out. A final limiter prevents distortion. The metronome click does
  not go through the EQ.
  "Pumping bass" recipe: Low 75-90, Mid 35-45, Pump 60-80.

TEMPO (BPM page: Tap tempo cell of screen 6)
  One tempo for everything: looper, metronome, Gate, Crush, LFO, Tape, Pump, generative, delay.
  The Tap tempo cell does two things: tapped in time 2 or more times it sets the BPM,
  and it takes you to the BPM page (close the menu and you're there). On the BPM page:
  1 BPM   40-240 (can also be changed by holding the encoder down and turning it)
  The line below shows whether tempo is internal (Sync Int) or from MIDI clock (Sync MIDI).

DELAY (Delay page, cell 2 of screen 6)
  Stereo delay in time with the BPM (or MIDI clock).
  1 Alg   algorithm for the repeats (its name also shows at the bottom, e.g. D:TRANCE):
          DRITTO (straight, default) = the normal delay, repeats always open.
          EVEN, TRANCE, OFFBT, DOTTED, TRESIL, HALF, EUCLID, RANDOM = the same patterns
          as the Gate, but they chop only the delay repeats in rhythm (the dry sound
          stays full): one pattern step lasts one delay division (knob 2), so Dly also
          sets the pattern speed. The feedback keeps running underneath: when the
          pattern reopens, the repeats are there.
          LFO = the repeat volume follows the LFO page wave (shape and speed are set there).
          (The Gate's MANUAL is not here: there's no free knob to "cut by hand".)
  2 Dly   delay division: 1/2, 1/4, 1/4D, 1/4T, 1/8, 1/8D, 1/8T, 1/16
          (left = the division, right = double: ping-pong effect)
          D = dotted: one and a half times as long (1/8D = an eighth + a sixteenth)
          T = triplet: two thirds as long (three 1/8T fit in the time of two 1/8)
          Presets saved before this version may land on a different division (the
          order changed): just turn the knob again.
  3 Fb    delay repeats
  4 Tone  colour of the repeats: fully left = dull and distant (250 Hz), middle =
          soft (default), fully right = open and bright. It acts from the first
          repeat on, and with feedback every pass gets a little darker.
  MIDI SYNC (cell 4 of screen 6): with an incoming MIDI clock (USB or MIDI in) the BPM
  follows the clock and everything stays locked to the drum machine / DAW.
  If the clock stops for more than half a second the internal tempo takes over.
  External Start / Continue / Stop:
    - Stop: the looper stops and the generative engine pauses.
    - Start: the looper restarts from the top in time (if a loop is recorded), the
      generative engine restarts on the downbeat, Gate and Crush from step one.
    - Loop:Play with Sync:MIDI and a clock present: playback is "armed"
      ("ARMED: wait MIDI") and starts by itself on the next external Start, or at the
      next bar if the external device is already playing. Press Play again to cancel.

EXTERNAL KEYBOARD (USB MIDI, on the MIDI channel set in the Organelle menu)
  C4-B5 of the external keyboard = the 24 Organelle keys (same layout).
  With a bigger keyboard the other octaves become an extension:
    - BELOW C4: chords one (or two, three, four) octaves lower, with the same
      layout as the low octave (white = chords, black = sus2, sus4, 7th, 9th,
      strum). E.g. C3 = the I chord one octave down.
    - FROM C6 UP: notes one (up to three) octaves higher, with the same layout
      as the high octave (black = 8vb, 8va, vibrato, bend, tremolo).
    The extension is always active.
  The looper also records the octave and velocity of every key.
  Keys page (cell 5 of screen 6):
  1 ChVel   how much velocity changes the CHORD volume (0 = none, default)
  2 NtVel   how much velocity changes the NOTE volume (0 = none, default)
  3 Mod     what the external keyboard's mod wheel (CC1) does: Off (default),
            Vibrato (notes, deeper as you raise it), Filtro (opens the chord and
            note filters, up to 4 octaves above Cutoff), Tremolo (notes), Drive
            (pushes the Drive page distortion to the max, Mix included; wheel
            down = back to the knob values). Black-key vibrato and tremolo still
            work: the stronger of the two wins.
  4 VelF    velocity to filter: soft playing darkens the sound, hard playing stays
            at the set Cutoff (fully right: up to 3 octaves darker at minimum
            velocity). Works on chords and notes, each with its own filter.
            0 = none (default).
  With velocity turned up (ChVel, NtVel, VelF), the Organelle's own keys (not
  velocity sensitive) may play a bit softer or darker: keep it at 0 if you only
  play those.
  Saved in presets.

GENERATIVE (cells "Gen Ch" and "Gen Nt" of screen 3)
  The patch plays chords and/or notes by itself, in the chosen key and scale, with the
  normal sounds, effects and modifiers. It follows the BPM or the MIDI clock.
  You can play along: it uses the same keys, so the last key pressed wins.
  The looper does not record what the generative engine plays.
  Knob 1 fully left = OFF. Gen:Play/Stop (screen 3) stops and restarts everything.
  Gen Ch page (chords)
    1 Ch    OFF, PROG    classic progressions (I-V-vi-IV, vi-IV-I-V, ii-V-I ...)
                 CIRCLE  circle of fifths
                 WALK    small steps to a neighbouring degree
                 RANDOM  random, weighted towards I, IV, V, vi
                 DRONE   stays on I, now and then IV or vi
    2 Rate  how often it changes: 2BAR, 1BAR, 1/2 bar, 1/4, SYNC (3+3+2 repeat)
    3 Var   how often it adds 7th, 9th, sus2, sus4 (and changes progression)
    4 Len   chord length: staccato (left) ... legato up to the next chord (right)
  Gen Nt page (notes)
    1 Nt    OFF, UP / DOWN / UPDOWN / ARPRND  arpeggio on the notes of the chord
                 WALK    melody moving by small steps in the scale
                 RANDOM  half chord tones, half free scale notes
                 EUCLID  arpeggio with a euclidean rhythm (Dens = hits out of 16)
                 TURING  8-step phrase that repeats and slowly changes
    2 Rate  1/4, 1/8, 1/8T, 1/16, 1/16T
    3 Dens  probability that a step plays (EUCLID: hits; TURING: how much it changes)
    4 Rng   range: 1, 2 or 3 octaves
  The notes follow the chord that is playing, generated or played by hand.

SAMPLER1 / SAMPLER2 (menu screen 4, dedicated to the samplers)
  Two independent samplers, each with its own three pages (Play, Level, Grain), sample
  and settings. Choose
  SAMPLER1 or SAMPLER2 as the sound (knob 1 of Ch Sound or Nt Sound fully right).
  C4 plays the sample at its original pitch.
  The 8 slots are the files samples/1.wav ... samples/8.wav, shared by both samplers.
    1 Slot   choose the slot (the file loads as soon as you stop turning)
    2 Mode   ONESHOT (plays once), LOOP (repeats while the key is held), REVERSE,
             GRAIN (granulator, see below)
    3 Start  where the sample starts
    4 Len    how much of it to use (fully right = to the end)
  LEVEL page (S1 Level / S2 Level)
    1 Gain   sample volume, -12 to +24 dB (starts at +6). The sample is already
             brought up to full level automatically (normalized): Gain raises or
             lowers it from there. The final limiter prevents distortion.
    2 Tune   pitch, -12 to +12 semitones
    3 Fine   fine pitch, -50 to +50 cents
    4 Tone   low-pass: fully right = open, towards the left darker
  TUNE-UP "Accorda" (cell 5 of menu screen 4, A# key)
    Tunes the sample automatically: the patch silently "listens" to a slice of it
    (from 20% of its length, about 0.8 seconds, skipping the attack), detects the
    note and sets Tune and Fine so that playing C4 makes the sample sound a C.
    It works on the sampler of the page you were on (S2 Play/Level/Grain/Shape =
    SAMPLER2, otherwise SAMPLER1). While listening the cell shows "Ascolto...",
    then for 3 seconds the detected note and the correction (e.g. "A:+3st" = it
    was an A, raised by 3 semitones; the cents go into Fine). "NoNota!" = no clear
    pitch (noise, percussion, chords), "Vuoto!" = no sample in the slot.
    Works best with sustained single-note sounds; Tune and Fine can still be
    adjusted by hand afterwards. Redo it after changing slot (or save a preset).
  GRAIN page (S1 Grain / S2 Grain) - works with Mode GRAIN
    The S1 Grain (or S2 Grain) cell opens the page and switches Mode GRAIN on by
    itself; pressed again while you are on the page it switches it off (back to
    ONESHOT) or on again. The cell stays highlighted while the granulator is on.
    The sample is played as "grains": many small overlapping fragments taken from the
    zone chosen with Start and Len. The key sets the pitch (plus Tune/Fine), Scan sets
    the reading speed: you can stretch a sound forever, freeze it or turn it into
    a cloud.
    1 Size   left half = FREE: length of each grain, 10 to 500 ms (small = buzzy/grainy,
             large = closer to the original sample).
             Right half = IN TIME: a grain starts on every division (1/64, 1/32, 1/16T,
             1/16, 1/8T, 1/8, 1/4, 1/2), following the BPM or the external MIDI clock;
             with a low Dens the grains become a rhythm. The display shows ms or division.
    2 Dens   first half: grains always overlapping with soft windows, from "airy"
             (left) to full and continuous (centre); second half: the RESONATOR comes
             in, three resonant filters tuned to the played note (fundamental,
             octave, fifth above) that bind, lengthen and make the sample "sing";
             fully right = maximum resonance
    3 Scan   how fast the reading moves through the zone: 0 = still (frozen sound),
             halfway = normal speed, fully right = double
    4 Spray  random offset of each grain's position: 0 = precise, to the right an
             ever more scattered cloud. From 40% up the grains also change NOTE: each
             plays a random note near the key's one, always inside the patch's scale
             and key (in C major: C D E F G A B), further away as Spray goes up (fully
             right up to an octave above and below)
  Every note restarts from Start.
  SHAPE page (S1 Shape / S2 Shape)
    1 Fade In   fade-in, 0 to 2 seconds
    2 Fade Out  fade-out towards the end of the zone, 0 to 2 seconds
                (in LOOP: every cycle closes smoothly)
    3 Loop      in LOOP mode the first pass plays everything from Start, then it
                repeats only from this point to the end (0 = repeats everything): the
                attack is heard once and the rest works as a "sustain"
    4 Rnd       every note starts from a random point in the zone (0 = always from
                Start): with long or rhythmic samples every key sounds different.
                Works for the granulator too.
    Fade In and Fade Out work in ONESHOT, LOOP and REVERSE.
  RECORDING: from a sampler page (Play, Level, Grain or Shape) tap Aux briefly (or the
    footswitch): recording starts into the slot chosen on the Play page (red LED, the
    display counts the seconds). Another short tap stops it and saves to
    samples/N.wav (overwrites).
    20 seconds maximum; silence before and after is trimmed automatically. Input
    level is set from the Organelle system menu.
  LOADING your own file: copy it into the samples folder, named after the slot number
    (e.g. 4.wav). WAV, mono or stereo, any sample rate, 20 seconds maximum.

SAMPLERATOR (menu screen 5)
  Builds an instrument by itself by sampling an external synth: it plays it over MIDI
  one note at a time, records each note from the audio input, prepares the samples and
  puts them into instrument SYNTH1-4 (knob 1 of the Ch Sound / Nt Sound pages).
  CONNECTIONS: MIDI from the Organelle to the synth (TRS or USB), the synth's audio
    output into the Organelle input. On the synth: a fairly stable sound (better without
    arpeggiator, delay or very obvious free-running LFOs). The MIDI channel the patch
    plays the synth on is chosen with the Mode knob (MIDI 1-16) on the SR Tempi page.
  1 SR:Start  starts; while sampling the cell shows "REC 3" etc.; press again to stop
              (notes already done are kept). At the end: FATTO! (done), or
              FATTO:CLIP (input clipped: lower the input level in the Organelle menu
              or the synth output and redo), SILENZIO! (no sound arrives: check the
              MIDI channel and cables), STOP (stopped by you).
              In MANUALE mode the cell shows which note to play ("Suona C3").
              As soon as it starts the SR Rec page opens with the progress: "Nota 3 di
              13" and the state with the note: Attesa (waiting for silence), Nota->
              (note sent), Suona (manual mode), REC, then FATTO! / SILENZIO! / STOP /
              FATTO:CLIP.
  2 SR Note   knobs: From / To = range (C1-C7, default C2-B5), Step = one note every
              1, 2, 3, 4, 6 or 12 semitones. The display shows how many notes will be
              sampled ("1st:48n" = step 1, 48 notes); 48 max (4 octaves at step 1), above it
              shows "max48!" and only the first 48 would be done: widen the step or
              narrow the range. Knob 4 = Monitor: how much of the input you hear
              outside sampling. With C2-B5 at step 1 every note Chordelle plays (chords
              and melody in the normal positions) has its own sample: no transposition,
              no stretching. Notes played outside
              the sampled range use the nearest sample transposed (faster above, slower
              below): sample the whole range you will play.
  3 SR Tempi  knobs: Hold = how long each note is held (0.5-12 s, default 8),
              Tail = how much is recorded after the release (0-4 s), Mode, Velocity of
              the notes sent. While sampling and during the Test the input is always
              heard through the Organelle output; otherwise the Monitor sets it (SR
              Note page, knob 4).
              MIDI 1-16 mode: the patch plays the synth by itself over MIDI on that
              channel (it must be the channel the synth listens on; default MIDI 1).
              MANUALE mode = knob fully left.
              MANUALE mode (synths without MIDI, modulars, acoustic instruments, or if
              you prefer to play yourself): no MIDI; cell 1 shows which note to play
              ("Suona C3"), recording starts by itself as soon as sound arrives and lasts
              Hold + Tail (hold the note at least for the whole Hold), then the patch
              waits for silence and asks for the next note. No time limit: press
              SR:Start to stop.
  4 SR Loop   knobs (for the instrument of the chosen slot, heard from the next note,
              saved with the instrument and in the archive; no need to resample):
              Start = where the loop restarts, in % of the held part (Hold); fully left
              = OFF (the note plays to the end of the sample and stops); End = where the
              loop jumps back (10-100%); Fade = crossfade length between end and start
              (10 ms - 2 s): longer = smoother loop with no glitches, shorter = keeps
              more movement
  5 SR Opzioni knobs: Slot = the instrument used by sampling, loop, export, import and
              delete (SYNTH1-4; sampling overwrites it); Mem = where the samples of the
              SYNTH1-4 instruments live: SD (internal card, the patch's samplerator
              folder, as before) or USB (stick: create ONCE from a computer, on the
              stick, a folder named Chordelle_samplerator). Changing Mem reloads the
              instruments from there and new samplings are saved there; the choice is
              kept after power-off. "Mem USB?" = stick or folder not found (nothing
              would be saved). Samples are not copied from one place to the other: to
              move them use Export / Import (or copy them from a computer: files
              srNZZ.wav and infoN.txt). The stick is only needed at power-on and while
              sampling: the samples are loaded into memory;
              Archive = archive number (1-99) for Export / Import. The archive lives
              ONLY on the USB stick: create ONCE from a computer, on the stick, a
              folder named Chordelle_archivio (without stick or folder Export shows
              ERR:USB?). At the bottom the display shows how many notes the chosen
              archive holds ("USB:13note", "USB:vuoto");
              Input = L+R (fine for both mono and stereo synths), L only, R only
  6 Test      plays the middle note for 1.2 s and shows the input level
              ("In -12dB"; ideal between -18 and -3 dB; CLIP! = too loud, Silenzio = none)
  7 Esporta   copies the slot's instrument into the chosen archive (overwrites)
  8 Importa   loads the chosen archive into the slot (replaces the slot's instrument)
  9 Cancella  empties the slot and shrinks its files to nothing (frees space)
              Export, Import and Delete ask for confirmation: the first press shows
              "Sicuro?", press again within 3 seconds. Then the cell shows ESPORTATO,
              IMPORTATO, CANCELLATO or VUOTO! (nothing to export / empty archive).
  ARCHIVE: the 4 slots are the loaded instruments; the archive (on the USB
  stick, folder Chordelle_archivio, files xN.txt + xNZZ.wav) holds up to 99: export the ones you
  want to keep, delete the slot, sample another one, import them back when needed.
  To swap them or back them up copy the archive files (same number = same
  instrument). To play an instrument: SYNTH1-4 on the Sound pages.
  How it works: for each note it first waits for 0.3 s of silence at the input
  (silence = 34 dB below the previous note's peak; 4 s wait at most) (so
  neither the previous note's tail nor the C# key pressed to start, which the Organelle
  also sends over MIDI, gets in), then sends Note On, waits for the sound to arrive (synth
  latency doesn't matter, 5 ms pre-roll so the attack isn't cut), records Hold + Tail,
  sends Note Off, then adds fades and levels all notes the same. The sample stays
  untouched: the loop happens while playing, with an equal-power crossfade (no volume
  dips or clicks). Memory: with Hold 8 s + Tail 1 s and 48 notes an instrument takes
  about 75 MB (with Hold 12 s + Tail 4 s about 135 MB): keep at most 2-3 large ones
  loaded at once. The
  instrument grows note by note and can already be played while sampling. Example:
  C2-B5 at step 1 (48 notes) with Hold 8 s takes about 8 minutes; with the loop on,
  Hold 3-4 s is enough, about 4 minutes.
  Files live in the samplerator/ folder (sr101.wav ... and info1.txt ... info4.txt):
  they reload by themselves at startup. To delete an instrument delete its infoN.txt;
  to back up, copy the folder.

PRESETS (cell 6 of screen 6)
  Knob 1 chooses the slot (1-8); the display says whether it is empty or saved.
  Cell 7 "Save N" saves everything to the slot (overwrites without asking),
  cell 8 "Load N" loads it. For a moment the cell shows the result:
  SALVATO! (saved) / ERRORE! (error) / CARICATO! (loaded) / VUOTO! (empty)
  Saved: every knob of every page, key, scale, Gate pattern, Crush algorithm,
  Gate on/off, BPM, quantize, metronome, Sync, Out Stereo/Split, Gen Play/Stop and Link.
  The looper content is not saved.
  The Level, Grain and Shape pages of the samplers and the Strum page go into
  chordelle_presets2.txt (copy it too before updating). Presets saved with earlier versions load normally, with Level
  and Grain at their starting values.

SPLIT OUTPUT (cell 9 of screen 6)
  Out:Stereo  everything on both outputs.
  Out:Split   chords (with their reverb and delay) on the LEFT only,
              notes (with their effects) on the RIGHT only.

ENCODER
  Turn = key over 3 octaves (the display also shows the octave, e.g. "C3 Major")
  Click = HOLD    Hold down + turn = BPM

DISPLAY
  Line 1    key + scale (+ HOLD)
  Line 2    chord and note currently playing
  Line 3-4  knobs of the active page
  Line 5    active page, active modifiers, looper status or knob pick-up hint

PERFORMANCE
  Each chord voice has 3 voices taking turns and the notes have 8, so a new note never
  cuts the release tail of the previous one, even with fast generative patterns.
  Silent voices switch themselves off and use no CPU. Measured on an Organelle S2.
  On older Organelles the heaviest sounds are SUPER and the sampled voices, together
  with many effects switched on.

FILES
  main.pd            the patch
  gvoice.pd          one voice (all sounds + envelope)
  greverb.pd         stereo reverb
  chordelle_core.pd  copy of main.pd used by the self-test patch (Chordelle_Test)
  piano/             samples from Critter & Guitari's "Cinematic Piano" (BSD license,
                     see piano/LICENSE.txt)
  instr/             string, voice, piano, harp and brass samples (sources and licenses in
                     instr/CREDITS.txt; the cello sample is for non-commercial use only)
  samples/           the 8 sampler slots
