Hi,
When I execute the following expression (just an example), Mathematica returns a UI object that allows me to play sound notes.
Sound[{SoundNote[0, 0.5, "Piano"]}]
I would like to control the size of the UI object returned from the expression. Is there any option to control the size? I am not interested in manually arranging the size. This also applies to embedding this expression in Manipulate.
The documentation for the Sound expression doesn’t show any option that allows you to control the look and feel of the UI object.
Instead, what you will want to do is to work with UI elements that you make yourself. The function EmitSound can be used to play a sound expression, so you can combine this with Mathematica’s GUI expressions such as Button:
A regular Sound object has size of 250 pixels. You could find that out by selecting Sound object cell and going Top menu >> Cell >> Show expression. You will see underlying box structure and can find ImageSize option there. To get back your sound object uncheck Show expression in the menu. You can tap directly into that box structure by running something like this. Define a function: