GithubHelp home page GithubHelp logo

midi-reader-haskell's Introduction

MIDI File Reader - Haskell

What is this?

MIDI File Reader written in Haskell. Target MIDI is SMF(=Standard MIDI Format).

Main Features

  • written in Haskell
  • parsed by Parsec

How to use

Build & Execution

$ stack build
$ stack exec midi-reader-haskell-exe test.mid

test.mid have to be replace with your MIDI FILE

Sample output

An output is like the following.

Header
MidiHeader {getMidiFormat = MidiFormat1, getTracksNum = 4, getTimeUnit = 480}
Track1
(DeltaTime 0,MetaEvent (MeasureEvent {getNn = 4, getDd = 2, getCc = 24, getBb = 8}))
(DeltaTime 0,MetaEvent (KeyEvent {getSharpOrFlat = Flat, getSharpOrFlatNum = 127, getKey = MajorKey}))
(DeltaTime 0,MetaEvent (KeyEvent {getSharpOrFlat = Sharp, getSharpOrFlatNum = 0, getKey = MajorKey}))
(DeltaTime 0,MetaEvent (KeyEvent {getSharpOrFlat = Sharp, getSharpOrFlatNum = 0, getKey = MajorKey}))
(DeltaTime 0,MetaEvent (TempoEvent 352942))
(DeltaTime 0,ControlChange {first = 176, second = 121, third = 0})
(DeltaTime 0,ControlChange {first = 192, second = 0, third = 0})
(DeltaTime 6151,ControlChange {first = 192, second = 100, third = 0})
(DeltaTime 10,ControlChange {first = 192, second = 64, third = 0})
(DeltaTime 91,ControlChange {first = 192, second = 0, third = 0})
(DeltaTime 93,ControlChange {first = 192, second = 0, third = 0})
(DeltaTime 16289,ControlChange {first = 192, second = 1, third = 0})
(DeltaTime 3840,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 0})
(DeltaTime 13,NoteOn {getChannel = 0, getPitch = 64, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 64, getVelocity = 0})
(DeltaTime 13,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 0})
(DeltaTime 13,NoteOn {getChannel = 0, getPitch = 67, getVelocity = 80})
(DeltaTime 455,NoteOn {getChannel = 0, getPitch = 67, getVelocity = 0})
(DeltaTime 25,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 65, getVelocity = 0})
(DeltaTime 13,NoteOn {getChannel = 0, getPitch = 67, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 67, getVelocity = 0})
(DeltaTime 13,NoteOn {getChannel = 0, getPitch = 69, getVelocity = 80})
(DeltaTime 455,NoteOn {getChannel = 0, getPitch = 69, getVelocity = 0})
(DeltaTime 25,NoteOn {getChannel = 0, getPitch = 70, getVelocity = 80})
(DeltaTime 227,NoteOn {getChannel = 0, getPitch = 70, getVelocity = 0})
...

(The outptut is very long. So it is elided.)

midi-reader-haskell's People

Contributors

nwtgck avatar

Watchers

James Cloos 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.