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 / ambiant1
Created June 8, 2011 20:37
ambiant1
ABOUT CONTACT RSS
history print
main
Welcome
The European Agenda for Culture
SEARCH
WORKSHOPS
@iani
iani / ambiant_w_search.el
Created June 22, 2011 11:49
search form for top horizontal menu in org publish html
;;;;;;;;;;;;;;;;;;;;;;; AMBIANT HOME;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'org-publish-project-alist
'("ambiantHome"
:base-directory "~/Dropbox/Sites.org/ambiant/home"
:base-extension "org"
:publishing-directory "~/Dropbox/Sites.html/ambiant"
:section-numbers nil
:table-of-contents nil
:recursive t
:publishing-function org-publish-org-to-html
@iani
iani / SC_QPenPrinter.sc
Created October 10, 2012 11:23
Testing SuperCollider QPenPrinter stroke width effect, from 0 to 1 in 1000000, 1000, 10000 increments
QPenPrinter.print { | p |
var font;
font = Font.default.size_(6);
Pen.fillColor = Color.black;
(1..100) * 7 do: { | i, j |
j = j / 1000000;
Pen.stringCenteredIn(j.asString, Rect(0, i - 5, 45, 8), font);
Pen.width = j;
Pen.line(50@i, 400@i);
Pen.stroke;
@iani
iani / SC_detect_silence
Created June 29, 2013 11:34
How to use DetectSilence in SuperCollider to start a new sound when another sound falls below a certain amplitude level. Here we use AllpassC to add a reverb on the tail of the sound that we are tracking.
(
SynthDef("releaser", { | gate = 1 |
var env;
env = Env([0, 1, 0], [0.04, 6.0], releaseNode: 1);
Out.ar(0, WhiteNoise.ar(1) * EnvGen.kr(env, gate, doneAction: 2))
}).add;
)
@iani
iani / SC_detect_silence_stretch
Created June 29, 2013 11:55
Like SC_detect_silence before, but with added second envelope to control the duration of the continued sound "tail"
(
SynthDef("releaser", { | gate = 1 |
var env;
env = Env([0, 1, 0], [0.04, 6.0], releaseNode: 1);
Out.ar(0, WhiteNoise.ar(1) * EnvGen.kr(env, gate, doneAction: 2))
}).add;
)
@iani
iani / SC_buffer_player
Last active December 19, 2015 03:29
A very simple buffer player for sound file playback in SuperCollider. This one is for a live diffusion of a stereo file to an 8 channel setup, where the left track of the sound file goes to the first 4 output busses and the right track goes to the last 4 output busses. Amplitude of each channel is controllable by setting parameters \amp1, \amp2,…
// Prep
Server.default.boot;
Server.default.scope(8);
(
~play = { | path, out = 0 |
if (~buffer.notNil) { ~buffer.free };
Buffer.read(
Server.default, path, action: { | buffer, out = 0 |
~buffer = buffer;
@iani
iani / SC_buffer_with_fx
Created June 29, 2013 13:06
Like SC_buffer_player but with example of effects
/* Playing a sound file to an internal bus and then using that internal bus as input for effects.
This example assumes that we are playing a stereo sound file. For different number of channels,
edit the code.
*/
// Prep
Server.default.boot;
@iani
iani / sc_flow_layout
Created July 17, 2013 16:41
Short intro to new QT Layout scheme in SuperCollider
(
w = Window().front;
w.view.layout = HLayout(
*({ Slider() } ! 10)
)
@iani
iani / github-htaccess-web
Created October 7, 2013 12:48
notes/tips for website publishing on github, using .htaccess, o-blog, orgmode-beamer and other slide presentation tools
* web site programming+publishing
** password protection with htaccess
http://www.htaccesstools.com/articles/password-protection/
PASSWORD PROTECTION WITH HTACCESS
With .htaccess it is very easy to password protect a folder or directory. The method is called htaccess password protection or htaccess authentication, and works by uploading two files called .htaccess and .htpasswd in the directory you want to password protect. The htaccess file should contain the following:
AuthType Basic
@iani
iani / ampmavericks
Created November 1, 2013 08:32
info for amp on mavericks - just the link
http://www.coolestguidesontheplanet.com/downtown/get-apache-mysql-php-and-phpmyadmin-working-osx-109-mavericks