Coder Social home page Coder Social logo

asarandi / rattle Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 35 KB

simple rtttl player and software synthesizer using sdl2

Home Page: https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language

Makefile 1.46% C 98.54%
rtttl soundwave sound-synthesis sdl2-audio

rattle's Introduction

rattle

simple rtttl player i wrote while learning about sound wave generation

building:

brew install sdl2

make

usage:

  • command
./rattle
  • output
usage: ./rattle [-0|-1|-2|-3] [-v] [-f] [-t n] song
    -0    sine
    -1    square
    -2    triangle
    -3    sawtooth
    -v    verbose
    -f    disable fade
    -t n  transpose n steps

example:

  • command
./rattle -1 -v -t -2 'NokiaTun:d=4,o=5,b=225:8e6,8d6,f#,g#,8c#6,8b,d,e,8b,8a,c#,e,2a'
  • output
    name: NokiaTun
defaults: duration = 4, octave = 5, beats = 225
    data: 8e6,8d6,f#,g#,8c#6,8b,d,e,8b,8a,c#,e,2a
  note name: 8d6,    frequency: 1174.66 Hz, duration: 0.1333 s
  note name: 8c6,    frequency: 1046.50 Hz, duration: 0.1333 s
  note name: 4e5,    frequency:  659.26 Hz, duration: 0.2667 s
  note name: 4f#5,   frequency:  739.99 Hz, duration: 0.2667 s
  note name: 8b5,    frequency:  987.77 Hz, duration: 0.1333 s
  note name: 8a5,    frequency:  880.00 Hz, duration: 0.1333 s
  note name: 4c5,    frequency:  523.25 Hz, duration: 0.2667 s
  note name: 4d5,    frequency:  587.33 Hz, duration: 0.2667 s
  note name: 8a5,    frequency:  880.00 Hz, duration: 0.1333 s
  note name: 8g5,    frequency:  783.99 Hz, duration: 0.1333 s
  note name: 4b4,    frequency:  493.88 Hz, duration: 0.2667 s
  note name: 4d5,    frequency:  587.33 Hz, duration: 0.2667 s
  note name: 2g5,    frequency:  783.99 Hz, duration: 0.5333 s
  • see tunes.txt for rtttl songs

keyb

simple keyboard synthesizer

building:

brew install sdl2

make keyb

usage:

usage: keyb [--sine | --square | --sawtooth | --triangle]

key mappings:

 _______________________________________________________
|  | | | |  |  | | | | | |  |  | | | |  |  | | | | | |  |
|  | | | |  |  | | | | | |  |  | | | |  |  | | | | | |  |
|  | | | |  |  | | | | | |  |  | | | |  |  | | | | | |  |
|  |_| |_|  |  |_| |_| |_|  |  |_| |_|  |  |_| |_| |_|  |
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |
|___|___|___|___|___|___|___|___|___|___|___|___|___|___|

    2   3       5   6   7       9   0       =   BS              <<-- black keys
  q   w   e   r   t   y   u   i   o   p   [   ]   \             <<-- white keys

 _______________________________________
|  | | | |  |  | | | | | |  |  | | | |  |
|  | | | |  |  | | | | | |  |  | | | |  |
|  | | | |  |  | | | | | |  |  | | | |  |
|  |_| |_|  |  |_| |_| |_|  |  |_| |_|  |
|   |   |   |   |   |   |   |   |   |   |
|   |   |   |   |   |   |   |   |   |   |
|___|___|___|___|___|___|___|___|___|___|

    s   d       g   h   j       l   ;                           <<-- black keys
  z   x   c   v   b   n   m   ,   .   /                         <<-- white keys

rattle's People

Contributors

asarandi avatar

Stargazers

 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.