Peter Rademaker & Robert Stremler. Preview 1.Introduction 2.The Basics 3.Simple Examples 4.Interpretation and Performance 5.MIDI 6.Algebraic Properties.

Slides:



Advertisements
Similar presentations
Introduction to the Elements of Music
Advertisements

Music Terms & Symbol Review
Music Terms Game Feel free to add to the game by adding more terms and definitions! Please share your additions and send to
Gradually getting louder Largo Staccato f pp Crescendo Alla Marcia Vivace Diminuendo Accelerando Legato Allegro ff.
Haskore Musikbearbeitung mit Haskell Paul Hudak, Yale University, USA
Introduction to Music Theory
Tempo Dynamics Articulation
Chapter 20 Functional Music Composition. MDL: Music Description Language MDL is a DSL for computer music composition that is even simpler than FAL and.
Music Terms & Symbol Review
Music Theory Review. Staff Treble Clef Bass Clef.
Answering Aural Questions-Dynamics and Expressive techniques
ALL MUSIC HAS VALUE TO SOMEBODY. What is Music? The Organization of Sound in Time.
Cse536 Functional Programming 1 5/16/2015 Lecture #19, Dec 1 & 6, 2004 Todays Topics – Haskore System –The Music datatype –MIDI Instruments –Pitch & absolute.
Functional Music Interim Presentation Simon McNeilly Supervisors Dr. Lloyd Allison Dr. Jon McCormack.
Cse536 Functional Programming 1 6/17/2015 Lecture #19, Dec 1 & 6, 2004 Todays Topics – Haskore System –The Music datatype –MIDI Instruments –Pitch & absolute.
Honours project: Interim presentation Amanda Crawford – Comp. Sci. Honours
Cse536 Functional Programming 1 6/26/2015 Lecture #19, Dec. 6, 2004 Todays Topics –Interpreting Music –Performance –MidiFile Read – Chapters 21 - Interpreting.
Chapter 22 From Performance to MIDI. Motivation  Abstractly, an MDL program denotes a Performance.  But a Performance is just a Haskell data structure.
Beethoven Revisited. In Beethoven Copy Cat you composed a piece using the rhythm and form (aa’ba’) of Beethoven. In this assignment, you will use Beethoven’s.
Functional Music (I) Amanda Crawford Hons. Comp.Sci Monash University, Australia. Supervisors: Lloyd Allison, Jon McCormack.
Music Theory Clef Notes Dynamics Tempos Articulations.
Designing a Music Scripting Language Casey Mihaloew TJHSST Computer Systems Lab Abstract: The problem addressed in this project is finding a.
Elements of Music Music History.
Christmas Final Review 2nd quarter Band Time Signature Indicates the number of beats per measure.
Making music Consider music as structured sound Components include –Pitch –Duration –Instrument –Stereo direction Each attribute has a set of possible.
The GUIDO Music Notation Format
Music Performance Music Performance Outcome 2 Performance Technique Technical work and exercises linked to a Listening Journal approach towards greater.
Final Review 7th grade Band 4th quarter Time Signature Indicates the number of beats per measure.
TJHSST Computer Systems Lab Senior Research Project Designing a Music Scripting Language Casey Mihaloew Abstract: The problem addressed in this.
A Breath in an Electronic World: Experiments in Musical Expression using a Midi Wind Controller Matthew Ahrens Mentor: Dr. James Bohn Bridgewater State.
Large Group Performance Evaluation Preparation Guidelines for Making a Superior Performance Presented by Banddaddy.com.
Music Investigation Outcome 1 Investigation The combined class approach using a Listening Journal highlights the elements of Music in a progressive pedagogy.
An Algebraic Theory of Polymorphic Temporal Media Paul Hudak Yale University Department of Computer Science PADL Symposium June 18, 2004.
You must compose a melody of 8 bars. It is best to write for a chosen instrument, and you Choose – violin, trumpet, bassoon etc. It is best to write.
CEDFA 2013 Session 2 Creative Expression Peter J. Warshaw Fine Arts Director Leander ISD.
MIDI Extensions, alternatives
PROJECT 5: Video Scoring 1. Create a soundtrack for a chosen short film or individual scene, importing the video into Logic. The video may be original.
Music Investigation Outcome 3 Performance (including Technical Work) On completion of this unit the student should be able to present a performance of.
Band Manual Foreword “If you A.S.K., you will receive!”
Other Aspects of Musical Sound pp Texture  Texture describes the number of things that are going on at once in a piece of music.  Monophony-
Music Performance Music Performance Outcome 2 Performance Technique Technical work and exercises linked to a Listening Journal approach towards greater.
TJHSST Computer Systems Lab Senior Research Project Designing a Music Scripting Language Casey Mihaloew Abstract: The problem addressed in this.
Musical Terms for Choir Make sure you know how these are used!!!
Music Terms & Symbol Review. Measure Clef A symbol that assigns pitches to the staff.
Reading, Writing, and Making Music Clef Notes Dynamics Tempos Articulations.
Chelmsford Public Schools Fine and Performing Arts Department Band Curriculum Map By the end of each grade level, students will be able to: Grade 5Grade.
Chelmsford Public Schools Fine and Performing Arts Department Chorus Curriculum Map By the end of each grade level, students will be able to: Grade 5Grade.
Unit Three Dynamics, Tempo, Articulation. Dynamic Signs Dynamics signs indicate the volume, or how soft or loud the music should be played. The dynamics.
Making Music A Review of dynamics and other musical expressions and markings. Ms. Pair.
Chelmsford Public Schools Fine and Performing Arts Department Orchestra Curriculum Map By the end of each grade level, students will be able to: Grade.
Musical Terms Musical Terms Studying music terminology through the 6 concepts Focus: Tone Colour & Texture Stage 6 Music – Musicology (Interactive Whiteboard)
Music terms!. Music 1Music 2Music 3Music 4Music
Music Performance Music Performance Outcome 2 Performance Technique Technical work and exercises linked to a Listening Journal approach towards greater.
Area of Study - Popular Music
Expression, Articulation, and more
Elements of Music Melody – a succession of tones arranged in such a way to give musical sense. Rhythm – is the movement or procedure with uniform recurrence.
MUSIC HIGH SCHOOL – MADRIGAL
Christmas Final Review
Note Cards.
Introduction to the Elements of Music
The concerto through time: Romantic edition
Lesson #9 : Articulations & Dynamics
AP Music Theory Mr. Silvagni
Articulation for Wind Players
Compositional Functional Programming with the Haskore Music
AP Theory Homework #1 Properties of Sound _____ / 20
Compositional Functional Programming with the Haskore Music
Year 9 - Starter Activity
MUSIC HIGH SCHOOL – WOMEN’S CHORUS
The frequency (Hertz) of a sound
Presentation transcript:

Peter Rademaker & Robert Stremler

Preview 1.Introduction 2.The Basics 3.Simple Examples 4.Interpretation and Performance 5.MIDI 6.Algebraic Properties 7.Conclusions

Introduction Developed by Paul Hudak, Yale University, 1997 Modules for expressing musical structures Music rather than sound Algebra of music Objects represent both abstract musical ideas and their concrete implementations

Haskore Architecture

The Basics module Basics where infixr 5 :+:, :=: type Pitch = (PitchClass, Octave) data PitchClass = Cf | C | Cs | Df | D | Ds | Ef | E | Es | Ff | F | Fs | Gf | G | Gs | Af | A | As | Bf | B | Bs deriving (Eq,Ord,Ix,Show) type Octave = Int

The Basics module Basics where infixr 5 :+:, :=: type Pitch = (PitchClass, Octave) data PitchClass = Cf | C | Cs | Df | D | Ds | Ef | E | Es | Ff | F | Fs | Gf | G | Gs | Af | A | As | Bf | B | Bs deriving (Eq,Ord,Ix,Show) type Octave = Int data Music = Note Pitch Dur [NoteAttribute] | Rest Dur | Music :+: Music | Music :=: Music | Tempo Int Int Music | Trans Int Music | Instr IName Music | Player PName Music | Phrase [PhraseAttribute] Music deriving Show type Dur = Float type IName = String type PName = String

Some helpers c,d... :: Octave Dur [NoteAttribute] Music c o = Note (Cf,o) d o = Note (C,o) … wn, hn, qn,... :: Dur wn = 1 hn = 1/2 qn = ¼ … wnr, hnr, qnr,... :: Music wnr = Rest wn hnr = Rest hn qnr = Rest qn …

Some Simple Examples line, chord :: [Music] Music line = foldr (:+:) (Rest 0) chord = foldr (:=:) (Rest 0) cMaj = map (λf f 4 qn []) [c, e, g] cMajArp = line cMaj cMajChd = chord cMaj

Some Simple Examples line, chord :: [Music] Music line = foldr (:+:) (Rest 0) chord = foldr (:=:) (Rest 0) cMaj = map (λf f 4 qn []) [c, e, g] cMajArp = line cMaj cMajChd = chord cMaj delay :: Dur Music Music delay d m = Rest d :+: m repeatM :: Music Music repeatM m = m :+: repeatM m withIdenticalVoice = m1 :=: Trans 7 m2

Attributes Interpretation Overview MusicPlayer Perfomance MIDI

Phrasing and Articulation data NoteAttribute = Volume Float | Fingering Int | Dynamics String data PhraseAttribute = Dyn Dynamic | Art Articulation | Orn Ornament data Dynamic = Accent Float | Crescendo Float | Diminuendo Float | PPP | PP | P | MP | SF | MF | NF | FF | FFF | Loudness Float | Ritardando Float | Accelerando Float data Articulation = Staccato Float | Legato Float | Slurred Float | Tenuto | Marcato | Pedal | Fermata | FermataDown | Breath | DownBow | UpBow | Harmonic | Pizzicato | LeftPizz | BartokPizz | Swell | Wedge | Thumb | Stopped data Ornament = Trill | Mordent | InvMordent | DoubleMordent | Turn | TrilledTurn | ShortTrill | Arpeggio | ArpeggioUp | ArpeggioDown | Instruction String | Head NoteHead data NoteHead = DiamondHead | SquareHead | XHead | TriangleHead | TremoloHead | SlashHead | ArtHarmonic | NoHead

Interpretation and Performance type Performance = [Event] data Event = Event Time IName AbsPitch DurT Volume type Time = Float type DurT = Float type Volume = Float

Interpretation and Performance perform :: PMap Context Music Performance type PMap = PName Player type Context = (Time,Player,IName,DurT,Key,Volume) type Key = AbsPitch

Interpretation and Performance perform :: PMap Context Music Performance type PMap = PName Player type Context = (Time,Player,IName,DurT,Key,Volume) type Key = AbsPitch perform pmap m = case m of Note p d nas playNote pl c p d nas Rest d [] Tempo a b m perform pmap (setTempo c (dt * float b / float a))m Trans p m perform pmap (setTrans c (k+p)) m Instr nm m perform pmap (setInstr c nm ) m Player nm m perform pmap (setPlayer c (pmap nm)) m Phrase pas m interpPhrase pl pmap c pas m

Interpretation and Performance perform :: PMap Context Music Performance type PMap = PName Player type Context = (Time,Player,IName,DurT,Key,Volume) type Key = AbsPitch perform pmap m = case m of Note p d nas playNote pl c p d nas Rest d [] Tempo a b m perform pmap (setTempo c (dt * float b / float a))m Trans p m perform pmap (setTrans c (k+p)) m Instr nm m perform pmap (setInstr c nm ) m Player nm m perform pmap (setPlayer c (pmap nm)) m Phrase pas m interpPhrase pl pmap c pas m m1 :+: m2 perform pmap c m1 ++ perform pmap (setTime c (t+(dur m1)*dt)) m2 m1 :=: m2 merge (perform pmap c m1) (perform pmap c m2)

Interpretation and Performance merge :: Performance Performance Performance merge = if e1 < e2 then e1 : merge es1 b else e2 : merge a es2 merge [] es2 = es2 merge es1 [] = es1

Players data Player = MkPlayer PName NoteFun PhraseFun NotateFun type NoteFun = Context Pitch Dur [NoteAttribute] Performance type PhraseFun = PMap Context [PhraseAttribute] Music (Performance,Dur) type NotateFun = ()

Example Player defPlayNote :: (Context NoteAttribute Event Event) -NoteFun defPlayNote nasHandler p d nas = [ foldr (nasHandler c) (Event t i (absPitch p + k) (d*dt) v) nas ] defNasHandler :: Context NoteAttribute Event Event defNasHandler (_,_,_,_,_,v) (Volume v') ev = setEventVol ev (v*v'/100.0) defNasHandler _ _ ev = ev defInterpPhrase :: (PhraseAttribute Performance Performance) PhraseFun defInterpPhrase pasHandler pmap pas m = let (pf,dur) = perf pmap c m in (foldr pasHandler pf pas, dur) defPasHandler :: PhraseAttribute Performance Performance defPasHandler (Dyn (Accent x)) pf = map (\e setEventVol e (x * getEventVol e)) pf defPasHandler (Art (Staccato x))pf =map (\e setEventDur e (x * getEventDur e)) pf defPasHandler (Art (Legato x)) pf =map (\e setEventDur e (x * getEventDur e)) pf defPasHandler _ pf = pf deffancy

Midi Musical Instrument Digital Interface Protocol for communicating musical events and meta- events

Conversion to a Midi file type UserPatchMap = [(IName,GenMidiName,MidiChannel)] performToMidi :: Performance UserPatchMap MidiFile performToMidi pf pMap = MidiFile mfType (Ticks division) (map (performToMEvs pMap) (splitByInst pf))

Algebraic Properties (m1 :+: m2) :+: (m3 :+: m4) m1 :+: m2 :+: m3 :+: m4 m1 m2 iff (forall imap,c) perform imap c m1 perform imap c m2 Definition

Algebraic Properties For any r1, r2, r3, r4, and m: Tempo r1 r2 (Tempo r3 r4 m) Tempo (r1*r3) (r2*r4) m Proof: perform dt (Tempo r1 r2 (Tempo r3 r4 m)) perform (r2*dt/r1) (Tempo r3 r4 m) perform (r4*(r2*dt/r1)/r3) m perform ((r2*r4)*dt/(r1*r3)) m perform dt (Tempo (r1*r3) (r2*r4) m)

Algebraic Properties For any r1, r2, m1, and m2: Tempo r1 r2 (m1 :+: m2) Tempo r1 r2 m1 :+: Tempo r1 r2 m2 Proof: perform (t,dt) (Tempo r1 r2 (m1 :+: m2)) perform (t,r2*dt/r1) (m1 :+: m2) perform (t,r2*dt/r1) m1 ++ perform (t',r2*dt/r1) m2 perform (t,dt) (Tempo r1 r2 m1) ++ perform (t',dt) (Tempo r1 r2 m2) perform (t,dt) (Tempo r1 r2 m1) ++ perform (t'',dt) (Tempo r1 r2 m2) perform (t,dt) (Tempo r1 r2 m1 :+: Tempo r1 r2 m2) where t' = t + (dur m1)*r2*dt/r1 t'' = t + (dur (Tempo r1 r2 m1))*dt

Conclusions Clear distinction between music and performance Algebra of music GUI lacking Maintenance Haskell well suited as an executable specification language