@@ -314,7 +314,7 @@
Save/Load Settings
mp3tag.read();
if(mp3tag.error!='') throw new Error(mp3tag.error);
mp3tag.tags.v2={};
- mp3tag.tags.v2.COMM=[{language: 'eng', descriptor: '', text: 'Converted from "'+file.name+'"'}];
+ mp3tag.tags.v2.COMM=[{language: 'eng', descriptor: '', text: 'Converted from "'+file.name+'"\n'+getsettingsjson()}];
mp3tag.save({strict:true, id3v2: { padding: 4096}});
download(fileName + ".mp3", arraybufftoarray(mp3tag.buffer));
}
@@ -334,7 +334,7 @@ Save/Load Settings
}
// create output from custom funscript
- function createmp3(fsobj,fileName) {
+ function createmp3(fsobj,fileName,comment) {
let msg = {};
let row = document.createElement('div');
@@ -356,8 +356,15 @@ Save/Load Settings
left: { min: 1, center: 1, max: 1 },
right: { min: 1, center: 1, max: 1 }
};
- msg.nor_min = 0;
- msg.nor_max = 100;
+ msg.volumeMap.center = document.getElementById('map_center_pos').value / 100.0;
+ msg.volumeMap.left.min = document.getElementById('map_left_min').value / 100.0;
+ msg.volumeMap.left.center = document.getElementById('map_left_center').value / 100.0;
+ msg.volumeMap.left.max = document.getElementById('map_left_max').value / 100.0;
+ msg.volumeMap.right.min = document.getElementById('map_right_min').value / 100.0;
+ msg.volumeMap.right.center = document.getElementById('map_right_center').value / 100.0;
+ msg.volumeMap.right.max = document.getElementById('map_right_max').value / 100.0;
+ msg.nor_min = document.getElementById('nor_min').value / 1.0;
+ msg.nor_max = document.getElementById('nor_max').value / 1.0;
msg.funscript = fsobj;
@@ -372,7 +379,7 @@ Save/Load Settings
mp3tag.read();
if(mp3tag.error!='') throw new Error(mp3tag.error);
mp3tag.tags.v2={};
- mp3tag.tags.v2.COMM=[{language: 'eng', descriptor: '', text: 'Custom generation by funstim script converter'}];
+ mp3tag.tags.v2.COMM=[{language: 'eng', descriptor: '', text: comment}];
mp3tag.save({strict:true, id3v2: { padding: 4096}});
download(fileName + ".mp3", arraybufftoarray(mp3tag.buffer));
}
@@ -516,7 +523,7 @@ Save/Load Settings
if(customtiming.length>0)
{
let fileName = 'custom_'+document.getElementById('frequency').value.split(",").join("_")+'hz_'+customtiming.length+'action';
- createmp3(JSON.stringify(createcustomtimingfs(customtiming,duration)),fileName);
+ createmp3(JSON.stringify(createcustomtimingfs(customtiming,duration)),fileName,'Custom generation by funstim script converter\n'+getsettingsjson());
}
else
{
@@ -542,14 +549,14 @@ Save/Load Settings
}while(ms<=duration*1000);
let fileName = 'stroke_'+spm+'spm_'+document.getElementById('frequency').value.split(",").join("_")+'hz_'+p1+'_'+p2;
- createmp3(JSON.stringify(fs),fileName);
+ createmp3(JSON.stringify(fs),fileName,'Custom generation by funstim script converter\n'+getsettingsjson());
}
}
}
}
}
- function clickSaveSettings(e)
+ function getsettingsjson()
{
inp=document.getElementsByTagName('input');
sel=document.getElementsByTagName('select');
@@ -570,7 +577,12 @@ Save/Load Settings
settings.push({id:sel[i].id,val:sel[i].value});
}
}
- document.getElementById('settings').value=JSON.stringify(settings);
+ return JSON.stringify(settings);
+ }
+
+ function clickSaveSettings(e)
+ {
+ document.getElementById('settings').value=getsettingsjson();
}
function clickLoadSettings(e)