Document pitch method

This commit is contained in:
2023-11-11 01:33:58 +02:00
parent 43d6d6831b
commit 2bb46d330c
6 changed files with 4599 additions and 3 deletions

View File

@ -67,7 +67,7 @@ if (!self.define) {
});
};
}
define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
self.skipWaiting();
workbox.clientsClaim();
@ -82,12 +82,23 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
"revision": "0.aa2tv1h0in8"
"revision": "0.jotcvf5uhvo"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
allowlist: [/^\/$/]
}));
workbox.registerRoute(({
url
}) => [/^https:\/\/raw\.githubusercontent\.com\/.*/i, /^https:\/\/shabda\.ndre\.gr\/.*/i].some(regex => regex.test(url)), new workbox.CacheFirst({
"cacheName": "external-samples",
plugins: [new workbox.ExpirationPlugin({
maxEntries: 5000,
maxAgeSeconds: 2592000
}), new workbox.CacheableResponsePlugin({
statuses: [0, 200]
})]
}), 'GET');
}));
//# sourceMappingURL=sw.js.map

File diff suppressed because one or more lines are too long

4561
dev-dist/workbox-b7fccfec.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -244,6 +244,16 @@ export class Player extends Event {
return this;
}
tonnetz(transform: string) {
if (this.atTheBeginning()) this.ziffers.tonnetzTransformation(transform);
return this;
}
tonnetzChord(chord: string) {
if (this.atTheBeginning()) this.ziffers.tonnetzChords(chord);
return this;
}
voiceleading() {
if (this.atTheBeginning()) this.ziffers.lead();
return this;

View File

@ -196,6 +196,19 @@ beat(1)::snd('sine').sustain(0.1).freq([100,100,100,100,200].unique().beat()).ou
true
)}
- <ic>pitch()</ic>: convert a list of integers to pitch classes
${makeExample(
"Converting a list of integers to pitch classes using key and scale",
`
beat(0.25) :: snd('sine')
.pitch([0,1,2,3,4,6,7,8].beat(0.125))
.key(["F4","F3"].beat(2.0))
.scale("minor").out()
`,
true
)}
- <ic>scale(scale: string, base note: number)</ic>: Map each element of the list to the closest note of the slected scale. [0, 2, 3, 5 ].scale("major", 50) returns [50, 52, <ic>54</ic>, 55]. You can use western scale names like (Major, Minor, Minor pentatonic ...) or [zeitler](https://ianring.com/musictheory/scales/traditions/zeitler) scale names. Alternatively you can also use the integers as used by Ian Ring in his [study of scales](https://ianring.com/musictheory/scales/).
${makeExample(