-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I'm developing a script to copy all parameters from one track to another, and the code is shown below.
function copyParams(sourceTrack, targetTrack){
var sourceNoteGroup = SV.getProject().getTrack(sourceTrack).getGroupReference(0).getTarget();
var targetNoteGroup = SV.getProject().getTrack(targetTrack).getGroupReference(0).getTarget();
var paramNames = ["pitchDelta","vibratoEnv","loudness","tension","breathiness","voicing","gender"];
for(var id in paramNames){
var paramName = paramNames[id];
targetNoteGroup.getParameter(paramName).removeAll();
var params = sourceNoteGroup.getParameter(paramName).getAllPoints();
SV.setHostClipboard(params.toString());
for(var id2 in params){
var item = params[id2];
targetNoteGroup.getParameter(paramName).add(item[0], item[1]);
}
}
}There are two problems:
When paramName is pitchDelta, the param value becomes extremely large(near 2^32) when the value is smaller than zero. So probably the unsigned/signed conversion fails.
When paramName is Tension, the param value always get zero. I think the problem is also about number conversion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels