if (css.valueText.includes('onset')||css.valueText.includes('onset')||css.valueText.includes('low')||css.valueText.includes('hi')||css.valueText.includes('loud')){
audioEvents.push({
audioEvents.push({
'selector':element.mSelectorText,
'selector':element.mSelectorText,
'property':css.property,
'property':css.property,
'value':css.valueText
'value':css.valueText
})
})
}
}
if (css.valueText.includes('midi')){
if (css.valueText.includes('note')||css.valueText.includes('cc')){
midiEvents.push({
midiEvents.push({
'selector':element.mSelectorText,
'selector':element.mSelectorText,
'property':css.property,
'property':css.property,
...
@@ -59,8 +59,14 @@ function templateToDict(string) {
...
@@ -59,8 +59,14 @@ function templateToDict(string) {
);
);
if (string.includes(',')){
if (string.includes(',')){
eventString=template.split(',')[0];
eventString=template.split(',')[0];
eventType=eventString.split('.')[1];
if (eventString.includes(':')){
eventName=eventString.split('.')[2];
eventType=eventString.split(':')[0];
eventName=eventString.split(':')[1];
}
else{
eventType=eventString;
eventName='';
}
min=template.split(',')[1];
min=template.split(',')[1];
max=template.split(',')[2];
max=template.split(',')[2];
returnValue.push({
returnValue.push({
...
@@ -71,8 +77,15 @@ function templateToDict(string) {
...
@@ -71,8 +77,15 @@ function templateToDict(string) {
'max':max
'max':max
});
});
}
}
eventType=string.split('.')[1];
else{
eventName=string.split('.')[2];
if (string.includes(':')){
eventType=string.split(':')[0];
eventName=string.split(':')[1];
}
else{
eventType=eventString;
eventName='';
}
returnValue.push({
returnValue.push({
'eventType':eventType,
'eventType':eventType,
'eventName':eventName,
'eventName':eventName,
...
@@ -80,6 +93,7 @@ function templateToDict(string) {
...
@@ -80,6 +93,7 @@ function templateToDict(string) {
'min':0,
'min':0,
'max':1
'max':1
});
});
}
string=string.replace('['+template+']','');
string=string.replace('['+template+']','');
}
}
returnreturnValue;
returnreturnValue;
...
@@ -142,7 +156,7 @@ function midiEvent(type, data) {
...
@@ -142,7 +156,7 @@ function midiEvent(type, data) {