embedded sc3ctrl and updated all commands
This commit is contained in:
parent
1af6bee500
commit
9ee4eab92c
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -c</string>
|
sc3c -c</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>none</string>
|
<string>none</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -c</string>
|
||||||
<string>Clear post window</string>
|
<string>Clear post window</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>264ACF44-52AC-4AD4-8C13-0F49E0DAAA12</string>
|
<string>264ACF44-52AC-4AD4-8C13-0F49E0DAAA12</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -s</string>
|
sc3c -s</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>none</string>
|
<string>none</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -s</string>
|
||||||
<string>Stop</string>
|
<string>Stop</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>81F7F82A-5C77-463E-BE36-15E0DAFF9930</string>
|
<string>81F7F82A-5C77-463E-BE36-15E0DAFF9930</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -d $TM_SELECTED_TEXT
|
sc3c -d $TM_SELECTED_TEXT</string>
|
||||||
</string>
|
|
||||||
<key>fallbackInput</key>
|
<key>fallbackInput</key>
|
||||||
<string>word</string>
|
<string>word</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
|
@ -17,7 +16,9 @@ sc3ctrl -d $TM_SELECTED_TEXT
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Help</string>
|
<string>Help</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>showAsTooltip</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>EAC732CB-6B38-4E0A-9BD4-D377562331D9</string>
|
<string>EAC732CB-6B38-4E0A-9BD4-D377562331D9</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -y $TM_SELECTED_TEXT</string>
|
sc3c -y $TM_SELECTED_TEXT</string>
|
||||||
<key>fallbackInput</key>
|
<key>fallbackInput</key>
|
||||||
<string>word</string>
|
<string>word</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
|
@ -17,6 +17,8 @@ sc3ctrl -y $TM_SELECTED_TEXT</string>
|
||||||
<string>Implementations of</string>
|
<string>Implementations of</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>3BAE7DE4-D06A-422B-94A3-7F542C47ED0F</string>
|
<string>3BAE7DE4-D06A-422B-94A3-7F542C47ED0F</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,10 +5,9 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>#!/usr/bin/env ruby
|
<string>require_cmd sc3c
|
||||||
cmd = ENV['TM_SELECTED_TEXT'] || ENV['TM_CURRENT_LINE']
|
export SC_INTERPRET_TEXT="${TM_SELECTED_TEXT:-$TM_CURRENT_LINE}"
|
||||||
ENV['SC_INTERPRET_TEXT'] = cmd
|
sc3c -x SC_INTERPRET_TEXT;</string>
|
||||||
%x{sc3ctrl -x}</string>
|
|
||||||
<key>fallbackInput</key>
|
<key>fallbackInput</key>
|
||||||
<string>line</string>
|
<string>line</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
|
@ -19,6 +18,8 @@ ENV['SC_INTERPRET_TEXT'] = cmd
|
||||||
<string>Interpret</string>
|
<string>Interpret</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>showAsTooltip</string>
|
<string>showAsTooltip</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>FB64DE22-E1F3-48CC-AE67-21B7E008ADD5</string>
|
<string>FB64DE22-E1F3-48CC-AE67-21B7E008ADD5</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -j $TM_SELECTED_TEXT</string>
|
sc3c -j $TM_SELECTED_TEXT</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>selection</string>
|
<string>selection</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -j $TM_SELECTED_TEXT</string>
|
||||||
<string>Open Class file</string>
|
<string>Open Class file</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>293C4F9B-E1A4-4D01-83E7-0698112C7FA4</string>
|
<string>293C4F9B-E1A4-4D01-83E7-0698112C7FA4</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -y $TM_SELECTED_TEXT</string>
|
sc3c -Y $TM_SELECTED_TEXT</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>selection</string>
|
<string>selection</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -y $TM_SELECTED_TEXT</string>
|
||||||
<string>References to</string>
|
<string>References to</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>22917CBF-054E-49ED-8AFA-7B72C0CFFA3A</string>
|
<string>22917CBF-054E-49ED-8AFA-7B72C0CFFA3A</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>saveActiveFile</string>
|
<string>saveActiveFile</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -k</string>
|
sc3c -k</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>none</string>
|
<string>none</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -k</string>
|
||||||
<string>Recompile class library</string>
|
<string>Recompile class library</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>0EE79AEB-E9A7-4ABE-98A0-6CDBF3F3777A</string>
|
<string>0EE79AEB-E9A7-4ABE-98A0-6CDBF3F3777A</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<key>beforeRunningCommand</key>
|
<key>beforeRunningCommand</key>
|
||||||
<string>nop</string>
|
<string>nop</string>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>require_cmd sc3ctrl
|
<string>require_cmd sc3c
|
||||||
sc3ctrl -p</string>
|
sc3c -p</string>
|
||||||
<key>input</key>
|
<key>input</key>
|
||||||
<string>none</string>
|
<string>none</string>
|
||||||
<key>keyEquivalent</key>
|
<key>keyEquivalent</key>
|
||||||
|
@ -15,6 +15,8 @@ sc3ctrl -p</string>
|
||||||
<string>Post window to front</string>
|
<string>Post window to front</string>
|
||||||
<key>output</key>
|
<key>output</key>
|
||||||
<string>discard</string>
|
<string>discard</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>81E4BC21-07E5-4E61-B5C8-3CC5B527C8CE</string>
|
<string>81E4BC21-07E5-4E61-B5C8-3CC5B527C8CE</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>Buffer.read(${1:s}, "${2:sounds/Amen.wav}");</string>
|
<string>Buffer.read(${1:s}, "${2:sounds/Amen.wav}");</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Buffer.read</string>
|
<string>Buffer.read</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>buf</string>
|
<string>buf</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>Synth(\\${1:foobar}, [\\${2:arg}, ${3:value}]);</string>
|
<string>Synth(\\${1:foobar}, [\\${2:arg}, ${3:value}]);</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Create Synth</string>
|
<string>Create Synth</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>syn</string>
|
<string>syn</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
}.play(s);</string>
|
}.play(s);</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Create SynthDef</string>
|
<string>Create SynthDef</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>sdef</string>
|
<string>sdef</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
</string>
|
</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Create function</string>
|
<string>Create function</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>{</string>
|
<string>{</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>EnvGen.kr(${1:env}, doneAction: ${2:2})</string>
|
<string>EnvGen.kr(${1:env}, doneAction: ${2:2})</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>EnvGen.kr</string>
|
<string>EnvGen.kr</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>egen</string>
|
<string>egen</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>w.view.decorator = FlowLayout(w.view.bounds);</string>
|
<string>w.view.decorator = FlowLayout(w.view.bounds);</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>FlowLayout</string>
|
<string>FlowLayout</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>flow</string>
|
<string>flow</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
);</string>
|
);</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Out.ar</string>
|
<string>Out.ar</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>Out</string>
|
<string>Out</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
};</string>
|
};</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Routine</string>
|
<string>Routine</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>rout</string>
|
<string>rout</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>SCWindow("${1:window title}", Rect(${2:x}, ${3:y}, ${4:width}, ${5:height}));</string>
|
<string>SCWindow("${1:window title}", Rect(${2:x}, ${3:y}, ${4:width}, ${5:height}));</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>SCWindow.new</string>
|
<string>SCWindow.new</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>win</string>
|
<string>win</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>Server.killAll; Server.default.boot</string>
|
<string>Server.killAll; Server.default.boot</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>Server.killAll</string>
|
<string>Server.killAll</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>sk</string>
|
<string>sk</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>.standardizePath$0</string>
|
<string>.standardizePath$0</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>.standardizePath</string>
|
<string>.standardizePath</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>.sp</string>
|
<string>.sp</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
};</string>
|
};</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>do ...</string>
|
<string>do ...</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>do</string>
|
<string>do</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
};</string>
|
};</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>if ...</string>
|
<string>if ...</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>if</string>
|
<string>if</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>{ ${1:SinOsc.ar} }.play</string>
|
<string>{ ${1:SinOsc.ar} }.play</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>play</string>
|
<string>play</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>play</string>
|
<string>play</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>s.queryAllNodes</string>
|
<string>s.queryAllNodes</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>s.queryAllNodes</string>
|
<string>s.queryAllNodes</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>s.q</string>
|
<string>s.q</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>.openHelpFile</string>
|
<string>.openHelpFile</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>.openHelpFile</string>
|
<string>.openHelpFile</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>.h</string>
|
<string>.h</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>.openCodeFile</string>
|
<string>.openCodeFile</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>.openCodeFile</string>
|
<string>.openCodeFile</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>.c</string>
|
<string>.c</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>^super.new.init$0;</string>
|
<string>^super.new.init$0;</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>^super.new.init</string>
|
<string>^super.new.init</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>rsup</string>
|
<string>rsup</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>asCompileString</string>
|
<string>asCompileString</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>asCompileString</string>
|
<string>asCompileString</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>ascs</string>
|
<string>ascs</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>doneAction: ${1:2}$2</string>
|
<string>doneAction: ${1:2}$2</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>doneAction</string>
|
<string>doneAction</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>da</string>
|
<string>da</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
<string>.postln</string>
|
<string>.postln</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>.postln</string>
|
<string>.postln</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.supercollider</string>
|
||||||
<key>tabTrigger</key>
|
<key>tabTrigger</key>
|
||||||
<string>.p</string>
|
<string>.p</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
%x{'#{ENV['TM_BUNDLE_SUPPORT']}/sc3ctrl/sc3ctrl' #{$*.join(" ")}}
|
|
@ -0,0 +1,69 @@
|
||||||
|
**************************************************************************
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
**************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
|
sc3ctrl is a command line utility which uses OpenSoundControl to control
|
||||||
|
SuperCollider3.app in OSX.
|
||||||
|
|
||||||
|
Consists of a small CoreFoundation bundle written in Objective-C and a
|
||||||
|
single SuperCollider class.
|
||||||
|
|
||||||
|
Binary: http://www.trapdoor1.net/sc3/sc3ctrl.tar.gz
|
||||||
|
(as yet untested on anything other than 10.5)
|
||||||
|
|
||||||
|
Source code: http://github.com/rfwatson/sc3ctrl
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
1) Drag the bundle into a suitable location on your machine
|
||||||
|
(e.g. /Application/Utilities/)
|
||||||
|
|
||||||
|
2) cd /Application/Utilities/sc3ctrl/
|
||||||
|
|
||||||
|
3) sudo install.rb
|
||||||
|
|
||||||
|
4) Start SuperCollider.app
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
sc3ctrl -x Execute the SC code in environment variable SC_INTERPRET_TEXT
|
||||||
|
|
||||||
|
sc3ctrl -x VARIABLE_NAME Execute the SC code in environment variable VARIABLE_NAME
|
||||||
|
|
||||||
|
sc3ctrl -d classname Open help file for classname
|
||||||
|
|
||||||
|
sc3ctrl -j classname Open class definition for classname
|
||||||
|
|
||||||
|
sc3ctrl -y methodname Examine implementations of methodname
|
||||||
|
|
||||||
|
sc3ctrl -Y methodname Examine references to methodname
|
||||||
|
|
||||||
|
sc3ctrl -s Stop server (CMD-PERIOD)
|
||||||
|
|
||||||
|
sc3ctrl -c Clear post window
|
||||||
|
|
||||||
|
sc3ctrl -p Post window to front
|
||||||
|
|
||||||
|
sc3ctrl -k Recompile class library (requires recent build)
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
// http://github.com/rfwatson/sc3ctrl
|
||||||
|
|
||||||
|
SC3Controller {
|
||||||
|
classvar nodes;
|
||||||
|
|
||||||
|
*initClass {
|
||||||
|
var postToFront;
|
||||||
|
nodes = List[];
|
||||||
|
|
||||||
|
Platform.case(\osx) {
|
||||||
|
postToFront = {
|
||||||
|
Document.listener.front;
|
||||||
|
};
|
||||||
|
|
||||||
|
StartUp.add {
|
||||||
|
this.addListeners;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*addListeners {
|
||||||
|
var node;
|
||||||
|
if(nodes.isEmpty) {
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg|
|
||||||
|
msg[1].asString.interpretPrint;
|
||||||
|
{ postToFront.() }.defer;
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg|
|
||||||
|
{ msg[1].asString.openHelpFile }.defer
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg|
|
||||||
|
{ msg[1].asString.interpret.openCodeFile }.defer
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg|
|
||||||
|
{ SC3Controller.methodTemplates(msg[1]) }.defer
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg|
|
||||||
|
{ SC3Controller.methodReferences(msg[1]) }.defer
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg|
|
||||||
|
thisProcess.stop;
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg|
|
||||||
|
{
|
||||||
|
Document.listener.string = ""; "";
|
||||||
|
postToFront.();
|
||||||
|
}.defer;
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg|
|
||||||
|
{ postToFront.() }.defer;
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
|
||||||
|
node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg|
|
||||||
|
{
|
||||||
|
thisProcess.recompile;
|
||||||
|
postToFront.();
|
||||||
|
}.defer;
|
||||||
|
}.add;
|
||||||
|
nodes.add(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*removeAllListeners {
|
||||||
|
nodes.do(_.remove);
|
||||||
|
}
|
||||||
|
|
||||||
|
// adapated from Kernel.sc
|
||||||
|
*methodTemplates { |name|
|
||||||
|
var out, found = 0, namestring;
|
||||||
|
out = CollStream.new;
|
||||||
|
out << "Implementations of '" << name << "' :\n";
|
||||||
|
Class.allClasses.do({ arg class;
|
||||||
|
class.methods.do({ arg method;
|
||||||
|
if (method.name == name, {
|
||||||
|
found = found + 1;
|
||||||
|
namestring = class.name ++ ":" ++ name;
|
||||||
|
out << " " << namestring << " : ";
|
||||||
|
if (method.argNames.isNil or: { method.argNames.size == 1 }, {
|
||||||
|
out << "this." << name;
|
||||||
|
if (name.isSetter, { out << "(val)"; });
|
||||||
|
},{
|
||||||
|
out << method.argNames.at(0);
|
||||||
|
if (name.asString.at(0).isAlpha, {
|
||||||
|
out << "." << name << "(";
|
||||||
|
method.argNames.do({ arg argName, i;
|
||||||
|
if (i > 0, {
|
||||||
|
if (i != 1, { out << ", " });
|
||||||
|
out << argName;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
out << ")";
|
||||||
|
},{
|
||||||
|
out << " " << name << " ";
|
||||||
|
out << method.argNames.at(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
out.nl;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if(found == 0)
|
||||||
|
{
|
||||||
|
Post << "\nNo implementations of '" << name << "'.\n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
out.collection.newTextWindow(name.asString);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// adapted from Kernel.sc
|
||||||
|
*methodReferences { |name|
|
||||||
|
var out, references;
|
||||||
|
name = name.asSymbol;
|
||||||
|
out = CollStream.new;
|
||||||
|
references = Class.findAllReferences(name);
|
||||||
|
|
||||||
|
if (references.notNil, {
|
||||||
|
out << "References to '" << name << "' :\n";
|
||||||
|
references.do({ arg ref; out << " " << ref.asString << "\n"; });
|
||||||
|
out.collection.newTextWindow(name.asString);
|
||||||
|
},{
|
||||||
|
Post << "\nNo references to '" << name << "'.\n";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/Headers
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/Resources
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/VVOSC
|
|
@ -0,0 +1,28 @@
|
||||||
|
//
|
||||||
|
// AddressValPair.h
|
||||||
|
// VVOSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 12/11/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface AddressValPair : NSObject {
|
||||||
|
NSString *address;
|
||||||
|
id val;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (id) createWithAddress:(NSString *)a val:(id)v;
|
||||||
|
- (id) initWithAddress:(NSString *)a val:(id)v;
|
||||||
|
|
||||||
|
- (NSString *) address;
|
||||||
|
- (id) val;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,34 @@
|
||||||
|
//
|
||||||
|
// OSCBundle.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import "OSCMessage.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCBundle : NSObject {
|
||||||
|
NSMutableArray *elementArray; // array of messages or bundles
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) parseRawBuffer:(unsigned char *)b ofMaxLength:(int)l toInPort:(id)p;
|
||||||
|
|
||||||
|
+ (id) create;
|
||||||
|
|
||||||
|
- (void) addElement:(id)n;
|
||||||
|
- (void) addElementArray:(NSArray *)a;
|
||||||
|
|
||||||
|
- (int) bufferLength;
|
||||||
|
- (void) writeToBuffer:(unsigned char *)b;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,93 @@
|
||||||
|
//
|
||||||
|
// OSCInPort.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//#import <sys/types.h>
|
||||||
|
//#import <sys/socket.h>
|
||||||
|
#import <netinet/in.h>
|
||||||
|
|
||||||
|
#import <pthread.h>
|
||||||
|
#import "AddressValPair.h"
|
||||||
|
#import "OSCPacket.h"
|
||||||
|
#import "OSCBundle.h"
|
||||||
|
#import "OSCMessage.h"
|
||||||
|
|
||||||
|
|
||||||
|
@protocol OSCInPortDelegateProtocol
|
||||||
|
- (void) oscMessageReceived:(NSDictionary *)d;
|
||||||
|
- (void) receivedOSCVal:(id)v forAddress:(NSString *)a;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol OSCDelegateProtocol
|
||||||
|
- (void) oscMessageReceived:(NSDictionary *)d;
|
||||||
|
- (void) receivedOSCVal:(id)v forAddress:(NSString *)a;
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCInPort : NSObject {
|
||||||
|
BOOL deleted; // whether or not i'm deleted- ensures that socket gets closed
|
||||||
|
BOOL bound; // whether or not the socket is bound
|
||||||
|
int sock; // socket file descriptor. remember, everything in unix is files!
|
||||||
|
struct sockaddr_in addr; // struct that describes *my* address (this is an in port)
|
||||||
|
unsigned short port; // the port number i'm receiving from
|
||||||
|
BOOL running; // whether or not i should keep running
|
||||||
|
BOOL busy;
|
||||||
|
unsigned char buf[8192]; // the socket gets data and dumps it here immediately
|
||||||
|
|
||||||
|
pthread_mutex_t lock;
|
||||||
|
NSTimer *threadTimer;
|
||||||
|
int threadTimerCount;
|
||||||
|
NSAutoreleasePool *threadPool;
|
||||||
|
|
||||||
|
NSString *portLabel; // the "name" of the port (added to distinguish multiple osc input ports for bonjour)
|
||||||
|
NSNetService *zeroConfDest; // bonjour service for publishing this input's address...only active if there's a portLabel!
|
||||||
|
|
||||||
|
NSMutableDictionary *scratchDict; // key of dict is address port; object at key is a mut. array. coalesced messaging.
|
||||||
|
NSMutableArray *scratchArray; // array of AddressValPair objects. used for serial messaging.
|
||||||
|
id delegate; // my delegate gets notified of incoming messages
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (id) createWithPort:(unsigned short)p;
|
||||||
|
+ (id) createWithPort:(unsigned short)p labelled:(NSString *)n;
|
||||||
|
- (id) initWithPort:(unsigned short)p;
|
||||||
|
- (id) initWithPort:(unsigned short)p labelled:(NSString *)n;
|
||||||
|
|
||||||
|
- (void) prepareToBeDeleted;
|
||||||
|
|
||||||
|
- (NSDictionary *) createSnapshot;
|
||||||
|
|
||||||
|
- (BOOL) createSocket;
|
||||||
|
- (void) start;
|
||||||
|
- (void) stop;
|
||||||
|
- (void) launchOSCLoop:(id)o;
|
||||||
|
- (void) OSCThreadProc:(NSTimer *)t;
|
||||||
|
- (void) parseRawBuffer:(unsigned char *)b ofMaxLength:(int)l;
|
||||||
|
|
||||||
|
// if the delegate im
|
||||||
|
- (void) handleParsedScratchDict:(NSDictionary *)d;
|
||||||
|
- (void) handleScratchArray:(NSArray *)a;
|
||||||
|
|
||||||
|
- (void) addValue:(id)val toAddressPath:(NSString *)p;
|
||||||
|
|
||||||
|
- (unsigned short) port;
|
||||||
|
- (void) setPort:(unsigned short)n;
|
||||||
|
- (NSString *) portLabel;
|
||||||
|
- (void) setPortLabel:(NSString *)n;
|
||||||
|
- (NSNetService *) zeroConfDest;
|
||||||
|
- (BOOL) bound;
|
||||||
|
|
||||||
|
- (id) delegate;
|
||||||
|
- (void) setDelegate:(id)n;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,144 @@
|
||||||
|
//
|
||||||
|
// OSCManager.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import "OSCZeroConfManager.h"
|
||||||
|
#import "OSCInPort.h"
|
||||||
|
#import "OSCOutPort.h"
|
||||||
|
#import <pthread.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
TOP-LEVEL OVERVIEW
|
||||||
|
|
||||||
|
this osc manager class is all you need to add to your app. it has methods for
|
||||||
|
adding and removing ports. you can have as many osc managers as you like, but
|
||||||
|
you should really only need one instance.
|
||||||
|
|
||||||
|
input ports have a delegate- delegate methods are called as the port receives data.
|
||||||
|
it's important to note that the delegate methods must be thread-safe: each input
|
||||||
|
port is running on its own (non-main) thread.
|
||||||
|
|
||||||
|
data is sent via the output ports (convenience methods for doing this are built
|
||||||
|
into the osc manager).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GENERAL OSC STRUCTURE AND OVERVIEW
|
||||||
|
|
||||||
|
this framework was written from the OSC spec found here:
|
||||||
|
http://opensoundcontrol.org/spec-1_0
|
||||||
|
|
||||||
|
- an OSC packet is the basic unit of transmitting OSC data.
|
||||||
|
- an OSC packet consists of:
|
||||||
|
- contents- contiguous block of binary data (either a bundle or a message), and then the
|
||||||
|
- size- number of 8-bit bytes that comprise 'contents'- ALWAYS multiple of 4!
|
||||||
|
- an OSC message consists of:
|
||||||
|
- an OSC address pattern (starting with '/'), followed by
|
||||||
|
- an OSC type tag string, followed by
|
||||||
|
- zero or more 'OSC arguments'
|
||||||
|
- an OSC bundle consists of:
|
||||||
|
- the OSC-string "#bundle", followed by
|
||||||
|
- an OSC time tag, followed by
|
||||||
|
- zero or more 'OSC bundle elements'
|
||||||
|
- an OSC bundle element consists of:
|
||||||
|
- 'size' (int32)- number of 8-bit bytes in the contents- ALWAYS multiple of 4!
|
||||||
|
- 'contents'- either another OSC bundle, or an OSC message
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PORTS- SENDING AND RECEIVING UDP/TCP DATA
|
||||||
|
|
||||||
|
some basic information, gleaned from:
|
||||||
|
http://beej.us/guide/bgnet/output/html/multipage/index.html
|
||||||
|
|
||||||
|
struct sockaddr {
|
||||||
|
unsigned short sa_family; // address family, AF_xxx
|
||||||
|
char sa_data[14]; // 14 bytes of protocol address
|
||||||
|
}
|
||||||
|
struct sockaddr_in {
|
||||||
|
short int sin_family; // address family
|
||||||
|
unsigned short int sin_port; // port number
|
||||||
|
struct in_addr sin_addr; // internet address
|
||||||
|
unsigned char sin_zero[8]; // exists so sockaddr_in has same length as sockaddr
|
||||||
|
}
|
||||||
|
|
||||||
|
recv(int sockfd, void *buf, int len, unsigned int flags);
|
||||||
|
- sockfd is the socket descriptor to read from
|
||||||
|
- buf is the buffer to read the information into
|
||||||
|
- len is the max length of the buffer
|
||||||
|
- flags can be set to 0
|
||||||
|
recvfrom(int sockfd, void *buf, int len, unsigned int flags, struct sockaddr *from, int *fromlen);
|
||||||
|
- from is a pointer to a local struct sockaddr that will be filled with the IP & port of the originating machine
|
||||||
|
- fromlen is a pointer to a local int that should be initialized to a sizeof(struct sockaddr)- contains length of address actually stored in from on return
|
||||||
|
...as well as the 4 params listed above in recv()
|
||||||
|
|
||||||
|
int select(int numfds, fd_set *readrds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
||||||
|
*/
|
||||||
|
|
||||||
|
@interface OSCManager : NSObject {
|
||||||
|
NSMutableArray *inPortArray;
|
||||||
|
NSMutableArray *outPortArray;
|
||||||
|
|
||||||
|
pthread_rwlock_t inPortLock;
|
||||||
|
pthread_rwlock_t outPortLock;
|
||||||
|
|
||||||
|
id delegate;
|
||||||
|
|
||||||
|
OSCZeroConfManager *zeroConfManager; // bonjour/zero-configuration manager
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) deleteAllInputs;
|
||||||
|
- (void) deleteAllOutputs;
|
||||||
|
// methods for creating input ports
|
||||||
|
- (OSCInPort *) createNewInputFromSnapshot:(NSDictionary *)s;
|
||||||
|
- (OSCInPort *) createNewInputForPort:(int)p withLabel:(NSString *)l;
|
||||||
|
- (OSCInPort *) createNewInputForPort:(int)p;
|
||||||
|
- (OSCInPort *) createNewInput;
|
||||||
|
// methods for creating output ports
|
||||||
|
- (OSCOutPort *) createNewOutputFromSnapshot:(NSDictionary *)s;
|
||||||
|
- (OSCOutPort *) createNewOutputToAddress:(NSString *)a atPort:(int)p withLabel:(NSString *)l;
|
||||||
|
- (OSCOutPort *) createNewOutputToAddress:(NSString *)a atPort:(int)p;
|
||||||
|
- (OSCOutPort *) createNewOutput;
|
||||||
|
|
||||||
|
// typically, the manager is the input port's delegate- input ports tell delegates when they receive data
|
||||||
|
// this method is called and contains coalesced messages (grouped by address path)
|
||||||
|
- (void) oscMessageReceived:(NSDictionary *)d;
|
||||||
|
// this method is called every time any osc val is processed
|
||||||
|
- (void) receivedOSCVal:(id)v forAddress:(NSString *)a;
|
||||||
|
|
||||||
|
// methods for working with ports
|
||||||
|
- (NSString *) getUniqueInputLabel;
|
||||||
|
- (NSString *) getUniqueOutputLabel;
|
||||||
|
- (OSCInPort *) findInputWithLabel:(NSString *)n;
|
||||||
|
- (OSCOutPort *) findOutputWithLabel:(NSString *)n;
|
||||||
|
- (OSCOutPort *) findOutputWithAddress:(NSString *)a andPort:(int)p;
|
||||||
|
- (OSCOutPort *) findOutputForIndex:(int)i;
|
||||||
|
- (OSCInPort *) findInputWithZeroConfName:(NSString *)n;
|
||||||
|
- (void) removeInput:(id)p;
|
||||||
|
- (void) removeOutput:(id)p;
|
||||||
|
- (NSArray *) outPortLabelArray;
|
||||||
|
|
||||||
|
// subclassable methods for customizing
|
||||||
|
- (id) inPortClass;
|
||||||
|
- (NSString *) inPortLabelBase;
|
||||||
|
- (id) outPortClass;
|
||||||
|
|
||||||
|
// misc
|
||||||
|
- (id) delegate;
|
||||||
|
- (void) setDelegate:(id)n;
|
||||||
|
- (NSMutableArray *) inPortArray;
|
||||||
|
- (NSMutableArray *) outPortArray;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,43 @@
|
||||||
|
//
|
||||||
|
// OSCMessage.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import <pthread.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCMessage : NSObject {
|
||||||
|
NSString *address;
|
||||||
|
NSMutableArray *typeArray;
|
||||||
|
NSMutableArray *argArray;
|
||||||
|
pthread_rwlock_t lock;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) parseRawBuffer:(unsigned char *)b ofMaxLength:(int)l toInPort:(id)p;
|
||||||
|
+ (id) createMessageToAddress:(NSString *)a;
|
||||||
|
- (id) initWithAddress:(NSString *)a;
|
||||||
|
|
||||||
|
- (void) addInt:(int)n;
|
||||||
|
- (void) addFloat:(float)n;
|
||||||
|
#if IPHONE
|
||||||
|
- (void) addColor:(UIColor *)c;
|
||||||
|
#else
|
||||||
|
- (void) addColor:(NSColor *)c;
|
||||||
|
#endif
|
||||||
|
- (void) addBOOL:(BOOL)n;
|
||||||
|
- (void) addString:(NSString *)n;
|
||||||
|
|
||||||
|
- (int) bufferLength;
|
||||||
|
- (void) writeToBuffer:(unsigned char *)b;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,58 @@
|
||||||
|
//
|
||||||
|
// OSCOutPort.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#import "OSCPacket.h"
|
||||||
|
#import "OSCBundle.h"
|
||||||
|
#import "OSCMessage.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCOutPort : NSObject {
|
||||||
|
BOOL deleted;
|
||||||
|
int sock;
|
||||||
|
struct sockaddr_in addr;
|
||||||
|
unsigned short port;
|
||||||
|
NSString *addressString;
|
||||||
|
NSString *portLabel; // used it to distinguish between multiple osc outputs
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (id) createWithAddress:(NSString *)a andPort:(unsigned short)p;
|
||||||
|
+ (id) createWithAddress:(NSString *)a andPort:(unsigned short)p labelled:(NSString *)l;
|
||||||
|
- (id) initWithAddress:(NSString *)a andPort:(unsigned short)p;
|
||||||
|
- (id) initWithAddress:(NSString *)a andPort:(unsigned short)p labelled:(NSString *)l;
|
||||||
|
- (void) prepareToBeDeleted;
|
||||||
|
|
||||||
|
- (NSDictionary *) createSnapshot;
|
||||||
|
|
||||||
|
- (BOOL) createSocket;
|
||||||
|
|
||||||
|
- (void) sendThisBundle:(OSCBundle *)b;
|
||||||
|
- (void) sendThisMessage:(OSCMessage *)m;
|
||||||
|
- (void) sendThisPacket:(OSCPacket *)p;
|
||||||
|
|
||||||
|
- (void) setAddressString:(NSString *)n;
|
||||||
|
- (void) setPort:(unsigned short)p;
|
||||||
|
- (void) setAddressString:(NSString *)n andPort:(unsigned short)p;
|
||||||
|
|
||||||
|
- (NSString *) portLabel;
|
||||||
|
- (void) setPortLabel:(NSString *)n;
|
||||||
|
|
||||||
|
- (unsigned short) port;
|
||||||
|
- (NSString *) addressString;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,37 @@
|
||||||
|
//
|
||||||
|
// OSCPacket.h
|
||||||
|
// OSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 9/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#import "OSCBundle.h"
|
||||||
|
#import "OSCMessage.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
this class requires a bundle or message on create/init. the buffer/msg
|
||||||
|
is NOT retained by this class in any way- it's used to immediately create
|
||||||
|
the buffer which will be sent.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@interface OSCPacket : NSObject {
|
||||||
|
int bufferLength;
|
||||||
|
unsigned char *payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) parseRawBuffer:(unsigned char *)b ofMaxLength:(int)l toInPort:(id)p;
|
||||||
|
+ (id) createWithContent:(id)c;
|
||||||
|
- (id) initWithContent:(id)c;
|
||||||
|
|
||||||
|
- (int) bufferLength;
|
||||||
|
- (unsigned char *) payload;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,44 @@
|
||||||
|
//
|
||||||
|
// OSCZeroConfDomain.h
|
||||||
|
// VVOSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 12/9/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import <pthread.h>
|
||||||
|
#import <sys/socket.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCZeroConfDomain : NSObject {
|
||||||
|
NSString *domainString;
|
||||||
|
NSNetServiceBrowser *serviceBrowser;
|
||||||
|
|
||||||
|
NSMutableArray *servicesArray;
|
||||||
|
pthread_rwlock_t servicesLock;
|
||||||
|
|
||||||
|
id domainManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (id) createWithDomain:(NSString *)d andDomainManager:(id)m;
|
||||||
|
- (id) initWithDomain:(NSString *)d andDomainManager:(id)m;
|
||||||
|
|
||||||
|
// NSNetServiceBrowser delegate methods
|
||||||
|
- (void)netServiceBrowser:(NSNetServiceBrowser *)n didFindService:(NSNetService *)x moreComing:(BOOL)m;
|
||||||
|
- (void)netServiceBrowser:(NSNetServiceBrowser *)n didNotSearch:(NSDictionary *)err;
|
||||||
|
- (void)netServiceBrowser:(NSNetServiceBrowser *)n didRemoveService:(NSNetService *)s moreComing:(BOOL)m;
|
||||||
|
|
||||||
|
// NSNetService delegate methods
|
||||||
|
- (void)netService:(NSNetService *)n didNotResolve:(NSDictionary *)err;
|
||||||
|
- (void)netServiceDidResolveAddress:(NSNetService *)n;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,39 @@
|
||||||
|
//
|
||||||
|
// OSCZeroConfManager.h
|
||||||
|
// VVOSC
|
||||||
|
//
|
||||||
|
// Created by bagheera on 12/9/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#if IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import "OSCZeroConfDomain.h"
|
||||||
|
#import <pthread.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface OSCZeroConfManager : NSObject {
|
||||||
|
NSNetServiceBrowser *domainBrowser;
|
||||||
|
|
||||||
|
NSMutableDictionary *domainDict;
|
||||||
|
pthread_rwlock_t domainLock;
|
||||||
|
|
||||||
|
id oscManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id) initWithOSCManager:(id)m;
|
||||||
|
|
||||||
|
- (void) serviceRemoved:(NSNetService *)s;
|
||||||
|
- (void) serviceResolved:(NSNetService *)s;
|
||||||
|
|
||||||
|
// NSNetServiceBrowser delegate methods
|
||||||
|
- (void)netServiceBrowser:(NSNetServiceBrowser *)n didFindDomain:(NSString *)d moreComing:(BOOL)m;
|
||||||
|
- (void)netServiceBrowser:(NSNetServiceBrowser *)n didNotSearch:(NSDictionary *)err;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
#import "AddressValPair.h"
|
||||||
|
#import "OSCManager.h"
|
||||||
|
#import "OSCZeroConfManager.h"
|
||||||
|
#import "OSCPacket.h"
|
||||||
|
#import "OSCBundle.h"
|
||||||
|
#import "OSCMessage.h"
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>VVOSC</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>0.1.2</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.vidvox.VVOSC</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>VVOSC</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>0.1.2</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
A
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
puts "Ready to install sc3ctrl."
|
||||||
|
puts "Press ENTER to continue."
|
||||||
|
gets
|
||||||
|
|
||||||
|
puts "Creating executable in /usr/local/bin .."
|
||||||
|
%x{echo "`pwd`/sc3ctrl \\$1 \\$2" > /usr/local/bin/sc3ctrl}
|
||||||
|
%x{chmod a+x /usr/local/bin/sc3ctrl}
|
||||||
|
puts "Done."
|
||||||
|
|
||||||
|
puts
|
||||||
|
puts "Copying SuperCollider class to Extensions folder .."
|
||||||
|
system 'cp SC3Controller.sc ~/Library/Application\ Support/SuperCollider/Extensions/'
|
||||||
|
puts "Done."
|
||||||
|
|
||||||
|
puts
|
Binary file not shown.
Loading…
Reference in New Issue