SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
Flocking
creative audio synthesis for the web

Colin Clark
Inclusive Design Research Centre,
OCAD University
Me, quick.
flockingjs.org	

github.com/colinbdclark/flocking
• Audio synthesis framework written entirely
in JavaScript	


• Dedicated specifically to supporting artists
and musicians, not gaming or industry	


• Inspired by SuperCollider, but increasingly
different	


• Very open: dual MIT/GPL license
Motivations for Flocking

• The ubiquity of the Web	

• The unresolved either/or of coding
environments vs. graphical tools	


• “Dead end” arts programming tools for
beginners	


• Inadequacy of current web-based tools for
high-quality, long-term music-making
The Web is Huge

• Unprecedentedly cross-platform	

• Huge community of programmers	

• Solid tooling	

• Flexible UI presentation layer and lots of
toolkits available to choose from	


• Performance war
Where Does Flocking Run?
Browsers & Runtimes

Operating Systems

•
• Chrome	

• Safari	

• Node.js	


• Mac OS X	

• Windows	

• Linux	

• iOS	

• Android (last I checked!)	


Firefox
flockingjs.org/demos/interactive/html/playground.html
Flocking is Declarative

• Unit generators provide a consistent

abstraction for operations on signals	


• Synthesis graphs built up by declaring trees of
named unit generators	


• You write data, not code	

• Data can be easily parsed, manipulated

transformed, saved, authored, and edited by
third-parties.
A Synth
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}
});
JavaScript & JSON
• JavaScript isn’t a toy language any more	

• Simple feature set, powerful first class
functions and extremely loose typing	


• JavaScript Object Notation: increasingly a
standard, light format for data exchange
Object Literals
{
“key”: "value"
}
Object Literals
{
“key”: "value",
number: 42.0,
isLoud: true,
method: function () { ... }
}
Array Literals

[“tenney”, “risset”, “schmickler”]
A JSON SynthDef
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}
});
A Unit Generator Def
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}
});
Inputs
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}
});
Rates
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
rate: “audio”,
freq: 440,
mul: 0.25
}
});
Input Modulation
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
rate: “audio”,
freq: 440,
mul: {
ugen: “flock.ugen.line”,
rate: “control”,
start: 0.0,
end: 0.5,
duration: 2.0
}
}
});
Expanded Form
flock.synth({
synthDef: {
ugen: "flock.ugen.out",
bus: 0,
sources: [{
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: 0.25
}, {
ugen: "flock.ugen.impulse",
freq: 2,
phase: 1.0
}]
}
});
Buffers
flock.synth({
synthDef: {
ugen: "flock.ugen.triggerGrains",
buffer: {
id: "beethoven",
url: "../andante.aif"
},
trigger: {
ugen: "flock.ugen.impulse",
freq: 2
},
centerPos: 10,
start: 0.01,
end: 0.69,
reset: 0.01
}
});
Scheduling
• Scheduling in Flocking is currently

asynchronous and “pleasantly unreliable”	


• Sample accurate scheduler coming this
summer	


• Increasingly, the goal is use the Synth/UGen
abstraction for scheduling patterns and
generative algorithms	


• JSON-based score format is evolving
Named Synth
flock.synth({
nickName: "sin-synth",
synthDef: {
id: "carrier",
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: {
ugen: "flock.ugen.line",
start: 0,
end: 0.25,
duration: 1.0
}
}
});
Once
var scheduler = flock.scheduler.async();
scheduler.once(5, {
synth: “sin-synth”,
values: {
“carrier.freq”: 440
}
});
Once
var scheduler = flock.scheduler.async();
scheduler.once(5, {
synth: “sin-synth”,
values: {
“carrier.freq”: 440
}
});
Repeat
!
scheduler.repeat(1/16, function () {
var freq = synth.get("carrier.freq"),
newFreq = freq > 20000 ? 440 : freq * 7/6;
synth.set("carrier.freq", newFreq);
});
Repeat
!
scheduler.repeat(1/16, function () {
var freq = synth.get("carrier.freq"),
newFreq = freq > 20000 ? 440 : freq * 7/6;
synth.set("carrier.freq", newFreq);
});
Synth Patterns
var freqs = [110, 220, 330, 440, 550, 660, 880];
scheduler.schedule([
{
interval: "repeat",
time: 0.25,
change: {
synth: "sin-synth",
values: {
"carrier.freq": {
synthDef: {
ugen: "flock.ugen.sequence",
loop: 1.0,
buffer: freqs
}
}
}
}
}
]);
“Score”

scheduler.schedule([
{
interval: "repeat", time: 1.0,
change: {
synth: "sin-synth",
values: {
"carrier.freq": {
synthDef: {
ugen: "flock.ugen.sequence",
buffer: [110, 220, 330, 440, 550, 660, 880]
}
}
}
}
},
{
interval: "once", time: 8,
change: {
synth: "sin-synth",
values: {
"carrier.mul.start": 0.25,
"carrier.mul.end": 0.0,
"carrier.mul.duration": 1.0
}
}
}
]);
The State of Web Audio
• W3C Web Audio API and the dominance of
Google	


• Other libraries:	

• Timbre.js	

• Audiolib.js	

• Audiolet	

• Performance directions
UI Controls

github.com/thealphanerd/Piano
github.com/aterrien/jQuery-Kontrol
Roadmap/Help!
• More unit generators!	

• Finish and stabilize declarative scheduling	

• Google Summer of Code: Inclusive Music IDE	

• Full multichannel support	

• MediaStream/WebRTC integration	

• Node.js, OSC, WebSockets and REST	

• Faust > Flocking unit generators (Myles)	

• More music!
Questions?
Colin Clark
e: colin@colinclark.org	

t: @colinbdclark

flockingjs.org	

github.com/colinbdclark/flocking

Mais conteúdo relacionado

Mais procurados

An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
Cloudflare
 
5 Vampir Configuration At IU
5 Vampir Configuration At IU5 Vampir Configuration At IU
5 Vampir Configuration At IU
PTIHPA
 

Mais procurados (20)

Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2
 
What's Special About Elixir
What's Special About ElixirWhat's Special About Elixir
What's Special About Elixir
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Fun with Ruby and Cocoa
Fun with Ruby and CocoaFun with Ruby and Cocoa
Fun with Ruby and Cocoa
 
Dockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internalsDockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internals
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Kamailio - Surfing Big Waves Of SIP With Style
Kamailio - Surfing Big Waves Of SIP With StyleKamailio - Surfing Big Waves Of SIP With Style
Kamailio - Surfing Big Waves Of SIP With Style
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
 
An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
 
Functional Operations (Functional Programming at Comcast Labs Connect)
Functional Operations (Functional Programming at Comcast Labs Connect)Functional Operations (Functional Programming at Comcast Labs Connect)
Functional Operations (Functional Programming at Comcast Labs Connect)
 
Automating Mendix application deployments with Nix
Automating Mendix application deployments with NixAutomating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
 
Terraform Modules and Continuous Deployment
Terraform Modules and Continuous DeploymentTerraform Modules and Continuous Deployment
Terraform Modules and Continuous Deployment
 
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
 
aiohttp intro
aiohttp introaiohttp intro
aiohttp intro
 
From zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and ElasticsearchFrom zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and Elasticsearch
 
Designing High Performance RTC Signaling Servers
Designing High Performance RTC Signaling ServersDesigning High Performance RTC Signaling Servers
Designing High Performance RTC Signaling Servers
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development Workflow
 
5 Vampir Configuration At IU
5 Vampir Configuration At IU5 Vampir Configuration At IU
5 Vampir Configuration At IU
 

Semelhante a Flocking at the SuperCollider Symposium 2013

Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit
 

Semelhante a Flocking at the SuperCollider Symposium 2013 (20)

A (Mis-) Guided Tour of the Web Audio API
A (Mis-) Guided Tour of the Web Audio APIA (Mis-) Guided Tour of the Web Audio API
A (Mis-) Guided Tour of the Web Audio API
 
Euroclojure2014: Schema & Swagger - making your Clojure web APIs more awesome
Euroclojure2014: Schema & Swagger - making your Clojure web APIs more awesomeEuroclojure2014: Schema & Swagger - making your Clojure web APIs more awesome
Euroclojure2014: Schema & Swagger - making your Clojure web APIs more awesome
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015
 
Packetbeat at GDG Berlin meetup
Packetbeat at GDG Berlin meetupPacketbeat at GDG Berlin meetup
Packetbeat at GDG Berlin meetup
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
 
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
 
OpenShift Overview
OpenShift OverviewOpenShift Overview
OpenShift Overview
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami Sayar
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Elegant concurrency
Elegant concurrencyElegant concurrency
Elegant concurrency
 
Building APIs with NodeJS on Microsoft Azure Websites - Redmond
Building APIs with NodeJS on Microsoft Azure Websites - RedmondBuilding APIs with NodeJS on Microsoft Azure Websites - Redmond
Building APIs with NodeJS on Microsoft Azure Websites - Redmond
 
Open Source Swift Under the Hood
Open Source Swift Under the HoodOpen Source Swift Under the Hood
Open Source Swift Under the Hood
 
Introduction Apache Kafka
Introduction Apache KafkaIntroduction Apache Kafka
Introduction Apache Kafka
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Apache Flink(tm) - A Next-Generation Stream Processor
Apache Flink(tm) - A Next-Generation Stream ProcessorApache Flink(tm) - A Next-Generation Stream Processor
Apache Flink(tm) - A Next-Generation Stream Processor
 
About Clack
About ClackAbout Clack
About Clack
 

Mais de colinbdclark

Mais de colinbdclark (11)

Open Inclusive Design
Open Inclusive DesignOpen Inclusive Design
Open Inclusive Design
 
The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQueryThe Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuery
 
Nothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive WebNothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive Web
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusion
 
Web Accessibility and Design
Web Accessibility and DesignWeb Accessibility and Design
Web Accessibility and Design
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuery
 
Accessible UIs with jQuery and Infusion
Accessible UIs with jQuery and InfusionAccessible UIs with jQuery and Infusion
Accessible UIs with jQuery and Infusion
 
Making your jQuery Plugins More Accessible
Making your jQuery Plugins More AccessibleMaking your jQuery Plugins More Accessible
Making your jQuery Plugins More Accessible
 
Architectures for Inclusive Design
Architectures for Inclusive DesignArchitectures for Inclusive Design
Architectures for Inclusive Design
 
Infusion for the birds
Infusion for the birdsInfusion for the birds
Infusion for the birds
 
Thoughts on Open Accessibility
Thoughts on Open AccessibilityThoughts on Open Accessibility
Thoughts on Open Accessibility
 

Último

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Flocking at the SuperCollider Symposium 2013