Effacer les filtres
Effacer les filtres

Edit envelope data by mouse

1 vue (au cours des 30 derniers jours)
Hans Buchele
Hans Buchele le 29 Déc 2022
Commenté : Star Strider le 30 Déc 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 commentaire
Image Analyst
Image Analyst le 30 Déc 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.

Connectez-vous pour commenter.

Réponses (2)

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

Connectez-vous pour commenter.


Star Strider
Star Strider le 30 Déc 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 commentaires
Hans Buchele
Hans Buchele le 30 Déc 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 le 30 Déc 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')
.

Connectez-vous pour commenter.

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by