Motion
Get Motion

ReferenceScript nodesAudio

On Track Changed

When what's playing on the desktop changes: another track, paused or played.

AudioAn event: starts a chainonTrackChanged

Inputs

None. It starts a chain of its own.

Outputs

PinType
thenwhat happens next
Titletitletext
Artistartisttext
Playingplayingbool

The code it becomes

The graph below written as a script would write it.

let s2_title = "";let s2_artist = "";let s2_playing = false;// On Track Changedscene.on("media", function (m) { s2_title = String(m && m.title || ""); s2_artist = String(m && m.artist || ""); s2_playing = !!(m && m.playing);    scene.log(s2_title);});

In a graph

The node with what starts it and Print to show what it gives, as Studio draws them.