musiktheorietheorie/code/musiktheorietheorie.ipynb

437 lines
1 MiB
Text
Raw Permalink Normal View History

2022-03-27 12:09:14 +02:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"cellView": "code",
"id": "at5_o2QCg6YY"
},
"outputs": [],
"source": [
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"from scipy.fft import fft, ifft\n",
"from IPython.display import Audio, display\n",
"from scipy.io import wavfile\n",
"from ipywidgets import widgets\n",
"from functools import partial\n",
"import pandas as pd\n",
"from fractions import Fraction"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"id": "C2t7WxG-jJac"
},
"outputs": [],
"source": [
"def create_signal(frequency, amplitude, delay, phase=0, sampling=44100, seconds=1.0):\n",
" timesteps = np.linspace(0,seconds, int(seconds * sampling))\n",
" # return np.sum(amplitude * np.sin(frequency * 2*np.pi * (timesteps[:, np.newaxis]-delay)*(timesteps[:, np.newaxis]-delay > 0)), axis=1), timesteps\n",
" return np.sum(amplitude * triangle(frequency, (timesteps[:, np.newaxis]-delay)*(timesteps[:, np.newaxis]-delay > 0)), axis=1), timesteps\n",
"\n",
"def create_waves(frequency, amplitude, phase=0, sampling=44100, seconds=1.0):\n",
" timesteps = np.linspace(0,seconds, int(seconds * sampling))\n",
" # return amplitude * np.sin(frequency * 2*np.pi * timesteps[:, np.newaxis]), timesteps\n",
" return amplitude * triangle(frequency, timesteps[:, np.newaxis]), timesteps\n",
"\n",
"def triangle(frequency, t):\n",
" phase = (t * frequency + 0.25) % 1 - 0.25\n",
" return (phase <= 0.25) * phase + (phase > 0.25) * (0.5 - phase)\n",
"\n",
"def nonlinearity(x, param=1.0): # param for scaling of argument; higher values = more nonlinearity\n",
" #return np.exp(x*param)\n",
" return np.sign(x)*np.log(1+np.abs(x*param))\n",
"\n",
"def myAudio(signal, rate=44100, autoplay=False, time_fade=0.2):\n",
" length = signal.shape[0]\n",
" print(length)\n",
" fade = np.minimum(np.ones(length),np.arange(length)/(time_fade * rate))\n",
" return Audio(signal * fade * fade[::-1],rate=rate,autoplay=autoplay)\n",
"\n",
"def toEDO(ratio, n=12):\n",
" return 2**((np.round(np.log(ratio) * n / np.log(2)))/n)\n",
"\n",
"def ratio2freq(ratio, base=220):\n",
" return base * ratio\n"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 897
},
"id": "yfTtI-OVmXIo",
"outputId": "24995b1b-a7f5-486a-abe3-865685474314"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"88200\n"
]
},
{
"data": {
"text/html": [
"\n",
" <audio controls=\"controls\" >\n",
" <source src=\"data:audio/wav;base64,UklGRjSxAgBXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YRCxAgAAAAAAAAAAAAAAAAAAAAEAAQACAAIAAwADAAQABQAFAAYABwAIAAkACgALAAwADQAOABAAEQASABQAFQAXABgAGgAcAB0AHwAhACMAJAAkACQAJAAkACMAIwAjACIAIgAhACEAIAAfAB8AHgAdABwAGwAaABkAGAAXABYAFQATABIAEAAPAA4ADAAKAAkABwAFAAMAAgAAAP///f/7//j/9v/0//L/7//t/+v/6P/m/+P/4P/e/9v/2P/V/9L/z//M/8n/xv/D/8D/vf+5/7b/s/+v/6z/qP+k/6H/nf+Z/5X/lP+W/5j/mv+c/57/oP+j/6X/p/+q/6z/r/+y/7T/t/+6/73/v//C/8X/yP/L/8//0v/V/9j/3P/f/+L/5v/p/+3/8f/0//j//P8AAAMABwALAA8AEwAXABsAIAAkACgALQAxADYAOgA/AEQASABNAFIAVwBcAGEAZgBrAHAAdQB7AIAAhQCLAJAAlgCbAKEApwCsALIAtQCxAK0AqQClAKEAnQCYAJQAkACLAIcAggB+AHkAdQBwAGsAZgBhAF0AWABTAE0ASABDAD4AOQAzAC4AKQAjAB0AGAASAA0ABwABAPz/9v/w/+r/5P/e/9j/0v/L/8X/v/+4/7L/q/+l/57/l/+R/4r/g/98/3X/bv9n/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v2c/Xb9UP0q/QT93vy4/JL8a/xF/B/8+PvS+6z7hfte+zj7Efvq+sT6nfp2+o76tPrZ+v76I/tI+277k/u4+977A/wp/E/8dPya/MD85vwL/TH9V/19/aP9yv3w/Rb
" Your browser does not support the audio element.\n",
" </audio>\n",
" "
],
"text/plain": [
"<IPython.lib.display.Audio object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"88200\n"
]
},
{
"data": {
"text/html": [
"\n",
" <audio controls=\"controls\" >\n",
" <source src=\"data:audio/wav;base64,UklGRjSxAgBXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YRCxAgAAAAAAAAAAAAAAAAAAAAEAAQACAAIAAwADAAQABQAGAAcABwAIAAkACwAMAA0ADgAPABEAEgAUABUAFwAYABoAHAAeAB8AIQAjACUAJwAmACYAJgAmACYAJQAlACUAJAAkACMAIgAiACEAIAAfAB4AHQAcABsAGgAZABcAFgAVABMAEgAQAA8ADQALAAkACAAGAAQAAgAAAP///f/6//j/9v/z//H/7//s/+n/5//k/+H/3//c/9n/1v/T/9D/zP/J/8b/w/+//7z/uP+1/7H/rv+q/6b/ov+f/5v/l/+T/4//jP+O/5D/k/+V/5f/mv+c/57/of+k/6b/qf+s/6//sv+1/7j/u/++/8H/xP/H/8v/zv/R/9X/2f/c/+D/5P/n/+v/7//z//f/+////wIABgALAA8AEwAYABwAIQAmACoALwA0ADkAPQBCAEcATABRAFcAXABhAGYAbABxAHcAfACCAIcAjQCTAJkAnwClAKsAsQC3AL0AwgC+ALoAtQCxAK0AqACkAJ8AmwCWAJEAjACHAIMAfgB5AHQAbgBpAGQAXwBZAFQATwBJAEMAPgA4ADIALQAnACEAGwAVAA8ACQADAP3/9//x/+r/5P/d/9f/0P/K/8P/vP+1/67/p/+g/5n/kv+L/4T/ff91/27/Zv9f/1f/UP9I/0D/Of8x/yn/If8Z/xH/Cf8B//j+8P71/vv+Av8I/w//Ff8c/yL/Kf8w/zf/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/6GfpA+mj6j/q3+t/6Bvsu+1b7fvum+8779vse/Ef8b/yX/L/86PwQ/Tn9Yf2K/bP
" Your browser does not support the audio element.\n",
" </audio>\n",
" "
],
"text/plain": [
"<IPython.lib.display.Audio object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"88200\n"
]
},
{
"data": {
"text/html": [
"\n",
" <audio controls=\"controls\" >\n",
" <source src=\"data:audio/wav;base64,UklGRjSxAgBXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YRCxAgAAAAAAAAAAAAAAAAABAAEAAgADAAMABAAFAAYABwAIAAoACwAMAA4ADwARABMAFQAWABgAGgAdAB8AIQAjACYAKAArAC4AMAAzADYAOAA4ADgANwA3ADcANgA2ADUANAA0ADMAMgAxADAALgAtACwAKgApACcAJgAkACIAIAAeABwAGgAYABUAEwAQAA4ACwAJAAYAAwAAAP7/+//4//T/8f/u/+r/5//j/9//2//X/9P/z//L/8f/w/++/7r/tf+x/6z/p/+i/53/mP+T/47/if+D/37/ef9z/23/aP9i/1z/WP9b/17/Yf9l/2j/bP9v/3P/dv96/37/gv+G/4r/jv+T/5f/m/+g/6T/qf+u/7P/uP+9/8L/x//M/9H/1//c/+L/5//t//P/+f/+/wMACgAQABYAHAAjACkAMAA2AD0ARABLAFIAWQBgAGcAbwB2AH0AhQCNAJQAnACkAKwAtAC8AMQAzADVAN0A5gDuAPcA/wAIAREBGQETAQ0BBwEAAfoA9ADtAOYA4ADZANIAywDEAL0AtgCvAKcAoACYAJEAiQCCAHoAcgBqAGIAWgBSAEkAQQA4ADAAJwAfABYADQAEAPz/8//q/+H/1//O/8T/u/+x/6f/nv+U/4r/gP92/2v/Yf9X/0z/Qv83/y3/Iv8X/wz/Af/2/uv+4P7U/sn+vf6y/qb+m/6P/oP+d/5+/of+kP6a/qP+rP62/r/+yf7T/t3+5/7x/vv+Bf8P/xn/JP8u/zn/Q/9O/1n/ZP9v/3r/hf+Q/5v/p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u++/j7M/xu/Kj
" Your browser does not support the audio element.\n",
" </audio>\n",
" "
],
"text/plain": [
"<IPython.lib.display.Audio object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJAAAAFzCAYAAABhOPOiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOy9d7wdR3k3/p1zblOX3Ohg3oT8QhJDCiFvQspLIIQUCAmQGBIgyQuElkBCyEsJYHo1GDA4Nu7d4G7LvVtylSxZsmT1Lqvffu8puzvz+2N3Zp6ZnZ2ze+5Vn+/nI91zzu6zMzs7OzvPd7/PM0wIgYCAgICAgICAgICAgICAgICAgCLUDncFAgICAgICAgICAgICAgICAgKObAQCKSAgICAgICAgICAgICAgICDAi0AgBQQEBAQEBAQEBAQEBAQEBAR4EQikgICAgICAgICAgICAgICAgAAvAoEUEBAQEBAQEBAQEBAQEBAQEOBFIJACAgICAgICAgICAgICAgICArzoOdwV6AYnnXSSOPXUUw93NQICAgICAgICAgICAgICAgKOGSxdunS/EOJk17ajkkA69dRTsWTJksNdjYCAgICAgICAgICAgICAgIBjBoyxrUXbQghbQEBAQEBAQEBAQEBAQEBAQIAXgUAKCAgICAgICAgICAgICAgICPAiEEgBAQEBAQEBAQEBAQEBAQEBAV4EAikgICAgICAgICAgICAgICAgwItAIAUEBAQEBAQEBAQEBAQEBAQEeBEIpICAgICAgICAgICAgICAgIAALwKBFBAQEBAQEBAQEBAQEBAQEBDgRSCQAgICAgICAgICAgICAgICAgK8CARSQEBAQEBAQEBAQEBAQEBAQIAXgUAKCAgICAgICAgICAgICAgICPAiEEgBAQEBAQEBAQEBAQEBAQEBAV4EAikgICAgICAgICAgICAgwIfhbUB74nDXIiDgsCIQSAEBAQEBAQEBAQEBAQHHB9bdCay7q7rdWac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kiufWrXIpwInpIJCeBPAKxtjLGWN9SEmi3GpqjLFfBrAAwKPktwWMsf7s80kAXgdgtW0bEBAQEBAQEBAQMB0IIWwBhxVJBLTGDnct/JD3SNVbpdsYtMMUMlexkENsN0Uc0eNctzmQMuriUCmXRp8Dtj9ZzeY4wJQJJCFEDOBjAO4E8CyAnwkhVjHGvswYeyvZ9XQAVwtz6YtXAljCGHsawP0AvklXbwsICAgICAgICAgICDhmcN37ge//2uGuRQccphxIXZsfwSFsR5sC6VCGA1ZWIEkC6SCs3uYiP89+LXDBG6uVdRxgWnIgCSFuA3Cb9dsXrO9nOOweAXDadNQhICAgICAgICAgoBOO6BfzAcc+Vt94uGvQGeomObSrsdWOujCxMpj+up3/8CZc/eR23PMff+QpdgoE0kFf075LBZIkgqr2kwohbEartY9wpeBhwqFOoh0QEBAQEBAQEBBw2BBC2AKOGxyuxM+Vc9Qo7VGXpR9fCqSvLny2TMFdHr2C3VTbpDIRlPUTj5JIuOpU6+loF1ZhK4/pyIEUEBAQEBAQEBAQcFSgW7eqHXOs2T06rXU5ljA40cb2wcnDXY1DhjoSvITt6f4AvNuVzirgCCI9yoCxI7m+x0kOpCqkzqHuJyWURM4qqRC2uGMR4f1CZwQCKSAgICAgICAg4LiB8w11Cdy4fCfefNbDuG3lrmmu0bGB133zPvzBt+8/3NU4ZPhMz5V4uP/fgfG9XR7hKCA9uvWmuwyBUvzRkejFHy1knKXmqoxK9T3EbVIihM155Fpn4umgR+0dQwgEUkBAQEBAQEBAwHED3qXvsm+sBQBYvn14+ipzBGLPaBMfu/IpHBhvVbJrRMfXEtmvry1PPzRHujt
"text/plain": [
"<Figure size 1440x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAACOUAAAF9CAYAAABBSE7JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG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LGDKs57yxJb0t6p4XXCwAAAAAAALQLrppQjtvhl4OsBOKlbIusmjCOZbPk354wCqntiI6vsrjNAAAA2owWhXJs2/5cUvFem4+QtMq27TW2bQckvSjpezX7v2nb9mmSLmnJ9QIAAAAAAADtRbQzgsv4ZVksxCJOKnbWdt8I2+GElgKgYcbUBOcI5QAAALQZrjhcZqGkjfW+3yTpSGPMiZLOkZSuA3TKMcZMkTRFknr16hWH8gAAAAAAAIC2w1U7viqgMKEcxEs4VDu+ik457QvjytqO6DhDy655LjDcdgAAAMkuHqGcBtm2/amkT5uw31RJUyVp7NixvMsAAAAAAACAds1pIs2unY6AQoRyEC9WqLb3Bp1ygOQU7ZQTjt5bbZ4TAAAAkl2Lxlftx2ZJPet936NmGwAAAAAAAIBmctUsuhoTpFMO4scKKVzTMYVOOe2LzSikNiPaKYdbDAAAoO2IRyhnlqSBxpi+xpg0SRdKerM5F2CMmWyMmerz+eJQHgAAAAAAANCG1AQkjAnRKQfxQ6ec9otuK22Go6ZzmkUsBwAAoM1oUSjHGPMfSV9LGmyM2WSMudq27ZCkmyS9L2mppJdt217SnMu1bXuabdtTvF5vS8oDAAAAAAAA2rzomBLjoFMO4sgKyzI1/7TolNOeREciIfmZ2m5WPBcAAAC0Fa6WHGzb9kX72f6OpHdactkAAAAAAAAA6rqW2CZMpxzEjxWSVbPgT6ec9sUm4NFmOB2
"text/plain": [
"<Figure size 2880x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"#frequency = np.array([100., 200., 300, 400])\n",
"\n",
"#frequency_edo12 = 220 * 2**(np.array([5,8,12,14])/12)\n",
"#frequency_edo53 = 220 * 2**(np.array([22,36,53,62])/53)\n",
"#frequency_edo53 = 220 * 2**(np.array([22,34,53,61])/53)\n",
"#frequency_rein1 = 220 * 4/3 * np.array([1, 7/6, 9/6, 10/6])\n",
"#frequency_rein2 = 220 * 4/3 * np.array([1, 12/10, 15/10, 17/10])\n",
"dursept = 4/3*np.array([1,5/4,6/4,7/4])\n",
"\n",
"dursept_edo12 = 220 * toEDO(dursept, 12) # Durseptakkord in EDO12\n",
"\n",
"\n",
"dursept_edo53 = 220 * toEDO(dursept, 53) # Dursept in EDO53\n",
"\n",
"dursept_rein = 220 * dursept # Dursept rein\n",
"\n",
"mollsept = 4/3 * np.array([1,12/10, 15/10, 17/10])\n",
"mollsept_edo12 = 220 * toEDO(mollsept, 12) # Mollseptakkord in EDO12\n",
"mollsept_edo53 = 220 * toEDO(mollsept, 53) # Mollseptakkord in EDO53\n",
"mollsept_rein = 220 * mollsept # Mollsept rein\n",
"\n",
"doppeltritone = 4/3 * np.array([1, 12/10, 14/10, 17/10])\n",
"doppeltritone_rein = 220 * doppeltritone # doppeltritone rein\n",
"doppeltritone_edo12 = 220* toEDO(doppeltritone, 12)\n",
"doppeltritone_edo53 = 220 * toEDO(doppeltritone, 53) # doppeltritone in EDO53\n",
"\n",
"amplitude = np.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])\n",
"delay = np.array([0.0,0.2,0.4,0.6,0.8,1.0,1.2])\n",
"\n",
"# list of chords to display.\n",
"# chords = [dursept_edo12, dursept_edo53, dursept_rein, ]\n",
"# chords = [mollsept_edo12, mollsept_edo53, mollsept_rein, ]\n",
"chords = [mollsept_edo12, mollsept_edo53, mollsept_rein ]\n",
"\n",
"to_display = []\n",
"for chord in chords:\n",
" notes = len(chord)\n",
" signal, timesteps = create_signal(frequency=chord, amplitude=amplitude[:notes], delay=delay[:notes], phase=0, sampling=44100, seconds=5.0)\n",
" to_display.append(signal)\n",
"\n",
"max_play_time = 2.0\n",
"for signal in to_display:\n",
" display(myAudio(signal[timesteps < max_play_time],rate=44100, autoplay=False))\n",
"\n",
"plot_time = 1.0\n",
"\n",
"plt.figure(1, figsize=(20,6))\n",
"plt.xlabel(\"time [s]\")\n",
"for signal in to_display:\n",
" plt.plot(timesteps[timesteps < plot_time], (1*signal[timesteps < plot_time]))\n",
"\n",
"plt.figure(2, figsize=(40,6))\n",
"plt.subplot(111, xscale='log', yscale='log')\n",
"plt.xlabel(\"Frequenz [Hz]\")\n",
"plt.xlim(200,5000)\n",
"plt.ylim(bottom=1e-1, top=1e4)\n",
"for signal in to_display:\n",
" plt.plot(np.abs(fft(nonlinearity(signal[timesteps > 1.0], 0.1))))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "uj1KsDoBQkym"
},
"source": [
"A = 100, B = 152\n",
"B-A = 52, 2*A-B = 48\n",
"A = 100, 2*B-2*A = 104, 4*A-2*B=96\n",
"2*A = 200, 2*B-A = 204, 4*B-4*A = 208"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "mGVxOys101H8",
"outputId": "987a6b57-7b4a-49dc-bcb1-4970f7d664a9"
},
"source": [
"#print((3/2)**3) #3 Quinten\n",
"#print(2**2) #2 Oktaven\n",
"81/80 #syntonisches Komma\n",
"128/125 #Diesis\n",
"(3/2)^12/2^7 #pythagoräisches Komma\n",
"#print(6/5)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "EImFLStM4Cya"
},
"source": [
"1 (C) 9/8 (D) 6/5 (Es) 5/4 (E) 4/3 (F) 3/2 (G) 8/5 (As) 5/3 (A) 15/8 (H) 2/1 (C) --> 5-limit tuning\n",
"Ganztöne?\n",
"C - D: 9/8\n",
"D - E: 10/9\n",
"Es - F: 10/9\n",
"F - G: 9/8\n",
"G - A: 10/9\n",
"A - H: 9/8\n",
"\n",
"Halbtöne? 16/15, 25/24, 16/15, 16/15, 25/24, 16/15\n",
"Große Terzen? 5/4, 5/4, 32/25, 5/4, 5/4"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "3-MNtcii-OMi"
},
"source": []
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 72
},
"id": "TtnU4FRY_p8f",
"outputId": "8fdcbdec-f213-40f2-ea53-0cebd30d7eaa"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.125 1.122462048309373\n",
"1.25 1.2599210498948732\n",
"1.75 1.7817974362806785\n"
]
}
],
"source": [
"print(9/8, 2**(2/12))\n",
"print(5/4, 2**(4/12))\n",
"print(7/4, 2**(10/12))"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "5mZHNFRO_xgZ"
},
"source": [
"(3/2)**a = 2**b \n",
"a * ln(3/2) = b * ln(2)\n",
"a/b = ln(2) / ln(3/2)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "85VfR2WxHAx9"
},
"source": [
"[1; 1, 2, 2, 3, 1, 5, 2, 23, 2, 2, 1, 1, 55, 1, 4, 3, 1, 1, 15, 1, 9, 2, 5, 7, 1, 1, 4, 8, 1, 1, ...]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "61-Z8SsfHCe3",
"outputId": "da53b747-99e4-4277-fc5f-27413ec67962"
},
"outputs": [
{
"data": {
"text/plain": [
"1.7096774193548385"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 1/(1+1/2) #--> a=5, b=3\n",
"1 + 1/(1+1/(2+1/2)) #--> a=12, b=7\n",
"1 + 1/(1+1/(2+1/(2+1/3))) #--> a=41, b=24\n",
"1 + 1/(1+1/(2+1/(2+1/(3+1)))) #--> a=53, b=31"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "iGJ4mYrSHF59",
"outputId": "92fe9b7d-7542-43b7-f410-0213308084d2"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.5\n",
"1.515716566510398\n",
"1.4983070768766815\n",
"1.4937589616544857\n",
"1.5004194330574077\n",
"1.4999409030781112\n"
]
}
],
"source": [
"print(3/2)\n",
"print(2**(3/5))\n",
"print(2**(7/12))\n",
"print(2**(11/19))\n",
"print(2**(24/41))\n",
"print(2**(31/53))\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "WNsx7Md7UqM2"
},
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"name": "Akkorde",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.3"
}
},
"nbformat": 4,
"nbformat_minor": 1
}