Proper Stereo in Quartet.

All about modules/digital tunes in a variety of tracker & sampled formats

Moderators: Mug UK, lotek_style, Moderator Team

Post Reply
Encolpius
Atari nerd
Atari nerd
Posts: 47
Joined: Mon Aug 27, 2018 12:46 pm

Proper Stereo in Quartet.

Post by Encolpius »

Hello there. I have been slowly but surely scratch-building my dungeon crawler game for STE and one of the things that it has is music in Quartet for intro, credits, cutscenes, etc., because it's the only tracker that isn't positively user hostile and I've got pretty good at composing with it. It has a proper stave and time and key signatures and the ability to accept input from a MIDI keyboard.

However, there is a constant niggle.

The player code I use can send the Quartet music to either the soundchip for mono playback, a Replay cartridge if someone has that, or the STE's stereo RCA outputs. If you pick the latter, and I do, then it assumes you want tracks 1 and 2 exclusively on the left channel and 3 and 4 exclusively on the right channel. There is no way to change this, and I don't have the sauce code or the reverse-engineering chops to alter it myself.

Does anyone know of a Quartet player routine that would allow me to have a proper stereo experience rather than what is effectively one mono 2-track recording in your left ear and another mono 2-track in your right ear? For instance, have track 1 exclusively on the left channel, track 2 on both channels at, say, 100% volume on L and 75% volume on R, track 3 as the inverse of track 2, and track 4 exclusively on the right channel? I know Quartet uses mono samples but there is no reason why they couldn't be doubled up and mixed like this, surely?

In some of the songs I kinda cheated at this by copying and pasting track 2 to track 3 and inserting into those tracks anything I want to be centred. But this means that I'm effectively limited to three tracks rather than 4. That means I can't have a synth substitute for vox, or have proper lead and rhythm guitars, or similar. It also means that the drums, which should be centred ideally in any stereo mix, will either be off to one side, or force the guitar onto one channel and bass onto the others.
uko
Atari maniac
Atari maniac
Posts: 86
Joined: Sun Aug 25, 2019 6:45 pm
Location: France

Re: Proper Stereo in Quartet.

Post by uko »

The main problem is CPU usage. 4 voices soundtracks mixing almost takes half of CPU at low replay frequency on STE.
What you are looking for will add two additional voices to mix and lower mixing quality.
Not impossible to do, but that's mainly with Falcon (with its DSP) that real stereo management has become the standard.
David aka Uko, from T.AL
Take a look at our last STe demo ! The Star Wars Demo and to its "making of"
https://github.com/Uko-TAL
Encolpius
Atari nerd
Atari nerd
Posts: 47
Joined: Mon Aug 27, 2018 12:46 pm

Re: Proper Stereo in Quartet.

Post by Encolpius »

Welp, I suppose it's cheaty stereo by doubling up tracks 2 and 3 then. I was under the impression that it was the pitch shifting that was the real CPU bear. Once you've got the values to pass to the DMA for each track, can't you just create the left stereo channel with something like "t1 OR t2 OR t3/2" and the right stereo channel with "t4 OR t3 OR t2/2" or is the mix more complicated than just or-ing the values together?

Yano, I think I'm in the mood to do some composing today. I'm no Frank Klepacki but I think my Quartet compositions aren't all that bad really.
uko
Atari maniac
Atari maniac
Posts: 86
Joined: Sun Aug 25, 2019 6:45 pm
Location: France

Re: Proper Stereo in Quartet.

Post by uko »

The mixing part, although composed of simple operations, requires quite a significant part of the CPU time.
And as I said it is not impossible to do the kind of stereo mix you describe, but you'll probably have to do it by yourself, I doubt that you find ready to use code on STE.
David aka Uko, from T.AL
Take a look at our last STe demo ! The Star Wars Demo and to its "making of"
https://github.com/Uko-TAL
User avatar
unseenmenace
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2001
Joined: Tue Sep 21, 2004 9:33 pm
Location: Margate, Kent, UK
Contact:

Re: Proper Stereo in Quartet.

Post by unseenmenace »

Encolpius wrote: Sat Apr 10, 2021 9:22 pm The player code I use can send the Quartet music to either the soundchip for mono playback, a Replay cartridge if someone has that, or the STE's stereo RCA outputs. If you pick the latter, and I do, then it assumes you want tracks 1 and 2 exclusively on the left channel and 3 and 4 exclusively on the right channel. There is no way to change this, and I don't have the sauce code or the reverse-engineering chops to alter it myself.

Does anyone know of a Quartet player routine that would allow me to have a proper stereo experience rather than what is effectively one mono 2-track recording in your left ear and another mono 2-track in your right ear? For instance, have track 1 exclusively on the left channel, track 2 on both channels at, say, 100% volume on L and 75% volume on R, track 3 as the inverse of track 2, and track 4 exclusively on the right channel? I know Quartet uses mono samples but there is no reason why they couldn't be doubled up and mixed like this, surely?

In some of the songs I kinda cheated at this by copying and pasting track 2 to track 3 and inserting into those tracks anything I want to be centred. But this means that I'm effectively limited to three tracks rather than 4. That means I can't have a synth substitute for vox, or have proper lead and rhythm guitars, or similar. It also means that the drums, which should be centred ideally in any stereo mix, will either be off to one side, or force the guitar onto one channel and bass onto the others.
I'm currently working on a music program, and hence a replay routine, that among other things can play 6 channels of samples on STEs. 2 mixed onto the left DMA channel, 2 mixed onto the right DMA channel and 2 mixed onto the 3 YM channels combined into another approximately 8-bit output. This gives you a nice set of left, right and centre channels (playing 2 samples on each) but as Uko said the mixing is fairly CPU intensive. I'd be happy to share some of my code if you think it might be useful though it's far from optimised. It uses about 50% CPU to play 6 channels at 12.5Khz currently though I hope to improve that, at least enough to up the frequency to 25KHz and still have a little bit of CPU to spare.
UNSEEN MENACE
2 original ST's, several STFM's, 2 STE's, a TT and a 14MB Falcon,
a Lynx 2 and Jaguar with JagCD
User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 2423
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Proper Stereo in Quartet.

Post by Cyprian »

@unseenmenace sounds interesting
Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.atari.org
Encolpius
Atari nerd
Atari nerd
Posts: 47
Joined: Mon Aug 27, 2018 12:46 pm

Re: Proper Stereo in Quartet.

Post by Encolpius »

unseenmenace wrote: Mon Oct 04, 2021 8:28 pm
Encolpius wrote: Sat Apr 10, 2021 9:22 pm The player code I use can send the Quartet music to either the soundchip for mono playback, a Replay cartridge if someone has that, or the STE's stereo RCA outputs. If you pick the latter, and I do, then it assumes you want tracks 1 and 2 exclusively on the left channel and 3 and 4 exclusively on the right channel. There is no way to change this, and I don't have the sauce code or the reverse-engineering chops to alter it myself.

Does anyone know of a Quartet player routine that would allow me to have a proper stereo experience rather than what is effectively one mono 2-track recording in your left ear and another mono 2-track in your right ear? For instance, have track 1 exclusively on the left channel, track 2 on both channels at, say, 100% volume on L and 75% volume on R, track 3 as the inverse of track 2, and track 4 exclusively on the right channel? I know Quartet uses mono samples but there is no reason why they couldn't be doubled up and mixed like this, surely?

In some of the songs I kinda cheated at this by copying and pasting track 2 to track 3 and inserting into those tracks anything I want to be centred. But this means that I'm effectively limited to three tracks rather than 4. That means I can't have a synth substitute for vox, or have proper lead and rhythm guitars, or similar. It also means that the drums, which should be centred ideally in any stereo mix, will either be off to one side, or force the guitar onto one channel and bass onto the others.
I'm currently working on a music program, and hence a replay routine, that among other things can play 6 channels of samples on STEs. 2 mixed onto the left DMA channel, 2 mixed onto the right DMA channel and 2 mixed onto the 3 YM channels combined into another approximately 8-bit output. This gives you a nice set of left, right and centre channels (playing 2 samples on each) but as Uko said the mixing is fairly CPU intensive. I'd be happy to share some of my code if you think it might be useful though it's far from optimised. It uses about 50% CPU to play 6 channels at 12.5Khz currently though I hope to improve that, at least enough to up the frequency to 25KHz and still have a little bit of CPU to spare.
That sounds fun, but most tracker / chiptune programs are almost deliberately user unfriendly. I can't understand why they never just used a proper score like Quartet did. It's far easier to read music on a stave than puzzling out lists of numbers and suchlike. Please incorporate a real stave into your program for editing the music when it's done because it makes things so much easier.

I can't remember what the frequency of my Quartet samples is, I think it's 16khz. I suppose with one left channel, one right channel, and two centre channels it would sound a bit nicer and not chew up too much CPU time.
elliot
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 118
Joined: Tue Mar 17, 2009 2:00 pm

Re: Proper Stereo in Quartet.

Post by elliot »

A bit of a strange way about it but I wonder if writing a converter from Quartet to a MOD may help, you would then be able to fine tune in a number of trackers, with faster reply routines that are open source.

Or (and I mean this is the nicest way) get your head around tracker composing.

Or, are there any other trackers out there that work in a more friendly way? Maybe https://dhs.nu/files.php?t=single&ID=64 although I am not sure if output can be sent as MOD. Or try this https://dhs.nu/files.php?t=single&ID=80
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
uko
Atari maniac
Atari maniac
Posts: 86
Joined: Sun Aug 25, 2019 6:45 pm
Location: France

Re: Proper Stereo in Quartet.

Post by uko »

It's true there are some very efficient MOD player routines, especially Lance/Paulo one (available here: https://dhs.nu/files.php?t=democreation) which plays 4 tracks @ 12.5 kHz with only 20% CPU. At least it contains interesting tricks for optimising your own replay routine.

And if CPU is really critical, and if you accept some constraints on FXs and on memory, you can even go down to 5% CPU. Here is a link to such a routine I did, if it may help (not very versatile :wink: ): https://github.com/Uko-TAL/STE_FullScreen_MOD_Play
David aka Uko, from T.AL
Take a look at our last STe demo ! The Star Wars Demo and to its "making of"
https://github.com/Uko-TAL
elliot
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 118
Joined: Tue Mar 17, 2009 2:00 pm

Re: Proper Stereo in Quartet.

Post by elliot »

Then once in MOD format you may be able to tinker with the code and start to mix the stereo in the ways you want. This is no small task but I think you will have more code/options with tubes being in MOD format.

The Amiga suffered from this problem too with very pure Left/Right channels, I wonder if there is are mixing solution in that
"world".
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
User avatar
unseenmenace
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2001
Joined: Tue Sep 21, 2004 9:33 pm
Location: Margate, Kent, UK
Contact:

Re: Proper Stereo in Quartet.

Post by unseenmenace »

Encolpius wrote: Tue Oct 05, 2021 9:39 am That sounds fun, but most tracker / chiptune programs are almost deliberately user unfriendly. I can't understand why they never just used a proper score like Quartet did. It's far easier to read music on a stave than puzzling out lists of numbers and suchlike. Please incorporate a real stave into your program for editing the music when it's done because it makes things so much easier.

I can't remember what the frequency of my Quartet samples is, I think it's 16khz. I suppose with one left channel, one right channel, and two centre channels it would sound a bit nicer and not chew up too much CPU time.
The program I'm working on is called Octet and will look something like this:
OctetM-4.gif
I have designed song and voice set file formats and have a basic working 6 channel replay routine that works with them and the plan is to be able to import Quartet songs and voice sets as well. I have yet to implement volume control or sample looping but it sounds pretty good considering it's currently only 12.5KHz.
You do not have the required permissions to view the files attached to this post.
UNSEEN MENACE
2 original ST's, several STFM's, 2 STE's, a TT and a 14MB Falcon,
a Lynx 2 and Jaguar with JagCD
User avatar
MiggyMog
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Sun Oct 30, 2005 4:43 pm
Location: Scotland

Re: Proper Stereo in Quartet.

Post by MiggyMog »

('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.
Post Reply

Return to “The Digital Department”