Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 68 lines (40 sloc) 2.394 kB
5481170 @maca arguments, ugens
maca authored
1 == Scruby
2
3 Is a bare-bones SuperCollider livecoding library for Ruby, it provides comunication with a remote or local scsynth server and SynthDef creation with a
1ee0818 @maca version change, many changes not fully implemented but working. give …
maca authored
4 in a similar way to Sclang.
5481170 @maca arguments, ugens
maca authored
5
6 SynthDef creation and sending is robust but some features are not implemented such as SynthDef variations and others I may not be aware of.
7
8 livecode.rb executable is located in the bin directory and a TextMate bundle included in extras permits livecoding from TextMate, comunication is
9 thrugh *nix pipes. Similar functionality shouldn't be too dificult to implement from Emacs or Vim.
10
1ee0818 @maca version change, many changes not fully implemented but working. give …
maca authored
11 == USAGE
12
13 require 'scruby'
14
15 s = Server.new
16 s.boot
17
18
19 SynthDef.new :fm do |freq, amp, dur|
e82decb @maca small change in README
maca authored
20 mod_env = EnvGen.kr Env.new( d(600, 200, 100), d(0.7,0.3) ), 1, :timeScale => dur
21 mod = SinOsc.ar freq * 1.4, :mul => mod_env
22 sig = SinOsc.ar freq + mod
23 env = EnvGen.kr Env.new( d(0, 1, 0.6, 0.2, 0.1, 0), d(0.001, 0.005, 0.3, 0.5, 0.7) ), 1, :timeScale => dur, :doneAction => 2
24 sig = sig * amp * env
25 Out.ar 0, [sig, sig]
1ee0818 @maca version change, many changes not fully implemented but working. give …
maca authored
26 end.send
e82decb @maca small change in README
maca authored
27
28 Synth.new :fm, :freq => 220, :amp => 0.4, :dur => 1
26d1e83 @maca extended a bit on README
maca authored
29
30
31 To start a live coding session:
32
33 $ livecode
34
35 The gem includes a TextMate bundle for interacting with the live coding session, currently there is no cli installation but
36 is located in the extras folder, if a file has .live.rb extension the bundle is loaded.
37
38 Text can be sent from textmate to the live session pressing enter, either a selection or a bunch of code.
39
40 Sending text from another editor or the shell:
41
42 $ echo '...some ruby code...' | tr '\n' '∂' > `ruby -e "require 'tempfile'; puts Dir.tmpdir"`/ruby_live.pipe
1ee0818 @maca version change, many changes not fully implemented but working. give …
maca authored
43
5481170 @maca arguments, ugens
maca authored
44 == TODO
45
46 Receive OSC messages from SuperCollider
6001a25 @maca Live session is robust and can receive and eval varios kind of messages
maca authored
47
48 == LICENSE:
49
50 Copyright (c) 2008 Macario Ortega
51
52 This program is free software: you can redistribute it and/or modify
53 it under the terms of the GNU General Public License as published by
54 the Free Software Foundation, either version 3 of the License, or
55 (at your option) any later version.
56
57 This program is distributed in the hope that it will be useful,
58 but WITHOUT ANY WARRANTY; without even the implied warranty of
59 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60 GNU General Public License for more details.
61
62 You should have received a copy of the GNU General Public License
63 along with this program. If not, see <http://www.gnu.org/licenses/>.
64
65
66
67
Something went wrong with that request. Please try again.