Sound (description)

General discussion for topics related to the FreeBASIC project or its community.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: Sound (description)

Post by VANYA »

@coderJeff

It looks like you returned to us :) Therefore, I bring up this topic.

The sfx (sound) library was recently described in the wiki: https://www.freebasic.net/wiki/ExtLibsfx .
I want to ask you: add the files (* .a and .bi) of this library in the office. compiler delivery.
I am not asking to change the compiler, but simply to add these files.
This will hardly increase the size of the supply, but it will be very convenient to use.
Tonigau
Posts: 36
Joined: Feb 25, 2021 20:19

Re: Sound (description)

Post by Tonigau »

It would be good to have it included in release, its an easy to use lib.
Now if only it could record as well, this would be the cream on the pudding.!
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Sound (description)

Post by BasicCoder2 »

@VANYA
Library is cross-platform and comes for Windows, Linux, Dos
Author: angros47
Download link: https://sourceforge.net/projects/freeba ... ary/files/

Compile Library:
all the necessary scripts are in the archive, you just need to substitute the correct path to the compiler in them
And how do you "substitute the correct path to the compiler"?

Command executed:
"C:\FreeBasic\fbc.exe" "C:\Users\BasicCoder2\Downloads\sfx\sfx\wave.bi"

Compiler output:
error 81: Invalid command-line option, "C:\Users\BasicCoder2\Downloads\sfx\sfx\wave.bi"

Results:
Compilation failed

System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win32 (32bit)
OS: Windows NT 6.2 (build 9200)
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Sound (description)

Post by badidea »

BasicCoder2 wrote:And how do you "substitute the correct path to the compiler"?
What are you doing?
The script for Windows is 'buildwindows.bat'. Its contents is:

Code: Select all

..\fbc test.bas midievent.bas wave.bas SoundFunction.bas playtomidi.bas writemidi.bas writewav.bas sequencer.bas .\windows\dsp.bas .\windows\midi.bas .\windows\seqthread.bas
So change ..\fbc to C:\FreeBasic\fbc.exe (if that is where your freebasic compiler is)
Add 'pause' to the script so you can see what happens.
Run buildwindows.bat (always review the contents of a .bat [downloaded from the internet] before you run it)

Code: Select all

C:\FreeBasic\fbc.exe test.bas midievent.bas wave.bas SoundFunction.bas playtomidi.bas writemidi.bas writewav.bas sequencer.bas .\windows\dsp.bas .\windows\midi.bas .\windows\seqthread.bas
pause
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Sound (description)

Post by BasicCoder2 »

@badidea
What are you doing?
I downloaded and unzipped and tried the .bas examples.

So this is not a beginner addition to FreeBASIC like installing a library in Python.
You have to know about scripts and "build" and all that stuff?

I do remember when trying to program with C++ where in the C++ ide I had to "build" before I could "run" and everything was in a "workspace" and so on. I assume "build" or maybe "build all" was linking all the scattered bits and pieces in the workspace (a common folder?) into something that could be compiled.

In the Processing language all you do is Sketch->Import Library->Serial
and then in your code add
Serial myPort; // Create object from Serial class

much simpler.

Problem is, I began coding on the old machines that simply fired up with a BASIC interpreter and you just typed stuff in and away it went!

I noticed that some of the files had the tilde character at the end of their names, readMe.txt~ any reason for that?

Anyway thanks for the input. I will just have to mess about with your suggestions and see what happens.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Sound (description)

Post by badidea »

BasicCoder2 wrote:I downloaded and unzipped and tried the .bas examples.
You downloaded the not yet compiled libary. 'wave.bas' or 'wave.bi' are not examples, they are part of the library.
I don't think there are examples in the download.
(I did not check the lastest sfx download, I have a somewhat older version it seems)
BasicCoder2 wrote:So this is not a beginner addition to FreeBASIC like installing a library in Python.
You have to know about scripts and "build" and all that stuff?
That is why we hope that coderJeff will include it in the freebasic distribution. So that even the biggest noob beginner can use sound in freebasic.
BasicCoder2 wrote:I noticed that some of the files had the tilde character at the end of their names, readMe.txt~ any reason for that?
I think that they are 'backup' copies. Some plain text editors make them.
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: Sound (description)

Post by angros47 »

Yes, I can confirm they were backup copies (created by the text editor "gedit" on linux)
Post Reply