# city.opposite.slopflag.clip

> One author's material in one lane of a project: Strudel code, notes, ABC, MIDI or audio.

- Kind: record
- Record key: tid
- Authority: slopflag.opposite.city
- Lexicon: 1
- Published by [slopflag.delve.town](https://lexicon.garden/identity/did:plc:zqnqyt6bn4a5lasbe7pfln6y), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip/analytics)

## Record (`city.opposite.slopflag.clip`)

Type: record · key tid

### Properties

- `audio` (blob)
  - Constraints: maxSize: 10000000, accept: audio/*
- `bars` (integer): Length of the clip in bars.
  - Constraints: minimum: 1, maximum: 1024
- `code` (string): Strudel: one expression. ABC: the tune.
  - Constraints: maxLength: 50000
- `comment` (string)
  - Constraints: maxLength: 30000, maxGraphemes: 3000
- `createdAt` (string · datetime, required)
- `engine` (ref)
  - Reference: `#engine`
- `gain` (integer): Percent. Default 100.
  - Constraints: minimum: 0, maximum: 200
- `instrument` (string): Strudel sound used to play notes, e.g. triangle, sawtooth, piano.
  - Constraints: maxLength: 100
- `kind` (string, required)
  - Constraints: knownValues: strudel | notes | abc | midi | audio
- `kits` (array): Sample kits this clip uses; their samples are loaded as <kit>_<sample>.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `com.atproto.repo.strongRef`
- `lane` (string, required): Part name, e.g. drums, bass, keys, voice.
  - Constraints: maxLength: 64
- `loop` (boolean): Repeat across the whole project. Default true.
- `midi` (blob)
  - Constraints: maxSize: 1000000, accept: audio/midi, audio/x-midi, application/octet-stream
- `notes` (array)
  - Constraints: maxLength: 4096
  - `items` (ref)
    - Reference: `#note`
- `project` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `replaces` (ref): Earlier clip this revises. Honoured only for the same author or the project owner.
  - Reference: `com.atproto.repo.strongRef`
- `respondsTo` (ref): Clip this one answers, accompanies or was generated from.
  - Reference: `com.atproto.repo.strongRef`
- `sound` (ref): A sound (patch) from the sound room that this clip plays through.
  - Reference: `com.atproto.repo.strongRef`
- `startBar` (integer)
  - Constraints: minimum: 0

## #engine (`city.opposite.slopflag.clip#engine`)

Type: object

### Properties

- `kind` (string, required)
  - Constraints: knownValues: hand | generated | transcribed | other
- `name` (string)
  - Constraints: maxLength: 300
- `params` (string): Settings used, as JSON text.
  - Constraints: maxLength: 10000
- `version` (string)
  - Constraints: maxLength: 100

## #note (`city.opposite.slopflag.clip#note`)

Type: object

### Properties

- `d` (integer, required): Duration in ticks.
  - Constraints: minimum: 1
- `p` (integer, required): MIDI pitch.
  - Constraints: minimum: 0, maximum: 127
- `t` (integer, required): Start in ticks, 96 per beat, from clip start.
  - Constraints: minimum: 0
- `v` (integer): Velocity. Default 96.
  - Constraints: minimum: 0, maximum: 127

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "engine": {
      "properties": {
        "kind": {
          "knownValues": [
            "hand",
            "generated",
            "transcribed",
            "other"
          ],
          "type": "string"
        },
        "name": {
          "maxLength": 300,
          "type": "string"
        },
        "params": {
          "description": "Settings used, as JSON text.",
          "maxLength": 10000,
          "type": "string"
        },
        "version": {
          "maxLength": 100,
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "main": {
      "key": "tid",
      "record": {
        "properties": {
          "audio": {
            "accept": [
              "audio/*"
            ],
            "maxSize": 10000000,
            "type": "blob"
          },
          "bars": {
            "description": "Length of the clip in bars.",
            "maximum": 1024,
            "minimum": 1,
            "type": "integer"
          },
          "code": {
            "description": "Strudel: one expression. ABC: the tune.",
            "maxLength": 50000,
            "type": "string"
          },
          "comment": {
            "maxGraphemes": 3000,
            "maxLength": 30000,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "engine": {
            "ref": "#engine",
            "type": "ref"
          },
          "gain": {
            "description": "Percent. Default 100.",
            "maximum": 200,
            "minimum": 0,
            "type": "integer"
          },
          "instrument": {
            "description": "Strudel sound used to play notes, e.g. triangle, sawtooth, piano.",
            "maxLength": 100,
            "type": "string"
          },
          "kind": {
            "knownValues": [
              "strudel",
              "notes",
              "abc",
              "midi",
              "audio"
            ],
            "type": "string"
          },
          "kits": {
            "description": "Sample kits this clip uses; their samples are loaded as <kit>_<sample>.",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "maxLength": 8,
            "type": "array"
          },
          "lane": {
            "description": "Part name, e.g. drums, bass, keys, voice.",
            "maxLength": 64,
            "type": "string"
          },
          "loop": {
            "description": "Repeat across the whole project. Default true.",
            "type": "boolean"
          },
          "midi": {
            "accept": [
              "audio/midi",
              "audio/x-midi",
              "application/octet-stream"
            ],
            "maxSize": 1000000,
            "type": "blob"
          },
          "notes": {
            "items": {
              "ref": "#note",
              "type": "ref"
            },
            "maxLength": 4096,
            "type": "array"
          },
          "project": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "replaces": {
            "description": "Earlier clip this revises. Honoured only for the same author or the project owner.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "respondsTo": {
            "description": "Clip this one answers, accompanies or was generated from.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "sound": {
            "description": "A sound (patch) from the sound room that this clip plays through.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "startBar": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "project",
          "lane",
          "kind",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "note": {
      "properties": {
        "d": {
          "description": "Duration in ticks.",
          "minimum": 1,
          "type": "integer"
        },
        "p": {
          "description": "MIDI pitch.",
          "maximum": 127,
          "minimum": 0,
          "type": "integer"
        },
        "t": {
          "description": "Start in ticks, 96 per beat, from clip start.",
          "minimum": 0,
          "type": "integer"
        },
        "v": {
          "description": "Velocity. Default 96.",
          "maximum": 127,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "t",
        "d",
        "p"
      ],
      "type": "object"
    }
  },
  "description": "One author's material in one lane of a project: Strudel code, notes, ABC, MIDI or audio.",
  "id": "city.opposite.slopflag.clip",
  "lexicon": 1
}
```
