Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Transform a mathematical function into its musical representation
ResourceFunction["MathToMusicTransform"][f,{x,xmin,xmax},step] transforms f as a function of x from xmin to xmax into music with note lengths scaled by step. |
Transform the function x2 into music:
| In[1]:= |
| Out[1]= | ![]() |
Transform the sine function into music:
| In[2]:= |
| Out[2]= | ![]() |
Combine several functions into one melody:
| In[3]:= |
| Out[3]= | ![]() |
Play the chromatic scale:
| In[4]:= |
| Out[4]= | ![]() |
Functions with values outside the range of -30 to 30 will be clipped:
| In[5]:= |
| Out[5]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License