Working version
This commit is contained in:
parent
cc10122b71
commit
7a3bea6f90
2 changed files with 13 additions and 2 deletions
|
|
@ -3653,10 +3653,11 @@ export const parray = (pats) => {
|
|||
* .partials(binaryL(256))
|
||||
*/
|
||||
export const { partials } = register('partials', (list, pat) => {
|
||||
debugger;
|
||||
if (Array.isArray(list)) {
|
||||
list = parray(list);
|
||||
}
|
||||
return pat.withValue((v) => ({...v, partials: list}));
|
||||
return pat.withValue((v) => (l) => ({...v, partials: l})).appLeft(list);
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -3673,5 +3674,5 @@ export const { phases } = register('phases', (list, pat) => {
|
|||
if (Array.isArray(list)) {
|
||||
list = parray(list);
|
||||
}
|
||||
return pat.withValue((v) => ({...v, phases: list}));
|
||||
return pat.withValue((v) => (l) => ({...v, phases: l})).appLeft(list);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -96,6 +96,16 @@ note("c2 <eb2 <g2 g1>>".fast(2))
|
|||
._scope()`}
|
||||
/>
|
||||
|
||||
and with lists _of_ patterns:
|
||||
|
||||
<MiniRepl
|
||||
client:idle
|
||||
tune={`note("c2 <eb2 <g2 g1>>".fast(4))
|
||||
.sound("user")
|
||||
.partials([1, 0, "0 1", "0 1 0.3", rand])
|
||||
._scope()`}
|
||||
/>
|
||||
|
||||
Note that the first value in the `partials` array controls the magnitude of the fundamental harmonic rather than the DC offset, which is fixed at 0.
|
||||
|
||||
#### Phases
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue