Track
create
Creates a new track
moises.track.create
Parameters
Parameter | Type | Description |
---|---|---|
groupId | string | The ID of the group to add the track to |
arrayBuffer | ArrayBuffer | The audio data for the track |
name | string | The name of the track |
order | number | The order of the track in the group |
startPositionMs | number | The start position of the track in milliseconds |
Returns:
Promise<trackId>
- Promise that resolves with the created track id
Example resolved value:
// When the promise resolves, you get:
trackid
Usage Example
import { initMoisesExtension } from '@moises.ai/extension'
const useMoisesExtension = initMoisesExtension({
id: 'id',
name: 'name',
description: 'description',
icon: 'icon',
version: 'version',
author: 'author'
})
const { moises } = useMoisesExtension()
const trackId = await moises.track.create({
groupId: "group-123",
arrayBuffer: new ArrayBuffer(1024),
name: "My Track"
})
console.log(trackId) // "track-123"
This file is automatically generated. Do not edit manually.