Kraftor SAM Serial MIDI
Media
User Manual
Version 1.3
Kraftor SAM is a Software Automatic Mouth text-to-speech firmware for Kraftor / SAMD21 hardware. It reads typed text
over USB Serial, stores phrases in RAM and optional RC256 FRAM, and lets you trigger stored phrases or shape the voice
via USB MIDI or the hardware serial MIDI input.
Version History
- v1.3 (2026-07-12) : Added four-position DIP switch MIDI channel selection for USB MIDI and
Serial MIDI. All switches off selects Omni mode; DIP values 1-15 select MIDI channels 1-15. The selected mode is
shown on the OLED and announced at startup. - v1.2 (2026-06-14) : Added the licensed Polaxis Kraftor USB identity, unique SAMD21 chip ID
reporting, product model identification, chip ID display on the OLED at startup, and improved support for
selecting the correct board in SAM Designer 1.4. - v1.1 (2026-05-03) : SAM text-to-speech with USB/serial MIDI control, RAM phrase slots, optional
RC256 FRAM phrase storage, serial commands, and OLED status display support.
USB Identification
Firmware the USB identity officially assigned to Kraftor through the Microchip USB VID/PID sublicense program.
| Descriptor | Value |
|---|---|
| Manufacturer | Hanabi SRL |
| Product | Polaxis Kraftor |
| USB VID | 0x04D8 |
| USB PID | 0xE430 |
The USB VID belongs to Microchip Technology Inc. and the PID is sublicensed for use with Kraftor firmware
running on Microchip microcontrollers.
Every SAMD21 has a unique factory-programmed chip ID. Firmware 1.2 reports this ID over USB Serial so
individual Kraftor units can be distinguished when several boards are connected.
MIDI Channel Configuration
The four DIP switches select the receive channel for both USB MIDI and Serial MIDI. The setting is read at startup and
applies to notes, control changes, and pitch bend on both MIDI inputs.
MIDI channels 1-15. Reset or power-cycle Kraftor after changing the switches.
Setting the DIP Switches
Move a switch toward its ON marking to turn it on. DIP1 is the highest-value switch and DIP4 is the
lowest-value switch. Choose the required setting in the table, then reset or power-cycle Kraftor so the new MIDI
channel is read.
| Mode | DIP1 | DIP2 | DIP3 | DIP4 |
|---|---|---|---|---|
| Omni | OFF | OFF | OFF | OFF |
| Channel 1 | OFF | OFF | OFF | ON |
| Channel 2 | OFF | OFF | ON | OFF |
| Channel 3 | OFF | OFF | ON | ON |
| Channel 4 | OFF | ON | OFF | OFF |
| Channel 5 | OFF | ON | OFF | ON |
| Channel 6 | OFF | ON | ON | OFF |
| Channel 7 | OFF | ON | ON | ON |
| Channel 8 | ON | OFF | OFF | OFF |
| Channel 9 | ON | OFF | OFF | ON |
| Channel 10 | ON | OFF | ON | OFF |
| Channel 11 | ON | OFF | ON | ON |
| Channel 12 | ON | ON | OFF | OFF |
| Channel 13 | ON | ON | OFF | ON |
| Channel 14 | ON | ON | ON | OFF |
| Channel 15 | ON | ON | ON | ON |
| MIDI Input | Function | Channel |
|---|---|---|
| USB MIDI | Trigger sentence slots and control voice parameters | DIP-selected channel 1-15, or Omni |
| Serial MIDI | Trigger sentence slots and control voice parameters | DIP-selected channel 1-15, or Omni |
Sentence Banks
Kraftor SAM can store short sentences and trigger them from MIDI notes. RAM slots are always available. FRAM slots are
available when an RC256 FRAM is detected on I2C address 0x50.
| Bank | Slots | MIDI Notes | Persistence |
|---|---|---|---|
| RAM | 20 slots, R0-R19 | 28-47 | Cleared on power-off or reset |
| FRAM | 100 slots, F0-F99 | 48-127 for F0-F79 | Saved in optional RC256 FRAM |
Each sentence can contain up to 200 characters. The FRAM stores 100 sentences, but MIDI can directly
address the first 80 FRAM slots because MIDI notes stop at 127. The remaining FRAM slots are available through the
serial commands.
MIDI Messages
Note On – Sentence Triggering
MIDI Note On messages trigger stored sentences. Velocity is not used for volume in this firmware version.
- Notes 28-47: play RAM slots R0-R19.
- Notes 48-127: play FRAM slots F0-F79 when RC256 FRAM is present.
- Other notes: ignored and reported as out of range on USB Serial and the OLED.
- Note Off: turns off the status LED only; spoken phrases play to completion.
| MIDI Note | Slot | Action |
|---|---|---|
| 28 | R0 | Play RAM sentence slot 0 |
| 29 | R1 | Play RAM sentence slot 1 |
| 47 | R19 | Play RAM sentence slot 19 |
| 48 | F0 | Play FRAM sentence slot 0 |
| 49 | F1 | Play FRAM sentence slot 1 |
| 127 | F79 | Play FRAM sentence slot 79 |
Pitch Bend – SAM Pitch Control
Pitch Bend controls the SAM pitch parameter. The full 14-bit MIDI pitch bend range is mapped to SAM values
255-0, so lower MIDI bend values produce higher SAM pitch values in the firmware mapping.
| Pitch Bend Value | SAM Pitch Value | Effect |
|---|---|---|
| -8192 | 255 | Highest mapped SAM pitch value |
| 0 | about 127 | Center pitch |
| +8191 | 0 | Lowest mapped SAM pitch value |
Default pitch is 64.
CC1 – Speed
MIDI CC1 controls SAM speech speed. MIDI values 0-127 are mapped to SAM speed values
255-1. Higher CC1 values make speech faster.
| CC1 Value | SAM Speed Value | Effect |
|---|---|---|
| 0 | 255 | Slowest mapped speech |
| 127 | 1 | Fastest mapped speech |
Default speed is 72.
CC2 – Mouth
MIDI CC2 controls the SAM mouth parameter. MIDI values 0-127 are mapped linearly to SAM values
0-255.
| CC2 Value | SAM Mouth Value |
|---|---|
| 0 | 0 |
| 127 | 255 |
Default mouth is 128.
CC3 – Throat
MIDI CC3 controls the SAM throat parameter. MIDI values 0-127 are mapped linearly to SAM values
0-255.
| CC3 Value | SAM Throat Value |
|---|---|
| 0 | 0 |
| 127 | 255 |
Default throat is 128.
Ignored MIDI Messages
- Control Change messages other than CC1, CC2, and CC3
- Note velocity
- Notes outside the RAM and FRAM trigger ranges
Serial Text And Commands
Open the USB Serial port at 115200 baud. Type a line of text and press Enter to speak it. Lines that
start with ! are commands for managing the sentence banks.
| Command | Function | Example |
|---|---|---|
| !INFO? | Report RAM slots, FRAM status, MIDI note bases, max sentence length, firmware version, product model, and unique chip ID |
!INFO? |
| !GET | Read one sentence slot | !GET R 0 |
| !SET | Store text in one sentence slot | !SET F 12 hello from SAM |
| !ERASE | Clear one sentence slot | !ERASE R 3 |
| !PLAY | Speak one sentence slot | !PLAY F 25 |
| !DUMP | List all sentences in a bank | !DUMP R |
Use R for RAM slots and F for FRAM slots. FRAM commands return !ERR
nofram when no RC256 FRAM is detected.
Quick Reference Table
| Message | Function | Range |
|---|---|---|
| Note On | Trigger RAM sentence slots | Notes 28-47, slots R0-R19 |
| Note On | Trigger FRAM sentence slots | Notes 48-127, slots F0-F79 |
| Pitch Bend | SAM pitch | -8192 to +8191, mapped to 255-0 |
| CC1 | SAM speed | 0-127, higher is faster |
| CC2 | SAM mouth | 0-127 mapped to 0-255 |
| CC3 | SAM throat | 0-127 mapped to 0-255 |
| USB Serial | Speak typed text or manage sentence banks | 115200 baud |
Connections
The Kraftor SAM firmware accepts control from:
- USB Serial for typed speech and sentence bank commands
- USB MIDI for notes, control changes, and pitch bend
- Serial MIDI on the hardware serial MIDI input
Audio is output from the SAMD21 DAC on A0.
OLED Display
If an OLED display is detected at I2C address 0x3C, it shows:
- SAM MIDI on startup
- The firmware version
- The selected MIDI channel or Omni mode
- The complete unique chip ID across both display lines
- The last MIDI note and sentence slot
- The spoken text or empty/error status for the selected slot
At startup, SAM also announces sam, ready on channel, X, or sam, ready on all channels
in Omni mode.
Optional FRAM
If an RC256 FRAM is detected at I2C address 0x50, the firmware enables persistent sentence slots. On
first use, a missing FRAM header is initialized automatically.
Tools
The best way to use Kraftor SAM is with the companion SAM Designer tool:
https://deladriere.github.io/SAM_Designer/

SAM Designer 1.4 runs in the browser and provides a dedicated interface for typing text, sending it to Kraftor SAM,
saving and recalling sentence slots, and controlling voice parameters. Use a Chromium-based browser for Web Serial and
Web MIDI support.
Using Multiple Kraftor Units
With firmware 1.2, the serial connection displays Polaxis Kraftor SAM and the board’s unique chip ID.
The Identify Serial button makes the connected board speak serial connection.
The Identify MIDI button helps match a MIDI output to the correct physical board. It writes
meedee connection into temporary RAM slot 0 through serial, then sends MIDI note 28 to the selected
MIDI output. The selected board speaks the phrase, making it easy to confirm the connection.
Identify Serial, and Identify MIDI continue to work, but firmware 1.1 cannot report its product model or unique chip
ID to the GUI.
You can also use any USB Serial terminal at 115200 baud to type text, save phrases, dump sentence
banks, and trigger stored sentences. Use a USB MIDI or DIN MIDI controller to play sentence slots and control pitch,
speed, mouth, and throat.
Firmware
Do not use this firmware for Emy, Emy Terminal.
How to install the firmware on
Kraftor