LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wavファイル32bit Floatの取り扱いについて

Solved!
Go to solution

お世話になります。

Wavファイル32bit Floatの取り扱いについて教えて下さい。

 

確認用としてwav_32bit_float.zipを添付します。

 

困っているviと、必要な情報をzipにして添付します。

Zipには次の3点が入っています。

input_32bit_float.wav ←これを入力とします。

output.wav ←現状のvi出力です。

foobar2000出力.jpg ←再生ソフトにfoobar2000を使った時のwav情報確認用 

mxarai_0-1691501173738.jpeg

 

 

困っている点は、foobar2000Codecを確認すると

入力ファイル PCM(floating-point) とありますが、

出力ファイル PCMですが、(floating-point)となりません。

 

添付のviは確認用としてForループ1回だけとしてあります。

実際は、似たような音源を何個か入力して、連結して出力したいのが目的です。

さらに、このようなことを30種類ほど作りたいので、さらに輪をかけてForループで作っています。

手作業を避けたいので自動化したいです。

 

32ビット浮動小数点を処理するための解決策を教えて下さい。

よろしくお願いします。

 

環境は次の通りです。

LabVIEW 2018

Windows10

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 11
(2,149 Views)

お世話になっております。

 

そもそもになりますが、

32ビット浮動小数点のWAVファイルは取り扱いできるのでしょうか?

 

別名保存するだけの簡単なviを作りました。

入力信号は初回添付済みの input_32bit_float.wav です。

すみませんが、よろしくお願いします。

 

~動作環境~

LabVIEW 2018 日本語版32ビット

Windows10

 

mxarai_1-1691642480900.png

 

0 Kudos
Message 2 of 11
(2,107 Views)

Hi mxarai,

 

your VI executes without any errors (using LabVIEW2019).

What else do you want to know?

 

(It would be nice to write your messages in English when using the worldwide board instead of the Japanese regional board. And even nicer to use English also for all the text in the VI…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 11
(2,098 Views)

Hi GerdW,

# I am not good at English. Sorry!

# I will answer in Japanese and English.

 

動作確認をありがとうございます。
"LabVIEW2019"の場合、浮動小数点で出力されるのでしょうか?
"LabVIEW2019"での結果ファイルを添付して頂けますか?

(下記英語、伝わりますかね?)

 

Thank you for confirming the operation.
In the case of "LabVIEW2019", will the output be in floating point?
Can you attach the result file in "LabVIEW2019" ?

 

Best regards.

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

Hi mxarai,

 

VLC says its "PCM S32LE (s32I)"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(2,086 Views)

Hi GerdW,

 

添付ファイルをありがとうございます。

こちらで確認したところ、浮動小数点ではなかったです。
音声コーデックは入力と同じくしたいです。

状況は変わらないです。

 

Thank you for the attachment.

I checked here and it was not floating point.
I would like the audio codec to be the same as the input.

 

mxarai_0-1691657852196.jpeg

 

Best regards.

0 Kudos
Message 6 of 11
(2,058 Views)

Hi mxarai,

 


@mxarai wrote:

Thank you for the attachment.

I checked here and it was not floating point.
I would like the audio codec to be the same as the input.


While LabVIEW can handle WAVE files it doesn't support all possible options.

What you request might be an unsupported option…

 

Possible workaround: use a 3rd party tool to convert your data back to a WAVE file using SGL samples. You should prefer command line tools, easily commanded using the SysExec function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(2,045 Views)

Hi mxarai,

 

Unfortunately LabVIEW's sound VIs only support writing 32-bit integer wav data, not IEEE float data (and only 16-bit integer wav under Linux / macOS).

 

I've written an audio library for LabVIEW called G-Audio which can read and write IEEE float wav data. Here's a quick example (with VI attached). Note the IEEE Float input to Open Audio File Write.vi:

 

Dataflow_G_0-1691661504428.png

 

And the results in foobar2000:

Dataflow_G_1-1691661657598.png

 

Dataflow_G_2-1691661704255.png

 

The library is written in LabVIEW 2020, but if you don't have access to that version I can try save it in LabVIEW 2018.

 

 

 

0 Kudos
Message 8 of 11
(2,039 Views)

 

 

Hi Dataflow_G,

 

やはりLabVIEWのサウンドviはサポートしていないのですね。
あなたの提案に感謝します。

残念ながら、添付のviを開けませんでした。(error 0x465)

LabVIEW 2018で保存して、ご提供頂けると大変嬉しいです。試してみたいです。

 

-------------------------

I see that LabVIEW sound vi is not supported after all.

And I appreciate your suggestion.
Unfortunately, I could not open the attached vi. (error 0x465)

 

> The library is written in LabVIEW 2020, but if you don't have access to that version I can try save it in LabVIEW 2018.

 

I would be very happy if you could save the file in LabVIEW 2018 and provide it to us. I would like to try it.

 

Best Regards.

0 Kudos
Message 9 of 11
(2,024 Views)
Solution
Accepted by topic author mxarai

Hi mxarai,

 

Attached is the library saved in LabVIEW 2018. It includes the example VI from the previous post, plus a number of other examples in the Examples folder (see Write Audio File Example.vi and IEEE Float Compare Example.vi to help you get started).

 

Please let me know if there are any issues opening it. I had a heck of a time saving malleable VIs for previous version, and ended up using a conversion script to convert most of them to polymorphic VIs.

Message 10 of 11
(2,002 Views)