Make .sfz Sound Files with GUI

Moderator: Forum moderators

Post Reply
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Make .sfz Sound Files with GUI

Post by taersh »

Hi.

This is a GUI Program to make .sfz Sound Files.
It's version number is 0.0.1.
Made for testings - still under development.

Note: one can change the order of files within the GUI's list.
Though, currently there's no code added to affect the new order on the .sfz file output.

The program will install to /usr/local/apps, since it is created as a RoxApp.
That means, it can be executed also from any external (ext formatted) location by clicking the RoxApp directory.

Make-sfz-files-0.0.1.pet
(65.87 KiB) Downloaded 84 times

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Make .sfz Sound Files with GUI

Post by puddlemoon »

hey there, nice work so far. and quick...

some observations..

so it seems if the directory path contains spaces, the gui does not accept the location.
Example:
path is: /mnt/home/00-studio-share/Samples/CMI V/Factory/MODE1

Code: Select all

ls: cannot access '/mnt/home/00-studio-share/Samples/CMI': No such file or directory
ls: cannot access 'V/Factory/MODE1': No such file or directory
sh: psl_savewinsize: command not found
environment: line 10: cd: too many arguments

Invalid option: "V/Factory/MODE1". See 'makesfz -h' for usage

sh: psl_savewinsize: command not found
environment: line 25: cd: too many arguments
If passed to the interactive script from the options tab it does finish but makes a .sfz in /root from the .wav files in /root

(after swapping the colors back to white on black of course... so i could see it :thumbup2: )

when selecting multiple files as source, the gui does not accept multiples and when passed to the interactive script as a single file it also creates a .sfz in /root but from the .wav files in /root.

luckily your rox app is named just differently from my original rightclicks so I could test both in comparison.

The script from the right click can do multiple files but in this instance it creates relative paths. e.g "sample=sine.wav" But it creates the.sfz in /root so needs to be moved to the source folder to work of course.

Using the script from the right click on the parent directory will create the same .sfz, in /root but with absolute paths, so can be used wherever... I see value in both relative and absolute personally...

The "start key" section was off the window a bit for me. also below that Overwiew should be Overview

Anyway just some thoughts and observations.

well done,
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Make .sfz Sound Files with GUI

Post by taersh »

it seems if the directory path contains spaces, the gui does not accept the location.
I don't have spaces in paths and file names. I have a right-click script, Remove-Spaces-From-File-Names.
However, fixed and tested successfully right now.
when selecting multiple files as source, the gui does not accept multiples
Why should one select multiple files, when they are all in one directory?
It's not possible to select multiple files from different locations, no?
Please explain.
The script from the right click can do multiple files but in this instance it creates relative paths. e.g "sample=sine.wav" But it creates the.sfz in /root so needs to be moved to the source folder to work of course.

Using the script from the right click on the parent directory will create the same .sfz, in /root but with absolute paths, so can be used wherever... I see value in both relative and absolute personally...
All my original .sfz files locally available are stored at the locations of its directories containing the source/audio files and they are using relative paths. Using absolute paths will work also, of course. But as soon as the drive/partition changes e.g. HD crash etc. they won't work any longer. Can you explain the value in the use of absolute paths?
The "start key" section was off the window a bit for me. also below that Overwiew should be Overview
Don't understand what you mean. Please explain/screenshot?

Thanks for report.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Make .sfz Sound Files with GUI

Post by puddlemoon »

Just a matter of one's sense of "organization" I suppose.

Multiple files option is useful when you'd like to make a kit from only some of the files in a directory.

Absolute paths are useful if you wish to organize your sfz files together in a directory away from the source files. To have only a certain collection show up in your plugin host for example.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Make .sfz Sound Files with GUI

Post by taersh »

I'm now able to have multiple files accepted by the GUI and thanks to @MochiMoppel to have only those files listed.
Works with spaces in path names, though file names must NOT have spaces!
Just need to modify the creation of .sfz file/s from the files listed instead of all the files inside the directory.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Make .sfz Sound Files with GUI

Post by taersh »

It seems I need to start from scratch.

I'm now able to make single .sfz plus multiple .sfz from selected audio files.
Though the path for the sample= is incomplete. It is missing the parent directory of the audio files.
Even submitting the audio file incl. parent directory doesn't work.

No matter if I'm submitting e.g.

Code: Select all

/mnt/sdb1/LoopsAndSamples/Movie_Score_Vol5/Harp/Harp_a_1.wav
or just

Code: Select all

Harp/Harp_a_1.wav
the result remains

Code: Select all

sample=Harp_a_1.wav

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Make .sfz Sound Files with GUI

Post by puddlemoon »

Interesting. this is what this script assigns when selecting multiples as well.

I think in some way it is better to have the .sfz files in the directory with the .wavs rather than next to it... again maybe just a matter of taste... because to move or copy them, just the one directory is needed.

Could the resulting .sfz be placed in the directory instead? a kind of solution?
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Make .sfz Sound Files with GUI

Post by taersh »

Could the resulting .sfz be placed in the directory instead? a kind of solution?
That's not really a problem. After creation it could be copied into the directory of the samples.

Though, I discovered another issue which makes development even harder.

E.g. there's a sample directory and the samples are named after the tones like:
A3, A4, A5, C3, C4, C5, E3, E4, E5...

In this case the files are in alphabetical order and that order won't fit to the order used when creating a single .sfz file using --key option to set a start key. So, one would need to know the tone of the samples and then first to rename them. Best would be to add a number as prefix dependent to the MIDI key number. That means there's a lot of manually work to do before the .sfz file could be created finally.

Creation of multiple .sfz files would fail also in that case, as one would need to define the MIDI key number separately for each .sfz file.

For those reasons I'm currently in doubt about further development of this program would make any sense.

Any suggestions on that?

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Make .sfz Sound Files with GUI

Post by puddlemoon »

I see your point for sure...
There are many cases that would require some, or a lot, of manual work to produce the single sfz that was desired. So much depending on the state of your .wav collection and what it is you are trying to create...
Some could be very complicated while, some more forgiving, say a drumkit to be used with a sequencer would need little if any extra work... A chromatic instrument is clearly more likely to need intervention to make a useful sfz.

I can think of many ways to use .sfz files/collections that I would not expect a gui to anticipate. So perhaps the preparation of .wav collections is beyond the scope of this app..?

The scripting is already out of my league so I can't help a lot there...
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Make .sfz Sound Files with GUI

Post by taersh »

Hi.

Since the GUI has possibility to move items (files in list) I have applied a function to rename the files listed dependent to that order in the list. It first makes a backup (named after date and time, Y-M-D-H-M-S) of the original directory and then starts to rename the files inside the original directory. Currently it adds a numbering prefix to the file names counting from 0 upwards.

I now need to apply a little code to start the numbering dependent on the --key STARTKEY option. So I have to create some converting code to get the MIDI key number from STARTKEY e.g. C4 - which would be 60 I think. Somewhere I had already used an array to rename files in /root/.config/rox.sourceforge.net/OpenWith from EN to DE. To use such array might be useful, I think.

Since I have started from scratch I will left out functionality on paths with spaces for now. This needs some different work to do. Though automated renaming from the lists order saves a lot of time compared to manual renaming of multiple files. :thumbup:

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

Post Reply

Return to “Multimedia”