jpskill.com
🛠️ 開発・MCP コミュニティ

strudel

Strudel.ccという音楽制作環境で、音楽パターンやドラムシーケンス、メロディーなどを作り、ブラウザ上でコードを実行して音楽を生成するSkill。

📜 元の英語説明(参考)

This skill should be used when working with Strudel.cc, a live-coding music environment. Use when creating musical patterns, drum sequences, melodies, basslines, or generative compositions. The user will always want to run Strudel code in the browser, either by copy-pasting or by providing a clickable URL with the code encoded in base64.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Strudel.ccという音楽制作環境で、音楽パターンやドラムシーケンス、メロディーなどを作り、ブラウザ上でコードを実行して音楽を生成するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o strudel.zip https://jpskill.com/download/23590.zip && unzip -o strudel.zip && rm strudel.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23590.zip -OutFile "$d\strudel.zip"; Expand-Archive "$d\strudel.zip" -DestinationPath $d -Force; ri "$d\strudel.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して strudel.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → strudel フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
10

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] strudel

Strudel

概要

Strudelは、TidalCyclesのパターン言語をJavaScriptに移植した、ブラウザベースのライブコーディング環境です。純粋関数型プログラミングを使用して、ドラム、メロディ、シンセシス、エフェクトを含む音楽パターンを作成します。パターンは、時間スパンをイベントストリームに変換する不変のクエリ関数であり、ミニ記法DSL、ユークリッドリズム、および広範なオーディオ処理をサポートしています。

このスキルを使用する場面

このスキルは、次のような場合に使用します。

  • ドラムパターン、メロディ、ベースライン、または完全な楽曲を作成する場合
  • アルゴリズム的または生成的な音楽を生成する場合
  • フィルター、リバーブ、ディレイ、ディストーションなどのエフェクトを適用する場合
  • Strudelコードをデバッグしたり、パターンの動作を説明したりする場合
  • Strudelコードを共有可能なURLにエンコードする場合

コアワークフロー

1. ユーザーの音楽的意図を理解する

ユーザーがパターンをリクエストした際は、以下を明確にしてください。

  • ジャンル/スタイル (テクノ、アンビエント、ジャズなど)
  • アーティストの参照 (Lorn、Clams Casino、Aphex Twinなど)
  • テンポ (BPMまたは1分あたりのサイクル数)
  • 必要な要素 (ドラムのみ、ドラム+ベース、フルアレンジメント)
  • 複雑さのレベル (シンプルなループ vs. 生成的/進化するパターン)

ジャンル/アーティスト固有のテクニックについてはreferences/genre-styles.mdを参照してください。これには以下が含まれています。

  • 一般的なジャンルやアーティストの音響特性
  • Strudelの実装パターン
  • 各スタイルに対する具体的なコード例
  • 典型的なテンポ範囲、エフェクト、構造要素

2. パターンを記述する

Strudelの関数型で構成的なアプローチを使用してパターンを構築します。

基本的な構造:

// シンプルなドラムパターン
s("bd hh sd hh")

// テンポ付き
s("bd hh sd hh").cpm(120)

// スタックでレイヤー化
stack(
  s("bd(3,8)"),           // キックドラム
  s("hh*8"),              // ハイハット
  s("~ sd ~ sd")          // バックビートのスネア
).cpm(120)

主要なパターン:

  • 簡潔なリズム指定にはミニ記法 ("bd hh sd") を使用します。
  • 複数のパターンをレイヤー化するには stack() を使用します。
  • 1分あたりのサイクル数でテンポを指定するには .cpm() を使用します。
  • 興味深い分布にはユークリッドリズム (pulses, steps) を使用します。
  • 変換にはラムダ関数を使用します: .off(1/8, x => x.add(7))

3. ユーザーに出力を提供する

ユーザーは常にブラウザでコードを実行したいと考えています。両方を提供してください。

  1. 生のコード - https://strudel.cc/ にコピー&ペーストするため
  2. エンコードされたURL - scripts/strudel_url.py を使用して即座に再生するため

URLをエンコードするタイミング:

  • 初回作成時: 新しいパターンをゼロから作成する場合は、常にエンコードされたURLを提供します。
  • 反復/改良時: ユーザーが要求しない限り、エンコードはスキップします。
  • 最終バージョン: 作業が完了したら、エンコードを提案します。

URLのエンコード:

python3 scripts/strudel_url.py encode 's("bd hh sd hh").cpm(120)'

これにより、次のようなクリック可能なリンクが生成されます。

https://strudel.cc/#cygiYmQgaGggc2QgaGgiKS5jcG0oMTIwKQ%3D%3D

ユーザーがすぐに開けるクリック可能なリンクとしてURLを提示してください。

4. 反復と改良

ユーザーがパターンをテストした後、修正を要求する場合があります。

  • テンポの調整: .cpm(130) または .slow(2) または .fast(2)
  • エフェクトの追加: .room(.5), .lpf(1000), .delay(.25)
  • バリエーションの追加: .sometimes(x => x.speed(2)), .every(4, rev)
  • サウンドの変更: サンプル名を置き換えるか、シンセシスパラメーターを追加します。

更新されたコードをコピー&ペースト用に提供します。反復中は、要求されない限りURLエンコードはスキップします。

一般的なパターンテンプレート

assets/patterns/ のテンプレートを開始点として使用します。

  • techno-drums.js - ユークリッドパターンを用いた4/4テクノ
  • acid-bass.js - フィルター・スイープを用いたTB-303スタイルのベースライン
  • ambient-pad.js - ゆっくりとしたコード進行の豊かなパッド
  • generative-melody.js - スケールとユークリッドリズムを用いたアルゴリズムメロディ
  • breakbeat.js - アメンブレイクのスライスと操作
  • polyrhythm.js - 複数の拍子記号をレイヤー化

ユーザーが同様のスタイルを要求した場合は、これらを参照してください。

主要な構文クイックリファレンス

ミニ記法:

  • "a b c" - シーケンス (均等に分布)
  • "<a b c>" - スローキャット (1サイクルに1つ)
  • "[a b]" - サブディビジョン (速い)
  • "a,b,c" - 並列/コード
  • "a*4" - スピードアップ (4倍)
  • "a/2" - スローダウン (2倍)
  • "a(3,8)" - ユークリッドリズム (8ステップに3つのパルス)
  • "~" - 休符/無音
  • "a?" - 50%の確率

一般的な関数:

  • s() または .sound() - サンプル選択
  • note() または .note() - ピッチ (音名またはMIDI番号)
  • .scale() - スケール適用 (例: "C:minor")
  • stack() - パターンをレイヤー化
  • .fast() / .slow() - スピード制御
  • .rev() - リバース
  • .sometimes() - 50%の確率で変換を適用
  • .every(n, fn) - nサイクルごとに変換を適用

エフェクト:

  • .lpf() - ローパスフィルター (カットオフ周波数)
  • .hpf() - ハイパスフィルター
  • .room() - リバーブ (0-1)
  • .delay() - ディレイエフェクト (0-1)
  • .gain() - 音量
  • .pan() - ステレオ位置 (0=左, 1=右)

包括的な構文についてはreferences/strudel-reference.mdを参照してください。これには以下が含まれています。

  • 完全なミニ記法構文
  • すべてのパターン変換 (ユークリッド、時間的、確率的)
  • オーディオエフェクトとシンセシスパラメーター
  • シグナル関数 (sine, perlin, sawなど)
  • パターンアライメント戦略
  • 実用的な作曲例

必要に応じて、このファイルをgrepで検索してください。

grep -i "euclidean" references/strudel-reference.md
grep -i "filter" references/strudel-reference.md
grep -i "delay" references/strudel-reference.md

一般的な問題のデバッグ

パターンが再生されない:

  • パターンが適切なオーディオ出力 (.s(), .sound(), または .note()) で終わっていることを確認してください。
  • サンプルがロードされていることを確認してください (デフォルトのサンプルはロードなしで動作します)。
  • 構文を確認してください: 括弧、引用符、丸括弧のバランス。

タイミングの問題:

  • テンポを明示的に設定するために .cpm() または setcpm() を使用してください。
  • 競合する .fast() / .slow() の呼び出しがないか確認してください。
  • ユークリッドリズムが有効な (pulses, steps) 値を持っていることを確認してください。

フィルターが機能しない:

  • カットオフ周波数が有効な範囲 (20-20000 Hz) 内にあることを確認してください。
  • フィルターエンベロープパラメーター (.lpa(), .lpd(), .lps(), .lpr()) を確認してください。
  • フィルターエンベロープの深さには .lpenv() を使用してください。

コードが複雑すぎる

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Strudel

Overview

Strudel is a browser-based live-coding environment that ports TidalCycles' pattern language to JavaScript. It uses pure functional programming to create musical patterns that can include drums, melodies, synthesis, and effects. Patterns are immutable query functions that transform time spans into event streams, supporting mini-notation DSL, Euclidean rhythms, and extensive audio processing.

When to Use This Skill

Use this skill when:

  • Creating drum patterns, melodies, basslines, or full compositions
  • Generating algorithmic or generative music
  • Applying effects like filters, reverb, delay, or distortion
  • Debugging Strudel code or explaining pattern behavior
  • Encoding Strudel code into shareable URLs

Core Workflow

1. Understanding the User's Musical Intent

When a user requests a pattern, clarify:

  • Genre/style (techno, ambient, jazz, etc.)
  • Artist references (Lorn, Clams Casino, Aphex Twin, etc.)
  • Tempo (BPM or cycles per minute)
  • Elements needed (drums only, drums + bass, full arrangement)
  • Complexity level (simple loop vs. generative/evolving)

For genre/artist-specific techniques, consult references/genre-styles.md which provides:

  • Sonic characteristics for common genres and artists
  • Strudel implementation patterns
  • Concrete code examples for each style
  • Typical tempo ranges, effects, and structural elements

2. Writing the Pattern

Build patterns using Strudel's functional, compositional approach:

Basic structure:

// Simple drum pattern
s("bd hh sd hh")

// With tempo
s("bd hh sd hh").cpm(120)

// Layered with stack
stack(
  s("bd(3,8)"),           // Kick drum
  s("hh*8"),              // Hi-hats
  s("~ sd ~ sd")          // Snare on backbeat
).cpm(120)

Key patterns:

  • Use mini-notation ("bd hh sd") for concise rhythm specification
  • Use stack() to layer multiple patterns
  • Use .cpm() for tempo in cycles per minute
  • Use Euclidean rhythms (pulses, steps) for interesting distributions
  • Use lambda functions for transformations: .off(1/8, x => x.add(7))

3. Providing Output to the User

The user always wants to run the code in their browser. Provide both:

  1. The raw code - for copy-pasting into https://strudel.cc/
  2. An encoded URL - using scripts/strudel_url.py for immediate playback

When to encode URLs:

  • Initial creation: Always provide encoded URL when creating a new pattern from scratch
  • Iterations/refinements: Skip encoding unless user requests it
  • Final version: Offer to encode when work is complete

Encoding a URL:

python3 scripts/strudel_url.py encode 's("bd hh sd hh").cpm(120)'

This produces a clickable link like:

https://strudel.cc/#cygiYmQgaGggc2QgaGgiKS5jcG0oMTIwKQ%3D%3D

Present the URL as a clickable link the user can immediately open.

4. Iteration and Refinement

After the user tests the pattern, they may request modifications:

  • Adjust tempo: .cpm(130) or .slow(2) or .fast(2)
  • Add effects: .room(.5), .lpf(1000), .delay(.25)
  • Add variation: .sometimes(x => x.speed(2)), .every(4, rev)
  • Change sounds: Replace sample names or add synthesis parameters

Provide the updated code for copy-pasting. Skip URL encoding during iterations unless requested.

Common Pattern Templates

Use templates from assets/patterns/ as starting points:

  • techno-drums.js - 4/4 techno with Euclidean patterns
  • acid-bass.js - TB-303 style bassline with filter sweeps
  • ambient-pad.js - Lush pad with slow chord progression
  • generative-melody.js - Algorithmic melody with scale and Euclidean rhythms
  • breakbeat.js - Amen break slicing and manipulation
  • polyrhythm.js - Multiple time signatures layered

Reference these when users request similar styles.

Key Syntax Quick Reference

Mini-notation:

  • "a b c" - Sequence (evenly distributed)
  • "<a b c>" - Slow cat (one per cycle)
  • "[a b]" - Subdivision (faster)
  • "a,b,c" - Parallel/chord
  • "a*4" - Speed up (4x)
  • "a/2" - Slow down (2x)
  • "a(3,8)" - Euclidean rhythm (3 pulses in 8 steps)
  • "~" - Rest/silence
  • "a?" - 50% probability

Common functions:

  • s() or .sound() - Sample selection
  • note() or .note() - Pitch (note name or MIDI number)
  • .scale() - Apply scale (e.g., "C:minor")
  • stack() - Layer patterns
  • .fast() / .slow() - Speed control
  • .rev() - Reverse
  • .sometimes() - Apply transformation 50% of the time
  • .every(n, fn) - Apply transformation every n cycles

Effects:

  • .lpf() - Low-pass filter (cutoff frequency)
  • .hpf() - High-pass filter
  • .room() - Reverb (0-1)
  • .delay() - Delay effect (0-1)
  • .gain() - Volume
  • .pan() - Stereo position (0=left, 1=right)

For comprehensive syntax, consult references/strudel-reference.md which contains:

  • Complete mini-notation syntax
  • All pattern transformations (Euclidean, temporal, stochastic)
  • Audio effects and synthesis parameters
  • Signal functions (sine, perlin, saw, etc.)
  • Pattern alignment strategies
  • Practical composition examples

Search this file with grep when needed:

grep -i "euclidean" references/strudel-reference.md
grep -i "filter" references/strudel-reference.md
grep -i "delay" references/strudel-reference.md

Debugging Common Issues

Pattern not playing:

  • Ensure the pattern ends with appropriate audio output (.s(), .sound(), or .note())
  • Check that samples are loaded (default samples work without loading)
  • Verify syntax: balanced brackets, quotes, parentheses

Timing issues:

  • Use .cpm() or setcpm() to set tempo explicitly
  • Check for conflicting .fast() / .slow() calls
  • Verify Euclidean rhythms have valid (pulses, steps) values

Filter not working:

  • Ensure cutoff frequency is in valid range (20-20000 Hz)
  • Check filter envelope parameters (.lpa(), .lpd(), .lps(), .lpr())
  • Use .lpenv() for filter envelope depth

Code too complex:

  • Break into smaller patterns and test individually
  • Use variables: let drums = s("bd hh")
  • Stack tested patterns: stack(drums, bass, melody)

Resources

scripts/strudel_url.py

Python script for encoding/decoding Strudel URLs.

Encode:

python3 scripts/strudel_url.py encode '<strudel-code>'

Decode:

python3 scripts/strudel_url.py decode '<strudel-url>'

Always encode URLs after creating or modifying patterns to provide clickable links.

references/strudel-reference.md

Comprehensive technical reference including:

  • Complete mini-notation syntax
  • All pattern operations and transformations
  • Audio effects and synthesis
  • Signals and continuous patterns
  • Composition examples
  • Best practices

Load this file when users need detailed syntax explanations or advanced techniques.

references/genre-styles.md

Genre and artist style guide including:

  • Dark Ambient Hip-Hop (Lorn, Clams Casino)
  • Techno (General, Dub Techno)
  • Drum & Bass / Jungle (Jungle, Liquid DnB)
  • Trap / Hip-Hop (Trap, Boom Bap)
  • Ambient / Experimental (Dark Ambient, IDM/Glitch)
  • House (Deep House, Acid House)

Each entry provides sonic characteristics and Strudel implementation techniques. Load when users reference specific genres or artists.

Search this file when needed:

grep -i "lorn" references/genre-styles.md
grep -i "techno" references/genre-styles.md
grep -i "ambient" references/genre-styles.md

assets/patterns/

Example pattern templates for common musical styles. Copy and adapt these as starting points:

  • techno-drums.js - Electronic drum patterns
  • acid-bass.js - Resonant basslines
  • ambient-pad.js - Atmospheric textures
  • generative-melody.js - Algorithmic melodies
  • breakbeat.js - Sample manipulation
  • polyrhythm.js - Complex rhythmic structures

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。