Skip to main content
↑
↓
Spherical forums
Community for the
Sphere game engine
New?
Contact Us
to register an account!
1 Hour
1 Day
1 Week
1 Month
Forever
Community
Help
Search
Recent Posts
Log in
Contact Us
News
Spherical
Facebook
-
Twitter
-
Discord chat
New?
Contact us
to register an account!
Sphere Development
Sphere General
What is SFXR?
1
Print
Topic: What is SFXR?
(Read 9648 times)
previous topic
-
next topic
0 Members and 1 Guest are viewing this topic.
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
What is SFXR?
May 23, 2017, 12:18:47 pm
While reviewing the Sphere 1.x docs I came across a bunch of sound-related functions with "SFXR" in their names. What are these functions for? Some sort of DSP filter system?
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
Rhuan
High Poster
Posts: 384
Logged
Re: What is SFXR?
Reply #1
–
May 23, 2017, 12:51:33 pm
I thought SFXR was 1.6 - I have an api.txt with it in but it's not in the one that comes with 1.5 if you download it now.
It was an interface for generating sounds by fiddling with some parameters - I never used it and no longer have a working version of 1.6 so can't comment further.
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
Re: What is SFXR?
Reply #2
–
May 23, 2017, 01:34:12 pm
Yeah, I knew it was 1.6, I was looking at the api.txt in the git repo. I just wondered what it was.
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
DaVince
Legendary Poster
Posts: 1,001
Logged
Administrator
Used Sphere for, like, half my life
Re: What is SFXR?
Reply #3
–
May 24, 2017, 07:01:16 am
What Rhuan said - basically, a sound generator. I never use it myself because the sounds that come out of it tend to be very similar and overused in indie games.
Spherical Downloads Repo
||
My (really old) Sphere stuff
Eggbertx
High Poster
Posts: 352
Logged
Re: What is SFXR?
Reply #4
–
May 24, 2017, 11:57:20 am
I was looking at that as well. It would bw nice to see some of its required functions implemented in miniSphere.
My GitHub
QtSphere IDE, (eventually) the one Sphere IDE to rule them all
N E O
Hero Poster
Posts: 585
Making it happen!
Logged
Administrator
Senior Administrator
Re: What is SFXR?
Reply #5
–
September 20, 2018, 12:47:04 am
I'm late to the party here, but yea SFXR is for audio generation. In the future I would certainly like to see more generalized audio generation functions akin to the Web Audio API, but no skin off our backs if Sphere doesn't officially implement it.
FBnil
Low Poster
Posts: 89
Sphere on Pandora or burst!
Logged
Re: What is SFXR?
Reply #6
–
December 31, 2018, 08:25:50 pm
Sorry for the lateness:
I took the code (with the blessings of the author) from
http://www.drpetter.se/project_sfxr.html
And wrote an API for it for Sphere 1.6.
It was working, stable and tested.
There was a demo games/sfxr.zip and some unittests for it games/auto_test/scripts/test_sfxr.js
Are those resources needed?
If so, where can I upload them?
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
Re: What is SFXR?
Reply #7
–
January 02, 2019, 12:01:43 am
I think at this point, now that we're using ChakraCore instead of Duktape, I would probably want to implement something like this in JavaScript, on top of
SoundStream
, rather than bloating the Core API with what is really high-level functionality. Then it would even work in Oozaru (which also implements SoundStream) without further code changes.
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
FBnil
Low Poster
Posts: 89
Sphere on Pandora or burst!
Logged
Re: What is SFXR?
Reply #8
–
January 27, 2019, 07:43:19 am
Wow, I have not looked into SoundStream, but that sounds rad!
whoa, a whole re-implementation like that! Lot's of code, man!
https://github.com/fatcerberus/sphere-mp3/blob/master/lib/mp3.js
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
Re: What is SFXR?
Reply #9
–
January 27, 2019, 11:40:23 pm
I didn't write that mp3 decoder, that was from this project:
https://github.com/audiocogs/mp3.js
SoundStream itself is really simple to use, you just specify your sample rate and feed it raw PCM audio. Here's the API:
https://github.com/fatcerberus/minisphere/blob/master/docs/sphere2-core-api.txt#L2012-L2062
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
1
Print
Sphere Development
Sphere General
What is SFXR?