Giter Site home page Giter Site logo

wavmf's Introduction

FortranWAV

Table of contents

Basic Fortran module for reading .WAV file samples and metadata.

Install

If you want the defaults (library installed in /usr/local/lib/ and mod file in /usr/local/include/) just:

$ git clone https://github.com/SarKing/wavMF
$ cd wavmf
$ make
$ sudo make install

You can change the installation folder by editing the firsts lines of the Makefile

Uninstall

If you installed with the defaults just:

$ sudo make uninstall 

Change the Makefile accordingly with your installation path.

Usage

Disclaimer

There is no error handling and it (natively) only works with 2-channel 16-bit .WAV files. This is one of my first attempts at coding with Fortran, so don't expect much.

Library

If you installed the library (using the Makefile) you can compile your code indicating the path of the .mod file, i.e. (using gfortran)

$ gfortran -c foo.f90 -I /usr/local/include/

And then link indicanting the lib path

$ gfortran foo.o -L /usr/local/lib -lwavmf

Note tha you can also skip the installation and use the .mod and .o files located in the mod/ and /obj folder after compilation with the Makedile.

Module

All the functions in the library are documented in the source code, here is just an overview:

openwav(filename) -> Open the wav file.
getnchannels(fileunit) -> Reads the number of channels.
getfs(fileunit) -> Reads the sampling frequency.
getbitspersample(fileunit) -> Reads the bits per sample of the recording.
getdatasize(fileunit) -> Calculates the number of samples that each channels has.
readwavdata(fileunit) -> Reads the samples as they are in the file.
audioread(fileunit) -> IDEM as readwavdata but returns the samples as normalized reals.

Author

Raul Estevez Gomez. Contact email: [email protected]
Please feel free to contact me if you have any type of correction or question.

License

You can read the license here

wavmf's People

Contributors

raul-estevez avatar

Stargazers

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