Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Apr 18, 2016
2 parents 2af8fef + c367d21 commit 9cd9d01
Show file tree
Hide file tree
Showing 45 changed files with 5,221 additions and 283 deletions.
6 changes: 3 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "eslint:recommended",
"env": {
"jasmine": true,
"node": true,
Expand All @@ -7,8 +8,8 @@
"builtin": true,
"es6": true
},
"ecmaFeatures": {
"modules": true
"parserOptions": {
"sourceType": "module"
},
"globals": {
"jest": true,
Expand Down Expand Up @@ -78,7 +79,6 @@
0,
"never"
],
"strict": 2,
"valid-typeof": 2,
"wrap-iife": [
2,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Features
- Node-id/Bus/Buffer allocators
- Server state and synth/group tracking

- Dryadic: declarative DSL for managing component trees. Documentation coming in 0.11.0

Example
-------
Expand Down
2 changes: 1 addition & 1 deletion bin/compile-synthdefs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

/* eslint no-console: 0 */
var path = require('path');
var sc = require(path.join(__dirname, '../index'));
var pkg = require(path.join(__dirname, '../package.json'));
Expand Down
2 changes: 1 addition & 1 deletion bin/export-supercollider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

/* eslint no-console: 0 */
var help = [
'Export a copy of scsynth for use as a standalone.'
];
Expand Down
2 changes: 1 addition & 1 deletion bin/sclang.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
//
/* eslint no-console: 0 */
var help = [
'Run sclang (the supercollider language interpreter) using the configuration defined in the nearest .supercollider.yaml searching up from the current working directory.',
'',
Expand Down
2 changes: 1 addition & 1 deletion bin/scsynth.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
//
/* eslint no-console: 0 */
var help = [
'Run scsynth (the supercollider synthesis server) using the configuration defined in the nearest .supercollider.yaml searching up from the current working directory.',
'',
Expand Down
48 changes: 48 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
CHANGELOG
=========


0.10.0
++++++

Documentation of Dryadic will come later. This is still in alpha.

- add dryadic library
- export top level functions: dryadic() play() and h()
These automatically include the supercollider layer (Synth Group etc)
- add Dryad classes and scsynth command middleware layer
- Synth
- Group
- SCServer
- SCLang
- SCSynthDef compiles, watches files, writes .json file with synthDesc as well as the .scsyndef
- SCSynthDef watch - watch a source file and recompile def on changes
- SCSynthDef saveToDir - save compiled synth def
- AudioBus
- SynthStream
- SynthControl
- SynthEventList

- add map function: linear, exp, dB, fader
- add reverse mapping functions: linear, exp, dB, fader


- change: default synthNew to add to TAIL not HEAD
- rename SCSynth -> SCServer

- support for OSC bundles and timetags
- upgrade to orc-min 1.1.1
- send-bundle example
- add send-bundle example to examples/boot-server.js

- osc groupNew: default add action add to tail

- fix(sclang-io): match beta releases in version parsing

- testing: factor out server._spawnProcess and mock that rather than the whole child_process module

- deprecate older dryadic helper functions

- update dependencies

- Relax node engine requirement to 0.10.0 because atom apm is refusing to install
even though it uses node 4, because apm itself is stuck on 0.10.0


0.9.0
-----

Expand Down
11 changes: 10 additions & 1 deletion examples/boot-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@
var sc = require('../index.js');

sc.server.boot().then(function(s) {
s.send.msg(['/status']);
s.send.msg(sc.msg.dumpOSC(1));

function spawnGroup() {
s.send.bundle(0.03, [
sc.msg.groupNew(s.state.nextNodeID())
]);
}

setInterval(spawnGroup, 2000);

});
55 changes: 55 additions & 0 deletions examples/send-bundles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env node

// In your project you will import it like this:
// var sc = require('supercolliderjs');

// From within this example folder I will import it using a relative path:
var sc = require('../index.js');

sc.server.boot({debug: true}).then(function(s) {

s.send.msg(sc.msg.groupNew(s.state.nextNodeID()));

// send immediately
// results in a late warning from scsynth:
// stdout : late 0.020416441
// because now is already in the past by the time the message
// is received
s.send.bundle(null, [
sc.msg.groupNew(s.state.nextNodeID())
]);

// 0.03 second from now
// small numbers are interpreted as relative seconds from now
s.send.bundle(0.03, [
sc.msg.groupNew(s.state.nextNodeID())
]);

// Schedule a sequence of notes.
// All osc bundles are sent immediately.
var start = (new Date()).getTime() / 1000; // unix time UTC
var seq = [
0,
1,
1.5,
2,
8,
12,
16
];
var bpm = 120;
var secondsPerBeat = 1 / (bpm / 60);

function sched(beat) {
return start + beat * secondsPerBeat;
}

for (var i = 0; i < seq.length; i++) {
// Here we are sending large numbers
// which are interpreted as unix timestamps.
s.send.bundle(sched(seq[i]), [
sc.msg.groupNew(s.state.nextNodeID())
]);
}

});
16 changes: 13 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ exports.resolveOptions = require('./lib/utils/resolveOptions').default;
exports.map = require('./lib/map');
exports.msg = require('./lib/server/osc/msg');

// alpha: this API will be changed in 0.10
exports.dryads = require('./lib/server/dryads');
var dryadic = require('dryadic');
exports.Dryad = dryadic.Dryad;

// deprec: this will be removed in 1.0
var scdryads = require('./lib/dryads');
exports.dryads = scdryads;

exports.dryadic = scdryads.dryadic;
exports.play = scdryads.play;
exports.h = scdryads.h;

/**
* @deprecated These were renamed,
* but these aliases will be kept in place until 1.0
*/
exports.sclang = exports.lang;
exports.scsynth = exports.server;

0 comments on commit 9cd9d01

Please sign in to comment.