GithubHelp home page GithubHelp logo

moogerfucker's Introduction

moogerfucker

Square Wave Arduino Synthetizer

Introduction:

100% Digital, aside from input/output no VCO or anything fancy.
Just simple square waves.

Requeriments:

1 Arduino
4 10k Potenciometers
1 Buzzer

Wiring:

Alt text

Analog Inputs:


0 -> This potenciometer controls the tones (C,D,E,F,G,A,B) it acts as a discrete potenciometer.  

1 -> This potenciometer controls the octave number, also in a discrete manner. (from 2 to 7 according to the scientific pitch notation)

2 -> Este potenciómeter controls the pitch  of the tone in a continuous manner. (200Hz Range)

3 -> This potenciometer controls the time of wait between the pulsations to the buzzer/speaker.

Digital Out (pin 8):

This is the buzzer/speaker, its our output.

Resources:

http://en.wikipedia.org/wiki/Scientific_pitch_notation
http://arduino.cc/en/Tutorial/Tone

Explanation:

We start with a table with our initial tonesfrqeuencies. (0 in the scientific pitch notation table)

16, 18, 20, 22, 25, 28, 31
C, D, E, F, G, A, B
(This is what potenciometer 0 does)

Consider a certain tone, with its initial frequency being X.

To calculate its central frequency one would do: X *(2^4) where 4 is the central tone.

If we want to go up a octave from there, we do a square on that frequency. (X^2)
If we want to go down a octave we take the square root of that frequency. (X^1/2)
(Tis is what potenciometer 1 does)

Now the tricky part is the shift, we want to be able to have all the range so we can reach the semi-tones
and that way have the full range of the frequencies, we accomplish that like this:

We define a range that we can substract or add to our basic tone frequency (X), this range is X/4
why the 4? well, with 4 we go all the way down to a semitone down, and all the way up to a semitone up.

Meaning the range is actually: X - X/4 To X+(X/4)*2

This will give us the maximum freqency and be able to pull all the tones/semitones from here.
(This is what potenciometer 2 does)

The wait between pulsations its a simple wait between 0 and 250ms.
(This is what potenciometer 3 does)

moogerfucker's People

Contributors

ozkar99 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.