Lazarus

Programming => Graphics and Multimedia => Audio and Video => Topic started by: ms4@free.fr on January 03, 2020, 11:27:30 am

Title: Lazarus ans components audio
Post by: ms4@free.fr on January 03, 2020, 11:27:30 am
Happy new years,
I would like to read a sound file and determine the frequency of each note. What do I need with Lazarus 2.0.2 in Windows 10?
Thank you so much.
Title: Re: Lazarus ans components audio
Post by: MarkMLl on January 03, 2020, 12:12:23 pm
What sort of sound file- an arbitrary waveform file or MIDI?

MarkMLl
Title: Re: Lazarus ans components audio
Post by: ms4@free.fr on January 03, 2020, 12:30:56 pm
Wav and midi if it's possible...
Title: Re: Lazarus ans components audio
Post by: MarkMLl on January 03, 2020, 12:56:15 pm
I'm just the one asking the obvious question for the moment :-)

These aren't components but you can use something like Sox to get a spectrogram of many types of file (i.e. .wav etc.), basically you need to take a snapshot and then apply a (fast) Fourier transform. Somebody was discussing generating MIDI files the other day but they're basically pretty trivial to manipulate: I don't think that you need all of the MIDI play/record stuff for that.

MarkMLl
Title: Re: Lazarus ans components audio
Post by: ms4@free.fr on January 03, 2020, 03:04:02 pm
Thanks for your answer.
Title: Re: Lazarus ans components audio
Post by: Fred vS on January 03, 2020, 09:08:18 pm
I would like to read a sound file and determine the frequency of each note. What do I need with Lazarus 2.0.2 in Windows 10?

Hello.

With uos (https://github.com/fredvs/uos), you may get the spectrum frequency of mp3, ogg, wav, flac, m4a, opus, cda sound files.

In StrumPract project (https://github.com/fredvs/strumpract), there is the Pascal/fpc code to do the spectrogram using uos.

[EDIT] If you are talking about note recognition from a piece of music (writing the partition), like voice recognition does from a discussion (writing it to text), huh, at the moment I did not find anything working.

I get some result for monophonic music but once there are chords it does not work ok.

Fre;D



TinyPortal © 2005-2018