From 9344620c4caacb7e56c84c96798bca0ccfb29f2a Mon Sep 17 00:00:00 2001 From: ascpixi <44982772+ascpixi@users.noreply.github.com> Date: Sat, 28 Dec 2024 13:31:41 +0100 Subject: [PATCH] chore: implicitly categorize internal node order as well --- src/nodes/index.ts | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/nodes/index.ts b/src/nodes/index.ts index 3cc4bfd..03928e3 100644 --- a/src/nodes/index.ts +++ b/src/nodes/index.ts @@ -1,8 +1,6 @@ import { NodeType } from "../graph"; import { NodeDataSerializer } from "../serializer"; - - import { FinalNode, FinalNodeRenderer, FinalNodeSerializer } from "./FinalNode"; import { LfoNode, LfoNodeRenderer, LfoNodeSerializer } from "./LfoNode"; import { MixNode, MixNodeRenderer, MixNodeSerializer } from "./MixNode"; @@ -26,18 +24,22 @@ import { StepSeqNode, StepSeqNodeRenderer, StepSeqNodeSerializer } from "./instr export type VestigeNode = PentatonicMelodyNode | PentatonicChordsNode | - SynthNode | - SamplerNode | + PickNoteNode | + StepSeqNode | + SamplerNode | + SynthNode | + FilterNode | ReverbNode | DelayNode | ChorusNode | + LfoNode | MixNode | BalanceNode | - PickNoteNode | ArpeggiatorNode | + FinalNode; /** @@ -52,36 +54,44 @@ export type VestigeNodeOfType = VestigeNode & { export const VESTIGE_NODE_TYPES = { "pentatonic-melody": PentatonicMelodyNodeRenderer, "pentatonic-chords": PentatonicChordsNodeRenderer, + "arpeggiator": ArpeggiatorNodeRenderer, + "pick-note": PickNoteNodeRenderer, + "synth": SynthNodeRenderer, "sampler": SamplerNodeRenderer, "step-seq": StepSeqNodeRenderer, + "filter": FilterNodeRenderer, "reverb": ReverbNodeRenderer, "delay": DelayNodeRenderer, "chorus": ChorusNodeRenderer, + "lfo": LfoNodeRenderer, "mix": MixNodeRenderer, "balance": BalanceNodeRenderer, - "pick-note": PickNoteNodeRenderer, - "arpeggiator": ArpeggiatorNodeRenderer, + "final": FinalNodeRenderer }; export const VESTIGE_NODE_SERIALIZERS: NodeDataSerializer[] = [ new PentatonicMelodyNodeSerializer(), new PentatonicChordsNodeSerializer(), + new ArpeggiatorNodeSerializer(), + new PickNoteNodeSerializer(), + new SynthNodeSerializer(), new SamplerNodeSerializer(), new StepSeqNodeSerializer(), + new FilterNodeSerializer(), new ReverbNodeSerializer(), new DelayNodeSerializer(), new ChorusNodeSerializer(), + new LfoNodeSerializer(), new MixNodeSerializer(), new BalanceNodeSerializer(), - new PickNoteNodeSerializer(), - new ArpeggiatorNodeSerializer(), + new FinalNodeSerializer() ];