<< 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

Objective

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.

Deliverables

  • 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

how does the planets on our solar system orbit
cheten Reply
how many Messier objects are there in space
satish Reply
did you g8ve certificate
Richard Reply
what are astronomy
Issan Reply
Astronomy (from Ancient Greek ἀστρονομία (astronomía) 'science that studies the laws of the stars') is a natural science that studies celestial objects and phenomena. It uses mathematics, physics, and chemistry in order to explain their origin and evolution.
Rafael
vjuvu
Elgoog
what is big bang theory?
Rosemary
what type of activity astronomer do?
Rosemary
No
Richard
the big bang theory is a theory which states that all matter was compressed together in one place the matter got so unstable it exploded releasing All its contents in the form of hydrogen
Roaul
I want to be an astronomer. That's my dream
Astrit
Who named the the whole galaxy?
Shola Reply
solar Univers
GPOWER
what is space
Richard
what is the dark matter
Richard
what are the factors upon which the atmosphere is stratified
Nicholas Reply
is the big bang the sun
Folakemi Reply
no
Sokak
bigbang is the beginning of the universe
Sokak
but thats just a theory
Sokak
nothing will happen, don't worry brother.
Vansh
what does comet means
GANGAIN Reply
these are Rocky substances between mars and jupiter
GANGAIN
Comets are cosmic snowballs of frozen gases , rock and dust that orbit the sun. They are mostly found between the orbits of Venus and Mercury.
Aarya
hllo
John
hi
John
qt rrt
John
r u there
John
hey can anyone guide me abt international astronomy olympiad
sahil
how can we learn right and true ?
Govinda Reply
why the moon is always appear in an elliptical shape
Gatjuol Reply
Because when astroid hit the Earth then a piece of elliptical shape of the earth was separated which is now called moon.
Hemen
what's see level?
lidiya Reply
Did you mean eye sight or sea level
Minal
oh sorry it's sea level
lidiya
according to the theory of astronomers why the moon is always appear in an elliptical orbit?
Gatjuol
hi !!! I am new in astronomy.... I have so many questions in mind .... all of scientists of the word they just give opinion only. but they never think true or false ... i respect all of them... I believes whole universe depending on true ...থিউরি
Govinda
hello
Jackson
hi
Elyana
we're all stars and galaxies a part of sun. how can science prove thx with respect old ancient times picture or books..or anything with respect to present time .but we r a part of that universe
w astronomy and cosmology!
Michele
another theory of universe except big ban
Albash Reply
how was universe born
Asmit Reply
there many theory to born universe but what is the reality of big bang theory to born universe
Asmit
what is the exact value of π?
Nagalakshmi
by big bang
universal
there are many theories regarding this it's on you believe any theory that you think is true ex. eternal inflation theory, oscillation model theory, multiple universe theory the big bang theory etc.
Aarya
I think after Big Bang!
Michele
from where on earth could u observe all the stars during the during the course of an year
Karuna Reply
I think it couldn't possible on earth
Nagalakshmi
in this time i don't Know
Michele
is that so. the question was in the end of this chapter
Karuna
in theory, you could see them all from the equator (though over the course of a year, not at pne time). stars are measured in "declination", which is how far N or S of the equator (90* to -90*). Polaris is the North star, and is ALMOST 90* (+89*). So it would just barely creep over the horizon.
Christopher
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




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?

Ask