I am trying to load a Js Dynamic Audio Synth

I saw a working Javascript Piano which I would like to implement on my page as a shortcode. I have already enqueued the Js file, and I can see it when I view my page source.

This is how I enquued it:

function chicken_wings_scripts() {

wp_enqueue_script( ‘audiosynth’, get_stylesheet_directory_uri() . ‘/js/audiosynth.js’, array(), null, true );

My main challenge is I don’t know how to call the code to display on frontend as the documentation is not a beginner friendly.

The documentation said “audiosynth implements a singleton class, AudioSynth”

Synth instanceof AudioSynth; // true

var testInstance = new AudioSynth;
testInstance instanceof AudioSynth; // true

testInstance === Synth; // true

This is a working example of the Piano https://keithwhor.com/music/

Read more here:: I am trying to load a Js Dynamic Audio Synth

Leave a Reply

Your email address will not be published. Required fields are marked *