Ask Your Question
0

Looking for musical exercises using sage

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

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
1

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

nbruin gravatar image

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

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

Comments

See also https://trac.sagemath.org/ticket/12673 and there is also a ticket I cannot find about "playing" certain functions.

kcrisman gravatar imagekcrisman ( 2019-10-18 13:45:20 +0100 )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

Stats

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

Seen: 253 times

Last updated: Oct 17 '19