Created
April 15, 2013 06:01
-
-
Save abramhindle/5385999 to your computer and use it in GitHub Desktop.
MakeScalarKR snapshot a kr in supercollider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MakeScalarKR { | |
| var last; | |
| var mbus; | |
| var pf; | |
| var f; | |
| *new { arg sbase,f; | |
| ^super.new.init(sbase,f) | |
| } | |
| init { | |
| arg sbase,myf; | |
| f = myf; | |
| last = 0.0; | |
| mbus = Bus.control(sbase, 1); | |
| pf = f.play(sbase, mbus); | |
| } | |
| v { | |
| mbus.get({|x| last=x;}); | |
| ^last | |
| } | |
| free { | |
| pf.free | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment