Sound in Krom

Will the sound ever get fixed in Krom? It has been broken for a long time.

1 Like

It’s reported here https://github.com/armory3d/armory/issues/1396, but I’m not sure if it’s an Armory issue or a Krom issue though.

I had the same problem
but it is working for me after I have updated armory SDK to 09

Did you tag the sound with ‘fake user’?

Screenshot%20from%202019-10-01%2017-55-04

Screenshot%20from%202019-10-01%2018-02-11

edit: only *.wav worked for me

No!
What does it do?:thinking:

Forces the data-block to be linked in Blender, somehow, activating it solved this problem for me.

I’ll try this but we shouldn’t have to find a work around

It’s working now, thanks for the help!

2 Likes

is there any checkbox, that would solve the problem with lamps, so I could place more than 4 lights, and spotlights wouldn’t cause the low framerate?:smile:

Wow, 4 lights?! I can’t use more than 1, haha

My tests with lamps aren’t good, occasionally works with me:

  • deleting all lights > cleaning cache > add new lights > compile… but its random.

Moving and rotating always cause artifacts to me, both forward and deferred render methods.

Consider baking textures and using a single lamp (cause deactivating shadow and/or deleting all light, glitches the frame rate).

Can you share a minimal zip contained project with working sounds for testing purposes? I’m still getting no sound adding fake user onto the platformer template’s sounds from the official repo.

Tested on a “build” from commit 9b0673d.

Edit: what version of the Armory SDK are you using?

I’m using SDK 1909 and to sound works for me finally.

Not sure from what commit that version is from, but sound is not working in Krom (at least on my end) in the latest version.

Append
the new version is uploaded, I’m going to take a look :relaxed:

A test file, it’s contain an embedded sound, you must unpack to work.

To unpack: (this will create a folder in the same directory of this *.blend file)

  • (optional) first create a folder and dropped the blender file into it (to organize the hierarchy)
  • open blender file and click in pointed box (I’m using blender 2.80, this blend file will not work in older versions)
  • choose “Use from current directory” (1st option)
    Screenshot%20from%202019-10-02%2011-50-22

SoundTest.blend (541.4 KB)

If not working in your personal project, try cleaning cache, here sometimes doesn’t work and sometimes work without using ‘Fake User’.

Overview of the *.blend file:

1 Like

Ok, thanks for the demo project. I can confirm that sound is not working in latest version of the Armory SDK.

Edit: Updating my copy of the armory.py file and updating the SDK with it did the trick, sound is working again on my end! :grin:

If it can help you, I proceed as therafter to get a sound going well when playing on browser or krom.

The main thing is to verify inside the Blender Sound datablock what is referenced as an external or packed sound file, and to use the Data API tool to verify it.

(For exemple : to play this hit1.wav file
image

you can have added a file hit1.wav at time 0 in the sequenceur editor, or as another way to proceed, created a sound folder, used VLC to create a hit1.ogg file (other tools than VLC available to do it too…) and just copy this hit1.ogg in the folder debug/krom for example to test in krom
image or for test in html in
image
but maybe finnally you don’t know really what’s going wrong or not.

Thus using the Data API tool, we can perfectly observe the only important thing, that is
how Blender File Path is set in Blender.

image

because the Play Sound Logic node is going wrong if the class bpy.types.Sound, with it’s Sound datablock referencing an external or packed sound file is wrong.

You have the answer when looking the File Path using the Data Api tool available in Blender 2.8

1 Like

You don’t need to add a fake user anymore as of ArmorySDK1910 but it still only works with .wav files.

I appreciate all the help, etc. but this should just work (like it was a few versions before)

In theory, khamake compresses the files when making a release build; So don’t worry about files being wav’s, they will be compressed later on.

It is written here to use .wav or .flac, but is it okay to use a different format?