tonejs

📁 hongmingwang-rabbit/tonejs-skill 📅 14 days ago
1
总安装量
1
周安装量
#51694
全站排名
安装命令
npx skills add https://github.com/hongmingwang-rabbit/tonejs-skill --skill tonejs

Agent 安装分布

mcpjam 1
claude-code 1
kilo 1
junie 1
windsurf 1
zencoder 1

Skill 文档

When to use

Use this skill whenever you are dealing with Tone.js code to obtain domain-specific knowledge for browser-based music synthesis, audio processing, programmatic music generation, and emotionally-driven composition.

How to use

Read individual rule files for detailed explanations and code examples:

Core API

  • rules/synths.md – All synth types, oscillator variants (fat, FM, AM, pulse, PWM, custom partials), envelopes, and portamento
  • rules/sequencing.md – Transport, Loop, Sequence, Part, Pattern, humanization, probability, and look-ahead scheduling
  • rules/effects.md – Effects chains: Reverb, Delay, Filter, Distortion, Chorus, Phaser, Tremolo, AutoWah, Vibrato, PitchShift, StereoWidener, Chebyshev
  • rules/timing.md – Time notation (“4n”, “8n”, “1m”), tempo, BPM, TimeClass, transport position, and swing
  • rules/samples.md – Sample playback with Player, Players, Sampler, GrainPlayer, and Buffer
  • rules/signals.md – Signal routing, automation, rampTo, LFO modulation, and signal math
  • rules/midi.md – MIDI integration with WebMidi API, @tonejs/midi file parsing
  • rules/visualization.md – Audio analysis with FFT, Waveform, Meter, DCMeter, and Follower
  • rules/browser-audio.md – AudioContext, Tone.start(), user interaction requirements, React patterns

Music Composition

  • rules/emotion.mdMusic emotion engine: map feelings (happy, sad, tense, calm, epic, dreamy, etc.) to concrete Tone.js parameters — tempo, mode, timbre, dynamics, effects, articulation. Includes complete mood preset table and generator function.
  • rules/rhythm.mdBeat timing and groove: drum patterns by genre, swing values, humanization, polyrhythm, Euclidean rhythms, time signatures, quantization, and emotion-driven rhythm construction.
  • rules/music-theory.mdMusic theory utilities: scale/chord/progression builders, all modes and scales with interval formulas, Roman numeral progressions, transposition, inversions, voice leading, and optional Tonal.js integration.
  • rules/patterns.md – Complete working examples: chord progression player, arpeggiator, drum machine, algorithmic melody generator, ambient music, and Remotion integration.
  • rules/generative.mdGenerative/algorithmic music: Markov chains, constrained random, probability-based rhythm, cellular automata, L-systems, evolving pieces, data sonification, and Magenta.js AI integration.

Production & Integration

  • rules/performance.mdPerformance and production: context configuration, latency, Tone.Draw for visual sync, memory management, disposal, mobile audio, cross-browser issues, polyphony limits, and when NOT to use Tone.js.
  • rules/offline-recording.mdOffline rendering and recording: Tone.Offline for WAV export, Tone.Recorder, MediaRecorder, Remotion integration with audioBufferToDataUrl, and professional bus routing/mixing patterns.
  • rules/react-integration.mdReact/Next.js integration: useRef for audio nodes, SSR safety, dynamic imports, effect chain hooks, Transport-synced components, Reactronica declarative API, and cleanup patterns.