## 1. Project Overview & Quickstart (nannou-org/LICENSE-MIT)

# LICENSE-MIT

Open-source repository nannou-org/LICENSE-MIT

### Repository Details
- **Repository:** [nannou-org/LICENSE-MIT](https://github.com/nannou-org/LICENSE-MIT)
- **Primary Language:** Code

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (nannou-org/website)

## File: README.md

### Nannou Website

Built using Gatsby and ReactJS. Deployed using Netlify 

Follow the steps below to build the site locally on your machine.

1. Fork this repo
2. git clone to a folder on your hard drive 
3. cd into the cloned repo 
4. Install Gatsby: 
```npm install gatsby-cli```

5. install all the npm packages ```npm install```
6. build the site locally ```npm run develop```
7. open up a browser and go to ```localhost:8000```

Any updates that you make to the site will update here in real time when you hit save.

---

## File: package.json

{
  "name": "gatsby-starter-hello-world",
  "private": true,
  "description": "A simplified bare-bones starter for Gatsby",
  "version": "0.1.0",
  "license": "MIT",
  "scripts": {
    "build": "dot-env gatsby build",
    "develop": "env-cmd -f .env gatsby develop",
    "format": "prettier --write src/**/*.{js,jsx}",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.27",
    "@fortawesome/free-brands-svg-icons": "^5.12.1",
    "@fortawesome/free-regular-svg-icons": "^5.12.1",
    "@fortawesome/free-solid-svg-icons": "^5.12.1",
    "@fortawesome/react-fontawesome": "^0.1.8",
    "dotenv": "^8.2.0",
    "emotion": "^10.0.9",
    "gatsby": "^2.19.28",
    "gatsby-cli": "^2.10.10",
    "gatsby-image": "^2.2.42",
    "gatsby-plugin-google-analytics": "^2.1.36",
    "gatsby-plugin-manifest": "^2.2.42",
    "gatsby-plugin-offline": "^2.2.10",
    "gatsby-plugin-react-helmet": "^3.1.22",
    "gatsby-plugin-robots-txt": "^1.5.0",
    "gatsby-plugin-sass": "^2.1.29",
    "gatsby-plugin-sharp": "^2.4.5",
    "gatsby-plugin-sitemap": "^2.2.27",
    "gatsby-plugin-twitter": "^2.1.19",
    "gatsby-remark-autolink-headers": "^2.1.24",
    "gatsby-remark-images": "^3.1.44",
    "gatsby-remark-prismjs": "^3.3.32",
    "gatsby-remark-relative-images": "^0.3.0",
    "gatsby-remark-responsive-iframe": "^2.2.32",
    "gatsby-source-filesystem": "^2.1.48",
    "gatsby-transformer-remark": "^2.6.58",
    "gatsby-transformer-sharp": "^2.3.16",
    "inter-ui": "^3.12.1",
    "intersection-observer": "^0.7.0",
    "node-sass": "^4.13.1",
    "prismjs": "^1.27.0",
    "react": "^16.13.0",
    "react-custom-share": "^0.4.8",
    "react-dom": "^16.13.0",
    "react-helmet": "^5.2.1",
    "react-icons": "^3.9.0",
    "react-responsive": "^8.0.3",
    "ts-pnp": "^1.1.6",
    "typeface-inter": "^3.12.0",
    "typescript": "^3.8.3",
    "remark-mdx": "2.0.0-next.9"
  },
  "devDependencies": {
    "env-cmd": "^9.0.3",
    "prettier": "^1.19.1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

---

## File: src/markdown/applications/workshops.md

---
title:  "Creative Coding With Nannou Workshops"
date:  "2020-03-06"
featured: "../../images/Nannou-13-banner.jpg"
document_type: "application"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "Workshop",
    "MindBuffer",
    "Proposal",
]
---



# Creative Coding with Nannou

## Overview

Creative coding is a way of looking at programming as a tool for creative expression. One of the beauties of creative coding is the potential to express ourselves in a wide variety of domains. 
**Nannou** is a modern creative coding framework that aims to give equal priority and easy access to a full suite of creative input and output including graphics, audio, LASERs, lighting and more.



*Daily Sketch #842 by [Mactuitui](https://www.instagram.com/mactuitui/) using nannou.*

We would like to propose a two hour workshop where attendees get an introduction to creative coding through **nannou** along with the opportunity to use **nannou** to experiment with each of these domains in a guided, relaxed and playful setting.



## Workshop Description

A two-hour interactive workshop introducing **nannou** as a tool for creative coding.
The workshop will begin with a short 20 minute presentation introducing ourselves, **nannou** and the underlying motivations that drive the project and community.
Following the presentation, we will dive into a hands-on walk-through of some featured examples that demonstrate **nannou**'s diverse potential. These will begin by covering windowing, graphics, GUI and audio. Users are encouraged to run the examples on their own machine and modify them in creative ways to change their output.






Finally, we will take a look at a small, pre-setup collaborative installation featuring some DMX addressable LED bars and a single LASER projector (provided by us). Attendees will have the opportunity to connect to a WLAN and send some pre-prepared controls via **nannou**'s OSC API. If time permits, attendees will be given time to freely experiment with the knowledge they've been bestowed with access to myself and Josh for assistance. The workshop will end with some concluding remarks, an opportunity for feedback, discussion around the **nannou** community, how to get involved, and thanks for attendance!



### Intended Audience

We welcome artists who are new to creative coding, existing coders looking to get in touch with their creative side, and everyone in between. Attendees who have some beginner experience with coding in any language may find the workshop easier, but this is not a strict requirement.


### Ideal Outcomes
* Attendees feel inspired by the realisation of their ability to express themselves creatively through code using **nannou**.
* Artists are excited by the potential to express themselves through multiple mediums.
* Beginner coders see **nannou** as an exciting, interactive way to experiment and learn coding.
* Creative coders coming from frameworks in other languages such as Processing and OpenFrameworks understand the benefits of using Rust.
* Creative coders interested in Rust find a welcoming community of like-minds that share their vision and will value their contributions.

### Pre-requisites
Users should come prepared with a charged laptop running either macOS, Windows or Linux and have **nannou** built on their system as [per the guide](https://guide.nannou.cc/getting_started.html).


## Workshop Timeline

1. Short introduction of ourselves, creative coding, **nannou** and its motivations. 
2. A guided walk-through of some provided examples:
   * 2D graphics with **nannou**'s Draw API.
   * Simple graphical user interface.
   * Using multiple windows.
   * Simple audio synthesis and file playback.
   * Networked interaction via OSC.
3. LASER and LED lighting control demonstration.
4. Free experimentation if time permits.
5. Concluding remarks
    * Joining the community on slack
    * Visiting the online guide
    * Contributing
    * Thanks!

## About MindBuffer 

The workshop will be hosted by Joshua Batty and Mitchell Nordine, experienced creative coders and two of the three **Nannou** Organisation co-founders. The duo have given **nannou** workshops around the world including as a part of the Creative Coding meetup in Berlin, Media Lab in Melbourne and at the RustFest 2019 Conference in Barcelona where over 50 participants took place in a two-part, four hour booked-out workshop.



*nannou Creative Coding Workshop by MindBuffer - RustFest BCN 2019*

Joshua Batty has a PhD in audiovisual relationships and has experience in teaching creative coding in an educational, university setting. Mitchell Nordine is a long-time member of the open source creative coding community, most notably founding the RustAudio organisation, the Conrod GUI library and now the Nannou Organisation.



Joshua and Mitchell make their living through creative coding as [MindBuffer](https://mindbuffer.net), an award-winning audiovisual research and digital design studio, specialising in immersive interactive art installations with notable clients including Museums Victoria, RMIT University, IBM Watson and Studio Robert Henke.



*MindBuffer projects made with nannou.*

**Nannou** is the foundation of all of their recent work, both personal and commercial. The majority of their spare time is spent contributing to the framework and assisting the growing community.

---

## File: src/markdown/posts/hello_nannou.md

---
title:  "Hello Nannou!"
date:  "2018-06-13"
featured: "../../images/nannou_logo_alpha.png"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "Initial Release",
    "MindBuffer",
    "Workshops",
]
---

Welcome to the initial release of Nannou!

Nannou is an open source creative coding framework built in Rust for artists, hackers, designers and devs to express themselves with simple, fast, reliable, portable code.

If you would prefer to jump straight in you can [get started here](https://github.com/nannou-org/nannou#getting-started)!


*Simple Harmonic Motion GUI, [LATTICE](https://www.mindbuffer.net/lattice/) laser installation, [Spatial Audio Server](https://github.com/museumsvictoria/spatial_audio_server).*

Whether working on a 12-month laser installation or a 5 minute sketch, Nannou aims to give artists easy access to the tools they need.

## Motivation

Nannou is founded on three foundational motivations:

1. **A fast, modern language.** When experimenting with the cutting edge in audiovisual processing high performance becomes a necessity. When performing live or creating long-running installations reliability becomes equally important. Rust ticks these boxes and more. Read more about why we chose Rust [here](https://github.com/nannou-org/nannou#why-rust).
2. **Batteries Included.** One of the beauties of being a creative coder is that we have the potential to create works in a wide range of domains. Nannou aims to give equal priority to a full suite of creative I/O including graphics, multi-windowing, audio, lasers, lighting and more. See a more detailed list of both planned and existing features and protocols [here](https://github.com/nannou-org/nannou#goals).
3. **Open Source & Liberally Licensed.** Access to these technologies is often expensive and locked behind proprietary systems. We believe in democratising this space by open sourcing Nannou for everyone to use.

## Join Us!

Although we have been working hard over the last year, Nannou is still a young project and there is a lot of [work to be done](https://github.com/nannou-org/nannou#goals). We envisage Nannou as a community project - a collaborative effort at building an artistic foundation on which we can all go forth, create and realise our own crazy and unique ideas.

We invite you to play by [exploring the included examples](https://github.com/nannou-org/nannou#nannou-examples) or perhaps by having a go at porting an existing Processing / openFrameworks / Cinder sketch. If you are interested in contributing, whether it be code, ideas or feedback we would love to hear from you! Feel free to open pull requests and leave issues at the [GitHub repo](https://github.com/nannou-org/nannou), post in the [forum](http://forum.nannou.cc) or chat with us on [our slack channel](https://nannou.slack.com).

We are extremely excited Nannou's potential and we look forward to building an inclusive, thriving community together with you all.

## Upcoming Workshops

We are currently in **Barcelona** and have several events planned for the coming weeks:

1. A creative coding meetup at [Protopixels studio](https://protopixel.net/) on the 26th of June.
2. The [Makers of Barcelona](http://www.mob-barcelona.com/) space (date TBA).
3. A workshop with the [Telenoika](http://www.telenoika.net/) creative collective (date TBA).

We are also going to be at Sonar Festival this week. [Get in touch](contact@nannou.cc) if you would like to meet up!

If you are interested in hosting a Nannou workshop or presentation please get in touch! Even if we can not be there in person, we can provide materials that may help you to host your own.

## Thanks for Reading!

[Get started here](https://github.com/nannou-org/nannou/tree/readme#getting-started).

We'll leave you with some of recent works that we have created using Nannou.

- [**LATTICE**](https://www.mindbuffer.net/lattice/) - a 5x channel audiovisual laser installation driven by custom generative music software.



- [**ORACLE**](https://www.mindbuffer.net/oracle/) - an immerse installation featuring 128x moving-heads and spatial audio.

  [](https://www.mindbuffer.net/oracle/)

- [**Spatial Audio Server**](https://github.com/museumsvictoria/spatial_audio_server) - a cross-platform, n-channel spatial audio server developed for Scienceworks & Museums Victoria.

  [](https://github.com/museumsvictoria/spatial_audio_server)

*With love and lazers from Mitch, Josh, Keenan & Tom | The Nannou Organisation <3*

---

## File: src/markdown/posts/moss_grant_announce.md

---
title:  "Nannou awarded Mozilla grant for foundational audio development"
date:  "2019-10-22"
featured: "../../images/mission_partners_nannou_mozilla.png"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "MOSS",
    "Mozilla",
    "Grant",
    "Audio",
]
---

*[**Nannou**](https://nannou.cc/) is a creative coding framework that aims to
make it easy for artists to express themselves with simple, fast, reliable
code.*



It is our great pleasure to announce that **Nannou has been awarded 10K USD in
funding as a part of the [MOSS Mission
Partners](https://www.mozilla.org/en-US/moss/mission-partners/) track**. The
proposed work is aimed towards improving the state of some foundational crates
within the Rust audio ecosystem over the next three to four months.  Key areas
of our work will include:

- Addressing some long-standing issues in
  [CPAL](https://github.com/rustaudio/cpal).
- Review and improve CPAL's web audio support.
- Implement a simple web app and guide demonstrating CPAL's web audio support.
- Design, develop and document a standard audio graph abstraction and crate,
  reflecting on lessons learned and limitations of prior efforts, and the
  requirements of the wider rust audio community.

We look forward to empowering both Nannou users and the wider Rust audio
ecosystem with this work. I, [mitchmindtree](https://github.com/mitchmindtree)
on GitHub, will be doing the majority of CPAL design and development within the
issue tracker and pull requests at [CPAL's Github
repository](https://github.com/rustaudio/cpal) where those interested will be
free to review and provide feedback. In around two months after the CPAL work is
addressed, we will begin to tackle the audio graph work. At this point, we will
post an update with our plans and solicit feedback from the various branches of
the rust audio community before moving ahead.

[](https://github.com/RustAudio)

### Acknowledgements

Thank you Mozilla and the MOSS team for giving us this opportunity and including
us as a Mission Partner! We look forward to diving into the work and doing our
best to become a positive example of what funding OSS development can achieve
for the wider community.

Thank you Erlend and the [Amethyst](https://amethyst.rs/) team for reaching out
and encouraging us to apply! Without your encouragement, demonstration of prior
success, and enthusiasm for the proposed work we likely would not have taken the
time to apply. The Nannou and Amethyst projects share a significant amount of
upstream code and will share more as Nannou plans to adopt
[rendy](https://github.com/amethyst/rendy) in the near future. We believe taking
the time to communicate, collaborate and encourage one another is the path
forward for OSS and we look forward to continuing to do so with the Amethyst
team.



### Supporting Nannou

While this contribution marks a significant milestone in Nannou's quest for
sustainability, we still have a long way to go. If you are interested in
supporting Nannou's development, please consider becoming a contributor at [our
open collective page](https://opencollective.com/nannou).

If you would like to get to know our community a little better or simply hang
out with some like-minded creative coders, feel free to [join us on
slack](https://communityinviter.com/apps/nannou/nannou-slack)!

### RustFest Reminder

Josh and I will be giving a workshop on creative coding with Nannou at
[RustFest Barcelona](https://barcelona.rustfest.eu/) next month! We hope to
see you there!



<3 Mitch and the nannou team

---

## File: src/markdown/posts/moss_grant_completion.md

---
title:  "MOSS Audio Development Grant - Reaching the Final Milestone"
date:  "2020-07-15"
featured: "../../images/mission_partners_nannou_mozilla.png"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "MOSS",
    "Mozilla",
    "Grant",
    "Audio",
]
---

*[**Nannou**](https://nannou.cc/) is a creative coding framework that aims to
make it easy for artists to express themselves with simple, fast, reliable
code.*



Towards the end of 2019, **nannou had the honour of [being awarded a
grant](https://nannou.cc/posts/moss_grant_announce) as a part of the MOSS
Mission Partners track**. The proposed work aimed to improve the state of some
foundational crates within the Rust audio ecosystem.

We are proud to announce that today marks the completion of the goals outlined
in our original proposal! The following describes our journey through the work,
the unexpected hurdles, the pleasant surprises, and a hint of what we wish to
focus on next.


### Addressing long-standing issues in CPAL

One of **nannou**'s core design tenets is to prefer pure-Rust solutions over
bindings to other languages where possible. This often means assisting in
driving forward progress upstream and being part of the change we want to see.

[CPAL](https://github.com/rustaudio/cpal), the Cross Platform Audio Library, is
a major collaborative effort by the Rust audio community to develop a low-level,
portable API around the popular audio I/O hosts available on major platforms. A
large part of our work involved addressing some of CPAL's long-standing issues.

[](https://github.com/RustAudio)

**Non-Blocking Streams**

The first step was to assist in landing a major overhaul of the way events are
handled throughout CPAL ([#354](https://github.com/RustAudio/cpal/pull/354)).
Previously, CPAL exposed a single EventLoop API that owned all devices and
streams would block when it was run. This overhaul refactored CPAL to more
closely match modern audio APIs, instead providing a per-stream, non-blocking
API and allowing audio processing to occur on a high-priority thread managed by
the host. This work was a significant collaborative effort originally sparked by
ishitatsuyuki. Major breaking changes like this in cross-platform libraries are
particularly difficult, as individual maintainers rarely have access to every
supported platfrom on hand. As a result, coordination and communication between
multiple contributors is often essential.

**Dynamic Sample Formats**

Next we aimed to improve the ergonomics of working with buffers of a dynamically
selected sample format in a manner that aimed to better take advantage of Rust's
type system ([#359](https://github.com/RustAudio/cpal/pull/359)). Previously,
users were required to specify their desired sample format via an enum variant
and then match on the given buffer type once every callback, despite the API
indicating that the sample format is supported prior to the streams beginning.
To improve upon this, we refactored the API to allow the user to choose between
static sample format selection ([via a
type](https://docs.rs/cpal/0.12.0/cpal/traits/trait.DeviceTrait.html#method.build_output_stream))
or dynamically handling the sample format chosen by the host (see the [raw
stream builder alternative
method](https://docs.rs/cpal/0.12.0/cpal/traits/trait.DeviceTrait.html#tymethod.build_output_stream_raw)).
A big thanks to Ralith for their critical feedback and follow-up PR that
resulted in a much nicer overall outcome.

**Stream Timestamps**

One glaring hole in CPAL's stream API has been the lack of timestamps associated
with stream events. System timestamps are essential for many audio applications,
particularly those that require accurately synchronising multiple different
media formats like video playback or multimedia workstations. After some
research into existing solutions and drafting up a proposal
([#363](https://github.com/RustAudio/cpal/issues/363)), we landed a new
`StreamInstant` API ([#397](https://github.com/RustAudio/cpal/pull/397)). The
work aims to address this gap by providing system timestamps for the moment
audio is captured via an input device, delivered to the user via callback, and
played back via an output device with a friendly API modelled after the
`std::time::Instant` type.

**Requesting Buffer Sizes**

Possibly the most sought after and frequently requested change of all was the
ability to request audio buffers of a specific size
([#205](https://github.com/RustAudio/cpal/issues/205)). Having the ability to
change the size of the buffer used by the device to capture or play back audio
allows users to control the trade-off between low-latency and energy efficiency.
This is a major priority for interactive audio applications like digital audio
workstations and games, seemingly two of CPAL's major user groups. In
[#401](https://github.com/RustAudio/cpal/pull/401) we landed support for this,
giving the user the option to request a specific buffer size or allowing the
host to fallback to some default. A big thanks to sniperrifle2004 who closely
reviewed the ALSA host implementation, caught some mistakes and pointed out some
vital quirks in the ALSA API that needed addressing.

Amidst these changes there were of course other minor unplanned tweaks and
patches that made sense to address in between. These included switching from
`failure` to the lighter and more library-friendly `thiserror` crate
([#340](https://github.com/RustAudio/cpal/pull/340)), renaming types to better
suit audio library conventions
([#371](https://github.com/RustAudio/cpal/pull/371)) and [many
others](https://github.com/RustAudio/cpal/pulls?q=is%3Apr+is%3Aclosed+author%3Amitchmindtree).




### CPAL + WASM

One of our major goals for nannou is to eventually allow users to compile and
run their sketches or apps on the web by targeting WASM, WGPU, and WebAudio. In
turn, one of our goals for this period of work was to make a start on a WASM +
WebAudio host for CPAL. CPAL contributor dpeckett beat us to the punch with
their proof-of-concept in [#372](https://github.com/RustAudio/cpal/pull/372) and
ishitatsuyuki provided a simple `wasm-beep` example that made it much easy to
follow and test the work locally.

After rebasing and updating dpeckett's work for the new timestamp and buffer
size APIs ([#406](https://github.com/RustAudio/cpal/pull/406)), and adding
ishitatsuyuki's `wasm-beep` as an official cpal example
([#416](https://github.com/RustAudio/cpal/pull/416)), CPAL is looking promising
as a simple way to target both native platforms and the modern web in pure Rust!

To accompany the example, we have added a [step-by-step
tutorial](https://github.com/RustAudio/cpal/wiki/Setting-up-a-new-CPAL-WASM-project)
to CPAL's wiki describing how to setup your CPAL project to target the web. To
demonstrate, we've created a (veeery basic) web page where you can test out CPAL
in the browser right now!

[**cpal-wasm-demo.nannou.cc**](https://cpal-wasm-demo.nannou.cc)

**NOTE:** There's a tiny WAV embedded in the WASM, so it might take a couple of
seconds to download the audio on the first "Play". The demo seems to work nicely
on desktop Firefox and Chrome but no luck on Safari or Edge just yet, we are yet
to investigate.

Here is a [link to the repo](https://github.com/nannou-org/cpal_wasm_example)
for this demo in case you would like to take a look.


### "sample" becomes DASP - Digital Audio Signal Processing

When working with low-level audio in code, there is a common set of patterns and
abstractions that the vast majority of audio libraries and applications apply.
Supporting conversions between various sample formats, working with slices of
both interleaved and non-interleaved data, rate interpolation for converting
between different sample rates, just to name a few.

The `sample` crate aimed to provide these fundamentals for working with PCM
(pulse-code modulation) DSP (digital signal processing). In other words, sample
provided a suite of low-level, high-performance tools including types, traits
and functions for working with digital audio signals.

The name `sample` is a remnant of the crate's original goal at inception which
was to provide a simple `Sample` trait abstraction along with a well-tested
suite of conversions between the most commonly encountered sample format types.
Since then the crate gained more contributors and grew to cover more of the
aforementioned fundamentals with a collection of abstractions designed to
interoperate in a nice manner. In turn, the original name began to make less
sense.

`sample` has been renamed to `dasp`, a name that better aligns with the goal of
the project - to provide a library akin to the std, but for digital audio signal
processing. As a part of [this
refactor](https://github.com/RustAudio/dasp/pull/120), the crate has been split
into a collection of feature-gated sub-crates, greatly improving modularity and
allowing users to precisely select the tools and abstractions that they need.
You can find a simple overview of the available crates
[here](https://github.com/RustAudio/dasp#crates).

**dasp_graph**

[`dasp_graph`](https://docs.rs/dasp_graph) is a new addition to the `dasp` crate
collection for dynamically creating and editing audio graphs. The crate is
targeted towards users who require an efficient yet flexible and dynamically
configurable audio graph. Use cases include virtual mixers, digital audio
workstations, game audio systems, virtual modular synthesizers and related
applications where the ability to add and remove nodes and re-route audio at
runtime is a must.

This work has been a long-time coming and is the result of many discussions in
the rust audio community and lessons learned over the last few years of working
with rust and audio. You can read more about `dasp_graph`, its motivations and
usage at [the PR](https://github.com/RustAudio/dasp/pull/130) and
[docs.rs](https://docs.rs/dasp_graph/0.11.0/dasp_graph/).


## Future Work

While we are happy with the work achieved over the past few months, there is of
course much more to be done! Some next steps that come to mind for CPAL include:

- Resolve some [minor follow-up web target
  issues](https://github.com/RustAudio/cpal/issues?q=is%3Aopen+is%3Aissue+label%3A%22platform+-+web%22).
- Improve mobile target support
  ([iOS](https://github.com/RustAudio/cpal/issues?q=is%3Aopen+is%3Aissue+label%3A%22platform+-+ios%22),
  [Android](https://github.com/RustAudio/cpal/labels/platform%20-%20android)).
- Events for handling the arrival/removal of devices
  ([#373](https://github.com/RustAudio/cpal/issues/373)).
- Improve handling of non-interleaved audio data layouts ([#367](https://github.com/RustAudio/cpal/issues/367)).
- Duplex stream support ([#349](https://github.com/RustAudio/cpal/issues/349)).

**CPAL & cubeb**

During our work we also came across [cubeb](https://github.com/kinetiknz/cubeb).
Like CPAL, cubeb is a cross-platform audio I/O library, though implemented in C
and C++. The project is the audio backend currently in use by Firefox, and an
early effort at porting parts of the project have begun at
[cubeb-rs](https://github.com/djg/cubeb-rs). We would love to see an exploration
of how the two projects might collaborate and potentially combine efforts to
achieve the goal of creating a nice, pure-Rust, cross-platform audio I/O
experience.

**Updating nannou**

Of course, we are excited to land all of these recent improvements in nannou! In
particular, this allows us to begin experimenting with running nannou sketches
and applications on the web! [Stay
tuned](https://github.com/nannou-org/nannou/issues/7).


## Acknowledgements

Our work is but a small fraction in the grand scheme of Rust audio development -
there are many others doing great and important work! Consider joining the
[rust-audio discourse](https://rust-audio.discourse.group/), following the
repositories at the [RustAudio Github
organisation](https://github.com/rustaudio) or joining the fresh [#rust-audio
Matrix
channel](https://matrix.to/#/!OmPvYBHtyUKAbzvZFW:matrix.org?via=matrix.org) to
follow along and join the community.

Thank you again to Mozilla and the MOSS team for giving us this opportunity and
including us as a Mission Partner! Open source software tends to form the
digital foundation of the society we live in. While it is difficult to predict
which projects will succeed and reach such a foundational status, many would
never get the chance without generous opportunities like this. Thank you!


## Supporting Nannou

While this contribution marks a significant milestone in Nannou's quest for
sustainability, we still have a long way to go. If you are interested in
supporting Nannou's development, please consider becoming a contributor at [our
open collective page](https://opencollective.com/nannou).

If you would like to get to know our community a little better or simply hang
out with some like-minded creative coders, feel free to [join us on
matrix](https://matrix.to/#/+nannou:matrix.org) or if you'd prefer, the [bridged
slack channels](https://communityinviter.com/apps/nannou/nannou-slack)!

---

## File: src/markdown/posts/nannou_v0.13.md

---
title:  "Nannou Update - WebGPU, capturing frames and more!"
date:  "2020-03-05"
featured: "../../images/Nannou-13-banner.jpg"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "WebGPU",
    "MindBuffer",
    "MacTuitui",
]
---



**Nannou** is an open source, creative coding framework for Rust. Today marks
one of the biggest milestones for the project since its launch - the release of
version **0.13**.

This version is particularly special for our community as it opens the
floodgates for a lot of pending graphics work and paves the road ahead for
running nannou on the web!




*Daily Sketch 1219 by [Mactuitui](https://www.instagram.com/mactuitui/) using nannou.*

While the main focus was graphics, this release also lands some serious patches
and long-desired features. We'll cover this and more.

- [WebGPU](#WebGPU)
- [Capturing Frames & Textures](#Capturing-Frames-&-Textures)
- [What's Next?](#Whats-Next)
- [RustFest BCN](#RustFest-BCN)
- [Join Us!](#Join-Us)


## WebGPU

[WebGPU](https://en.wikipedia.org/wiki/WebGPU) is a new cross-platform standard
for working with hardware accelerated graphics and compute. Despite having "Web"
in the name, the standard lends itself incredibly well as a portable *native*
solution for working with the GPU.



With 0.13, nannou gains support for this new standard via **wgpu-rs** - a Rust
implementation of the standard driven by the [gfx-rs](https://github.com/gfx-rs)
community. Adopting wgpu results in a whole suite of nice new benefits for
nannou users.

### Running on the web!

**wgpu** provides a promising path forward to running nannou on the web! WebGPU
is [in the process of being implemented by all major
browsers](https://github.com/gpuweb/gpuweb/wiki/Implementation-Status) and
provides exciting new opportunities for easily sharing serious graphics and
compute projects. While the web target is not quite ready today, the path ahead
for running nannou sketches and apps online looks promising! You can track
progress on the web target
[here](https://github.com/gfx-rs/wgpu-rs/issues/101).

### Nicer native macOS experience

**wgpu** targets Metal on macOS directly, rather than going through MoltenVK.
This alone greatly simplifies the build process on macOS and closes around 20%
of nannou's open issues!



### WebGPU Community

The WebGPU standard has a vibrant and active community surrounding it and
wgpu-rs has already been adopted by [a number of
projects](https://github.com/gfx-rs/wgpu-rs#friends) over the past few years.
The developers have been incredibly supportive making the adoption process very
easy. **[kvark](https://github.com/kvark)** especially has been an exceptional help, and even has a commit in
the new release. 0.13 would likely be another week or two away if it was not for
your support, so thank you!

## Capturing Frames & Textures

With the release of 0.13, nannou users can now easily and efficiently capture
frames and save them to a file. This makes it much easier to screenshot, record
and share sketches.

You can capture the next frame in its final state right before it is presented
to the window like this:

```rust
window.capture_frame(path);
```

You can call this method at any time during your application, for example on a
`key_pressed` event to take a screenshot, or during the `update` or `view` to
capture every frame into a sequence. See the **[simple_capture.rs example](https://github.com/nannou-org/nannou/blob/master/examples/simple_capture.rs)** for a demonstration.






*Daily Sketch 1220 by [Mactuitui](https://www.instagram.com/mactuitui/), updated for 0.13 and captured using this approach.*

Sometimes its useful to capture your sketch at a much higher resolution than
what your window can support, especially stills intended for print. Nannou now
also supports this case by allowing users to draw to a much larger texture,
capturing it with the new `TextureCapturer` type and simultaneously downscaling
for preview within the window. See the **[capture\_hi\_res.rs example](https://github.com/nannou-org/nannou/blob/master/examples/capture_hi_res.rs)** for a demonstration of this.

## What's Next?

Adopting **wgpu-rs** opens the door for a range of graphics-related updates that
have been awaiting the overhaul. These include:

- **Draw API improvements:** Nannou's `Draw` API has been missing the ability to
  easily draw images, switch between blend modes, apply group transformations
  and take advantage of the glyph cache when rendering text. These are all much
  more easily addressable now that 0.13 has landed.
- **Update to lyon 0.15** Nannou's 2D vector graphics are based on the excellent
  [lyon crate](https://github.com/nical/lyon). We are looking forward to
  updating to the latest version and adopting the fancy [new
  tessellator](https://nical.github.io/posts/new-tessellator.html).
- **A friendly way of working with shaders:** We would love to provide a super
  easy and simple API for loading custom shaders, perhaps with a shader-toy
  inspired approach that allows for easily targeting arbitrary textures.

## RustFest BCN

Although it was a few months ago now, we wanted to use this opportunity to
mention that we had a great time at the RustFest BCN workshop! We were
overwhelmed by the attendance, and would like to apologise to those who couldn't
find a seat or spare power socket due to the packed room.

Lasers and LEDs at the Creative Coding Workshop with [@nannoucc](https://twitter.com/nannoucc?ref_src=twsrc%5Etfw) at [#rustfest](https://twitter.com/hashtag/rustfest?src=hash&amp;ref_src=twsrc%5Etfw) [pic.twitter.com/NhHWUELyBX](https://t.co/NhHWUELyBX)&mdash; Sophie G (@rarity2017) [November 9, 2019](https://twitter.com/rarity2017/status/1193213060598697985?ref_src=twsrc%5Etfw) 

Thanks to Sophie for capturing this moment!

If you are interested in organising a nannou workshop near you, feel free to get
in touch via [contact@nannou.cc](mailto:contact@nannou.cc).

## Join Us!

Since we announced the project almost a year and a half ago, nannou has grown
from a small three-person team into a small community. Feel free to join us!

Most of us hang out in the [nannou
slack](https://communityinviter.com/apps/nannou/nannou-slack) and would be more
than happy to meet you and chat about all things creative coding and nannou :)

Whether you made a fancy sketch or just got an ellipse drawing to the screen,
feel free to share it with us on twitter
[@nannoucc](https://twitter.com/nannoucc)! The
[#nannou](https://twitter.com/search?q=%23nannou&src=typed_query) hashtag also
has lots of awesome creations from the community.



*Daily Sketch 0114 by [Mactuitui](https://www.instagram.com/mactuitui/)*



If you would like to help us spend more time on nannou, consider becoming a
contributor at [our Open Collective page](https://opencollective.com/nannou).



Get started with nannou **[here](https://guide.nannou.cc/)**!

---

## File: src/markdown/posts/nannou_v0.9.md

---
title:  "Nannou Update - Vulkan, LASERs and more!"
date:  "2019-06-09"
featured: "../../images/nannou_update_featured.jpg"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "Vulkan",
    "Lasers",
    "MindBuffer",
]
---



**Nannou** is an open source, creative coding framework for Rust. Today marks
one of the biggest milestones for the project since its launch - the release of
version **0.9**.

This version is particularly special for our community as it lands the last
*eight months* of progress into master and onto crates.io. While some of us have
already been using the work-in-progress 0.9 branch in our personal and
commercial work over the past few months, it is a relief to finally be able to
land and share the progress with the wider world!





*Daily Sketch #821 by [Mactuitui](https://www.instagram.com/mactuitui/) using nannou.*



Normally, we aim to publish far more regularly and
incrementally, however this release involved some significant changes and we
wanted to do our best to get them right.

- [Vulkan Graphics](#Vulkan-Graphics)
- [Simpler API](#Simpler-Event-API)
- [LASER Support](#LASER-Support)
- [The Guide](#The-Guide)
- [What's Next?](#Whats-Next)
- [Join Us!](#Join-Us)



## Vulkan Graphics

The largest change is without a doubt the switch from OpenGL to
[Vulkan](https://www.khronos.org/vulkan/) for handling cross-platform graphics.



Our primary reasons for making the switch are:

- Gaining support for compiling and running languages other than GLSL (e.g.
  [RLSL](https://github.com/MaikKlein/rlsl), HLSL) on the GPU via Vulkan's
  low-level SPIR-V representation.
- Access to finer-grained control over the GPU for more thorough optimisation if
  necessary.
- No longer having to deal with OpenGL bugs resulting from inconsistent
  implementations across different devices and versions.
- Switching to a more modern, future-proof, cross-platform graphics standard.

The change has been large enough that we decided to dedicate a follow-up post
with all the juicy details, including how we automated the installation process
for macOS, some of the trade-offs involved in leaving OpenGL, our experience
working with vulkano, future plans for graphics in nannou and more.



*Nannou + Vulkan in action. A Magic Mirror Installation for Museums Victoria by
[MindBuffer](https://mindbuffer.net).*



## Simpler Event API

Nannou aims to make it easy to work with application and windowing events in a
way that feels simple and intuitive to both new and old Rust users. In this
release, we greatly simplified the API for registering functions for handling
different kinds of events.

Here is an example of what a fresh nannou app might look like today:

```rust
use nannou::prelude::*;

struct Model {
    window: window::Id,
}

fn main() {
    nannou::app(model)
        .run();
}

fn model(app: &App) -> Model {
    let window = app
        .new_window()
        .view(view)
        .build()
        .unwrap();
    Model { window }
}

fn view(app: &App, model: &Model, frame: Frame) -> Frame {
    let draw = app.draw();
    draw.background().color(LIGHT_PURPLE);
    draw.ellipse().color(DARK_BLUE);
    draw.to_frame(app, &frame).unwrap();
    frame
}
```

If we want to add a function for updating our model, we can easily do so by
first adding a function to be called on each update:

```rust
fn update(app: &App, model: &mut Model, update: Update) {
    // Let's update the model here.
}
```

Now we register our new update function in our app builder:

```rust
nannou::app(model)
    .update(update) // Add the update function to the app here.
    .run();
```

We can now update our model over time!

The same approach applies if we want to add keyboard, mouse or any other kind of
event. Here's another example for handling mouse presses:

```rust
fn mouse_pressed(app: &App, model: &mut Model, button: MouseButton) {
    // Do something on mouse pressed.
}
```

```rust
let window = app
    .new_window()
    .mouse_pressed(mouse_pressed) // Add the mouse pressed function to the window here.
    .view(view)
    .build()
    .unwrap()
```

You can find an example demonstrating nearly all application and window events
available in nannou
[here](https://github.com/nannou-org/nannou/blob/master/examples/all_functions.rs).



## LASER Support

One of the things that separates a creative coding environment from a game
engine is the diversity in access to different kinds of creative I/O. While a
game engine might revolve around a single window and stereo sound, digital
artists often need access to multiple windows for projection mapping or large
displays, *n*-channel spatial audio for exhibitions, networked DMX for
controlling lighting fixtures and much more.



*LATTICE by [MindBuffer](https://www.mindbuffer.net/), developed using nannou.*

One of our personal favourite mediums to work with is LASER projection. It's
hard to beat the immersive feeling of being engulfed in a beam of light so
bright that it carves the air around you into planes of colours that you feel
like you can touch! That said, access to the necessary hardware and software
required to start playing with these tools yourself can be expensive and laced
with frustrating, proprietary licensing.

Version **0.9** brings with it [**nannou_laser**](https://github.com/nannou-org/nannou_laser) -
a new crate dedicated to easy access to well optimised, LASER projector DAC
streams. **nannou_laser** is our attempt to begin democratising this space at the
software level. The crate features a suite of optimisation passes to account for
tricky details such as draw order optimisation, inertia reduction, blanking
delays and sharp angle delays - features that are difficult to find in existing
free and open-source solutions.



If you happen to have a LASER projector and a DAC supporting the Ether Dream
protocol, you can begin playing with **nannou_laser** by checking out [these
examples](https://github.com/nannou-org/nannou/tree/master/examples/laser).
Otherwise, you can find more info on **nannou_laser** at [the
README](https://github.com/nannou-org/nannou_laser) and on
[docs.rs](https://docs.rs/nannou_laser).



## The Guide

**Nannou** aims to be more than just a framework of useful tools - we wish to
build a community. We envision a future where nannou can be used to introduce
programming to students in a more fun and interactive manner, or as an
entry-point for artists seeking to expand their canvas beyond their familiar
domain into the land of code and information.

A pivotal step in achieving this future is breaking down the boundary of entry
for new and potential users and to provide a suite of resources that educators
can use for working with new students. One of the approaches we have recently
began working on in order to achieve this is to create a nannou "oracle" of
sorts in the form of [an online guide](https://guide.nannou.cc/). The guide aims
to be a one-stop-shop for all information, tips and tricks someone could desire
related to nannou.

[](https://guide.nannou.cc)

Currently, the guide features a ["Why
Nannou?"](https://guide.nannou.cc/why_nannou.html) chapter outlining the goals
and motivations for the project and a ["Getting
Started"](https://guide.nannou.cc/getting_started.html) chapter that walks users
through setting up nannou and starting their first project.

The plan from here is to begin building a large suite of
["Tutorials"](https://guide.nannou.cc/tutorials.html) where users can dive
straight into whatever their desired use-case is for nannou. Current ideas
include "Drawing 3D shapes", "Creating multi-window GUI", "Setting up microphone
input", and [many, many more](https://guide.nannou.cc/tutorials.html). In order
to get through such a large number of tutorials, the plan is to run regular
sprints where each of the core maintainers jump on slack together and aim to
write one full tutorial each while assisting any other members of the community
who might also be interested in hanging out and contributing. We'll release more
info on this soon!

You can check out the guide in its current state
[here](https://guide.nannou.cc). If you are interested in contributing, you can
find the repo [here](https://github.com/nannou-org/guide).



## What's Next?

### Near Term

- **Patches and fixes** - Seeing as the entire graphics backend has been
  replaced, we expect some users may run into small quirks and bugs that we
  might have missed. We have set aside some time to make sure we can address
  these and make any patches that might be necessary.
- **Lyon 2D** - While nannou's current implementation of 2D *kind* of works,
  there are a few glaring bugs and many missing features.
  [Lyon](https://github.com/nical/lyon) is an exceptional, relatively mature and
  well researched effort at solving 2D graphics *properly*. We are hoping that
  the switch will solve most existing bugs in nannou's 2D API and add a suite of
  missing features such as curves, GPU-accelerated tesselation and more.
- **Higher-level graphics abstractions** - While the new Vulkan-based graphics
  API is already far ahead of our old OpenGL implementation, a lot of work still
  remains. The current API around building render passes and graphics pipelines
  is still quite low level. Now that 0.9 is out we plan to investigate how we
  can simplify common patterns and create higher-level abstractions without
  sacrificing the current low-level access. We have been building a suite of
  [vulkan
  examples](https://github.com/nannou-org/nannou/tree/master/examples/vulkan) to
  help identify these patterns and guide progress from the top-down.
- **The Guide** - As mentioned above!

### Long Term

- **Gantz** - [gantz](https://github.com/nannou-org/gantz) is a library for
  creating and evaluating executable directed graphs at runtime. Currently, it's
  a research project investigating how we can eventually provide a way to
  compose together creative applications at runtime, inspired by graphical
  programming environments such as Max/MSP, Pure Data and Touch Designer.
- **GUI Editor** - Having created [the conrod
  project](https://github.com/pistondevelopers/conrod), rewriting it multiple
  times and using it in multiple commercial projects over the past few years, we
  have learned a lot about how to do GUI in Rust and what we feel is important!
  Our vision for nannou is to eventually allow for composing GUIs in a graphical
  environment. We anticipate that **gantz** will likely play a pivotal role in
  the project, as dynamically composed GUI also tends to imply dynamically
  composed programs. *You can find some more of my personal thoughts on the topic
  [here](https://github.com/nannou-org/nannou/issues/2#issuecomment-429036368).*

These are just a few of the goals that come to mind as I write this post. Feel
free to visit the [Goals section](https://guide.nannou.cc/why_nannou.html#goals) of the
guide to get an idea of what else we have planned, or visit the [issue
tracker](https://github.com/nannou-org/nannou/issues) to find more detailed
plans or suggest your own.



## Join Us!

Since we announced the project almost a year ago, nannou has grown from a small
three-person team into a small community. Feel free to join us!

Most of us hang out in the [nannou
slack](https://communityinviter.com/apps/nannou/nannou-slack) and would be more
than happy to meet you and chat about all things nannou :)



Get started with nannou **[here](https://guide.nannou.cc/)**!

---

## File: src/markdown/posts/organizing.md

---
title:  "Organizing Nannou Work"
date:  "2019-06-14"
document_type: "post"
tags: [
    "Nannou",
    "Rust",
    "Creative Coding",
    "stackoverflow",
    "github projects",
]
---
Just spent the morning getting my organizing hat on.

## Projects
I've added two projects to the nannou github:

1. [Buffers, Screenshots, Video and Stuff ](https://github.com/nannou-org/nannou/projects/2)
This is a place to organize work for a few things I'd like to see in nannou.
Being able to save the screen to a buffer, display an image to the screen and eventually video support.
There are a lot of challenges involved in these goals so I thinks it's worthy of a project.
2. [Bugs 🐛🐛🐛](https://github.com/nannou-org/nannou/projects/3)
This is a place to do a bit of bug triage. As we are a very small team it can be a little 
overwhelming to keep track of all the issues that come in as the project grows.
I hope this can help prevent issues going missing in the depths and also prioritize 
the more urgent problems.
I only intend this to be a place for issues that are broken code in nannou not 
feature requests or unimplemented sections of code.

Don't feel any obligation to use these projects, I know kanban isn't everyone's cup of tea.
Having said that if you do happen to make / find an issue that you think fits one of these projects
adding it to the project might help someone get to it quicker.


## Stackoverflow
Asking coding questions about nannou in our [slack](https://communityinviter.com/apps/nannou/nannou-slack) is a great way to get quick answers 
but if there isn't someone around who can answer it then your question might 
float up into chat oblivion.

So to help with this I'm going to be monitoring [stackoverflow.com](https://stackoverflow.com) 
for nannou related issues. Just tag the post with the __nannou__ tag.
This will be useful for larger questions and also makes it easier for others
to see answers to common questions.

Thanks
Tom G