Acylation / obsidian-click-clack

Simulates typewriter / mechanical keyboard sounds in Obsidian.
MIT License
17 stars 1 forks source link

Custom resources? #5

Open mikebozo opened 5 months ago

mikebozo commented 5 months ago

What would you like to be added?

Hey! Love this plugin! I am looking for a very specific type of sound, which I think I will be able to get. I looked around but couldnt find a guide to make your own resource pack. But I do see it on your roadmap, that you plan on adding it, unless that is meant to be the custom resource pack you can already download.

I see that someone has already asked you to make it so that every key is detected, such as scrolling, thank you so much for continuing to work on this. :)

I assume its just as easy as replacing the existing sounds of one of the resource packs? But yea, I was thinking of maybe an interface where you can choose your own sound file, instead of using resource packs. I don't know how hard that is though lol. Like

[Enter] (choose soundfile) [Delete] (choose soundfile)

I'm gonna try and see if replacing the sound effects in a resource pack has the same effect.

Edit : So what I ended up doing was copy paste one of the existing resource packs, renamed it, renamed it in the manifest.json, and simply renamed the sound effects I wanted to the sound effects already in the resource pack, overwrite those, and boom, new custom resource pack! :)

Why is this needed?

Maximum immersion.

Acylation commented 5 months ago

Yes you can add one manually. Just create a folder and include your custom key sounds, and add a manifest accordingly.

image

We accept five type of sounds, marked as key, key2, enter, space and delete. You need to point correct sound file to these fields, and certainly you can duplicate some.

For example, you can write the following manifest.

{
    "id": "my-awesome-sound",
    "caption": "Awesome",
    "key": "key.wav",
    "key2": "key.wav",
    "enter": "key.wav",
    "space": "space.wav",
    "delete": "key.wav"
}

Correspondingly, you need to create a folder named my-awesome-sound (exactly the same as id), and include manifest.json, key.wav and space.wav in it.

Acylation commented 5 months ago

Edit : So what I ended up doing was copy paste one of the existing resource packs, renamed it, renamed it in the manifest.json, and simply renamed the sound effects I wanted to the sound effects already in the resource pack, overwrite those, and boom, new custom resource pack! :)

Yeah so glad that you have it built! Hope my statement can help potential users coming after.

But yea, I was thinking of maybe an interface where you can choose your own sound file, instead of using resource packs. I don't know how hard that is though lol.

Will have one. However, I need to extend current pack a bit to allow users customize each key / presets of keys before coding.