Thursday, November 2, 2017

QuadCore soundtrack story

After almost a year of silence I continue to write articles to kompjut0r blog. Excuse me that I skipped months and a review of the SIDfx board, sometimes it's hard to find the time to write a post and sometimes it's even harder to find some motivation to write a post.
Anyway, let's skip this part and jump to today's topic which is:

Quad Core by Singular Crew

This demoscene production generated quite a bit of hype since its release at Function 2017 demoparty. I had the pleasure (and the pain, but let me explain it later) to be involved in this production as the composer of the soundtrack which is the first ever 4 SID music played on 4 C64's in the same time. There are thumbups and thumbdowns, praises and hates about it and I would like to address some of the feedback and comments here with the technical details of composing a 4xSID music.

Disclaimer: I'm not going into details about syncronizing the demo on 4 C64's because I don't know much about the method. That's something you should ask from the programmers of the demo. All I know about the sync is that you can use the joystick port to start the demo on the 4 computers at the same time and there's a time and frame counter that tries to keep everything in sync. Further details might follow later, there's a chance for an interview with Scorpy (he is the main programmer behind Quad Core).

I was excited when Scorpy first explained his idea about making this demo. It sounded great and I jumped straight into it without knowing and thinking much about the technical aspect of composing a 4xSID music. A bit later I realized it's not going to be trivial, simply because there were no tools for this kind of work. The only thing is close enough is SID Wizard where it's possible to use 3 SIDs at the same time, also, VICE can emulate the 3 SIDs but we still needed 1 more SID.
However, it might not be even possible to create an expansion board for the C64 that can handle 4 SIDs. Is it even possible with memory addresses and channel assignment..? Is there enough CPU power and/or memory for handling the 4 SIDs and the editor and the music data..? Also, is there someone who could make a 4xSID editor quickly because of this production only..? Takes a lot of resources and time.

Okay, then compose the SIDs 1 by 1. Well. How would you sync the individual SIDs together? How would you listen to them together? How would you start 4 VICE or 4 C64 at the same time? How is the sync between the 4 music playback granted to be proper?

...and after some research I decided to skip native C64 editors/VICE and use a PC (multitrack) music editor called Reaper.

The explanation is again, very simple:
I could use 12 tracks and keep them in perfect sync in Reaper. Also, with a VST plugin called SIDizer it's possible to emulate the C64 sounds almost like they are on the C64. So let's see how this happened:
- create 12 channels in Reaper
- assign 1 instance of SIDizer per track
- stop here and start to think about the limitations of the real C64

Well, while SIDizer (or any other VST like QuadraSID, Chipsounds, etc.) are great for emulating _some_ of the features and sound of the real machine they are not capable of doing everything.
For example, it's not possible to do sync and ringmod in the VST's like it's possible on the C64 because the VST's channels are not independent. If for example I use one oscillator for channel 1 in the VST (same way like on the real SID), it's not possible to ringmod this with another instance of the VST's channel 2 (SID channel 1 vs 2). This pretty much puts a limit to the instrument design options.
I realized the best I could do was to use the SID's filter *4 times with different settings.

*the SID's filter can be used as global effect and it's not a per channel feature

Next issue was to fill the 12 channels with instrument and musical notes in a way that sounds like a multi-SID music. 12 channels for a musician who is used to use 3 channels is waaaaay too much. Of course, these 12 channels can be filled easily with musical data, however, the previously mentioned issues are still real and we are still talking about the C64 and its capabilities.

After some experiment this became the final channel assignment and basic instrument design with SIDizer:
SID 1: kick, snare, hihats
SID 2: bass, additional intrument, delay line for the main melody
SID 3: 3 channels of chords
SID 4: arpeggiated chords, additional bass, main melody

One of the greatest feature of SID Wizard is the MIDI2SWM converter. It was easy to export the 12 tracks from Reaper as 4 pieces of 3 track MIDI files and convert them into 4 pieces of SID Wizard module (aka SWM).
After this conversion I took the first SWM, loaded it into SID Wizard and started to finetune the musical data and design the instruments. Then loaded the remaining SWM's one after another and did the same.

And then I found an issue with the music data, the last few patterns in each SWM were different than they were in Reaper. Lenght and music data was different and seemed to be corrupted with random-look-a-like notes, something might went wrong during the conversion. Unfortunately I spent too much time with composing the music and setting up the instruments in SID Wizard and found this issue too late when we had no time for fixing it before the release.
I decided to go with a shorter pre-rendered wav file where the corrupted ending was cut and the music looped seamless. We released the product in video format at the party anyway so this was the better solution at that moment.

Later I had time to fix the music data and finetune the music further.
You can listen to the result here:

Source, can be loaded into SID Wizard 1.7, all the audio data is in the zip and it's up to you to hack the 4th SID into the game somehow. Let us know if you find a way to play it properly on the real hardware. Or even in VICE: QuadSID source

C64 executable, playing the (fixed) music on 3 SIDs with a missing 4th SID, can run under VICE on real C64:

C64 executable of the whole presentation (final, 100% release) with visuals and music:

Final release on YT with fixed music:

Thank you for your attention.

1 comment:

  1. Nice blog! Just discovered it today, and wish I had found it earlier.

    I recently did something similar to your QuadCore soundtrack (do a youtube search for "Dance of the Sugar Plum Fairy, performed on 10 Commodore 64s"), and it looks like we followed much the same process, namely starting with a DAW (you with Reaper, me with Sibelius), converting to SWM, and then designing instruments and volume balancing in SID-Wizard.

    One difference is that I wrote some python that takes the orchestral midi output from Sibelius, does various processing (separate channels, apply metric modulations, assign tracks to SIDs, etc.), then spits out a .d64 image file with 10 SWM files on it (the python calls out to SWMconvert.exe). SWMconvert seems to have a bug where the last note of the last pattern is often corrupted, so the python generates a final, sacrificial note at the same time for all tracks.

    Anyway, thanks for all the SID replacement comparisons (FPGASID, ArmSID, SwinSID), I'll be picking one of those up soon.