# pikopiko-runtime
[](https://crates.io/crates/pikopiko-runtime)
[](https://docs.rs/pikopiko-runtime)
[](https://github.com/lovelygenerator/pikopiko#ライセンス)
[](https://www.rust-lang.org)
> **English**: A `no_std`, heap-free runtime for pikopiko: the synth trait, a player for compiled event streams and built-in synths (AY-3-8912 / YM2149, buzzer, sfx engine), for microcontrollers and Wasm.
pikopiko のランタイム層。`#![no_std]` でヒープも使わない。PC で [`pikopiko`](https://crates.io/crates/pikopiko) が変換したイベント列バイナリを、マイコンや Wasm の上で鳴らす部品(`Synth` トレイト、`binary::Sequencer`、効果音の割り込み `interrupt::Interrupt`、音量エンベロープ、音程エフェクト)と、マイコンでも動く音源を持つ。PC の `pikopiko` の再生も同じ部品の上で動く。
| `ay`(既定) | `synth::ay`:AY-3-8912 / YM2149 |
| `buzzer`(既定) | `synth::buzzer`:圧電ブザー(PWM で鳴らす周波数とデューティ比を出す) |
| `sfx` | `synth::sfx`:効果音音源 `sfx` の合成エンジン(整数だけ) |
| `alloc` | `Vec`・`String` を返す便利な関数 |
| `libm` | `kit::m`(決定的な数学関数)、`kit::dsp::Svf`(状態変数フィルター)、`output`(出力の EQ:実機の出力回路の再現・機器ごとの帯域の補正) |
```toml
[dependencies]
pikopiko-runtime = "0.1"
```
## ドキュメント
- [取扱説明書 マイコン・Wasm で鳴らす](https://github.com/lovelygenerator/pikopiko/blob/main/docs/guide/08-embedded.md)
- [イベント列バイナリの形式](https://github.com/lovelygenerator/pikopiko/blob/main/docs/binary-format.md)
- [Event-sequence binary format (English)](https://github.com/lovelygenerator/pikopiko/blob/main/docs/en/binary-format.md)
- [API リファレンス(docs.rs)](https://docs.rs/pikopiko-runtime)
- [リポジトリ](https://github.com/lovelygenerator/pikopiko)
## ライセンス
MIT または Apache-2.0 のいずれかを選べる(`LICENSE-MIT`、`LICENSE-APACHE`)。