jevrecipes

Recipe catalog / sound-match

Check a patch against a requested sound

Does the patch or preset described in patch deliver the sound character asked for in request?

You are building a preset browser, sound search, or patch recommender and need to check whether a candidate patch description actually delivers what the user asked for before showing or loading it.

Explore this recipe interactively ยท Source and implementation guide

Use sound-match in TypeScript

Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.

import { soundMatch } from 'jev-recipes/sound-match';

const result = await soundMatch({
  "request": "A warm analog-style pad with a slow attack and some gentle movement, for the intro of a downtempo track.",
  "patch": "Preset: Dusk Pad. Two sawtooth oscillators detuned 9 cents, one octave down sub sine at -12 dB. 24 dB low-pass filter, cutoff at 35 percent with a slow envelope adding 20 percent over 2 seconds. Amp envelope: attack 1.6 s, decay 0.5 s, sustain 100 percent, release 3.2 s. Slow triangle LFO at 0.15 Hz on filter cutoff, depth 8 percent. Stereo chorus and a long hall reverb at 30 percent mix.",
  "minConfidence": 0.8
});
console.log(result);

Input contract

FieldTypeNeeded
requeststringRequired
patchstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "request": {
        "type": "string"
      },
      "patch": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "request",
      "patch"
    ]
  },
  "result": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "usage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "additionalProperties": false
      },
      "status": {
        "type": "string",
        "enum": [
          "ready",
          "review"
        ]
      },
      "probability": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "verdict": {
        "type": "string",
        "enum": [
          "matches",
          "mismatched"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "probability",
      "confidence",
      "verdict"
    ],
    "additionalProperties": false
  }
}

Saved example result

This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo sound-match.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "probability": 0.92,
  "confidence": 0.92,
  "verdict": "matches"
}

Evaluation evidence

Fixture only

No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.

Use the evaluation guide to measure this decision on your own labeled cases.

Limitations

Related recipes