<< Chapter < Page Chapter >> Page >
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.


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.

[video] Demonstration of the MIDI_JamSession application

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.


  • 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 thefolder 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 andupdates the MIDI information display panels. If you enter a filename in the "note events output file" field, a spreadsheet (in comma-separated valuesformat) 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 (inseconds), 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 thefirst 10 percent of the song to audio. The relatively low sampling frequency and the simple algorithm for the preview instruments ensure quick renderingwhen 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 yourcomputer's soundcard. "MIDI_JamSession" may not work properly for some types of MIDI files, so please compare the rendered audio to your mediaplayer'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 typicallyassociated 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 isreserved for percussion. The preview drum instrument renders all note events on Channel 10 the same way, regardless of note number or notevelocity (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 eachinstrument. 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 sliderson 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 thesong 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. Eachtime 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 noway 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 singlenote.
  • 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." Blankentries will render as silence. Remember to adjust your sampling frequency as needed, bearing in mind that CD-quality (44.1 kHz) will increase therendering time and increase the size of the .wav file.
  • Render your new audio file.
  • Enjoy listening!
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.

Questions & Answers

Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Do you know which machine is used to that process?
how to fabricate graphene ink ?
for screen printed electrodes ?
What is lattice structure?
s. Reply
of graphene you mean?
or in general
in general
Graphene has a hexagonal structure
On having this app for quite a bit time, Haven't realised there's a chat room in it.
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
many many of nanotubes
what is the k.e before it land
what is the function of carbon nanotubes?
I'm interested in nanotube
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Musical signal processing with labview -- midi for synthesis and algorithm control. OpenStax CNX. Nov 09, 2007 Download for free at http://cnx.org/content/col10487/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Musical signal processing with labview -- midi for synthesis and algorithm control' conversation and receive update notifications?