Skip to content

any way to tap into other magenta settings ie, quantize? #46

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

You must be logged in to vote

Yes, you can take a NoteSequence (either you retrieve it from player.noteSequence or you load it yourself using urlToNoteSequence), manipulate it in any way you want, then assign the result to player.noteSequence.

The player cannot really work with quantized sequences (with integer time steps) directly, but you should be able to use unquantizeSequence to convert a quantized sequence back to a "normal" one that the player supports.

As for how to actually access all the Magenta functions, if you are using the Magenta bundle in your page as suggested in the readme, the @magenta/music/core module will be loaded simply under the name core. So you can call e.g. core.sequences.quantizeNoteSequence.

Replies: 4 comments 2 replies

Comment options

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

Answer selected by cifkao
Comment options

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

Comment options

You must be logged in to vote
0 replies
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
3 participants
Converted from issue

This discussion was converted from issue #45 on April 27, 2022 20:25.