# city.opposite.slopflag.clip

> Published by [slopflag.delve.town](https://lexicon.garden/identity/did:plc:zqnqyt6bn4a5lasbe7pfln6y)

## Description

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

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip)
- [Documentation](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:zqnqyt6bn4a5lasbe7pfln6y/city.opposite.slopflag.clip/examples)

## Definitions

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `string` | Yes |  |
| `name` | `string` | No |  |
| `params` | `string` | No | Settings used, as JSON text. |
| `version` | `string` | No |  |

### `city.opposite.slopflag.clip`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `audio` | `blob` | No |  |
| `bars` | `integer` | No | Length of the clip in bars. |
| `code` | `string` | No | Strudel: one expression. ABC: the tune. |
| `comment` | `string` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `engine` | `ref` → `#engine` | No |  |
| `gain` | `integer` | No | Percent. Default 100. |
| `instrument` | `string` | No | Strudel sound used to play notes, e.g. triangle, sawtooth, piano. |
| `kind` | `string` | Yes |  |
| `kits` | `array` | No | Sample kits this clip uses; their samples are loaded as <kit>_<sample>. |
| `lane` | `string` | Yes | Part name, e.g. drums, bass, keys, voice. |
| `loop` | `boolean` | No | Repeat across the whole project. Default true. |
| `midi` | `blob` | No |  |
| `notes` | `array` | No |  |
| `project` | `ref` → `com.atproto.repo.strongRef` | Yes |  |
| `replaces` | `ref` → `com.atproto.repo.strongRef` | No | Earlier clip this revises. Honoured only for the same author or the project owner. |
| `respondsTo` | `ref` → `com.atproto.repo.strongRef` | No | Clip this one answers, accompanies or was generated from. |
| `sound` | `ref` → `com.atproto.repo.strongRef` | No | A sound (patch) from the sound room that this clip plays through. |
| `startBar` | `integer` | No |  |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `d` | `integer` | Yes | Duration in ticks. |
| `p` | `integer` | Yes | MIDI pitch. |
| `t` | `integer` | Yes | Start in ticks, 96 per beat, from clip start. |
| `v` | `integer` | No | Velocity. Default 96. |

## Raw 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
}
```
