profile
viewpoint
Monica Dinculescu notwaldorf Google Sun Funcisco ☀️ https://twitter.com/notwaldorf I'm your favourite developer's favourite developer. 🙋 github.com/notwaldorf/ama

GoogleChromeLabs/howto-components 750

Literate code examples for common UI patterns.

magenta/magenta-studio 282

Magenta Studio is a collection of music plugins built on Magenta’s open source tools and models

notwaldorf/cat-dns 200

:computer::cat: A DNS server that resolves everything to cats.

notwaldorf/caturday-post 138

:cat::calling: Push notifications with cats and Polymer

notwaldorf/.not-quite-dotfiles 119

:moneybag: NO JUDGING

magenta/drumbot 118

Play real-time music with a machine learning drummer that drums based on your melody.

notwaldorf/dear-sir-or-madam 103

:love_letter: Bookmarklet that ransomifies your internets

notwaldorf/ama 89

:raising_hand: Ask @notwaldorf anything!

notwaldorf/doodle 66

🎨👾 Doodle with pixels and without pressure

notwaldorf/diagramophone 37

:art: code your diagrams, because drawing them really sucks

issue commenttensorflow/magenta-js

require('@magenta/music/node/transcription'); Does not work in serverside NodeJS

magenta.js was initially written as a browser library (so all client side), but we’ve recently made it work in node. However, this doesn’t means that all models will work in node — the ones that rely on browser features, such as the web audio api, won’t work out of the box, I’m afraid. I think only onsets and frames and gansynth are affected, and you might still get them to work with the library I linked!

Mylab6

comment created time in 2 days

issue commenttensorflow/magenta-js

require('@magenta/music/node/transcription'); Does not work in serverside NodeJS

Hmm, I think the problem here is that transcription (are you using onsets and frames?) uses the audio context to record and handle the audio, and that’s a browser spec, not a server side spec. I’m not sure what exactly you’re doing, but some googling led me to https://github.com/audiojs/web-audio-api, which is an implementation of the web audio API that should work in node.

Mylab6

comment created time in 2 days

Pull request review commenttensorflow/magenta-js

Fix docs script

 currDir=$(pwd) baseDir=$(git rev-parse --show-toplevel)  # Generation variables.-mode="modules"-tsconfig="tsconfig.json"-urlPrefix="https://github.com/tensorflow/magenta-js/tree/master/${PKG_NAME}/src/"+urlPrefix="https://github.com/${ORG_NAME}/magenta-js/tree/master/${PKG_NAME}/src/"+keepAfter="/src/"+scriptToFixTheToc=""+ if [ $PKG_NAME == "image" ] then-  mode="file"   urlPrefix="$urlPrefix/arbitrary_stylization/"+  keepAfter="/arbitrary_stylization/" elif [ $PKG_NAME == "music" ] then-  tsconfig="tsconfig.es5.json"+  # The root index.ts file has a bunch of "export * from './foo';" lines.+  # Parse those lines into a space separated list of names. It's ok that+  # they're space separated, we'll split them in JS, this is all a horror anyway.+  exports=`sed -n "s/export \* from '.\/\(.*\)';/\1/p" $currDir/src/index.ts`+  scriptToFixTheToc="<script> \+const toc = \"$exports\".split(' '); \+const links = document.querySelectorAll('.tsd-kind-external-module'); \+for (let i = 0; i < links.length; i++) { \+  const name = links[i].textContent.trim().replace(/\"/g, ''); \+  if (toc.indexOf(name) === -1) { \+    links[i].parentNode.removeChild(links[i]); \+  } \+} \+</script>" fi  # Generate the docs. rm -rf $tmpDir-npx typedoc --tsconfig $tsconfig --sourcefile-url-prefix $urlPrefix --out $tmpDir  --mode $mode --excludePrivate --exclude '**/*+(index|test|lib).ts' --excludeExternals src+npx typedoc --options typedoc.json src --out $tmpDir++###+# Here begin the different hacks to fix the docs because typedoc has a lot of bugs.+###++# Typedoc generates documentation for _all_ files, not just the ones+# actually exported in the library, so insert a script to fix the index.html.+# see https://github.com/TypeStrong/typedoc/issues/639+echo $scriptToFixTheToc >> $tmpDir/index.html

Oh brilliant, would you mind if I sent a PR to update this in the docs? This is super confusing

notwaldorf

comment created time in 2 days

Pull request review commenttensorflow/magenta-js

Fix docs script

 currDir=$(pwd) baseDir=$(git rev-parse --show-toplevel)  # Generation variables.-mode="modules"-tsconfig="tsconfig.json"-urlPrefix="https://github.com/tensorflow/magenta-js/tree/master/${PKG_NAME}/src/"+urlPrefix="https://github.com/${ORG_NAME}/magenta-js/tree/master/${PKG_NAME}/src/"+keepAfter="/src/"+scriptToFixTheToc=""+ if [ $PKG_NAME == "image" ] then-  mode="file"   urlPrefix="$urlPrefix/arbitrary_stylization/"+  keepAfter="/arbitrary_stylization/" elif [ $PKG_NAME == "music" ] then-  tsconfig="tsconfig.es5.json"+  # The root index.ts file has a bunch of "export * from './foo';" lines.+  # Parse those lines into a space separated list of names. It's ok that+  # they're space separated, we'll split them in JS, this is all a horror anyway.+  exports=`sed -n "s/export \* from '.\/\(.*\)';/\1/p" $currDir/src/index.ts`+  scriptToFixTheToc="<script> \+const toc = \"$exports\".split(' '); \+const links = document.querySelectorAll('.tsd-kind-external-module'); \+for (let i = 0; i < links.length; i++) { \+  const name = links[i].textContent.trim().replace(/\"/g, ''); \+  if (toc.indexOf(name) === -1) { \+    links[i].parentNode.removeChild(links[i]); \+  } \+} \+</script>" fi  # Generate the docs. rm -rf $tmpDir-npx typedoc --tsconfig $tsconfig --sourcefile-url-prefix $urlPrefix --out $tmpDir  --mode $mode --excludePrivate --exclude '**/*+(index|test|lib).ts' --excludeExternals src+npx typedoc --options typedoc.json src --out $tmpDir++###+# Here begin the different hacks to fix the docs because typedoc has a lot of bugs.

Oh, no worries! I know documentation projects are often understaffed :(

notwaldorf

comment created time in 2 days

push eventtensorflow/magenta-js

Nico Weber

commit sha 5940871ee9f38d3d9fd52f8e45b89f132353ca09

Replace pipe with intended or. (#413) Also set pipefail so that pipes don't silently ignore errors.

view details

push time in 3 days

PR merged tensorflow/magenta-js

Replace pipe with intended or.

Also set pipefail so that pipes don't silently ignore errors.

+2 -2

0 comment

1 changed file

nico

pr closed time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha b97e330f8b9d1446d7e681b4353a93ee20125178

clean up about

view details

push time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 5eb90fc60bbaa234a31a4069a42b4f4f2296eed7

img alts

view details

push time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 99a7e5a65ffd1150c68a059b187abd89c6a213e7

better

view details

push time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 7e660b338ff253437e92154559e2ac0d37a773b1

add another flag

view details

push time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 35df04ca6dd440960475f2237b2da1447264dd90

oops undo that size

view details

push time in 3 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha cfb43f01dc2f071e95a0178a4e434e76339e80e4

add typedoc post

view details

push time in 3 days

PR opened tensorflow/magenta-js

Reviewers
📖 Updating music docs: Thu Feb 20 22:52:55 PST 2020
+20236 -41778

0 comment

209 changed files

pr created time in 3 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha c5e8a579b0034e7636063bb1a419f280c57a5b20

omg hide non-exported modules i did it!!

view details

push time in 3 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 52b0351ef63858c5041ab384c9431fe74ae3286f

📖 Updating music docs: Thu Feb 20 22:52:55 PST 2020

view details

push time in 3 days

PR closed tensorflow/magenta-js

Reviewers
📖 Updating music docs: Thu Feb 20 19:09:33 PST 2020

They live at https://meowni.ca/magenta-js/music/index.html if you want to check them out.

+0 -0

0 comment

0 changed file

notwaldorf

pr closed time in 3 days

push eventnotwaldorf/magenta-js

push time in 3 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha c0cfdb5e7f2fb74adf764ee5606619bc8d8a9dda

omg hide non-exported modules i did it!!

view details

push time in 3 days

pull request commenttensorflow/magenta-js

Fix docs script

I think this is strictly better than what we have now because this actually shows NoteSequences: https://meowni.ca/magenta-js/music/modules/protobuf.html, whereas https://tensorflow.github.io/magenta-js/music/modules/protobuf.html doesn't

notwaldorf

comment created time in 4 days

PR opened tensorflow/magenta-js

📖 Updating music docs: Thu Feb 20 19:09:33 PST 2020

They live at https://meowni.ca/magenta-js/music/index.html if you want to check them out.

+38093 -47168

0 comment

250 changed files

pr created time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha cbbbec0db26d01e7f58be9c55f985090d0fb1ccf

remove leftover comment

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 65c994897546a6e6061d49bc4ec6c8a4622afe98

trailing comma

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 8140c652469f0a5cf84e8010cd4540d85faa6c06

fix

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 2939705eb8b6f116902f55130e8c7029dcf00a2e

quiet git

view details

Monica Dinculescu

commit sha 99dcedc0632c021c31af4707bce10365e6d6a4a8

create typedoc files, give up on getting the toc to work

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 613c12da0c30f0ce6249d23d2fffba844a7f7667

📖 Updating music docs: Thu Feb 20 19:09:33 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha dc42a55bc2e6f984ca185255d39d0bb803e97781

only prompt in music

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 80c03cc55e30eb12fd0b91bd5ef1f0fe13afa0ce

add nice warning

view details

Monica Dinculescu

commit sha 9acefe26fe4d29bc50906f3c5c5db1d5854a5187

add warning that works

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha e1c965baf3aaccddc1ec6f5cb9fe5f943a9ee3eb

Updating music docs: Thu Feb 20 18:42:14 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 7ff1c42610ab44b406fb3844c6310155caa3175d

remove batman

view details

Monica Dinculescu

commit sha 1433df9e0e33d033f88526ce17f2ed257ea62d54

maybe this isnt a string

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 5e179930f76464992bdad73a432eaef5c2c9e2ee

Updating music docs: Thu Feb 20 18:35:06 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha caa94d3b095306510aecc564b5867b889a406acb

add a toc

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 1043349e0daf44ba1aea300cdeb6ae749efeaa3f

whole directories we're missing!

view details

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 76a27c0c3c7ab3684183bbd1b54cfa527d7bf2cf

Updating music docs: Thu Feb 20 18:25:03 PST 2020

view details

push time in 4 days

PR closed tensorflow/magenta-js

Updating music docs: Thu Feb 20 18:09:27 PST 2020

(still working on this)

+0 -0

0 comment

0 changed file

notwaldorf

pr closed time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 853baa76f8ba83211efd0269216cb10f697ef35c

try to stop generating docs for audio_utils

view details

Monica Dinculescu

commit sha 1d3867d2b06e32ab8b1059ec0a78ef02765a1cc5

keep trying

view details

push time in 4 days

PR opened tensorflow/magenta-js

Updating music docs: Thu Feb 20 18:09:27 PST 2020
+41844 -41204

0 comment

251 changed files

pr created time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 1daabf8331e4fc38594f4c991cc356384790a57e

Updating music docs: Thu Feb 20 18:09:27 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

PR opened tensorflow/magenta-js

Fix docs script

At some point typedoc-plugin-sourcefile-url stopped working for us and after 2 hours of trying to fix it I just replaced it with a sed so here's that.

  • I've added includeVersion which now prints the package.json version in the docs. It's kind of nice to keep track of what you're looking at.

Here's what the look like now: https://meowni.ca/magenta-js/music/index.html

+31 -7

0 comment

2 changed files

pr created time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 74368e5f4d86dc542c14fc403559f15bf7d932c9

Updating music docs: Thu Feb 20 18:04:07 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

create barnchnotwaldorf/magenta-js

branch : fix-docs-script

created branch time in 4 days

PR opened tensorflow/magenta-js

Updating music docs: Thu Feb 20 17:57:34 PST 2020
+44213 -22802

0 comment

258 changed files

pr created time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 9aa1fd7b6ee519dcb46ac270ffa0784abda82699

Updating music docs: Thu Feb 20 17:57:34 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha 7cd06d9f2f0b9cfec78b3a1cf363f846fa992f11

Updating music docs: Thu Feb 20 17:53:06 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

PR opened tensorflow/magenta-js

Updating music docs: Thu Feb 20 14:51:04 PST 2020
+49524 -17926

0 comment

213 changed files

pr created time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha a67f981b6a7b90a5e45edb25f551bdc33be3dd23

Updating music docs: Thu Feb 20 14:51:04 PST 2020

view details

push time in 4 days

push eventnotwaldorf/magenta-js

push time in 4 days

push eventnotwaldorf/magenta-js

Monica Dinculescu

commit sha c48f0b915bca2a1d23c92b2300bf8261e288d33d

v1.13.0 (#406)

view details

push time in 4 days

delete branch notwaldorf/magenta-js

delete branch : release-1.13

delete time in 4 days

push eventtensorflow/magenta-js

Monica Dinculescu

commit sha c48f0b915bca2a1d23c92b2300bf8261e288d33d

v1.13.0 (#406)

view details

push time in 4 days

PR merged tensorflow/magenta-js

v1.13.0
+1 -1

0 comment

1 changed file

notwaldorf

pr closed time in 4 days

PR opened tensorflow/magenta-js

v1.13.0
+1 -1

0 comment

1 changed file

pr created time in 4 days

create barnchnotwaldorf/magenta-js

branch : release-1.13

created branch time in 4 days

PR closed tensorflow/magenta-js

Translate in Korean

The README file is translated in Korean for better development by Korean developers.

+19 -18

1 comment

2 changed files

eunjiahn1

pr closed time in 4 days

pull request commenttensorflow/magenta-js

Translate in Korean

Closing this since there hasn't been any activity since in over 3 months

eunjiahn1

comment created time in 4 days

issue closedtensorflow/magenta-js

Export STFT?

Hello!

I have a project and I need to use the Short Term Fourier Transform directly but I noticed that despite being the documentation I cannot use it. Would it be possible to export the function so that it could be used? Or is there another way to access it that I'm not seeing?

Thanks õ/

closed time in 4 days

deltonvaz

issue commenttensorflow/magenta-js

Export STFT?

Alright, I've thought about this more and I don't think we want to add all these audio_utils as a public API -- we added them for a model in particular, and the problem is that they aren't tested for all cases. We definitely don't plan on working on them or adding new features, and there's many libraries out there that give you different ways to do stfts. So this is why I think they should remain a private API.

I'm not exactly sure why the documentation is being generated for them (I assume it's a bug with the docs generator), but I think your best bet if you want to use this particular stft implementation is to just copy it into your own project from here

deltonvaz

comment created time in 4 days

PR closed tensorflow/magenta-js

export the audio utils

Fixes https://github.com/tensorflow/magenta-js/issues/393

(I don't remember if there's a reason why we don't explicitly export the audio_utils btw)

+3 -2

2 comments

2 changed files

notwaldorf

pr closed time in 4 days

issue commenttensorflow/magenta-js

Multiple players getting mixed up

When the first player stops, the other one stops as well. However, only the callback for the first player gets called. Yeah, this definitely looks like it's the case: code. When we call stop(), this also stops the tone.js Transport, which is going to also stop the other player.

I think the best solution for now is to document this (your option 3). Options 1 and 2 sound hard, because I don't know if we can tell from playerA that playerB also exists, so this sounds like a thing that should be checked on the app side, not the Player side. I really don't want to add a "PlayerManager" that keeps track of all the Players instantiated in the app and tries to manage them, so I think documenting this to cause less surprises is the best.

Would you like to send me a PR? 🙏

cifkao

comment created time in 4 days

issue commenttensorflow/magenta-js

How to calculate the scale_factor for sketch-rnn dataset?

@hardmaru, could you please take a look? thanks!

shanjgit

comment created time in 4 days

pull request commenttensorflow/magenta-js

export the audio utils

What if I just export stft(), which is what the issue asks for?

notwaldorf

comment created time in 4 days

issue closedtensorflow/magenta-js

How to import/export/stream sequence&midi data across the grpc or socket?

I am attempting to develop a collaboration music app. WebServer/Browser <--(Bi-direction)--> MobileApp Clients. I may need streaming method via bi-direction.

Clients apps are not WebBrowser and need some fast seamless connection via grpc or socket. I am thinking to utilize gRPC because Json with Http1.x is slow and heavy for this; it is not even suitable for streaming. As you know, grpc supports bi-direction streaming mechanism. Seemingly, magenta takes advantage of Protobuf to serialize data, right? but where is the methods about this?

What about "sequenceProtoToMidi"? this is all about json-based data? I couldn't find functions to import and export protobuf in midi_io.ts.

Could you show me some APIs or examples or even some tips/guides?

closed time in 4 days

NiNJAD3vel0per

issue commenttensorflow/magenta-js

How to import/export/stream sequence&midi data across the grpc or socket?

Looks like this was answered, closing! 🎉

NiNJAD3vel0per

comment created time in 4 days

issue commenttensorflow/magenta-js

Add support for playNoteDown/playNoteUp to non soundfont players too

It's already been added to mm.MIDIPlayer, and I don't know if anyone cares about being added to the plain synth mm.Player, so I'm going to close this for now until I hear there's a demand for it.

notwaldorf

comment created time in 4 days

issue closedtensorflow/magenta-js

How to download SoundFontPlayer GCS to local mirror ?

I found a link in code snippet:

// Set up SoundFont player. const player = new mm.SoundFontPlayer('https://storage.googleapis.com/download.magenta.tensorflow.org/soundfonts_js/sgm_plus', globalCompressor, programMap, drumMap);

I am already download pretrained checkpoints file from GCS using scripts given by README, how can I download https://storage.googleapis.com/download.magenta.tensorflow.org/soundfonts_js/sgm_plus to my local server?

Thanks a lot !

closed time in 4 days

lizekui

issue commenttensorflow/magenta-js

How to download SoundFontPlayer GCS to local mirror ?

For a soundfont, the directory structure is:

  └─sgm_plus
    |-- soundfont.json
    |-- instrument_name (for each of the instruments listed in soundfont.json)
        |-- instrument.json
        |-- p1_v1.mp3
        |-- p1_v2.mp3
        |-- ...
        |-- p${PITCH}_v${VELOCITY}.mp3, for all the pitches and velocities

So i think you'd have to download them each on their own, like:

curl https://storage.googleapis.com/magentadata/js/soundfonts/sgm_plus/soundfont.json > soundfont.json

mkdir acoustic_grand_piano # or the instrument you want
cd acoustic_grand_piano

curl https://storage.googleapis.com/magentadata/js/soundfonts/sgm_plus/acoustic_grand_piano/instrument.json > instrument.json

curl https://storage.googleapis.com/magentadata/js/soundfonts/sgm_plus/acoustic_grand_piano/p100_v111.mp3 > p100_v111.mp3
# curl the rest of the pitch/velocity files.
lizekui

comment created time in 4 days

issue closedtensorflow/magenta-js

Precision problems in MultitrackConverter on Safari

I'm getting the following kinds of results for the tokens tensor in MultitrackConverter.toNoteSequence on Safari 11.1 on OS X:

screen shot 2018-08-28 at 20 11 45

These in turn become pitches like 50.999996185302734 in the NoteSequence.

I was able to fix it for myself using some Math.round()s in a few places (and can make a PR of that if needed), but I feel there's probably a better way to fix this. I tried casting the tensor with asType('int32') before fetching the data, but to no avail.

closed time in 4 days

teropa

issue commenttensorflow/magenta-js

Precision problems in MultitrackConverter on Safari

Closing this as we've switched to tfjs 1, which may or may not have fixed it. Please re-open a new one with more details/repro steps if it's still important and happening! ❤️

teropa

comment created time in 4 days

issue closedtensorflow/magenta-js

Uncaught TypeError: Cannot read property '1' of null during saving a midi file

In all code pens from Multitrack VAE I wasn't able to save the result as a midi file.

In the console, I see this log:

    at Object.midiPitchFromNote (magentamusic.js:13370)
    at Object.ensureMidiPitch (magentamusic.js:13370)
    at a.addNoteOn.a.noteOn (magentamusic.js:13370)
    at Array.<anonymous> (magentamusic.js:13370)
    at a (magentamusic.js:13370)
    at r (magentamusic.js:13370)
    at o.value (magentamusic.js:13370)
    at magentamusic.js:13370
    at Array.forEach (<anonymous>)
    at r.value (magentamusic.js:13370)

At the top level the exception happens when sequenceProtoToMidi method is called. But the cause is somewhere in the autogenerated code I suppose:

1

closed time in 4 days

Apisov

issue commenttensorflow/magenta-js

Uncaught TypeError: Cannot read property '1' of null during saving a midi file

This issue is very old and we couldn't repro it, so I'm going to close for now. Please re-open a new one with more details/repro steps if it's still important and happening!

Apisov

comment created time in 4 days

issue closedtensorflow/magenta-js

Add ScoreVisualizer to display NoteSequences as musical scores in staffs

Current Visualizer class is cool (great job @notwaldorf ), and it could evolve to display sequences not just as pianoroll, but music staff as well. A derived ScoreVisualizer is proposed.

It must fit current pianoroll functionality in a polymorphic way introducing minimal changes:

  • constructor(sequence, canvas, config) which:
    • Constructs all the internals according to the given config.
    • Ends up doing the initial redraw.
  • redraw(activeNote, scrollIntoView) which:
    • Uses the graphical placeholder (currently canvas) to do the drawing (if needed) with the non-highlighted style.
    • Uses the activeNote, if given, to highlight it in the drawing, dimming the style colour according with the velocity note (if any).
    • Scrolls the graphical placeholder to locate the activeNote properly if requested in scrollIntoView.

Minimum Viable Product (MVP) must add new music staff functionality through the same Visualizer interface:

  • [x] Prepare a class hierarchy to allow SVG visualizers.
  • [x] Provided values config.minPitch and config.maxPitch should be used to select the musical clef (at least treble clef and bass clef). Undetermined cases will default to treble clef.
  • [x] Different values of time signature will be extracted from given sequence, if any. Otherwise it will be assumed 4/4 for all staff.
  • [x] It will be displayed the clef signature at the beginning of the staff, and it won't change through the score.
  • [x] No key signature will be displayed at the beginning of the staff. It will be assumed C key.
  • [x] Initial time signature will be displayed at the beginning of the staff.
  • [x] Bar separators will be displayed according with initial time signature.
  • [x] There will only be a single five-line staff per NoteSequence. Multiple staff will be handled instantiating several vertically aligned ScoreVisualizer instances with different config.minPitch and config.maxPitch values.
  • [x] Horizontal note disposition will be coherent with current pianoroll Visualizer in order to allow aligning heterogeneous visualizers vertically. It's out of scope in this class to visualize compact staff which would be handled in future derived visualizers.
  • [x] Musical clef, time signature and key signature displayed at the beginning of the staff will be handled to allow vertical alignment with other visualizers as mentioned. Yet to be detailed.
  • [x] Notes and rests will be drawn from whole note (semibreve) to sixty-fourth note (hemidemisemiquaver) including dotted-note versions (single dotted).
  • [x] No ties will be displayed to join two equal-pitch different length notes, so gaps due to rounding duration would appear.
  • [x] Note stems will be displayed upwards or downwards as expected (downwards if the notehead lies on or above the middle line of the staff).
  • [x] Shorter than octave notes will show individual note flags.
  • [x] Rests will be highlighted jointly to its former note, given they are not related to any activeNote.
  • [x] It will be shown only sharp notes, no flat ones, given there's no key signature and sticking to the "all sharps or all flats" criteria.
  • [x] Sharps will be shown in every note they apply, providing accidental redundancy instead skipping them when they appears previously in same note in same bar.

Nice to have functionalities out of MVP:

  • [x] Different values of key signature will be extracted from given sequence, if any. Otherwise it will be assumed C key for all staff.
  • [x] Initial key signature will be displayed at the beginning of the staff.
  • [x] Changes in key signature will be displayed through score if any.
  • [x] Changes in time signature will be displayed through score if any.
  • [x] Music ties will be displayed, including multi-bar scenarios.
  • [x] Accidentals won't be repeated within a bar, applying as well to the remainder of the measure where they occur.
  • [ ] Shorter than eighth notes will group note flags in binary groups (2, 4, 8...) displaying homogeneous note beams. No mixed durations beam will be generated.
  • [ ] Chord changes will be displayed on top of staff through score, if any. There will be no superscript text on it (7th and the like) but a straight single line text.
  • [ ] Triplet signs will be shown.
  • [ ] Values of qpm from sequence.tempos will be used to highlight rests.
  • [ ] Values of qpm from sequence.tempos will be used to show cursor animation (starting with each redraw() call).
  • [x] Extra VisualizerConfig fields will be defined to achieve finer control.

Current pianoroll Visualizer relies on html5 canvas placeholder, claming in the source code it could be improved the redrawing() performance. Benefits of using SVG instead should be evaluated.

closed time in 4 days

rogerpasky

issue commenttensorflow/magenta-js

Add ScoreVisualizer to display NoteSequences as musical scores in staffs

This was merged, so closing this! 🎉🎉🎉

rogerpasky

comment created time in 4 days

issue closedtensorflow/magenta-js

Channel 10 incorrectly loaded as drums

midiconvert used by Magenta.js seems to consider both channel 9 and 10 as drums (as per General MIDI 2), so when loading a MIDI file with urlToNoteSequence, notes in channel 10 will have isDrum == true. This is inconsistent with the behavior of Magenta, where only channel 9 is loaded as drums (as per General MIDI).

Among other things, this means that MIDI files created with Magenta and containing more than 9 non-drum tracks will be loaded incorrectly in Magenta.js.

closed time in 4 days

cifkao

issue commenttensorflow/magenta-js

Channel 10 incorrectly loaded as drums

I think this should be fixed, then!

cifkao

comment created time in 4 days

issue closedtensorflow/magenta-js

Uncaught (in promise): ReferenceError: WebMidi is not defined

I just installed the latest magentamusic npm package for my Angular project. I've got same error; I don't use the ts files directly. In Angular typescript project, I cannot use magentamusic.js script javascript file because Angular needs Typescript and d.ts type file.

ERROR in node_modules/@magenta/music/es5/core/player.d.ts(51,14): error TS2503: Cannot find namespace 'WebMidi'. node_modules/@magenta/music/es5/core/player.d.ts(52,32): error TS2503: Cannot find namespace 'WebMidi'. node_modules/@magenta/music/es5/core/recorder.d.ts(34,22): error TS2503: Cannot find namespace 'WebMidi'. node_modules/@magenta/music/es5/core/recorder.d.ts(35,24): error TS2503: Cannot find namespace 'WebMidi'. node_modules/@magenta/music/es5/core/recorder.d.ts(39,32): error TS2503: Cannot find namespace 'WebMidi'.

Even though magentajs music core sources are written in Typescript having d.ts, the output files built doesn't look up d.ts correctly. IDK . Maybe WebMidi package hasn't been installed after installing npm @magenta/music package.

I think Angular cannot find the package installed.

If I install "@types/webmidi", this error is gone. But another error comes out !

"core.js:15723 ERROR Error: Uncaught (in promise): ReferenceError: WebMidi is not defined ReferenceError: WebMidi is not defined"

I have to install webmidi package separately although magenta music package uses it; import WebMidi from 'webmidi'; Also I added the following line in angular.json config file

"scripts": [
              "./node_modules/webmidi/webmidi.min.js"
            ],

Please check out the how magentajs music package exports webmidi and types in the package.json of @magenta/music!

I am using pretty much latest Chrome browser and magenta package on MacOSx

closed time in 4 days

NiNJAD3vel0per

issue commenttensorflow/magenta-js

Uncaught (in promise): ReferenceError: WebMidi is not defined

Closing this, since I think it was fixed and there's been no updates on this issue

NiNJAD3vel0per

comment created time in 4 days

issue closedtensorflow/magenta-js

Support web workers for gansynth.js

I can use web workers in the following code:

simple.html

<html lang="en">
<body>
<script>
  new Worker("simple.js")
</script>
</body>
</html>

simple.js

importScripts("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.4.0/dist/tf.min.js");
importScripts("https://cdn.jsdelivr.net/npm/@magenta/music@^1.12.0/es6/core.js");
importScripts("https://cdn.jsdelivr.net/npm/@magenta/music@^1.12.0/es6/music_vae.js");

const musicvae = new music_vae.MusicVAE("https://storage.googleapis.com/" +
    "magentadata/js/checkpoints/music_vae/trio_4bar");
musicvae.initialize();

Which works properly. But if I add the following line, the code breaks:

importScripts("https://cdn.jsdelivr.net/npm/@magenta/music@^1.12.0/es6/gansynth.js");

With this error:

Uncaught null
Script error.

I don't have more information, I'll try to debug the gansynth.js code if I have time.

P.S. ES5 modules don't work because of "This browser does not support Tone.js".

closed time in 4 days

dubreuia

issue commenttensorflow/magenta-js

Support web workers for gansynth.js

I think the only big difference between the music_vae and gansynth models is that gansynth does a lot of audio work that needs an AudioContext, and I don't think that works in a WebWorker (but could maybe work in an AudioWorklet? I'm not very familiar with that spec). So unfortunately, I don't think that gansynth will work in a worker :(

dubreuia

comment created time in 4 days

PR opened tensorflow/magenta-js

Reviewers
export the audio utils

Fixes https://github.com/tensorflow/magenta-js/issues/393

(I don't remember if there's a reason why we don't explicitly export the audio_utils btw)

+3 -2

0 comment

2 changed files

pr created time in 4 days

create barnchnotwaldorf/magenta-js

branch : export-stft

created branch time in 4 days

issue commenttensorflow/magenta-js

Export STFT?

Oh yeah, I think we can do that! Going to send a PR out today

deltonvaz

comment created time in 4 days

push eventmagenta/drumbot

Jerome Petazzoni

commit sha 67ccbd160ab127d60ec646a2de41cfa136521f06

Handle "Note On" events with velocity 0 A lot of MIDI instruments (almost every keyboard I ever played!) are using "running status" and emit "Note On" with a velocity of zero when a key is released (instead of "Note Off"). This causes every note to sound twice (once when pressed, once when released). This patch addresses this. Sorry if it's not very Node-ish; feel free to rewrite, discard, or ignore :)

view details

Monica Dinculescu

commit sha 268b57d31ca0eef0bff9932d4554ed3a379e99a1

Merge pull request #4 from jpetazzo/note-on-velocity-0 Handle "Note On" events with velocity 0

view details

push time in 4 days

PR merged magenta/drumbot

Handle "Note On" events with velocity 0

A lot of MIDI instruments (almost every keyboard I ever played!) are using "running status" and emit "Note On" with a velocity of zero when a key is released (instead of "Note Off").

This causes every note to sound twice (once when pressed, once when released).

This patch addresses this. Sorry if it's not very Node-ish; feel free to rewrite, discard, or ignore :)

+5 -5

3 comments

1 changed file

jpetazzo

pr closed time in 4 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha eb306b1f20ab1ffd1f739a0736cbbd4580e532b1

fix more things

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 7cc53601fa1d888ee811907ab56b8597850aae9f

new avatar

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 5e7273eb054ee6f6ac45991a65e5bf82f1914bbd

what's that doing there

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha e1538c2832b53a2b2940aec41aa827a292f39c0e

update

view details

Monica Dinculescu

commit sha ae5c1974964582a9c63773974ae23437626208af

fix so many csses omg

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 1f1e1ae0c54c639bd9da30b5bad713a92f8333dc

Remove thing I don’t actually use

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha 5691c27a62bce64b4af95f09f54a71161020e1c8

heh

view details

push time in 5 days

push eventnotwaldorf/notwaldorf.github.com

Monica Dinculescu

commit sha a345ccf18c5759915648c2f30a7c1f1005e6ef8e

better words

view details

push time in 5 days

more