LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Several Questions about Sound

Hi, everyone. I have several conceptual questions about the wav sound editor no octave analysis.vi on the website https://decibel.ni.com/content/docs/DOC-34178.

 

1. What does it mean for the processed signal to multiply tremble, bass, or midtone? Does it mean the frequency ranges change or just the amplitude? I have been runnning the vi and don't quite understand why I increase the amplitude of the multiplier, the effects become obvious.

 

2. For the Align and Resemble VI, why when dt increases, the audio speeds up. I looked it up online about the resemble interval, but have doubt about it. When dt increases, the signal should become more flatt, therefore the speed decreases. Why here it increases?

 

3. How do we reverse the audio in this code?

 

4. In the index array part, why do we only pick the 0th element from the 1D array?

 

Thanks a lot.

0 Kudos
Message 1 of 11
(4,158 Views)

And why we need to convert the waveform to the dynamic data type? Is there make the calculation easier?

0 Kudos
Message 2 of 11
(4,140 Views)

I'm going to give you the Tired Cynic's answer to your question(s), so take this with a Grain of Salt.  The reason to change into the Dynamic Data Type is to allow the use of Express VIs, which, in turn, allow this piece of code to be written as one big Block Diagram, with all of the details hidden, obscuring what is going on.  To my (cynical) mind, this it a Textbook Case of bad LabVIEW programming. and violates two of Bob's Rules for LabVIEW Programs:

  1. Never use an Express VI (except on a blank Block Diagram, and only for the purpose of opening its Front Panel to learn what "makes it tick".
  2. Never, ever, use the Dynamic Data Type.  The only excuse that I can fathom for inventing this is to allow Express VIs to proliferate, in violation of Rule 1.
  3. Never break up your program into subVIs -- Real Men (and Women) Put Everything Into a Single Block Diagram.

[Did you notice that I can't count?]

 

Bob Schor

Message 3 of 11
(4,117 Views)

Following rule 3 is the first way to notice a bad programmer. 😛

0 Kudos
Message 4 of 11
(4,089 Views)

I completely agree.  In addition to Not Being Able to Count, I sometimes Reverse My Logic.  I've said many times in this Forum that a 32-by-32 pixel area on the Block Diagram with a clearly labelled icon is a lot easier to understand (what the user intends) than spaghetti code that covers 2/3 (or 2 or 3) monitor screens.

 

Bob Schor

0 Kudos
Message 5 of 11
(4,069 Views)

Hi karryli,

 

1. It is only multiplying the amplitude of the signal. The frequency range and filter shape of treble, mid, and bass are determined by the parameters in the Filter VIs.
2. Increasing the dt input compresses the signal, while decreasing the dt input expands the signal.
3. I don't understand the question. You want the audio file to play backwards?
4. The Sound File Read VI data output is a 1D array of waveform data. The Convert to Dynamic Data is set to input waveform data. The Index Array is just turning the 1D array of waveform data into waveform data. In many cases, it's not needed. You can use a Convert to Dynamic Data and set it to input "1D array of waveform" and wire the Sound File Read data directly into it. If your wave file has multiple channels, then you might want to use it to only filter one of the channels.

0 Kudos
Message 6 of 11
(4,037 Views)

Hi Jeff,

 

By reversing the audio, I mean to play the audio from the end to the start.

 

Karry

0 Kudos
Message 7 of 11
(4,006 Views)

The data will either be waveform or array. If it's a waveform, unbundle it and get just the y-value, which will be an array. Then use the Reverse 1D Array function.

0 Kudos
Message 8 of 11
(3,979 Views)

Is there a way to have a control such that we can move backwards the sound iwthout using windows media player? For example, it's like the video on youtube, but less complicated. The thing is that I am using the continous sample, so the 1D array way doesn't work very well with my codes.

0 Kudos
Message 9 of 11
(3,963 Views)

The last post by me can be ignored. I want to achieve how to play the sound from the end to the start initially for a continous sample. I attach part of my codes below.

0 Kudos
Message 10 of 11
(3,955 Views)