Introduction to Csound 2.

Slides:



Advertisements
Similar presentations
Beat Frequency.
Advertisements

Sound Synthesis Part II: Oscillators, Additive Synthesis & Modulation.
The Csound Score a group of function tables and list of note statementsa group of function tables and list of note statements combining score with orchestra.
HasSound: Generating Musical Instrument Sounds in Haskell Paul Hudak Yale University Department of Computer Science Joint work with: Matt Zamec (Yale ‘00)
Digital Sound Representation & Introduction to Software Synthesis Electronic Music Studio TU Berlin Institute of Communications Research
IntroductionIntroduction Most musical sounds are periodic, and are composed of a collection of harmonic sine waves.Most musical sounds are periodic, and.
MUSIC NOTES Noise Versus Music  What is the difference between noise and music?  Answer: The appearance of the waveform.  What is the difference between.
Unit Generators and V.I.s Patches are configurations of V.I.s Both Patches & Virtual Instruments can be broken down into separate components called Unit.
Comb Filters Good model for exponentially decaying echoesGood model for exponentially decaying echoes impulse input: output: (scaling factor =.9)
Physics 1251 The Science and Technology of Musical Sound Unit 1 Session 8 Harmonic Series Unit 1 Session 8 Harmonic Series.
The Csound Orchestra semi-colon begins a commentsemi-colon begins a comment Csound ignoresCsound ignores everything on the line after the semi-coloneverything.
Sound Synthesis CE 476 Music & Computers. Additive Synthesis We add together different soundwaves sample-by-sample to create a new sound, see Applet 4.3.
Dr. Jie ZouPHY Chapter 8 (Hall) Sound Spectra.
What is Csound? a programming language for sound generationa programming language for sound generation uses software synthesis to compile user-defined.
Additive Synthesis Any periodic waveform can be expressed as the sum of one or more sine wavesAny periodic waveform can be expressed as the sum of one.
2005/11/101 KOZ Scalable Audio Speaker: 陳繼大 An Introduction.
Parameter (p) Variables contain the score parameter values for each notecontain the score parameter values for each note allow score to control orchestraallow.
Effective Bits. An ideal model of a digital waveform recorder OffsetGain Sampling Timebase oscillator Fs ADC Waveform Memory Address counter Compute Engine.
Music Processing Roger B. Dannenberg. Overview  Music Representation  MIDI and Synthesizers  Synthesis Techniques  Music Understanding.
Harmonics and Overtones Waveforms / Wave Interaction Phase Concepts / Comb Filtering Beat Frequencies / Noise AUD202 Audio and Acoustics Theory.
Square wave Fourier Analysis + + = Adding sines with multiple frequencies we can reproduce ANY shape.
Human Psychoacoustics shows ‘tuning’ for frequencies of speech If a tree falls in the forest and no one is there to hear it, will it make a sound?
1 Live Sound Reinforcement Audio measurements. 2 Live Sound Reinforcement One of the most common terms you will come across when handling any type of.
 Distortion – the alteration of the original shape of a waveform.  Function of distortion analyzer: measuring the extent of distortion (the o/p differs.
Harmonics, Timbre & The Frequency Domain
A Brief Exploration of Electronic Music and its Theory By: Zac Changnon.
EE 319K Introduction to Microcontrollers
COSC 1P02 Introduction to Computer Science 4.1 Cosc 1P02 Week 4 Lecture slides “Programs are meant to be read by humans and only incidentally for computers.
Csound. a language for describing sound. General History. Developed by Barry Vercoe at MIT. Extended by too many people to mention. Based initially on.
David Meredith Aalborg University
Loudness level (phon) An equal-loudness contour is a measure of sound pressure (dB SPL), over the frequency spectrum, for which a listener perceives a.
Digital Audio II. Volume Scaling The volume of a digitized audio source may be increased or decreased by multiplying each sample value by an appropriate.
Chapter2 : SIGNALS 1st semester King Saud University
A Brief Introduction to Musical Acoustics
COSC 1P02 Introduction to Computer Science 5.1 Cosc 1P02 Week 5 Lecture slides Psychiatrist to patient "You have nothing to worry about - anyone who can.
Design of a Guitar Tab Player in MATLAB Summary Lecture Module 1: Modeling a Guitar Signal.
Physics Mrs. Dimler SOUND.  Every sound wave begins with a vibrating object, such as the vibrating prong of a tuning fork. Tuning fork and air molecules.
Measurement and Instrumentation
Introduction Concepts and Definitions 1 st semester King Saud University College of Applied studies and Community Service 1301CT By: Nour Alhariqi.
3.3 Fundamentals of data representation
Loudness level (phon) An equal-loudness contour is a measure of sound pressure (dB SPL), over the frequency spectrum, for which a listener perceives a.
Loudness level (phon) An equal-loudness contour is a measure of sound pressure (dB SPL), over the frequency spectrum, for which a listener perceives a.
CS 591 S1 – Computational Audio – Spring 2017
CS 591 S1 – Computational Audio
Integrated Science Unit 4, Chapter 11.
COMPUTER NETWORKS and INTERNETS
Analog to digital conversion
Pitch What is pitch? Pitch (as well as loudness) is a subjective characteristic of sound Some listeners even assign pitch differently depending upon whether.
Loudness level (phon) An equal-loudness contour is a measure of sound pressure (dB SPL), over the frequency spectrum, for which a listener perceives a.
Harmonics Ben Kemink.
Harmonic Distortion Analyzer, Wave Analyzer and Function Generator
MECH 373 Instrumentation and Measurements
CS 591 S1 – Computational Audio -- Spring, 2017
Pitch.
Characteristics of Notes – Learning Outcomes
Frequency Modulation 2.
Rhythm.
Speech Pathologist #10.
Introduction to Csound 5.
Wavetable Synthesis.
Frequency Modulation.
Capstone Design Team 1 Kahnec De La Torre – Lead Report Manager
Uses of filters To remove unwanted components in a signal
Sampling.
Physics 2 Class 16 Wave superposition, interference, and reflection
Musical Notes and Sine Waves
Harmonic Motion Motion in Cycles.
Introduction to Csound 4.
The frequency (Hertz) of a sound
Geol 491: Spectral Analysis
Presentation transcript:

Introduction to Csound 2

The Csound Score a group of function tables and list of note statements combining score with orchestra creates a soundfile Csound sorts notes by start time so they can appear in the list in any order naming convention: .sco file contains Csound score

A Simple Score ; sinewave.sco - use with sinewave.orc ; waveform for oscillator - a sine wave f1 0 16385 10 1 ;p1 p2 p3 p4 p5 p6 p7 ; st dur amp freq attck decay i1 1 2 4000 440 .1 1.4 end

The Note Statement ;p1 p2 p3 p4 p5 p6 p7 ; st dur amp freq attck decay i1 1 2 4000 440 .1 1.4 end scores specify parameter values for each note such as amplitudes frequencies attack decay times

The Note Statement “i” indicates note statement ;p1 p2 p3 p4 p5 p6 p7 ; st dur amp freq attck decay i1 1 2 4000 440 .1 1.4 “i” indicates note statement p1 always contains the instrument number instrument number 1 should play the note p2 always contains the note start time in beats per minute p3 always contains the note duration

The Note Statement in this example p4 contains the maximum amplitude ;p1 p2 p3 p4 p5 p6 p7 ; st dur amp freq attck decay i1 1 2 4000 440 .1 1.4 in this example p4 contains the maximum amplitude p5 contains the frequency of the note in Hertz p6 contains the attack duration in seconds p7 contains the decay duration in seconds

The Note Statement end indicates the end of the note list ;p1 p2 p3 p4 p5 p6 p7 ; st dur amp freq attck decay i1 1 2 4000 440 .1 1.4 end end indicates the end of the note list Csound ignores any events following it “e” is shortcut for “end”

Amplitude (p4) spectrum of additive synthesis group (10 harmonics)

[i:46] Additive Synthesis Score ; p2 p3 p4 p5 p6 p7 ; st dur amp harm attk dec i1 1 5 2400 1 .25 .05 i1 . 4.5 900 2 .28 .048 i1 . 4 600 3 .03 .047 i1 . 3.5 1000 4 .031 .044 i1 . 3.25 180 5 .032 .043 i1 . 3.1 400 6 .033 .039 i1 . 2.85 250 7 .034 .035 i1 . 2.55 90 8 .035 .031 i1 . 2.17 90 9 .036 .028 i1 . 2.1 55 10 .037 .025

The Csound Score the dots in p2 are a shortcut that allows Csound to re-use the previous value in those p-fields in this score, all the notes begin at the same time (st=1) blend together to create a single sound have varying durations so the sound changes

Amplitude (p4) this score sets the amplitude of the first partial to 2400 total amplitude of all partials is 5965

Amplitude (p4) Since Csound uses 16-bit integer samples, the largest amplitude possible without distortion is 32,767 two simultaneous notes, each with an amplitude of 4,000 can produce a combined amplitude of 8,000 if their peak amplitudes are together scores — such as this one — with several simultaneous notes may require scaling down their amplitudes

Avoiding Overflow Run Csound. The maximum amplitude of the output is: end of score. overall amps: 35003.6 overall samples out of range: 0 To avoid overflow, in the orchestra scale the output: out asig * .9 32767/35003.6 = .936 Run Csound again check that the maximum amplitude is less than 32767: end of score. overall amps: 31503.2

Amplitude (p4) A significant noticeable increase in loudness level (e.g., from mf to f) roughly corresponds to increase by an amplitude factor of 1.5 example, a note with amplitude of 6,000 will be about one dynamic level louder than a note with amplitude of 4,000