Skip to content

Commit e2a76f2

Browse files
committed
remove pick stub example + codeformat
1 parent e8e0cbf commit e2a76f2

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

packages/lib/src/lib.js

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -589,43 +589,59 @@ export let abs = registerNode("abs", {
589589
tags: ["math"],
590590
description: "returns the absolute value of the signal",
591591
ins: [{ name: "in" }],
592-
examples: [
593-
`sine(440).abs().out()`,
594-
],
592+
examples: [`sine(440).abs().out()`],
595593
compile: ({ vars: [input = 0], name, lang }) =>
596594
langs[lang].def(name, langs[lang].abs(input)),
597595
});
598596
export let min = registerNode("min", {
599597
tags: ["math"],
600598
description: "returns the minimum of the given signals",
601-
examples: [`impulse(4).apply(x => min(x.seq(0,3,2), x.seq(0,7,0,5,0)).add(48).midinote().sine()).out()`],
599+
examples: [
600+
`impulse(4).apply(x => min(x.seq(0,3,2), x.seq(0,7,0,5,0)).add(48).midinote().sine()).out()`,
601+
],
602602
ins: [{ name: "in", dynamic: true }],
603603
compile: ({ vars, name, lang }) =>
604604
langs[lang].def(name, vars.reduce(langs[lang].min) || 0),
605605
});
606606
export let max = registerNode("max", {
607607
tags: ["math"],
608608
description: "returns the maximum of the given signals",
609-
examples: [`impulse(4).apply(x => max(x.seq(0,3,2), x.seq(0,7,0,5,0)).add(48).midinote().sine()).out()`],
609+
examples: [
610+
`impulse(4).apply(x => max(x.seq(0,3,2), x.seq(0,7,0,5,0)).add(48).midinote().sine()).out()`,
611+
],
610612
ins: [{ name: "in", dynamic: true }],
611613
compile: ({ vars, name, lang }) =>
612614
langs[lang].def(name, vars.reduce(langs[lang].max) || 0),
613615
});
614616
export let argmin = registerNode("argmin", {
615617
tags: ["math"],
616618
description: "returns the index of the minimum of the given signals",
617-
examples: [`argmin(saw(1), saw(3), saw(5)).mul(12).add(48).midinote().sine().out()`],
619+
examples: [
620+
`argmin(saw(1), saw(3), saw(5)).mul(12).add(48).midinote().sine().out()`,
621+
],
618622
ins: [{ name: "in", dynamic: true }],
619623
compile: ({ vars, name, lang }) =>
620-
langs[lang].def(name, langs[lang].pair_b(vars.map(langs[lang].pair_make).reduce(langs[lang].pair_a_min)) || 0),
624+
langs[lang].def(
625+
name,
626+
langs[lang].pair_b(
627+
vars.map(langs[lang].pair_make).reduce(langs[lang].pair_a_min)
628+
) || 0
629+
),
621630
});
622631
export let argmax = registerNode("argmax", {
623632
tags: ["math"],
624633
description: "returns the index of the maximum of the given signals",
625-
examples: [`argmax(saw(1), saw(3), saw(5)).mul(12).add(48).midinote().sine().out()`],
634+
examples: [
635+
`argmax(saw(1), saw(3), saw(5)).mul(12).add(48).midinote().sine().out()`,
636+
],
626637
ins: [{ name: "in", dynamic: true }],
627638
compile: ({ vars, name, lang }) =>
628-
langs[lang].def(name, langs[lang].pair_b(vars.map(langs[lang].pair_make).reduce(langs[lang].pair_a_max)) || 0),
639+
langs[lang].def(
640+
name,
641+
langs[lang].pair_b(
642+
vars.map(langs[lang].pair_make).reduce(langs[lang].pair_a_max)
643+
) || 0
644+
),
629645
});
630646
export let greater = registerNode("greater", {
631647
tags: ["logic"],
@@ -831,13 +847,8 @@ export let pick = registerNode("pick", {
831847
tags: ["multi-channel"],
832848
ugen: "Pick",
833849
description: "Pick",
834-
examples: ["sine(220).out()"],
835-
ins: [
836-
{ name: "index" },
837-
{ name: "inputs", dynamic: true },
838-
],
839-
compile: ({ vars, ...meta }) =>
840-
langs[meta.lang].defUgen(meta, ...vars),
850+
ins: [{ name: "index" }, { name: "inputs", dynamic: true }],
851+
compile: ({ vars, ...meta }) => langs[meta.lang].defUgen(meta, ...vars),
841852
});
842853

843854
export let split = register(
@@ -851,7 +862,8 @@ export let split = register(
851862
{
852863
ins: [{ name: "input" }, { name: "fn" }],
853864
tags: ["multi-channel"],
854-
description: "apply fn to an array of signals, one for each channel in input",
865+
description:
866+
"apply fn to an array of signals, one for each channel in input",
855867
examples: [`sine([220,330,550]).split(chs => add(...chs)).out()`],
856868
}
857869
);

0 commit comments

Comments
 (0)