Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » Converting MIDI files to SID
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Converting MIDI files to SID [message #338352] Fri, 24 February 2017 14:51 Go to next message
Daniel England is currently offline  Daniel England
Messages: 86
Registered: January 2005
Karma: 0
Member
Heyas!

This is a copy of my post from the http://www.remix64.com forum.

I thought I'd let you all know that I'm working on a tool to allow you to convert and play MIDI files on a virtual (emulated) SID on your PC.

I have created an XSID format and a suite of tools that allow you to play tunes without the CPU, CIA and VIC emulation. These tools are already on GitHub at https://github.com/M3wP/XSID. Unfortunately, they are currently only for Windows because I don't know how to make a wrapper for ReSID on Linux/Android/MacOSX/iOS. It would be an incredibly simple to task to make your own player for the format, though. Help in this area would be really appreciated.

Back to the point, I am working on a tool to convert MIDI files to this XSID format. So far, it is quite limited (only Format 0 MIDI files for example) but I must say that it does seem to already do a better job than the SIDWizard tool. I'm making it so that I can incorporate SID sounds into my music without buying VSTs etc and as a proof of concept.

I will release it soon on GitHub, once I have a few nice-ities implemented. I'll let you all know when that happens.

If there is enough interest, I don't see why it couldn't be expanded upon to convert to the SIDWizard format or some-such for play-back on a real SID. The program has been built to be extensible. Contact me if you want to participate. I'm writing the tools in Object Pascal with Delphi and Free Pascal since I love them.

Just also to mention, I'll probably eventually create a tool to do the opposite since I'm finding SID2MIDI quite limited but it is a much more difficult task, I believe.


Daniel.
Re: Converting MIDI files to SID [message #338632 is a reply to message #338352] Tue, 28 February 2017 17:08 Go to previous message
Daniel England is currently offline  Daniel England
Messages: 86
Registered: January 2005
Karma: 0
Member
Heyas!

Okay... I have the first alpha-ish version of MIDIToSID up on GitHub at <https://github.com/M3wP/XSID/tree/master/MIDIToSID>.

Presently, it only supports Format 0 MIDI files and only produces XSID dumps for PAL XSIDs. You'll need to convert these dumps using DumpConvert (in <https://github.com/M3wP/XSID/tree/master/SIDConvert>). It also doesn't output any SID initialisation so you need to add the line "8 24 15" at the very least to the top of the dumps before you convert them. I know, that's pretty lame but I haven't gotten to the converter configuration as yet. (And yes, I just realised I have a spelling error in the source code).

I did the initial testing with the Comic Bakery MIDI given by SID2MIDI hence, the patches are set by default to match the Galway engine to a degree. I have noticed that the Pitch Wheel controller is not used correctly by SID2MIDI. I have done the research and I am using it correctly in my code. I am pretty unhappy with the SID2MIDI results. Pulse Width should be two controllers or an RPN (for lo and hi bits). Channel Pressure (as my guess) should be used to mimic the sustain value since SID2MIDI seems to not factor it into its patch detection.

MIDIToSID doesn't support playing multiple notes on a voice. It completely ignores multiple notes from a single channel and may get into a bind if multiple notes are played from channels mapped to the same voice. I intend on adding legato and "chord" modes for handling these things.

I have tested a couple of other MIDIs (from SID2MIDI) and the results are promising. I haven't as yet tried a general MIDI file because I'd have to find one that is appropriate (or implement the modes, above).

I haven't looked at the source code for the SIDWizard MIDI converter as yet.. Since the MIDIToSID program is fairly extensible, I may add that converter in the future.

Anyway, that's enough for now.


Daniel.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: New Fields 1.2.5 available!
Next Topic: Re: Anybody know what happened to Nick Hampshire?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Apr 18 10:02:32 EDT 2024

Total time taken to generate the page: 0.01492 seconds