Example Code

Piano View - a (very) Little virtual piano made in LabView

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This example makes a (very) little virtual piano in LabVIEW.

 

Description

The virtual piano allows the user to generate the sounds of each key by pressing the on screen keys, over many octaves either. Its volume and octave can be controled and it can display the sound signal waveform.

 

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Cod

  1. Open Piano 2012.vi an run this VI
  2. Play the piano by clicking on the key.
  3. Change the Volume and Octave can control the volume and octave of the piano.\
  4. The  Graph will show the sound waveform.

 

Additional Information or References

undefined

 

VI Snippet

undefined

 

The attached PianoView.rar provides an installer, it needs LabVIEW Run-Time Engine 2010 or compatible.

 

The attached Piano View 2012 NIVerified.zip just provides LabVIEW VIs, run the VIs can accomplish the same function. If you want to create an installer or an application(EXE), you can add the VIs to a project and create them.

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.** 




- - -
Ing. Marcelo A. Valdéz
® MP: 155810/3707
☎ +549 (0351) 4733911
✉ mvaldez@arnet.com.ar
✔ http://dobaembedded.com.ar
Contact Me

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
alieas
Member
Member
on

I cant open this VI.... how to open this? i installed Labview 10 in my PC....

marxxelo
Member
Member
on

Hi!

Just unrar the archive to a temporary folder and run the "setup.exe" installer. Once the setup is completed,  PianoView will run automatically.

Try changing the waveform ("Forma de Onda" control) and the octave (from -3 to +4). The "Hastalavista Babe" control exits the program.

To explore and modify the source code, just go to "Pianoview distribution" subfolder. There, you can find the "pianito.vi", the "octava.ctl" control and the application icon.

Happy halloween!

Marcelo.




- - -
Ing. Marcelo A. Valdéz
® MP: 155810/3707
☎ +549 (0351) 4733911
✉ mvaldez@arnet.com.ar
✔ http://dobaembedded.com.ar
Contact Me
Alex.T
Active Participant
Active Participant
on

This is brilliant! It looks great and the way that you have it swap keys on another press is fantastic.

Really, really well done!


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)