Author Topic: Set channel properties for Sound resources in Companion?  (Read 9191 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

Re: Set channel properties for Sound resources in Companion?
« Reply #30 on: October 22, 2021, 09:36:01 PM »
I'll have to look again when I'm back on my laptop instead of my phone but I think you might be on to something, Doomie.

Offline doomlazer

Re: Set channel properties for Sound resources in Companion?
« Reply #31 on: October 22, 2021, 09:43:16 PM »
Yes, I think it might be confirmed. Further changing channel 1 (0) from 0 IVs to 1 increments the second byte.

Code: [Select]
0x0000  00 01 FF 03 FF 00...

Offline MusicallyInspired

Re: Set channel properties for Sound resources in Companion?
« Reply #32 on: October 23, 2021, 12:18:38 AM »
I've already worked this out with Ravi's writeup on the ScummVM SCI wiki (Kawa referenced earlier). All the answers are there. It's the SCI1.0 sound resource format I'm not sure of. I know what to change for SCI0 sound resources I just couldn't edit the Companion source. (also, I don't fully know how to implement setting byte values in a binary file within the GUI realm)
« Last Edit: October 23, 2021, 12:45:17 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: Set channel properties for Sound resources in Companion?
« Reply #33 on: October 23, 2021, 07:20:04 AM »
Back on the laptop, will study Doomie's findings later.

The thing about Ravi's writeup is that at least the part I referenced doesn't match my hypothesis:
Quote
The upper 4 bits of that byte specify how many voices each logical MIDI channel will be playing. The lower 4 bits specify which drivers should react on that channel. Bit 0 set means AdLib shall react. Bit 1 set means PCjr shall react. MT32 will react on all channels. Bit 3 signals the control channel.
Not only does that imply AdLib's channelMask is 0x01 (it's 0x04) but I wasn't aware the PCJr was able to run SCI so that's something I'd prefer to take heavily salted.

Offline Kawa

Re: Set channel properties for Sound resources in Companion?
« Reply #34 on: October 23, 2021, 08:50:31 AM »
Having looked closely at Doomie's data, there's one thing I'd like to confirm first: what devices are those two channels set to play on?

Offline MusicallyInspired

Re: Set channel properties for Sound resources in Companion?
« Reply #35 on: October 23, 2021, 09:43:46 AM »
Back on the laptop, will study Doomie's findings later.

The thing about Ravi's writeup is that at least the part I referenced doesn't match my hypothesis:
Quote
The upper 4 bits of that byte specify how many voices each logical MIDI channel will be playing. The lower 4 bits specify which drivers should react on that channel. Bit 0 set means AdLib shall react. Bit 1 set means PCjr shall react. MT32 will react on all channels. Bit 3 signals the control channel.
Not only does that imply AdLib's channelMask is 0x01 (it's 0x04) but I wasn't aware the PCJr was able to run SCI so that's something I'd prefer to take heavily salted.

He's referring to Tandy 3-voice as Tandy and IBM PCjr share the same sound chip (as does the Sega Master System and the Game Gear). Ravi wrote SoundBox which works as you'd expect so no salt needed here.
« Last Edit: October 23, 2021, 09:45:46 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: Set channel properties for Sound resources in Companion?
« Reply #36 on: October 23, 2021, 09:58:47 AM »
Good, good. Thanks for clearing that up cos I don't like my meals too salty.

Offline doomlazer

Re: Set channel properties for Sound resources in Companion?
« Reply #37 on: October 23, 2021, 10:08:10 AM »
Having looked closely at Doomie's data, there's one thing I'd like to confirm first: what devices are those two channels set to play on?

I had all devices enabled on channels 0 and 1. (initial voices chan0: 1 chan1: 3)
Code: [Select]
0x0000  00 01 FF 03 FF 00 00...
Disabling Adlib on chan1, with no other changes alters the 5th byte
Code: [Select]
0x0000  00 01 FF 03 FB 00 00...
So the Initial voices word comes before the device types I guess and there is 00 at the start.

Edit: Just an observation, but that was with a SCI0 patch altered in Soundbox. I can replicate the same results for SCI0 patches right in SC by disabling Adlib for chan1.

In SCI1, If I try disabling Adlib in a random PQ3 sound patch within SCICompanion, the header is drastically different. In the attached pic the left is with Adlib disabled on chan2 and enabled on the right.




« Last Edit: October 23, 2021, 11:08:03 AM by doomlazer »

Offline Kawa

Re: Set channel properties for Sound resources in Companion?
« Reply #38 on: October 23, 2021, 11:36:39 AM »
I had all devices enabled on channels 0 and 1. (initial voices chan0: 1 chan1: 3)
Code: [Select]
0x0000  00 01 FF 03 FF 00 00...
Disabling Adlib on chan1, with no other changes alters the 5th byte
Code: [Select]
0x0000  00 01 FF 03 FB 00 00...

All devices enabled would be 0xFF. "And Not" AdLib (4) would be 0xFB. So that makes some sense... guess I'll have to experiment with implementing this now.


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

Page created in 0.054 seconds with 23 queries.