Skip to content

Am adding interaction to visualizer - quick question #49

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

You must be logged in to vote

I think what is happening is that whenever the player starts playing, it assigns its note sequence to the visualizer element, which triggers a complete reinitialization (a brand new Magenta visualizer is created with a new SVG element). This is to allow multiple players to share a single visualizer, but it does mess up use cases like yours.

So for now adding your listeners on the stop event seems like the correct workaround. A cleaner solution could be adding logic to VisualizerElement to prevent reinitialization if the correct sequence is already in place.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@swampthang
Comment options

@cifkao
Comment options

Answer selected by cifkao
Comment options

You must be logged in to vote
0 replies
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