Coder Social home page Coder Social logo

pico_synth_ex's Introduction

pico_synth_ex v0.1.0 (2021-09-02)

概要

Raspberry Pi Pico用のポリフォニック・シンセサイザです.

『Interface 2021年8月号』で解説されているモノフォニック・シンセサイザ(プログラム9)を拡張して,

  • 4和音演奏の実現
  • 2個目のオシレータ,LFO(低周波発振器),EG(包絡線発生器)の追加
  • オシレータのピッチ微調整対応

といった「本格的なシンセサイザに近づけるための対応」を試みました.

動作環境

このプログラムは,

  • Pimoroni Pico(ブートROMバージョン1(RP2040 bootrom B0 version))
  • Pimoroni Pico VGA Demo Base基板(PWMオーディオ出力に使用,市販品)
  • Raspberry Pi Pico C/C++ SDK version 1.1.2
  • GNU Arm Embedded Toolchain Version 9-2019-q4-major(gcc-arm-none-eabi version 9.2.1)

の組み合わせで動作確認しています.

ビルド方法

  1. pico_synth_exディレクトリにpico-sdk/external/pico_sdk_import.cmakeのコピーを置く.
  2. 環境変数PICO_SDK_PATHにpico-sdkディレクトリへのパスをセットする.
  3. buildディレクトリを作成し,pico-examplesと同様にcmakeやnmake(make)コマンドでビルドを行う.
  4. pico_synth.uf2ファイルが出力される.

仕様

  • 部品構成:(2オシレータ + 1フィルタ + 1アンプ + 1 LFO + 1 EG)× 4セット
  • 制御方法:UART通信(115200bps) ※MIDIやUSB MIDIには未対応
  • オーディオ出力:PWM(GPIO28,PWMキャリア周波数:48kHz,サンプリング周波数:48kHz)
    • 市販品のPimoroni Pico VGA Demo Base基板を使用

コントロール方法

このプログラムは,UART通信で特定の文字(コマンド)を送信することでコントロールできます.

  • 'q','w','e','r','t','y','u','i':ド,レ,ミ,ファ,ソ,ラ,シ,ドの音を鳴らす(音域:**のドから1オクターブ上のドまで)
  • '2','3','5','6','7':ド#,レ#,ファ#,ソ#,ラ#の音を鳴らす
  • '1'/'9':キーのオクターブシフト量を1下げる/上げる(-5~+4)
  • '0':全ての音を止める
  • 'A'/'a':オシレータの波形設定値を1下げる/上げる(0:下降ノコギリ波,1:矩形波)
  • 'S'/'s':オシレータ2粗ピッチ設定値を1下げる/上げる(+0~+24)
  • 'D'/'d':オシレータ2微ピッチ設定値を1下げる/上げる(+0~+32)
  • 'F'/'f':オシレータのミックス設定値を1下げる/上げる(0~64,オシレータ1と2のミックス・バランス)
  • 'G'/'g':フィルタのカットオフ設定値を1下げる/上げる(0~120,カットオフ周波数が約19Hz~約20kHzに変化)
  • 'H'/'h':フィルタのレゾナンス設定値を1下げる/上げる(0~5,Q値が約0.7~4.0に変化)
  • 'J'/'j':フィルタのEGからのカットオフ変調量設定値を1下げる/上げる(+0~+60)
  • 'X'/'x':EGのディケイ・タイム設定値を1下げる/上げる(0~64)
  • 'C'/'c':EGのサスティン・レベル設定値を1下げる/上げる(0~64)
  • 'B'/'b':LFOの深さ設定値を1下げる/上げる(0~64,ピッチの変調量)
  • 'N'/'n':LFOの速さ設定値を1下げる/上げる(0~64,周波数が約0.2Hz~約20Hzに変化)

状態プリント例

Pitch             : [  60,  64,  67,  71 ]
Gate              : [   1,   1,   1,   1 ]
Octave Shift      :  +0 (1/9)
Osc Waveform      :   0 (A/a)
Osc 2 Coarse Pitch:  +0 (S/s)
Osc 2 Fine Pitch  :  +4 (D/d)
Osc 1/2 Mix       :  16 (F/f)
Filter Cutoff     :  60 (G/g)
Filter Resonance  :   3 (H/h)
Filter EG Amount  : +60 (J/j)
EG Decay Time     :  40 (X/x)
EG Sustain Level  :   0 (C/c)
LFO Depth         :  16 (B/b)
LFO Rate          :  48 (N/n)
Start Time        :   44/  47
Processing Time   : 2238/2242

参考文献

pico_synth_ex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.