Author Topic: "Sounder" tool - alpha version is ready  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline ZvikaZ

"Sounder" tool - alpha version is ready
« on: August 01, 2022, 07:34:13 AM »
Sounder tool is ready for alpha testing...



It should be able to do (more or less) almost anything you can think of with sound formats of SCI1+, SCI0 and SC0-Early.
Few features are planned to be added in the near future (most interesting one IMO - ability to add digital sample from any file, like MP3).

It even has a Graphical User Interface (I still prefer the command line, but I know that many people disklike such things...)

The installer can be downloaded from https://github.com/adventurebrew/re-quest/releases/download/sounder_0.1/Sounder.Installer.exe
In order to access the command line just run 'sounder.exe --help'.

If anyone prefers without installer: https://github.com/adventurebrew/re-quest/blob/master/tools/sci/sounder.py
(the beginning of the file has notes how to set up a Conda environment with anything needed to run it)

Important notes:
  • This is really an Alpha version, it probably has bugs
  • I like to code, but hate to test, so, I haven't found those bugs
  • The good news - please report bugs that you found, and I will try to fix 'em
  • You can report here, or at https://github.com/adventurebrew/re-quest/issues (please prefix the issue with 'sounder')
  • If anyone wants to run in Linux, and needs help - just say
  • Feature requests, or any other comments, are also welcomed

EDIT
====
I just discovered that with the installer the command line isn't working. I have an idea how to fix it. Meanwhile, in order to run the command line, use the Python file directly from GitHub, and not the installer.

EDIT2
====
CLI is working now, with a different shortcut pointing to a .bat file, with the exact path.
« Last Edit: August 01, 2022, 09:49:17 AM by ZvikaZ »



Offline EricOakford

Re: "Sounder" tool - alpha version is ready
« Reply #1 on: August 02, 2022, 05:20:51 PM »
Okay, so I've tested it with LSL2 (1.002). The music tracks (those in the 100 range) all converted from SCI0 to SCI1 without error. However, some of the sounds would not convert.
For example: sound.005...
Code: [Select]
C:\SCICompanion\Sierra\LSL2\original_sounds\sound.005 SCI0
Device FB_01 uses [{'ch': 1, 'voices': 8}]
Device ADLIB uses [{'ch': 1, 'voices': 8}]
Device PC_JR uses [{'ch': 1, 'voices': 8}]
Device SPEAKER uses [{'ch': 1, 'voices': 8}]
Device MT_32 uses [{'ch': 2, 'voices': 0}]
Midi length: 1.9 seconds
SAVE SCI1: Ignoring device FB_01, doesn't have a SCI1 counterpart
SAVE SCI1+: Adding GM device, as duplication of MT-32
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 860, in main
  File "sounder.py", line 617, in save_sci1
KeyError: 1
[12824] Failed to execute script 'sounder' due to unhandled exception!

Sounds 7 and 12 have the same issue.

And I tested the 1988 Christmas Card, for converting from early SCI0 to newer SCI0...

Code: [Select]
C:\SCICompanion\Sierra\demos\88xmas\original_sounds\sound.001 SCI0_EARLY
Device PC_JR uses [{'ch': 1, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device SPEAKER uses [{'ch': 1, 'voices': 0}]
Device MT_32 uses [{'ch': 1, 'voices': 0}, {'ch': 2, 'voices': 1}, {'ch': 3, 'voices': 1}, {'ch': 4, 'voices': 6}, {'ch': 10, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device ADLIB uses [{'ch': 2, 'voices': 1}, {'ch': 3, 'voices': 1}, {'ch': 4, 'voices': 6}]
Device CONTROL_CHANNEL uses [{'ch': 10, 'voices': 0}]
Midi length: 67.0 seconds
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 857, in main
  File "sounder.py", line 450, in save_sci0
  File "sounder.py", line 450, in <listcomp>
TypeError: unsupported operand type(s) for -: 'dict' and 'int'
[4636] Failed to execute script 'sounder' due to unhandled exception!

None of the sounds would convert at all. However, all of them do convert to SCI1.

Then tested KQ4, converting the SCI0 sounds to SCI1...
Code: [Select]
C:\SCICompanion\Sierra\KQ4\original_sounds\sound.007 SCI0
Device PC_JR uses [{'ch': 1, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device SPEAKER uses [{'ch': 1, 'voices': 0}]
Device MT_32 uses [{'ch': 2, 'voices': 8}]
Device FB_01 uses [{'ch': 2, 'voices': 8}]
Device ADLIB uses [{'ch': 2, 'voices': 8}]
Midi length: 6.6 seconds
SAVE SCI1: Ignoring device FB_01, doesn't have a SCI1 counterpart
SAVE SCI1+: Adding GM device, as duplication of MT-32
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 860, in main
  File "sounder.py", line 617, in save_sci1
KeyError: 10
[15684] Failed to execute script 'sounder' due to unhandled exception!

Sounds 12, 14, 20, 22, 34, 36, 38, 47, 50, 57, 64, 104, and 203 have similar issues.
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline ZvikaZ

Re: "Sounder" tool - alpha version is ready
« Reply #2 on: August 03, 2022, 10:52:47 AM »
Okay, so I've tested it with LSL2 (1.002). The music tracks (those in the 100 range) all converted from SCI0 to SCI1 without error. However, some of the sounds would not convert.
For example: sound.005...
Code: [Select]
C:\SCICompanion\Sierra\LSL2\original_sounds\sound.005 SCI0
Device FB_01 uses [{'ch': 1, 'voices': 8}]
Device ADLIB uses [{'ch': 1, 'voices': 8}]
Device PC_JR uses [{'ch': 1, 'voices': 8}]
Device SPEAKER uses [{'ch': 1, 'voices': 8}]
Device MT_32 uses [{'ch': 2, 'voices': 0}]
Midi length: 1.9 seconds
SAVE SCI1: Ignoring device FB_01, doesn't have a SCI1 counterpart
SAVE SCI1+: Adding GM device, as duplication of MT-32
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 860, in main
  File "sounder.py", line 617, in save_sci1
KeyError: 1
[12824] Failed to execute script 'sounder' due to unhandled exception!

Sounds 7 and 12 have the same issue.

And I tested the 1988 Christmas Card, for converting from early SCI0 to newer SCI0...

Code: [Select]
C:\SCICompanion\Sierra\demos\88xmas\original_sounds\sound.001 SCI0_EARLY
Device PC_JR uses [{'ch': 1, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device SPEAKER uses [{'ch': 1, 'voices': 0}]
Device MT_32 uses [{'ch': 1, 'voices': 0}, {'ch': 2, 'voices': 1}, {'ch': 3, 'voices': 1}, {'ch': 4, 'voices': 6}, {'ch': 10, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device ADLIB uses [{'ch': 2, 'voices': 1}, {'ch': 3, 'voices': 1}, {'ch': 4, 'voices': 6}]
Device CONTROL_CHANNEL uses [{'ch': 10, 'voices': 0}]
Midi length: 67.0 seconds
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 857, in main
  File "sounder.py", line 450, in save_sci0
  File "sounder.py", line 450, in <listcomp>
TypeError: unsupported operand type(s) for -: 'dict' and 'int'
[4636] Failed to execute script 'sounder' due to unhandled exception!

None of the sounds would convert at all. However, all of them do convert to SCI1.

Then tested KQ4, converting the SCI0 sounds to SCI1...
Code: [Select]
C:\SCICompanion\Sierra\KQ4\original_sounds\sound.007 SCI0
Device PC_JR uses [{'ch': 1, 'voices': 0}, {'ch': 11, 'voices': 0}, {'ch': 12, 'voices': 0}]
Device SPEAKER uses [{'ch': 1, 'voices': 0}]
Device MT_32 uses [{'ch': 2, 'voices': 8}]
Device FB_01 uses [{'ch': 2, 'voices': 8}]
Device ADLIB uses [{'ch': 2, 'voices': 8}]
Midi length: 6.6 seconds
SAVE SCI1: Ignoring device FB_01, doesn't have a SCI1 counterpart
SAVE SCI1+: Adding GM device, as duplication of MT-32
Traceback (most recent call last):
  File "sounder.py", line 873, in <module>
  File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
  File "sounder.py", line 860, in main
  File "sounder.py", line 617, in save_sci1
KeyError: 10
[15684] Failed to execute script 'sounder' due to unhandled exception!

Sounds 12, 14, 20, 22, 34, 36, 38, 47, 50, 57, 64, 104, and 203 have similar issues.

Thanks for the detailed report!
I don't have LSL2, but thanks to your finding I've done several fixes, I assume they will help there as well.

Permanent link to the latest release: https://github.com/adventurebrew/re-quest/releases/latest/download/Sounder.Installer.exe

It also contains:
  • Internal converter, so digital sample can be in any file (even video - it will just take the audio stream)
  • The "Play device" selection is updated to show only the relevant devices every time "input files" or "input version" are changed

Offline EricOakford

Re: "Sounder" tool - alpha version is ready
« Reply #3 on: August 03, 2022, 08:21:13 PM »
Great! Now I've just found that the sounds converted from SCI0 to SCI1 are not converted right, leading to notes playing in the wrong place!

To see what I'm talking about, I've put here a little program that tests SCI1 sounds. The menu has an option to play a sound, and you can input the resource number you want to play. I've included three sounds as an example. Please excuse the wrong instruments; that's just because the patch files are from the INN demo (at which point General MIDI was the standard).
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline ZvikaZ

Re: "Sounder" tool - alpha version is ready
« Reply #4 on: August 04, 2022, 06:41:52 AM »
Great! Now I've just found that the sounds converted from SCI0 to SCI1 are not converted right, leading to notes playing in the wrong place!

To see what I'm talking about, I've put here a little program that tests SCI1 sounds. The menu has an option to play a sound, and you can input the resource number you want to play. I've included three sounds as an example. Please excuse the wrong instruments; that's just because the patch files are from the INN demo (at which point General MIDI was the standard).

I fixed few things.
Please take the updated release from the same link (https://github.com/adventurebrew/re-quest/releases/latest/download/Sounder.Installer.exe)

It still sounds a little bit weird in your program - maybe it's due to the patch files?

In sv.exe it sounds well. I checked in SCICompanion - it was very confusing - everything seemed messed up, and it didn't play. But then I realized that it recognized the game as SCI0 (and the sounds were saved as SCI1). When I forced it to change 'Sound format' to SCI1, it played fine.

So, maybe something is wrong with the test program? It seems to be based on SCI0 templates instead of SCI1.
Then I took sound.100 from SQ6 and tried to play it with sci1_sound_test, and it also didn't play well.

Lastly, just for fun, I tried taking sound files from SQ3 and play this sci1_sound_test, and it just got stuck.

« Last Edit: August 04, 2022, 06:43:24 AM by ZvikaZ »

Offline Collector

Re: "Sounder" tool - alpha version is ready
« Reply #5 on: August 04, 2022, 07:48:18 PM »
I noticed that you have an installer. I thought it was just a Python script. Is the installer a Python installer?
KQII Remake Pic

Offline ZvikaZ

Re: "Sounder" tool - alpha version is ready
« Reply #6 on: August 05, 2022, 02:54:09 AM »
1. I have issued a new release now, Eric, please try it. It has some more fixes and improvements.

2.
I noticed that you have an installer. I thought it was just a Python script. Is the installer a Python installer?
From the end user's perspective, 'Sounder' is a regular Windows program - it's installed with a regular installer, "next, next...", and then there's an icon in the desktop. When clicked, a window is opened and everything is done from there.

Behind the scenes, it's indeed a Python script. But it's packed with a tool called PyInstaller (problematic name - it has nothing to do with Windows installers, I'd called it 'PyCompiler', or 'PyPacker', if they asked me) which "hides" the Python stuff from the user, and creates an .exe file which loads everything.
In order to create a regular Windows installer (that installs the output of PyInstaller to the user's machine) I used NSIS.

If you're interested, that's my script that runs all this stuff: https://github.com/adventurebrew/re-quest/blob/master/tools/sci/compile.bat

Offline Collector

Re: "Sounder" tool - alpha version is ready
« Reply #7 on: August 05, 2022, 09:18:38 AM »
NSIS is what I use for my installers. My publisher plugin for SCI Companion uses NSIS. I do much prefer it over Inno. Would it be possible to see your NSI script?
KQII Remake Pic

Offline ZvikaZ


Offline Collector

Re: "Sounder" tool - alpha version is ready
« Reply #9 on: August 12, 2022, 07:10:39 AM »
404 from your link, but I found it on your repo.
KQII Remake Pic

Offline ZvikaZ

Re: "Sounder" tool - alpha version is ready
« Reply #10 on: August 29, 2022, 07:00:06 AM »
404 from your link, but I found it on your repo.
Yeah, you're right. I've meanwhile moved all Sounder stuff to its own directory. Glad you found it anyway :)

Offline Collector

Re: "Sounder" tool - alpha version is ready
« Reply #11 on: August 29, 2022, 05:31:15 PM »
You might want to make an entry on the Wiki. I can make a stub page that you can flesh out.
KQII Remake Pic

Offline ZvikaZ

Re: "Sounder" tool - alpha version is ready
« Reply #12 on: August 29, 2022, 06:31:28 PM »
You might want to make an entry on the Wiki. I can make a stub page that you can flesh out.

Good idea. Yes, please create that stub page.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.071 seconds with 23 queries.