Skip to content

Commit

Permalink
Merge pull request #16 from wadeevans/wevproofread
Browse files Browse the repository at this point in the history
fixed some more typos in main.adoc
  • Loading branch information
plexus committed Nov 3, 2023
2 parents 15d705e + 734eeac commit 7625c31
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/sources/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ endif::[]

== Preface

It is my hope that this book will be a gentle introduction to `Overtone` for a complete beginner as well for a novice. I hope to approach the topic of Overtone with a grain of cynicism; "what can go wrong will go wrong". Overtone is still a highly unstable library and for a workshop of 6-8 participants, it takes usually half an hour or less to get everyone started. That said, you'll most likely encounter redundant details and/or debugging instructions for highly improbable scenarios while reading this book. Keep in mind that what may seem obvious to you isn't necessarily obvious to everyone.
It is my hope that this book will be a gentle introduction to `Overtone` for a complete beginner as well as for a novice. I hope to approach the topic of Overtone with a grain of cynicism; "what can go wrong will go wrong". Overtone is still a highly unstable library and for a workshop of 6-8 participants, it takes usually half an hour or less to get everyone started. That said, you'll most likely encounter redundant details and/or debugging instructions for highly improbable scenarios while reading this book. Keep in mind that what may seem obvious to you isn't necessarily obvious to everyone.

The computer can be an amazing, exciting tool to fulfill our creative needs. But at the same time the computer, and its building blocks, computer programs and code, can be at times indescribably painful, misconfigured and unpredictive. The hurdles you may encounter may include tooling, mac/linux/windows specific problems, files and libraries mislocated, version incompatibilities, and the list can go on forever. Luckily we will be getting ourselves comfortable with the programming language Clojure, which in the total 10 years of its existence, has seen an explosion of book publications, tutorials, workshops and stackoverflow questions/answers. So if you find youself in the unfortunate situation of getting stuck with something unrelated to Overtone, your odds are good that someone else on the internet already had the same problem as you, and you're only one google search away from getting yourself back on track. At any point in time for any problem you are facing, you should always feel welcome to open ticket on github, ask question on stackoverflow, the irc(freenode) or on slack(clojurians). The software community as a whole is riddled with micro-aggressive "bromance" behaviour and hence can be at times quite intimidating for beginners to reach out for help. Which among other factors(in my subjective opinion), we end up with demographics of coders, be it art related or not, completly out of proportion in relation to the demographics of the general population. Please be aware that the Clojure community has on all social-media platforms, meetups and conferences a set of guidelines for behaviour, protocols in case of violation and group of confidentials to report violations to. I believe that these measures has made the Clojure community relatively more inclusive and diverse, every day I see experienced developers go out of their way to help someone in need of help and I hope you will enjoy the benefits of the Clojure community in the same way as I did when I was a total beginner.
The computer can be an amazing, exciting tool to fulfill our creative needs. But at the same time the computer, and its building blocks, computer programs and code, can be at times indescribably painful, misconfigured and unpredictive. The hurdles you may encounter may include tooling, mac/linux/windows specific problems, files and libraries mislocated, version incompatibilities, and the list can go on forever. Luckily we will be getting ourselves comfortable with the programming language Clojure, which in the total 10 years of its existence, has seen an explosion of book publications, tutorials, workshops and stackoverflow questions/answers. So if you find youself in the unfortunate situation of getting stuck with something unrelated to Overtone, your odds are good that someone else on the internet already had the same problem as you, and you're only one google search away from getting yourself back on track. At any point in time for any problem you are facing, you should always feel welcome to open a ticket on github, ask question on stackoverflow, the irc(freenode) or on slack(clojurians). The software community as a whole is riddled with micro-aggressive "bromance" behaviour and hence can be at times quite intimidating for beginners to reach out for help. Which among other factors(in my subjective opinion), means that we end up with demographics of coders, be it art related or not, completely out of proportion to the demographics of the general population. Please be aware that the Clojure community has on all social-media platforms, meetups and conferences a set of guidelines for behaviour, protocols in case of violation and a group of confidentials to report violations to. I believe that these measures has made the Clojure community relatively more inclusive and diverse, every day I see experienced developers go out of their way to help someone in need of help and I hope you will enjoy the benefits of the Clojure community in the same way as I did when I was a total beginner.

As my personal advice as an artist to artists stepping into the journey of creative coding: don't believe everything software engineers tell you about software, in the same way you shouldn't believe everything an artist tells you about how art should be. An artist and software-engineer will and should approach code in different ways. You will never hear stories about Beethoven implementing a Continous Integration test to determine if his 7th symphony accidentally lost a note while he was writing his 8th, or Stravinsky trip out on his Bassoon type checker when he wrote the introduction to the Rite of Spring. Learning from the best is always a good approach and becoming better at programming is only going to make you faster and more effective, but do watch out for the abyss of infinite information and take moderate actions. If our goal is to create art for the real world, be completely shameless if your code isn't orthodox as long as it produces the desired result and you had fun writing it. While the "old-school" composer is sitting next to a piano with pen and empty staff notation paper, in the same way you will find ourself with an empty text document in your text editor, with your fingers on the keyboard, ready to explore the physical boundaries of music, sound and time.

Expand All @@ -74,9 +74,9 @@ This source for this book is hosted on https://github.com/overtone/overtone.gith

=== Conventions Used

The examples and code used in this book will try to be as neutral as possible when it comes to choice of text-editor. All modern text editors have some sort of plugin to run and evaluate Clojure code. If you are starting out with the programming language Clojure, you may easily get confused or lost on how to replicate some of the examples in your text editor. Therefore we aim to make all of our examples replicable using nothing but Leiningen in the terminal via `lein repl`, and assume from the reader basic understanding of the terminal/cmd (if you know how to explore directories and install apps with the terminal, you probably know enough). Leiningen is the most popular build tool in Clojure and is the build tool that glues Overtone's sources and dependencies together. Overtone does work with alternative build tools like `boot`, as well as a standalone java jar file, but that and how to integrate Overtone to specific text-editor will not be included in this book.
The examples and code used in this book will try to be as neutral as possible when it comes to choice of text-editor. All modern text editors have some sort of plugin to run and evaluate Clojure code. If you are starting out with the programming language Clojure, you may easily get confused or lost on how to replicate some of the examples in your text editor. Therefore we aim to make all of our examples replicable using nothing but Leiningen in the terminal via `lein repl`, and assume from the reader basic understanding of the terminal/cmd (if you know how to explore directories and install apps with the terminal, you probably know enough). Leiningen is the most popular build tool in Clojure and is the build tool that glues Overtone's sources and dependencies together. Overtone does work with alternative build tools like `boot`, as well as a standalone java jar file, but that and how to integrate Overtone to any specific text-editor will not be included in this book.

Please be also aware that topics often overlap. If something isn't clear, have a look at the chapter titles to see if the concepts you're trying to understand is explained elswhere in the book.
Please be also aware that topics often overlap. If something isn't clear, have a look at the chapter titles to see if the concepts you're trying to understand are explained elswhere in the book.

= Installation

Expand Down Expand Up @@ -280,7 +280,7 @@ nil
user=>
```

Much of what is written in the documentation will be explained in subsequent chapters. But let's suffice to say that `demo` is a function intended to evaluate an instrument and play it immediately for 2 seconds, which can come in handy when developing sounds and you want to hear the results quickly. And `sin-osc` is an oscillator that produces sinewave shape audio-signal (or control-signal, more on that later). Unlike `demo` which needs at least 1 instrument to be given as a parameter, then `sin-osc` can be called without any parameter, if that's the case, then `sin-osc` will look at its own default parameter and use those instead. Which would be 440 cycles per second on full amplitude.
Much of what is written in the documentation will be explained in subsequent chapters. But let's suffice to say that `demo` is a function intended to evaluate an instrument and play it immediately for 2 seconds, which can come in handy when developing sounds and you want to hear the results quickly. And `sin-osc` is an oscillator that produces sinewave shape audio-signal (or control-signal, more on that later). Unlike `demo` which needs at least 1 instrument to be given as a parameter, then `sin-osc` can be called without any parameter, if that's the case, then `sin-osc` will look at its own default parameters and use those instead. Which would be 440 cycles per second on full amplitude.


We will conclude this chapter by playing 2 seconds of 440Hz sinewave. It won't sound pretty but it's a fast and effective way to determine if everything is working accordingly.
Expand Down Expand Up @@ -327,7 +327,7 @@ To most clearly hear what's going on here, let's try to play this line as an upw
(demo (sin-osc :freq (+ 200 (* 200 (env-gen env :action FREE))))))
```

This clearly didn't sound like glissando, so what's going on here? We did indeed specify a line from 0 to 1 and multiplied the line by 200 to glide 200Hz ending at 400Hz. Using `:step` the envelope makes no attempt bridge the gap between the points we provided it. So as soon as the instrument started we heard 300Hz and halfway through it changed to 400Hz. So what happened to our first point of 200Hz? In those cases where the envelope loops, there's a chance of distorted hum if the envelope doesn't begin where it ends, so point 0 on x-axis works as a pivot point and will never be played.
This clearly didn't sound like glissando, so what's going on here? We did indeed specify a line from 0 to 1 and multiplied the line by 200 to glide 200Hz ending at 400Hz. Using `:step` the envelope makes no attempt to bridge the gap between the points we provided it. So as soon as the instrument started we heard 300Hz and halfway through it changed to 400Hz. So what happened to our first point of 200Hz? In those cases where the envelope loops, there's a chance of distorted hum if the envelope doesn't begin where it ends, so point 0 on x-axis works as a pivot point and will never be played.

Let's try again, but this time let's try to bridge the gap by applying a linear function to the points using `:lin`.

Expand All @@ -348,7 +348,7 @@ image::env2.png[A squared line]
TIP: The envelope function can also take a number and/or vector of numbers instead of keywords for the shape. In that case, 0 marks a linear curve and the higher the number, the curvier. Negative values means curve in the opposite direction. These can produce interesting curves which can be hard to visualize, you may want to try the examples from the http://doc.sccode.org/Classes/Env.html[Supercollider documentation] in your Supercollider and use the nice plotter as aid. `Env.new` and `envelope` do the same thing.

=== Built-in envelope shapes
Like mentioned, you can use the function `envelope` to define any arbitrary shape you want via `:step` and apply various function to a vector of provided points. But most of the time you'll want to use built-in functions that provide the most commonly used envelope shapes for sound-designing.
As mentioned, you can use the function `envelope` to define any arbitrary shape you want via `:step` and apply various function to a vector of provided points. But most of the time you'll want to use built-in functions that provide the most commonly used envelope shapes for sound-designing.

- `adsr` create an attack decay sustain release envelope
- `lin` creates a linear trapezoidal shaped envelope
Expand Down Expand Up @@ -386,7 +386,7 @@ The following expression plays a sawtooth oscillator for 1 second with even atta
(* env (saw 220))))
```

Now if we wanted a sinewave envelope with two peaks, we need to apply abs (asbolute value) on the LFO signal so as not to end up with negative amplitude values. Here we don't need to cut the sinewave signal in half since applying `abs` causes the sinewave to become unipolar (from 0 to 1) as opposed to bipolar (from -1 to 1).
Now if we wanted a sinewave envelope with two peaks, we need to apply abs (absolute value) on the LFO signal so as not to end up with negative amplitude values. Here we don't need to cut the sinewave signal in half since applying `abs` causes the sinewave to become unipolar (from 0 to 1) as opposed to bipolar (from -1 to 1).

```Clojure
(demo (let [dur 1
Expand Down

0 comments on commit 7625c31

Please sign in to comment.