adamjmurray / mtk Goto Github PK
View Code? Open in Web Editor NEWMusic ToolKit for Ruby
License: Other
Music ToolKit for Ruby
License: Other
Setup hassle should be minimal
Could introduce an "mtk-lite" or "mtk-pure" gem with no dependencies later...
Either the midi-winmm gem has a bug on Windows 7 or I'm using that gem incorrectly. Here's what happens with the mtk command:
C:\Users\adam>mtk -l
INPUTS:
OUTPUTS:
* Microsoft GS Wavetable Synth
When specifying --input INPUT or --output OUTPUT, the first substring match will be used.
For example: --output IAC will use 'Apple Inc. IAC Driver' if it's the first OUTPUT containing 'IAC'
C:\Users\adam>mtk -e "c d e" -o GS
C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/map.rb:216: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0015 p:---- s:0073 b:0073 l:000072 d:000072 CFUNC :midiOutOpen
c:0014 p:0015 s:0065 b:0065 l:000064 d:000064 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/map.rb:216
c:0013 p:0065 s:0059 b:0059 l:000058 d:000058 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/output.rb:18
c:0012 p:0024 s:0054 b:0054 l:000053 d:000053 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/congruous_api_adapter.rb:23
c:0011 p:0024 s:0049 b:0049 l:000048 d:000048 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:64
c:0010 p:---- s:0044 b:0044 l:000043 d:000043 FINISH
c:0009 p:---- s:0042 b:0042 l:000041 d:000041 CFUNC :new
c:0008 p:0035 s:0038 b:0038 l:000037 d:000037 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:57
c:0007 p:0099 s:0033 b:0033 l:000032 d:000032 METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:52
c:0006 p:0678 s:0027 b:0027 l:001648 d:001648 TOP C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/bin/mtk:173
c:0005 p:---- s:0014 b:0014 l:000013 d:000013 FINISH
c:0004 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :load
c:0003 p:0167 s:0008 b:0008 l:00095c d:0015ec EVAL C:/Ruby193/bin/mtk:23
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:00095c d:00095c TOP
-- Ruby level backtrace information ----------------------------------------
C:/Ruby193/bin/mtk:23:in `<main>'
C:/Ruby193/bin/mtk:23:in `load'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/bin/mtk:173:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:52:in `find_by_name'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:57:in `open'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:57:in `new'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb:64:in `initialize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/congruous_api_adapter.rb:23:in `open'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/output.rb:18:in `enable'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/map.rb:216:in `winmm_func'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/map.rb:216:in `midiOutOpen'
-- C level backtrace information -------------------------------------------
C:\Windows\SysWOW64\ntdll.dll(ZwWaitForSingleObject+0x15) [0x77b1f8b1]
C:\Windows\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x76bc1194]
C:\Windows\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x76bc1148]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e5bb59]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new+0x17a) [0x62d3a856]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d3b533]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_check_safe_str+0x194) [0x62dee790]
[0x004011e6]
C:\Windows\syswow64\kernel32.dll(GetProfileStringW+0x12aa3) [0x76c0003f]
C:\Windows\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x77b774df]
-- Other runtime information -----------------------------------------------
* Loaded script: C:/Ruby193/bin/mtk
* Loaded features:
0 enumerator.so
1 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/encdb.so
2 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/iso_8859_1.so
3 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/transdb.so
4 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
5 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/rbconfig.rb
6 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
7 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
8 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults/operating_system.rb
9 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
10 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb
11 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
12 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
13 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
14 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
15 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
16 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
17 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/utf_16le.so
18 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/utf_16_32.so
19 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/single_byte.so
20 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/pitch_class.rb
21 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/pitch.rb
22 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/duration.rb
23 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/intensity.rb
24 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/interval.rb
25 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/variable.rb
26 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/helpers/collection.rb
27 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/helpers/pitch_collection.rb
28 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/helpers/pseudo_constants.rb
29 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/helpers/convert.rb
30 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/pitch_class_set.rb
31 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/melody.rb
32 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/chord.rb
33 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/events/event.rb
34 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/events/note.rb
35 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/events/parameter.rb
36 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/timeline.rb
37 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/constants/pitch_classes.rb
38 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/constants/pitches.rb
39 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/constants/intervals.rb
40 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/constants/intensities.rb
41 C:/Ruby193/lib/ruby/1.9.1/rational.rb
42 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/constants/durations.rb
43 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/pattern.rb
44 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/sequence.rb
45 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/cycle.rb
46 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/choice.rb
47 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/function.rb
48 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/lines.rb
49 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/palindrome.rb
50 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/chain.rb
51 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/patterns/for_each.rb
52 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/sequencers/event_builder.rb
53 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/sequencers/sequencer.rb
54 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/sequencers/step_sequencer.rb
55 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/sequencers/rhythmic_sequencer.rb
56 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/sequencers/legato_sequencer.rb
57 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/strscan.so
58 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/pathname.so
59 C:/Ruby193/lib/ruby/1.9.1/pathname.rb
60 C:/Ruby193/lib/ruby/gems/1.9.1/gems/citrus-2.4.1/lib/citrus/version.rb
61 C:/Ruby193/lib/ruby/gems/1.9.1/gems/citrus-2.4.1/lib/citrus.rb
62 C:/Ruby193/lib/ruby/gems/1.9.1/gems/citrus-2.4.1/lib/citrus/file.rb
63 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/lang/parser.rb
64 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk.rb
65 C:/Ruby193/lib/ruby/1.9.1/optparse.rb
66 C:/Ruby193/lib/ruby/1.9.1/forwardable.rb
67 C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/congruous_api_adapter.rb
68 C:/Ruby193/lib/ruby/1.9.1/thread.rb
69 C:/Ruby193/lib/ruby/1.9.1/singleton.rb
70 C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/platform.rb
71 C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/type_conversion.rb
72 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/1.9/ffi_c.so
73 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/platform.rb
74 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/types.rb
75 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/library.rb
76 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/errno.rb
77 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/pointer.rb
78 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/memorypointer.rb
79 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/struct_layout_builder.rb
80 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/struct.rb
81 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/union.rb
82 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/managedstruct.rb
83 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/callback.rb
84 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/io.rb
85 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/autopointer.rb
86 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/variadic.rb
87 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/enum.rb
88 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi/ffi.rb
89 C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0-x86-mingw32/lib/ffi.rb
90 C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/device.rb
91 C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/input.rb
92 C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/map.rb
93 C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm/output.rb
94 C:/Ruby193/lib/ruby/gems/1.9.1/gems/midi-winmm-0.1.10/lib/midi-winmm.rb
95 C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi/adapter/midi-winmm.rb
96 C:/Ruby193/lib/ruby/gems/1.9.1/gems/unimidi-0.3.3-x86-mingw32/lib/unimidi.rb
97 C:/Ruby193/lib/ruby/1.9.1/ostruct.rb
98 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/unimidi_input.rb
99 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/input.rb
100 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamelan-0.3/lib/gamelan/timer.rb
101 C:/Ruby193/lib/ruby/gems/1.9.1/gems/PriorityQueue-0.1.2/ext/priority_queue/CPriorityQueue.so
102 C:/Ruby193/lib/ruby/gems/1.9.1/gems/PriorityQueue-0.1.2/lib/priority_queue/c_priority_queue.rb
103 C:/Ruby193/lib/ruby/gems/1.9.1/gems/PriorityQueue-0.1.2/lib/priority_queue.rb
104 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamelan-0.3/lib/gamelan/queue.rb
105 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamelan-0.3/lib/gamelan/scheduler.rb
106 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamelan-0.3/lib/gamelan/task.rb
107 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gamelan-0.3/lib/gamelan.rb
108 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/unimidi_output.rb
109 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mtk-0.0.3.2/lib/mtk/midi/output.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Based on an environment/global variable set before require 'mtk', allow for scientific pitch notation (aka "Yamaha"' style) where middle C is C4, and "Roland" style where middle C is C3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.