|
1 | | -import{jsx as n,jsxs as r,Fragment as d}from"react/jsx-runtime";import{C as a}from"./CodeBlock.de027be4.js";import{D as i,A as l,a as c,E as h}from"./Envelope.1464b5ae.js";import"react";import"./index.2d091e0a.js";import"./index.3fdeaba1.js";import"./index.83878d6a.js";import"../client-entry.js";import"./chunk-FXLYF44B.3b11858b.js";import"react-dom";const x=void 0,R=[{id:"\u5F15\u5165",text:"\u5F15\u5165",depth:2},{id:"\u4EE3\u7801\u6F14\u793A",text:"\u4EE3\u7801\u6F14\u793A",depth:2},{id:"ahdsr-\u5305\u7EDC",text:"AHDSR \u5305\u7EDC",depth:3},{id:"delay-\u5EF6\u8FDF",text:"Delay \u5EF6\u8FDF",depth:3},{id:"api",text:"API",depth:2},{id:"envelope",text:"Envelope",depth:3},{id:"\u7C7B\u578B\u58F0\u660E",text:"\u7C7B\u578B\u58F0\u660E",depth:2}],S="Envelope \u5305\u7EDC\u63A7\u5236\u5668";function o(t){const e=Object.assign({h1:"h1",a:"a",p:"p",h2:"h2",h3:"h3",code:"code"},t.components);return r(d,{children:[r(e.h1,{id:"envelope-\u5305\u7EDC\u63A7\u5236\u5668",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#envelope-\u5305\u7EDC\u63A7\u5236\u5668",children:"#"}),"Envelope \u5305\u7EDC\u63A7\u5236\u5668"]}),` |
2 | | -`,r(e.p,{children:["Envelope \u662F\u4E00\u4E2A ",n(e.a,{href:"https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope",target:"_blank",rel:"nofollow",children:"ADSR"})," \u5305\u7EDC\u53D1\u751F\u5668\u7684\u53EF\u89C6\u5316\u7EBF\u6027\u4EA4\u4E92\u5F0F\u7EC4\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u63A7\u5236 ADSR \u76F8\u5173\u7684\u5C5E\u6027"]}),` |
3 | | -`,r(e.h2,{id:"\u5F15\u5165",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u5F15\u5165",children:"#"}),"\u5F15\u5165"]}),` |
4 | | -`,n(a,{code:"import { Envelope } from 'echo-ui'"}),` |
5 | | -`,r(e.h2,{id:"\u4EE3\u7801\u6F14\u793A",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u4EE3\u7801\u6F14\u793A",children:"#"}),"\u4EE3\u7801\u6F14\u793A"]}),` |
| 1 | +import{jsx as n,jsxs as t,Fragment as d}from"react/jsx-runtime";import{C as r}from"./CodeBlock.de027be4.js";import{D as i,A as l,a as c,E as h}from"./Envelope.513729ac.js";import"react";import"./index.2d091e0a.js";import"./index.3fdeaba1.js";import"./index.a54ae35d.js";import"../client-entry.js";import"./chunk-FXLYF44B.3b11858b.js";import"react-dom";const x=void 0,R=[{id:"\u5F15\u5165",text:"\u5F15\u5165",depth:2},{id:"\u4EE3\u7801\u6F14\u793A",text:"\u4EE3\u7801\u6F14\u793A",depth:2},{id:"ahdsr-\u5305\u7EDC",text:"AHDSR \u5305\u7EDC",depth:3},{id:"delay-\u5EF6\u8FDF",text:"Delay \u5EF6\u8FDF",depth:3},{id:"api",text:"API",depth:2},{id:"envelope",text:"Envelope",depth:3},{id:"\u7C7B\u578B\u58F0\u660E",text:"\u7C7B\u578B\u58F0\u660E",depth:2}],S="Envelope \u5305\u7EDC\u63A7\u5236\u5668";function o(a){const e=Object.assign({h1:"h1",a:"a",p:"p",h2:"h2",h3:"h3",code:"code"},a.components);return t(d,{children:[t(e.h1,{id:"envelope-\u5305\u7EDC\u63A7\u5236\u5668",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#envelope-\u5305\u7EDC\u63A7\u5236\u5668",children:"#"}),"Envelope \u5305\u7EDC\u63A7\u5236\u5668"]}),` |
| 2 | +`,t(e.p,{children:["Envelope \u662F\u4E00\u4E2A ",n(e.a,{href:"https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope",target:"_blank",rel:"nofollow",children:"ADSR"})," \u5305\u7EDC\u53D1\u751F\u5668\u7684\u53EF\u89C6\u5316\u7EBF\u6027\u4EA4\u4E92\u5F0F\u7EC4\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u63A7\u5236 ADSR \u76F8\u5173\u7684\u5C5E\u6027"]}),` |
| 3 | +`,t(e.h2,{id:"\u5F15\u5165",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u5F15\u5165",children:"#"}),"\u5F15\u5165"]}),` |
| 4 | +`,n(r,{code:"import { Envelope } from 'echo-ui'"}),` |
| 5 | +`,t(e.h2,{id:"\u4EE3\u7801\u6F14\u793A",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u4EE3\u7801\u6F14\u793A",children:"#"}),"\u4EE3\u7801\u6F14\u793A"]}),` |
6 | 6 | `,n(i,{}),` |
7 | | -`,r(e.h3,{id:"ahdsr-\u5305\u7EDC",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#ahdsr-\u5305\u7EDC",children:"#"}),"AHDSR \u5305\u7EDC"]}),` |
| 7 | +`,t(e.h3,{id:"ahdsr-\u5305\u7EDC",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#ahdsr-\u5305\u7EDC",children:"#"}),"AHDSR \u5305\u7EDC"]}),` |
8 | 8 | `,n(l,{}),` |
9 | | -`,r(e.p,{children:["\u5728\u5411 ",n(e.code,{children:"data"})," \u4E2D\u4F20\u5165 ",n(e.code,{children:"hold"})," \u53C2\u6570\u540E\u5373\u53EF\u5B9E\u73B0 ",n(e.a,{href:"https://support.output.com/hc/en-us/articles/4408642133399-AHDSR-Modulation",target:"_blank",rel:"nofollow",children:"AHDSR"})," \u5305\u7EDC"]}),` |
10 | | -`,r(e.h3,{id:"delay-\u5EF6\u8FDF",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#delay-\u5EF6\u8FDF",children:"#"}),"Delay \u5EF6\u8FDF"]}),` |
| 9 | +`,t(e.p,{children:["\u5728\u5411 ",n(e.code,{children:"data"})," \u4E2D\u4F20\u5165 ",n(e.code,{children:"hold"})," \u53C2\u6570\u540E\u5373\u53EF\u5B9E\u73B0 ",n(e.a,{href:"https://support.output.com/hc/en-us/articles/4408642133399-AHDSR-Modulation",target:"_blank",rel:"nofollow",children:"AHDSR"})," \u5305\u7EDC"]}),` |
| 10 | +`,t(e.h3,{id:"delay-\u5EF6\u8FDF",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#delay-\u5EF6\u8FDF",children:"#"}),"Delay \u5EF6\u8FDF"]}),` |
11 | 11 | `,n(c,{}),` |
12 | | -`,r(e.p,{children:["\u5728\u5411 ",n(e.code,{children:"data"})," \u4E2D\u4F20\u5165 ",n(e.code,{children:"delay"})," \u53C2\u6570\u540E\u53EF\u4EE5\u52A0\u5165 ",n(e.code,{children:"delay"})," \u7684\u64CD\u4F5C\u70B9"]}),` |
13 | | -`,r(e.h2,{id:"api",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#api",children:"#"}),"API"]}),` |
14 | | -`,r(e.h3,{id:"envelope",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#envelope",children:"#"}),"Envelope"]}),` |
| 12 | +`,t(e.p,{children:["\u5728\u5411 ",n(e.code,{children:"data"})," \u4E2D\u4F20\u5165 ",n(e.code,{children:"delay"})," \u53C2\u6570\u540E\u53EF\u4EE5\u52A0\u5165 ",n(e.code,{children:"delay"})," \u7684\u64CD\u4F5C\u70B9"]}),` |
| 13 | +`,t(e.h2,{id:"api",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#api",children:"#"}),"API"]}),` |
| 14 | +`,t(e.h3,{id:"envelope",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#envelope",children:"#"}),"Envelope"]}),` |
15 | 15 | `,n(h,{}),` |
16 | | -`,r(e.h2,{id:"\u7C7B\u578B\u58F0\u660E",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u7C7B\u578B\u58F0\u660E",children:"#"}),"\u7C7B\u578B\u58F0\u660E"]}),` |
17 | | -`,n(a,{code:`export interface EnvelopeProps extends React.HTMLAttributes<EnvelopeRef> { |
| 16 | +`,t(e.h2,{id:"\u7C7B\u578B\u58F0\u660E",children:[n(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u7C7B\u578B\u58F0\u660E",children:"#"}),"\u7C7B\u578B\u58F0\u660E"]}),` |
| 17 | +`,n(r,{code:`export interface EnvelopeProps extends React.HTMLAttributes<EnvelopeRef> { |
18 | 18 | data: EnvelopeData |
19 | 19 | limits?: EnvelopeLimits |
20 | 20 | lineColor?: string |
@@ -42,69 +42,69 @@ export interface EnvelopeLimits { |
42 | 42 | } |
43 | 43 |
|
44 | 44 | export interface EnvelopeRef extends HTMLDivElement {} |
45 | | -`})]})}function y(t={}){const{wrapper:e}=t.components||{};return e?n(e,Object.assign({},t,{children:n(o,t)})):o(t)}const k="2024/1/15 18:46:10",g=`import { CodeBlock } from '../../src/components/CodeBlock.tsx'\r |
46 | | -import { Default, AHDSR, DADSR } from '../../src/components/UsageBox/Envelope.tsx'\r |
47 | | -import { EnvelopeAPITable } from '../../src/components/APITable/Envelope.tsx'\r |
48 | | -\r |
49 | | -# Envelope \u5305\u7EDC\u63A7\u5236\u5668\r |
50 | | -\r |
51 | | -Envelope \u662F\u4E00\u4E2A [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope) \u5305\u7EDC\u53D1\u751F\u5668\u7684\u53EF\u89C6\u5316\u7EBF\u6027\u4EA4\u4E92\u5F0F\u7EC4\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u63A7\u5236 ADSR \u76F8\u5173\u7684\u5C5E\u6027\r |
52 | | -\r |
53 | | -## \u5F15\u5165\r |
54 | | -\r |
55 | | -<CodeBlock code={\`import { Envelope } from 'echo-ui'\`} />\r |
56 | | -\r |
57 | | -## \u4EE3\u7801\u6F14\u793A\r |
58 | | -\r |
59 | | -<Default />\r |
60 | | -\r |
61 | | -### AHDSR \u5305\u7EDC\r |
62 | | -\r |
63 | | -<AHDSR />\r |
64 | | -\r |
65 | | -\u5728\u5411 \`data\` \u4E2D\u4F20\u5165 \`hold\` \u53C2\u6570\u540E\u5373\u53EF\u5B9E\u73B0 [AHDSR](https://support.output.com/hc/en-us/articles/4408642133399-AHDSR-Modulation) \u5305\u7EDC\r |
66 | | -\r |
67 | | -### Delay \u5EF6\u8FDF\r |
68 | | -\r |
69 | | -<DADSR />\r |
70 | | -\r |
71 | | -\u5728\u5411 \`data\` \u4E2D\u4F20\u5165 \`delay\` \u53C2\u6570\u540E\u53EF\u4EE5\u52A0\u5165 \`delay\` \u7684\u64CD\u4F5C\u70B9\r |
72 | | -\r |
73 | | -## API\r |
74 | | -\r |
75 | | -### Envelope\r |
76 | | -\r |
77 | | -<EnvelopeAPITable />\r |
78 | | -\r |
79 | | -## \u7C7B\u578B\u58F0\u660E\r |
80 | | -\r |
81 | | -<CodeBlock code={\`export interface EnvelopeProps extends React.HTMLAttributes<EnvelopeRef> {\r |
82 | | - data: EnvelopeData\r |
83 | | - limits?: EnvelopeLimits\r |
84 | | - lineColor?: string\r |
85 | | - lineWidth?: number\r |
86 | | - nodeColor?: string\r |
87 | | - nodeSize?: number\r |
88 | | - onDataChange?: (data: EnvelopeData) => void\r |
89 | | -}\r |
90 | | -\r |
91 | | -export interface EnvelopeData {\r |
92 | | - delay?: number\r |
93 | | - attack: number\r |
94 | | - decay: number\r |
95 | | - hold?: number\r |
96 | | - sustain: number\r |
97 | | - release: number\r |
98 | | -}\r |
99 | | -\r |
100 | | -export interface EnvelopeLimits {\r |
101 | | - delay?: number\r |
102 | | - attack?: number\r |
103 | | - hold?: number\r |
104 | | - decay?: number\r |
105 | | - release?: number\r |
106 | | -}\r |
107 | | -\r |
108 | | -export interface EnvelopeRef extends HTMLDivElement {}\r |
109 | | -\`} />\r |
| 45 | +`})]})}function y(a={}){const{wrapper:e}=a.components||{};return e?n(e,Object.assign({},a,{children:n(o,a)})):o(a)}const k="2024/1/15 18:46:10",g=`import { CodeBlock } from '../../src/components/CodeBlock.tsx' |
| 46 | +import { Default, AHDSR, DADSR } from '../../src/components/UsageBox/Envelope.tsx' |
| 47 | +import { EnvelopeAPITable } from '../../src/components/APITable/Envelope.tsx' |
| 48 | +
|
| 49 | +# Envelope \u5305\u7EDC\u63A7\u5236\u5668 |
| 50 | +
|
| 51 | +Envelope \u662F\u4E00\u4E2A [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope) \u5305\u7EDC\u53D1\u751F\u5668\u7684\u53EF\u89C6\u5316\u7EBF\u6027\u4EA4\u4E92\u5F0F\u7EC4\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u63A7\u5236 ADSR \u76F8\u5173\u7684\u5C5E\u6027 |
| 52 | +
|
| 53 | +## \u5F15\u5165 |
| 54 | +
|
| 55 | +<CodeBlock code={\`import { Envelope } from 'echo-ui'\`} /> |
| 56 | +
|
| 57 | +## \u4EE3\u7801\u6F14\u793A |
| 58 | +
|
| 59 | +<Default /> |
| 60 | +
|
| 61 | +### AHDSR \u5305\u7EDC |
| 62 | +
|
| 63 | +<AHDSR /> |
| 64 | +
|
| 65 | +\u5728\u5411 \`data\` \u4E2D\u4F20\u5165 \`hold\` \u53C2\u6570\u540E\u5373\u53EF\u5B9E\u73B0 [AHDSR](https://support.output.com/hc/en-us/articles/4408642133399-AHDSR-Modulation) \u5305\u7EDC |
| 66 | +
|
| 67 | +### Delay \u5EF6\u8FDF |
| 68 | +
|
| 69 | +<DADSR /> |
| 70 | +
|
| 71 | +\u5728\u5411 \`data\` \u4E2D\u4F20\u5165 \`delay\` \u53C2\u6570\u540E\u53EF\u4EE5\u52A0\u5165 \`delay\` \u7684\u64CD\u4F5C\u70B9 |
| 72 | +
|
| 73 | +## API |
| 74 | +
|
| 75 | +### Envelope |
| 76 | +
|
| 77 | +<EnvelopeAPITable /> |
| 78 | +
|
| 79 | +## \u7C7B\u578B\u58F0\u660E |
| 80 | +
|
| 81 | +<CodeBlock code={\`export interface EnvelopeProps extends React.HTMLAttributes<EnvelopeRef> { |
| 82 | + data: EnvelopeData |
| 83 | + limits?: EnvelopeLimits |
| 84 | + lineColor?: string |
| 85 | + lineWidth?: number |
| 86 | + nodeColor?: string |
| 87 | + nodeSize?: number |
| 88 | + onDataChange?: (data: EnvelopeData) => void |
| 89 | +} |
| 90 | +
|
| 91 | +export interface EnvelopeData { |
| 92 | + delay?: number |
| 93 | + attack: number |
| 94 | + decay: number |
| 95 | + hold?: number |
| 96 | + sustain: number |
| 97 | + release: number |
| 98 | +} |
| 99 | +
|
| 100 | +export interface EnvelopeLimits { |
| 101 | + delay?: number |
| 102 | + attack?: number |
| 103 | + hold?: number |
| 104 | + decay?: number |
| 105 | + release?: number |
| 106 | +} |
| 107 | +
|
| 108 | +export interface EnvelopeRef extends HTMLDivElement {} |
| 109 | +\`} /> |
110 | 110 | `;export{g as content,y as default,x as frontmatter,k as lastUpdatedTime,S as title,R as toc}; |
0 commit comments