Convert Audio to MIDI
eharetea

Running audio through a Pitch CHOP will return the frequency and the volume. You can use this data to then generate MIDI or other computer generated sounds and music.

Using the Pitch CHOP to get audio frequency.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 12:32 PM

This graph shows the audio waveform.


Convert Audio to MIDI - test.3daet.com



This graph shows frequency of the pitch returned from the Pitch CHOP.


Convert Audio to MIDI - test.3daet.com



This graph shows note numbers using Logarithm functions to get the value in an Expression CHOP.


Convert Audio to MIDI - test.3daet.com



27.500 Hz = 1st note of an 88 key piano, A0 (A0 meaning base octave of the A note)


Any frequency can be approximated by:

27.500(1.05946)(distance from A0)
27.500(1.05946)(88-1) = 4184.96
4186.01 = C8 the 88th key of a piano 4186.01 ~ 4184.96



So, with this approximation, if we have the frequency, how can we determine the note number?

Base frequency (A0) = 27.5
Distance from first key = d
Frequency = F

the frequency formula

F = 27.500(1.05946)d

divide by 27.500

F/27.500 = 1.05946d

use logarithm

log1.05946(F/27.500) = d

convert to log base 10

d = log(F/27.500) / log(1.05946)



Here are triggers of each frequency after running the value of the note numbers through a Fan CHOP.
The Fan CHOP will generate a binary trigger on a channel number corresponding to the value of whatever comes in. We had taken the pitch channel, rounded to integers, and fit it to a smaller range before the Fan CHOP.


Convert Audio to MIDI - test.3daet.com



This is the volume channel returned from the Pitch CHOP.


Convert Audio to MIDI - test.3daet.com



Here is the volume multiplied by the output from the Fan CHOP.


Convert Audio to MIDI - test.3daet.com



NOTE: Play the argeg.wav backwards...its sounds really cool.


arpeg.wav


Downloads:
Download: arpeg.wav 513 KB
Download: convert_sound_midi.hip 55 KB
Download: convert_sound_midi2.hip 54 KB
Download: index.nodetext 2 KB

Please login or Click Here to register for downloads
Creative Commons License
Convert Audio to MIDI by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com