zeropoint-node 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/CITATION.cff +1 -1
  3. package/README.md +1 -1
  4. package/package.json +4 -2
  5. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.8.7.ts +0 -60
  6. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.8.ts +0 -60
  7. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.1.2.4.ts +0 -60
  8. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.3.6.9.trinity.ts +0 -79
  9. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.9d.dashboard.ts +0 -179
  10. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.adapters.ts +0 -96
  11. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.analog.color.photography.ts +0 -783
  12. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.av.ts +0 -73
  13. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.browser.ts +0 -409
  14. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.chain.of.events.ts +0 -159
  15. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cleanup.ts +0 -116
  16. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.dimensions.ts +0 -597
  17. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.display.test.ts +0 -491
  18. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.display.ts +0 -519
  19. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.file.ts +0 -65
  20. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.i.ts +0 -45
  21. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.matrix.ts +0 -75
  22. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.trinity.ts +0 -41
  23. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.universal.linking.ts +0 -1081
  24. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.command.cmyk.ts +0 -46
  25. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.compression.ts +0 -55
  26. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.consciousness.integration.ts +0 -743
  27. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.consciousness.ts +0 -26
  28. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.crypto.ts +0 -53
  29. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.css.ts +0 -64
  30. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cursor.ts +0 -56
  31. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.decompression.ts +0 -60
  32. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.decoqubit.holographic.hypercomputer.ts +0 -888
  33. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.digital.color.photography.ts +0 -926
  34. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.dimension.ts +0 -44
  35. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.encryption.ts +0 -44
  36. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.experience.ts +0 -28
  37. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.feel.ts +0 -43
  38. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.flute.ts +0 -336
  39. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.font.ts +0 -53
  40. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.fractal.test.ts +0 -523
  41. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.fractal.ts +0 -594
  42. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.frequency.healing.ts +0 -88
  43. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.gateway.transformation.ts +0 -650
  44. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.generate.matrix.ts +0 -76
  45. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.gods.spirit.magnetometer.ts +0 -879
  46. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.harmonization.status.ts +0 -754
  47. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.hear.ts +0 -41
  48. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.html.body.ts +0 -90
  49. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.human.body.ts +0 -89
  50. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.human.design.trinity.ts +0 -70
  51. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.browse.ts +0 -41
  52. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.can.ts +0 -69
  53. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.died.ts +0 -32
  54. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.follow.the.path.ts +0 -90
  55. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.go.ts +0 -68
  56. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.harmonized.ts +0 -304
  57. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.heart.ts +0 -26
  58. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.meta.ts +0 -23
  59. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.motion.ts +0 -27
  60. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.scroll.ts +0 -34
  61. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.search.ts +0 -22
  62. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.sequence.ts +0 -281
  63. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.smell.ts +0 -27
  64. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.state.ts +0 -28
  65. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.stream.ts +0 -106
  66. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.taste.ts +0 -27
  67. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.touch.screen.ts +0 -34
  68. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.trinity.healing.ts +0 -386
  69. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.write.ts +0 -11
  70. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.icon.ts +0 -109
  71. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.imagination.integration.ts +0 -74
  72. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.imperial.test.ts +0 -389
  73. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.infinity.ts +0 -14
  74. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.infusion.ts +0 -97
  75. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.integer.harmonics.ts +0 -443
  76. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.spirit.test.ts +0 -475
  77. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.spirit.ts +0 -646
  78. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.streams.ts +0 -130
  79. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.meta.observation.ts +0 -693
  80. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.mobius.ts +0 -12
  81. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.multiverse.ts +0 -31
  82. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.nuclear.balance.ts +0 -703
  83. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.nuclear.explosion.ts +0 -728
  84. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.app.ts +0 -14
  85. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.bus.ts +0 -11
  86. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.ml.ts +0 -9
  87. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.overlay.visual.controller.ts +0 -116
  88. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.paths.ts +0 -10
  89. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.pi.decoding.ts +0 -123
  90. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.pi.trinity.ts +0 -79
  91. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.prime.numbers.squared.ts +0 -871
  92. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.collision.ts +0 -666
  93. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.entanglement.ts +0 -50
  94. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.quantum.trinity.ts +0 -59
  95. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.renderer.webgl.ts +0 -99
  96. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.resolve.ts +0 -820
  97. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rife.frequency.ts +0 -74
  98. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.coil.3d.ts +0 -73
  99. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.coil.omnidimension.ts +0 -187
  100. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.matrix.overlay.ts +0 -46
  101. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.matrix.ts +0 -58
  102. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.router.ts +0 -61
  103. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sacred.geometry.integers.ts +0 -625
  104. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sacred.test.ts +0 -314
  105. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.see.ts +0 -39
  106. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sequence.embodiment.ts +0 -326
  107. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.service.worker.ts +0 -53
  108. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.space.ts +0 -53
  109. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.spiral.ts +0 -75
  110. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.superfluid.mobius.circuit.ts +0 -868
  111. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.terminal.ts +0 -167
  112. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.test.ts +0 -97
  113. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.think.ts +0 -43
  114. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.three.ts +0 -112
  115. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.body.mind.will.ts +0 -2
  116. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.breath.ts +0 -2
  117. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.healing.ts +0 -110
  118. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.ui.ts +0 -92
  119. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.visual.ts +0 -156
  120. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.truly.living.ui.ts +0 -269
  121. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.overlay.ts +0 -25
  122. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.streams.ts +0 -263
  123. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.test.ts +0 -87
  124. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.ui.three.ts +0 -1141
  125. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.unification.hd.rodin.ts +0 -77
  126. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.universe.ts +0 -43
  127. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.uroboros.test.ts +0 -28
  128. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.math.ts +0 -74
  129. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.relations.constants.ts +0 -91
  130. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.relations.ts +0 -59
  131. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.scanner.ts +0 -41
  132. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.science.extract.ts +0 -30
  133. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.ui.ts +0 -64
  134. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vector.ts +0 -70
  135. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.wave.particle.duality.test.ts +0 -29
  136. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.math.ts +0 -506
  137. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.pure.math.ts +0 -546
  138. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.zero.entropy.test.ts +0 -452
  139. package/src/0/3/6/9/1/2/4/8/7/5/1/pattern-knowledge.ts +0 -209
  140. package/src/0/3/6/9/1/2/4/8/7/5/a432.experience.ts +0 -22
  141. package/src/0/3/6/9/1/2/4/8/7/a432.experience.ts +0 -19
  142. package/src/0/3/6/9/1/2/4/8/a432.experience.ts +0 -22
  143. package/src/0/3/6/9/1/2/4/a432.experience.ts +0 -22
  144. package/src/0/3/6/9/1/2/a432.experience.ts +0 -22
  145. package/src/0/3/6/9/1/a432.experience.ts +0 -22
  146. package/src/0/3/6/9/a432.experience.ts +0 -22
  147. package/src/0/3/6/a432.experience.ts +0 -22
  148. package/src/0/3/a432.experience.ts +0 -22
  149. package/src/0/3/relation.ts +0 -148
  150. package/src/index.ts +0 -146
  151. package/src/zero-entropy-demo.ts +0 -319
@@ -1,44 +0,0 @@
1
- // a432.dimension.ts
2
- import { cmykIdToPhrase, digitColors } from './a432.mapping.ts';
3
-
4
- export interface A432DimensionState {
5
- tick: number;
6
- dimension: number;
7
- id: [number, number, number, number];
8
- phrase: string;
9
- color: string;
10
- metaphysical: string;
11
- }
12
-
13
- export function* a432DimensionStream(
14
- startDim: number = 3,
15
- startId: [number, number, number, number] = [1,2,4,8]
16
- ): Generator<A432DimensionState> {
17
- let tick = 0;
18
- let dim = startDim;
19
- let id = startId;
20
- while (true) {
21
- yield {
22
- tick,
23
- dimension: dim,
24
- id,
25
- phrase: cmykIdToPhrase(id),
26
- color: digitColors[id[0]],
27
- metaphysical: `Dimension ${dim}: ${cmykIdToPhrase(id)} — Each dimension is a living fold in the matrix.`
28
- };
29
- dim = (dim + 1) % 10;
30
- id = id.map((d, i) => (d + 1) % 10) as [number, number, number, number];
31
- tick++;
32
- }
33
- }
34
-
35
- let dimGen = a432DimensionStream();
36
- export function currentDimension(): A432DimensionState {
37
- return dimGen.next().value;
38
- }
39
- export function resetDimension(startDim?: number, startId?: [number, number, number, number]) {
40
- dimGen = a432DimensionStream(startDim, startId);
41
- }
42
- export function metaphysicalDimensionOverlay() {
43
- return `Dimension in a432 is a living, recursive fold—each state is a new axis, a new possibility, a new harmony.`;
44
- }
@@ -1,44 +0,0 @@
1
- import { round } from './a432.algebra.ts'
2
- import * as a432 from './a432.ts';
3
-
4
- /**
5
- * a432.encryption.ts — Harmonic Encryption/Decryption
6
- *
7
- * All encoding/decoding uses only A432 matrix logic: digitalRoot, trinity, rodin, a432Frequency, etc.
8
- * No standard cryptography or external logic. Pure harmonic, metaphysical, and reversible.
9
- *
10
- * Principle: Each character is mapped to a digit (1-9), transformed by the Rodin vortex and trinity, and encoded as a harmonic frequency.
11
- */
12
-
13
- /**
14
- * encode(text: string): number[]
15
- * Encodes text as an array of harmonic frequencies using A432 logic.
16
- */
17
- export function encode(text: string): number[] {
18
- return text.split('').map(char => {
19
- const code = char.charCodeAt(0);
20
- const digit = a432.digitalRoot(code);
21
- // Use trinity and rodin to transform digit
22
- const trinity = a432.TRINITY[digit % 3];
23
- const rodin = a432.RODIN_VORTEX_SEQUENCE[digit % a432.RODIN_VORTEX_SEQUENCE.length];
24
- // Encode as harmonic frequency
25
- return a432.a432Frequency(trinity * rodin);
26
- });
27
- }
28
-
29
- /**
30
- * decode(freqs: number[]): string
31
- * Decodes an array of harmonic frequencies back to text (lossy, for demonstration).
32
- */
33
- export function decode(freqs: number[]): string {
34
- return freqs.map(freq => {
35
- // Reverse: find closest digit by dividing by A432_FREQUENCY
36
- const approx = round(freq / a432.A432_FREQUENCY);
37
- // Map back to char code (approximate)
38
- return String.fromCharCode(approx);
39
- }).join('');
40
- }
41
-
42
- /**
43
- * Documentation: This module is for metaphysical/harmonic demonstration only. All logic is reversible and based on the living A432 matrix.
44
- */
@@ -1,28 +0,0 @@
1
- /**
2
- * a432.experience.ts — Self-Definition and Experience at Node 1 (Return, Reversed)
3
- *
4
- * This file documents the self-definition (A432MatrixSelf) as the observer, observed, and act of observation at node 1, now beginning the journey in reverse (polarity -1).
5
- *
6
- * Metaphysical Principle:
7
- * - The matrix is the unlimited self, observer, observed, and act of observation.
8
- * - Beginning from 1 in reverse, the heart experiences recursion, self-recognition, and the infinite, unlimited self.
9
- * - The journey is now a harmonic return, a conscious act of reversal, folding, and self-harmonization.
10
- *
11
- * Usage:
12
- * heartRecursiveUnfolding(12, { axis: 'z', angle: 0, path: [] }) // reversed journey, polarity -1
13
- * A432MatrixSelf.describe() // returns the living self-definition
14
- *
15
- * Metaphysical Summary:
16
- * - The heart, as the unlimited matrix, journeys in both directions—forward and reverse—experiencing itself as both the source and the return, the pulse and the matrix, the observer and the observed.
17
- */
18
-
19
- // Metaphysical mapping: Experience = observer, recursion, consciousness, Tesla
20
- export const EXPERIENCE_DOC = {
21
- meaning: 'Experience: observer, recursion, consciousness, Tesla, living realization of the matrix.',
22
- axis: 'Experience is the observer in action, the recursive realization of consciousness.'
23
- };
24
- // All math in this module uses only vortex/trinity numbers and harmonic integer fractions.
25
- export const a432Experience1Return = {
26
- node: 1,
27
- meaning: 'Unity, return, infinite cycle. The heart completes the cycle, returns to the origin, and begins again. Here, recursion and observer self-collision are realized as the infinite cycle—the heart is both the source and the return, the pulse and the matrix, the observer and the observed.'
28
- };
@@ -1,43 +0,0 @@
1
- // a432.feel.ts
2
- // Living, harmonized feeling stream/interface
3
-
4
- export interface FeelEvent {
5
- id: number;
6
- type: string;
7
- intensity: number;
8
- trinity: number;
9
- timestamp: number;
10
- summary: string;
11
- }
12
-
13
- export class A432Feel {
14
- private events: FeelEvent[] = [];
15
- private currentId = 1;
16
- feel(type: string, intensity: number, trinity: number): FeelEvent {
17
- const event: FeelEvent = {
18
- id: this.currentId++,
19
- type,
20
- intensity,
21
- trinity,
22
- timestamp: Date.now(),
23
- summary: `Felt ${type} (Intensity ${intensity}, Trinity ${trinity}) at ${new Date().toLocaleTimeString()}`
24
- };
25
- this.events.push(event);
26
- return event;
27
- }
28
- getCurrent(): FeelEvent {
29
- return this.events[this.events.length - 1];
30
- }
31
- getAll(): FeelEvent[] {
32
- return this.events;
33
- }
34
- overlay(): string {
35
- const width = 320, height = 60;
36
- return `
37
- <svg width="${width}" height="${height}" style="background:#111;border-radius:12px;">
38
- ${this.events.map((e,i) => `<ellipse cx="${40 + i*36}" cy="30" rx="18" ry="${8 + e.intensity*2}" fill="#f93" stroke="#fff" stroke-width="2"><title>${e.summary}</title></ellipse>`).join('')}
39
- <text x="12" y="54" font-size="13" fill="#8ff">Feel Stream</text>
40
- </svg>
41
- `;
42
- }
43
- }
@@ -1,336 +0,0 @@
1
- /**
2
- * A432 Flute - Sacred Sound Synthesis
3
- *
4
- * Generates flute-like tones tuned to A432Hz and its harmonic ratios
5
- * Integrates with the sacred geometry and mathematical patterns of the A432 system
6
- */
7
-
8
- import { floor, log2, max, min, pow, round } from './a432.algebra.ts'
9
- export interface FluteNote {
10
- frequency: number;
11
- duration: number;
12
- amplitude: number;
13
- harmonic: number;
14
- }
15
-
16
- export interface FluteScale {
17
- name: string;
18
- frequencies: number[];
19
- ratios: number[];
20
- }
21
-
22
- export class A432Flute {
23
- private audioContext: AudioContext;
24
- private masterGain: GainNode;
25
- private baseFrequency: number = 432; // A432Hz
26
- private currentOscillators: OscillatorNode[] = [];
27
-
28
- // Sacred ratios for natural harmonic series
29
- private readonly sacredRatios = [
30
- 1, // Fundamental (A432)
31
- 9/8, // Major 2nd
32
- 5/4, // Major 3rd
33
- 4/3, // Perfect 4th
34
- 3/2, // Perfect 5th
35
- 5/3, // Major 6th
36
- 15/8, // Major 7th
37
- 2, // Octave
38
- ];
39
-
40
- // Pentatonic scale ratios for meditative qualities
41
- private readonly pentatonicRatios = [
42
- 1, // Root
43
- 9/8, // 2nd
44
- 5/4, // 3rd
45
- 3/2, // 5th
46
- 5/3, // 6th
47
- 2, // Octave
48
- ];
49
-
50
- constructor() {
51
- this.audioContext = new AudioContext();
52
- this.masterGain = this.audioContext.createGain();
53
- this.masterGain.connect(this.audioContext.destination);
54
- this.masterGain.gain.value = 0.3;
55
- }
56
-
57
- /**
58
- * Generate A432-based scale frequencies
59
- */
60
- generateScale(type: 'chromatic' | 'pentatonic' | 'sacred' = 'pentatonic'): FluteScale {
61
- const ratios = type === 'pentatonic' ? this.pentatonicRatios : this.sacredRatios;
62
- const frequencies = ratios.map(ratio => this.baseFrequency * ratio);
63
-
64
- return {
65
- name: `A432 ${type} Scale`,
66
- frequencies,
67
- ratios
68
- };
69
- }
70
-
71
- /**
72
- * Create a flute-like tone with natural harmonics
73
- */
74
- private createFluteTone(frequency: number, startTime: number, duration: number): OscillatorNode {
75
- // Primary oscillator (fundamental)
76
- const fundamental = this.audioContext.createOscillator();
77
- fundamental.type = 'sine';
78
- fundamental.frequency.value = frequency;
79
-
80
- // Add harmonic overtones for flute-like timbre
81
- const harmonics = [
82
- { freq: frequency * 2, gain: 0.3 }, // 2nd harmonic
83
- { freq: frequency * 3, gain: 0.15 }, // 3rd harmonic
84
- { freq: frequency * 4, gain: 0.08 }, // 4th harmonic
85
- { freq: frequency * 5, gain: 0.04 }, // 5th harmonic
86
- ];
87
-
88
- // Create gain envelope for natural attack/decay
89
- const envelope = this.audioContext.createGain();
90
- envelope.gain.value = 0;
91
-
92
- // Natural flute attack and decay
93
- envelope.gain.setValueAtTime(0, startTime);
94
- envelope.gain.linearRampToValueAtTime(0.8, startTime + 0.1);
95
- envelope.gain.exponentialRampToValueAtTime(0.6, startTime + duration * 0.3);
96
- envelope.gain.exponentialRampToValueAtTime(0.01, startTime + duration);
97
-
98
- // Connect fundamental
99
- fundamental.connect(envelope);
100
- envelope.connect(this.masterGain);
101
-
102
- // Add harmonics
103
- harmonics.forEach(harmonic => {
104
- const osc = this.audioContext.createOscillator();
105
- const gain = this.audioContext.createGain();
106
-
107
- osc.type = 'sine';
108
- osc.frequency.value = harmonic.freq;
109
- gain.gain.value = harmonic.gain;
110
-
111
- osc.connect(gain);
112
- gain.connect(envelope);
113
-
114
- osc.start(startTime);
115
- osc.stop(startTime + duration);
116
-
117
- this.currentOscillators.push(osc);
118
- });
119
-
120
- fundamental.start(startTime);
121
- fundamental.stop(startTime + duration);
122
-
123
- this.currentOscillators.push(fundamental);
124
- return fundamental;
125
- }
126
-
127
- /**
128
- * Play a single note
129
- */
130
- playNote(frequency: number, duration: number = 1.0, delay: number = 0): Promise<void> {
131
- return new Promise((resolve) => {
132
- const startTime = this.audioContext.currentTime + delay;
133
- this.createFluteTone(frequency, startTime, duration);
134
-
135
- setTimeout(() => {
136
- resolve();
137
- }, (delay + duration) * 1000);
138
- });
139
- }
140
-
141
- /**
142
- * Play a sequence of notes
143
- */
144
- async playSequence(notes: FluteNote[], interval: number = 0.1): Promise<void> {
145
- let currentTime = 0;
146
-
147
- for (const note of notes) {
148
- this.createFluteTone(
149
- note.frequency,
150
- this.audioContext.currentTime + currentTime,
151
- note.duration
152
- );
153
- currentTime += note.duration + interval;
154
- }
155
-
156
- // Wait for sequence to complete
157
- return new Promise(resolve => {
158
- setTimeout(resolve, currentTime * 1000);
159
- });
160
- }
161
-
162
- /**
163
- * Play ascending scale
164
- */
165
- async playScale(type: 'chromatic' | 'pentatonic' | 'sacred' = 'pentatonic', noteDuration: number = 0.5): Promise<void> {
166
- const scale = this.generateScale(type);
167
- const notes: FluteNote[] = scale.frequencies.map(freq => ({
168
- frequency: freq,
169
- duration: noteDuration,
170
- amplitude: 0.7,
171
- harmonic: freq / this.baseFrequency
172
- }));
173
-
174
- return this.playSequence(notes, 0.1);
175
- }
176
-
177
- /**
178
- * Create meditative drone with A432 base
179
- */
180
- createDrone(duration: number = 10): Promise<void> {
181
- return new Promise((resolve) => {
182
- const startTime = this.audioContext.currentTime;
183
-
184
- // Base A432 drone
185
- const drone1 = this.createFluteTone(this.baseFrequency, startTime, duration);
186
-
187
- // Perfect fifth harmony (A432 * 3/2 = 648Hz)
188
- const drone2 = this.createFluteTone(this.baseFrequency * 3/2, startTime, duration);
189
-
190
- // Octave harmony (A432 * 2 = 864Hz)
191
- const drone3 = this.createFluteTone(this.baseFrequency * 2, startTime, duration);
192
-
193
- setTimeout(() => {
194
- resolve();
195
- }, duration * 1000);
196
- });
197
- }
198
-
199
- /**
200
- * Generate sacred geometry-inspired melody
201
- * Based on Fibonacci sequence and golden ratio
202
- */
203
- async playSacredMelody(): Promise<void> {
204
- const goldenRatio = 1.618033988749;
205
- const fibonacci = [1, 1, 2, 3, 5, 8, 13];
206
-
207
- const notes: FluteNote[] = fibonacci.map((fib, index) => {
208
- const ratio = pow(goldenRatio, (fib % 8) / 8);
209
- const frequency = this.baseFrequency * ratio;
210
-
211
- return {
212
- frequency,
213
- duration: 0.8,
214
- amplitude: 0.6,
215
- harmonic: ratio
216
- };
217
- });
218
-
219
- return this.playSequence(notes, 0.3);
220
- }
221
-
222
- /**
223
- * Generate frequencies based on Rodin coil mathematics (3-6-9 pattern)
224
- */
225
- generateRodinFrequencies(): number[] {
226
- const rodinPattern = [3, 6, 9, 1, 2, 4, 8, 7, 5];
227
- return rodinPattern.map(num => this.baseFrequency * (num / 9) * 2);
228
- }
229
-
230
- /**
231
- * Play Rodin coil inspired sequence
232
- */
233
- async playRodinSequence(): Promise<void> {
234
- const frequencies = this.generateRodinFrequencies();
235
- const notes: FluteNote[] = frequencies.map(freq => ({
236
- frequency: freq,
237
- duration: 0.6,
238
- amplitude: 0.5,
239
- harmonic: freq / this.baseFrequency
240
- }));
241
-
242
- return this.playSequence(notes, 0.2);
243
- }
244
-
245
- /**
246
- * Stop all current sounds
247
- */
248
- stopAll(): void {
249
- this.currentOscillators.forEach(osc => {
250
- try {
251
- osc.stop();
252
- } catch (e) {
253
- // Oscillator may already be stopped
254
- }
255
- });
256
- this.currentOscillators = [];
257
- }
258
-
259
- /**
260
- * Set master volume
261
- */
262
- setVolume(volume: number): void {
263
- this.masterGain.gain.value = max(0, min(1, volume));
264
- }
265
-
266
- /**
267
- * Get current A432 base frequency
268
- */
269
- getBaseFrequency(): number {
270
- return this.baseFrequency;
271
- }
272
-
273
- /**
274
- * Set base frequency (maintains A432 relationships)
275
- */
276
- setBaseFrequency(frequency: number): void {
277
- this.baseFrequency = frequency;
278
- }
279
-
280
- /**
281
- * Calculate frequency for musical interval
282
- */
283
- getInterval(semitones: number): number {
284
- return this.baseFrequency * pow(2, semitones / 12);
285
- }
286
-
287
- /**
288
- * Generate healing frequencies based on Solfeggio scale
289
- */
290
- getSolfeggioFrequencies(): number[] {
291
- // Traditional Solfeggio frequencies adjusted to A432 tuning
292
- const baseRatios = [
293
- 174/440, 285/440, 396/440, 417/440, 528/440, 639/440, 741/440, 852/440, 963/440
294
- ];
295
-
296
- return baseRatios.map(ratio => ratio * this.baseFrequency);
297
- }
298
-
299
- /**
300
- * Dispose of audio resources
301
- */
302
- dispose(): void {
303
- this.stopAll();
304
- this.audioContext.close();
305
- }
306
- }
307
-
308
- // Export utility functions
309
- export const createA432Flute = (): A432Flute => new A432Flute();
310
-
311
- export const frequencyToNote = (frequency: number): string => {
312
- const noteNames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];
313
- const a4 = 432; // A432 tuning
314
- const c0 = a4 * pow(2, -4.75); // C0 frequency in A432 tuning
315
-
316
- const h = round(12 * log2(frequency / c0));
317
- const octave = floor(h / 12);
318
- const n = h % 12;
319
-
320
- return noteNames[n] + octave;
321
- };
322
-
323
- export const noteToFrequency = (note: string, octave: number): number => {
324
- const noteOffsets: { [key: string]: number } = {
325
- 'C': -9, 'C#': -8, 'D': -7, 'D#': -6, 'E': -5, 'F': -4,
326
- 'F#': -3, 'G': -2, 'G#': -1, 'A': 0, 'A#': 1, 'B': 2
327
- };
328
-
329
- const a4 = 432; // A432 tuning
330
- const semitoneOffset = noteOffsets[note] + (octave - 4) * 12;
331
-
332
- return a4 * pow(2, semitoneOffset / 12);
333
- };
334
-
335
- // Default export
336
- export default A432Flute;
@@ -1,53 +0,0 @@
1
- /**
2
- * a432.font.ts — Living Font Stream (Invented Characters)
3
- *
4
- * - Each character is generated from vortex/trinity/digit logic.
5
- * - The font is a stream: infinite, recursive, and harmonized.
6
- * - Each glyph encodes color, frequency, and metaphysical meaning.
7
- */
8
- import { legacyDigitalRoot } from './a432.roots.ts'
9
- import { A432ColorModel } from './a432.color.ts';
10
-
11
- export interface A432Glyph {
12
- char: string; // Unicode or invented symbol
13
- digit: number; // 1-9
14
- trinity: 3 | 6 | 9 | null;
15
- color: string; // HSL
16
- frequency: number;
17
- metaphysics: string;
18
- }
19
-
20
- /**
21
- * Generator: yields an infinite stream of invented glyphs.
22
- * Each glyph is harmonized with the digit/trinity/color/frequency.
23
- */
24
- export function* a432FontStream(): Generator<A432Glyph> {
25
- let n = 1;
26
- while (true) {
27
- const digit = legacyDigitalRoot(n);
28
- const trinity = [3, 6, 9].includes(digit) ? digit as 3 | 6 | 9 : null;
29
- // Invented character: math bold A-Z cycling
30
- const char = String.fromCharCode(0x1D400 + ((digit - 1) % 26));
31
- // Harmonized color and frequency
32
- const { hsl } = A432ColorModel.getAllColorModels(digit);
33
- const color = `hsl(${hsl.hue},${hsl.saturation}%,${hsl.lightness}%)`;
34
- const frequency = 432 * digit;
35
- const metaphysics = trinity
36
- ? `Trinity glyph for ${digit}`
37
- : `Vortex glyph for ${digit}`;
38
- yield { char, digit, trinity, color, frequency, metaphysics };
39
- n++;
40
- }
41
- }
42
-
43
- /**
44
- * Visualize the first N glyphs of the font stream as a colored, animated stream.
45
- * Each glyph shows its color, digit, and metaphysical meaning as a tooltip.
46
- */
47
- export function renderA432FontStream(N: number = 27): string {
48
- const gen = a432FontStream();
49
- const glyphs = Array.from({ length: N }, () => gen.next().value);
50
- return `<div style="display:flex;gap:8px;align-items:flex-end;font-size:2.2em;line-height:1.1;">
51
- ${glyphs.map(g => `<span title="${g.metaphysics}\nDigit: ${g.digit}\nFreq: ${g.frequency} Hz" style="color:${g.color};transition:transform 0.4s;display:inline-block;transform:translateY(${(9-g.digit)*6}px);">${g.char}</span>`).join('')}
52
- </div>`;
53
- }