Recipe catalog / daw-request-kind
Classify a request to a music program
What does request ask a DAW or music program to do: record, edit, mix, apply an effect, arrange, export, or unclear?
You are building voice or chat control for a DAW, notation program, or recording app and need to route each spoken or typed request to the handler that owns that kind of operation.
Explore this recipe interactively ยท Source and implementation guide
Use daw-request-kind 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 { dawRequestKind } from 'jev-recipes/daw-request-kind';
const result = await dawRequestKind({
"request": "Quantize the drum track to sixteenth notes from bar 9 to bar 24, but leave the hi-hat lane alone.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| request | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"request": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"request"
]
},
"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"
]
},
"verdict": {
"type": "string",
"enum": [
"record",
"edit",
"mix",
"effect",
"arrange",
"export",
"unclear"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"record",
"edit",
"mix",
"effect",
"arrange",
"export",
"unclear"
]
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"required": [
"record",
"edit",
"mix",
"effect",
"arrange",
"export",
"unclear"
]
}
},
"required": [
"model",
"usage",
"status",
"verdict",
"confidence",
"probabilities"
],
"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 daw-request-kind.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"verdict": "edit",
"confidence": 0.9,
"probabilities": {
"record": 0.01,
"edit": 0.9,
"mix": 0.02,
"effect": 0.01,
"arrange": 0.03,
"export": 0,
"unclear": 0.03
}
}
Evaluation evidence
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
- Classifies the kind of operation requested, not its parameters. Extract track names, times, values, and file formats in a separate step.
- A request that chains several operations is classified by the one it asks for first or presses most. Split compound requests in code when each step needs its own handler.
- Does not judge whether the operation is possible in the current project or safe to perform without confirmation.
Related recipes
- route: Use route when the destinations are your own caller-defined list rather than this fixed set of music production operations.
- turn-intent: Use turn-intent to classify the conversational role of a turn, such as a question or a correction, rather than which production operation it asks for.