getDuration - sampleName
- (optional)
Returns the duration, in seconds, of the given sample.
Has optional param n (for instance, the 2 in s("casio:2"))
Note: must be called with await, otherwise you'll get a pending Promise object.
// Set a patterns cycle length to exactly the length of the sample
samples('github:tidalcycles/dirt-samples')
let k = await getDuration('sax')
s("sax").cps(1/k) | parameter | type |
|---|---|
| sampleName |
|
| (optional) |
|
| n | |