HOW TO MAKE A TOOL
==================

Every tool here is one short Python file in tools\code\ plus a .bat that runs it.
Open them in Notepad (or VS Code) and read them: they are written to be read.

  common.py      what all tools share: find the takes, read the recipe, write the video. Read it first.
  patterns.py    where things happen in time: fib, tresillo, euclid 5 16 ... Add your own rhythm there.
  aspero.py      on the pattern's frames, a frame from another take   (about 60 lines)
  crab.py        the crab walk: N forward, M back; only the order changes
  velvet.py      the opposite of aspero: stack the takes, average them
  melt.py        redraw each frame with a small image model, feeding the last frame back in
  my_tool_TEMPLATE.py   the one to copy


THE IDEA OF A TOOL
  A video is a list of pictures. A picture is a grid of numbers.
  A tool decides, for every frame of the output: which picture, from which take, changed how.
  - pick a different picture        (aspero, crab)
  - mix pictures together           (velvet)
  - redraw the picture              (melt)
  The machine does it for every frame, in seconds. That is the point: work no one would do by hand.


MAKE YOUR OWN (no coding needed to start)
  1. Copy code\my_tool_TEMPLATE.py and rename it, for example code\echo.py
  2. Copy MY-TOOL.bat, rename it ECHO.bat, open it in Notepad and change my_tool_TEMPLATE.py to echo.py
  3. Open Claude or ChatGPT in the browser. Paste:
       - the whole of code\common.py      (so it knows what it can use)
       - the whole of your echo.py
       - your idea, in your own words, e.g.
         "Change make() so that every time the pattern hits, the frame repeats 4 times
          and the next 4 frames are skipped, like the shot hiccups."
  4. Paste its answer into echo.py, save.
  5. Drag a folder of takes onto ECHO.bat. Look at the result. Change the recipe (echo.txt) or the idea.
  6. If it stops with an error, copy the whole error from the black window into the chat and ask it to fix it.

  Give your tool a name that comes from what it does to the picture. The name is a key:
  use it with the chat every time and the chat will start to understand you.


RULES THAT KEEP IT WORKING
  - All takes in a folder must be the same shot: same size, same length.
  - The first take by name is the BASE (it gives the sound).
  - Every result gets a .txt next to it: the recipe that made it. Keep them. That is your record.
  - MELT uses the GPU: close ComfyUI before you run it.
