Recent

Author Topic: uos and uoslib version 1.0 is here  (Read 21871 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
uos and uoslib version 1.0 is here
« on: February 25, 2014, 03:12:06 pm »
Hello everybody.

I am extremely happy to announce the new version of uos and the birth of the universal uos library...

uos (United Open-libraries of Sound) unifies the best open-source audio libraries.

For that new release, there is a new member : SoundTouch.
That fabulous library can do stretching and pitching of sound (changing tempo without changing rate).

With uos you can:

. Listen to mp3, ogg, wav, flac,... audio files.
. With 16, 32 or float 32 bit resolution.
. Record all types of input into file.
. Add DSP effects and filters, however many you want and record it.
. Listen to multiple inputs and outputs.

uos uses the SoundTouch, PortAudio, SndFile and Mpg123 audio libraries.

For Pascal developers you may use the uos-unit, download source here :
>> https://github.com/fredvs/uos

For all the others (including Pascal developers) you may use the universal uos library :
>> https://github.com/fredvs/uoslib
Nearly all the uos functions/procedures are accessible from the library (but Pascal developers who use the uos-unit can do more things, like custom DSP)..

Here compiled examples using the uos universal library :
>> https://sites.google.com/site/biotray/uoslib_sandro.zip

PS : Till now, there is only a Pascal header but, because uoslib is universal,  other headers for foreign languages (C, CNet, Java,...) are super-welcome.

Fred.
« Last Edit: February 25, 2014, 03:19:15 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

Graeme

  • Hero Member
  • *****
  • Posts: 1443
    • Graeme on the web
Re: uos and uoslib version 1.0 is here
« Reply #1 on: February 26, 2014, 02:21:53 pm »
Excellent work! :)
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

metis

  • Sr. Member
  • ****
  • Posts: 302
Re: uos and uoslib version 1.0 is here
« Reply #2 on: March 13, 2014, 03:06:21 pm »
Hi Fred,

really nice work, that will help to a lots of people, to build their own AudioPlayer, but I got some questions:  ;D
 
> For MULTIPLE AudioPlayers, You create several instances of 'Tuos_Player', but this way - afaik - You can't do any submixing with UOS.  >:(
   So, why don't You simply use Your UOS-In-/OutStreams to implement several Player-In-/Out-Channels within ONE PlayerThread ?

> Is there some reason for only using flat Methods in Your UOS-Classes; why don't You use any ClassProperties instead, where it's appropriate ?

> What's about UOS and higher Resolutions than 32 Float ?

> What's about UOS and higher SampleRates than 48000Hz, like 88200Hz or 96000Hz ?
   ( At least on my PC (WinXP SP3), UOS works only up to 48000Hz. )

> Why did You deliver a different (and much smaller) LibPortaudio-32.dll-File with Your last UOS-Release ?
   ( My PortAudio-PlayerApp crashes with this file - why ? )  :(

> How to implement WMA in UOS ?
   ( I got lots of old (but good  ;D ) stuff in WMA8, and don't want to convert them all. )

> And, finally: I think, You mixed up some Code dealing with LowPass/HighPass - but i have to check it out again , if I got some more time.  8-)

But anyway - Thank You for Your work !  :)

altasam
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #3 on: March 13, 2014, 04:04:05 pm »
@ altasam : Whouw, many thanks for that deep analyse...

Quote
> For MULTIPLE AudioPlayers, You create several instances of 'Tuos_Player', but this way - afaik - You can't do any submixing with UOS.  >:(
   So, why don't You simply use Your UOS-In-/OutStreams to implement several Player-In-/Out-Channels within ONE PlayerThread ?

Hum, you put your finger on a sensible thing...
Have you try to use multiple InStreams in only one thread ?
I have try it but after 3 Inputs, my little computer does not synchronize well the input's. So the idea, if you want to mix multiple threads/players, is to create one who use Output of the others as input.
But i agree, submixing must be more developed.

Quote
> Is there some reason for only using flat Methods in Your UOS-Classes; why don't You use any ClassProperties instead, where it's appropriate ?

I want that the same uos-unit is working for uoslib too => ClassProperties are used inside uos unit, for universality, final-public procedures have "procedural look".

{EDIT] But if you prefer ClassProperties, no problem, i can easy do it.
In fact, there is a "sub layer" on root uos. I find easier for the end user to not have to declare uos classes in his main application.
But, wel, i will create a "root_uos" and a "flat_uos" units.

Quote
> What's about UOS and higher Resolutions than 32 Float ?

Hum, does it exists higher resolution sound-cards than 32 bit float ?
AFAIK, even 32 bit float resolution cards are in fact 24 bit int ...
But if it exists, why not (but i do not think PortAudio does it...)

Quote
> What's about UOS and higher SampleRates than 48000Hz, like 88200Hz or 96000Hz ?
   ( At least on my PC (WinXP SP3), UOS works only up to 48000Hz. )

Hum, uos does it. Try "Simple Player" with a 96 k file, it works.
Code: [Select]
InIndex := uos_AddFromFile(PlayerIndex1, pchar(Edit1.Text), -1, samformat, -1);
uos_AddIntoDevOut(PlayerIndex1, -1, -1, uos_InputGetSampleRate(PlayerIndex1, InIndex), -1, samformat, -1);

Quote
> Why did You deliver a different (and much smaller) LibPortaudio-32.dll-File with Your last UOS-Release ?
   ( My PortAudio-PlayerApp crashes with this file - why ? )  :(

Ooops, it is the stripped version of Portaudio.dll. In my Windows 7, it works.
But if there are problems with other Windows version, of course i will give a other. By the way, have you a Portaudio.dll that works on your system ?
I may give this one then (if you give it as attachment).

Quote
> How to implement WMA in UOS ?
   ( I got lots of old (but good  ;D ) stuff in WMA8, and don't want to convert them all. )

WMA is not open source. Legal-free-open-source libraries for WMA do not exist.  :-X

Quote
And, finally: I think, You mixed up some Code dealing with LowPass/HighPass - but i have to check it out again , if I got some more time.  8-)

Yep, nice that you have noted it and, many, many thanks for the pull you will give on uos GitHub.  ;)

Cheers

Fred.
« Last Edit: March 16, 2014, 11:26:06 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

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #4 on: March 13, 2014, 09:54:52 pm »
Quote
You can't do any submixing with UOS.

Hum, only by curiosity, what do you mean by "submixing".
Do you mean mixing all the inputs into one ?
For recording i guess ?

Thanks.
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

metis

  • Sr. Member
  • ****
  • Posts: 302
Re: uos and uoslib version 1.0 is here
« Reply #5 on: March 14, 2014, 03:09:51 pm »
Hi Fred,

sub-mixing is the capability to adjust, mix and monitor AudioSignals coming from multiple sources at the same time.
This You need, e.g. in a Dj-Player to monitor the mixed Signal of Player #1 and #2.

Quote
Have you try to use multiple InStreams in only one thread ?

Therefore currently I use 3 UOS-InStreams (I call ChnIn) = 1xMonitorChannel + 2xPlayerChannel - and it works.
For this moment these 3 Signals go only to one SoundCard (= ChnOut), but I'll work it out, if I got some more time.
As well I'll try to put in some more ChnIn's to check it out, and I'll tell You the result.
By the way, I use ASIO, for latency-stuff, and so on.

Sorry Fred, but  I'll answer to the other questions next week (Got no I-Net at home, only at my workingplace, and we are busy)
Finally Progging is not my mainprofession; it's only a hobby, but I like it.

altasam
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #6 on: March 14, 2014, 10:47:01 pm »
Quote
Sorry Fred, but  I'll answer to the other questions next week (Got no I-Net at home, only at my workingplace, and we are busy)

Oops, please, take your time, there is no fire...  :-X

And many thanks for your attention, i really appreciate it...  :-[

Cheers.

Fred.
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

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #7 on: March 15, 2014, 09:01:02 pm »
Quote
> Is there some reason for only using flat Methods in Your UOS-Classes; why don't You use any ClassProperties instead, where it's appropriate ?

Yep, added uos_flat.
uos_flat is a over-layer for uos that takes care about class declarations.
You do not have to declare anything in your main application.
All procedures have a "universal procedurial" syntax.
All examples are using uos_flat.
In uses section =>
Code: [Select]
uses
uos_flat,
...

If you prefer to use uos directly, example SimplePlayer_noflat shows how to do.
This way all procedures can be used as oop, with ClassProperties. (java flavour).
In uses section =>
Code: [Select]
uses
uos,
...

Updated in GitHub =>
https://github.com/fredvs/uos
https://github.com/fredvs/uoslib

« Last Edit: March 15, 2014, 10:13:44 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

metis

  • Sr. Member
  • ****
  • Posts: 302
Re: uos and uoslib version 1.0 is here
« Reply #8 on: March 18, 2014, 02:49:51 pm »
Hi Fred,

now answering to Your Post from March, 13:

Quote
"...,my little computer does not synchronize well the input's."
> Mine isn't the newest one neither: - INTEL Pentium DualCore 1,60GHz, 2 GB RAM
                                     - SoundCard: SoundBlaster Audigy 24bit
                                     - WinXP 32 SP3
> Which synchronization do you mean ?
  'MainThread <-> PlayerThread' or 'Inputs <-> SoundLibs' or 'Outputs <-> Portaudio', etc. ?
  Finally: What do You hear ? What does not work ?
  By the way, to check out max. App-Performance I put:
              'PlayerThread.Priority' to 'tpTimeCritical' = "Thread rund at RealTime-Priority"

Quote
"So the idea, if you want to mix multiple threads/players, is to create one who use Output of the others as input."
Sounds too complicated, if it can be done directly - each Layer only increases latency and decreases performance.

Quote
"..., even 32 bit float resolution cards are in fact 24 bit float sound-cards ..."
It's true, that 32 bit float is sufficient for the moment, but development goes on.
Apple-Soundcards are also only 24bit - did not know.

Quote
"..., have you a Portaudio.dll that works on your system ?"
It's a 'LibPortaudio-32.dll' from a former UOS-Release, having 1.602KB.

Quote
"WMA is not open source. Legal-free-open-source libraries for WMA do not exist."
How do SoundEngines like 'FMOD' (= comercial; up to now was my prefered SoundEngine) then implement WMA ?
Do they pay licenses ¿
Isn't there really anything like 'mpg123' resp. 'LibSndFile' only to decode WMA ?


Some more Ideas for UOS: RMS, Log, BeatDetection, DistortionDetection, ...

May be UOS-CodeErrors:
see: UOS-FilterPlayer -> 'TForm1.TrackBar1Change()' (= EQLow):
                         gain := 1 + ((100 - TrackBar1.Position) / 20) // Should be 25 like EQMid and EQHi ???


now answering to Your Post from March, 15:
I'm not so much interested in the UOS-Interface; I'm more interested in its Core - and its improvement.

metis (formerly altasam)
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #9 on: March 18, 2014, 05:15:37 pm »
@ Altasam, many thanks ;-)

Quote
    "..., have you a Portaudio.dll that works on your system ?"

It's a 'LibPortaudio-32.dll' from a former UOS-Release, having 1.602KB.

Ooops, that is a big one ! Hum, what about the new one i uploaded in GitHub ?

Quote
  'PlayerThread.Priority' to 'tpTimeCritical' = "Thread rund at RealTime-Priority"

Nice, i will try this one...

Quote
ow do SoundEngines like 'FMOD' (= comercial; up to now was my prefered SoundEngine) then implement WMA ?
Do they pay licenses ¿
Isn't there really anything like 'mpg123' resp. 'LibSndFile' only to decode WMA ?

Hum, im not a lawyer... I do not know.  :-[
But i do not want any license-problems, uos and all members must be modifiedLGPL.

Quote
Some more Ideas for UOS: RMS, Log, BeatDetection, DistortionDetection, ...

BeatDetection => mostly done.

RMS, Log, DistortionDetection => What's that   :-X

Quote
May be UOS-CodeErrors:
see: UOS-FilterPlayer -> 'TForm1.TrackBar1Change()' (= EQLow):
                         gain := 1 + ((100 - TrackBar1.Position) / 20) // Should be 25 like EQMid and EQHi ???

OK, i will check it.

Quote
I'm not so much interested in the UOS-Interface; I'm more interested in its Core - and its improvement.

OK, so for you it will be easier to use the new "root uos", like in example SimplePlayer_noflat.

Many thanks for attention.

Fred

[EDIT]
Quote
Quote

    > What's about UOS and higher SampleRates than 48000Hz, like 88200Hz or 96000Hz ?
       ( At least on my PC (WinXP SP3), UOS works only up to 48000Hz. )


Hum, uos does it. Try "Simple Player" with a 96 k file, it works.
Code: [Select]

 InIndex := uos_AddFromFile(PlayerIndex1, pchar(Edit1.Text), -1, samformat, -1);
uos_AddIntoDevOut(PlayerIndex1, -1, -1, uos_InputGetSampleRate(PlayerIndex1, InIndex), -1, samformat, -1);
Hum, what about exotic samplerates (96k,...) ? Does it works ?
 
« Last Edit: March 18, 2014, 05:27:10 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

metis

  • Sr. Member
  • ****
  • Posts: 302
Re: uos and uoslib version 1.0 is here
« Reply #10 on: March 20, 2014, 03:40:08 pm »
Hi Fred,

Quote
Ooops, that is a big one ! Hum, what about the new one i uploaded in GitHub ?
The 'LibPortaudio-32.dll' delivered with Your last UOS-Release (101KB) does not work with my WinXP SP3 neither;
On AppStart it raises Error: 'EntryPoint "GetTickCount64" not found.'

Quote
RMS, Log, DistortionDetection => What's that ?
RMS = RootMeanSquare: Finally always the POWER, not the Max. is displayed in VolLevels.
Log = Logarithmic: Volumes and VoLevels are not only set resp. shown LINEARLY, like UOS does.
Distortion = If the Amplitude is too high, any WaveForm turns to Square - this is the dead for every Loudspeaker.

Quote
OK, so for you it will be easier to use the new "root uos", like in example SimplePlayer_noflat.
Don't worry too much about the Interface.

metis (formerly altasam)
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #11 on: March 20, 2014, 08:50:47 pm »
Quote
The 'LibPortaudio-32.dll' delivered with Your last UOS-Release (101KB) does not work with my WinXP SP3 neither;
On AppStart it raises Error: 'EntryPoint "GetTickCount64" not found.'

Maybe that site is good for you...  ;)

=> https://github.com/adfernandes/precompiled-portaudio-windows

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

metis

  • Sr. Member
  • ****
  • Posts: 302
Re: uos and uoslib version 1.0 is here
« Reply #12 on: April 04, 2014, 02:32:40 pm »
Hi Fred,

Quote
"Maybe that site is good for you..."
"...\portaudio-r1891-build\lib\Win32\ReleaseMinDependency\portaudio_x86.dll" (253KB)
works fine on my System (WinXP SP3) - Thanks.   :)

metis (formerly altasam)
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

zeljko

  • Hero Member
  • *****
  • Posts: 1820
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: uos and uoslib version 1.0 is here
« Reply #13 on: April 04, 2014, 03:21:19 pm »
How do SoundEngines like 'FMOD' (= comercial; up to now was my prefered SoundEngine) then implement WMA ?
I'm using fmod, never tried SoundEngines. Why do you prefer SoundEngines over fmod (except that fmod is commercial) ?

Fred vS

  • Hero Member
  • *****
  • Posts: 3735
    • StrumPract is the musicians best friend
Re: uos and uoslib version 1.0 is here
« Reply #14 on: April 04, 2014, 08:51:41 pm »
Quote
Hi Fred,

Quote

    "Maybe that site is good for you..."

"...\portaudio-r1891-build\lib\Win32\ReleaseMinDependency\portaudio_x86.dll" (253KB)
works fine on my System (WinXP SP3) - Thanks.   :)

Ok, super, i will give this one in uos package.  ;D

Many thanks to test it.

Fred
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