Skip to content

Instantly share code, notes, and snippets.

View iani's full-sized avatar
💭
sc-hacks, sonarts_compmus_2020, emacs-prelude-personal-arch, sc-hacks-redux, dlb

Iannis Zannos iani

💭
sc-hacks, sonarts_compmus_2020, emacs-prelude-personal-arch, sc-hacks-redux, dlb
View GitHub Profile
@iani
iani / org-sc-alpha
Created November 2, 2013 18:54
first alpha concept for org-sc
* ACTIVE orgmode/sc: 1 node/process per buffer. navigate n/p in org mode :orgmode:emacs:livecoding:supercollider:
:PROPERTIES:
:DATE: <2013-09-30 Mon 13:21>
:ENTRYTYPE: note
:END:
** Basic idea: Keep code in orgmode nodes, but edit it in temporary separate buffer
u** Terminology: o-nodes, s-nodes
@iani
iani / compmus131105
Created November 5, 2013 12:00
code for compmus class @ avarts 5 nov 2013
(
a = { | gate = 1 |
var env, envPlayer, source;
env = Env.adsr;
envPlayer = EnvGen.kr(env, gate);
source = WhiteNoise.ar(0.1);
@iani
iani / scbuffers
Last active December 31, 2015 14:49
Notes about using buffers and about SynthDefs, in SuperCollider.
// Session of Tue Dec 17 12:33:56 2013
// Loading buffers
Server.default.boot;
//: Test how to open a dialog window for choosing the path of the buffer to load:
// Here we just post the path.
Dialog.openPanel({ | path |
path.postln;
})
@iani
iani / scbufferloop
Created December 17, 2013 11:56
Explore a sound buffer by looping continuously over small segments of the buffer. MouseX controls the position of the loop in the buffer, MouseY controls the (proportional) duration of the loop.
// Session of Tue Dec 17 13:28:06 2013
/*
Controlling the start and end points of a looped buffer
For this we need to use a different technique: BufRd + Phasor.
Explore a sound buffer by looping continuously over small segments of the buffer.
MouseX controls the position of the loop in the buffer,
MouseY controls the (proportional) duration of the loop.
*/
@iani
iani / sc-watch-samples-in-dir
Last active December 31, 2015 16:19
SuperCollider class: Watches the wav files in a chosen directory. If any files are added, they are read into buffers. If any files are removed, their buffers are freed. When any buffer is read or freed, a changed notification is issued. One can make any object do any action when receiving that notification by using the addNotifier method (see ex…
// IZ Dec 17, 2013 (11:31 PM)
/*
(Save this file as WatchSamplesInDir.sc and put it inside SuperCollider Extensions folder.
Then recompile. )
Watches the wav files in a chosen directory.
If any files are added, they are read into buffers.
If any files are removed, their buffers are freed.
When any buffer is read or freed, a changed notification is issued.
@iani
iani / emacs-package-install
Created December 20, 2013 14:05
Add 3 major package locations for automatic installation of packages in emacs. (from my org-mode file). Use only the elisp code if you are not using org-mode.
(See:
- http://www.emacswiki.org/emacs/ELPA
- See: http://emacsworld.blogspot.gr/2013/12/a-few-unrelated-emacs-tips.html
)
#+BEGIN_SRC elisp
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
@iani
iani / lhcmonitor
Created December 21, 2013 16:49
GUI for Live Hardware Coding with SuperCollider - basic idea.
/*
//
(
// initialise ~step var (for count the current step)
~step=0;
a = LHCV((
symbol: { | self, symbol |
self.soundOn.postln;
if (self.soundOn) {
(instrument: \test, degree: (A: 11, B: 12, C: 13, D: 14)[symbol]).play;
@iani
iani / lhcsc
Last active January 1, 2016 01:19
Live Hardware Coding basic idea, in SuperCollider
/*
// synth definition already written in SynthDef.synthDefDir
(
SynthDef(\LHCV, { | out=0, clk=1, vclk=2, id=0, step=0, resetVal=0|
var clock, varclock, latch;
clock = LFPulse.kr(clk);
varclock = LFPulse.kr(vclk);
latch = Latch.kr(Stepper.kr(varclock, step: step, resetval: resetVal), clock);
Out.kr(out, SendTrig.kr(Changed.kr(latch), id, latch))
}).writeOnce;
@iani
iani / org-icicles
Created January 29, 2014 20:10
Extensions and key binding for using icicles in Org-mode. Org-mode refile with icicles, search heading with icicles and optionally open subtree in independent buffer etc.
(add-hook 'org-mode-hook
(lambda () (imenu-add-to-menubar "Imenu")))
(setq org-imenu-depth 3)
(defun org-icicle-occur ()
"In org-mode, show entire buffer contents before running icicle-occur.
Otherwise icicle-occur will not place cursor at found location,
if the location is hidden."
(interactive)
@iani
iani / org-agenda-list
Created January 31, 2014 20:49
Save/Load agenda file lists in emacs org-mode.
* Add, remove, save agenda file list
#+BEGIN_SRC emacs-lisp
(defvar org-agenda-list-save-path
"~/.emacs.d/savefile/org-agenda-list.el"
"Path to save the list of files belonging to the agenda.")
(defun org-agenda-save-file-list ()
"Save list of desktops from file in org-agenda-list-save-path"
(interactive)