Coder Social home page Coder Social logo

mastervitronic / berry-libsox Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 10 KB

Berry-libsox is a Berry binding library for the Swiss Army knife of sound processing programs (SoX). (mirror from gitlab)

Home Page: https://gitlab.com/vitronic/berry-libsox

License: Other

Makefile 2.33% C 97.67%
berry berry-lang audio

berry-libsox's Introduction

berry-libsox: Berry bindings for libSoX

berry-libsox is a Berry binding library for the Swiss Army knife of sound processing programs (SoX).

It runs on GNU/Linux and requires Berry (>=0.1.10) and SoX (>=14.4.2).

Authored by: Díaz Devera Víctor Diex Gamar (Máster Vitronic)

Berry logo

License

MIT license . See LICENSE.

Documentation

See the Reference Manual.

Motivation:

This is a port of lua-libsox to test the capabilities of berry as a general purpose programming language.

Getting and installing

$ git clone https://gitlab.com/vitronic/berry-libsox.git
$ cd berry-libsox
berry-libsox$ make
berry-libsox$ make install # or 'sudo make install' (Ubuntu)

Example

#- Script: player.be

import libsox as sox

assert(sox.init())

input  = sox.open_read(_argv[1])
output = sox.open_write('default',input, 'alsa')

buf_sz = 8192*2
buffer = sox.buffer(buf_sz)
while true
	var sz = sox.read(input,buffer,buf_sz)
	if sz == 0 break end
	sox.write(output, buffer, sz)
end


sox.free_buffer(buffer)
sox.close(input)
sox.close(output)
sox.quit()

The script can be executed at the shell prompt with the standard Lua interpreter:

$ berry player.be sound.ogg

Other examples can be found in the examples/ directory contained in the release package

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

berry-libsox's People

Contributors

mastervitronic avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.