# Song Tempo Song ▸ Song Tempo… sets the song's three tempo numbers — primary tempo, ticks per line and lines per beat — under the tempo mode the song is already in. The mode (BPM, SPD, or SPD for 8 channels) is in the title bar and is read-only here: changing it converts the tempo, which is [Tempo Operations](#tempo-operations), behind the button at the bottom. Windows MED's Song Tempo dialog has these three numbers and a BPM / SPD switch. Here the mode is changed by converting, in Tempo Operations, which Amiga OctaMED opened from its Tempo window's Edit button, as this dialog's button does. A box applies as you leave it (Enter, Tab or a click elsewhere) and the arrows apply at once. A change reaches a playing song immediately and can be undone; saving afterwards rewrites the module rather than patching the original file. ## Primary tempo The tempo, on the scale the mode sets: | Mode | Range | Note | |---|---|---| | BPM | 1–240 | a BPM only at 6 ticks per line | | SPD | 11–240 | higher is faster | | SPD (8 channel) | 1–10 | lower is faster | A value outside the range is refused with a message; the box's tooltip gives the current range. The arrows step by 1, Shift by 10, and Alt by 0.01 in BPM mode. ### A fractional tempo In BPM mode the tempo can have a fraction, such as 62.5. SPD tempos are indices into a hardware timer, so a fraction typed there is rounded. The .med header stores whole numbers only, so it gets the nearest one, and the exact value is kept in the .medz sidecar; a plain .med save plays at the whole number. While the tempo is fractional, a line beside the Tempo Operations button says so. Its tooltip names a way to keep the exact speed in the .med itself when there is one: in BPM mode the speed depends on tempo × lines per beat, so 125.5 BPM at 4 lines per beat plays exactly like 251 at 2 — at the cost that the tempo box and the beat highlighting then read against the new grid. Below 7, a fractional tempo is refused: MED SoundStudio 1.03 plays any tempo under 7 at a fixed 111.5 BPM, and Mediante does the same, so a fraction there could not take effect. ## Ticks per line 1 to 255: how many ticks make one line, so the line rate is the tick rate divided by it. MED's tempo value is a BPM only at 6 ticks per line — see the musical tempo, below. ## Lines per beat 1 to 32. In BPM mode it is part of the clock and of the grid: the tick rate is set by tempo × lines per beat, so more lines per beat means faster lines at the same beats per minute, and it sets the beat highlighting in the pattern (a beat every that many lines, a bar every four beats). In the SPD modes it changes neither: the speed comes from the tempo alone, and the highlighting uses 4. ## The lines under the boxes - **Ticks and lines per second** — the rates the three numbers produce, exact in every mode. - **The musical tempo** (≈ BPM, BPM mode only) — the tempo you would tap along to: 6 × tempo ÷ ticks per line. MED's tempo value is a BPM only at 6 ticks per line; at any other it is off by 6 ÷ ticks per line, and the line is highlighted. The SPD modes do not define a beat (lines per beat is not a beat there), so they get the rates only. - **A fractional tempo** — beside the button, as above. The mode in the title bar says, on hover, what changing it involves. ## Tempo Operations Tools ▸ Conversions ▸ Tempo Operations…, the button at the bottom of Song Tempo, or the link on the 5–8 channel row of [Song Properties](song-properties.md). It changes the song's tempo mode, converting the tempo so the song keeps its speed, and writes tempo commands. It is Amiga OctaMED's window of the same name; Windows MED has none. A conversion is one step you can undo, including any tempo commands it rewrote. It reaches a playing song at once, and the next save rewrites the module. The line at the top gives the mode, tempo, ticks per line and lines per beat the module has now. ### Conversion Four buttons, with MED's own labels. The top pair changes the tempo mode, SPD → BPM and back. The bottom pair moves between the two SPD scales: "4 Ch" is 11 to 240, higher is faster, used by 4-channel and mix-mode songs; "8 Ch" is 1 to 10, lower is faster, the Amiga's 5–8 channel mode. 4 Ch → 8 Ch puts the song in 5–8 channel mode; neither changes how many tracks it has. Each button's second line says what it would do to this module: - **→ BPM 131** — the whole tempo on the new scale closest to the song's current speed. - **⚠ BPM 240, 52% slower** — the song's speed is beyond what the new scale can reach at all, so the result plays that much slower (or faster). - **already in this mode**, or the step that would unblock it. Hovering a button gives the full sentence, including how far the nearest whole tempo is from the exact speed. A conversion is refused, and its button names what to do first, when: - the song is in 5–8 channel mode and you ask for BPM or SPD: that mode ignores BPM mode entirely, so convert 8 Ch → 4 Ch first; - the song is in BPM mode and you press a channel button: those convert between the two SPD scales, and BPM is neither, so convert BPM → SPD first; - the song is in mix mode and you ask for 8 Ch: mix mode is already on the 4-channel scale; - the module is a ProTracker one and the conversion would leave it at other than 4 lines per beat. ### Lines/Beat The lines per beat to convert at. **Keep**, the default, leaves the song's own, as MED does; moving it changes how many lines make a beat. In BPM mode the speed depends on tempo × lines per beat, so lines per beat decides which speeds BPM mode can reach at all: when SPD → BPM cannot keep the song's speed, the warning under the checkboxes names a setting that can, and the menu marks it "suggested". Converting at a new lines per beat always rewrites the song's 0F tempo commands too, ticked or not: in BPM mode a tempo command means a different speed at a different lines per beat. ### Change Commands Also rewrites every 0F set-tempo command in the song onto the new scale, so the tempo changes later in the song keep their speed, not just the opening tempo — what OctaMED's Change Commands does. Only 0F 01 to F0 set the tempo; 0F F1 and above are other commands and are left alone. ### Exact tempo SPD → BPM only. A conversion normally lands on the nearest whole tempo, and that rounding is the whole of its error; ticked, the tempo is set to the exact value instead, kept in the .medz sidecar. The .med header still gets the nearest whole tempo, so a plain .med save plays at the rounded speed. The SPD → BPM button and the checkbox's tooltip show both outcomes before you convert. It is greyed when there is nothing to make exact: every other conversion lands on an SPD scale, whose tempos are indices into a hardware timer with a fixed set of speeds and nothing finer to store, and a conversion that already lands on a whole tempo needs no sidecar. ### Insert Tempo Change Writes an 0F command with the song's current tempo at the cursor, so playback takes that tempo when it reaches the line. The level is on whatever scale the song uses. Tempos above 240 cannot be written, since 0F F1 and up are other commands. It works whether or not edit mode is on, and can be undone. ### Set As Default Makes File ▸ New start from this module's tempo mode, tempo, ticks per line and lines per beat — for this session only; nothing in this module changes. OctaMED keeps it with Save Settings, which Mediante has no equivalent of yet.