[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ENHWV863FHHH3Y1DHAT49X":3,"skill-same:01M6ENHWV863FHHH3Y1DHAT49X":330},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6ENHWV863FHHH3Y1DHAT49X","music-generation",null,"Tools, patterns, and utilities for generating professional music with realistic instrument sounds. Write custom compositions using music21 or learn from existing MIDI files.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"music generation","music","generation","numpy","users","instrument","professional","midi","intelligence","scipy","learn","mp3","patterns","functions","files","write","Composition","Tools","2026-11-10 10:12:30",false,"---\nname: music-generation\ndescription: Tools, patterns, and utilities for generating professional music with realistic instrument sounds. Write custom compositions using music21 or learn from existing MIDI files.\nwhen_to_use: When users request downloadable .mp3 or .wav music files, original compositions, classical pieces, or timed music for videos. This skill emphasizes intelligence and composition over pre-made functions.\nversion: 2.0.0\ndependencies: music21, midi2audio, pydub, mido, numpy, scipy\n---\n\n## Quick Start (Read This First!)\n\n**IMPORTANT: This file is located at `\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002FSKILL.md`**\n\nIf you need to reference this skill again during your session, read that exact path directly. Do not explore directories or use find commands - just read the file path above.\n\n## Philosophy\n\nThis skill provides **tools and patterns** for music composition, not pre-baked solutions. You should use your intelligence and the music21 library to compose dynamically based on user requests.\n\n**Core Principle**: Write custom code that composes music algorithmically rather than calling functions with hardcoded melodies.\n\n## Installation & Setup\n\n### Quick Installation\n\nRun the automated installer for complete setup:\n\n```bash\nbash \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Finstall.sh\n```\n\nThis installs all system dependencies, Python packages, and verifies the installation.\n\n**Note:** The install script may display \"error: externally-managed-environment\" messages at the end. These are expected and can be safely ignored - the dependencies are already installed. If you see these messages, the installation was successful.\n\n### Manual Installation\n\nAlternatively, install dependencies manually:\n\n**System Dependencies:**\n```bash\napt-get update\napt-get install -y fluidsynth fluid-soundfont-gm fluid-soundfont-gs ffmpeg\n```\n\n**Python Dependencies:**\n```bash\npip install -r \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Frequirements.txt\n```\n\nThe `requirements.txt` includes: music21, midi2audio, pydub, mido, numpy, scipy.\n\n### Available SoundFonts\n\n**Traditional Pipeline (Orchestral\u002FAcoustic):**\n- `\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2` (141MB, General MIDI soundfont for orchestral\u002Fclassical)\n- `\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002Fdefault.sf2` (symlink to best available)\n\n**Electronic Pipeline:**\n- No soundfonts required - uses real-time synthesis for all electronic sounds\n\n## Quick Start: Write Custom Compositions\n\n### Basic Music Generation Pattern\n\n```python\nfrom music21 import stream, note, chord, instrument, tempo, dynamics\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\n# 1. Create score and parts\nscore = stream.Score()\nviolin_part = stream.Part()\nviolin_part.insert(0, instrument.Violin())\nviolin_part.insert(0, tempo.MetronomeMark(number=120))\n\n# 2. Generate notes algorithmically\nfor measure in range(16):\n    violin_part.append(note.Note('E5', quarterLength=1.0))\n    violin_part.append(note.Note('G5', quarterLength=1.0))\n    violin_part.append(note.Note('A5', quarterLength=2.0))\n\n# 3. Export to MIDI\nscore.append(violin_part)\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.mid'\nscore.write('midi', fp=midi_path)\n\n# 4. Render with FluidSynth\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nwav_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.wav'\nfs.midi_to_audio(midi_path, wav_path)\n\n# 5. Convert to MP3\naudio = AudioSegment.from_wav(wav_path)\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.mp3'\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Key Concepts\n\n- **Always create downloadable MP3 files** (not HTML players)\n- **All output goes to** `\u002Fmnt\u002Fuser-data\u002Foutputs\u002F`\n- **Use music21.instrument classes**: `instrument.Violin()`, `instrument.Violoncello()`, `instrument.Piano()`, `instrument.Trumpet()`, etc.\n- **Generate notes programmatically** - avoid hardcoded sequences\n\n## Choosing the Right Rendering Pipeline\n\n**CRITICAL**: This skill supports TWO rendering pipelines. You MUST choose based on the musical genre:\n\n### Traditional Pipeline (Orchestral, Classical, Acoustic)\n\n**Use when creating:**\n- Orchestral music (violin, cello, trumpet, etc.)\n- Classical compositions (Mozart, Beethoven style)\n- Piano music, chamber music, symphonies\n- Acoustic guitar, brass ensembles\n- Any music with traditional\u002Facoustic instruments\n\n**How to render:**\n```python\n# After composing with music21 and exporting MIDI...\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nfs.midi_to_audio(midi_path, wav_path)\n\naudio = AudioSegment.from_wav(wav_path)\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Electronic Pipeline (House, Techno, EDM, Electronic)\n\n**Use when creating:**\n- House, techno, trance, EDM\n- Electronic dance music with synth bass\u002Fpads\u002Fleads\n- DJ beats, club music\n- Any music described as \"electronic\" or \"synth-heavy\"\n- Music referencing DJs like Keinemusik, Black Coffee, etc.\n\n**How to render:**\n```python\n# After composing with music21, using mido for instruments, and exporting MIDI...\nimport subprocess\n\n# Use the electronic rendering script\nresult = subprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    mp3_path\n], capture_output=True, text=True)\n\nprint(result.stdout)\nif result.returncode != 0:\n    print(f\"Error: {result.stderr}\")\n```\n\n**Why this matters:**\n- The orchestral soundfont (FluidR3_GM.sf2) sounds **terrible** for electronic music\n- Its \"synth\" instruments are basic 1990s approximations\n- The electronic pipeline uses **real-time synthesis** for authentic electronic sound\n- Synthesizes 808-style kicks, electronic snares, and hi-hats on-the-fly (NO external samples required)\n- Bass\u002Fpads\u002Fleads use subtractive synthesis with filters and ADSR envelopes\n- Genre presets (deep_house, techno, trance, ambient) tune synthesis parameters automatically\n\n**Drum Synthesis:**\n\nThe electronic renderer uses **real-time drum synthesis** (no external samples needed). All drum sounds (kicks, snares, hi-hats, claps) are synthesized on-the-fly with genre-specific parameters.\n\n**Example: House Track**\n```python\n# 1. Compose with music21 (same as always)\nscore = stream.Score()\ndrums = stream.Part()\nbass = stream.Part()\npads = stream.Part()\n# ... compose your music\n\n# 2. Export MIDI\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house.mid'\nscore.write('midi', fp=midi_path)\n\n# 3. Fix instruments with mido (INSERT program_change messages)\nfrom mido import MidiFile, Message\nmid = MidiFile(midi_path)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9\n    elif i == 2:  # Bass - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\nmid.save(midi_path)\n\n# 4. Render with ELECTRONIC pipeline with deep_house preset!\nimport subprocess\nsubprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house.mp3',\n    '--genre', 'deep_house'\n])\n```\n\n### Available Genre Presets\n\nThe electronic renderer includes pre-tuned synthesis presets with **supersaw lead synthesis** for thick, professional EDM sounds:\n\n- **deep_house**: Warm bass with 3-voice leads (120-125 BPM)\n- **techno**: Hard-hitting with 7-voice supersaw leads (125-135 BPM)\n- **trance**: Uplifting with massive 9-voice supersaw leads (130-140 BPM)\n- **ambient**: Soft, atmospheric with 5-voice pads (60-90 BPM)\n- **acid_house**: Squelchy TB-303 bass with 5-voice leads (120-130 BPM)\n- **default**: Balanced 5-voice leads (120-130 BPM)\n\n**Supersaw Synthesis (Swedish House Mafia \u002F Progressive House Sound):**\n\nThe electronic renderer now includes **unison voice synthesis** for fat, buzzy leads:\n- **Multiple detuned oscillators**: 3-9 sawtooth waves per note (genre-dependent)\n- **Aggressive detuning**: 6-15 cents spread creates buzzy chorus effect\n- **Enhanced saturation**: 2.5x distortion for punch and aggression\n- **Phase spreading**: Creates wide stereo image\n\n**How It Works:**\n- House: 3 voices, ±8 cents (subtle, warm)\n- Techno: 7 voices, ±12 cents (aggressive, punchy)\n- Trance: 9 voices, ±15 cents (massive, soaring)\n- Acid house: 5 voices, ±12 cents (squelchy, aggressive)\n\nThis replicates the classic supersaw sound from Swedish House Mafia, Avicii, and modern EDM productions.\n\nEach preset tunes:\n- **Drum synthesis**: kick pitch\u002Fdecay\u002Fpunch, snare tone\u002Fsnap, hat brightness\u002Fmetallic\n- **Bass synthesis**: waveform, filter cutoff\u002Fresonance, ADSR envelope\n- **Pad synthesis**: attack\u002Frelease times, detune amount, brightness\n- **Lead synthesis**: brightness, envelope, portamento\n- **Volume balance**: intelligent mix levels per instrument with frequency-aware compensation\n- **Velocity curves**: exponential, linear, or logarithmic response to MIDI velocity\n\n### Intelligent Volume Management\n\nThe electronic renderer uses **frequency-aware volume balancing** to prevent any instrument from overpowering the mix:\n\n**How it works:**\n- **Bass frequencies (\u003C100Hz)**: Automatically reduced by -4 to -6dB (sub-bass has high perceived energy)\n- **Mid frequencies (200-800Hz)**: Balanced naturally\n- **High frequencies (>800Hz)**: Slightly boosted for clarity (+1 to +1.5dB)\n- **Genre-specific balance**: Each preset has optimized levels (e.g., House bass gets -3dB)\n- **Velocity curves**: MIDI velocity maps intelligently (not just linear)\n- **Auto-limiting**: Final mix is limited to -1dB to prevent clipping\n\n**Why this matters:**\n- House bass (A1, E2) at 55-82Hz naturally has more power - now automatically compensated\n- Prevents \"bass overpowering everything\" issues\n- Maintains balanced mix across all genres\n- No manual volume tweaking needed\n\nTo see all available presets:\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py --list-genres\n```\n\n### Customizing Synthesis Parameters\n\nFor advanced control, you can create custom preset JSON files:\n\n```json\n{\n  \"drums\": {\n    \"kick\": {\"pitch\": 52.0, \"decay\": 0.6, \"punch\": 0.9},\n    \"snare\": {\"tone_mix\": 0.25, \"snap\": 0.8}\n  },\n  \"bass\": {\n    \"waveform\": \"sawtooth\",\n    \"cutoff\": 180,\n    \"resonance\": 0.7\n  },\n  \"pad\": {\n    \"attack\": 1.0,\n    \"brightness\": 0.35\n  }\n}\n```\n\nThen use with `--preset`:\n```bash\npython render_electronic.py track.mid output.mp3 --preset my_preset.json\n```\n\n## Advanced Workflow: Learn from Existing MIDI\n\nFor classical pieces or complex compositions, you can:\n\n### 1. Extract Structure from ANY MIDI File\n\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Fmidi_inventory.py \\\n    path\u002Fto\u002Fmozart.mid \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_structure.json\n```\n\nThis extracts:\n- Tempo, key signature, time signature\n- Track information and instruments\n- Complete note sequences with timing\n- Musical structure\n\n### 2. Modify the JSON Structure\n\n```python\nimport json\n\n# Load extracted structure\nwith open('\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_structure.json', 'r') as f:\n    structure = json.load(f)\n\n# Modify instruments, notes, timing, etc.\nstructure['tracks']['track-0']['instrument'] = 'violin'  # Change piano to violin!\n\n# Save modified structure\nwith open('\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.json', 'w') as f:\n    json.dump(structure, f)\n```\n\n### 3. Render Modified Structure to MP3\n\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Fmidi_render.py \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.json \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.mp3\n```\n\n**This workflow lets you \"recreate\" any classical piece with different instruments!**\n\n## Available Scripts\n\nAll scripts are located in `\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002F`:\n\n**Main Workflow Scripts:**\n- **`render_electronic.py`** - Electronic music renderer with real-time synthesis (drums, bass, pads, leads)\n- **`midi_inventory.py`** - Extract complete structure from ANY MIDI file to JSON format\n- **`midi_render.py`** - Render JSON music structure to MP3 using FluidSynth\n- **`midi_transform.py`** - Generic MIDI transformations (transpose, tempo change, instrument swap)\n- **`audio_validate.py`** - Validate audio file quality and format\n\n**Synthesis Engine (used by render_electronic.py):**\n- **`drum_synthesizer.py`** - Synthesizes kicks, snares, hi-hats, claps on-the-fly\n- **`melodic_synthesizer.py`** - Synthesizes bass, pads, and lead sounds using subtractive synthesis\n- **`synthesis_presets.py`** - Genre presets (deep_house, techno, trance, ambient, etc.)\n- **`midi_utils.py`** - MIDI parsing utilities for extracting events and metadata\n- **`__init__.py`** - Python package marker (allows importing scripts as modules)\n\n**Utility Scripts:**\n\n## Music Theory Reference\n\n### Complete General MIDI Instrument Map (Programs 0-127)\n\n**CRITICAL: music21 has limited instrument support. For most sounds (especially electronic), you MUST use mido to set program numbers after export.**\n\n```python\n# Piano (0-7)\n0: \"Acoustic Grand Piano\"\n1: \"Bright Acoustic Piano\"\n2: \"Electric Grand Piano\"\n3: \"Honky-tonk Piano\"\n4: \"Electric Piano 1\"\n5: \"Electric Piano 2\"\n6: \"Harpsichord\"\n7: \"Clavinet\"\n\n# Chromatic Percussion (8-15)\n8: \"Celesta\"\n9: \"Glockenspiel\"\n10: \"Music Box\"\n11: \"Vibraphone\"\n12: \"Marimba\"\n13: \"Xylophone\"\n14: \"Tubular Bells\"\n15: \"Dulcimer\"\n\n# Organ (16-23)\n16: \"Drawbar Organ\"\n17: \"Percussive Organ\"\n18: \"Rock Organ\"\n19: \"Church Organ\"\n20: \"Reed Organ\"\n21: \"Accordion\"\n22: \"Harmonica\"\n23: \"Tango Accordion\"\n\n# Guitar (24-31)\n24: \"Acoustic Guitar (nylon)\"\n25: \"Acoustic Guitar (steel)\"\n26: \"Electric Guitar (jazz)\"\n27: \"Electric Guitar (clean)\"\n28: \"Electric Guitar (muted)\"\n29: \"Overdriven Guitar\"\n30: \"Distortion Guitar\"\n31: \"Guitar Harmonics\"\n\n# Bass (32-39)\n32: \"Acoustic Bass\"\n33: \"Electric Bass (finger)\"\n34: \"Electric Bass (pick)\"\n35: \"Fretless Bass\"\n36: \"Slap Bass 1\"\n37: \"Slap Bass 2\"\n38: \"Synth Bass 1\"\n39: \"Synth Bass 2\"\n\n# Strings (40-47)\n40: \"Violin\"\n41: \"Viola\"\n42: \"Cello\"\n43: \"Contrabass\"\n44: \"Tremolo Strings\"\n45: \"Pizzicato Strings\"\n46: \"Orchestral Harp\"\n47: \"Timpani\"\n\n# Ensemble (48-55)\n48: \"String Ensemble 1\"\n49: \"String Ensemble 2\"\n50: \"Synth Strings 1\"\n51: \"Synth Strings 2\"\n52: \"Choir Aahs\"\n53: \"Voice Oohs\"\n54: \"Synth Voice\"\n55: \"Orchestra Hit\"\n\n# Brass (56-63)\n56: \"Trumpet\"\n57: \"Trombone\"\n58: \"Tuba\"\n59: \"Muted Trumpet\"\n60: \"French Horn\"\n61: \"Brass Section\"\n62: \"Synth Brass 1\"\n63: \"Synth Brass 2\"\n\n# Reed (64-71)\n64: \"Soprano Sax\"\n65: \"Alto Sax\"\n66: \"Tenor Sax\"\n67: \"Baritone Sax\"\n68: \"Oboe\"\n69: \"English Horn\"\n70: \"Bassoon\"\n71: \"Clarinet\"\n\n# Pipe (72-79)\n72: \"Piccolo\"\n73: \"Flute\"\n74: \"Recorder\"\n75: \"Pan Flute\"\n76: \"Blown Bottle\"\n77: \"Shakuhachi\"\n78: \"Whistle\"\n79: \"Ocarina\"\n\n# Synth Lead (80-87)\n80: \"Lead 1 (square)\"\n81: \"Lead 2 (sawtooth)\"\n82: \"Lead 3 (calliope)\"\n83: \"Lead 4 (chiff)\"\n84: \"Lead 5 (charang)\"\n85: \"Lead 6 (voice)\"\n86: \"Lead 7 (fifths)\"\n87: \"Lead 8 (bass + lead)\"\n\n# Synth Pad (88-95)\n88: \"Pad 1 (new age)\"\n89: \"Pad 2 (warm)\"\n90: \"Pad 3 (polysynth)\"\n91: \"Pad 4 (choir)\"\n92: \"Pad 5 (bowed)\"\n93: \"Pad 6 (metallic)\"\n94: \"Pad 7 (halo)\"\n95: \"Pad 8 (sweep)\"\n\n# Synth Effects (96-103)\n96: \"FX 1 (rain)\"\n97: \"FX 2 (soundtrack)\"\n98: \"FX 3 (crystal)\"\n99: \"FX 4 (atmosphere)\"\n100: \"FX 5 (brightness)\"\n101: \"FX 6 (goblins)\"\n102: \"FX 7 (echoes)\"\n103: \"FX 8 (sci-fi)\"\n\n# Ethnic (104-111)\n104: \"Sitar\"\n105: \"Banjo\"\n106: \"Shamisen\"\n107: \"Koto\"\n108: \"Kalimba\"\n109: \"Bag pipe\"\n110: \"Fiddle\"\n111: \"Shanai\"\n\n# Percussive (112-119)\n112: \"Tinkle Bell\"\n113: \"Agogo\"\n114: \"Steel Drums\"\n115: \"Woodblock\"\n116: \"Taiko Drum\"\n117: \"Melodic Tom\"\n118: \"Synth Drum\"\n119: \"Reverse Cymbal\"\n\n# Sound Effects (120-127)\n120: \"Guitar Fret Noise\"\n121: \"Breath Noise\"\n122: \"Seashore\"\n123: \"Bird Tweet\"\n124: \"Telephone Ring\"\n125: \"Helicopter\"\n126: \"Applause\"\n127: \"Gunshot\"\n```\n\n### Complete Drum Map (MIDI Channel 10, Notes 35-81)\n\n**Drums use note numbers for different sounds, NOT pitch. Must be on channel 10 (9 in 0-indexed).**\n\n```python\n# Bass Drums\n35: \"Acoustic Bass Drum\"\n36: \"Bass Drum 1\"  # Most common kick\n\n# Snares\n38: \"Acoustic Snare\"  # Standard snare\n40: \"Electric Snare\"\n\n# Toms\n41: \"Low Floor Tom\"\n43: \"High Floor Tom\"\n45: \"Low Tom\"\n47: \"Low-Mid Tom\"\n48: \"Hi-Mid Tom\"\n50: \"High Tom\"\n\n# Hi-Hats\n42: \"Closed Hi-Hat\"  # Most used\n44: \"Pedal Hi-Hat\"\n46: \"Open Hi-Hat\"\n\n# Cymbals\n49: \"Crash Cymbal 1\"\n51: \"Ride Cymbal 1\"\n52: \"Chinese Cymbal\"\n53: \"Ride Bell\"\n55: \"Splash Cymbal\"\n57: \"Crash Cymbal 2\"\n59: \"Ride Cymbal 2\"\n\n# Percussion\n37: \"Side Stick\"\n39: \"Hand Clap\"\n54: \"Tambourine\"\n56: \"Cowbell\"\n58: \"Vibraslap\"\n60: \"Hi Bongo\"\n61: \"Low Bongo\"\n62: \"Mute Hi Conga\"\n63: \"Open Hi Conga\"\n64: \"Low Conga\"\n65: \"High Timbale\"\n66: \"Low Timbale\"\n67: \"High Agogo\"\n68: \"Low Agogo\"\n69: \"Cabasa\"\n70: \"Maracas\"\n71: \"Short Whistle\"\n72: \"Long Whistle\"\n73: \"Short Guiro\"\n74: \"Long Guiro\"\n75: \"Claves\"\n76: \"Hi Wood Block\"\n77: \"Low Wood Block\"\n78: \"Mute Cuica\"\n79: \"Open Cuica\"\n80: \"Mute Triangle\"\n81: \"Open Triangle\"\n```\n\n### How to Use Any Instrument (mido workflow)\n\nmusic21 has built-in classes for orchestral instruments (Violin, Piano, Trumpet, etc.) but NO support for synths, electronic instruments, or many others. To use any GM instrument:\n\n**CRITICAL RULE**: When you create a `stream.Part()` WITHOUT assigning a music21 instrument class, music21 WILL NOT create `program_change` messages in the MIDI file. You MUST use mido to INSERT these messages manually. Simply trying to modify them with `if msg.type == 'program_change': msg.program = X` will fail silently because no such messages exist!\n\n**Helper Function for Setting Instruments**:\n\n```python\nfrom mido import Message\n\ndef set_track_instrument(track, program):\n    \"\"\"Insert a program_change message at the beginning of a MIDI track.\"\"\"\n    insert_pos = 0\n    for j, msg in enumerate(track):\n        if msg.type == 'track_name':\n            insert_pos = j + 1\n            break\n    track.insert(insert_pos, Message('program_change', program=program, time=0))\n\n# Usage after loading MIDI with mido:\n# set_track_instrument(mid.tracks[2], 33)  # Set track 2 to Electric Bass\n```\n\n**Step 1: Compose with music21 (use placeholder or skip instrument)**\n```python\nfrom music21 import stream, note, chord, tempo\n\nscore = stream.Score()\n\n# Create parts - don't worry about instrument assignment yet\nsynth_lead = stream.Part()\nsynth_pad = stream.Part()\nbass = stream.Part()\n\n# Add your notes\u002Fchords\nsynth_lead.append(note.Note('E5', quarterLength=1.0))\n# ... compose your music\n\nscore.append(synth_lead)\nscore.append(synth_pad)\nscore.append(bass)\n\n# Export to MIDI\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.mid'\nscore.write('midi', fp=midi_path)\n```\n\n**Step 2: Assign correct instruments with mido**\n```python\nfrom mido import MidiFile, Message\n\nmid = MidiFile(midi_path)\n\n# Track 0 is tempo\u002Fmetadata, actual parts start at track 1\n# CRITICAL: You must INSERT program_change messages, not just modify existing ones!\n# music21 doesn't create program_change messages if you don't assign instruments\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # First part (synth_lead)\n        # Insert program_change at beginning of track (after track name if present)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=80, time=0))\n\n    elif i == 2:  # Second part (synth_pad)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=88, time=0))\n\n    elif i == 3:  # Third part (bass)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n\nmid.save(midi_path)\n```\n\n**Step 3: For drums, ALSO set channel to 9 (channel 10)**\n```python\n# If track is drums, set ALL messages to channel 9\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # This is the drum track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Channel 10 in 1-indexed\n```\n\n**Step 4: Render to audio**\n```python\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nwav_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.wav'\nfs.midi_to_audio(midi_path, wav_path)\n\naudio = AudioSegment.from_wav(wav_path)\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.mp3'\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Common Chord Progressions & Styles\n\n```python\n# Standard Progressions (Roman numerals)\n\"pop\": [\"I\", \"V\", \"vi\", \"IV\"]           # C-G-Am-F (Journey, Adele)\n\"epic\": [\"i\", \"VI\", \"III\", \"VII\"]       # Am-F-C-G (Epic trailer music)\n\"sad\": [\"i\", \"VI\", \"iv\", \"V\"]           # Am-F-Dm-E (Melancholic)\n\"jazz\": [\"ii\", \"V\", \"I\", \"vi\"]          # Dm-G-C-Am (Jazz standard)\n\"classical\": [\"I\", \"IV\", \"V\", \"I\"]      # C-F-G-C (Classical cadence)\n\"blues\": [\"I\", \"I\", \"I\", \"I\", \"IV\", \"IV\", \"I\", \"I\", \"V\", \"IV\", \"I\", \"I\"]  # 12-bar blues\n\"house\": [\"i\", \"VI\", \"III\", \"VII\"]      # Minor house progression\n\"reggae\": [\"I\", \"V\", \"vi\", \"IV\"]        # Offbeat rhythm style\n\"country\": [\"I\", \"IV\", \"V\", \"I\"]        # Simple and direct\n\"rock\": [\"I\", \"bVII\", \"IV\", \"I\"]        # Power chord style\n\"r&b\": [\"I\", \"V\", \"vi\", \"iii\", \"IV\", \"I\", \"IV\", \"V\"]  # Complex R&B\n\n# Genre-Specific Characteristics\nSTYLES = {\n    \"house\": {\n        \"bpm\": 120-128,\n        \"time_signature\": \"4\u002F4\",\n        \"drum_pattern\": \"4-on-floor kick, offbeat hats\",\n        \"bass\": \"Synth bass with groove\",\n        \"common_instruments\": [38, 80, 88, 4]  # Synth bass, lead, pad, e-piano\n    },\n    \"jazz\": {\n        \"bpm\": 100-180,\n        \"time_signature\": \"4\u002F4 or 3\u002F4\",\n        \"chords\": \"Extended (7th, 9th, 11th, 13th)\",\n        \"common_instruments\": [0, 32, 64, 56, 73]  # Piano, bass, sax, trumpet, drums\n    },\n    \"orchestral\": {\n        \"bpm\": 60-140,\n        \"sections\": [\"strings\", \"woodwinds\", \"brass\", \"percussion\"],\n        \"common_instruments\": [40, 41, 42, 56, 73, 47]  # Violin, viola, cello, trumpet, flute, timpani\n    },\n    \"rock\": {\n        \"bpm\": 100-140,\n        \"time_signature\": \"4\u002F4\",\n        \"guitars\": \"Distorted (30) or clean (27)\",\n        \"common_instruments\": [30, 33, 0, 128]  # Distortion guitar, bass, piano, drums\n    },\n    \"ambient\": {\n        \"bpm\": 60-90,\n        \"characteristics\": \"Long sustained notes, atmospheric pads\",\n        \"common_instruments\": [88, 89, 90, 91, 52]  # Various pads, choir\n    },\n    \"trap\": {\n        \"bpm\": 130-170,\n        \"drums\": \"Tight snare rolls, 808 bass kicks\",\n        \"hi_hats\": \"Fast hi-hat patterns (1\u002F16 or 1\u002F32 notes)\",\n        \"common_instruments\": [38, 128]  # Synth bass, drums\n    }\n}\n```\n\n### music21 Instrument Classes\n\n```python\nfrom music21 import instrument\n\n# Strings\ninstrument.Violin()\ninstrument.Viola()\ninstrument.Violoncello()  # Note: NOT Cello()\ninstrument.Contrabass()\ninstrument.Harp()\n\n# Piano\ninstrument.Piano()\ninstrument.Harpsichord()\n\n# Brass\ninstrument.Trumpet()\ninstrument.Trombone()\ninstrument.Tuba()\ninstrument.Horn()  # French horn\n\n# Woodwinds\ninstrument.Flute()\ninstrument.Clarinet()\ninstrument.Oboe()\ninstrument.Bassoon()\ninstrument.SopranoSaxophone()\ninstrument.AltoSaxophone()\ninstrument.TenorSaxophone()  # Most common for jazz\ninstrument.BaritoneSaxophone()\n\n# Other\ninstrument.AcousticGuitar()\ninstrument.ElectricGuitar()\ninstrument.Bass()\ninstrument.Timpani()\n\n# CRITICAL: music21 has LIMITED support for electronic instruments and drums\n# For synths, drums, and electronic sounds, you MUST:\n# 1. Create a Part without an instrument (or use a placeholder like Piano())\n# 2. Use mido library to INSERT program_change messages after export\n# 3. Set drums to MIDI channel 10 (channel 9 in 0-indexed) or they won't sound like drums\n#\n# Common mistakes:\n# - instrument.Cello() doesn't exist - use Violoncello()\n# - instrument.FrenchHorn() doesn't exist - use Horn()\n# - Setting part.partName doesn't change the sound - you must set MIDI program with mido\n# - Drums on channel 0 will play as pitched notes, not drum sounds\n```\n\n### Note Durations (Quarter Note = 1.0)\n\n- Whole note: 4.0\n- Half note: 2.0\n- Quarter note: 1.0\n- Eighth note: 0.5\n- Sixteenth note: 0.25\n- Dotted quarter: 1.5\n- Triplet quarter: 0.667\n\n### mido Quick Reference\n\nFor electronic music and drums, use `mido` to set MIDI programs after music21 export:\n\n```python\nfrom mido import MidiFile, Message\n\nmid = MidiFile(midi_path)\n\n# Insert program_change message\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Your track (tracks start at 1, not 0)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n\n# For drums: Set channel to 9 (channel 10 in 1-indexed)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drum track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9\n\nmid.save(midi_path)\n```\n\n**Common MIDI Programs:**\n- 38: Synth Bass 1\n- 80: Square Lead\n- 81: Sawtooth Lead\n- 88: Pad 1 (New Age)\n- 25: Acoustic Guitar (Steel) - loud, cuts through\n- 33: Acoustic Bass\n\n## Common Techniques\n\n### Drum Programming (4-on-floor house beat)\n\n**CRITICAL**: music21's `.append()` adds notes **sequentially** (one after another), not simultaneously. For layered drums where kicks, snares, and hats play at the same time, you MUST use `.insert(offset, note)` with explicit timing.\n\n**⚠️ ALWAYS USE .insert() FOR ALL TRACKS:**\n\nSince layering is needed for nearly all good music composition, you should **ALWAYS use .insert(offset, note) for ALL tracks** - drums, bass, guitar, pads, everything. This prevents timing bugs and ensures proper synchronization.\n\n**NEVER mix .insert() and .append()** - If you use `.insert()` for drums and `.append()` for other instruments, music21 will miscalculate track lengths and create tracks that are 5-10× longer than intended (8 minutes instead of 1.5 minutes), with only the first 20-25% containing actual sound.\n\n**The .append() method should only be used in rare cases where you have a single melodic line with no other instruments.**\n\n```python\n# WRONG: This plays kick, then 32 hats, then snare pattern (not layered!)\n# for beat in range(16):\n#     drums.append(note.Note(36, quarterLength=1.0))  # Kicks play first\n# for eighth in range(32):\n#     drums.append(note.Note(42, quarterLength=0.5))  # Hats play AFTER all kicks\n# # Result: Timing is completely wrong!\n\n# CORRECT: Use .insert() with explicit offsets for simultaneous layering\nbars = 32\nbeats_per_bar = 4\ntotal_beats = bars * beats_per_bar\n\n# Layer 1: Four-on-the-floor kicks (every beat)\nfor beat in range(total_beats):\n    offset = float(beat)  # Beat 0, 1, 2, 3, 4, 5, ...\n    drums.insert(offset, note.Note(36, quarterLength=1.0))\n\n# Layer 2: Snare on beats 2 and 4 of each bar\nfor bar in range(bars):\n    # Snare on beat 2 (second beat of bar)\n    offset = float(bar * beats_per_bar + 1)\n    drums.insert(offset, note.Note(38, quarterLength=1.0))\n\n    # Snare on beat 4 (fourth beat of bar)\n    offset = float(bar * beats_per_bar + 3)\n    drums.insert(offset, note.Note(38, quarterLength=1.0))\n\n# Layer 3: Hi-hats on eighth notes (every 0.5 beats) - creates groove\nfor bar in range(bars):\n    for eighth in range(8):  # 8 eighth notes per bar\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n\n        if eighth % 2 == 0:\n            # Closed hat on even eighths (on the beat)\n            drums.insert(offset, note.Note(42, quarterLength=0.5))\n        else:\n            # Open hat on odd eighths (offbeat) - signature house groove\n            drums.insert(offset, note.Note(46, quarterLength=0.5))\n\n# Result: Properly layered four-on-the-floor with offbeat open hats\n# Bar 0: Kicks at 0.0, 1.0, 2.0, 3.0\n#        Snares at 1.0, 3.0 (on top of kicks)\n#        Hats at 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5 (layered throughout)\n```\n\n### Reggae Specific Guidelines\n\n**CRITICAL**: Reggae has a **unique rhythmic identity** that requires precise drum patterns, offbeat accents, and heavy bass. If you don't follow these rules, it won't sound like reggae.\n\n**Drum Rules (Non-Negotiable)**:\n- **\"One Drop\" pattern**: Kick drum on beat 3 ONLY (not beat 1), creating the signature reggae \"drop\"\n- **Snare\u002FRimshot**: Beats 2 and 4 (or just beat 3 with the kick)\n- **Hi-hats**: OFFBEAT eighth notes only (never on the beat), creating the \"skank\" rhythm\n- **Cross-stick (note 37)**: Optional on beats 2 and 4 for classic sound\n- **NO four-on-floor kicks** - this is house\u002Felectronic, not reggae\n\n```python\n# CORRECT Reggae \"One Drop\" Drum Pattern\nbars = 32\nbeats_per_bar = 4\n\nfor bar in range(bars):\n    for beat in range(beats_per_bar):\n        offset = float(bar * beats_per_bar + beat)\n\n        # Kick ONLY on beat 3 (the \"drop\")\n        if beat == 2:  # Beat 3 in 0-indexed (0, 1, 2, 3)\n            drums_part.insert(offset, note.Note(36, quarterLength=1.0))\n\n        # Snare on beats 2 and 4\n        if beat == 1 or beat == 3:\n            drums_part.insert(offset, note.Note(38, quarterLength=1.0))\n\n    # OFFBEAT hi-hats (the \"skank\") - CRITICAL for reggae feel\n    for eighth in range(8):\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n        # ONLY odd eighths (offbeat) - never on the beat\n        if eighth % 2 == 1:  # 0.5, 1.5, 2.5, 3.5 (offbeat)\n            drums_part.insert(offset, note.Note(42, quarterLength=0.5))\n\n# WRONG - Four-on-floor (this is house, not reggae!)\n# for beat in range(total_beats):\n#     drums_part.insert(float(beat), note.Note(36, quarterLength=1.0))  # ❌ Kick on every beat\n```\n\n**Bass Rules (Non-Negotiable)**:\n- **Heavy and prominent** - Bass is the lead instrument in reggae\n- **Octave 1-2** (A1, C2, E2, F1, G1) - not too low, not too high\n- **Syncopated rhythm** - plays between beats, not just on downbeats\n- **Walking patterns** - moves between root, third, fifth of chords\n- **Quarter to half notes** (1.0-2.0 quarterLength) - NOT whole notes like House\n\n```python\n# CORRECT Reggae Bass (Am-D-F-G progression, 8-bar pattern)\n# This pattern has movement and syncopation - it \"walks\"\nbass_pattern = [\n    # Bar 1-2: Am (root A)\n    ('A1', 1.0), ('A1', 0.5), ('C2', 0.5), ('A1', 2.0),  # Bar 1\n    ('A1', 1.0), ('E2', 1.0), ('A1', 2.0),                # Bar 2\n\n    # Bar 3-4: D (root D)\n    ('D2', 1.0), ('D2', 0.5), ('F2', 0.5), ('D2', 2.0),  # Bar 3\n    ('D2', 1.0), ('A1', 1.0), ('D2', 2.0),                # Bar 4\n\n    # Bar 5-6: F (root F)\n    ('F1', 1.0), ('F1', 0.5), ('A1', 0.5), ('F1', 2.0),  # Bar 5\n    ('F1', 1.0), ('C2', 1.0), ('F1', 2.0),                # Bar 6\n\n    # Bar 7-8: G (root G, with E for resolution)\n    ('G1', 1.0), ('G1', 0.5), ('B1', 0.5), ('E2', 2.0),  # Bar 7\n    ('G1', 1.0), ('D2', 1.0), ('E2', 2.0),                # Bar 8\n]\n\n# Use .insert() to place bass notes at explicit offsets (synchronizes with drums)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for pitch, duration in bass_pattern:\n        bass_part.insert(offset, note.Note(pitch, quarterLength=duration))\n        offset += duration\n\n# WRONG - Using .append() will cause 8-minute tracks when mixed with .insert() drums\n# for pitch, duration in bass_pattern * (bars \u002F\u002F 8):\n#     bass_part.append(note.Note(pitch, quarterLength=duration))  # ❌ Causes timing bug!\n```\n\n**Guitar \"Skank\" Rules (Non-Negotiable)**:\n- **OFFBEAT chords only** - plays on upbeats (the \"and\" of beats), never downbeats\n- **CRITICAL: Sufficient duration** - Minimum 0.35-0.4 quarterLength (NOT 0.25) to be audible in mix\n- **Mid-register voicings** - Octaves 3-4 (A3, C4, E4)\n- **Muted\u002Fpercussive** - In real reggae, these are muted strums creating rhythm\n\n**⚠️ CRITICAL NOTE DURATION WARNING:**\n\nAt 0.25 quarterLength, guitar will be **completely inaudible** in the mix:\n- At 82 BPM: `(60 \u002F 82) × 0.25 = 0.183 seconds` (183 milliseconds)\n- Human perceptual threshold: ~200-300ms needed to register in dense mix\n- Organ plays at 0.5 (366ms) - TWICE as long\n\n**Use 0.4 quarterLength minimum:**\n- At 82 BPM: `(60 \u002F 82) × 0.4 = 0.293 seconds` (293 milliseconds)\n- Crosses perceptual threshold while maintaining staccato feel\n- Adjust rest to 0.1 to maintain 1.0 beat total per skank cycle\n\n```python\n# CORRECT Reggae Guitar \"Skank\" (offbeat chords with AUDIBLE duration)\nguitar_chords = [\n    ['A3', 'C4', 'E4'],    # Am\n    ['A3', 'C4', 'E4'],    # Am (repeat for 2 bars)\n    ['D3', 'F#3', 'A3'],   # D\n    ['D3', 'F#3', 'A3'],   # D (repeat for 2 bars)\n    ['F3', 'A3', 'C4'],    # F\n    ['F3', 'A3', 'C4'],    # F (repeat for 2 bars)\n    ['G3', 'B3', 'D4'],    # G\n    ['G3', 'B3', 'D4'],    # G (repeat for 2 bars)\n]\n\n# Use .insert() to place guitar at explicit offsets (synchronizes with drums\u002Fbass)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for chord_notes in guitar_chords:\n        # Each bar: 4 offbeat skanks\n        for beat in range(4):\n            # REST on the beat (downbeat)\n            guitar_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n            # CHORD on the offbeat (upbeat) - 0.4 duration for audibility\n            guitar_part.insert(offset, chord.Chord(chord_notes, quarterLength=0.4))\n            offset += 0.4\n            # SHORT REST after chord (creates staccato effect)\n            guitar_part.insert(offset, note.Rest(quarterLength=0.1))\n            offset += 0.1\n\n# WRONG - Using .append() causes 8-minute tracks when mixed with .insert() drums\n# guitar_part.append(chord.Chord(chord_notes, quarterLength=0.4))  # ❌ Causes timing bug!\n\n# WRONG - Duration too short (will be inaudible!)\n# guitar_part.insert(offset, chord.Chord(chord_notes, quarterLength=0.25))  # ❌ Only 183ms @ 82 BPM\n```\n\n**Organ \"Bubble\" Rules**:\n- **Alternating on-and-off pattern** - Creates rhythmic \"bubbling\" effect\n- **Higher register** (octaves 4-5) - Sits above guitar\n- **Plays same chords as guitar** but different rhythm\n- **Shorter duration** (0.5 quarterLength) with rests between\n\n```python\n# CORRECT Reggae Organ \"Bubble\"\norgan_chords = [\n    ['A4', 'C5', 'E5'],    # Am (high register)\n    ['A4', 'C5', 'E5'],\n    ['D4', 'F#4', 'A4'],   # D\n    ['D4', 'F#4', 'A4'],\n    ['F4', 'A4', 'C5'],    # F\n    ['F4', 'A4', 'C5'],\n    ['G4', 'B4', 'D5'],    # G\n    ['G4', 'B4', 'D5'],\n]\n\n# Use .insert() to place organ at explicit offsets (synchronizes with drums\u002Fbass\u002Fguitar)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for organ_chord in organ_chords:\n        # Each bar: bubble pattern (chord, rest, chord, rest)\n        for _ in range(2):  # Twice per bar\n            organ_part.insert(offset, chord.Chord(organ_chord, quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, chord.Chord(organ_chord, quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n\n# WRONG - Using .append() causes 8-minute tracks when mixed with .insert() drums\n# organ_part.append(chord.Chord(organ_chord, quarterLength=0.5))  # ❌ Causes timing bug!\n```\n\n**Reggae Instruments (MIDI Programs)**:\n- **Drums**: Channel 9 (MIDI channel 10) - ALWAYS required\n- **Bass**: Program 33 (Electric Bass - finger) or 34 (Electric Bass - pick)\n- **Guitar**:\n  - **PRIMARY: Program 25 (Acoustic Guitar - steel)** - Bright, percussive, cuts through mix\n  - Alternative: Program 28 (Electric Guitar - muted) - Percussive skank sound\n  - **⚠️ AVOID: Program 27 (Electric Guitar - clean)** - Recorded 12-15dB quieter in FluidR3_GM, will be inaudible even at velocity 95\n- **Organ**: Program 16 (Drawbar Organ) or 17 (Percussive Organ)\n\n**Setting Instruments with mido (CRITICAL)**:\n\nSince reggae Parts don't use music21 instrument classes, you MUST use mido to INSERT program_change messages:\n\n```python\nfrom mido import MidiFile, Message\n\n# After score.write('midi', fp=midi_path)\nmid = MidiFile(midi_path)\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Drums on channel 9\n    elif i == 2:  # Bass track\n        # INSERT program_change message (don't try to modify - it doesn't exist!)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=33, time=0))\n    elif i == 3:  # Guitar track\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=25, time=0))  # Acoustic steel - bright and audible\n    elif i == 4:  # Organ track\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=16, time=0))\n\nmid.save(midi_path)\n```\n\n**Mixing and Balance (CRITICAL - Guitar Will Be Inaudible Without This!)**:\n\nSetting the correct instrument programs and velocities is NOT enough. In reggae, the **guitar will still be completely inaudible** if you don't address THREE issues:\n\n1. **Soundfont level**: Program 27 (Electric Guitar - clean) recorded 12-15dB quieter than program 16 (Drawbar Organ) in FluidR3_GM\n2. **Note duration**: 0.25 quarterLength = 183ms @ 82 BPM (below perceptual threshold)\n3. **Velocity difference**: Need 40+ point separation\n\n**Complete Solution**:\n```python\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\n# After setting instruments, BEFORE saving\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 70)\n    elif i == 2:  # Bass - prominent in reggae\n        set_track_velocity(track, 80)\n    elif i == 3:  # Guitar - RHYTHM INSTRUMENT, needs to cut through\n        # Use program 25 (steel acoustic) instead of 27 (too quiet)\n        # Use 0.4 quarterLength instead of 0.25 (too short)\n        set_track_velocity(track, 95)  # LOUD - this is critical!\n    elif i == 4:  # Organ - BACKGROUND atmosphere\n        set_track_velocity(track, 55)  # QUIET - don't overpower guitar\n\nmid.save(midi_path)\n```\n\n**Why this THREE-PART solution works**:\n- **Program 25 (Acoustic Guitar - steel)**: Recorded 8-10dB louder than program 27, bright harmonics, percussive attack\n- **Duration 0.4 (293ms)**: Crosses perceptual threshold vs 0.25 (183ms) which is too short\n- **Velocity 95 vs 55**: 40-point difference creates clear separation\n- **Combined effect**: Guitar now has 3× more presence (program × duration × velocity)\n\n**Tempo**: 70-90 BPM (classic roots reggae: 80-85 BPM, modern: 85-90 BPM)\n\n**Common Mistakes**:\n- Creating `drums_part` but calling `drums.insert()` - use correct variable name\n- Trying to MODIFY `program_change` messages that don't exist - must INSERT them\n- Not setting drums to channel 9 - drums will sound like melody notes\n- **CRITICAL: Using program 27 (too quiet) instead of program 25**\n- **CRITICAL: Using 0.25 quarterLength (too short) instead of 0.4**\n- **CRITICAL: Not setting velocities - guitar will be completely inaudible, organ will dominate**\n\n### House Specific Guidelines\n\n**CRITICAL**: House requires **extreme repetition** and **minimal variation** to create the hypnotic, groovy feel. Standard composition rules don't apply.\n\n**Bass Rules (Non-Negotiable)**:\n- **ONE NOTE** held for 8-16 bars minimum (32.0-64.0 quarterLength)\n- **Octave 1-2 RANGE** (A1, C2, E2, F1, G1) - the actual bass guitar range (55-110 Hz)\n- **NEVER use octave 0** (A0, F0, G0, etc.) - these are 20-30 Hz sub-sonic frequencies inaudible on 99% of playback systems (laptop speakers, headphones, even many studio monitors can't reproduce them)\n- **Whole notes or longer** (4.0+ quarterLength minimum, prefer 32.0+)\n- **Simple patterns**: Root for 8 bars → Fifth for 8 bars → repeat\n- **NO octave jumps**, **NO busy basslines**, **NO quarter notes**\n\n```python\n# CORRECT House Bass (audible on all playback systems)\nbass_pattern = [\n    ('A1', 32.0),  # A for 8 bars - 55 Hz (bass guitar's lowest note)\n    ('E2', 32.0),  # E for 8 bars - 82 Hz (bass guitar's open E string)\n    ('F1', 32.0),  # F for 8 bars - 43.7 Hz\n    ('C2', 32.0),  # C for 8 bars - 65.4 Hz\n]\nfor pitch, duration in bass_pattern:\n    bass_part.append(note.Note(pitch, quarterLength=duration))\n\n# WRONG - Octave 0 is inaudible on most systems!\nbass_notes = ['A0', 'F0', 'C1', 'G0']  # ❌ 20-35 Hz - below hearing\u002Fspeaker range!\nfor bar in range(8):\n    bass_part.append(note.Note(bass_notes[bar % 4], quarterLength=32.0))  # ❌ Inaudible!\n\n# ALSO WRONG - Too busy, octave jumps\nbass_notes = ['A1', 'A2', 'C2', 'F1']  # ❌ Octave jumps\nfor bar in range(32):\n    bass_part.append(note.Note(bass_notes[bar % 4], quarterLength=1.0))  # ❌ Too short!\n```\n\n**Pad Rules**:\n- **ONE CHORD** held for 8-16 bars (32.0-64.0 quarterLength)\n- **Mid-range octaves** (2-4): A2, C3, E3 voicings\n- **Long attack\u002Frelease** for smooth transitions\n- Change chords rarely (every 8-16 bars, not every 4 bars)\n\n```python\n# CORRECT House Pads\npad_progression = [\n    (['A2', 'C3', 'E3'], 64.0),  # Am for 16 bars\n    (['F2', 'A2', 'C3'], 64.0),  # F for 16 bars\n]\nfor chord_notes, duration in pad_progression:\n    pad_part.append(chord.Chord(chord_notes, quarterLength=duration))\n```\n\n**Lead Rules**:\n- **Sparse** - only play every 4-8 bars, lots of silence\n- **Long notes** (4.0-16.0 quarterLength)\n- **Enter late** (bar 16+, not immediately)\n- **Mid octaves** (A4, C5, E5 max)\n\n```python\n# CORRECT House Lead (enters bar 16)\nlead_pattern = [\n    ('A4', 8.0),   # 2 bars\n    ('C5', 8.0),   # 2 bars\n    ('E5', 16.0),  # 4 bars\n]\n```\n\n**Core Principle**: If it feels repetitive, you're doing it right. House = **hypnotic loop** repeated for minutes with **minimal changes**.\n\n**Mixing and Balance**:\n\nIn House, the bass is the star. But if you don't control velocities, the pads and leads will overpower everything:\n\n```python\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\n# After setting instruments with mido\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 90)  # Driving rhythm\n    elif i == 2:  # Bass (program 38, octaves 1-2)\n        set_track_velocity(track, 75)  # Prominent but not overpowering\n    elif i == 3:  # Pad (program 88, octaves 2-4)\n        set_track_velocity(track, 50)  # Atmospheric background\n    elif i == 4:  # Lead (program 80, octaves 4-5)\n        set_track_velocity(track, 95)  # Melodic focus (when present)\n\nmid.save(midi_path)\n```\n\n### Bassline Patterns\n\n```python\n# Groovy syncopated house bass\nbass_pattern = [\n    ('A1', 1.0),      # Downbeat\n    ('A1', 0.5),      # Short hit\n    ('rest', 0.25),   # Space\n    ('A1', 0.25),     # Syncopation\n    ('A2', 0.5),      # Octave jump\n    ('C2', 0.5),      # Chord tone\n    ('A1', 1.0)       # Resolution\n]\n\nfor pitch, duration in bass_pattern:\n    if pitch == 'rest':\n        bass_part.append(note.Rest(quarterLength=duration))\n    else:\n        bass_part.append(note.Note(pitch, quarterLength=duration))\n```\n\n### Chord Voicings\n\n```python\n# Jazz voicing (7th chords)\njazz_chords = [\n    ['C4', 'E4', 'G4', 'B4'],   # Cmaj7\n    ['D4', 'F4', 'A4', 'C5'],   # Dm7\n    ['G3', 'B3', 'D4', 'F4']    # G7\n]\n\n# House pad voicing (open, atmospheric)\nhouse_pads = [\n    ['A3', 'C4', 'E4'],         # Am\n    ['F3', 'A3', 'C4'],         # F\n    ['C3', 'E3', 'G3']          # C\n]\n\n# Classical voicing (close position)\nclassical_chords = [\n    ['C4', 'E4', 'G4'],         # C major\n    ['B3', 'D4', 'G4'],         # G major\n    ['C4', 'F4', 'A4']          # F major\n]\n```\n\n### Melody Construction\n\n```python\n# Pentatonic scale (versatile, no \"wrong\" notes)\npentatonic_c = ['C', 'D', 'E', 'G', 'A']\n\n# Major scale\nmajor_c = ['C', 'D', 'E', 'F', 'G', 'A', 'B']\n\n# Minor scale\nminor_a = ['A', 'B', 'C', 'D', 'E', 'F', 'G']\n\n# Blues scale\nblues_c = ['C', 'Eb', 'F', 'F#', 'G', 'Bb']\n\n# Generate melody algorithmically\nfor i in range(16):\n    octave = 4 + (i \u002F\u002F 8)  # Move up octave halfway through\n    scale_degree = i % len(pentatonic_c)\n    pitch = pentatonic_c[scale_degree] + str(octave)\n    melody.append(note.Note(pitch, quarterLength=0.5))\n```\n\n### Dynamic Control (Crescendos, Volume Changes)\n\n```python\nfrom music21 import dynamics\n\n# Set initial volume\npart.insert(0, dynamics.Dynamic('p'))   # Piano (soft)\n\n# Add crescendo at bar 8\npart.insert(32, dynamics.Crescendo())   # 32 quarter notes = 8 bars\n\n# Peak at bar 10\npart.insert(40, dynamics.Dynamic('ff'))  # Fortissimo (very loud)\n\n# Decrescendo\npart.insert(60, dynamics.Diminuendo())\n\n# Return to soft\npart.insert(72, dynamics.Dynamic('p'))\n\n# Dynamic markings: ppp, pp, p, mp, mf, f, ff, fff\n```\n\n### Timing & Tempo\n\n```python\n# Set tempo (BPM)\npart.insert(0, tempo.MetronomeMark(number=120))  # 120 BPM\n\n# Tempo changes\npart.insert(32, tempo.MetronomeMark(number=140))  # Speed up at bar 8\n\n# Timing variations (humanization)\nimport random\nnote.Note('C5', quarterLength=1.0 + random.uniform(-0.05, 0.05))\n\n# Common time signatures (set on first part)\nfrom music21 import meter\npart.insert(0, meter.TimeSignature('4\u002F4'))  # Most common\npart.insert(0, meter.TimeSignature('3\u002F4'))  # Waltz\npart.insert(0, meter.TimeSignature('6\u002F8'))  # Compound meter\n```\n\n## Complete Example: Deep House Track\n\n```python\nfrom music21 import stream, note, chord, tempo\nfrom mido import MidiFile\nimport subprocess\n\n# 1. Compose with music21\nscore = stream.Score()\ndrums = stream.Part()\nbass_part = stream.Part()\npad_part = stream.Part()\nlead_part = stream.Part()\n\n# Set tempo\ndrums.insert(0, tempo.MetronomeMark(number=122))\n\n# Add drums using .insert() for proper layering (not .append()!)\nbars = 32\nbeats_per_bar = 4\n\n# Layer 1: Four-on-the-floor kicks\nfor bar in range(bars):\n    for beat in range(beats_per_bar):\n        offset = float(bar * beats_per_bar + beat)\n        drums.insert(offset, note.Note(36, quarterLength=1.0))\n\n# Layer 2: Snare on beats 2 and 4 of each bar\nfor bar in range(bars):\n    drums.insert(float(bar * beats_per_bar + 1), note.Note(38, quarterLength=1.0))  # Beat 2\n    drums.insert(float(bar * beats_per_bar + 3), note.Note(38, quarterLength=1.0))  # Beat 4\n\n# Layer 3: Hi-hats on eighth notes (offbeat open hats for groove)\nfor bar in range(bars):\n    for eighth in range(8):\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n        if eighth % 2 == 0:\n            drums.insert(offset, note.Note(42, quarterLength=0.5))  # Closed hat\n        else:\n            drums.insert(offset, note.Note(46, quarterLength=0.5))  # Open hat (offbeat)\n\n# House BASS: Long sustained notes using .insert() (NOT .append())\nbass_offset = 0.0\nbass_pattern = [\n    ('A1', 32.0),  # A root for 8 bars - 55 Hz (audible on all systems)\n    ('E2', 32.0),  # E fifth for 8 bars - 82 Hz\n    ('F1', 32.0),  # F for 8 bars - 43.7 Hz\n    ('C2', 32.0),  # C for 8 bars - 65.4 Hz\n]\n\nfor pitch, duration in bass_pattern:\n    bass_part.insert(bass_offset, note.Note(pitch, quarterLength=duration))\n    bass_offset += duration\n\n# House PADS: Long sustained chords using .insert() (NOT .append())\npad_offset = 0.0\npad_progression = [\n    (['A2', 'C3', 'E3'], 64.0),  # Am for 16 bars\n    (['F2', 'A2', 'C3'], 64.0),  # F for 16 bars\n]\n\nfor chord_notes, duration in pad_progression:\n    pad_part.insert(pad_offset, chord.Chord(chord_notes, quarterLength=duration))\n    pad_offset += duration\n\n# House LEAD: Sparse, long notes, enters late using .insert() (NOT .append())\nlead_pattern = [\n    ('A4', 8.0),   # 2 bars\n    ('C5', 8.0),   # 2 bars\n    ('E5', 16.0),  # 4 bars (long sustain)\n]\n\n# Lead enters at bar 16 (64 beats in)\nlead_offset = 64.0\nfor pitch, duration in lead_pattern:\n    lead_part.insert(lead_offset, note.Note(pitch, quarterLength=duration))\n    lead_offset += duration\n\nscore.append(drums)\nscore.append(bass_part)\nscore.append(pad_part)\nscore.append(lead_part)\n\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house_track.mid'\nscore.write('midi', fp=midi_path)\n\n# 2. Fix instruments with mido (INSERT program_change messages)\nfrom mido import Message\nmid = MidiFile(midi_path)\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Drums must be on channel 9\n    elif i == 2:  # Bass track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n    elif i == 3:  # Pad track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=88, time=0))\n    elif i == 4:  # Lead track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=81, time=0))\n\nmid.save(midi_path)\n\n# 3. Render with ELECTRONIC pipeline with deep_house preset!\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house_track.mp3'\n\nresult = subprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    mp3_path,\n    '--genre', 'deep_house'\n], capture_output=True, text=True)\n\nprint(result.stdout)\nif result.returncode == 0:\n    print(f\"✓ House track created: {mp3_path}\")\nelse:\n    print(f\"Error: {result.stderr}\")\n```\n\n**House Characteristics in This Example:**\n- **Bass**: ONE note (A1, E2, F1, C2) held for 8 bars each - deep bass in octave 1-2 (55-82 Hz range, audible on all playback systems)\n- **Pads**: ONE chord held for 16 bars - extreme sustain creates hypnotic atmosphere\n- **Lead**: Sparse (enters bar 16), long notes (2-4 bars each) - not busy\n- **Repetition**: Minimal variation = hypnotic, groovy House feel\n- Uses `render_electronic.py` with `deep_house` preset for warm, subby synthesis\n- Bass synthesized with proper low-end frequencies that consumer audio equipment can reproduce\n- Pads use slow attack (0.9s) and long release (1.2s) for smooth transitions\n- Genre preset automatically tunes all synthesis parameters\n- No external samples or soundfonts needed - fully self-contained\n\n## Best Practices\n\n### Composition Quality\n- **Generate variety**: Don't repeat the same 4 bars for entire piece\n- **Use music theory**: Real chord progressions, proper voice leading\n- **Respect instrument ranges**: Violin (G3-E7), Cello (C2-C6), Trumpet (E3-C6)\n- **Add dynamics**: Use p, mp, mf, f, ff markings and crescendos\n- **Structure**: Intro → Development → Climax → Resolution\n- **Add humanization**: Vary timing and velocity to avoid robotic sound\n  ```python\n  import random\n  n = note.Note('C5', quarterLength=1.0 + random.uniform(-0.05, 0.05))\n  n.volume.velocity = 80 + random.randint(-5, 5)\n  ```\n\n### Technical Quality\n- **SoundFont**: Use FluidR3_GM.sf2 for best quality\n- **Bitrate**: 192kbps minimum, 320kbps for high quality\n- **Timing precision**: Use quarterLength values carefully\n- **Cleanup**: Remove temporary MIDI\u002FWAV files after MP3 conversion\n\n### Common Pitfalls\n- **CRITICAL: Always use .insert() for ALL tracks** - Never mix `.insert()` and `.append()`. See \"Drum Programming\" section for details\n- **CRITICAL: INSERT program_change messages** - Use `track.insert(pos, Message('program_change', ...))` not `msg.program = X`. See mido Quick Reference\n- **CRITICAL: Set velocities** - Lead 90-105, background 50-65. See \"Mixing and Balance\" section\n- **CRITICAL: Bass octaves** - Use A1-A2 (55-110 Hz), never A0-G0 (inaudible on most systems)\n- **instrument.Cello()** doesn't exist - use `Violoncello()`\n- **Forgetting tempo** - Add `tempo.MetronomeMark()` to first part\n- **Drums not sounding like drums** - Set channel to 9 with mido (see mido Quick Reference)\n\n## Mixing and Balance\n\n**CRITICAL**: Setting MIDI program numbers alone is not enough. Without explicit velocity control, some instruments will be **completely inaudible**.\n\n### Setting Velocities\n\nmusic21 uses default velocity 64 for all notes, which causes poor mixing. Use mido to set velocities after MIDI export:\n\n```python\nfrom mido import MidiFile\n\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\nmid = MidiFile(midi_path)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 75)\n    elif i == 2:  # Bass\n        set_track_velocity(track, 80)\n    elif i == 3:  # Lead instrument (sax, guitar, trumpet)\n        set_track_velocity(track, 95)\n    elif i == 4:  # Background (organ, pads)\n        set_track_velocity(track, 55)\nmid.save(midi_path)\n```\n\n### Velocity Guidelines\n\n**By Role:**\n- Lead instruments (melody, solos): **90-105**\n- Rhythm instruments (guitar skanks, comping): **85-100**\n- Bass: **75-85**\n- Drums: **70-90**\n- Background (pads, organs): **50-65**\n\n**By Frequency Range:**\n- **Low (20-250 Hz)**: Bass, kick - only ONE dominant at 75-85\n- **Mid (250-2000 Hz)**: Most crowded - use velocity to separate (lead 90+, background 50-65)\n- **High (2000+ Hz)**: Hi-hats, cymbals - 70-85 for clarity without harshness\n\n### Soundfont Level Issues\n\nFluidR3_GM instruments are recorded at different levels. Even with correct velocities, some instruments may be inaudible:\n\n**Quiet programs** (avoid for lead\u002Frhythm):\n- Program 27 (Electric Guitar - clean) - Very quiet\n- Program 24 (Acoustic Guitar - nylon)\n- Program 73 (Flute)\n\n**Better alternatives**:\n- Program 25 (Acoustic Guitar - steel) - 8-10dB louder, cuts through\n- Program 28 (Electric Guitar - muted) - Percussive\n- Program 30 (Distortion Guitar) - Aggressive\n\n**Additional fixes:**\n- Increase note duration (0.4 quarterLength minimum vs 0.25)\n- Use octave separation (move competing instruments to different octaves)\n- Extreme velocity contrast (quiet instrument at 110, loud at 40)\n\n### Mixing Checklist\n\nBefore rendering:\n- ✅ Lead at velocity 90-105\n- ✅ Background at velocity 50-65\n- ✅ Bass at velocity 75-85\n- ✅ Check for quiet instruments (programs 24, 27, 73) and use alternatives\n- ✅ Minimum 0.4 quarterLength for rhythm instruments\n\n## Resources\n\n- **music21 Documentation**: https:\u002F\u002Fweb.mit.edu\u002Fmusic21\u002Fdoc\u002F\n- **General MIDI Spec**: https:\u002F\u002Fwww.midi.org\u002Fspecifications-old\u002Fitem\u002Fgm-level-1-sound-set\n- **Music Theory**: https:\u002F\u002Fwww.musictheory.net\u002F\n- **IMSLP (Free Scores)**: https:\u002F\u002Fimslp.org\u002F - Download classical MIDIs here!\n\n## Limitations\n\n- **Instrumental only** - No lyrics\u002Fvocals\n- **MIDI-based synthesis** - Not studio-quality recordings\n- **No real-time playback** - Files must be rendered before playback\n- **SoundFont quality** - Good but not as realistic as sample libraries\n\n## When to Use This Skill\n\n✅ User requests:\n- Original compositions with specific moods\u002Fstyles\n- Classical music in MP3 format\n- Timed music for videos\u002Fpresentations\n- Specific instrumentation (orchestral, piano, strings, etc.)\n- Dynamic music with crescendos, tempo changes\n\n❌ Not suitable for:\n- Vocal\u002Flyrical music\n- Audio mixing\u002Fmastering (reverb, EQ, compression)\n- Real-time MIDI playback\n- Professional studio recording quality","## Quick Start (Read This First!)\n\n**IMPORTANT: This file is located at `\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002FSKILL.md`**\n\nIf you need to reference this skill again during your session, read that exact path directly. Do not explore directories or use find commands - just read the file path above.\n\n## Philosophy\n\nThis skill provides **tools and patterns** for music composition, not pre-baked solutions. You should use your intelligence and the music21 library to compose dynamically based on user requests.\n\n**Core Principle**: Write custom code that composes music algorithmically rather than calling functions with hardcoded melodies.\n\n## Installation & Setup\n\n### Quick Installation\n\nRun the automated installer for complete setup:\n\n```bash\nbash \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Finstall.sh\n```\n\nThis installs all system dependencies, Python packages, and verifies the installation.\n\n**Note:** The install script may display \"error: externally-managed-environment\" messages at the end. These are expected and can be safely ignored - the dependencies are already installed. If you see these messages, the installation was successful.\n\n### Manual Installation\n\nAlternatively, install dependencies manually:\n\n**System Dependencies:**\n```bash\napt-get update\napt-get install -y fluidsynth fluid-soundfont-gm fluid-soundfont-gs ffmpeg\n```\n\n**Python Dependencies:**\n```bash\npip install -r \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Frequirements.txt\n```\n\nThe `requirements.txt` includes: music21, midi2audio, pydub, mido, numpy, scipy.\n\n### Available SoundFonts\n\n**Traditional Pipeline (Orchestral\u002FAcoustic):**\n- `\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2` (141MB, General MIDI soundfont for orchestral\u002Fclassical)\n- `\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002Fdefault.sf2` (symlink to best available)\n\n**Electronic Pipeline:**\n- No soundfonts required - uses real-time synthesis for all electronic sounds\n\n## Quick Start: Write Custom Compositions\n\n### Basic Music Generation Pattern\n\n```python\nfrom music21 import stream, note, chord, instrument, tempo, dynamics\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\n# 1. Create score and parts\nscore = stream.Score()\nviolin_part = stream.Part()\nviolin_part.insert(0, instrument.Violin())\nviolin_part.insert(0, tempo.MetronomeMark(number=120))\n\n# 2. Generate notes algorithmically\nfor measure in range(16):\n    violin_part.append(note.Note('E5', quarterLength=1.0))\n    violin_part.append(note.Note('G5', quarterLength=1.0))\n    violin_part.append(note.Note('A5', quarterLength=2.0))\n\n# 3. Export to MIDI\nscore.append(violin_part)\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.mid'\nscore.write('midi', fp=midi_path)\n\n# 4. Render with FluidSynth\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nwav_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.wav'\nfs.midi_to_audio(midi_path, wav_path)\n\n# 5. Convert to MP3\naudio = AudioSegment.from_wav(wav_path)\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fcomposition.mp3'\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Key Concepts\n\n- **Always create downloadable MP3 files** (not HTML players)\n- **All output goes to** `\u002Fmnt\u002Fuser-data\u002Foutputs\u002F`\n- **Use music21.instrument classes**: `instrument.Violin()`, `instrument.Violoncello()`, `instrument.Piano()`, `instrument.Trumpet()`, etc.\n- **Generate notes programmatically** - avoid hardcoded sequences\n\n## Choosing the Right Rendering Pipeline\n\n**CRITICAL**: This skill supports TWO rendering pipelines. You MUST choose based on the musical genre:\n\n### Traditional Pipeline (Orchestral, Classical, Acoustic)\n\n**Use when creating:**\n- Orchestral music (violin, cello, trumpet, etc.)\n- Classical compositions (Mozart, Beethoven style)\n- Piano music, chamber music, symphonies\n- Acoustic guitar, brass ensembles\n- Any music with traditional\u002Facoustic instruments\n\n**How to render:**\n```python\n# After composing with music21 and exporting MIDI...\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nfs.midi_to_audio(midi_path, wav_path)\n\naudio = AudioSegment.from_wav(wav_path)\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Electronic Pipeline (House, Techno, EDM, Electronic)\n\n**Use when creating:**\n- House, techno, trance, EDM\n- Electronic dance music with synth bass\u002Fpads\u002Fleads\n- DJ beats, club music\n- Any music described as \"electronic\" or \"synth-heavy\"\n- Music referencing DJs like Keinemusik, Black Coffee, etc.\n\n**How to render:**\n```python\n# After composing with music21, using mido for instruments, and exporting MIDI...\nimport subprocess\n\n# Use the electronic rendering script\nresult = subprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    mp3_path\n], capture_output=True, text=True)\n\nprint(result.stdout)\nif result.returncode != 0:\n    print(f\"Error: {result.stderr}\")\n```\n\n**Why this matters:**\n- The orchestral soundfont (FluidR3_GM.sf2) sounds **terrible** for electronic music\n- Its \"synth\" instruments are basic 1990s approximations\n- The electronic pipeline uses **real-time synthesis** for authentic electronic sound\n- Synthesizes 808-style kicks, electronic snares, and hi-hats on-the-fly (NO external samples required)\n- Bass\u002Fpads\u002Fleads use subtractive synthesis with filters and ADSR envelopes\n- Genre presets (deep_house, techno, trance, ambient) tune synthesis parameters automatically\n\n**Drum Synthesis:**\n\nThe electronic renderer uses **real-time drum synthesis** (no external samples needed). All drum sounds (kicks, snares, hi-hats, claps) are synthesized on-the-fly with genre-specific parameters.\n\n**Example: House Track**\n```python\n# 1. Compose with music21 (same as always)\nscore = stream.Score()\ndrums = stream.Part()\nbass = stream.Part()\npads = stream.Part()\n# ... compose your music\n\n# 2. Export MIDI\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house.mid'\nscore.write('midi', fp=midi_path)\n\n# 3. Fix instruments with mido (INSERT program_change messages)\nfrom mido import MidiFile, Message\nmid = MidiFile(midi_path)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9\n    elif i == 2:  # Bass - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\nmid.save(midi_path)\n\n# 4. Render with ELECTRONIC pipeline with deep_house preset!\nimport subprocess\nsubprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house.mp3',\n    '--genre', 'deep_house'\n])\n```\n\n### Available Genre Presets\n\nThe electronic renderer includes pre-tuned synthesis presets with **supersaw lead synthesis** for thick, professional EDM sounds:\n\n- **deep_house**: Warm bass with 3-voice leads (120-125 BPM)\n- **techno**: Hard-hitting with 7-voice supersaw leads (125-135 BPM)\n- **trance**: Uplifting with massive 9-voice supersaw leads (130-140 BPM)\n- **ambient**: Soft, atmospheric with 5-voice pads (60-90 BPM)\n- **acid_house**: Squelchy TB-303 bass with 5-voice leads (120-130 BPM)\n- **default**: Balanced 5-voice leads (120-130 BPM)\n\n**Supersaw Synthesis (Swedish House Mafia \u002F Progressive House Sound):**\n\nThe electronic renderer now includes **unison voice synthesis** for fat, buzzy leads:\n- **Multiple detuned oscillators**: 3-9 sawtooth waves per note (genre-dependent)\n- **Aggressive detuning**: 6-15 cents spread creates buzzy chorus effect\n- **Enhanced saturation**: 2.5x distortion for punch and aggression\n- **Phase spreading**: Creates wide stereo image\n\n**How It Works:**\n- House: 3 voices, ±8 cents (subtle, warm)\n- Techno: 7 voices, ±12 cents (aggressive, punchy)\n- Trance: 9 voices, ±15 cents (massive, soaring)\n- Acid house: 5 voices, ±12 cents (squelchy, aggressive)\n\nThis replicates the classic supersaw sound from Swedish House Mafia, Avicii, and modern EDM productions.\n\nEach preset tunes:\n- **Drum synthesis**: kick pitch\u002Fdecay\u002Fpunch, snare tone\u002Fsnap, hat brightness\u002Fmetallic\n- **Bass synthesis**: waveform, filter cutoff\u002Fresonance, ADSR envelope\n- **Pad synthesis**: attack\u002Frelease times, detune amount, brightness\n- **Lead synthesis**: brightness, envelope, portamento\n- **Volume balance**: intelligent mix levels per instrument with frequency-aware compensation\n- **Velocity curves**: exponential, linear, or logarithmic response to MIDI velocity\n\n### Intelligent Volume Management\n\nThe electronic renderer uses **frequency-aware volume balancing** to prevent any instrument from overpowering the mix:\n\n**How it works:**\n- **Bass frequencies (\u003C100Hz)**: Automatically reduced by -4 to -6dB (sub-bass has high perceived energy)\n- **Mid frequencies (200-800Hz)**: Balanced naturally\n- **High frequencies (>800Hz)**: Slightly boosted for clarity (+1 to +1.5dB)\n- **Genre-specific balance**: Each preset has optimized levels (e.g., House bass gets -3dB)\n- **Velocity curves**: MIDI velocity maps intelligently (not just linear)\n- **Auto-limiting**: Final mix is limited to -1dB to prevent clipping\n\n**Why this matters:**\n- House bass (A1, E2) at 55-82Hz naturally has more power - now automatically compensated\n- Prevents \"bass overpowering everything\" issues\n- Maintains balanced mix across all genres\n- No manual volume tweaking needed\n\nTo see all available presets:\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py --list-genres\n```\n\n### Customizing Synthesis Parameters\n\nFor advanced control, you can create custom preset JSON files:\n\n```json\n{\n  \"drums\": {\n    \"kick\": {\"pitch\": 52.0, \"decay\": 0.6, \"punch\": 0.9},\n    \"snare\": {\"tone_mix\": 0.25, \"snap\": 0.8}\n  },\n  \"bass\": {\n    \"waveform\": \"sawtooth\",\n    \"cutoff\": 180,\n    \"resonance\": 0.7\n  },\n  \"pad\": {\n    \"attack\": 1.0,\n    \"brightness\": 0.35\n  }\n}\n```\n\nThen use with `--preset`:\n```bash\npython render_electronic.py track.mid output.mp3 --preset my_preset.json\n```\n\n## Advanced Workflow: Learn from Existing MIDI\n\nFor classical pieces or complex compositions, you can:\n\n### 1. Extract Structure from ANY MIDI File\n\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Fmidi_inventory.py \\\n    path\u002Fto\u002Fmozart.mid \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_structure.json\n```\n\nThis extracts:\n- Tempo, key signature, time signature\n- Track information and instruments\n- Complete note sequences with timing\n- Musical structure\n\n### 2. Modify the JSON Structure\n\n```python\nimport json\n\n# Load extracted structure\nwith open('\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_structure.json', 'r') as f:\n    structure = json.load(f)\n\n# Modify instruments, notes, timing, etc.\nstructure['tracks']['track-0']['instrument'] = 'violin'  # Change piano to violin!\n\n# Save modified structure\nwith open('\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.json', 'w') as f:\n    json.dump(structure, f)\n```\n\n### 3. Render Modified Structure to MP3\n\n```bash\npython \u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Fmidi_render.py \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.json \\\n    \u002Fmnt\u002Fuser-data\u002Foutputs\u002Fmozart_violin.mp3\n```\n\n**This workflow lets you \"recreate\" any classical piece with different instruments!**\n\n## Available Scripts\n\nAll scripts are located in `\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002F`:\n\n**Main Workflow Scripts:**\n- **`render_electronic.py`** - Electronic music renderer with real-time synthesis (drums, bass, pads, leads)\n- **`midi_inventory.py`** - Extract complete structure from ANY MIDI file to JSON format\n- **`midi_render.py`** - Render JSON music structure to MP3 using FluidSynth\n- **`midi_transform.py`** - Generic MIDI transformations (transpose, tempo change, instrument swap)\n- **`audio_validate.py`** - Validate audio file quality and format\n\n**Synthesis Engine (used by render_electronic.py):**\n- **`drum_synthesizer.py`** - Synthesizes kicks, snares, hi-hats, claps on-the-fly\n- **`melodic_synthesizer.py`** - Synthesizes bass, pads, and lead sounds using subtractive synthesis\n- **`synthesis_presets.py`** - Genre presets (deep_house, techno, trance, ambient, etc.)\n- **`midi_utils.py`** - MIDI parsing utilities for extracting events and metadata\n- **`__init__.py`** - Python package marker (allows importing scripts as modules)\n\n**Utility Scripts:**\n\n## Music Theory Reference\n\n### Complete General MIDI Instrument Map (Programs 0-127)\n\n**CRITICAL: music21 has limited instrument support. For most sounds (especially electronic), you MUST use mido to set program numbers after export.**\n\n```python\n# Piano (0-7)\n0: \"Acoustic Grand Piano\"\n1: \"Bright Acoustic Piano\"\n2: \"Electric Grand Piano\"\n3: \"Honky-tonk Piano\"\n4: \"Electric Piano 1\"\n5: \"Electric Piano 2\"\n6: \"Harpsichord\"\n7: \"Clavinet\"\n\n# Chromatic Percussion (8-15)\n8: \"Celesta\"\n9: \"Glockenspiel\"\n10: \"Music Box\"\n11: \"Vibraphone\"\n12: \"Marimba\"\n13: \"Xylophone\"\n14: \"Tubular Bells\"\n15: \"Dulcimer\"\n\n# Organ (16-23)\n16: \"Drawbar Organ\"\n17: \"Percussive Organ\"\n18: \"Rock Organ\"\n19: \"Church Organ\"\n20: \"Reed Organ\"\n21: \"Accordion\"\n22: \"Harmonica\"\n23: \"Tango Accordion\"\n\n# Guitar (24-31)\n24: \"Acoustic Guitar (nylon)\"\n25: \"Acoustic Guitar (steel)\"\n26: \"Electric Guitar (jazz)\"\n27: \"Electric Guitar (clean)\"\n28: \"Electric Guitar (muted)\"\n29: \"Overdriven Guitar\"\n30: \"Distortion Guitar\"\n31: \"Guitar Harmonics\"\n\n# Bass (32-39)\n32: \"Acoustic Bass\"\n33: \"Electric Bass (finger)\"\n34: \"Electric Bass (pick)\"\n35: \"Fretless Bass\"\n36: \"Slap Bass 1\"\n37: \"Slap Bass 2\"\n38: \"Synth Bass 1\"\n39: \"Synth Bass 2\"\n\n# Strings (40-47)\n40: \"Violin\"\n41: \"Viola\"\n42: \"Cello\"\n43: \"Contrabass\"\n44: \"Tremolo Strings\"\n45: \"Pizzicato Strings\"\n46: \"Orchestral Harp\"\n47: \"Timpani\"\n\n# Ensemble (48-55)\n48: \"String Ensemble 1\"\n49: \"String Ensemble 2\"\n50: \"Synth Strings 1\"\n51: \"Synth Strings 2\"\n52: \"Choir Aahs\"\n53: \"Voice Oohs\"\n54: \"Synth Voice\"\n55: \"Orchestra Hit\"\n\n# Brass (56-63)\n56: \"Trumpet\"\n57: \"Trombone\"\n58: \"Tuba\"\n59: \"Muted Trumpet\"\n60: \"French Horn\"\n61: \"Brass Section\"\n62: \"Synth Brass 1\"\n63: \"Synth Brass 2\"\n\n# Reed (64-71)\n64: \"Soprano Sax\"\n65: \"Alto Sax\"\n66: \"Tenor Sax\"\n67: \"Baritone Sax\"\n68: \"Oboe\"\n69: \"English Horn\"\n70: \"Bassoon\"\n71: \"Clarinet\"\n\n# Pipe (72-79)\n72: \"Piccolo\"\n73: \"Flute\"\n74: \"Recorder\"\n75: \"Pan Flute\"\n76: \"Blown Bottle\"\n77: \"Shakuhachi\"\n78: \"Whistle\"\n79: \"Ocarina\"\n\n# Synth Lead (80-87)\n80: \"Lead 1 (square)\"\n81: \"Lead 2 (sawtooth)\"\n82: \"Lead 3 (calliope)\"\n83: \"Lead 4 (chiff)\"\n84: \"Lead 5 (charang)\"\n85: \"Lead 6 (voice)\"\n86: \"Lead 7 (fifths)\"\n87: \"Lead 8 (bass + lead)\"\n\n# Synth Pad (88-95)\n88: \"Pad 1 (new age)\"\n89: \"Pad 2 (warm)\"\n90: \"Pad 3 (polysynth)\"\n91: \"Pad 4 (choir)\"\n92: \"Pad 5 (bowed)\"\n93: \"Pad 6 (metallic)\"\n94: \"Pad 7 (halo)\"\n95: \"Pad 8 (sweep)\"\n\n# Synth Effects (96-103)\n96: \"FX 1 (rain)\"\n97: \"FX 2 (soundtrack)\"\n98: \"FX 3 (crystal)\"\n99: \"FX 4 (atmosphere)\"\n100: \"FX 5 (brightness)\"\n101: \"FX 6 (goblins)\"\n102: \"FX 7 (echoes)\"\n103: \"FX 8 (sci-fi)\"\n\n# Ethnic (104-111)\n104: \"Sitar\"\n105: \"Banjo\"\n106: \"Shamisen\"\n107: \"Koto\"\n108: \"Kalimba\"\n109: \"Bag pipe\"\n110: \"Fiddle\"\n111: \"Shanai\"\n\n# Percussive (112-119)\n112: \"Tinkle Bell\"\n113: \"Agogo\"\n114: \"Steel Drums\"\n115: \"Woodblock\"\n116: \"Taiko Drum\"\n117: \"Melodic Tom\"\n118: \"Synth Drum\"\n119: \"Reverse Cymbal\"\n\n# Sound Effects (120-127)\n120: \"Guitar Fret Noise\"\n121: \"Breath Noise\"\n122: \"Seashore\"\n123: \"Bird Tweet\"\n124: \"Telephone Ring\"\n125: \"Helicopter\"\n126: \"Applause\"\n127: \"Gunshot\"\n```\n\n### Complete Drum Map (MIDI Channel 10, Notes 35-81)\n\n**Drums use note numbers for different sounds, NOT pitch. Must be on channel 10 (9 in 0-indexed).**\n\n```python\n# Bass Drums\n35: \"Acoustic Bass Drum\"\n36: \"Bass Drum 1\"  # Most common kick\n\n# Snares\n38: \"Acoustic Snare\"  # Standard snare\n40: \"Electric Snare\"\n\n# Toms\n41: \"Low Floor Tom\"\n43: \"High Floor Tom\"\n45: \"Low Tom\"\n47: \"Low-Mid Tom\"\n48: \"Hi-Mid Tom\"\n50: \"High Tom\"\n\n# Hi-Hats\n42: \"Closed Hi-Hat\"  # Most used\n44: \"Pedal Hi-Hat\"\n46: \"Open Hi-Hat\"\n\n# Cymbals\n49: \"Crash Cymbal 1\"\n51: \"Ride Cymbal 1\"\n52: \"Chinese Cymbal\"\n53: \"Ride Bell\"\n55: \"Splash Cymbal\"\n57: \"Crash Cymbal 2\"\n59: \"Ride Cymbal 2\"\n\n# Percussion\n37: \"Side Stick\"\n39: \"Hand Clap\"\n54: \"Tambourine\"\n56: \"Cowbell\"\n58: \"Vibraslap\"\n60: \"Hi Bongo\"\n61: \"Low Bongo\"\n62: \"Mute Hi Conga\"\n63: \"Open Hi Conga\"\n64: \"Low Conga\"\n65: \"High Timbale\"\n66: \"Low Timbale\"\n67: \"High Agogo\"\n68: \"Low Agogo\"\n69: \"Cabasa\"\n70: \"Maracas\"\n71: \"Short Whistle\"\n72: \"Long Whistle\"\n73: \"Short Guiro\"\n74: \"Long Guiro\"\n75: \"Claves\"\n76: \"Hi Wood Block\"\n77: \"Low Wood Block\"\n78: \"Mute Cuica\"\n79: \"Open Cuica\"\n80: \"Mute Triangle\"\n81: \"Open Triangle\"\n```\n\n### How to Use Any Instrument (mido workflow)\n\nmusic21 has built-in classes for orchestral instruments (Violin, Piano, Trumpet, etc.) but NO support for synths, electronic instruments, or many others. To use any GM instrument:\n\n**CRITICAL RULE**: When you create a `stream.Part()` WITHOUT assigning a music21 instrument class, music21 WILL NOT create `program_change` messages in the MIDI file. You MUST use mido to INSERT these messages manually. Simply trying to modify them with `if msg.type == 'program_change': msg.program = X` will fail silently because no such messages exist!\n\n**Helper Function for Setting Instruments**:\n\n```python\nfrom mido import Message\n\ndef set_track_instrument(track, program):\n    \"\"\"Insert a program_change message at the beginning of a MIDI track.\"\"\"\n    insert_pos = 0\n    for j, msg in enumerate(track):\n        if msg.type == 'track_name':\n            insert_pos = j + 1\n            break\n    track.insert(insert_pos, Message('program_change', program=program, time=0))\n\n# Usage after loading MIDI with mido:\n# set_track_instrument(mid.tracks[2], 33)  # Set track 2 to Electric Bass\n```\n\n**Step 1: Compose with music21 (use placeholder or skip instrument)**\n```python\nfrom music21 import stream, note, chord, tempo\n\nscore = stream.Score()\n\n# Create parts - don't worry about instrument assignment yet\nsynth_lead = stream.Part()\nsynth_pad = stream.Part()\nbass = stream.Part()\n\n# Add your notes\u002Fchords\nsynth_lead.append(note.Note('E5', quarterLength=1.0))\n# ... compose your music\n\nscore.append(synth_lead)\nscore.append(synth_pad)\nscore.append(bass)\n\n# Export to MIDI\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.mid'\nscore.write('midi', fp=midi_path)\n```\n\n**Step 2: Assign correct instruments with mido**\n```python\nfrom mido import MidiFile, Message\n\nmid = MidiFile(midi_path)\n\n# Track 0 is tempo\u002Fmetadata, actual parts start at track 1\n# CRITICAL: You must INSERT program_change messages, not just modify existing ones!\n# music21 doesn't create program_change messages if you don't assign instruments\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # First part (synth_lead)\n        # Insert program_change at beginning of track (after track name if present)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=80, time=0))\n\n    elif i == 2:  # Second part (synth_pad)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=88, time=0))\n\n    elif i == 3:  # Third part (bass)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n\nmid.save(midi_path)\n```\n\n**Step 3: For drums, ALSO set channel to 9 (channel 10)**\n```python\n# If track is drums, set ALL messages to channel 9\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # This is the drum track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Channel 10 in 1-indexed\n```\n\n**Step 4: Render to audio**\n```python\nfrom midi2audio import FluidSynth\nfrom pydub import AudioSegment\n\nfs = FluidSynth('\u002Fusr\u002Fshare\u002Fsounds\u002Fsf2\u002FFluidR3_GM.sf2')\nwav_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.wav'\nfs.midi_to_audio(midi_path, wav_path)\n\naudio = AudioSegment.from_wav(wav_path)\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Ftrack.mp3'\naudio.export(mp3_path, format='mp3', bitrate='192k')\n```\n\n### Common Chord Progressions & Styles\n\n```python\n# Standard Progressions (Roman numerals)\n\"pop\": [\"I\", \"V\", \"vi\", \"IV\"]           # C-G-Am-F (Journey, Adele)\n\"epic\": [\"i\", \"VI\", \"III\", \"VII\"]       # Am-F-C-G (Epic trailer music)\n\"sad\": [\"i\", \"VI\", \"iv\", \"V\"]           # Am-F-Dm-E (Melancholic)\n\"jazz\": [\"ii\", \"V\", \"I\", \"vi\"]          # Dm-G-C-Am (Jazz standard)\n\"classical\": [\"I\", \"IV\", \"V\", \"I\"]      # C-F-G-C (Classical cadence)\n\"blues\": [\"I\", \"I\", \"I\", \"I\", \"IV\", \"IV\", \"I\", \"I\", \"V\", \"IV\", \"I\", \"I\"]  # 12-bar blues\n\"house\": [\"i\", \"VI\", \"III\", \"VII\"]      # Minor house progression\n\"reggae\": [\"I\", \"V\", \"vi\", \"IV\"]        # Offbeat rhythm style\n\"country\": [\"I\", \"IV\", \"V\", \"I\"]        # Simple and direct\n\"rock\": [\"I\", \"bVII\", \"IV\", \"I\"]        # Power chord style\n\"r&b\": [\"I\", \"V\", \"vi\", \"iii\", \"IV\", \"I\", \"IV\", \"V\"]  # Complex R&B\n\n# Genre-Specific Characteristics\nSTYLES = {\n    \"house\": {\n        \"bpm\": 120-128,\n        \"time_signature\": \"4\u002F4\",\n        \"drum_pattern\": \"4-on-floor kick, offbeat hats\",\n        \"bass\": \"Synth bass with groove\",\n        \"common_instruments\": [38, 80, 88, 4]  # Synth bass, lead, pad, e-piano\n    },\n    \"jazz\": {\n        \"bpm\": 100-180,\n        \"time_signature\": \"4\u002F4 or 3\u002F4\",\n        \"chords\": \"Extended (7th, 9th, 11th, 13th)\",\n        \"common_instruments\": [0, 32, 64, 56, 73]  # Piano, bass, sax, trumpet, drums\n    },\n    \"orchestral\": {\n        \"bpm\": 60-140,\n        \"sections\": [\"strings\", \"woodwinds\", \"brass\", \"percussion\"],\n        \"common_instruments\": [40, 41, 42, 56, 73, 47]  # Violin, viola, cello, trumpet, flute, timpani\n    },\n    \"rock\": {\n        \"bpm\": 100-140,\n        \"time_signature\": \"4\u002F4\",\n        \"guitars\": \"Distorted (30) or clean (27)\",\n        \"common_instruments\": [30, 33, 0, 128]  # Distortion guitar, bass, piano, drums\n    },\n    \"ambient\": {\n        \"bpm\": 60-90,\n        \"characteristics\": \"Long sustained notes, atmospheric pads\",\n        \"common_instruments\": [88, 89, 90, 91, 52]  # Various pads, choir\n    },\n    \"trap\": {\n        \"bpm\": 130-170,\n        \"drums\": \"Tight snare rolls, 808 bass kicks\",\n        \"hi_hats\": \"Fast hi-hat patterns (1\u002F16 or 1\u002F32 notes)\",\n        \"common_instruments\": [38, 128]  # Synth bass, drums\n    }\n}\n```\n\n### music21 Instrument Classes\n\n```python\nfrom music21 import instrument\n\n# Strings\ninstrument.Violin()\ninstrument.Viola()\ninstrument.Violoncello()  # Note: NOT Cello()\ninstrument.Contrabass()\ninstrument.Harp()\n\n# Piano\ninstrument.Piano()\ninstrument.Harpsichord()\n\n# Brass\ninstrument.Trumpet()\ninstrument.Trombone()\ninstrument.Tuba()\ninstrument.Horn()  # French horn\n\n# Woodwinds\ninstrument.Flute()\ninstrument.Clarinet()\ninstrument.Oboe()\ninstrument.Bassoon()\ninstrument.SopranoSaxophone()\ninstrument.AltoSaxophone()\ninstrument.TenorSaxophone()  # Most common for jazz\ninstrument.BaritoneSaxophone()\n\n# Other\ninstrument.AcousticGuitar()\ninstrument.ElectricGuitar()\ninstrument.Bass()\ninstrument.Timpani()\n\n# CRITICAL: music21 has LIMITED support for electronic instruments and drums\n# For synths, drums, and electronic sounds, you MUST:\n# 1. Create a Part without an instrument (or use a placeholder like Piano())\n# 2. Use mido library to INSERT program_change messages after export\n# 3. Set drums to MIDI channel 10 (channel 9 in 0-indexed) or they won't sound like drums\n#\n# Common mistakes:\n# - instrument.Cello() doesn't exist - use Violoncello()\n# - instrument.FrenchHorn() doesn't exist - use Horn()\n# - Setting part.partName doesn't change the sound - you must set MIDI program with mido\n# - Drums on channel 0 will play as pitched notes, not drum sounds\n```\n\n### Note Durations (Quarter Note = 1.0)\n\n- Whole note: 4.0\n- Half note: 2.0\n- Quarter note: 1.0\n- Eighth note: 0.5\n- Sixteenth note: 0.25\n- Dotted quarter: 1.5\n- Triplet quarter: 0.667\n\n### mido Quick Reference\n\nFor electronic music and drums, use `mido` to set MIDI programs after music21 export:\n\n```python\nfrom mido import MidiFile, Message\n\nmid = MidiFile(midi_path)\n\n# Insert program_change message\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Your track (tracks start at 1, not 0)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n\n# For drums: Set channel to 9 (channel 10 in 1-indexed)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drum track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9\n\nmid.save(midi_path)\n```\n\n**Common MIDI Programs:**\n- 38: Synth Bass 1\n- 80: Square Lead\n- 81: Sawtooth Lead\n- 88: Pad 1 (New Age)\n- 25: Acoustic Guitar (Steel) - loud, cuts through\n- 33: Acoustic Bass\n\n## Common Techniques\n\n### Drum Programming (4-on-floor house beat)\n\n**CRITICAL**: music21's `.append()` adds notes **sequentially** (one after another), not simultaneously. For layered drums where kicks, snares, and hats play at the same time, you MUST use `.insert(offset, note)` with explicit timing.\n\n**⚠️ ALWAYS USE .insert() FOR ALL TRACKS:**\n\nSince layering is needed for nearly all good music composition, you should **ALWAYS use .insert(offset, note) for ALL tracks** - drums, bass, guitar, pads, everything. This prevents timing bugs and ensures proper synchronization.\n\n**NEVER mix .insert() and .append()** - If you use `.insert()` for drums and `.append()` for other instruments, music21 will miscalculate track lengths and create tracks that are 5-10× longer than intended (8 minutes instead of 1.5 minutes), with only the first 20-25% containing actual sound.\n\n**The .append() method should only be used in rare cases where you have a single melodic line with no other instruments.**\n\n```python\n# WRONG: This plays kick, then 32 hats, then snare pattern (not layered!)\n# for beat in range(16):\n#     drums.append(note.Note(36, quarterLength=1.0))  # Kicks play first\n# for eighth in range(32):\n#     drums.append(note.Note(42, quarterLength=0.5))  # Hats play AFTER all kicks\n# # Result: Timing is completely wrong!\n\n# CORRECT: Use .insert() with explicit offsets for simultaneous layering\nbars = 32\nbeats_per_bar = 4\ntotal_beats = bars * beats_per_bar\n\n# Layer 1: Four-on-the-floor kicks (every beat)\nfor beat in range(total_beats):\n    offset = float(beat)  # Beat 0, 1, 2, 3, 4, 5, ...\n    drums.insert(offset, note.Note(36, quarterLength=1.0))\n\n# Layer 2: Snare on beats 2 and 4 of each bar\nfor bar in range(bars):\n    # Snare on beat 2 (second beat of bar)\n    offset = float(bar * beats_per_bar + 1)\n    drums.insert(offset, note.Note(38, quarterLength=1.0))\n\n    # Snare on beat 4 (fourth beat of bar)\n    offset = float(bar * beats_per_bar + 3)\n    drums.insert(offset, note.Note(38, quarterLength=1.0))\n\n# Layer 3: Hi-hats on eighth notes (every 0.5 beats) - creates groove\nfor bar in range(bars):\n    for eighth in range(8):  # 8 eighth notes per bar\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n\n        if eighth % 2 == 0:\n            # Closed hat on even eighths (on the beat)\n            drums.insert(offset, note.Note(42, quarterLength=0.5))\n        else:\n            # Open hat on odd eighths (offbeat) - signature house groove\n            drums.insert(offset, note.Note(46, quarterLength=0.5))\n\n# Result: Properly layered four-on-the-floor with offbeat open hats\n# Bar 0: Kicks at 0.0, 1.0, 2.0, 3.0\n#        Snares at 1.0, 3.0 (on top of kicks)\n#        Hats at 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5 (layered throughout)\n```\n\n### Reggae Specific Guidelines\n\n**CRITICAL**: Reggae has a **unique rhythmic identity** that requires precise drum patterns, offbeat accents, and heavy bass. If you don't follow these rules, it won't sound like reggae.\n\n**Drum Rules (Non-Negotiable)**:\n- **\"One Drop\" pattern**: Kick drum on beat 3 ONLY (not beat 1), creating the signature reggae \"drop\"\n- **Snare\u002FRimshot**: Beats 2 and 4 (or just beat 3 with the kick)\n- **Hi-hats**: OFFBEAT eighth notes only (never on the beat), creating the \"skank\" rhythm\n- **Cross-stick (note 37)**: Optional on beats 2 and 4 for classic sound\n- **NO four-on-floor kicks** - this is house\u002Felectronic, not reggae\n\n```python\n# CORRECT Reggae \"One Drop\" Drum Pattern\nbars = 32\nbeats_per_bar = 4\n\nfor bar in range(bars):\n    for beat in range(beats_per_bar):\n        offset = float(bar * beats_per_bar + beat)\n\n        # Kick ONLY on beat 3 (the \"drop\")\n        if beat == 2:  # Beat 3 in 0-indexed (0, 1, 2, 3)\n            drums_part.insert(offset, note.Note(36, quarterLength=1.0))\n\n        # Snare on beats 2 and 4\n        if beat == 1 or beat == 3:\n            drums_part.insert(offset, note.Note(38, quarterLength=1.0))\n\n    # OFFBEAT hi-hats (the \"skank\") - CRITICAL for reggae feel\n    for eighth in range(8):\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n        # ONLY odd eighths (offbeat) - never on the beat\n        if eighth % 2 == 1:  # 0.5, 1.5, 2.5, 3.5 (offbeat)\n            drums_part.insert(offset, note.Note(42, quarterLength=0.5))\n\n# WRONG - Four-on-floor (this is house, not reggae!)\n# for beat in range(total_beats):\n#     drums_part.insert(float(beat), note.Note(36, quarterLength=1.0))  # ❌ Kick on every beat\n```\n\n**Bass Rules (Non-Negotiable)**:\n- **Heavy and prominent** - Bass is the lead instrument in reggae\n- **Octave 1-2** (A1, C2, E2, F1, G1) - not too low, not too high\n- **Syncopated rhythm** - plays between beats, not just on downbeats\n- **Walking patterns** - moves between root, third, fifth of chords\n- **Quarter to half notes** (1.0-2.0 quarterLength) - NOT whole notes like House\n\n```python\n# CORRECT Reggae Bass (Am-D-F-G progression, 8-bar pattern)\n# This pattern has movement and syncopation - it \"walks\"\nbass_pattern = [\n    # Bar 1-2: Am (root A)\n    ('A1', 1.0), ('A1', 0.5), ('C2', 0.5), ('A1', 2.0),  # Bar 1\n    ('A1', 1.0), ('E2', 1.0), ('A1', 2.0),                # Bar 2\n\n    # Bar 3-4: D (root D)\n    ('D2', 1.0), ('D2', 0.5), ('F2', 0.5), ('D2', 2.0),  # Bar 3\n    ('D2', 1.0), ('A1', 1.0), ('D2', 2.0),                # Bar 4\n\n    # Bar 5-6: F (root F)\n    ('F1', 1.0), ('F1', 0.5), ('A1', 0.5), ('F1', 2.0),  # Bar 5\n    ('F1', 1.0), ('C2', 1.0), ('F1', 2.0),                # Bar 6\n\n    # Bar 7-8: G (root G, with E for resolution)\n    ('G1', 1.0), ('G1', 0.5), ('B1', 0.5), ('E2', 2.0),  # Bar 7\n    ('G1', 1.0), ('D2', 1.0), ('E2', 2.0),                # Bar 8\n]\n\n# Use .insert() to place bass notes at explicit offsets (synchronizes with drums)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for pitch, duration in bass_pattern:\n        bass_part.insert(offset, note.Note(pitch, quarterLength=duration))\n        offset += duration\n\n# WRONG - Using .append() will cause 8-minute tracks when mixed with .insert() drums\n# for pitch, duration in bass_pattern * (bars \u002F\u002F 8):\n#     bass_part.append(note.Note(pitch, quarterLength=duration))  # ❌ Causes timing bug!\n```\n\n**Guitar \"Skank\" Rules (Non-Negotiable)**:\n- **OFFBEAT chords only** - plays on upbeats (the \"and\" of beats), never downbeats\n- **CRITICAL: Sufficient duration** - Minimum 0.35-0.4 quarterLength (NOT 0.25) to be audible in mix\n- **Mid-register voicings** - Octaves 3-4 (A3, C4, E4)\n- **Muted\u002Fpercussive** - In real reggae, these are muted strums creating rhythm\n\n**⚠️ CRITICAL NOTE DURATION WARNING:**\n\nAt 0.25 quarterLength, guitar will be **completely inaudible** in the mix:\n- At 82 BPM: `(60 \u002F 82) × 0.25 = 0.183 seconds` (183 milliseconds)\n- Human perceptual threshold: ~200-300ms needed to register in dense mix\n- Organ plays at 0.5 (366ms) - TWICE as long\n\n**Use 0.4 quarterLength minimum:**\n- At 82 BPM: `(60 \u002F 82) × 0.4 = 0.293 seconds` (293 milliseconds)\n- Crosses perceptual threshold while maintaining staccato feel\n- Adjust rest to 0.1 to maintain 1.0 beat total per skank cycle\n\n```python\n# CORRECT Reggae Guitar \"Skank\" (offbeat chords with AUDIBLE duration)\nguitar_chords = [\n    ['A3', 'C4', 'E4'],    # Am\n    ['A3', 'C4', 'E4'],    # Am (repeat for 2 bars)\n    ['D3', 'F#3', 'A3'],   # D\n    ['D3', 'F#3', 'A3'],   # D (repeat for 2 bars)\n    ['F3', 'A3', 'C4'],    # F\n    ['F3', 'A3', 'C4'],    # F (repeat for 2 bars)\n    ['G3', 'B3', 'D4'],    # G\n    ['G3', 'B3', 'D4'],    # G (repeat for 2 bars)\n]\n\n# Use .insert() to place guitar at explicit offsets (synchronizes with drums\u002Fbass)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for chord_notes in guitar_chords:\n        # Each bar: 4 offbeat skanks\n        for beat in range(4):\n            # REST on the beat (downbeat)\n            guitar_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n            # CHORD on the offbeat (upbeat) - 0.4 duration for audibility\n            guitar_part.insert(offset, chord.Chord(chord_notes, quarterLength=0.4))\n            offset += 0.4\n            # SHORT REST after chord (creates staccato effect)\n            guitar_part.insert(offset, note.Rest(quarterLength=0.1))\n            offset += 0.1\n\n# WRONG - Using .append() causes 8-minute tracks when mixed with .insert() drums\n# guitar_part.append(chord.Chord(chord_notes, quarterLength=0.4))  # ❌ Causes timing bug!\n\n# WRONG - Duration too short (will be inaudible!)\n# guitar_part.insert(offset, chord.Chord(chord_notes, quarterLength=0.25))  # ❌ Only 183ms @ 82 BPM\n```\n\n**Organ \"Bubble\" Rules**:\n- **Alternating on-and-off pattern** - Creates rhythmic \"bubbling\" effect\n- **Higher register** (octaves 4-5) - Sits above guitar\n- **Plays same chords as guitar** but different rhythm\n- **Shorter duration** (0.5 quarterLength) with rests between\n\n```python\n# CORRECT Reggae Organ \"Bubble\"\norgan_chords = [\n    ['A4', 'C5', 'E5'],    # Am (high register)\n    ['A4', 'C5', 'E5'],\n    ['D4', 'F#4', 'A4'],   # D\n    ['D4', 'F#4', 'A4'],\n    ['F4', 'A4', 'C5'],    # F\n    ['F4', 'A4', 'C5'],\n    ['G4', 'B4', 'D5'],    # G\n    ['G4', 'B4', 'D5'],\n]\n\n# Use .insert() to place organ at explicit offsets (synchronizes with drums\u002Fbass\u002Fguitar)\noffset = 0.0\nfor repetition in range(bars \u002F\u002F 8):\n    for organ_chord in organ_chords:\n        # Each bar: bubble pattern (chord, rest, chord, rest)\n        for _ in range(2):  # Twice per bar\n            organ_part.insert(offset, chord.Chord(organ_chord, quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, chord.Chord(organ_chord, quarterLength=0.5))\n            offset += 0.5\n            organ_part.insert(offset, note.Rest(quarterLength=0.5))\n            offset += 0.5\n\n# WRONG - Using .append() causes 8-minute tracks when mixed with .insert() drums\n# organ_part.append(chord.Chord(organ_chord, quarterLength=0.5))  # ❌ Causes timing bug!\n```\n\n**Reggae Instruments (MIDI Programs)**:\n- **Drums**: Channel 9 (MIDI channel 10) - ALWAYS required\n- **Bass**: Program 33 (Electric Bass - finger) or 34 (Electric Bass - pick)\n- **Guitar**:\n  - **PRIMARY: Program 25 (Acoustic Guitar - steel)** - Bright, percussive, cuts through mix\n  - Alternative: Program 28 (Electric Guitar - muted) - Percussive skank sound\n  - **⚠️ AVOID: Program 27 (Electric Guitar - clean)** - Recorded 12-15dB quieter in FluidR3_GM, will be inaudible even at velocity 95\n- **Organ**: Program 16 (Drawbar Organ) or 17 (Percussive Organ)\n\n**Setting Instruments with mido (CRITICAL)**:\n\nSince reggae Parts don't use music21 instrument classes, you MUST use mido to INSERT program_change messages:\n\n```python\nfrom mido import MidiFile, Message\n\n# After score.write('midi', fp=midi_path)\nmid = MidiFile(midi_path)\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Drums on channel 9\n    elif i == 2:  # Bass track\n        # INSERT program_change message (don't try to modify - it doesn't exist!)\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=33, time=0))\n    elif i == 3:  # Guitar track\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=25, time=0))  # Acoustic steel - bright and audible\n    elif i == 4:  # Organ track\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=16, time=0))\n\nmid.save(midi_path)\n```\n\n**Mixing and Balance (CRITICAL - Guitar Will Be Inaudible Without This!)**:\n\nSetting the correct instrument programs and velocities is NOT enough. In reggae, the **guitar will still be completely inaudible** if you don't address THREE issues:\n\n1. **Soundfont level**: Program 27 (Electric Guitar - clean) recorded 12-15dB quieter than program 16 (Drawbar Organ) in FluidR3_GM\n2. **Note duration**: 0.25 quarterLength = 183ms @ 82 BPM (below perceptual threshold)\n3. **Velocity difference**: Need 40+ point separation\n\n**Complete Solution**:\n```python\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\n# After setting instruments, BEFORE saving\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 70)\n    elif i == 2:  # Bass - prominent in reggae\n        set_track_velocity(track, 80)\n    elif i == 3:  # Guitar - RHYTHM INSTRUMENT, needs to cut through\n        # Use program 25 (steel acoustic) instead of 27 (too quiet)\n        # Use 0.4 quarterLength instead of 0.25 (too short)\n        set_track_velocity(track, 95)  # LOUD - this is critical!\n    elif i == 4:  # Organ - BACKGROUND atmosphere\n        set_track_velocity(track, 55)  # QUIET - don't overpower guitar\n\nmid.save(midi_path)\n```\n\n**Why this THREE-PART solution works**:\n- **Program 25 (Acoustic Guitar - steel)**: Recorded 8-10dB louder than program 27, bright harmonics, percussive attack\n- **Duration 0.4 (293ms)**: Crosses perceptual threshold vs 0.25 (183ms) which is too short\n- **Velocity 95 vs 55**: 40-point difference creates clear separation\n- **Combined effect**: Guitar now has 3× more presence (program × duration × velocity)\n\n**Tempo**: 70-90 BPM (classic roots reggae: 80-85 BPM, modern: 85-90 BPM)\n\n**Common Mistakes**:\n- Creating `drums_part` but calling `drums.insert()` - use correct variable name\n- Trying to MODIFY `program_change` messages that don't exist - must INSERT them\n- Not setting drums to channel 9 - drums will sound like melody notes\n- **CRITICAL: Using program 27 (too quiet) instead of program 25**\n- **CRITICAL: Using 0.25 quarterLength (too short) instead of 0.4**\n- **CRITICAL: Not setting velocities - guitar will be completely inaudible, organ will dominate**\n\n### House Specific Guidelines\n\n**CRITICAL**: House requires **extreme repetition** and **minimal variation** to create the hypnotic, groovy feel. Standard composition rules don't apply.\n\n**Bass Rules (Non-Negotiable)**:\n- **ONE NOTE** held for 8-16 bars minimum (32.0-64.0 quarterLength)\n- **Octave 1-2 RANGE** (A1, C2, E2, F1, G1) - the actual bass guitar range (55-110 Hz)\n- **NEVER use octave 0** (A0, F0, G0, etc.) - these are 20-30 Hz sub-sonic frequencies inaudible on 99% of playback systems (laptop speakers, headphones, even many studio monitors can't reproduce them)\n- **Whole notes or longer** (4.0+ quarterLength minimum, prefer 32.0+)\n- **Simple patterns**: Root for 8 bars → Fifth for 8 bars → repeat\n- **NO octave jumps**, **NO busy basslines**, **NO quarter notes**\n\n```python\n# CORRECT House Bass (audible on all playback systems)\nbass_pattern = [\n    ('A1', 32.0),  # A for 8 bars - 55 Hz (bass guitar's lowest note)\n    ('E2', 32.0),  # E for 8 bars - 82 Hz (bass guitar's open E string)\n    ('F1', 32.0),  # F for 8 bars - 43.7 Hz\n    ('C2', 32.0),  # C for 8 bars - 65.4 Hz\n]\nfor pitch, duration in bass_pattern:\n    bass_part.append(note.Note(pitch, quarterLength=duration))\n\n# WRONG - Octave 0 is inaudible on most systems!\nbass_notes = ['A0', 'F0', 'C1', 'G0']  # ❌ 20-35 Hz - below hearing\u002Fspeaker range!\nfor bar in range(8):\n    bass_part.append(note.Note(bass_notes[bar % 4], quarterLength=32.0))  # ❌ Inaudible!\n\n# ALSO WRONG - Too busy, octave jumps\nbass_notes = ['A1', 'A2', 'C2', 'F1']  # ❌ Octave jumps\nfor bar in range(32):\n    bass_part.append(note.Note(bass_notes[bar % 4], quarterLength=1.0))  # ❌ Too short!\n```\n\n**Pad Rules**:\n- **ONE CHORD** held for 8-16 bars (32.0-64.0 quarterLength)\n- **Mid-range octaves** (2-4): A2, C3, E3 voicings\n- **Long attack\u002Frelease** for smooth transitions\n- Change chords rarely (every 8-16 bars, not every 4 bars)\n\n```python\n# CORRECT House Pads\npad_progression = [\n    (['A2', 'C3', 'E3'], 64.0),  # Am for 16 bars\n    (['F2', 'A2', 'C3'], 64.0),  # F for 16 bars\n]\nfor chord_notes, duration in pad_progression:\n    pad_part.append(chord.Chord(chord_notes, quarterLength=duration))\n```\n\n**Lead Rules**:\n- **Sparse** - only play every 4-8 bars, lots of silence\n- **Long notes** (4.0-16.0 quarterLength)\n- **Enter late** (bar 16+, not immediately)\n- **Mid octaves** (A4, C5, E5 max)\n\n```python\n# CORRECT House Lead (enters bar 16)\nlead_pattern = [\n    ('A4', 8.0),   # 2 bars\n    ('C5', 8.0),   # 2 bars\n    ('E5', 16.0),  # 4 bars\n]\n```\n\n**Core Principle**: If it feels repetitive, you're doing it right. House = **hypnotic loop** repeated for minutes with **minimal changes**.\n\n**Mixing and Balance**:\n\nIn House, the bass is the star. But if you don't control velocities, the pads and leads will overpower everything:\n\n```python\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\n# After setting instruments with mido\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 90)  # Driving rhythm\n    elif i == 2:  # Bass (program 38, octaves 1-2)\n        set_track_velocity(track, 75)  # Prominent but not overpowering\n    elif i == 3:  # Pad (program 88, octaves 2-4)\n        set_track_velocity(track, 50)  # Atmospheric background\n    elif i == 4:  # Lead (program 80, octaves 4-5)\n        set_track_velocity(track, 95)  # Melodic focus (when present)\n\nmid.save(midi_path)\n```\n\n### Bassline Patterns\n\n```python\n# Groovy syncopated house bass\nbass_pattern = [\n    ('A1', 1.0),      # Downbeat\n    ('A1', 0.5),      # Short hit\n    ('rest', 0.25),   # Space\n    ('A1', 0.25),     # Syncopation\n    ('A2', 0.5),      # Octave jump\n    ('C2', 0.5),      # Chord tone\n    ('A1', 1.0)       # Resolution\n]\n\nfor pitch, duration in bass_pattern:\n    if pitch == 'rest':\n        bass_part.append(note.Rest(quarterLength=duration))\n    else:\n        bass_part.append(note.Note(pitch, quarterLength=duration))\n```\n\n### Chord Voicings\n\n```python\n# Jazz voicing (7th chords)\njazz_chords = [\n    ['C4', 'E4', 'G4', 'B4'],   # Cmaj7\n    ['D4', 'F4', 'A4', 'C5'],   # Dm7\n    ['G3', 'B3', 'D4', 'F4']    # G7\n]\n\n# House pad voicing (open, atmospheric)\nhouse_pads = [\n    ['A3', 'C4', 'E4'],         # Am\n    ['F3', 'A3', 'C4'],         # F\n    ['C3', 'E3', 'G3']          # C\n]\n\n# Classical voicing (close position)\nclassical_chords = [\n    ['C4', 'E4', 'G4'],         # C major\n    ['B3', 'D4', 'G4'],         # G major\n    ['C4', 'F4', 'A4']          # F major\n]\n```\n\n### Melody Construction\n\n```python\n# Pentatonic scale (versatile, no \"wrong\" notes)\npentatonic_c = ['C', 'D', 'E', 'G', 'A']\n\n# Major scale\nmajor_c = ['C', 'D', 'E', 'F', 'G', 'A', 'B']\n\n# Minor scale\nminor_a = ['A', 'B', 'C', 'D', 'E', 'F', 'G']\n\n# Blues scale\nblues_c = ['C', 'Eb', 'F', 'F#', 'G', 'Bb']\n\n# Generate melody algorithmically\nfor i in range(16):\n    octave = 4 + (i \u002F\u002F 8)  # Move up octave halfway through\n    scale_degree = i % len(pentatonic_c)\n    pitch = pentatonic_c[scale_degree] + str(octave)\n    melody.append(note.Note(pitch, quarterLength=0.5))\n```\n\n### Dynamic Control (Crescendos, Volume Changes)\n\n```python\nfrom music21 import dynamics\n\n# Set initial volume\npart.insert(0, dynamics.Dynamic('p'))   # Piano (soft)\n\n# Add crescendo at bar 8\npart.insert(32, dynamics.Crescendo())   # 32 quarter notes = 8 bars\n\n# Peak at bar 10\npart.insert(40, dynamics.Dynamic('ff'))  # Fortissimo (very loud)\n\n# Decrescendo\npart.insert(60, dynamics.Diminuendo())\n\n# Return to soft\npart.insert(72, dynamics.Dynamic('p'))\n\n# Dynamic markings: ppp, pp, p, mp, mf, f, ff, fff\n```\n\n### Timing & Tempo\n\n```python\n# Set tempo (BPM)\npart.insert(0, tempo.MetronomeMark(number=120))  # 120 BPM\n\n# Tempo changes\npart.insert(32, tempo.MetronomeMark(number=140))  # Speed up at bar 8\n\n# Timing variations (humanization)\nimport random\nnote.Note('C5', quarterLength=1.0 + random.uniform(-0.05, 0.05))\n\n# Common time signatures (set on first part)\nfrom music21 import meter\npart.insert(0, meter.TimeSignature('4\u002F4'))  # Most common\npart.insert(0, meter.TimeSignature('3\u002F4'))  # Waltz\npart.insert(0, meter.TimeSignature('6\u002F8'))  # Compound meter\n```\n\n## Complete Example: Deep House Track\n\n```python\nfrom music21 import stream, note, chord, tempo\nfrom mido import MidiFile\nimport subprocess\n\n# 1. Compose with music21\nscore = stream.Score()\ndrums = stream.Part()\nbass_part = stream.Part()\npad_part = stream.Part()\nlead_part = stream.Part()\n\n# Set tempo\ndrums.insert(0, tempo.MetronomeMark(number=122))\n\n# Add drums using .insert() for proper layering (not .append()!)\nbars = 32\nbeats_per_bar = 4\n\n# Layer 1: Four-on-the-floor kicks\nfor bar in range(bars):\n    for beat in range(beats_per_bar):\n        offset = float(bar * beats_per_bar + beat)\n        drums.insert(offset, note.Note(36, quarterLength=1.0))\n\n# Layer 2: Snare on beats 2 and 4 of each bar\nfor bar in range(bars):\n    drums.insert(float(bar * beats_per_bar + 1), note.Note(38, quarterLength=1.0))  # Beat 2\n    drums.insert(float(bar * beats_per_bar + 3), note.Note(38, quarterLength=1.0))  # Beat 4\n\n# Layer 3: Hi-hats on eighth notes (offbeat open hats for groove)\nfor bar in range(bars):\n    for eighth in range(8):\n        offset = float(bar * beats_per_bar) + (eighth * 0.5)\n        if eighth % 2 == 0:\n            drums.insert(offset, note.Note(42, quarterLength=0.5))  # Closed hat\n        else:\n            drums.insert(offset, note.Note(46, quarterLength=0.5))  # Open hat (offbeat)\n\n# House BASS: Long sustained notes using .insert() (NOT .append())\nbass_offset = 0.0\nbass_pattern = [\n    ('A1', 32.0),  # A root for 8 bars - 55 Hz (audible on all systems)\n    ('E2', 32.0),  # E fifth for 8 bars - 82 Hz\n    ('F1', 32.0),  # F for 8 bars - 43.7 Hz\n    ('C2', 32.0),  # C for 8 bars - 65.4 Hz\n]\n\nfor pitch, duration in bass_pattern:\n    bass_part.insert(bass_offset, note.Note(pitch, quarterLength=duration))\n    bass_offset += duration\n\n# House PADS: Long sustained chords using .insert() (NOT .append())\npad_offset = 0.0\npad_progression = [\n    (['A2', 'C3', 'E3'], 64.0),  # Am for 16 bars\n    (['F2', 'A2', 'C3'], 64.0),  # F for 16 bars\n]\n\nfor chord_notes, duration in pad_progression:\n    pad_part.insert(pad_offset, chord.Chord(chord_notes, quarterLength=duration))\n    pad_offset += duration\n\n# House LEAD: Sparse, long notes, enters late using .insert() (NOT .append())\nlead_pattern = [\n    ('A4', 8.0),   # 2 bars\n    ('C5', 8.0),   # 2 bars\n    ('E5', 16.0),  # 4 bars (long sustain)\n]\n\n# Lead enters at bar 16 (64 beats in)\nlead_offset = 64.0\nfor pitch, duration in lead_pattern:\n    lead_part.insert(lead_offset, note.Note(pitch, quarterLength=duration))\n    lead_offset += duration\n\nscore.append(drums)\nscore.append(bass_part)\nscore.append(pad_part)\nscore.append(lead_part)\n\nmidi_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house_track.mid'\nscore.write('midi', fp=midi_path)\n\n# 2. Fix instruments with mido (INSERT program_change messages)\nfrom mido import Message\nmid = MidiFile(midi_path)\n\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums track\n        for msg in track:\n            if hasattr(msg, 'channel'):\n                msg.channel = 9  # Drums must be on channel 9\n    elif i == 2:  # Bass track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=38, time=0))\n    elif i == 3:  # Pad track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=88, time=0))\n    elif i == 4:  # Lead track - INSERT program_change\n        insert_pos = 0\n        for j, msg in enumerate(track):\n            if msg.type == 'track_name':\n                insert_pos = j + 1\n                break\n        track.insert(insert_pos, Message('program_change', program=81, time=0))\n\nmid.save(midi_path)\n\n# 3. Render with ELECTRONIC pipeline with deep_house preset!\nmp3_path = '\u002Fmnt\u002Fuser-data\u002Foutputs\u002Fdeep_house_track.mp3'\n\nresult = subprocess.run([\n    'python',\n    '\u002Fmnt\u002Fskills\u002Fprivate\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py',\n    midi_path,\n    mp3_path,\n    '--genre', 'deep_house'\n], capture_output=True, text=True)\n\nprint(result.stdout)\nif result.returncode == 0:\n    print(f\"✓ House track created: {mp3_path}\")\nelse:\n    print(f\"Error: {result.stderr}\")\n```\n\n**House Characteristics in This Example:**\n- **Bass**: ONE note (A1, E2, F1, C2) held for 8 bars each - deep bass in octave 1-2 (55-82 Hz range, audible on all playback systems)\n- **Pads**: ONE chord held for 16 bars - extreme sustain creates hypnotic atmosphere\n- **Lead**: Sparse (enters bar 16), long notes (2-4 bars each) - not busy\n- **Repetition**: Minimal variation = hypnotic, groovy House feel\n- Uses `render_electronic.py` with `deep_house` preset for warm, subby synthesis\n- Bass synthesized with proper low-end frequencies that consumer audio equipment can reproduce\n- Pads use slow attack (0.9s) and long release (1.2s) for smooth transitions\n- Genre preset automatically tunes all synthesis parameters\n- No external samples or soundfonts needed - fully self-contained\n\n## Best Practices\n\n### Composition Quality\n- **Generate variety**: Don't repeat the same 4 bars for entire piece\n- **Use music theory**: Real chord progressions, proper voice leading\n- **Respect instrument ranges**: Violin (G3-E7), Cello (C2-C6), Trumpet (E3-C6)\n- **Add dynamics**: Use p, mp, mf, f, ff markings and crescendos\n- **Structure**: Intro → Development → Climax → Resolution\n- **Add humanization**: Vary timing and velocity to avoid robotic sound\n  ```python\n  import random\n  n = note.Note('C5', quarterLength=1.0 + random.uniform(-0.05, 0.05))\n  n.volume.velocity = 80 + random.randint(-5, 5)\n  ```\n\n### Technical Quality\n- **SoundFont**: Use FluidR3_GM.sf2 for best quality\n- **Bitrate**: 192kbps minimum, 320kbps for high quality\n- **Timing precision**: Use quarterLength values carefully\n- **Cleanup**: Remove temporary MIDI\u002FWAV files after MP3 conversion\n\n### Common Pitfalls\n- **CRITICAL: Always use .insert() for ALL tracks** - Never mix `.insert()` and `.append()`. See \"Drum Programming\" section for details\n- **CRITICAL: INSERT program_change messages** - Use `track.insert(pos, Message('program_change', ...))` not `msg.program = X`. See mido Quick Reference\n- **CRITICAL: Set velocities** - Lead 90-105, background 50-65. See \"Mixing and Balance\" section\n- **CRITICAL: Bass octaves** - Use A1-A2 (55-110 Hz), never A0-G0 (inaudible on most systems)\n- **instrument.Cello()** doesn't exist - use `Violoncello()`\n- **Forgetting tempo** - Add `tempo.MetronomeMark()` to first part\n- **Drums not sounding like drums** - Set channel to 9 with mido (see mido Quick Reference)\n\n## Mixing and Balance\n\n**CRITICAL**: Setting MIDI program numbers alone is not enough. Without explicit velocity control, some instruments will be **completely inaudible**.\n\n### Setting Velocities\n\nmusic21 uses default velocity 64 for all notes, which causes poor mixing. Use mido to set velocities after MIDI export:\n\n```python\nfrom mido import MidiFile\n\ndef set_track_velocity(track, velocity):\n    \"\"\"Set velocity for all note_on messages in a track.\"\"\"\n    for msg in track:\n        if msg.type == 'note_on' and msg.velocity > 0:\n            msg.velocity = velocity\n\nmid = MidiFile(midi_path)\nfor i, track in enumerate(mid.tracks):\n    if i == 1:  # Drums\n        set_track_velocity(track, 75)\n    elif i == 2:  # Bass\n        set_track_velocity(track, 80)\n    elif i == 3:  # Lead instrument (sax, guitar, trumpet)\n        set_track_velocity(track, 95)\n    elif i == 4:  # Background (organ, pads)\n        set_track_velocity(track, 55)\nmid.save(midi_path)\n```\n\n### Velocity Guidelines\n\n**By Role:**\n- Lead instruments (melody, solos): **90-105**\n- Rhythm instruments (guitar skanks, comping): **85-100**\n- Bass: **75-85**\n- Drums: **70-90**\n- Background (pads, organs): **50-65**\n\n**By Frequency Range:**\n- **Low (20-250 Hz)**: Bass, kick - only ONE dominant at 75-85\n- **Mid (250-2000 Hz)**: Most crowded - use velocity to separate (lead 90+, background 50-65)\n- **High (2000+ Hz)**: Hi-hats, cymbals - 70-85 for clarity without harshness\n\n### Soundfont Level Issues\n\nFluidR3_GM instruments are recorded at different levels. Even with correct velocities, some instruments may be inaudible:\n\n**Quiet programs** (avoid for lead\u002Frhythm):\n- Program 27 (Electric Guitar - clean) - Very quiet\n- Program 24 (Acoustic Guitar - nylon)\n- Program 73 (Flute)\n\n**Better alternatives**:\n- Program 25 (Acoustic Guitar - steel) - 8-10dB louder, cuts through\n- Program 28 (Electric Guitar - muted) - Percussive\n- Program 30 (Distortion Guitar) - Aggressive\n\n**Additional fixes:**\n- Increase note duration (0.4 quarterLength minimum vs 0.25)\n- Use octave separation (move competing instruments to different octaves)\n- Extreme velocity contrast (quiet instrument at 110, loud at 40)\n\n### Mixing Checklist\n\nBefore rendering:\n- ✅ Lead at velocity 90-105\n- ✅ Background at velocity 50-65\n- ✅ Bass at velocity 75-85\n- ✅ Check for quiet instruments (programs 24, 27, 73) and use alternatives\n- ✅ Minimum 0.4 quarterLength for rhythm instruments\n\n## Resources\n\n- **music21 Documentation**: https:\u002F\u002Fweb.mit.edu\u002Fmusic21\u002Fdoc\u002F\n- **General MIDI Spec**: https:\u002F\u002Fwww.midi.org\u002Fspecifications-old\u002Fitem\u002Fgm-level-1-sound-set\n- **Music Theory**: https:\u002F\u002Fwww.musictheory.net\u002F\n- **IMSLP (Free Scores)**: https:\u002F\u002Fimslp.org\u002F - Download classical MIDIs here!\n\n## Limitations\n\n- **Instrumental only** - No lyrics\u002Fvocals\n- **MIDI-based synthesis** - Not studio-quality recordings\n- **No real-time playback** - Files must be rendered before playback\n- **SoundFont quality** - Good but not as realistic as sample libraries\n\n## When to Use This Skill\n\n✅ User requests:\n- Original compositions with specific moods\u002Fstyles\n- Classical music in MP3 format\n- Timed music for videos\u002Fpresentations\n- Specific instrumentation (orchestral, piano, strings, etc.)\n- Dynamic music with crescendos, tempo changes\n\n❌ Not suitable for:\n- Vocal\u002Flyrical music\n- Audio mixing\u002Fmastering (reverb, EQ, compression)\n- Real-time MIDI playback\n- Professional studio recording quality",{"name":5,"version":42,"description":7,"when_to_use":43,"dependencies":44},"2.0.0","When users request downloadable .mp3 or .wav music files, original compositions, classical pieces, or timed music for videos. This skill emphasizes intelligence and composition over pre-made functions.","music21, midi2audio, pydub, mido, numpy, scipy","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill music-generation",{"tool":60,"command":61},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill music-generation",{"tool":63,"command":64},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill music-generation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002FSKILL.md",true,[68,74,78,84,88,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,254,258,262,266,270,274,278,282,286,290,294,298,302,306,310,314,318,322,326],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},".github\u002Fworkflows\u002Fbranch-protection.yml","REFERENCE","参考文档",760,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002F.github\u002Fworkflows\u002Fbranch-protection.yml",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},".github\u002Fworkflows\u002Fdeploy.yml",1273,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002F.github\u002Fworkflows\u002Fdeploy.yml",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},".gitignore","OTHER","其他",237,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002F.gitignore",{"path":85,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":86,"sourceHtmlUrl":87},"AGENTS.md",163058,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002FAGENTS.md",{"path":89,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"install.sh","SCRIPT","脚本",1847,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Finstall.sh",{"path":95,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":96,"sourceHtmlUrl":97},"README.md",4493,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002FREADME.md",{"path":99,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":100,"sourceHtmlUrl":101},"requirements.txt",87,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Frequirements.txt",{"path":103,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":104,"sourceHtmlUrl":105},"rules\u002F_sections.md",2153,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002F_sections.md",{"path":107,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":108,"sourceHtmlUrl":109},"rules\u002F_template.md",631,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002F_template.md",{"path":111,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":112,"sourceHtmlUrl":113},"rules\u002Fapi-use-dto-serialization.md",4385,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fapi-use-dto-serialization.md",{"path":115,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":116,"sourceHtmlUrl":117},"rules\u002Fapi-use-interceptors.md",5518,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fapi-use-interceptors.md",{"path":119,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":120,"sourceHtmlUrl":121},"rules\u002Fapi-use-pipes.md",5386,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fapi-use-pipes.md",{"path":123,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":124,"sourceHtmlUrl":125},"rules\u002Fapi-versioning.md",4986,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fapi-versioning.md",{"path":127,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":128,"sourceHtmlUrl":129},"rules\u002Farch-avoid-circular-deps.md",2021,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-avoid-circular-deps.md",{"path":131,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":132,"sourceHtmlUrl":133},"rules\u002Farch-feature-modules.md",2316,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-feature-modules.md",{"path":135,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":136,"sourceHtmlUrl":137},"rules\u002Farch-module-sharing.md",3876,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-module-sharing.md",{"path":139,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":140,"sourceHtmlUrl":141},"rules\u002Farch-single-responsibility.md",2922,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-single-responsibility.md",{"path":143,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":144,"sourceHtmlUrl":145},"rules\u002Farch-use-events.md",3051,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-use-events.md",{"path":147,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":148,"sourceHtmlUrl":149},"rules\u002Farch-use-repository-pattern.md",2861,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Farch-use-repository-pattern.md",{"path":151,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":152,"sourceHtmlUrl":153},"rules\u002Fdb-avoid-n-plus-one.md",3888,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdb-avoid-n-plus-one.md",{"path":155,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":156,"sourceHtmlUrl":157},"rules\u002Fdb-use-migrations.md",3837,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdb-use-migrations.md",{"path":159,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":160,"sourceHtmlUrl":161},"rules\u002Fdb-use-transactions.md",4023,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdb-use-transactions.md",{"path":163,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":164,"sourceHtmlUrl":165},"rules\u002Fdevops-graceful-shutdown.md",5916,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdevops-graceful-shutdown.md",{"path":167,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":168,"sourceHtmlUrl":169},"rules\u002Fdevops-use-config-module.md",4446,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdevops-use-config-module.md",{"path":171,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":172,"sourceHtmlUrl":173},"rules\u002Fdevops-use-logging.md",5693,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdevops-use-logging.md",{"path":175,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":176,"sourceHtmlUrl":177},"rules\u002Fdi-avoid-service-locator.md",2981,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-avoid-service-locator.md",{"path":179,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":180,"sourceHtmlUrl":181},"rules\u002Fdi-interface-segregation.md",5224,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-interface-segregation.md",{"path":183,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":184,"sourceHtmlUrl":185},"rules\u002Fdi-liskov-substitution.md",7275,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-liskov-substitution.md",{"path":187,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":188,"sourceHtmlUrl":189},"rules\u002Fdi-prefer-constructor-injection.md",2309,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-prefer-constructor-injection.md",{"path":191,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":192,"sourceHtmlUrl":193},"rules\u002Fdi-scope-awareness.md",2618,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-scope-awareness.md",{"path":195,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":196,"sourceHtmlUrl":197},"rules\u002Fdi-use-interfaces-tokens.md",2588,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fdi-use-interfaces-tokens.md",{"path":199,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":200,"sourceHtmlUrl":201},"rules\u002Ferror-handle-async-errors.md",3531,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ferror-handle-async-errors.md",{"path":203,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":204,"sourceHtmlUrl":205},"rules\u002Ferror-throw-http-exceptions.md",3181,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ferror-throw-http-exceptions.md",{"path":207,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":208,"sourceHtmlUrl":209},"rules\u002Ferror-use-exception-filters.md",3695,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ferror-use-exception-filters.md",{"path":211,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":212,"sourceHtmlUrl":213},"rules\u002Fmicro-use-health-checks.md",5985,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fmicro-use-health-checks.md",{"path":215,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":216,"sourceHtmlUrl":217},"rules\u002Fmicro-use-patterns.md",5102,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fmicro-use-patterns.md",{"path":219,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":220,"sourceHtmlUrl":221},"rules\u002Fmicro-use-queues.md",6214,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fmicro-use-queues.md",{"path":223,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":224,"sourceHtmlUrl":225},"rules\u002Fperf-async-hooks.md",2918,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fperf-async-hooks.md",{"path":227,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":228,"sourceHtmlUrl":229},"rules\u002Fperf-lazy-loading.md",3822,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fperf-lazy-loading.md",{"path":231,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":232,"sourceHtmlUrl":233},"rules\u002Fperf-optimize-database.md",3276,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fperf-optimize-database.md",{"path":235,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":236,"sourceHtmlUrl":237},"rules\u002Fperf-use-caching.md",3524,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fperf-use-caching.md",{"path":239,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":240,"sourceHtmlUrl":241},"rules\u002Fsecurity-auth-jwt.md",4083,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fsecurity-auth-jwt.md",{"path":243,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":244,"sourceHtmlUrl":245},"rules\u002Fsecurity-rate-limiting.md",3324,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fsecurity-rate-limiting.md",{"path":247,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":248,"sourceHtmlUrl":249},"rules\u002Fsecurity-sanitize-output.md",3815,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fsecurity-sanitize-output.md",{"path":251,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":252,"sourceHtmlUrl":253},"rules\u002Fsecurity-use-guards.md",3647,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fsecurity-use-guards.md",{"path":255,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":256,"sourceHtmlUrl":257},"rules\u002Fsecurity-validate-all-input.md",3393,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Fsecurity-validate-all-input.md",{"path":259,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":260,"sourceHtmlUrl":261},"rules\u002Ftest-e2e-supertest.md",4800,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ftest-e2e-supertest.md",{"path":263,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":264,"sourceHtmlUrl":265},"rules\u002Ftest-mock-external-services.md",4613,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ftest-mock-external-services.md",{"path":267,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":268,"sourceHtmlUrl":269},"rules\u002Ftest-use-testing-module.md",4392,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Frules\u002Ftest-use-testing-module.md",{"path":271,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":272,"sourceHtmlUrl":273},"scripts\u002F__init__.py",64,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002F__init__.py",{"path":275,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":276,"sourceHtmlUrl":277},"scripts\u002Faudio_validate.py",6233,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Faudio_validate.py",{"path":279,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":280,"sourceHtmlUrl":281},"scripts\u002Fbuild-agents.ts",8661,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Fscripts\u002Fbuild-agents.ts",{"path":283,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":284,"sourceHtmlUrl":285},"scripts\u002Fbuild.sh",369,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Fscripts\u002Fbuild.sh",{"path":287,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":288,"sourceHtmlUrl":289},"scripts\u002Fdrum_synthesizer.py",7358,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fdrum_synthesizer.py",{"path":291,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":292,"sourceHtmlUrl":293},"scripts\u002Fmelodic_synthesizer.py",12616,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fmelodic_synthesizer.py",{"path":295,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":296,"sourceHtmlUrl":297},"scripts\u002Fmidi_inventory.py",6419,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fmidi_inventory.py",{"path":299,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":300,"sourceHtmlUrl":301},"scripts\u002Fmidi_render.py",6080,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fmidi_render.py",{"path":303,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":304,"sourceHtmlUrl":305},"scripts\u002Fmidi_transform.py",8484,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fmidi_transform.py",{"path":307,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":308,"sourceHtmlUrl":309},"scripts\u002Fmidi_utils.py",3519,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fmidi_utils.py",{"path":311,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":312,"sourceHtmlUrl":313},"scripts\u002Fpackage-lock.json",8662,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Fscripts\u002Fpackage-lock.json",{"path":315,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":316,"sourceHtmlUrl":317},"scripts\u002Fpackage.json",428,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fnestjs-best-practices\u002Fscripts\u002Fpackage.json",{"path":319,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":320,"sourceHtmlUrl":321},"scripts\u002Frender_electronic.py",16647,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Frender_electronic.py",{"path":323,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":324,"sourceHtmlUrl":325},"scripts\u002Fsynthesis_presets.py",13294,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fscripts\u002Fsynthesis_presets.py",{"path":327,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":328,"sourceHtmlUrl":329},"skill-report.json",12126,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcam10001110101\u002Fmusic-generation\u002Fskill-report.json",[331,340,349,358,364,370],{"skillNo":332,"name":333,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":334,"categories":335,"keywords":336,"publishedAt":37},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[337,338,339],"model","model hierarchy","model hierarchy skill",{"skillNo":341,"name":342,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":343,"categories":344,"keywords":345,"publishedAt":37},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[346,347,348],"MCP","zoom","zoom mcp",{"skillNo":350,"name":351,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":352,"categories":353,"keywords":354,"publishedAt":37},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[355,356,357,347],"sdk","zoom apps sdk","apps",{"skillNo":359,"name":360,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":361,"categories":362,"keywords":363,"publishedAt":37},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[360],{"skillNo":365,"name":366,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":367,"categories":368,"keywords":369,"publishedAt":37},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[366],{"skillNo":371,"name":372,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":373,"categories":374,"keywords":375,"publishedAt":37},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[372]]