Skip to content Skip to navigation Skip to collection information

Connexions

You are here: Home » Content » Musical Signal Processing with LabVIEW (All Modules) » [ LabVIEW application ] MIDI_JamSession

Navigation

Table of Contents

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Endorsed by Endorsed (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
  • IEEE-SPS display tagshide tags

    This collection is included inLens: IEEE Signal Processing Society Lens
    By: IEEE Signal Processing Society

    Comments:

    "A multimedia educational resource for signal processing students and faculty."

    Click the "IEEE-SPS" link to see all content they endorse.

    Click the tag icon tag icon to display tags associated with this content.

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • NSF Partnership display tagshide tags

    This collection is included inLens: NSF Partnership in Signal Processing
    By: Sidney Burrus

    Click the "NSF Partnership" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • National Instruments display tagshide tags

    This collection is included in aLens by: National Instruments

    Comments:

    "Developed by Rose Hulman Prof Ed Doering, this collection is a multimedia educational resource for students and faculty that augments traditional DSP courses and courses that cover music […]"

    Click the "National Instruments" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Evowl

    This collection is included inLens: Rice LMS's Lens
    By: Rice LMS

    Comments:

    "Language: en Supporting Agencies: Rose-Hulman Institute of Technology"

    Click the "Evowl" link to see all content selected in this lens.

  • Lens for Engineering

    This module and collection are included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

  • NI Signal Processing display tagshide tags

    This collection is included inLens: Digital Signal Processing with NI LabVIEW and the National Instruments Platform
    By: Sam Shearman

    Comments:

    "This online course covers signal processing concepts using music and audio to keep the subject relevant and interesting. Written by Prof. Ed Doering from the Rose-Hulman Institute of Technology, […]"

    Click the "NI Signal Processing" link to see all content selected in this lens.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

[ LabVIEW application ] MIDI_JamSession

Module by: Ed Doering. E-mail the authorEdited By: Erik Luther, Sam Shearman

Summary: MIDI_JamSession is a LabVIEW application VI that reads a standard MIDI file (.mid format) and renders it to audio using subVIs called "virtual musical instruments" (VMIs) that you design.

Introduction

MIDI_JamSession is a LabVIEW application VI that reads a standard MIDI file (.mid format) and renders it to a audio using "instrument" subVIs of your own design. Following are the key features of MIDI_JamSession:

  • Reads standard MIDI files (.mid)
  • Renders note events to stereo audio using user-defined subVIs called "virtual musical instruments" (VMIs) or built-in preview instruments
  • Displays relevant MIDI file information to help determine how to assign instruments to MIDI channels
  • Includes basic "mixing board" with controls for instrument type, mute, and stereo pan
  • Creates files for rendered audio (.wav format) and note events (.csv spreadsheet format)

A MIDI file contains note and timing information (see MIDI Messages and Standard MIDI Files for full details). Notes are associated with channels (up to 16 channels possible). A single channel is almost always associated with a single instrument sound. MIDI_JamSession.vi uses all of this information to repeatedly call your virtual musical instrument (VMI) which creates a single note (an audio fragment) according to the requested duration, frequency, and amplitude; the audio fragment is then superimposed on the output audio stream at the correct time.

The following screencast video demonstrates how to use MIDI_JamSession to render MIDI files using the default preview instruments, and how to get started creating subVIs to render audio according to your own algorithms.

Figure 1: [video] Demonstration of the MIDI_JamSession application
Figure 1 (midi_APP-MIDI_JamSession-demo.html)

Source Distribution

MIDI_JamSession.vi is available in this .zip archive: MIDI_JamSession_v0.92.zip. Right-click and choose "Save As" to download the .zip file, unpack the archive into its own folder, and double-click "MIDI_JamSession_run-me.vi" to start the application.

Instructions

  • Start "MIDI_JamSession.vi" and choose a source MIDI file (.mid format); several MIDI files are included in the .zip distribution archive (see 'readme_midi-files.txt' for details). Click the folder icon to the right of the text entry browse to browse for a file. Once you select a file, "MIDI_JamSession" immediately reads the file and updates the MIDI information display panels. If you enter a filename in the "note events output file" field, a spreadsheet (in comma-separated values format) will be created that contains all of the note events extracted from the MIDI file. The columns are: channel number (1 to 16), start time (in seconds), duration (in seconds), note number (0 to 127), and velocity (0 to 127). The .csv file will be updated each time you load a new MIDI file.
  • Leave all of the audio rendering controls at their default settings at first in order to use the built-in preview instruments, and to render only the first 10 percent of the song to audio. The relatively low sampling frequency and the simple algorithm for the preview instruments ensure quick rendering when you are exploring different MIDI files. Click "Render Audio" to listen to your MIDI file.
  • If you have not done so already, double-click on your MIDI file to hear it played by your default media player using the built-in synthesizer on your computer's soundcard. "MIDI_JamSession" may not work properly for some types of MIDI files, so please compare the rendered audio to your media player's rendition before you continue.
  • Look at the information text panels on the lower left, especially the track listing. Each channel number (inside square brackets) is typically associated with a unique instrument, and will often be labeled as such. The text entry boxes labeled "The Band" are where you assign your "virtual musical instrument" (VMI) to render notes for a given channel. Note that Channel 10 is reserved for percussion. The preview drum instrument renders all note events on Channel 10 the same way, regardless of note number or note velocity (it sounds a bit like a snare drum).
  • Experiment with the pan controls to position each instrument in the stereo sound field; click "random pan" to make a random assignment for each instrument. You can also mute selected channels in order to isolate certain instruments, or to create a solo. Click the "Lock to 1" button to cause all controls to track those of Channel 1; this is an easy way to mute or unmute all channels, for example. Adjust the two sliders on the "time range to render" control to pick the start and stop times to render. You can quickly preview sections in the middle or end of the song this way. Set the controls to 0 and 100 percent to render the entire song.
  • You will eventually find it more convenient to turn off the "Listen to audio" option and enter a filename in the "audio output file (.wav)" field. Each time you click "Render Audio" the .wav file will update, and you can use your own media player to listen to the .wav file. There is presently no way to interrupt the built-in audio player, and this can be a nuisance when you render long pieces. The yellow LED indicator at the upper right corner indicates when the built-in audio player is active.
  • Once you are ready to create your own instrument sounds, open "vmi_Prototype.vi" and carefully follow the instructions inside. Eventually you will create a number of different VMIs, with each having the ability to generate an audio fragment that renders a single note.
  • De-select the "Preview only" button, and select the VMI you wish to use for each channel in the vertical array of folders called "The Band." Blank entries will render as silence. Remember to adjust your sampling frequency as needed, bearing in mind that CD-quality (44.1 kHz) will increase the rendering time and increase the size of the .wav file.
  • Render your new audio file.
  • Enjoy listening!

Important:

Once you have invested a lot of effort to adjust the front panel settings, exit the application (click "Exit" just under the "MIDI Jam Session" logo), select "Edit | Make Current Values Default," and press Ctrl+S to save "MIDI_JamSession.vi" with your own settings.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks