v1.1.1
opencode-ai/opencodev1.1.1Oct 29, 2024by k9p5
AI Summary
Enhances the audio composition library by allowing clips to be inserted at specific indices within stacked tracks and enabling safe splitting of clips without disrupting track order.
Key Highlights
- Insert clips into stacked tracks at a specific index.
- Split clips within stacked tracks without track reordering.
- Improved track manipulation logic.
- Support for indexed clip insertion.
New Features
- Indexed clip insertion
- Safe clip splitting
- Stacked track management
- Track order preservation
Full Release Notes
- Implemented ability to insert clips into a stacked track at a given index e.g. `track.add(new Clip(), 2)`
- Ensured clips within stacked tracks can be split without the track being reordered
**Example**
```
const composition = new core.Compostion();
const track = composition.createTrack('base').stacked();
await track.add(new core.Clip({ name: 'foo' });
await track.add(new core.Clip({ name: 'bar' });
// now add a clip in between
await track.add(new core.Clip({ name: 'pong' }), 1);
console.log(track.clips[0].name); // foo
console.log(track.clips[1].name); // pong
console.log(track.clips[2].name); // bar
```