(shouting)

LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

The second SMBX collab!

Do you like this idea with using of SDL Mixer?

Yes, I like it!
11
92%
No, I don't like this thing.
1
8%
I have another opinion...
0
No votes
 
Total votes: 12

User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

WestonSmith wrote:Not sure if this is being worked on still, but curious if the ability to change sounds on a per level basis was ever implemented (or is it still per world)?
Per-level is not implemented yet, but will be implemented in the near future (now I have some important works and will be completely free after 23-24 june)
User avatar
WestonSmith
Bunny
Posts: 191
Joined: 11 years ago

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by WestonSmith »

Been a while since I checked in. Has the ability to change SFX on a per level basis been implemented yet? Now that A2XT submissions are opened, I'd like to make some SFX changes before submitting anything.
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

You can do that with LunaLua I believe.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

XerX wrote:You can do that with LunaLua I believe.
What he means is changing the sound of a built in sound effect (say, smash.ogg) on a per-level basis. I'd actually like to know this too.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

SAJewers wrote:
XerX wrote:You can do that with LunaLua I believe.
What he means is changing the sound of a built in sound effect (say, smash.ogg) on a per-level basis. I'd actually like to know this too.
Yeah. You can do that with LunaLua.

You make a new text file called "sounds.ini" in your level folder and "overwrite" sounds with it.

An example would be my file here.

Code: Select all

[sound-4]
name="Block Smashed"
file="Sounds/block_smash.ogg"

[sound-5]
name="Shrink"
file="Sounds/powerdown.ogg"

[sound-6]
name="Grow"
file="Sounds/powerup.ogg"

[sound-12]
name="Got Item"
file="Sounds/powerup.ogg"

[sound-37]
name="Thwomp"
file="Sounds/thwomp.ogg"

[sound-46]
name="Door"
file="Sounds/door.ogg"
The sound files are in a folder called "Sounds" which is inside my level folder. LunaLua comes with a default sounds.ini in the root the SMBX directory, and you can use that as a template.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

That doesn't seem to work for me?
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

Are you using LunaLua or LunaDLL? It should be LunaLua.
What version of LunaLua? ( I usually assume people are using the newest. )
Do you have sound files to use?
Are you loading them from the correct directory?
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

The latest version of LunaLua (according to the title screen, V0.7.1.0 beta). Correct file names, root level folder. Just getting the default SFX.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

Did you reload SMBX? The changes won't take place unless you do, sadly.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

Yep, reloaded SMBX.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

Maybe I'm wrong then. :/
User avatar
Rednaxela
Maker of Shenanigans
Posts: 897
Joined: 10 years ago
Pronouns: they/them
https://rednaxela.talkhaus.com

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Rednaxela »

XerX wrote:You make a new text file called "sounds.ini" in your level folder and "overwrite" sounds with it.
Actually, LunaDLL doesn't currently do this for level folders, only for episode folders.
This can probably be easily changed though.
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

Rednaxela wrote:
XerX wrote:You make a new text file called "sounds.ini" in your level folder and "overwrite" sounds with it.
Actually, LunaDLL doesn't currently do this for level folders, only for episode folders.
This can probably be easily changed though.
I think, I will go via lua API way to allow per-level SFX customization: I will add functions loadSFXid(soundID, soundFile) and loadMusicID(musicID, musicFile), or you still wanna have to use INI file instead? INI file blending is simple (I can load episode INI file and then overwirte episode specific with a some level specific if presented).
User avatar
Hoeloe
A2XT person
Posts: 1022
Joined: 12 years ago
Pronouns: she/her
Location: Spaaace

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Hoeloe »

Wohlstand wrote:
Rednaxela wrote:
XerX wrote:You make a new text file called "sounds.ini" in your level folder and "overwrite" sounds with it.
Actually, LunaDLL doesn't currently do this for level folders, only for episode folders.
This can probably be easily changed though.
I think, I will go via lua API way to allow per-level SFX customization: I will add functions loadSFXid(soundID, soundFile) and loadMusicID(musicID, musicFile), or you still wanna have to use INI file instead? INI file blending is simple (I can load episode INI file and then overwirte episode specific with a some level specific if presented).
INI file is probably more sensible since it's just a configuration, and it's already done that way on an episode basis.
Image
Image
Image
Image
Image
XerX
Untalented Pleb
Posts: 91
Joined: 9 years ago
First name: Colton
Pronouns: he/him/his
Location: Canada

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by XerX »

I personally prefer using the ini files.
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

It's no been released officially yet, but Game Music EMU Support was just added, allowing for more than just SPC:




Only limitation is that formats like GBS/HES/NSF don't have tagging capabilities, so you're gonna have to manually supply that in lunadll.lua. I'm sure Wholstead will have more info when he officially releases it. If anyone wants to use retro video game music in an A2MT feel free to make use of this; I probably will (outside of nintendo-published games, they shouldn't be ht with ContentID claims).

(also someone help me make this shooter level a thing)
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
WestonSmith
Bunny
Posts: 191
Joined: 11 years ago

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by WestonSmith »

Just checking in again. Any word on per level SFX swaps?

KLUVYOUBYE!
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

WestonSmith wrote:Just checking in again. Any word on per level SFX swaps?

KLUVYOUBYE!
Just now!
LunaLUA v.0.7.2 finally has this thing!
User avatar
SAJewers
ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
Posts: 4219
Joined: 12 years ago
Location: Nova Scotia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by SAJewers »

What's the status on grabbing the IDv3 Artist/Album tags? Would love to get working on the music cheat code soon.
ImageImageImageImageImage | Image | Image
Sharenite | RetroAchievements | NameMC | IGDB
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

SAJewers wrote:What's the status on grabbing the IDv3 Artist/Album tags? Would love to get working on the music cheat code soon.
I already have two LunaLUA functions to take possible music tag from OGG, FLAC, MP3, ANY-TRACKER (MOD, IT, XM, STM, etc.), GME(SPC,VGM,etc.):
Audio.MusicTitle() --returns tag if possible, otherwise returns filename if tag is empty or impossible to grab tag for this music format
Audio.MusicTitleTag() --returns tag if possible or returns empty string if empty tag or impossible to grab tag for this music format
EDIT: Album/Artist: Ouch, forgot about that. Anyway is possible to add that fast, and I will do that today/tomorrow. But I will ask Kevin reupload LunaLUA build because SDL Mixer's API will be changes with adding of new functions, and that are requires to add bindings into the LunaLUA side.

Since I implemented music tag returning into SDL Mixer side and successfully tested on the PGE Engine, I sent updated SDL Mixer to LunaLUA repo and I was added required binds into LunaLUA.

Recent time ago Kevin helped me to find libsoxr, the audio resample library, which I wish to use with SDL Mixer to resolve sample rate shit (and "required" (because non-44100 hz audio plays terrible and dirty) will be changed to "recommended" to sample your files into 44100hz, because real-time resampling is a hard for CPU process which may cause lag of audiostream (appearing of holes between audio chunks))
User avatar
WestonSmith
Bunny
Posts: 191
Joined: 11 years ago

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by WestonSmith »

Wohlstand wrote:
WestonSmith wrote:Just checking in again. Any word on per level SFX swaps?

KLUVYOUBYE!
Just now!
LunaLUA v.0.7.2 finally has this thing!
You're the greatest person to have ever personed.
User avatar
WestonSmith
Bunny
Posts: 191
Joined: 11 years ago

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by WestonSmith »

Actually, how does per level .ini work? I tried placing the sounds.ini file within the level folder alongside the .ogg files, but I wasn't having much luck.
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

WestonSmith wrote:Actually, how does per level .ini work? I tried placing the sounds.ini file within the level folder alongside the .ogg files, but I wasn't having much luck.
You must associate your INI sections with right soundID's: http://engine.wohlnet.ru/pgewiki/SMBX64 ... fects_list
All paths inside INI file are relative to that folder where you placed it (episode folder or custom folder. Level custom folder has priority over episode folder).
If you wish replace some sound, make blank file and write settings yourself:
(make a key sound-* with necessary ID taken from that sound list)

Code: Select all

;first sound
[sound-2]
file="mysound1.ogg"

;second sound
[sound-56]
file="kaboom!.ogg"
;etc...
User avatar
Imaynotbehere4long
Gone, but...yeah, pretty much forgotten.
Posts: 289
Joined: 8 years ago

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Imaynotbehere4long »

I should go ahead and ask this before I forget:

How do I make OGGs loop to a point after the beginning of the song? SAJewers won't accept my level until I do that, but he doesn't know how to do it, either.
My SMBX portfolio:
Image
(includes a Sonic 3D Blast styled level.)

SOMEONE ANSWER MY CRY FOR HELP: http://www.supermariobrosx.org/forums/v ... =69&t=2026
User avatar
Wohlstand
Moondust and TheXTech developer
Posts: 186
Joined: 10 years ago
First name: Vitaly
Pronouns: he/him/his
Location: Moscow, Russia

Re: LunaDLL+SDL2_Mixer = FLAC,OGG,MOD,XM,IT, etc.

Post by Wohlstand »

Imaynotbehere4long wrote:I should go ahead and ask this before I forget:

How do I make OGGs loop to a point after the beginning of the song? SAJewers won't accept my level until I do that, but he doesn't know how to do it, either.
I wrote how to in my youtube video info where I tested out that loop.
It's simple and easy:
You would to have Audacity (I don't recommend you to use same ogg file, and if possible, open in Audacity the source file (flac, wav, or even dumb mp3). That will give best chance to don't purge quality on secondary compression)
When you opened your audio file, find in the bottom the selection meter, toggle it into "samples" units. Then set selection to your loop zone. When you will calibrate it you can hold shift and press play to loop selection. Be sure than waves at begib and at end are same or similar to escape appearence of clicks. If you have multiple repeats inside your track - remove them and keep alone and then set selection to your loop zone.
Next step: open "File -> edit metatags"
Find in a list of tags the empty fields, double click to title and set "LOOPSTART". Then double click value and type number of selection begin.
Do same with "LOOPEND", But with end sanples value. (LOOPLENGTH will work too, but instead of loop end samples the length between begin and end.)
Be careful, you must keep even two samples after loop end or loop will not work.
When you seted up a tags, do export into flac (optionally as backup) and then export into ogg format. Then try to play just-saved music file via PGE (or I would send a mini player based on SDL Mixer which I use to offline test of musics. That player available in PGE's repo in the _Misc/SdlMusPlayer)
Post Reply