Chuck Basics Chunity - Workshop Vitor Guerra Rolla Postdoctoral - - PowerPoint PPT Presentation

chuck basics chunity workshop
SMART_READER_LITE
LIVE PREVIEW

Chuck Basics Chunity - Workshop Vitor Guerra Rolla Postdoctoral - - PowerPoint PPT Presentation

Chuck Basics Chunity - Workshop Vitor Guerra Rolla Postdoctoral Fellow vitorgr@impa.br Chuck Intro Ge Wang Designed around time => now Parallel logic Simple-text => easy to read Real-time sound synthesis MIDI


slide-1
SLIDE 1

Vitor Guerra Rolla

Postdoctoral Fellow vitorgr@impa.br

Chuck Basics Chunity - Workshop

slide-2
SLIDE 2

Chuck Intro

  • Ge Wang
  • Designed around time => now
  • Parallel logic
  • Simple-text => easy to read
  • Real-time sound synthesis
  • MIDI compatible
slide-3
SLIDE 3

Download and Installation

chuck.stanford.edu OSX / Windows / Linux MiniAudicle

– Text editor – Virtual machine monitor – Console Monitor

slide-4
SLIDE 4

Summary

Hello World Alarm MIDI keys Panning Arrays Hi-hat

slide-5
SLIDE 5

Hello Sine

Print to console Hello Sine! SinOsc Digital Audio Converter => dac => some duration to now

cycles gain time

slide-6
SLIDE 6

Hello Sine

Waveforms

SinOsc SqrOsc TriOsc SawOsc

slide-7
SLIDE 7

Data Types and Variables

slide-8
SLIDE 8

Time in Chuck

time and dur are native types

time: a point in time dur: a length of time

Only by manipulating now => advance time

slide-9
SLIDE 9

Time in Chuck

Special properties of now

when read: gives us the current chuck time when modified: moves time along in Chuck

Chucking a duration to now advances time while automatically suspending your code and letting sound generate Until you advance time, you are working at a single point in time

slide-10
SLIDE 10

Time in Chuck

Alarm example

slide-11
SLIDE 11

MIDI Introduction

Std.mtof() and Std.ftom()

slide-12
SLIDE 12

MIDI Introduction

slide-13
SLIDE 13

Std Library - Unit Conversion

slide-14
SLIDE 14

Math Library – Random Numbers

Math.random() int Math.random2(int min, int max) in between int Math.randomf() float in the range [0,1] Math.random2f(float min, float max) in between float Math.srandom(int)

slide-15
SLIDE 15

Math Library

slide-16
SLIDE 16

Math Library

slide-17
SLIDE 17

Audio Panning

dac.left & dac.right & dac.chan(int) Pan2 [-1.0, 1.0] Math.sin(float x)

slide-18
SLIDE 18

Arrays

Block of memory stringed together used to make a “list” or “group” of data.

slide-19
SLIDE 19

Array Loop

<<< A.cap() >>>; for(0 => int i; i < A.cap(); i++){ ...

slide-20
SLIDE 20

ADSR Envelope

slide-21
SLIDE 21

hi-hat

 noise  ADSR envelope  high pass filter

 time (seconds)  volume  0,002  0,01  max  0,1  random();

slide-22
SLIDE 22

Thank you