npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-synthesizer

v1.0.1

Published

Multi-track browser synthesizer for DeepSeek Harness. Loop a piano-roll sketch while the session stays open.

Readme

dsh-synthesizer

DeepSeek Harness 里的多轨合成器与口袋律动工作站(Groovebox)。在钢琴卷帘或 8 件套鼓机步进器上编曲,通过实时 Web Audio 减法合成器塑形音色并循环播放。切回对话后音乐在后台继续播放,侧栏底部可随时播放/暂停与静音。工程连同音色参数保存在当前 profile 的 storages/dsh-synthesizer/projects/。

界面

页面分三层:顶栏(播放、速度、小节、工程)、左侧音轨列表、右侧当前音轨的网格。网格下方的抽屉有三个标签:

  • 音色:先选乐器(主音、贝斯、铺底、键盘、酸液、拨弦、红白机、星际铃),再选该乐器下的音色,每种乐器有 3 到 4 个;调过参数后显示"已调整"。下面是明亮度、咬字、厚度、空间四个宏旋钮,"全部参数"里是波形、失谐、低八度、过载、滤波器和 ADSR。鼓轨在这里选鼓组(电子鼓、808、磁带 Lo-Fi、8-Bit)并试听 8 个鼓件。
  • 编曲:调式高亮、一键生成乐句(鼓轨 5 种节奏,旋律轨 5 种乐句)、升降八度、清空本轨。
  • 弹奏:双八度屏幕琴键。先点一下网格,再用电脑键盘 A–L 弹奏,Z/X 切八度;打开"边弹边录"后,播放时弹的音会量化记入当前音轨。

所有编辑都可以用 ⌘Z / Ctrl+Z 撤销。

工程

点击顶栏的工程名打开工程面板:

  • 列表:每个工程显示速度、小节数、音符数和修改时间,点击打开。悬停一行可以重命名(也可双击名称)、复制、导出为文件、删除。超过 8 个工程时出现搜索框。
  • 新建:空白工程、7 首示范曲、随机生成。当前工程改动过时,示范曲会开成新工程,不会覆盖原作品。重名会自动加序号。
  • 导入:读取导出的 .dsh-synth.json,总是作为新工程加入,不会覆盖现有工程。
  • 删除:删除后 10 秒内可以在底部提示里撤销。

改动在 500ms 后自动保存,窗口隐藏或关闭时立即保存;保存失败时顶栏显示"未保存 · 重试"。再次打开时回到上次打开的工程。

每个工程是 profile 下的一个 JSON 文件,包含速度、小节、调式和每条音轨的音色与音符。选中的音轨、键盘八度这类界面状态只记在浏览器本地。上限是 32 个工程、每个 256KB。

颜色跟随宿主的 --dsw-alias-* 主题变量,亮色和暗色主题都适配;样式集中在 src/client/styles.ts。

律动、力度与导出

  • 摇摆:顶栏的"摇摆"把每拍里第二、第四个十六分音符往后推,0 到 60,33 是三连音的摇摆感。
  • 力度:网格底部的力度条,每一步一根,上下拖动调整;同一步上的和弦一起变。音符颜色深浅对应力度。
  • LFO 与效果:音色的"全部参数"里有 LFO(作用于音高、滤波或音量)以及回声、混响两个发送量。
  • 导出:工程面板底部可以把当前工程导出为 MIDI(每条音轨一轨,鼓在第 10 通道,摇摆已写入音符时间)或 WAV(离线渲染一遍循环加尾音,与播放一致,静音的音轨不包含在内)。

合成引擎

每条合成音轨是一个减法合成器:波形(锯齿/方波/三角/正弦)、齐奏失谐、低八度振荡器、过载、低通滤波器(截止、共鸣、包络扫频)、ADSR 包络、一个可作用于音高、滤波或音量的 LFO,以及随速度同步的附点八分回声和混响两路发送,主总线上有压缩器。鼓轨是 8 件套合成鼓,有四套鼓组可选,鼓件按自身长度响完,不受音符长度影响(底鼓 C2、边击 C#2、军鼓 D2、拍手 D#2、闭镲 F#2、通鼓 A2、开镲 A#2、吊镲 C#3)。

安装

npm install
npm run build
dsh plugin --profile <profile> add /path/to/dsh-synthesizer

Host 的 Fetch 路由只投递精确的 GET 和 POST。列出和读取是 GET /api/dsh-synthesizer/projects(带 ?id= 时读一个工程),保存是 POST 同一路径,删除是 POST /api/dsh-synthesizer/projects/delete。

开发

npm test
npm run typecheck
npm run build