Start time must be strictly greater than previous start time #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When several elements are present on the page, the following Tone error sometimes shows:
An answer online says:
This could be a way to solve it.
mentioned in commit
b3834e06fcmentioned in commit
23d6dc1a1dIn order to fix this issue, I implemented a new instrument parameter called instrumentDuplicate. This variable value should be in between 0 and 1. It creates duplicate synth according to the number of cascade element playing the same instrument.
So if 10 cascade element use the same instrument and in the instrument parameter instrumentDuplicate is set to 0.5, then 5 tonejs synths will be created and the cascade elements will share them.
If this value is changed while cascade is running, then the corresponding element should be updated for the change to take effect. This can be done with element.update() or by changing the appearance of the element.
Also, the error is caught and a custom error is logged into the console
That’s great. I just tested it a bit and I have a question : if I have 10 possibly overlapping notes with the same instrument that has a
instrumentDublicate:0:1, which one will have its own synth? What is the order of priority?The last element to arrive will trigger the creation of a new synth and will be assigned to it.
Also, when an element is deleted or changes instrument, the synth is not deleted and not reassigned to another element. It might be an interesting thing to implement in the future, if we notice performance issues.
To find which synth is assigned to an element:
insList[element.computedProperties.insName].indexOf(element.computedProperties.currentInstrument)Great, thanks for those details!