Coder Social home page Coder Social logo

arduinoopl2's Introduction

OPL2 Audio Board

This repository contains the OPL2 Audio Board library for Arduino, Raspberry Pi and Orange Pi as well as a number of examples on how the board can be used. Use this library to control the YM3812 chip and play music, sound effects or have fun with OPL2 FM-synthesis.

Current library version is 1.2.2

To obtain your own OPL2 Audio Board visit the Tindie store.

For more info visit the Hackaday project page.

Assembling the kit

For a step by step guide on how to assemble the kit please read the Assembly guide.

Installing the library

Arduino

The easiest way to install the library is to clone this repo in the libraries folder of the Arduino IDE. Alternatively you can download the zip file and extract it in the libraries folder.

For more information see the instructions on the Arduino website.

Raspberry Pi / Orange Pi

To install the library onto your Pi clone this repo and run ./build. You can specify the type of board you are using as a command line agrument. Use ./build -opi for Orange Pi or ./build -rpi for Raspberry Pi. If you do not specify a board type the build will assume you're building the library for a Raspberry Pi.

The OPL2 library requires WiringPi to be installed on your Pi. Normally this library is already installed.

Connecting the OPL2 Audio Board

You can connect the OPL2 Audio Board directly to a speaker, however for the best results I recommend you connect some active (amplified) speakers. Headphones or line level recording will also work great. See the tables below how to connect the OPL2 Audio Board to your development platform.

Arduino

OPL2 Board Arduino Pin
A0 9
Data 11*
Latch 10
Shift 13*
Reset 8

*Use pins 51 and 52 respectively on Arduino Mega, or refer to https://www.arduino.cc/en/Reference/SPI for your Arduino board.

Raspberry Pi / Orange Pi

OPL2 Board GPIO Pin
+5v 2
GND 6
A0 16
Data 19
Latch 12
Shift 23
Reset 18

Using the OPL2 Audio Board

Arduino

After installing the library and restarting the Arduino IDE you will find a number of examples under the File > Examples > ArduinoOPL2 menu. These examples can be found in the examples folder of the library.

Raspberry Pi / Orange Pi

After building the library you will find a number of examples in the examples_pi folder. The examples have been compiled during installation of the library, so you should be ready to dive right in! Try running sudo ./demotune for example from the examples_pi/demotune folder.

When compiling your own code using the OPL2 library don't forget to specify the library using the -lOPL2 argument e.g. gcc -std=c++11 -Wall -o my_program my_program.cpp -lOPL2 -lwiringPi

arduinoopl2's People

Contributors

bsutherland avatar dhrbaksteen avatar judgebeeb avatar

Watchers

 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.