Ask Your Question

Looking for musical exercises using sage

asked 2019-10-16 21:38:26 +0200

PatB gravatar image

Hi Folks,

Has anyone tried to do some harmonic or rythm analysis for musical instruments using sage?

Also - how easy is it under ubuntu to produce sounds of these harmonics?

Any links will be appreciated.

thanks Pat

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-17 07:19:33 +0200

nbruin gravatar image

updated 2019-10-17 07:20:53 +0200

Producing sound (files) from python is pretty straightforward. Python has standard library support for it and more advanced packages that google can guide you to. This is not a task that sage specifically will be good at, but the python ecosystem should give you the basic tools for reading/writing sound data. Once you have the data you can analyse it and fourier transform it to your heart's content. Or you can produce wave forms and write them to sound files.

For actually playing and recording sound (not just reading and writing sound files) you could look into something like python-sounddevice or some other library, but be aware that if you are using a notebook (remotely!) the sound device on the server may not be the same as the sound device on the computer where your browser runs. In Jupyter, you may be able to use IPython.display.Audio.

edit flag offensive delete link more


See also and there is also a ticket I cannot find about "playing" certain functions.

kcrisman gravatar imagekcrisman ( 2019-10-18 13:45:20 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-10-16 21:38:26 +0200

Seen: 233 times

Last updated: Oct 17 '19