Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.20.1

### Added

- **Lane types on track structure** — when `include_metadata = true`, each section/phrase now also carries `lane` (its named parallel timeline row) and the result a top-level ordered `lanes` array. This release only adds the Luau type annotations and docs — the fields already flow through at runtime on v0.20.0.

## v0.20.0

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add to your `wally.toml`:

```toml
[server-dependencies]
AudioScape = "this-fifo/audioscape-sdk@0.20.0"
AudioScape = "this-fifo/audioscape-sdk@0.20.1"
```

Then run:
Expand Down Expand Up @@ -342,7 +342,7 @@ local structure = AudioScape:getStructure(soundInstance)

`label` values come from: `Intro`, `Verse`, `Chorus`, `Drop`, `Bridge`, `Climax`, `Outro`, `Main`, `Break`, `Build`, `Breakdown`, `Transition`, `Peak`. `energy` is `1`–`4`.

**Section metadata:** pass `include_metadata = true` and every section/phrase carries its authored key/value pairs verbatim in `metadata` — custom cue parameters (lighting amounts, movement paths, easing styles) beyond the flattened fields. Entries without authored pairs return an empty table. Drive custom events straight from authored cue sections:
**Section metadata & lanes:** pass `include_metadata = true` and every section/phrase carries its authored key/value pairs verbatim in `metadata` — custom cue parameters (lighting amounts, movement paths, easing styles) beyond the flattened fields (empty table when none) — plus a `lane` name grouping entries into parallel timeline rows, with the ordered distinct names in a top-level `lanes` array. Entries sharing a lane string belong to the same row; time-overlapping entries in different lanes run concurrently. Drive custom events straight from authored cue sections:

```lua
local structure = AudioScape:getStructure({ asset_id = "1843209165", include_metadata = true })
Expand Down
8 changes: 7 additions & 1 deletion src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,11 @@ export type Section = {
color: string?,
-- Present only when the structure was fetched with include_metadata =
-- true: the entry's authored key/value pairs, verbatim (empty table for
-- entries with none).
-- entries with none), and its resolved lane — the named parallel timeline
-- row this entry belongs to. Entries sharing a lane string are in the
-- same row; time-overlapping entries in different lanes run concurrently.
metadata: { [string]: string | number }?,
lane: string?,
}

export type StructureResult = {
Expand All @@ -439,6 +442,9 @@ export type StructureResult = {
-- crossfades to `phrases`; finer cues to `sections`.
sections: { Section },
phrases: { Section },
-- Only with include_metadata = true: ordered distinct lane names across
-- sections + phrases (the grouping key for Section.lane).
lanes: { string }?,
}

export type BeatHit = {
Expand Down
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "this-fifo/audioscape-sdk"
version = "0.20.0"
version = "0.20.1"
registry = "https://github.com/UpliftGames/wally-index"
realm = "server"
license = "MIT"
Expand Down