Giter Club home page Giter Club logo

avr-musicbox's Introduction

avr-musicbox

avrマイコンとスピーカだけで作れる和音再生可能な電子オルゴール

GitHub

参考元 https://hello-world.blog.ss-blog.jp/search/?keyword=%E9%9F%B3%E6%A5%BD%E3%82%92%E6%BC%94%E5%A5%8F%E3%81%97%E3%81%9F%E3%81%84

機能

  • avrとスピーカーの直結可
  • タクトスイッチとLED
  • 4ch矩形波
  • 音域: C1~B7
  • 楽譜毎にループ機能
  • チャンネル毎に設定可能
    • 減衰の有無
    • パルス幅(1/2, 1/4)
    • 音量(1bit)

対応AVR

  • ATTiny85(t85)
    • t45も可
  • ATTiny202(t202)
    • t402も可

ピンの機能は各main.cの先頭にメモあり

譜面作成

Music Macro Languageライクの記法で譜面作成可能

譜面作成 mml.html

フォーマット

header 2byte
  TTTTTTTT
  TTT____L
    TickPerMinute=(beat/minute=BPM)*(tick/beat=beat(♩(1/4) in most)/minNoteValue) 11bit
    loop 1bit
track
  0 1byte
  commands 1byte
    1LOONNNN
      note=NNNN+(O+(baseMode?1:4))*12;
      length=tick[L];
      play();

    01LTTTTT
      tick[L]=TTTTT;

    001_BVME
      bass=B;
      halfVol=V;
      pulseMod=M;
      envelope=!E;

    00011111~00000010 reserved

    00000001
      break;
0 0 2byte

使い方

platformio core を使用 必要に応じてインストール

各ディレクトリにてpio runで書き込み

PCB

KiCADのデータがあるかも pcb-stuff

avr-musicbox's People

Contributors

mcbeeringi avatar

Watchers

 avatar

Forkers

781sazanka

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.