Skip to content

Waterfall config example #36

Answered by cifkao
zhuzixu900818 asked this question in Q&A
Discussion options

You must be logged in to vote

In your script, you first need to get a reference to your visualizer, e.g.: const visualizer = document.getElementById("myPianoRollVisualizer"). Also, you should pay attention to < vs. ( and true vs True.

This should work:

<script src="https://cdn.jsdelivr.net/combine/npm/tone@14.7.58,npm/@magenta/music@1.23.1/es6/core.js,npm/focus-visible@5,npm/html-midi-player@1.4.0">
</script>

<midi-player src="https://cdn.jsdelivr.net/gh/cifkao/html-midi-player@2b12128/twinkle_twinkle.mid" visualizer="#myPianoRollVisualizer">
</midi-player>

<midi-visualizer type="waterfall" id="myPianoRollVisualizer">
</midi-visualizer>

<script>
const visualizer = document.getElementById("myPianoRollVisualizer");
v…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zhuzixu900818
Comment options

Answer selected by zhuzixu900818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants