David Meredith dave@create.aau.dk Minim David Meredith dave@create.aau.dk.

Slides:



Advertisements
Similar presentations
Processing and Java David Meredith
Advertisements

Using Audacity Audacity is an audio-editing application available from and can be used with most PC operating systems.
Libraries David Meredith Aalborg University.
Tamara Berg Advanced Multimedia
An open source tool for creating and editing digital audio files By Tim VanSlyke.
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
Royalty Free Music for Schools Do You Have the To Do a Podcast?
1 Multimedia on the Web: Issues of Bandwidth Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each second.
Free open source audio recording and editing software 1Using Audacity.
Audacity: a step-by-step tutorial Presented by: Terry W. Hoffland.
By: Russ Butler ECE4220 Spring 2012 Dr. DeSouza May 2, 2012.
AN INTRODUCTION TO MAX/MSP Medialogy, Aalborg University Copenhagen. Niels Böttcher,
Name Matrix No CHIA EE LOON(LEADER) OW CHEE YEE LAURA TIONG UNG KAH CAT200 Integrated Software Development Workshop Storyboard.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
CMPS1371 Introduction to Computing for Engineers PROCESSING SOUNDS.
Technology ICT Option: Audio.
What makes a musical sound? Pitch n Hz * 2 = n + an octave n Hz * ( …) = n + a semitone The 12-note equal-tempered chromatic scale is customary,
Chapter 7 Principles of Analog Synthesis and Voltage Control Contents Understanding Musical Sound Electronic Sound Generation Voltage Control Fundamentals.
Image and Sound Editing Raed S. Rasheed Digital Sound Digital sound types – Monophonic sound – Stereophonic sound – Quadraphonic sound – Surround.
Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 2 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny.
Spring 2002EECS150 - Lec13-proj Page 1 EECS150 - Digital Design Lecture 13 - Final Project Description March 7, 2002 John Wawrzynek.
1 Manipulating Digital Audio. 2 Digital Manipulation  Extremely powerful manipulation techniques  Cut and paste  Filtering  Frequency domain manipulation.
Harmonics and Overtones Waveforms / Wave Interaction Phase Concepts / Comb Filtering Beat Frequencies / Noise AUD202 Audio and Acoustics Theory.
EE2F2 - Music Technology 8. Subtractive Synthesis.
Audio Tools for ESL ORTESOL 2006 Tim VanSlyke ESL Instructor Chemeketa Community College.
Using Sound in Games Alex Baumann Outline 3D Spatialization Getting and Editing Sounds Using Sounds in Games Music in Games Example Videos.
XP 1 Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets Tutorial 8.
Chapter 14 Recording and Editing Sound. Getting Started FAQs: − How does audio capability enhance my PC? − How does your PC record, store, and play digital.
CS371m - Mobile Computing Audio.
2 Outline Digital music The power of FPGA The “DigitalSynth” project –Hardware –Software Conclusion Demo.
Using Audacity Created by: Stephanie Anderson Dublin Unified School District Dublin, California.
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 7 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
Digital recording software Presented by Andrew Littlefield.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Preprocessing Ch2, v.5a1 Chapter 2 : Preprocessing of audio signals in time and frequency domain  Time framing  Frequency model  Fourier transform 
Ray Bradley Karla N. Juárez David Wood Advisor: Dr. Stephen Murrell May 2 nd, 2005.
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
XP Tutorial 8New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and.
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
Speech analysis with Praat Paul Trilsbeek DoBeS training course June 2007.
Computer Programming For Musical Applications II Tutorial 05 SuperCollider Sound Fundamentals 07 November, 2008.
ITEC Final Presentation For Fall 2011 Table of Content –Basic Requirements  Audacity  Inskcape  GIMP  Blender  Animation of 2D and 3D.
Subtractive Sound Synthesis. Subtractive Synthesis Involves subtracting frequency components from a complex tone to produce a desired sound Why is it.
Soundscapes James Martin. Overview Problem Statement Proposed Solution Solution Created (Modules, Model, Pics) Testing Looking Back See It in Action Q&A.
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 5 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 14: Envelopes Ken Greenebaum.
Nick Kwolek David Duemeler Martin PendergastStephen Edwards.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Sound and the Web. Transferring sound Download Progressive Download Stream.
Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny.
Interactive Multimedia Sound Mikael Fernström. Data sources Microphones and transducers –Sample acoustic reality Synthesis –Simulate reality (and beyond.
CS378 - Mobile Computing Audio.
Sound. Sound Capture We capture, or record, sound by a process called sampling: “measuring” the sound some number of times per second. Sampling rate is.
Introduction to sound using processing. 2 Minim –A sound library which uses javasound library –Provide convenient but flexible way to play,, synthesize.
Time Compression/Expansion Independent of Pitch. Listening Dies Irae from Requiem, by Michel Chion (1973)
How to Create a Podcast. Podcasting “is the distribution of audio or video files, such as radio programs or music videos, over the Internet using either.
Harvestworks Part 1: ChucK basics Rebecca Fiebrink Princeton University 1.
Editing Digital AudioLab#7 Audacity is a free, easy-to-use and an open source platform audio editor and recorder for Windows, Mac OS, Linux and other operating.
AUDACITY : BASIC INFORMATIONS Audacity is an Open Source software invented by Dominic Mazzoni (He worked as a software engineer at the NASA and Google.)
FREE OPEN SOURCE AUDIO RECORDING AND EDITING SOFTWARE USING AUDACITY.
Bryant Tober. Problem Description  View the sound wave produced from a wav file  Apply different modulations to the wave file  Hear the effect of the.
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
Android Application Audio 1.
Using Multimedia on the Web
CS 591 S1 – Computational Audio
Audacity and podcasting
Technology ICT Option: Audio.
Developing a Versatile Audio Synthesizer TJHSST Computer Systems Lab
Technology ICT Option: Audio.
Presentation transcript:

David Meredith dave@create.aau.dk Minim David Meredith dave@create.aau.dk

Minim Minim is an easy-to-use Processing library for integrating audio into your sketches The most recent version (2.1.0 Beta) includes a music programming framework based on “unit generators” (UGen) A UGen is an audio processing object that does a “single” thing UGens can be patched together to produce “synthesis chains” that perform complex transformations on the sound

Installing Minim Download the Minim 2.1.0 BETA library zip file from http://code.compartmental.net/tools/minim/ Unzip the library into the libraries folder inside your Processing sketchbook folder See the Libraries lecture to remind yourself how to find out where your sketchbook folder is You then need to remove the version of Minim that is included with Processing On OS X: Find Processing.app, right click, choose “Show Package Contents”, go to Contents/Resources/Java/modes/java/libraries and delete the minim folder in there On Windows: Find the directory that contains Processing.exe, and go to modes/java/libraries and delete the minim folder there Restart Processing You should see the Minim library under the “Sketch>Import library...” menu

Declare Minim and AudioPlayer object Import Minim library Declare Minim and AudioPlayer object Construct Minim object Loop mp3 file Load mp3 file into AudioPlayer object (file must be in data library) Map buffer size to window width Map sample value to graph height Override stop() method Close AudioPlayer Stop minim object Call the superclass’s stop method

PlayInternetRadio If you know the URL for an internet radio station, then you can just load this like a local audio file and listen to it

Use level method to give RMS value of instantaneous amplitude Remember to close the AudioPlayer object and the Minim object before calling the superclass’s (PApplet’s) stop() method

Appends to buffer 44.1kHz, 16-bit Writes buffer to disk Buffer length Remember to close player, stop minim object and call the PApplet’s stop() method Defines file format Buffered recorder

SquareWaveSignal Shows how to send a square wave signal to an AudioOutput get the AudioOutput from a Minim object using Minim.getLineOut(); Set the portamento which controls how long it takes the signal to change smoothly in frequency Use addSignal() to add the signal to the AudioOutput

Polyphony Shows how to take two signals (a triangle wave and a sine wave) and send both to the same AudioOutput Uses ControlP5 library to add some knobs that allow you to change frequency, amplitude and pan of the two signals See Polyphony sketch

UserDefinedSignal Shows how you can make your own signal (in this case MouseSaw) by implementing the AudioSignal interface Need to override (i.e., write your own version of) two methods: generate(float[] samp) which is for a mono signal generate(float[] left, float[] right), which is for a stereo signal Which version of generate is actually called depends on whether the signal is added to a stereo or mono AudioOutput

Scrubbing Plays a file and provides three buttons: play/pause, fast-forward, rewind Shows use of inheritance and abstract classes Play, Rewind and Forward are subclasses of the abstract class, Button Means they have to implement the abstract methods in Button

DrumMachine Uses ControlP5 gui library to draw lots of boolean toggle switches corresponding to beats Uses millis() to determine if it is time to move to the next beat Uses loadSample() to load a sample wav file for each drum sound and then the trigger() method to trigger each sample when it is required Implements controlEvent callback which is run whenever a ControlP5 action has been made Uses id of controller to identify which controller has been clicked

ForwardFFT Can use FFT object to carry out a fast Fourier transform on a sound Must specify size of FFT time-domain buffer and sample rate when construct it Make these the same as the AudioPlayer’s buffer size and sample rate Run forward() method to run FFT Use specSize() method to iterate through FFT to draw lines for frequency bands

Music Programming with Minim Use UGens (Unit Generators) An object that does only one thing e.g., generate a tone, filter audio, create an amplitude envelope.... Chain UGens together into a synthesis chain This is called patching e.g. oscillator -> output oscillator -> filter -> delay -> output In Minim: oscil.patch(filter).patch(delay).patch(output);

Synthesis algorithms Synthesis algorithm can be made of one or more synthesis chains connected together Consider a summer UGen adds together everything that is patched to it e.g. noise -> filter1 -> summer oscil -> filter2 -> summer summer -> delay -> output in Minim: noise.patch(filter1).patch(summer); oscil.patch(filter2).patch(summer); summer.patch(delay).patch(output);

UGens have inputs Oscil UGen has amplitude, frequency and phase input (parameters) e.g. lfo -> oscillator.amplitude oscillator -> output Here lfo (low frequency oscillator) provides values for oscillator’s amplitude In Minim: lfo.patch(oscillator.amplitude); oscillator.patch(output);

Instruments and notes Synthesis algorithm must be encapsulated inside an instrument if you want to be able to play notes rather than just have sound lasting as long as the program runs A note (in Minim) is a sound that has a beginning and an end When create an Instrument, must specify what happens when instrument’s noteOn() and noteOff() methods are called e.g., noteOn() might start attack segment of an amplitude envelope; noteOff() might just end an amplitude envelope

Playing notes To play a note, use the AudioOutput’s playNote() method Minim defines a default instrument, so you could just use the following code to play a few notes out.playNote(1.0, 2.9, “C3”); out.playNote(2.0, 1.9, “E3”); out.playNote(3.0, 0.9, “G3”); First argument is onset time, second is duration, third is pitch

Simple synthesis example

Playing some notes

filterExample Shows how to use UGens to create an oscillator, send its signal through a filter with an oscillating cutoff frequency and then to the output Uses the Constant UGen to output a constant value which is added by a Summer UGen to a sine wave The output of the summer is sent to the cutoff parameter of the filter A sawtooth oscillator is patched to the filter which is then patched to the AudioOutput