Audio library for FreeBasic - Features
Re: Audio library for FreeBasic - Features
Which version of Ubuntu do you have?
Re: Audio library for FreeBasic - Features
I tried with Lubuntu-22.04-amd64 and LinuxMint-21-xfce-64bit in VirtualBox.
Both can play wav-files only. Do you know a distribution without such frustrating problems?
Both can play wav-files only. Do you know a distribution without such frustrating problems?
Re: Audio library for FreeBasic - Features
Lubuntu can play wave files with VLC media player. It cannot play midi files, so I installed timidity.
In Lubuntu I installed Ubuntu Studio: https://ubuntustudio.org/ubuntu-studio-installer/
It's a crowbar but now the sound feature of sfx works, as good as in Windows.
I do not need all the programs installed with Ubuntu Studio. The question is, how can I get sfx to work in Linux.
The midi feature has no sound in Linux yet.
In Lubuntu I installed Ubuntu Studio: https://ubuntustudio.org/ubuntu-studio-installer/
It's a crowbar but now the sound feature of sfx works, as good as in Windows.
I do not need all the programs installed with Ubuntu Studio. The question is, how can I get sfx to work in Linux.
The midi feature has no sound in Linux yet.
Re: Audio library for FreeBasic - Features
Does the command " pacat /dev/random" produce any sound? (it should produce white noise)
Re: Audio library for FreeBasic - Features
In a fresh Lubuntu, without Ubuntu Studio:
Yes, I hear noise.
Yes, I hear noise.
Re: Audio library for FreeBasic - Features
Is libasound installed?
If not, try installing it with:
Then try running the examples compiled with FreeBasic again
If not, try installing it with:
Code: Select all
sudo apt-get install libasound2
Re: Audio library for FreeBasic - Features
libasound is installed:
libasound2 is already the newest version (1.2.6.1-1ubuntu1).
libasound2 is already the newest version (1.2.6.1-1ubuntu1).
Re: Audio library for FreeBasic - Features
What happens if you use padsp to launch your program? Does audio work?
Re: Audio library for FreeBasic - Features
No, padsp makes no sound.
I tried ...
padsp executable
padsp ./executable
padsp -n ./executable
padsp -m ./executable
I tried ...
padsp executable
padsp ./executable
padsp -n ./executable
padsp -m ./executable
Re: Audio library for FreeBasic - Features
Try to force OSS with the command, in your program
SoundControl 103,"OSS"
before any use of SoundSet
Then load your program with padsp
SoundControl 103,"OSS"
before any use of SoundSet
Then load your program with padsp
Re: Audio library for FreeBasic - Features
SoundControl 103,"OSS" has no effect. Thanks anyway.
Maybe it's a problem of Lubuntu in VirtualBox:
Installing carla-bridge-win64 helps.
Either with 'Muon Package Manager' or with 'sudo apt-get install carla-bridge-win64'.
The sound feature works good now.
The midi feature works, but not good.
With 'Ubuntu Studio' the midi feature works good. I do not know why, but it's enough now. Thank you for your help.
Maybe it's a problem of Lubuntu in VirtualBox:
Installing carla-bridge-win64 helps.
Either with 'Muon Package Manager' or with 'sudo apt-get install carla-bridge-win64'.
The sound feature works good now.
The midi feature works, but not good.
With 'Ubuntu Studio' the midi feature works good. I do not know why, but it's enough now. Thank you for your help.
Re: Audio library for FreeBasic - Features
I am glad to hear.
What do you mean that the midi works, but not good?
What do you mean that the midi works, but not good?
Re: Audio library for FreeBasic - Features
The sound of the midi part of sfx is mostly distorted at the beginning and then sometimes it get's clear. It behaves differently.
When Ubuntu Studio is installed, sfx works. So it is not a problem of sfx. Perhaps I have to install something else.
When Ubuntu Studio is installed, sfx works. So it is not a problem of sfx. Perhaps I have to install something else.
Re: Audio library for FreeBasic - Features
That is a known issue, on some distributions of Linux. It is caused by the calibration of the soft synthesizer included in my library. It occurs when no MIDI device is detected, neither hardware, nor software (that is the most common situation on a Linux installation, if Timidity is not installed). To be able to use MIDI features anyway, the sfx library includes a soft synthesizer. Such a synthesizer is activated only when a MIDI command is sent, so it starts working when you start playing a music, and it works by synthesizing the sound on the fly and sending it to the PCM output. The output of the synthesizer is queued, but the synthesizer tries to keep the queue as short as possible (otherwise, the sound would lag). On the other hand, if the queue is too short a buffer underrun would happen, and that would cause distortions, and stuttering sounds. The library tries to set the correct length for the queue, using a trial-and-error approach, and this means that at the beginning some buffer underruns may occur (and that explains the distortion you heard)