LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveforms have different dt values

Hello,

 

I am new to LabVIEW and I'm buliding the piano stairs that AshLu posted on the community but I am having problems with the code ( https://decibel.ni.com/content/docs/DOC-12384 ). When I use my own .wav files for each step sound I get error:

Error -1802 occurred at Add in PlayNote8.vi:4570001->MyDAQ8.vi

Possible reason(s):

LabVIEW: (Hex 0xFFFFF8F6) Waveforms have different dt values.

 

The VI is attached at the bottom.

 Any help would be appreciated.

Thanks

0 Kudos
Message 1 of 9
(5,255 Views)

waveform has different frequency (41, 44 kHz). Maybe this is reason of error. Try set one dt for all wf in array.

0 Kudos
Message 2 of 9
(5,231 Views)

Okay how/where would I do that?

0 Kudos
Message 3 of 9
(5,221 Views)

I can't open myDAQ8 that was inside the ZIP file you attached.  Can you also attach an example of the .WAV file you built?  Note that these files are not LabVIEW Waveforms -- they are sound files adhering to the Waveform Audio File format.  Something is strange here -- it looks like there are some serious problems with the playing of .WAV files.

 

Bob Schor

0 Kudos
Message 4 of 9
(5,216 Views)

The .wav files I'm using are piano key sounds like the ones below. I downloaded them from online.

 

I got the ZIP from this URL:  https://decibel.ni.com/content/docs/DOC-12384

0 Kudos
Message 5 of 9
(5,214 Views)

If you are really "new to LabVIEW", you are going to need to either spend a good amount of time with tutorial material to really learn the basics of LabVIEW, plus study very carefully the code that you downloaded (which is moderately sophisticated with elements that may go beyond the on-line tutorials), or (better) find a LabVIEW Guru who can work with you for several weeks to help you to learn what is going on here.  This is not a "beginner's Project".

 

Second, while I don't have Perfect Pitch, I can tell you that the Wave Files you downloaded are not accurately named (unless the modifiers "Sharp" or "Flat" have been deliberately omitted).  For example, the interval between B and C is a half-step, yet the difference between B.wav and C.wav is a whole step ...

 

Bob Schor

0 Kudos
Message 6 of 9
(5,207 Views)

Thanks for the help. 

Any last ideas, or other options for this project?

0 Kudos
Message 7 of 9
(5,204 Views)

Oh, I see your error, but it difficult to describe. Because my english is bad and your LabVIEW is low 🙂
I try.
All wave has same dt (2,26757E-5), but here
snip.png
you sometimes replace original wave by zero-wave with dt=1 and 4000 points.

And finally you get array of waves with different dt.

If you will use the same file everytime, you can replase dt=1 in your wave-constants by dt=2,26757E-5

0 Kudos
Message 8 of 9
(5,181 Views)

If you don't understand the origin of Artem's "magic number" of 2.26757E-5, then you need to do some research on the .wav format, particularly the representation used for audio CDs, and the meaning of the elements in the LabVIEW Waveform Cluster.

 

Bob Schor

0 Kudos
Message 9 of 9
(5,178 Views)