Skip to content

Using JavaScript to communicate with Pure Data #16

Discussion options

You must be logged in to vote

Hi @luismrguimaraes,

Yes, it is possible I am yet doing the docs, but you can understand part of it reading this:

https://charlesneimog.github.io/pd4web/js/

In this case, to send a float from js to PureData you need to use Pd4Web.sendFloat("myreceiver", 5), from Pd, you will receive this number from the object [r myreceiver].


To send, for example, a float from Pd to Js you need the function:

Pd4Web.onFloatReceived("myfloat", function (f) { 
    console.log("Received " + f)
});

This function will be executed always you send something to object [s myfloat] (on Pd side).

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@luismrguimaraes
Comment options

@luismrguimaraes
Comment options

@charlesneimog
Comment options

@luismrguimaraes
Comment options

@charlesneimog
Comment options

Answer selected by luismrguimaraes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #15 on November 01, 2024 19:49.