8
$\begingroup$

VoronoiDelaunayCircleOfPitchesWithPositiveDefiniteKernel I have been experimenting with number theoretic techniques to get some algorithmic compositions. I use python (mingus) to create the midi, import it on musescore 2 and have the corresponing score.

The method is based on a few ingredients:

  • I use C-major or C-minor and use a symmetric function $f(a,b,c,\cdots)$ and plug in numbers $a,b,c,$ from $1 \le x \le 31$ or some other intervall and compute $f(a,b,c,..) \mod 8$ or $\mod 5$ to generate the pitches.

  • To generate the rhythms / bars, I use a technique to map natural numbers to binary trees (divisorTree, sumTree). This way I have some control over the rhythm fast / slow by plugging in different numbers.

  • In a mixed ensemble I use binary digits to determine at which bar the instrument plays. This creates attention to the listener, so that he/she asks himself/herself, what comes next.

Which other algortihmic techniques from number theory do you know which are used for algorithmic compositions?

Thanks for your help.

The scores can be found at: https://musescore.com/user/37663311

Edit: I use e new technique to create a piece of 48 min with 8 instruments and 650 pages scores: (I hope you enjoy:)

https://musescore.com/user/37663311/scores/6651858

Another edit: Voronoi diagram / Delaunay triangulation of pitch consonance similarity, as measured with the kernel $k(a,b) = \frac{\gcd(a,b)^2}{ab}$:

https://www.reddit.com/r/musictheory/comments/tcamot/an_image_of_pitches_for_pitch_consonance/

$\endgroup$
7
  • 2
    $\begingroup$ There's this rabbit hole: <en.wikipedia.org/wiki/Serialism> The "number theory" is mostly arithmetic mod 12, and related mathematical artifacts such as the 24-element dihedral group. $\endgroup$ Commented Mar 6, 2021 at 16:06
  • $\begingroup$ thehindu.com/news/national/… $\endgroup$
    – Turbo
    Commented Mar 7, 2021 at 0:44
  • $\begingroup$ @1.. thanks for the link $\endgroup$ Commented Mar 7, 2021 at 6:51
  • 1
    $\begingroup$ @stackExchangeUser The right question is not what music can be generated from math. The links are all superficial and anything you see to number theory or another field you should get it at facevalue explained by mathematicians who are pigeonholed in their own areas and it is their singular worlds the explainers are accustomed to. $\endgroup$
    – Turbo
    Commented Mar 7, 2021 at 7:09
  • 1
    $\begingroup$ Ironically, this post has been flagged asking for removal of the rant against Music SE, and I am inclined to agree that it doesn't serve to clarify the question at all, and has the side effect of annoying community members as well, as I can verify from moderator flags. Please remove it. $\endgroup$ Commented Mar 14, 2021 at 11:25

7 Answers 7

4
$\begingroup$

This is how prime numbers sound like in C minor

here are the Fibonacci numbers

and then there's $\pi$

(the second and third of these compositions combine the number theory input in the right hand with human derived chords in the left hand; apologies for the advertisement one needs to click through in order to hear the composition)
$\endgroup$
1
  • 1
    $\begingroup$ Statements like "this is what prime numbers sound like" make neither mathematical nor musical sense. This is merely a method to use prime numbers to create sound, and the output strongly depends on which particular model you choose. $\endgroup$ Commented Jan 15, 2022 at 0:34
4
$\begingroup$

The renowned Online Encyclopedia of Integer Sequences offers a “listen” link for a sequence, which converts the sequence's data to musical notes in the format of a MIDI file. Some of them are interesting to listen to. I suggest, for example, lending an ear to sequence A100002 (click on “listen” and use the default settings for conversion), which I submitted to the OEIS and which Neil Sloane seems to have found amusing: since many terms are computed, this gives a fairly long piece to listen to, which I think makes for somewhat decent music because of the way it rises gradually both in pitch and complexity.

$\endgroup$
0
3
$\begingroup$

I'm not sure how strict your interpretation of number theory is but Sofia Gubaidulina used the Evangelist and Lucas series in some of her compositions.

I don't know if this is entirely relevant to your question but I have started writing functions in C to develop themes with the techniques I have used for years with paper and pencil. Because of the ease with which it can be done on a computer I have started using random numbers to introduce a slight variation into the functions. The random numbers are produced by taking the square root of numbers such as 15 to 48- 54 decimal places and decimalising the numbers after the decimal point, using modulus 3 or 2 if only a slight variation is wanted. Sometimes I use the Euler-Mascheroni Constant and sometimes an array of random numbers of 1 and -1 if I change something up or down - e.g. when I use the mean between numbers and some are odd.

Another technique I use is convert a theme I like by another composer into numbers and use those in various ways.

What I do is not algorithmic as I copy the developed themes onto manuscript paper and then compose normally.

$\endgroup$
2
  • 2
    $\begingroup$ "I have started writing functions in C . . ." what happens if you transpose them up a semitone to C#? 😃 $\endgroup$ Commented Mar 8, 2021 at 15:07
  • $\begingroup$ I don't - C# was developed by that large company I try to avoid. There's always D of course. $\endgroup$ Commented Mar 8, 2021 at 16:05
3
$\begingroup$

You may add this recently published paper to your reading list.

P. Špaček and P. Sobota, Musipher: Hiding information in music composition, Rad HAZU, Matematičke znanosti, Vol. 25 (2021), p. 161-179, full text online.

Abstract. In this paper, we present a new way of hiding information. We store the information directly in the process of composing music, based on musical theory. We created an algorithm to produce music based on binary string, where each bit is transformed into a music composition decision. We follow simple rules to make music, which sounds good. We conducted survey to find whether our solution works, and found promising results of our approach.

$\endgroup$
0
2
$\begingroup$

Assuming that you permit a fairly loose definition of "number theory", you might find this article by Robert Schneider quite interesting: https://arxiv.org/abs/1312.5020

He has at least one youtube video demonstrating the ideas, so you can listen to it if you want.

$\endgroup$
1
  • $\begingroup$ Thanks for the hint. $\endgroup$ Commented Mar 7, 2021 at 6:54
1
$\begingroup$

In Reddit/composer Tom Johnson was mentioned about using mathematical ideas in compositions, and who has written two books about this:

"Self-similar Melodies" and "Looking at Numbers" I have not looked at Self-similar Melodies yet, but Looking at Numbers qualifies as number theory I would say.

:-)

Here his book, "Looking at Numbers" is discussed: https://www.youtube.com/watch?v=sjO37e2H0cg

$\endgroup$
1
$\begingroup$

I would like to add one technique based on a positive definite kernel over the natural numbers:

$$k(a,b) = \frac{\gcd(a,b)^2}{ab}$$ and $$k(a,b) = \frac{\min(a,b)}{\max(a,b)}$$

Details of this method are described here.

Music generated by this method might be found here as an example:

https://www.youtube.com/watch?v=EbrEBeDqq24

or here

https://musescore1983.bandcamp.com/track/for-us

Disclaimer: I made all this... :-)

Edit: I have done a website to compose "parametric" music, which is based on positive definite kernels over the natural numbers. Here is an example, which I call

"Thinking and Inventing"

Parameters:

octaves = 3;4;3;5;2;3

rests = 0,1;0,1;0,1;0,1;0,1;0,1

durations: 0.125,0.25;0.25,0.125;0.25,0.5;0.5,0.25;0.125,0.5;0.5,0.125

neighbors = 5

cycles = 60

reverse = [x]

weights = 2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6;2.0,3.0,4.0,1.6

Audio:

https://drive.google.com/file/d/1dVRajNbXIxaCB6ehXbaP4uCQ4HJjUP6w/view?usp=sharing

Score:

https://drive.google.com/file/d/1S2PlKXOac0eXITD5P1H73PMp28ptx8UG/view?usp=sharing

If you want to try it out yourself: The easiest way to start is to change the number of neighbors to say 4,6,8,10,15 etc. and see the result.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .