Recent

Author Topic: Bitmap wavefore from .wav file  (Read 18378 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #15 on: April 09, 2014, 04:51:10 am »
Quote
Let me step on Fred vS toes (again) and suggest to use openal wav playback test :)

 ;)

Hum, by the way, im very interested by the .wav loader...
Could you give me some info about it ?  :-X
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #16 on: April 09, 2014, 05:12:41 am »
Quote
S: I did download uos and tried to run it in Lazarus but when I tried to compile it I got an error message that said an illegal qualifier was being used. The line of code (in uos.pas) involved was: setlength(uosLevelArray[index].[InputIndex],0) ;  The

Updated waveform example compatible with fpc 2.6.2.
=> https://github.com/fredvs/uos => /uos/examples/WaveForm.lpi

I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2289
    • havefunsoft.com
Re: Bitmap wavefore from .wav file
« Reply #17 on: April 09, 2014, 05:41:50 am »
Hum, by the way, im very interested by the .wav loader...
Could you give me some info about it ?  :-X
TWaveReader class at wavopenal.pas
a simple wav loader based on wav specs. Actually there're plenty of specifications online on various sites.

Currently it just reads through the wav and returns you waves data (no conversion is done).
Thus , if you need 16-bit stereo wave for payback and the wav file is 8-bit mono, it would be up to your code to convert it.
Any compression is obviously not supported (though compressed wavs are quire rare).

Btw, that makes it really easy to use for waveform rendering. Just read a chunk and build the waveform based on how many milliseconds fits into X pixels.

P.S. there're rumors that fpc team are going to create some kind of fcl package to handle audio hardware and file formats.

Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #18 on: April 09, 2014, 12:15:51 pm »
Quote
P.S. there're rumors that fpc team are going to create some kind of fcl package to handle audio hardware and file formats.

Hum, im very curious, mainly for the  audio hardware part.  ;)
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bitmap wavefore from .wav file
« Reply #19 on: April 09, 2014, 12:20:40 pm »
Why? What's so exciting about sound cards ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bitmap wavefore from .wav file
« Reply #20 on: April 09, 2014, 12:22:10 pm »
P.S. there're rumors that fpc team are going to create some kind of fcl package to handle audio hardware and file formats.
Rumors?
Are you referring to this
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-sound/
;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #21 on: April 09, 2014, 12:24:54 pm »
Quote
Why? What's so exciting about sound cards ;)

Hum, because all the audio lib that i try that do not use portaudio library are not fully 100 % good working and not really cross-platform...  :-X

[EDIT] Bass appart, of course, Bass is working perfectly everywhere (but is not open-source).



« Last Edit: April 09, 2014, 12:31:30 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bitmap wavefore from .wav file
« Reply #22 on: April 09, 2014, 12:31:47 pm »
Ah ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2289
    • havefunsoft.com
Re: Bitmap wavefore from .wav file
« Reply #23 on: April 09, 2014, 02:18:12 pm »
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #24 on: April 09, 2014, 04:29:26 pm »
Quote
Quote from: BigChimp on Today at 12:22:10 pm

    Are you referring to this
    http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-sound/
    ;)

yes. that's exactly what i'm talking about.

Ok, i promise not to tell  :-X

Hum, what fcl-sound can (will) do ?
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2289
    • havefunsoft.com
Re: Bitmap wavefore from .wav file
« Reply #25 on: April 09, 2014, 04:48:06 pm »
Ok, i promise not to tell  :-X

Hum, what fcl-sound can (will) do ?
everything and probably more than uos.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bitmap wavefore from .wav file
« Reply #26 on: April 09, 2014, 04:53:13 pm »
everything and probably more than uos.
sudo make me a sandwich then ;)

Sorry, could not resist...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Bitmap wavefore from .wav file
« Reply #27 on: April 09, 2014, 09:18:30 pm »
Quote
everything and probably more than uos.

Wow, nice, and with post-fractalization in tri-turbo mode too ?  :-X
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

user5

  • Full Member
  • ***
  • Posts: 246
Re: Bitmap wavefore from .wav file
« Reply #28 on: April 10, 2014, 04:02:01 pm »
Hi! Remember me? I’m the newbie who started this thread and it’s been real interesting. I’ve read every post. I’m looking for a way to ‘simply’ sample playing soundtracks or to make a wave. I’m surprised that there doesn’t seem to be a procedure for doing that in Lazarus, Delphi or API. Tried a lot of stuff but most downloads are incomplete or just don’t work. Found an exec, waveform.exe, that does the job but it’s not an elegant solution. Open source Audorra is real nice and I may include it with my program as an extra. I found the part of its code that does the sampling and I could save the info in an array or something but I can’t think of a way to get the info out of the program. Lazarus won’t let me use text files with this application, but it just occurred to me that I could write directly to a .bmp. Hmmmm... Will post again when I learn more.

PS: I downloaded Lazarus 1.2 but I had some trouble with it so I went back to my earlier version and I was surprised to notice that it uses fpc 2.6.2 just like Lazarus 1.0, if I’m correct on that. I’d like to have fpc 2.7 but I think I’ll wait on that. I couldn’t get uos to work, apparently because I don’t have fpc 2.7 or because of some encoding issue when I saved uos.pas from Notepad into my directory so it was real cruel of  you to post that very nice waveform graphic from uos.

Love this forum but I think some of you could run rings around me, though I know what I need to know to get my program done except for, of course, sampling a playing wave.
I’m surprised that no one has asked me what my program does. I think that’s courtesy on your part. If someone asks I’ll tell ‘em. That’s the least that I can do for getting a nice welcome. Thanx.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Bitmap wavefore from .wav file
« Reply #29 on: April 10, 2014, 05:04:05 pm »
Welll... have you read this:
Updated waveform example compatible with fpc 2.6.2.
=> https://github.com/fredvs/uos => /uos/examples/WaveForm.lpi

Enjoy :)

PS: What does your program do? :)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified