Skip to content

b3orn/erl_coremidi

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Erlang Core MIDI

Erlang wrapper library for Core MIDI.

test() ->
    application:ensure_all_started(coremidi),

    {ok, Devices} = coremidi:list_devices(),

    {ok, Con} = coremidi:start_link([{device, "My MIDI Device"}, {entity, {0, 0}}]),


    % blocking recv
    Msg1 = coremidi:recv(Con),

    coremidi:send(Con, Msg1),


    % non blocking recv
    coremidi:arecv(Con),

    receive
        {Con, Msg2} ->
            coremidi:send(Con, Msg2)

    end,


    % non blocking sub
    coremidi:sub(Con),

    lists:foreach(fun(_) ->
            receive
                {Con, Msg} ->
                    coremidi:send(Con, Msg)

            end
        end,
        lists:seq(0, 9)),

    coremidi:unsub(Con),

    coremidi:stop(Con).

About

Erlang wrapper library for Core MIDI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published