<< Chapter < Page Chapter >> Page >
An individual who can whistle with vibrato can be well-modeled by a sinusoidal oscillator, an attack-sustain-release envelope with a moderate attack and release time, and a low-frequency sinusoidal frequency modulation. In this mini-project you will develop code to model the whistler as a LabVIEW "virtual musical instrument" (VMI) to be "played" by a MIDI file.
This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you:
•Apply LabVIEW to Audio Signal Processing
•Get started with LabVIEW
•Obtain a fully-functional evaluation edition of LabVIEW


An individual who can whistle with vibrato can be well-modeled by a sinusoidal oscillator, an attack-sustain-release envelope with a moderate attack and release time, and a low-frequency sinusoidal frequency modulation. In this mini-project you will develop code to model the whistler as a LabVIEW virtual musical instrument ( VMI ) to be "played" by a MIDI file.

Prerequisite modules

If you have not done so already, please study the pre-requisite module Vibrato Effect . If you are relatively new to LabVIEW, consider taking the course LabVIEW Techniques for Audio Signal Processing which provides the foundation you need to complete this mini-project activity, including working with arrays, creating subVIs,playing an array to the soundcard, and saving an array as a .wav sound file.


  • All LabVIEW code that you develop (block diagrams and front panels)
  • All generated sounds in .wav format
  • Any plots or diagrams requested
  • Summary write-up of your results

Part 1: tone generator with vibrato

In this part you will create a basic tone generator with vibrato. The tone generator will be a sinusoid of the form y ( t ) = sin ( ϕ ( t ) ) , where the phase function ϕ ( t ) has the following form ( ):

ϕ ( t ) = 2 π f 0 t + Δ f sin ( 2 π f R t )

where f 0 is the tone frequency, Δ f is the frequency deviation (vibrato depth), and f R is the vibrato rate in Hz. Use the "Play Waveform" Express VI to listen to your end result y ( t ) , and experiment with the parameters to find suitable values for rate and depth to simulate the sound of a whistler. Refer to the screencast video in the module Frequency Modulation (FM) Techniques in LabVIEW for coding tips for this part.

Part 2: attack-sustain-release envelope generator

Create LabVIEW code to generate a time-varying intensity envelope for the overall attack, sustain, and decay of the note. Your code will require attack time and decay time (both in seconds), as well as the total number of required samples, and will produce an envelope composed of three straight-line segments as plotted in .

Attack-Sustain-Release envelope

The maximum intensity is fixed at 0 dB, and the minimum intensity is -40 dB. The attack and release times are fixed parameters that you adjust, and the sustain time is "stretchable" depending on the total number of required samples. If you have the inclination, make your envelope generator more robust so that it can handle the situation where the requested number of samples is less than the number of samples required for your attack and release intervals.

Part 3: attenuator

Create LabVIEW code that accepts an "amplitude" parameter in the range 0 to 1 and converts this parameter to attenuation in the range -40 dB to 0 dB. The amplitude parameter will ultimately be supplied by MIDI_JamSession and represents the MIDI "note-on" velocity. Your code will map linear velocity onto a logarithmic intensity.

Part 4: overall amplitude envelope

Combine the code fragments you developed in Parts 2 and 3 to create an overall intensity envelope. Remember that when you use intensity values in decibels, you simply add them together. Next, "undo" the equation for decibels to convert the intensity envelope into an amplitude envelope (hint: you need a value of "20" someplace). Choose a representative set of parameter values and plot your overall intensity envelope and your overall amplitude envelope.

Part 5: whistler vmi

Design a virtual musical instrument ( VMI for short) that sounds like someone whistling with vibrato. Your VMI will be played by "MIDI Jam Session." If necessary, visit MIDI Jam Session , download the application VI .zip file, and view the screencast video in that module to learn more about the application and how to create an instrument subVI, or VMI. Your VMI will accept parameters that specify frequency, amplitude, and length of a single note, and will produce an array of audio samples corresponding to a single note. Use the tone generator you developed in Part 1, and apply the amplitude envelope you generated in Part 4. You may wish to keep all of your parameters as front-panel controls and add the "Play Waveform" Express VI to listen to your VMI during development. Adjust the parameters to obtain pleasing and realistic settings, then convert the front-panel controls to constants and remove "Play Waveform." Your finished VMI must not contain any front panel controls or indicators beyond those provided in the prototype instrument.Choose a suitable MIDI file and use MIDI_JamSession to play your whistler VMI. MIDI files that contain a solo instrument, slow tempo, and long sustained notes likely produce better results, for example, Johann Pachelbel's "Canon in D." Try Pachelbel_Canon_in_D.mid at the Classical Guitar MIDI Archives . You can also find a more extensive collection at ClassicalArchives.com , specifically Pachelbel MIDI files . Create a .wav file of your finished work.

Optional: modifications to basic whistler vmi

Following are some suggested modifications you could try for your basic whistler VMI:

  • Make the vibrato rate proportional to the intensity envelope. This characteristic is common for vocalists and many types of instrumentalists.
  • Make the vibrato depth proportional to the intensity envelope. This is another characteristic common for vocalists and many types of instrumentalists.
  • Vary either the vibrato rate or depth (or possibly both) according to the "amplitude" parameter provided by the prototype VMI. For example, higher amplitudes could be mapped to a faster rate or more depth.
  • Duplicate the tone generator two more times with frequencies of 2 f 0 and 3 f 0 and intensities of -10 dB and -20 dB, respectively, to create some overtones. Each of the tone generators should have the same vibrato rate and depth. The overtones make the whistler sound a bit more like a flute or a singing voice.

Questions & Answers

what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
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.
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!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Musical signal processing with labview -- tremolo and vibrato effects (low-frequency modulation). OpenStax CNX. Nov 07, 2007 Download for free at http://cnx.org/content/col10482/1.1
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 -- tremolo and vibrato effects (low-frequency modulation)' conversation and receive update notifications?