Skip to content

Commit

Permalink
MIDI - extract to new namespace and hugely improve API
Browse files Browse the repository at this point in the history
Now with support for:

* midi clocks
* cc messages
* mode selection
* channel messages
  • Loading branch information
samaaron committed Jan 11, 2017
1 parent dde0c77 commit 32b0445
Show file tree
Hide file tree
Showing 2 changed files with 542 additions and 76 deletions.

2 comments on commit 32b0445

@samaaron
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note - the final API will include a way to specify a set of matchers on which MIDI devices to send the message on.

@rbnpi
Copy link
Contributor

@rbnpi rbnpi commented on 32b0445 Jan 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've linked the new midi module into server.rb (require_relative and the klass.send call) and runtime.rb and preparser.rb (require_relative) (not done a doc link yet) and tried out some of the commands. I found that the midi :e1, dur: 0.1 gave a runtime error looking for __sched_ahead_time
I added

    def __current_sched_ahead_time
       @mod_sound_studio.sched_ahead_time
    end

to the runtime.rb file (just after def __current_sched_at_time) and this got it working. Works great playing a synth on my iPad!
{Now added in the documentation as well (require_relative "../sonicpi/lib/sonicpi/lang/midi in qt-doc.rb)}

Please sign in to comment.