Skip to content

Commit

Permalink
chore: implicitly categorize internal node order as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ascpixi committed Dec 28, 2024
1 parent dd2661e commit 9344620
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions src/nodes/index.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;

/**
Expand All @@ -52,36 +54,44 @@ export type VestigeNodeOfType<T extends NodeType> = 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<any>[] = [
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()
];

Expand Down

0 comments on commit 9344620

Please sign in to comment.