Code Monkey home page Code Monkey logo

synth's Introduction

Synth

Sound synthesizer using C & PortAudio, with a Haskell front-end

#Compiling A makefile has been setup to build Synth. Typing 'make' in the terminal will produce the following executables as long as your dependencies are set-up correctly:

  • example : A C program that plays some tones in a loop.
  • example-hs : A similar executable to example, but written in Haskell
  • mary-hs : Haskell program that plays 'Mary Had A Little Lamb'

#Dependencies Synth depends on stdlib's math library, pthreads, and PortAudio V19

#Using Synth

Synth is built around a simple interface which allows users to 'schedule' notes on different instruments or oscillators.

The interface is defined by the following C functions:

  • initSynth() : Initializes Synth for use
  • termSynth() : Waits for every oscillator to finish playing it's scheduled notes, then shuts down Synth
  • playOsc(int id, int ms, double hz) : plays a note with the frequency of hz for ms milliseconds on the oscillator with the given id.
  • restOsc(int id, int ms) : Keeps the oscillator with the given id from playing a sound for ms milliseconds
  • endOsc(int id) : Signals the oscillator that it's done playing. termSynth won't finish until this is called for all oscillators

synth's People

Contributors

nwagg14 avatar

Watchers

James Cloos avatar Teemu Kallio 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.