Aroma Recipe

Standards / Aroma Recipe / Specification

Aroma Recipe, version 1.0

Version 1.0 — public draft Source: Aroma Recipe @ 5a06920 (2026-11-24)

Contents

Status: Version 1.0 draft.

An Aroma Recipe describes a blend: several aromas released together, each at its own level, for a fixed time, with the boosters (fans) that carry the scent. It is a single JSON document. A recipe names its aromas by the identifiers of ASMF (spec/asmf-format.md, section 13), not by the name of a cartridge or of a chamber, so the same blend can be played on any device that holds the aromas, by any application.

A recipe has no timeline of its own: it means exactly the ASMF document it converts to (section 5). Everything about playback (which chamber releases an aroma, a missing aroma, substitution, the automatic inner booster) is ASMF's.

Every JSON example in this document is checked by the reference implementation (section 10). The line above each example says whether it is a valid recipe, an invalid one (and the error it gives first), the ASMF conversion of the recipe before it, or a fragment; a comment that is not shown when the document is rendered repeats the verdict for the checker.

1. Scope

This document defines:

  • the recipe format (sections 3, 4, 6 and 8),
  • what a recipe means, by its conversion to ASMF (section 5),
  • how blends saved by name and chamber relate to recipes (section 7),
  • how to check an implementation (section 10).

It does not define how a blend is designed, how aromas are chosen or substituted, or how a recipe is shared or sold.

2. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119 and RFC 8174) when, and only when, they appear in all capitals, as shown here.

  • Recipe: one Aroma Recipe JSON text.
  • Reader: software that parses and validates recipes; a reader of this specification has version 1.0.
  • Player: software that plays a recipe on a scent device.
  • Chamber: the unit of space in a device that holds one aroma, as in ASMF section 2.
  • Level: the strength of an aroma or a booster, 1–100, as ASMF concentration and intensity.
  • Structural error, rule violation, path, span: as in ASMF sections 2 and 5.

3. Document

A recipe is a single JSON text (RFC 8259) encoded in UTF-8 without a byte order mark. Its top level is an object. The rules of ASMF section 3 for the text apply unchanged.

Three aromas at 40, 30 and 20 for three seconds, with the inner booster at 80:

Valid.

{
  "aromaRecipe": "1.0",
  "meta": {"title": "Evening garden", "author": "@mina", "createdAt": "2026-11-19T10:00:00Z"},
  "aromas": [
    {"key": "rose", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13", "name": {"en": "Rose", "ja": "バラ"}},
    {"key": "pine", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40", "name": {"en": "Pine"}},
    {"key": "lemon", "id": "6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e", "name": {"en": "Lemon"}}
  ],
  "mix": [
    {"aroma": "rose", "level": 40},
    {"aroma": "pine", "level": 30},
    {"aroma": "lemon", "level": 20}
  ],
  "boosters": {"inner": 80},
  "durationMs": 3000
}

The smallest recipe:

Valid.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 50}], "durationMs": 1000}

3.1 Top level

Field Required Type Meaning
aromaRecipe yes string Format version "<major>.<minor>" (section 8). This specification is "1.0".
meta no object Display information, exactly as ASMF meta (ASMF section 3.2): title, author, createdAt, tool, language, license. Has no effect on playback.
aromas yes array The aromas of the blend, exactly as ASMF aromas[] (ASMF section 3.4): key, id, optional name. At most 64.
mix yes array What is released (section 3.2). At least one item.
boosters no object The booster levels (section 3.3).
durationMs yes integer 1–600000 How long the blend is released, in milliseconds (at most ten minutes).

3.2 mix[]

Field Required Type Meaning
aroma yes string The key of an item of aromas. At most one item of mix per aroma.
level yes integer 1–100 The aroma's level, as ASMF concentration.

Levels are independent of each other: they do not need to add up to 100, and each is the strength of its own aroma. An aroma that mix does not name is allowed (as in ASMF, an aroma no span uses); it is not released.

3.3 boosters

Field Required Type Meaning
inner no integer 1–100 The inner booster's level, as ASMF intensity.
outer no integer 1–100 The outer booster's level.

When inner is absent (or boosters is absent), the recipe leaves the inner booster to the player: the automatic inner booster of ASMF section 7.5. When outer is absent, the outer booster stays off.

3.4 Numbers

Numbers follow ASMF section 3.7: a number in a member the reader reads MUST be a JSON integer token (not -0) inside the signed 64-bit range, or it is MALFORMED at the member's path; a number too large for a finite double anywhere in the text is MALFORMED with the empty path.

Invalid: MALFORMED at mix[0].level.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 40.5}], "durationMs": 1000}

4. Rules

A recipe that breaks one of these rules has a rule violation (section 6.2).

  1. Aromas. aromas and meta follow the rules of ASMF for them (ASMF section 4, rules 7 and 9): at most 64 aromas; keys of the form ^[a-z0-9_]{1,16}$ and unique; identifiers UUIDs, not all zero, unique ignoring case; language tags and texts of the forms and lengths of ASMF section 3.
  2. Mix. mix has at least one item. Each aroma is the key of an item of aromas, and no two items name the same key. Each level is 1–100.
  3. Boosters. inner and outer are 1–100.
  4. Duration. durationMs is 1–600000.

Invalid: DUPLICATE_MIX at mix[1].aroma.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 40}, {"aroma": "a1", "level": 60}], "durationMs": 1000}

Invalid: OUT_OF_RANGE at mix.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}], "mix": [], "durationMs": 1000}

Invalid: UNKNOWN_KEY at mix[0].aroma.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "rose", "level": 40}], "durationMs": 1000}

Invalid: OUT_OF_RANGE at durationMs.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 40}], "durationMs": 600001}

Invalid: DUPLICATE_AROMA at aromas[1].id.

{"aromaRecipe": "1.0",
 "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}, {"key": "a2", "id": "3F2B8C1E-9A47-4D0B-8E6F-1C5A7B9D2E40"}],
 "mix": [{"aroma": "a1", "level": 40}], "durationMs": 1000}

5. Meaning by conversion

A valid recipe means exactly the ASMF 1.0 document it converts to. The conversion is defined only for a valid recipe:

  1. asmf is "1.0"; meta and aromas are copied unchanged; there is no requires, media or layout.
  2. flows has one aroma span per item of mix: aroma its aroma, startMs 0, endMs durationMs, concentration its level. The spans are ordered by the order in aromas of the aroma they name (ASMF section 4, rule 10), not by the order of mix.
  3. boosters has an inner span [0, durationMs) at boosters.inner when that member is present, then an outer span [0, durationMs) at boosters.outer when that member is present, without fades. With no inner member the ASMF document has no inner span, so the player plays the automatic inner booster (ASMF section 7.5).

The result is always a valid ASMF document: the spans of different aromas may overlap, each aroma has one span, the inner and outer lanes have one span each, and every time is within ASMF's range. A player plays a recipe by playing its conversion, under every rule of ASMF section 10.

The first example of section 3, written compactly:

Valid.

{"aromaRecipe": "1.0", "meta": {"title": "Evening garden", "author": "@mina", "createdAt": "2026-11-19T10:00:00Z"},
 "aromas": [{"key": "rose", "id": "b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13", "name": {"en": "Rose", "ja": "バラ"}},
            {"key": "pine", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40", "name": {"en": "Pine"}},
            {"key": "lemon", "id": "6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e", "name": {"en": "Lemon"}}],
 "mix": [{"aroma": "rose", "level": 40}, {"aroma": "pine", "level": 30}, {"aroma": "lemon", "level": 20}],
 "boosters": {"inner": 80}, "durationMs": 3000}

Its conversion, in ASMF canonical form (ASMF section 11, which renames the keys in identifier order and lists the flows in that order):

Valid ASMF; the conversion of the recipe above.

{"asmf":"1.0","meta":{"title":"Evening garden","author":"@mina","createdAt":"2026-11-19T10:00:00Z"},"aromas":[{"key":"a1","id":"3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40","name":{"en":"Pine"}},{"key":"a2","id":"6c0e5f9a-2d84-4b17-a3c9-58e1f7d20b6e","name":{"en":"Lemon"}},{"key":"a3","id":"b81d4e2a-07c3-4f5e-9d16-4a2c6e8f0b13","name":{"en":"Rose","ja":"バラ"}}],"flows":[{"aroma":"a1","startMs":0,"endMs":3000,"concentration":30},{"aroma":"a2","startMs":0,"endMs":3000,"concentration":20},{"aroma":"a3","startMs":0,"endMs":3000,"concentration":40}],"boosters":[{"booster":"inner","startMs":0,"endMs":3000,"intensity":80}]}

Without boosters, the inner booster is automatic, and the outer booster stays off:

Valid.

{"aromaRecipe": "1.0", "aromas": [{"key": "a", "id": "e47a1b93-5c6d-4f08-9b2e-0d3c8a6f1e75"}],
 "mix": [{"aroma": "a", "level": 60}], "durationMs": 1500}

Valid ASMF; the conversion of the recipe above.

{"asmf":"1.0","aromas":[{"key":"a1","id":"e47a1b93-5c6d-4f08-9b2e-0d3c8a6f1e75"}],"flows":[{"aroma":"a1","startMs":0,"endMs":1500,"concentration":60}],"boosters":[]}

6. Errors

Errors come in two groups. A recipe is valid when it has neither.

6.1 Structural errors

The reader reports exactly one structural error, {"code": …, "path": …}, and stops; it does not check the rules.

Code Meaning
MALFORMED As ASMF section 5.1: not UTF-8 or not JSON (a lone surrogate escape included); top level not an object; a byte order mark; larger than 4 MiB (4194304 bytes); nesting deeper than 32 levels (the top-level object is level 1); a member name twice in one object; a number token too large for a finite double; a required field missing; a value of the wrong JSON type; a number in a member the reader reads that is not an integer (including -0) or outside the signed 64-bit range.
UNSUPPORTED_VERSION aromaRecipe is not of the form "<integer>.<integer>" (one or more ASCII digits on both sides of one ., each number at most 4294967295), or its major version is not one the reader implements.
UNKNOWN_FIELD A member the reader does not know, under the conditions of section 8.

Errors about the text as a whole carry the empty path; the others carry the path of the offending member (durationMs, mix[0].level, aromas[0].name.en, boosters.side).

A reader checks in this order and reports the first error it finds:

  1. The size limit and the byte order mark.
  2. The UTF-8 encoding, the JSON syntax, duplicate member names and the nesting depth, over the whole text.
  3. The top level is an object.
  4. aromaRecipe: present and a string (MALFORMED), then its form and major version (UNSUPPORTED_VERSION), both at aromaRecipe. Nothing else is read in a recipe of another major version.
  5. Unknown members of the top-level object.
  6. meta, aromas, mix, boosters, durationMs, in that order; arrays item by item in index order, each item checked completely before the next. Inside each object, unknown members are checked first, then the fields are read in the order of their table; in an item of aromas, name is read before key and id (as in ASMF).

Invalid: UNSUPPORTED_VERSION at aromaRecipe.

{"aromaRecipe": "2.0", "aromas": [], "mix": [], "durationMs": 1000}

Invalid: UNKNOWN_FIELD at boosters.side.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 40}], "boosters": {"side": 20}, "durationMs": 1000}

Invalid: MALFORMED at durationMs.

{"aromaRecipe": "1.0", "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 40}]}

6.2 Rule violations

The reader reports every violation as a list of {"path": …, "code": …}.

Code Meaning Path
TOO_MANY More than 64 items in aromas. When it is reported, nothing else is checked. aromas.
INVALID_VALUE A meta string, key, id or name entry not of its form, as ASMF section 5.2. meta.<field>, aromas[i].key, aromas[i].id, aromas[i].name.<tag>.
DUPLICATE_KEY A key already used by an earlier item of aromas. aromas[i].key of the later item.
DUPLICATE_AROMA An id already used (ignoring case) by an earlier item of aromas. aromas[i].id of the later item.
UNKNOWN_KEY A mix item names a key that is not in aromas. mix[i].aroma.
DUPLICATE_MIX A mix item names a key that an earlier item already names. Only judged for a key that is in aromas. mix[i].aroma of the later item.
OUT_OF_RANGE mix is empty; a level, boosters.inner or boosters.outer not 1–100; durationMs not 1–600000. mix, mix[i].level, boosters.inner, boosters.outer, durationMs.

6.3 Reporting order

Validators MUST report violations in this order:

  1. If TOO_MANY applies, the list is exactly that violation.
  2. Otherwise meta and aromas in the order of ASMF section 5.3; then mix (OUT_OF_RANGE at mix when empty; else each item in index order: aroma UNKNOWN_KEY or else DUPLICATE_MIX, then level); then boosters.inner, boosters.outer; then durationMs.

7. Blends saved by name and chamber

Applications often save a blend as the names of the cartridges in a device's chambers and a percentage per chamber. Such a blend plays only on a device holding cartridges of those names in that order. To make a recipe of it, a writer:

  1. replaces each cartridge by the aroma identifier of the aroma it holds (ASMF section 13), with that aroma's names in name, and gives it a key;
  2. writes one mix item per aroma, with the chamber's percentage as level (an aroma held in several chambers gets one item, at the highest of their percentages);
  3. writes the inner booster's percentage as boosters.inner and the outer booster's as boosters.outer, leaving out a booster the blend does not set, and the release time as durationMs.

The chamber order is not part of a recipe: a player maps identifiers to its own chambers (ASMF section 10).

8. Versioning and extension

The rules of ASMF section 6 apply, with aromaRecipe as the version member:

  1. Major version. A reader MUST reject a recipe whose major version it does not implement (UNSUPPORTED_VERSION).
  2. Minor version. A reader reads a recipe whose minor version is higher than its own. A minor version MAY only add optional members that a reader can ignore without changing what is played, booster members (when ASMF adds booster names) included.
  3. Unknown members. A member whose name begins with x- is ignored in every object; such members MUST NOT change what is played. Any other unknown member is ignored when the recipe's minor version is higher than the reader's, and is UNKNOWN_FIELD otherwise. The member names inside aromas[].name are data, not fields.

A conversion leaves out every member the reader ignored.

A 1.0 reader accepts this 1.1 recipe: it ignores the unknown members.

Valid.

{"aromaRecipe": "1.1", "tags": ["calm"], "x-app": {"zoom": 1.5},
 "aromas": [{"key": "a1", "id": "3f2b8c1e-9a47-4d0b-8e6f-1c5a7b9d2e40"}],
 "mix": [{"aroma": "a1", "level": 50, "rampMs": 300}], "boosters": {"side": 20}, "durationMs": 1000}

9. Security considerations

  • Size, depth, duplicate member names and numbers: as ASMF section 16.
  • Untrusted values. A valid recipe can ask for every aroma at the strongest level for ten minutes. A player MUST limit the levels and times of a recipe it does not trust to its device's limits (ASMF section 10, rule 8).
  • No active content. meta and name are plain text and MUST be shown as text, not interpreted as markup.
  • Error reports. Paths can embed member names and language tags taken from the recipe, of any length and unescaped; treat them as untrusted text when logging or displaying them.
  • Privacy. A recipe names aromas by random identifiers and has no member for a supplier, a material or a product code (ASMF section 13); x- members SHOULD NOT carry such information either.

10. Conformance

  • A valid recipe has no structural error and no rule violation for a reader of its major version.
  • A conforming validator reports, for every input, the same structural error (code and path) as this specification, or, when there is none, the same violation list in the same order (section 6.3).
  • A conforming converter gives, for every valid recipe, an ASMF document whose canonical form (ASMF section 11) is the canonical form of the conversion of section 5.
  • A conforming player plays a valid recipe as its conversion.

The shared test vectors in vectors/aroma-recipe-cases.json check an implementation. The file is one JSON object; each section is an array of named cases:

Section Each case An implementation passes when
structural text (raw recipe text), or generate (oversize: 4 MiB + 1 bytes; deep: 33 nesting levels; deep32: 32 levels), and expected parsing gives expected: null for success, else {"code", "path"} exactly.
validation document (an object, or a string holding the exact text) and expected parsing and validating document gives exactly the ordered list expected.
conversion recipe (an object, or a string holding the exact text) and asmf the recipe is valid, and the ASMF canonical JSON of its conversion is exactly the string asmf.

Some validation documents use generators, which a runner expands before serialising: {"list": "aromas", "count": N} becomes N aromas with keys k0, k1, … and distinct identifiers, and {"repeat": s, "count": N} becomes the string s repeated N times.

The reference implementation is the Rust crate in crates/aroma-recipe, built on the ASMF reference implementation (crates/aroma-asmf). It runs the vectors in its test tests/vectors.rs, checks that the conversion of every valid vector is a valid ASMF document, and checks every example in this document in tests/spec_examples.rs.

11. Media type and file names

  • Media type: application/vnd.aromajoin.aroma-recipe+json.
  • Version 1.0 defines no file extension of its own: a recipe is stored as a .json file. A minor version may add an extension.
  • Encoding: UTF-8, without a byte order mark.

12. Change log

Version Date Changes
1.0 2026-11-19 First version (draft).