PitchVel3D - Pitch Velocity 3D Graph - by David Li
logo Pitch Velocity Pressure Graph by David Li
Program: Matlab

Description: This function plots the pitch, time, velocity. It read in a Midi file using nmat format from the MIDI Toolbox. Arrays are created from the velocity, pitch, and onsets/offsets from the midi structure and plotted on a 3-dimensional graph. The highest velocities are shown in the peaks of the graph, lower velocities are shown as smaller lumps. The colors in the graph can be changed using the COLORMAP command. This is controlled by 64 RGB components. The default setting for the colormap used, shows the brightest region at the 40 percent level to more easily observe salient peaks.

Usage format:
pitchvel3d(nmat)

Usage example:
nmat=readmidi('laksin.mid');
pitchvel3d(nmat)

Colormap example:
map=[1/64:1/64:1;.5:0.5/64:.5/64;.5:-.5/64:.5/64]';
colormap(map)

Files:

  • pitchvel3d.m
  • leastnonzero.m
    *Note: Midi Toolbox required

    Contact Information:
    Author: David Li
    Email: gemste@yahoo.com
    Discipline: M.S. Industrial & Systems Engineering

    Credits:
    Miditool Box Team
    Edward Stein - for the initial research and idea
    Elaine Chew - Professor of ISE575, Engineering Approaches to Music Perception and Cognition, Spring 2005

  • This is the output image for a sample midi provided by the MIDI Toolbox. Laksin.mid


    This is the same output image as above from a bird's eye view.


    This image is from the function pianoroll in Midi Toolbox. This was used for comparison.


    This image an superimposed image of the above images for closer inspection.


    This image took 40 minutes to compile from a 1 minute 27 second MIDI file. I highly recommend using a smaller MIDI file. test.mid generated in Hyperscore.








    The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees