# Find & Replace Edit ▸ Find and Replace… (**Ctrl+F**) finds the cells that match a pattern and replaces them with another. Each part of a cell is matched on its own, so one replace can retype a command and leave everything around it alone. The window stays open while you work in the pattern, and follows the cursor. The layout is Windows MED SoundStudio's, and the way a field is matched or left alone is the one both MEDs document. ## Source and Replace with Each row is a cell laid out as the grid shows it: the note, then one field per digit of the instrument number, the command and its value, and the second command level where the block has one. Every field is one of two things: - **x**, which MED calls *transparent*. In Source it matches anything; in Replace with it leaves that part of the matched cell as it was. - **A value**, matched or written exactly. An empty note (`···`) is a value too: in Source it matches only cells with no note, not every note. Because matching is per digit, Source `xxx xx 04 xx` with Replace with `xxx xx 1x xx` turns every command 04 into 14 and leaves the digits after it alone. ## Typing into a field Click a field, or Tab into a row, then: | Key | Does | |---|---| | A note key | Sets the note at the entry octave, as in the grid | | 0–9, A–F | Sets a digit. The first instrument digit takes 0–3 only | | **Enter** | Makes the field x | | **X** | Makes a digit x. On the note X is a note key, so use Enter there | | **Del** or **Backspace** | An empty note, or a 0 digit | | **←** / **→** | The previous or next field | | **F**, **Shift+1 / 2 / 4**, **Shift+S** | DEF, 11k / 22k / 44k and STP on the note, as in the grid | Each key that sets a field moves on to the next one. ## ANY, CLEAR and PICK Beside each row: - **ANY** makes every field x. In Source it matches every cell; in Replace with it changes nothing. It is MED's Res. button. - **CLEAR** is a blank cell: an empty note and every digit 0. In Source it matches only empty cells; in Replace with it writes zeros. MED's Clear. - **PICK** copies the cell under the cursor, every field a value. Since the window stays open, you can click a cell in the grid and pick it, then press **X** or **Enter** on the fields that should not count. **⇅ SWAP SOURCE & REPLACEMENT** exchanges the two rows, which was MED's way to reverse a replace. Mediante has undo as well. ## Replace in Where REPLACE ALL works: the whole song, the current block, the cursor's track in the current block, a marked range, or the cell under the cursor. While a range is marked, the range is the scope and the box is greyed until you deselect, as in Windows MED. Beside it is the number of cells in that scope that match Source right now. Command digits are matched on the command page the cursor is on (**Tab** in the grid changes it), and the title bar names that page when it is not the first. ## FIND and REPLACE ALL **FIND NEXT** and **FIND PREV** move the cursor to the next or previous match. They search the whole song from the cursor, block by block, wrapping round, and ignore *Replace in*: Windows MED says the same of its box, which is for replacing only. **REPLACE ALL** replaces every match in the scope in one go. Each block it changes is one undo step, so a whole-song replace can take several, and the line at the bottom says how many blocks it changed. MED had no undo here, only swapping the rows and replacing again.