Bithoven Gdel Encoding of Chamber Music and Functional 8-Bit Audio - - PowerPoint PPT Presentation

bithoven
SMART_READER_LITE
LIVE PREVIEW

Bithoven Gdel Encoding of Chamber Music and Functional 8-Bit Audio - - PowerPoint PPT Presentation

Bithoven Gdel Encoding of Chamber Music and Functional 8-Bit Audio Synthesis Jay McCarthy UMass Lowell & PLT Outline Waves Outline Waves Notes Outline Waves Notes


slide-1
SLIDE 1

Bithoven

Gödel Encoding of Chamber Music and Functional 8-Bit Audio Synthesis

Jay McCarthy

UMass Lowell & PLT

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

Outline

  • Waves
slide-7
SLIDE 7

Outline

  • Waves
  • Notes
slide-8
SLIDE 8

Outline

  • Waves
  • Notes
  • Scales and Chords
slide-9
SLIDE 9

Outline

  • Waves
  • Notes
  • Scales and Chords
  • Music
slide-10
SLIDE 10

Synthesis

slide-11
SLIDE 11

Pulse 1

  • Pulse 2
  • Triangle
  • Noise
slide-12
SLIDE 12

(define DUTY (vector 0.125 0.25 0.5 0.75)) (define (pulse-wave n period volume %) (define freq (pulse-period->freq period)) (define duty-cycle (vector-ref DUTY n)) (define next-% (cycle%-step % freq)) (define out (if (< next-% duty-cycle) volume 0)) (values out next-%))

slide-13
SLIDE 13

(define CPU-FREQ-MHz 1.789773) (define CPU-FREQ-Hz (* CPU-FREQ-MHz 1000.0 1000.0)) (define (pulse-period->freq period) (/ CPU-FREQ-Hz (* 16.0 (+ 1.0 period)))) (define (cycle%-step % freq) (define %step (/ freq 44100.0)) (define next% (+ % %step)) (- next% (floor next%)))

slide-14
SLIDE 14

(struct wave:pulse (duty period volume)) (struct wave:triangle (on? period)) (struct wave:noise (short? period volume)) (struct wave:dmc (bs offset)) (struct synth-frame (p1 p2 t n d))

slide-15
SLIDE 15

(struct synth-frame (p1)) (define (synth sf) (match-define (synth-frame p1) sf) (match-define (wave:pulse d p v) p1) (define sample-count 735) (define samples (make-bytes sample-count)) (for/fold ([p1-% 0.0]) ([i (in-range sample-count)]) (define-values (p1 new-p1-%) (pulse-wave d p v p1-%)) (bytes-set! samples i p1-d) new-p1-%) samples)

slide-16
SLIDE 16
slide-17
SLIDE 17

Instruments

slide-18
SLIDE 18

(define (pulse-freq->period freq) (define pre (/ CPU-FREQ-Hz (* 16.0 freq))) (round (- pre 1.0))) (define pulse-tone->period (compose1 pulse-freq->period tone->freq))

slide-19
SLIDE 19

(define (i:pulse #:duty ds #:period ps #:volume vs) (λ (frames tone) (define d* (stage-spec ds frames)) (define p* (stage-spec ps frames)) (define v* (stage-spec vs frames)) (define base-per (pulse-tone->period tone)) (for/list ([f (in-range frames)]) (define duty (eval-spec d* f)) (define per (fx+ base-per (eval-spec p* f))) (define volume (eval-spec v* f)) (wave:pulse duty per volume))))

slide-20
SLIDE 20

(define (i:pulse:basic duty) (i:pulse #:duty (spec:constant duty) #:period (spec:constant 0) #:volume (spec:constant 7)))

slide-21
SLIDE 21

(define (i:pulse:tremolo freq duty) (i:pulse/spec #:duty (spec:constant duty) #:period (spec:constant 0) #:volume (spec:% (spec:modulate freq 7 4))))

slide-22
SLIDE 22

(define (i:pulse:linear duty) (i:pulse/spec #:duty (spec:constant duty) #:period (spec:constant 0) #:volume (spec:% (spec:linear 7 0))))

slide-23
SLIDE 23

(define (i:pulse:plucky duty) (i:pulse/spec #:duty (spec:constant duty) #:period (spec:constant 0) #:volume (spec:adsr 'release 4 (spec:constant 14) 4 (spec:linear 14 7) 4 (spec:constant 7) 4 (spec:linear 7 0))))

slide-24
SLIDE 24

(define (i:pulse:natural duty) (i:pulse/spec #:duty (spec:constant duty) #:period (spec:constant 0) #:volume (spec:adsr 'sustain 4 (spec:constant 14) 4 (spec:linear 14 7) 4 (spec:constant 7) 4 (spec:linear 7 0))))

slide-25
SLIDE 25

(define i:drum:snare (i:noise #:mode (spec:constant #f) #:period (spec:constant 7) #:volume (spec:adsr 'release 1 (spec:constant 11) 4 (spec:linear 11 6) 8 (spec:linear 6 2) 4 (spec:constant 0)))) (define i:drum:bass (i:noise #:mode (spec:constant #f) #:period (spec:constant 9) #:volume (spec:adsr 'release 1 (spec:constant 10) 2 (spec:constant 7) 4 (spec:linear 4 2) 4 (spec:constant 0)))) (define i:drum:hihat (i:noise #:mode (spec:constant #f) #:period (spec:constant 12) #:volume (spec:adsr 'release 1 (spec:constant 4) 2 (spec:constant 3) 4 (spec:constant 2) 4 (spec:constant 0))))

slide-26
SLIDE 26

Music Theory

slide-27
SLIDE 27

Music Theory

Notes

slide-28
SLIDE 28

Music Theory

Notes Tempo

slide-29
SLIDE 29

Music Theory

Notes Tempo Time Signature

slide-30
SLIDE 30

Music Theory

Notes Tempo Time Signature Scale

slide-31
SLIDE 31

Music Theory

Notes Tempo Time Signature Scale Detached Scale

slide-32
SLIDE 32

Music Theory

Notes Tempo Time Signature Scale Detached Scale Fixed Scale

slide-33
SLIDE 33

Music Theory

Notes Tempo Time Signature Scale Detached Scale Fixed Scale Abstract Scale

slide-34
SLIDE 34

Music Theory

Notes Tempo Time Signature Scale Detached Scale Fixed Scale Abstract Scale Abstract Tone

slide-35
SLIDE 35

Music Theory

Notes Tempo Time Signature Scale Detached Scale Fixed Scale Abstract Scale Abstract Tone Tracker

slide-36
SLIDE 36

Music Theory

Notes Tempo Time Signature Scale Detached Scale Fixed Scale Abstract Scale Abstract Tone Tracker Chord

slide-37
SLIDE 37

(require data/enumerate)

slide-38
SLIDE 38

(require data/enumerate) (to-nat string/e "Bithoven") => 29446701124374494676409535373198388243249180

slide-39
SLIDE 39

(require data/enumerate) (to-nat string/e "Bithoven") => 29446701124374494676409535373198388243249180 (from-nat string/e 42) => "Q"

slide-40
SLIDE 40

(define (part/e ts ap cp measures len) (define cp-s (progression-seq cp)) (define pulses (* len measures (accent-pattern-pulses-per-measure ap))) (define cp/e (chord-pulses/e pulses (length cp-s))) (do/e cps <- cp/e cp <~ cps (rhythm/e ts (* cp (accent-pattern-notes-per-pulse ap))))) (define bithoven/e (vector/e (do/e ts <- time-sig/e ap <- (accent-pattern/e ts) (cons f cp) <- (cons/e form/e chord-progression/e) p <~ (form-part-lens f) (part/e ts ap cp (length (progression-seq cp)) (cdr p))) bass-notes/e))

slide-41
SLIDE 41

(define (make-nestration/e c) (match-define (vector ts ap pattern parts) c) (vector/e tone-names/e scales/e tempo/e pulse1/e pulse2/e triangle/e drums/e mhtb/e (fin/e 2 3) (fin/e 1 2) (fin/e 0 2) (do/e _ <~ parts (drum-measure/e ts ap)) (do/e ms <~ parts rest-n <- rest-n/e (if rest-n (listof-n/e (below/e rest-n) (add1 (ceiling (/ (length (append* ms)) rest-n)))) (single/e '())))))

slide-42
SLIDE 42

Synthesizer 415 Instrument DSL 254 Music Theory 301 Tracker 141 Bithoven 442 NEStration 528 TOTAL 2226

slide-43
SLIDE 43

Classic No Drums Happy Sad All