How can I play a sound with text code

Im currently editing a plugin by Astfgl I wanted to add a certain feature like play a sound with a text code.... and I want to know if that is actually Possible... tried a lot of stuff in the end nothing worked...

here what I came up with...

if (code === 'SE') {
var ar = this.obtainEscapeParamArray(textState);
var ob = {
name: ar[0],
pan: Number(ar[3]) || 0,
pitch: Number(ar[2]),
volume: Number(ar[1])
};
var sound = ob;
AudioManager.playSe(sound);

and thank you
Never mind... it works I just forgot that I had the volume on 0..... oppsies

you can close the thread...

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-play-a-sound-with-text-code.125195/