lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

cool, i have tried smidi , but thats for pys60

On Tue, Sep 14, 2010 at 9:10 AM, <> wrote:

Another module:
doc homepage:
test script:
version:        3.7

MIDI.lua - for Reading, writing and manipulating MIDI data
translates the MIDI data into Lua variables and back, e.g.

 local MIDI = require 'MIDI'
 local my_score = {
   96,  -- ticks per beat
   {    -- first track
      {'patch_change', 0, 1, 11}, -- vibraphone on channel 1
      {'set_tempo', 0, 750000},   -- microseconds per beat
      {'note', 5, 96, 1, 25, 100},
      {'note', 101, 96, 1, 29, 100},
   },  -- end of first track
 local f = assert('f.mid','wb'))

and, aside from offering this low-level access, also offers a
number of different functions to perform common manipulations.

It's a translation into Lua of my Python module:
which is the basis of my midisox program, which already has a
Perl version, and may soon get a Lua version...

( Translating is a process which I find really instructive; plus
 I really like having compatible calling-interfaces to my most-
 -needed-stuff in different languages; also the resulting study
 of the code and the new test-scripts finds and fixes lots of
 little bugs that no-one seems to spot otherwise. )

May it be useful,  let me know of problems,
Peter Billam      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2

welcom to gtalk me