Message Boards Message Boards

0
|
5514 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Cannot deploy "Play" and "Sound" to the cloud

Hi, I am just learning to deploy something on wolfram cloud. I tried the following, but it gave an error:

CloudDeploy[Play[Sin[700 t + 25 t Sin[350 t]], {t, 0, 4}]]

Play::cloudf: ?Play is not currently supported in the Wolfram Cloud.

Similarly, the following also failed: CloudDeploy[Sound[{SoundNote["C"], SoundNote["G"]}]]

SoundNote::cloudf: ?SoundNote is not currently supported in the Wolfram Cloud. SoundNote::cloudf: ?SoundNote is not currently supported in the Wolfram Cloud. Sound::cloudf: ?Sound is not currently supported in the Wolfram Cloud.

I saw examples of complex manipulations being deployed, but fail to understand the problem with the above deployment.

Any suggestions?

Regards, Rangarajan

3 Replies

Sound-related objects are not yet deployable to the cloud. Hopefully we can add this as a feature in a future version.

There are a couple of workarounds, depending on how you want the sound to be represented online. Try using ExportString to convert the sound to a String:

CloudDeploy@
ExportForm[
     ExportString[
       Play[Sin[700 t + 25 t Sin[350 t]], {t, 0, 4}],
       "WAV"],
    "String"]

This creates a link that goes directly to a sound file. You can use Import on the resulting url:

Import[resultingURL, "WAV"]
POSTED BY: Sean Clarke

Thanks. Will this work for SoundNote (export as MIDI)?

Regards, Rangarajan

You would have to export as MIDI instead of WAV since they aren't compatible kinds of objects.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract