mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
fix tutorial
This commit is contained in:
parent
a9c95bbbfb
commit
93db3cd935
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,4 +25,5 @@ cabal.project.local~
|
||||
node_modules/
|
||||
.DS_Store
|
||||
repl-parcel
|
||||
mytunes.ts
|
||||
mytunes.ts
|
||||
doc
|
||||
@ -13,7 +13,7 @@ import {
|
||||
LiteralNumericExpression,
|
||||
} from 'shift-ast';
|
||||
import shiftCodegen from 'shift-codegen';
|
||||
const codegen = shiftCodegen.default;
|
||||
const codegen = shiftCodegen.default || shiftCodegen; // parcel module resolution fuckup
|
||||
|
||||
import * as strudel from '@strudel/core/strudel.mjs';
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import _Spec from 'shift-spec';
|
||||
const Spec = _Spec.default;
|
||||
const Spec = _Spec.default || _Spec; // parcel module resolution fuckup
|
||||
// import { version } from '../package.json'
|
||||
|
||||
// Loading uncached estraverse for changing estraverse.Syntax.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Pattern as _Pattern, stack, Hap, reify } from '@strudel/core/strudel.mjs';
|
||||
import _voicings from 'chord-voicings';
|
||||
const { dictionaryVoicing, minTopNoteDiff, lefthand } = _voicings.default;
|
||||
const { dictionaryVoicing, minTopNoteDiff, lefthand } = _voicings.default || _voicings; // parcel module resolution fuckup
|
||||
|
||||
const getVoicing = (chord, lastVoicing, range = ['F3', 'A4']) =>
|
||||
dictionaryVoicing({
|
||||
|
||||
50
repl/package-lock.json
generated
50
repl/package-lock.json
generated
@ -24,6 +24,7 @@
|
||||
"devDependencies": {
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@parcel/transformer-mdx": "^2.3.1",
|
||||
"@tailwindcss/typography": "^0.5.2",
|
||||
"autoprefixer": "^10.4.4",
|
||||
"parcel": "^2.3.1",
|
||||
"postcss": "^8.4.12",
|
||||
@ -5061,6 +5062,20 @@
|
||||
"integrity": "sha512-aWItSZvJj4+GI6FWkjZR13xPNPctq2RRakzo+O6vN7bC2yjwdg5EFpgaSAUn95b7BGSgcflvzVDPoKmJv24IOg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@tailwindcss/typography": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz",
|
||||
"integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lodash.castarray": "^4.4.0",
|
||||
"lodash.isplainobject": "^4.0.6",
|
||||
"lodash.merge": "^4.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || insiders"
|
||||
}
|
||||
},
|
||||
"node_modules/@testing-library/dom": {
|
||||
"version": "8.11.4",
|
||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.11.4.tgz",
|
||||
@ -13648,11 +13663,23 @@
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"node_modules/lodash.castarray": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
||||
"integrity": "sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
|
||||
},
|
||||
"node_modules/lodash.isplainobject": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.memoize": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||
@ -23415,6 +23442,17 @@
|
||||
"integrity": "sha512-aWItSZvJj4+GI6FWkjZR13xPNPctq2RRakzo+O6vN7bC2yjwdg5EFpgaSAUn95b7BGSgcflvzVDPoKmJv24IOg==",
|
||||
"dev": true
|
||||
},
|
||||
"@tailwindcss/typography": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz",
|
||||
"integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash.castarray": "^4.4.0",
|
||||
"lodash.isplainobject": "^4.0.6",
|
||||
"lodash.merge": "^4.6.2"
|
||||
}
|
||||
},
|
||||
"@testing-library/dom": {
|
||||
"version": "8.11.4",
|
||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.11.4.tgz",
|
||||
@ -29707,11 +29745,23 @@
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"lodash.castarray": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
||||
"integrity": "sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
|
||||
},
|
||||
"lodash.isplainobject": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.memoize": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"devDependencies": {
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@parcel/transformer-mdx": "^2.3.1",
|
||||
"@tailwindcss/typography": "^0.5.2",
|
||||
"autoprefixer": "^10.4.4",
|
||||
"parcel": "^2.3.1",
|
||||
"postcss": "^8.4.12",
|
||||
|
||||
@ -4,6 +4,35 @@ import useRepl from '../useRepl.mjs';
|
||||
import CodeMirror, { markEvent } from '../CodeMirror';
|
||||
import cx from '../cx';
|
||||
|
||||
// eval stuff start
|
||||
import { extend } from '@strudel/eval';
|
||||
import * as strudel from '@strudel/core/strudel.mjs';
|
||||
import gist from '@strudel/core/gist.js';
|
||||
import { mini } from '@strudel/mini/mini.mjs';
|
||||
import { Tone } from '@strudel/tone';
|
||||
import * as toneHelpers from '@strudel/tone/tone.mjs';
|
||||
import * as voicingHelpers from '@strudel/tonal/voicings.mjs';
|
||||
import * as uiHelpers from '@strudel/tone/ui.mjs';
|
||||
import * as drawHelpers from '@strudel/tone/draw.mjs';
|
||||
import euclid from '@strudel/core/euclid.mjs';
|
||||
import '@strudel/tone/tone.mjs';
|
||||
import '@strudel/midi/midi.mjs';
|
||||
import '@strudel/tonal/voicings.mjs';
|
||||
import '@strudel/tonal/tonal.mjs';
|
||||
import '@strudel/xen/xen.mjs';
|
||||
import '@strudel/xen/tune.mjs';
|
||||
import '@strudel/core/euclid.mjs';
|
||||
import '@strudel/tone/pianoroll.mjs';
|
||||
import '@strudel/tone/draw.mjs';
|
||||
|
||||
extend(Tone, strudel, strudel.Pattern.prototype.bootstrap(), toneHelpers, voicingHelpers, drawHelpers, uiHelpers, {
|
||||
gist,
|
||||
euclid,
|
||||
mini,
|
||||
Tone,
|
||||
});
|
||||
// eval stuff end
|
||||
|
||||
const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.Destination).set({
|
||||
oscillator: { type: 'triangle' },
|
||||
envelope: {
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
module.exports = {
|
||||
content: [
|
||||
"./src/**/*.{js,jsx,ts,tsx}",
|
||||
],
|
||||
content: ['./src/**/*.{js,jsx,ts,tsx}'],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
plugins: [require('@tailwindcss/typography')],
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user