Welcome to euphony.js Discussions! #10
designe
announced in
Announcements
Replies: 2 comments 1 reply
-
Thx for opening discussion! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just created UTF-32 encoding function. setCode: function (data) {
const T = this;
/* 1) Ss is starting buffer to use trigger point
S includes starting buffer with crossfade effect.
s is only starting buffer.
*/
let code = 'Ss';
/* 2) Generate pure data code */
let dataCode = '';
for (let i = 0; i < data.length; i++) {
let nowChar = data.charCodeAt(i).toString(16);
let u32 = nowChar;
for(let j = nowChar.length; j < 8; j++)
u32 = '0' + u32;
console.log("" + i + " : " + u32);
dataCode += u32;
}
code += dataCode;
console.log("result : " + code);
/* 3) Generate checksum & parity code */
code += T.makeChecksum(dataCode).toString(16);
code += T.makeParallelParity(dataCode);
/* 4) Setting Euphony Code */
T.setInnerCode(code);
/* 4) copy playBuffer to web audio buffer to use Web Audio API */
T.applyAudioBuffer();
} While encoding is in progress console output will be printed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions