- clip now works like legato in tidal

- supports floats
- hap.duration now respects clip value
- hap.endClipped is now end*clip
- visualizations show clipped length
- clip(0) will now be silence
This commit is contained in:
Felix Roos 2023-06-12 22:39:32 +02:00
parent e4a35fdd72
commit 8c9e06c329
5 changed files with 11 additions and 7 deletions

View file

@ -32,7 +32,11 @@ export class Hap {
}
get duration() {
return this.whole.end.sub(this.whole.begin);
return this.whole.end.sub(this.whole.begin).mul(typeof this.value?.clip === 'number' ? this.value?.clip : 1);
}
get endClipped() {
return this.whole.begin.add(this.duration);
}
wholeOrPart() {