LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cut the first impulse

Hello. I have 2 .wav files with pulses from which I need to cut the first pulse so that it is the same length. My solution can only cut a given fragment (that is, find the necessary parameters by touch so that it cuts a specific fragment). Is it possible to implement this somehow differently? I think it’s hardly possible to achieve such accuracy manually

Здравствуйте. У меня есть 2 Вав файла с импульсами из которых нужно вырезать первый импульс чтобы он был одинаковой длинны. Мое решение может вырезать только заданный фрагмент (тоесть наощуп найти нужные параметры, чтобы оно вырезало определенный фрагмент). Может можно как-то иначе это реализовать ? Вручную добиться такой точности думаю вряд-ли возможно

Download All
0 Kudos
Message 1 of 10
(321 Views)

@Kirin_Jindosh wrote:

Hello. I have 2 .wav files with pulses from which I need to cut the first pulse so that it is the same length. My solution can only cut a given fragment (that is, find the necessary parameters by touch so that it cuts a specific fragment). Is it possible to implement this somehow differently? I think it’s hardly possible to achieve such accuracy manually

Здравствуйте. У меня есть 2 Вав файла с импульсами из которых нужно вырезать первый импульс чтобы он был одинаковой длинны. Мое решение может вырезать только заданный фрагмент (тоесть наощуп найти нужные параметры, чтобы оно вырезало определенный фрагмент). Может можно как-то иначе это реализовать ? Вручную добиться такой точности думаю вряд-ли возможно


I don't understand.  Media editors can manipulate a waveform to the individual sample.  That should be accurate enough.  Maybe that's not what you're asking?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 10
(316 Views)

Have you watched my program? There, in order to cut a fragment, you need to manually search, which is not very convenient and accurate. I need to specifically cut out the first pulse so that it matches the length of the first pulse of another audio file.

0 Kudos
Message 3 of 10
(299 Views)

You can e.g. use the Threshold 1D array to find the start of your pulse and then use that index in the other.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 10
(272 Views)

So it’s for an array of numbers, but I need it for audio. Well, or I don’t know how to connect it

0 Kudos
Message 5 of 10
(251 Views)

Hi Kirin,

 


@Kirin_Jindosh wrote:

So it’s for an array of numbers, but I need it for audio.


"Audio" aka waveforms basically are just arrays of numbers!

 

Mind to share your VI downconverted to LV2021 or older? (I prefer LV2019.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(239 Views)

Certainly can. I hope it was preserved correctly)

0 Kudos
Message 7 of 10
(236 Views)

 Hi Lirin,

 

thanks for conversion!

 

On your signals:

  • filter the noise: there seems to be some noise with levels <0.1
  • then search the resulting filtered signal for values above noise level: it's quite easy to find the pulses…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(204 Views)

Sorry, but could you tell me or show me how to do this?

0 Kudos
Message 9 of 10
(185 Views)

Hi Kirin,

 


@Kirin_Jindosh wrote:

Sorry, but could you tell me or show me how to do this?


Get the Y array of the waveform, compare with ">0.2" and search for the first TRUE in the resulting boolean array.

 

This is a very simple approach, based on the waveforms in your first message. You may apply some filtering when there could be more noise in the signals…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(169 Views)