Giter VIP home page Giter VIP logo

rfxgen's Introduction

rFXGen


A simple and easy-to-use fx sounds generator, based on the amazing Dr.Petter's sfxr.


rFXGen can be used for free as a WebAssembly online tool and it can also be downloaded as a standalone tool for Windows and Linux with some extra features. Binaries for other OSs are not released but they can be compiled from sources.


Features

  • Predefined sound presets (Coin, Shoot, Explosion, PowerUp...)
  • Multiple wave types supported (Square, Sawtooth, Sine, Noise)
  • Up to 5 sound slots to store generated sound (temporary save)
  • Load .rfx files with sound generation parameters
  • Save .rfx files with sound generation parameters (104 bytes only)
  • Export wave data as .wav, .raw data or .h code file (byte array)
  • Configurable sample-rate, bits-per-sample and channels on export
  • Multiple GUI styles with support for custom ones (.rgs)
  • Command-line support for .rfx to .wav batch conversion
  • Command-line audio player for .wav, .ogg, .mp3 and .flac
  • Completely portable (single-file, no-dependencies)
  • Free and open-source

Screenshot

rFXGen Cyber UI style

Basic Usage

Open the tools and use the buttons to generate random sounds. Use the sliders to customize sound parameters. Sounds could be saved as .rfx (sound generation parameters) and also exported to .wav, .raw (samples data) and .h (byte array code file).

rFXGen Standalone comes with command-line support for batch conversion and audio playing. For usage help:

rfxgen.exe --help

License

rFXGen source code is distributed as open source, licensed under an unmodified zlib/libpng license.

rFXGen binaries are completely free for anyone willing to compile it directly from source.

rFXGen Standalone desktop tool is distributed as freeware.

In any case, consider some donation to help the author keep working on software for games development.

Copyright (c) 2015-2024 raylib technologies (@raylibtech) / Ramon Santamaria (@raysan5)

rfxgen's People

Contributors

eldskald avatar gulrak avatar not-nik avatar raysan5 avatar robloach avatar superzazu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rfxgen's Issues

[File System] Case sensitivity in file names

rfxGen only import files with lower case file extensions. But in Windows (and MacOS), file names are usually treated in a case insensitive manner.

I'd recommend replacing instances like strcmp(GetExtension(fileName),"rfx") == 0 with IsFileExtension(fileName, "rfx") and update IsFileExtension to perform a case insensitive comparison on Windows.

implicit declaration of function 'tinyfd_saveFileDialog' is invalid in C99 when compiling from source on macos

Following this answer here I compiled the source on my mac, but it gives the follow error

In file included from rfxgen.c:98:
./gui_file_dialogs.h:141:42: error: implicit declaration of function 'tinyfd_openFileDialog' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        case DIALOG_OPEN: tempFileName = tinyfd_openFileDialog(title, fileName, filterCount, filterSplit, message, 0); break;
                                         ^
./gui_file_dialogs.h:141:40: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
        case DIALOG_OPEN: tempFileName = tinyfd_openFileDialog(title, fileName, filterCount, filterSplit, message, 0); break;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gui_file_dialogs.h:142:42: error: implicit declaration of function 'tinyfd_saveFileDialog' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        case DIALOG_SAVE: tempFileName = tinyfd_saveFileDialog(title, fileName, filterCount, filterSplit, message); break;
                                         ^
./gui_file_dialogs.h:142:42: note: did you mean 'tinyfd_openFileDialog'?
./gui_file_dialogs.h:141:42: note: 'tinyfd_openFileDialog' declared here
        case DIALOG_OPEN: tempFileName = tinyfd_openFileDialog(title, fileName, filterCount, filterSplit, message, 0); break;
                                         ^
./gui_file_dialogs.h:142:40: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
        case DIALOG_SAVE: tempFileName = tinyfd_saveFileDialog(title, fileName, filterCount, filterSplit, message); break;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gui_file_dialogs.h:143:39: error: implicit declaration of function 'tinyfd_messageBox' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        case DIALOG_MESSAGE: result = tinyfd_messageBox(title, message, "ok", "info", 0); break;
                                      ^
./gui_file_dialogs.h:144:47: error: implicit declaration of function 'tinyfd_inputBox' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        case DIALOG_TEXTINPUT: tempFileName = tinyfd_inputBox(title, message, ""); break;
                                              ^
./gui_file_dialogs.h:144:45: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
        case DIALOG_TEXTINPUT: tempFileName = tinyfd_inputBox(title, message, ""); break;
        

What I actually ran

clang -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL /usr/local/Cellar/raylib/3.5.0/lib/libraylib.a -std=c99 -I/opt/raylib/src -I../../raygui/src/ rfxgen.c external/tinyfiledialogs.c -o rfxgen

Can't save sfx files

On Windows 10, when using the version downloaded from itch.io .

I've been saving a lot of files, but when I wanted to load none of them was there :-( .

Error while building on Linux

Hi,

When trying to build the new version v3.1 on linux, I get this error:

/usr/bin/ld: /tmp/user/0/ccg9Nw8T.o: in function `GuiTextBoxMulti':
rfxgen.c:(.text+0x5350): undefined reference to `GetCodepointNext'
/usr/bin/ld: /tmp/user/0/ccg9Nw8T.o: in function `GetTextWidth':
rfxgen.c:(.text+0xbab7): undefined reference to `GetCodepointNext'
/usr/bin/ld: /tmp/user/0/ccg9Nw8T.o: in function `GuiDrawText':
rfxgen.c:(.text+0xc5dc): undefined reference to `GetCodepointNext'
collect2: error: ld returned 1 exit status

I build it using this oneliner from one of the previous issues:
gcc -o rfxgen rfxgen.c external/tinyfiledialogs.c -s -Iexternal -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -L../raylib/release/libs/linux -std=c99 -no-pie -D_DEFAULT_SOURCE

Although, raylib is already installed, so any ideas ?

Root cause of sound effect difference between rfxgen and sfxr?

I spent some time comparing sfxr and rfxgen sound parameters and they seem to be exactly the same. In the application the sliders appear in the correct position as well. This is not related to loading or saving either.

So if it's not the parameters or loading being incorrect then what causes the laser and hit sounds to be very different? The other ones work the same so it's really strange to me.

Doesn't sound and crashes after unpligging the headphones

On Windows 10, when using the version downloaded from itch.io .

When I unplug the headphones, the OS automatically selects my screen speakers as the audio output device. RFXGen is still working, but not a sound will play.

If I try to close the application then, it will freeze, forcing me to kill it from the Task Manager.

Trying to export a .wav without the extension doesn't save anything

rFXGen v2.1

Ideally if I type in a file name without the .wav (but .wav is selected as the filetype), it should add .wav to it and save it. As it is right now, it just doesn't save anything, which is annoying if I'm trying to quickly open and export a bunch of files.

Black screen when opened on Linux

OS: Arch 64 bit
When I run rfxgen empty black window appears.
Tested on following versions:

  • c132ff build from source with raylib built from master (61e0e4 commit)
  • Itch.io builds (both dark and light theme

I tested both options with Intel graphics as well as primusun (Nvidia GPU)

Windows build works via Wine. I tried to run few Raylib examples, they work fine.

cli output:

./rfxgen_dark                                                                                                       pon, 19 mar 2018, 15:00:49
INFO: Initializing raylib (v1.9.6-dev)
INFO: Display device initialized successfully
INFO: Display size: 1600 x 900
INFO: Render size: 500 x 500
INFO: Screen size: 500 x 500
INFO: Viewport offsets: 0, 0
INFO: GLAD: OpenGL extensions loaded successfully
INFO: OpenGL 3.3 Core profile supported
INFO: GPU: Vendor:   Intel Open Source Technology Center
INFO: GPU: Renderer: Mesa DRI Intel(R) Ivybridge Mobile 
INFO: GPU: Version:  4.2 (Core Profile) Mesa 17.3.6
INFO: GPU: GLSL:     4.20
INFO: Number of supported extensions: 175
INFO: [EXTENSION] DXT compressed textures supported
INFO: [EXTENSION] ETC2/EAC compressed textures supported
INFO: [EXTENSION] Anisotropic textures filtering supported (max: 16X)
INFO: [TEX ID 1] Texture created successfully (1x1 - 1 mipmaps)
INFO: [TEX ID 1] Base white texture loaded successfully
INFO: [SHDR ID 1] Shader compiled successfully
INFO: [SHDR ID 2] Shader compiled successfully
INFO: [SHDR ID 3] Shader program loaded successfully
INFO: [SHDR ID 3] Default shader loaded successfully
INFO: [CPU] Default buffers initialized successfully (lines, triangles, quads)
INFO: [VAO ID 1] Default buffers VAO initialized successfully (lines)
INFO: [VAO ID 2] Default buffers VAO initialized successfully (triangles)
INFO: [VAO ID 3] Default buffers VAO initialized successfully (quads)
INFO: OpenGL default states initialized successfully
INFO: [TEX ID 2] Texture created successfully (128x128 - 1 mipmaps)
INFO: [TEX ID 2] Default font loaded successfully

Screenshot:
zrzut ekranu z 2018-03-19 15-00-56

Exports WAV files without extension.

On Windows 10, when using the version downloaded from itch.io .

I've exported two WAV files so far, but both had no extension, and thus the OS wouldn't play them.

After renaming and adding the .wav extension, files worked properly.

Segmentation fault when trying to export wave

I tried doing the same thing with the GUI version of rfxgen, but it was not working either.

Compilation line (GCC 9.3.0):

gcc -o rfxgen-c rfxgen.c external/tinyfiledialogs.c -g -Iexternal -no-pie -D_DEFAULT_SOURCE
-lraylib -lGL -lm -lpthread -ldl -lrt -lX11

Terminal output:

guest-cny2jf@h30646:~/다운로드$ uname -a
Linux h30646 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

guest-cny2jf@h30646:~/다운로드$ ls
input_ex.rfx rfxgen-c

guest-cny2jf@h30646:~/다운로드$ ./rfxgen-c -i input_ex.rfx -o result.wav

Input file:       input_ex.rfx
Output file:      result.wav
Output format:    44100 Hz, 16 bits, Mono

Segmentation fault (core dumped)

guest-cny2jf@h30646:~/다운로드$ gdb rfxgen-c

...

(gdb) run -i input_ex.rfx -o result.wav
Starting program: /tmp/guest-cny2jf/다운로드/rfxgen-c -i input_ex.rfx -o result.wav
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Input file:       input_ex.rfx
Output file:      result.wav
Output format:    44100 Hz, 16 bits, Mono


Program received signal SIGSEGV, Segmentation fault.
__memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:308
308     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) bt
#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:308
#1  0x0000000000499448 in drwav.on_write_memory ()
#2  0x00000000004956ed in drwav_init_write.internal ()
#3  0x000000000049cade in drwav_init_memory_write.internal ()
#4  0x00000000004c2bd4 in drwav_init_memory_write ()
#5  0x00000000004c5cf9 in SaveWAV ()
#6  0x00000000004cb998 in ExportWave ()
#7  0x0000000000416630 in ProcessCommandLine (argc=5, argv=0x7fffffffde88) at rfxgen.c:1047
#8  0x0000000000415865 in main (argc=5, argv=0x7fffffffde88) at rfxgen.c:246
(gdb) quit
A debugging session is active.

        Inferior 1 [process 19361] will be killed.

Quit anyway? (y or n) y

guest-cny2jf@h30646:~/다운로드$ 

App crashs if you click in Export .Wav and then cancel

Open the app, click in "Export .Wav", and then cancel. It will crash.

Tested in linux, compiled from the source, and also from wine. Wine is not the best source to test, but the rest of app works well in both linux native and wine.

I don't know much about makefiles, but I took the makefile to compile the template advance_game (in raylib), and changed the part to compile the screens to compile the tinyfiledialogs, and worked.

Keybinds for switching save slots?

Are more features planned for this? Shortcuts for save slots and changing between the waveforms to make them faster to use would be great. Otherwise maybe undo option?

Mutate does not refresh seed on use - causing converging behavior

Hi there!

I've used sfxr for a while, so I was surprised by the converging behavior of the "Mutate" button in rfxgen.

This can be reproduced by repeatedly pressing "Mutate".
Notice how the applied mutations are monotonic.
After a certain number of presses, the audio no longer changes.

Compare this behavior to sfxr which can mutate in either direction (and dramatically different magnitudes) and does not converge.

Random crash on macOS (arm64)

It seems there could be some issue with miniaudio (or maybe CoreAudio) on macOS Ventura (arm64).

It's a random issue that crashes the program.

Here the crash trace:

Process 5979 launched: '/Users/oskar/Desktop/rfxgen.app/Contents/MacOS/rfxgen' (arm64)
2023-09-19 20:14:21.663618+0200 rfxgen[5979:514122] [Window] Warning: Window GLFWWindow 0x1004058d0 ordered front from a non-active application and may order beneath the active application's windows.
2023-09-19 20:14:21.665867+0200 rfxgen[5979:514122] [Window] Warning: Window GLFWWindow 0x1004058d0 ordered front from a non-active application and may order beneath the active application's windows.
2023-09-19 20:14:21.701028+0200 rfxgen[5979:514122] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000204dc0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
Process 5979 stopped
* thread #8, name = 'com.apple.audio.IOThread.client', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001000a3688 rfxgen`ma_linear_resampler_process_pcm_frames_f32_upsample + 352
rfxgen`ma_linear_resampler_process_pcm_frames_f32_upsample:
->  0x1000a3688 <+352>: ldr    s2, [x12, x9]
    0x1000a368c <+356>: ldr    s3, [x22, x9]
    0x1000a3690 <+360>: fmul   s3, s1, s3
    0x1000a3694 <+364>: fmul   s2, s0, s2
(lldb) bt
* thread #8, name = 'com.apple.audio.IOThread.client', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001000a3688 rfxgen`ma_linear_resampler_process_pcm_frames_f32_upsample + 352
    frame #1: 0x0000000100075fa4 rfxgen`ma_linear_resampler_process_pcm_frames_f32 + 40
    frame #2: 0x0000000100075f38 rfxgen`ma_linear_resampler_process_pcm_frames + 56
    frame #3: 0x00000001000a390c rfxgen`ma_resampling_backend_process__linear + 32
    frame #4: 0x00000001000764a8 rfxgen`ma_resampler_process_pcm_frames + 80
    frame #5: 0x0000000100078924 rfxgen`ma_data_converter_process_pcm_frames__resample_only + 48
    frame #6: 0x0000000100078420 rfxgen`ma_data_converter_process_pcm_frames + 100
    frame #7: 0x00000001000be34c rfxgen`ReadAudioBufferFramesInMixingFormat + 224
    frame #8: 0x0000000100099f00 rfxgen`OnSendAudioDataToDevice + 224
    frame #9: 0x00000001000a2958 rfxgen`ma_device__on_data_inner + 104
    frame #10: 0x00000001000a28a8 rfxgen`ma_device__on_data + 500
    frame #11: 0x00000001000a261c rfxgen`ma_device__handle_data_callback + 280
    frame #12: 0x000000010006b030 rfxgen`ma_device__read_frames_from_client + 116
    frame #13: 0x000000010006aac0 rfxgen`ma_device_handle_backend_data_callback + 192
    frame #14: 0x00000001000a0390 rfxgen`ma_on_output__coreaudio + 200
    frame #15: 0x000000013480a59c
    frame #16: 0x00000001349065ac
    frame #17: 0x000000013480e89c
    frame #18: 0x00000001a6c8294c
    frame #19: 0x00000001a6c8088c
    frame #20: 0x00000001a6de3574
    frame #21: 0x00000001a49a7fa8
(lldb)

@mackron any idea about this issue?

Links don't work

There are two interesting links to github on the left column of RFXGen, but clicking them won't work :-( .

make the app accessible for screen readers

this app isn't accessible for screen readers(programs for blind people which read text on the screen), I really wanna use this app, but the screen reader can't read it. I don't know what gui lib this uses, and I don't have any knowledge of gui libs accessibility except in python(wxpython). As I said, I'd love to use this app, but I can't. Hope this gets fixed soon. Regards and thanks for makin this app

Zoomed in UI makes tooltips and the report issue window inaccessible

Version: rfxgen_v4.2_win_x64

Operating System: Windows 10

Description of Problem: When you click LCTRL-F to zoom in the top right buttons in the UI (Show Help Window/Show Info Window/Report an Issue) tooltips get cut out. Also when you click the
"Report an Issue" button zoomed in the window appears at the bottom right as seen in the image below and there does not seem to be a way to move the report window to the center.

2024-04-24 10_01_39-rFXGen v4 2 _ A simple and easy-to-use fx sounds generator

Building on Linux

I'd love to see some instruction how to build this on Linux. I tried but with no luck (I'm not into C/C++)

Undo/redo?

Hey,

Thanks for this awesome tool! Currently I'm trying it out, and I was wondering whether it's possible to undo/redo actions? I'm unfamiliar with the properties that can be tuned (I don't know much about sound), so I just try them out, but it's quite time consuming to remember the previous value each time, then try tuning it, and then set it back manually.

While I try to remember the original value each time, I sometimes forget. Alternatively, I could save each time I make a change, but then some sort of file versioning would be necessary, but it wouldn't be as easy as undo/redo.

App improvements

Ability to disable console in windows.
Ability to resize the window and its contents.

User interface is tiny on high dpi screens

Environment

I am using Windows 10 with resolution of 1920x1080 and 150% dpi scaling.

Expected behavior

rfxgen UI size should change depending on the selected dpi scale.

Actual behavior

rfxgen UI does not respect the selected DPI scale

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.