Coder Social home page Coder Social logo

beep's Introduction

beep

All Contributors

Synthesizing raw PCM music using Go from scratch.

TODO

  • Refactor to idiomatic go code

  • Rename to a proper name

  • Make examples

  • Make note durations methods on beep.Melody (as they are dependant on the note length and BPM)

  • Implement a simple format - mp3 / wav

  • Define all notes in all octaves a seperate file

  • GUI + keybinds - Will be a separate project

  • Play multiple notes at once (chords)

    • f(x) + g(x) where f and g produce different notes, should result in them playing at the same time
    • Note -> SingleNote, add Chord (multiple notes). Both implement new Note interface
    type Note interface {
        Samples(sampleRate float64, generator Generator, adsr ADSR) []float64
    }
  • Support for merging melodies (playing 2 melodies at the same time)

    g := beep.NewMelody(...)
    g.AddNotes(...)
    
    // or
    g.Runs[0].AddNotes(...)
    
    // more runs, i.e. staves
    g.NewRun(notes...)
  • Support for concatenating melodies / have melodies with differing BPM

    g := beep.NewMelody(...)
    g.AddNotes(...)
    n := beep.NewMelody(...)
    n.AddNotes(...)
    o := g.Concat(n) // combines both melodies and makes a longer one
  • Dual Channel support (left and right ear)

  • Fix clipping in release of linear ADSR (theoretically negligible)

  • Implement logarithmic / exp ADSR

  • Support for dotted notes

  • Overtones

  • Fix periods for generators that aren't sin (?)

How to play music

ffplay megolovania.bin -autoexit -showmode 1 -f f64le -ar 48000

References

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Simo Aleksandrov

๐Ÿ’ป ๐Ÿš‡

Viktor Danov

๐Ÿ’ป ๐Ÿš‡

This project follows the all-contributors specification. Contributions of any kind welcome!

beep's People

Contributors

allcontributors[bot] avatar fr3fou avatar viktordanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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