Edit envelope data by mouse

1 visualizzazione (ultimi 30 giorni)
Hans Buchele
Hans Buchele il 29 Dic 2022
Commentato: Star Strider il 30 Dic 2022
Dear community,
I am working with big signal envelopes and would like to be able to edit a printed envelope by mouse (drawing parts of the envelope new) which should replace the old data.
x = audioread('1.wav'); % read audiofile
q = hilbert(x); % create envelopes
env = abs(q);
za = env(:,1);
zb = env(:,2);
plot(za); % plot first envelope
Unfortunately I was not able to get any further!
Envelope 1 = original envelope
Envelope 2 = example 1 of modified envelope
Envelope 3 = example 2 of modified envelope
Any help is much appreciated! Thank you!
  1 Commento
Image Analyst
Image Analyst il 30 Dic 2022
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Screenshots also help explain your situation.

Accedi per commentare.

Risposte (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 29 Dic 2022
Have you read this DOC? envelope()
WHat about this DOC2? hilbert()
  1 Commento
Hans Buchele
Hans Buchele il 29 Dic 2022
Thank you for the links! I have read both docs before but my problem goes beyond these topics.

Accedi per commentare.


Star Strider
Star Strider il 30 Dic 2022
Please describe what you want to do.
If envelope is not doing what you want, and you want to find the peaks (rather than RMS or other envelope options), one option may be findpeaks. It may be possible to edit what findpeaks returns.
  2 Commenti
Hans Buchele
Hans Buchele il 30 Dic 2022
Thanks for your help Star Strider!
I want to open/plot the original signal envelope and be able to 'redraw' some parts of it. The redraw should create new data points which are safed in the original envelope data. Later I would like to apply the modified envelope to an audio file.
Star Strider
Star Strider il 30 Dic 2022
I am not certain that this is possible to do interactively. If you know the sort of envelope function you want for the signal, it would be relatively straightforward to apply it, providing that the variation (frequency) in the modulating (envelope) function is sufficiently different from the signal frequency.
Example —
Fs = 1000;
L = 5;
t = linspace(0, 100*L, Fs*L)/Fs;
s1 = sin(2*pi*100*t);
s2 = cos(2*pi*5*t);
s12 = s1.*s2;
[eh,el] = envelope(s12, 5, 'peak');
figure
subplot(3,1,1)
plot(t, s1)
grid
title('s1')
subplot(3,1,2)
plot(t, s2)
grid
title('s2')
subplot(3,1,3)
plot(t, s12)
hold on
plot(t, [eh; el], 'r')
hold off
grid
title('s12')
xlabel('t')
.

Accedi per commentare.

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by