Pitch tracking in Max

Two methods, In the time domain.

Counting zero crossings, in the time domain, to measure the period and frequency of a sine wave, using zerox~ and edge~

A patch by Mari Kimura that compares the Max fzero~ object with the IRCAM gbr.yin~ object – measuring frequency in the time domain. gbr.yin~ uses autocorrelation.

Note: gbr.yin~ is part of the FTM package. Download and install from here: http://ftm.ircam.fr/index.php/Download

download

https://github.com/tkzic/max-projects

folder: pitch-tracking

patches:

  • zerox-test.maxpat
  • MKtest-pitchtrack.maxpat

 

ep-413 DSP – week 4

Notes:

Audio Signal Processing Course: https://www.coursera.org/course/audio

By Xavier Serra and Julius O. Smith

This is a free course offered by Stanford. It starts at the beginning of October. I will be taking the course and would be happy to help you if you are interested in taking it too.

Pd weekend 2014: Katja Vetter Microphone design: http://libguides.lib.siu.edu/puredata

Part I – Pitch detection

How would you construct an ‘Autotune’ effect that works in real time?  The first requirement is accurate pitch detection:

Frequency domain:

FFT and STFT: Find frequencies where the signal has greatest energy. Tradeoff between frequency and temporal resolution. Moderate latency.

Max examples: https://reactivemusic.net/?p=11202

Also look at the builtin Max tutorials on the fft~ and pfft~ objects

3rd party Max/Pd objects:

DSP code

Time domain:

Zero crossing: Measure the period of waves by counting rate of zero crossings. Doesn’t work with complex waveforms.

Max objects: fzero~ and zerox~

Autocorrelation: Compare a signal with a time shifted copy of itself.  Low latency but CPU intensive. Can be improved by using lower sample rates and other tweaks. (Helmholtz)

Example patches: https://reactivemusic.net/?p=17169

(note: gbr.yin~ is a 3rd party object from IRCAM, but is built into Max)

Pd examples from Katja Vetter: (helmholtz~ external)

We also looked at Katja’s new app: InstantDecomposer. If you would like to try this patch, please contact me. I will need to get permission from Katja.

Wavelet transform:
Other methods:
  • phase locked loop
  • human pitch matching (what is the latency?)
  • Neural networks?
  • Statistical methods (pattern matching)?

Part II – Prototyping

Muse development case study: https://reactivemusic.net/?p=16187

Assignment

Next week we will listen to your music from the future.

ep-413 DSP – week 3

Composition tools

Make music using X

“Lyrebirds and Acoustic Guitar” by Chris Lopez

Tools used by students in this class:
  • Reverse engineering the style of a reference song. Use a Midi keyboard + Logic
  • Maschine + microphone
  • Modular synth + Midi
  • Listening to melodies in your head + Ableton Live
  • Building a chord progression, playing piano, guitar, Ableton Live racks
  • Composing with drums in Ableton Live. Building a form or structure. Using the ideas in your head.
  • Ableton Live.  And playing the guitar.
  • Finale music notation software.
Dramatic shape:

Every performance has a dramatic shape. That is, excitement level measured over time.

What is the shape of this piece:

References:
Notes:

Like stories, songs have beginnings, endings, and journeys that connect.  Many forms can be applied, but the goal is always the same – to have maximum impact on the listener – to communicate honestly with strength and conviction.

As you listen to music, be aware of the form – especially in terms of the dramatic shape.  Where is the peak of intensity?  Does the music grab your attention immediately, or does it build slowly?    How much repetition do you hear?  Can you find suspense, surprise, humor, sadness, power, or beauty?  What musical elements work together to create these feelings?

The most powerful tools you have as a composer are your ears.

ep-413 DSP – week 2

Ways to approach a project:

Make machines that make art

Twitter streaming example:

 

 

https://reactivemusic.net/?p=5786

Infinite Jukebox by Paul Lamere at The Echo Nest

http://labs.echonest.com/Uploader/index.html

Reverse engineering

Designing Sound

By Andy Farnell http://aspress.co.uk/sd/index.php

automax https://github.com/tkzic/automax

Use the wrong tools

Ok-Go https://reactivemusic.net/?p=7971

Luke Dubois: http://lukedubois.com

Abstraction and destruction

Picasso: http://www.slideshare.net/sotos1/pablo-picasso-bulls-111

pablo-picasso-bulls-111-11-638

David Tinapple: https://reactivemusic.net/?p=7537

Do something backwards, extreme or opposite

Connect two things

Orange Plantation Lego

From an Interview of Mike Will At Bloomberg Business Week by Devin Leonard

http://www.businessweek.com/articles/2014-08-07/mike-will-made-it-hip-hops-hottest-producer-is-crossover-king#p1

“(Mike) WiLL didn’t know Cyrus, but (Peter) Edge did. She was signed to RCA. WiLL talked her into recording We Can’t Stop, coaching her through it. “I was like, ‘Yo, use that country twang,’ ” WiLL recalls. “ ‘I hear it, but you are trying to hide it.’ So she started using her country twang. That made it all-the-way dope.”

 Processing sound with pictures in Max/MSP by Tadej Droljc:

https://reactivemusic.net/?p=16887

(basic_patch.maxpat)

I’m thinking of something: http://imthinkingofsomething.com

auctioneer: https://reactivemusic.net/?p=7140

politician: http://digg.com/video/guitarist-plays-along-to-sobbing-japanese-politician

 Ask questions

Google: http://google.com

Assignment:

Go to the future. Make music. Bring it back to the present.

It should be a very short piece or an excerpt. Less than two minutes. It can be a remix of a song that you believe represents a future direction in music. Near future or distant future – your choice. Use any tools to create the music.

The result: audio or a live performance in class

Due: in class on Sept. 29

 

ep-413 DSP – Syllabus

Digital Signal Processing, theory and composition

Fall 2014

teacher: Tom Zicarelli – http://tomzicarelli.com

You can reach me at:  [email protected]

Office hours: Monday 1:30-2:30 PM, at the EPD office #401 at 161 Mass Ave. Please email or call ahead.

Assignments and class notes will be posted to this blog: https://reactivemusic.net before or after the class. Search for: ep-413 to find the notes

Examples, software, links, and references demonstrated in class are available for you to use. If there is something missing from the notes,  please ask about it. This is your textbook.

Syllabus:

The focus will be on composition and imagination. Or composition plus science fiction. After you take the course, you will have composed several new pieces. You might design a musical instrument. You will have opportunities to solve problems.  You will become familiar with how artists use signal processing to compose and to make things. You will be exposed to to a world of possibilities – which you may embrace or reject.

We will compose, by improvising, using tools that transform signals and data.  We will explore a range of methods and have opportunities to use them in projects. We’ll look at examples by artists – asking the question: How does this work?

Signal processing involve one or more of the following actions:

  • analysis
  • measurement
  • transformation

For example, recording is a form of measurement.

Topics: (subject to change)

  1. Future music tools
  2. Artificial intelligence
  3. Signals: granular synthesis and convolution
  4. Voices
  5. Problem solving, prototyping, portfolios
  6. How to get ideas
  7. Computers and Live performance
  8. Demodulation and reversibility
  9. Using the wrong tools
  10. Music from data – sensors, sonification, Internet API’s
  11. Statistics
  12. Transcoding
  13. Radio waves and ultrasound
  14. Visualization

Grading and projects:

Grades will be based on compositions, several small assignments, and class participation. Please see Dr. B’s EP-413 syllabus for details. I encourage and will give credit for: collaboration with other students, outside projects, performances, independent projects, and anything else that will encourage your growth and success.

I am open to alternative projects. For example, if you want to use this course as an opportunity to develop a larger project or continue a work in progress.