Recent

Author Topic: Lazarus ans components audio  (Read 2367 times)

ms4@free.fr

  • Newbie
  • Posts: 3
Lazarus ans components audio
« 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.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Lazarus ans components audio
« Reply #1 on: January 03, 2020, 12:12:23 pm »
What sort of sound file- an arbitrary waveform file or MIDI?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

ms4@free.fr

  • Newbie
  • Posts: 3
Re: Lazarus ans components audio
« Reply #2 on: January 03, 2020, 12:30:56 pm »
Wav and midi if it's possible...

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Lazarus ans components audio
« Reply #3 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
« Last Edit: January 03, 2020, 03:28:46 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

ms4@free.fr

  • Newbie
  • Posts: 3
Re: Lazarus ans components audio
« Reply #4 on: January 03, 2020, 03:04:02 pm »
Thanks for your answer.

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: Lazarus ans components audio
« Reply #5 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



« Last Edit: January 03, 2020, 09:33:34 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018