MIDI converter project for the CoCo

Got a software project you're working on? Share the details with us here.
Please only post 1 topic per project and keep the replies and threads pertaining to the project within the same post.
Forum rules
Software Project Forum Group:
Please 1 one topic per project.
Keep all comments and replies and threads within the same topic, and try to avoid creating new ones.

MIDI converter project for the CoCo

Postby nowhereman999 » Mon Oct 16, 2017 9:07 pm

**Update** - The link below now has the complete MIDI2CoCo V1.00 conversion files.

You can read all about the converter on my blog page here:
https://nowhereman999.wordpress.com/201 ... converter/

Feel free to discuss the program here. :)

Click on the link below to download the mid2coco program.

The main conversion program is written in QB64 BASIC, it's pretty messey but functional. Please feel free to add to it as you will. I don't plan to do anymore with this program myself.

Have fun,
Glen.

Old post below...
Hi All,

I just thought I'd start discussing my current project. It's a program that takes a MIDI (Musical Instrument Digital Interface) file and allows the user to select two tracks and then outputs an assembly source code file that is a bunch of FCB's that represents the notes for the song. It currently outputs a format for Simon Jonassen's dipole.asm program. It is the same code he used in his latest Tandy Assembly demo.

Just last night I reached out to John Linville about how his Game Master Cartridge works so that I can also get my program to output music in the correct format for a player for his cartridge. I've made a little progress so far. Then I saw the posting by Ed Snider (Zipster) about his new cartridge the CoCo PSG. Boy that was awesome timing, so I might be working on output for Ed's new cartridge too.

The code is being written in BASIC using qb64. At first it was just going to be a command line tool but has grown in to a graphical display of the tracks and allows the user to pick them graphically.

I attached Simon's dipole.asm CoCo music player (Thank's Mad Man) and a picture of the main screen of my converter below. - Removed now that the program is complete.

Cheers,
Glen
Attachments
mid2coco.zip
Complete package of files used to convert MIDI files to playable music on the CoCo
(140.11 KiB) Downloaded 86 times
Last edited by nowhereman999 on Tue Oct 17, 2017 4:32 pm, edited 3 times in total.
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: MIDI converter project for the CoCo

Postby ogsteviestrow » Tue Oct 17, 2017 1:41 am

This sounds pretty cool, Glen, thanks for sharing.
CoCo music, and electronic music and general is something I've been a fan of since I first heard electronic music in the arcade and on home systems.
The fact we can potentially take a common music file format and port that to code that can be used on some of the new sound hardware out there sounds like a tremendous asset to the community.
Looking forward to reading more about it, and hearing some samples when they become available.
Steve Strowbridge aka The Original Gamer Stevie Strow
Host of CoCoTALK! the nation's leading live talk show featuring the Tandy Color Computer

ogStevieStrow@gmail.com

http://ogsteviestrow.com
http://cocotalk.live
http://imacoconut.com
http://8bit256.com
User avatar
ogsteviestrow
Site Admin
 
Posts: 55
Joined: Mon Sep 18, 2017 11:31 pm
Location: Port Saint Lucie, FL

Re: MIDI converter project for the CoCo

Postby nowhereman999 » Tue Oct 17, 2017 3:41 pm

Hey Steve,

I put together a little video showing what the program can do. This is an example of a MIDI file (Rider's on the Storm by The Doors) converted to Simon Jonassen's background music player.
https://youtu.be/oJV53urcsXE

I'm in the middle of working out how to output the song data for John Linville's Game Master Cartridge and it is progressing pretty well. When I get it working I'll post an example.

I haven't done a lot of testing but it seems like Simon's background player can handle lower notes then the GMC. Using Simon's player code shows the CoCo has a hard time with really high notes. I guess we'll see how Zipster's CoCo PSG cartridge compares. As I ordered one from Ed yesterday.

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: MIDI converter project for the CoCo

Postby nowhereman999 » Tue Oct 17, 2017 8:38 pm

I managed to get some code together to work with John Linville's Game Master Cartridge - GMC

Here is the youtube vide link:
https://youtu.be/Y1O1hCqCceo

The GMC can't play notes below B2 or 123.47 Hz so my converter scans the notes of a track and if the notes are below B2 it moves it up an octave until the lowest note is higher then 123.47 Hz. This means that most bass tracks will be an octave or two higher then they should be. But that's a limitation of the Texas Instruments SN76489 chip. It's pretty noticeable in the video linked above that the bass is too high. The high notes sound pretty good though (better then the CoCo can produce itself). :)

In this format it uses every 2nd vsync IRQ for playback and very little CPU usage when it does get used. It currently only uses two voices even though the Cartridge can play 3 voices and 1 noise channel for some crappy drum sounds. It also supports volume control for each channel which I still need to implement. I do pull the volume data out of the MIDI file but I didn't bother using it since Simon's dipole.asm code doesn't use volume settings. So that will take some more programming to deal with.

I was thinking that two channel audio might be good for the GMC since it leaves you with one music/sound effects channel and one noise channel for game use. I suppose with time I'll add the options and let the user decide what they want/need.

Cheers,
Glen
Last edited by nowhereman999 on Wed Oct 18, 2017 3:43 pm, edited 1 time in total.
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: MIDI converter project for the CoCo

Postby ogsteviestrow » Wed Oct 18, 2017 11:22 am

This is cool stuff Glen, I was a huge fan of MIDI files back around the time of Windows 3.11 they were "The thing" before MP3 took off.
The nice thing about this tool, is it enables somebody without musical abilities to easily get music into a future game project by finding a MIDI file on the net.
If somebody is a musician, they can compose their own original music, and quickly, and easily, get it into a CoCo project.

Great stuff!

The COCO version was a little painful to hear on the high notes, even the SGM was a bit "pitchy" in the higher registers, but the overall sound is great.

Can you go to 3 channels with the hardware sound, and possibly a 4th/percussion on that chip?
Steve Strowbridge aka The Original Gamer Stevie Strow
Host of CoCoTALK! the nation's leading live talk show featuring the Tandy Color Computer

ogStevieStrow@gmail.com

http://ogsteviestrow.com
http://cocotalk.live
http://imacoconut.com
http://8bit256.com
User avatar
ogsteviestrow
Site Admin
 
Posts: 55
Joined: Mon Sep 18, 2017 11:31 pm
Location: Port Saint Lucie, FL

Re: MIDI converter project for the CoCo

Postby Invisible » Wed Oct 18, 2017 1:05 pm

you have a *dud* version of dipole there Glen....

the new one will handle those *highs*

/Simon :-)
:ugeek:
Invisible
 
Posts: 12
Joined: Tue Oct 17, 2017 1:50 pm

Re: MIDI converter project for the CoCo

Postby nowhereman999 » Wed Oct 18, 2017 3:48 pm

Hey Steve,

Yeah the GMC which uses the Texas Instruments SN76489 sound chip can play 3 voices at the same time and it has 1 noise channel for simple percussion sounds. My thinking was to leave the other two channels for the game sound effect themselves but I will probably add the option in the converter where the user can select the tracks and the number of voices they want to use.

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: MIDI converter project for the CoCo

Postby nowhereman999 » Wed Oct 18, 2017 3:51 pm

Hey Simon,

It's awesome to see you here, buddy :)

I guess in the assembly language section you posted the latest version of dipole.asm? I'll check it out now... If it can handle the higher notes better, then that is awesome!

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: MIDI converter project for the CoCo

Postby PacoOtaktay » Mon Oct 30, 2017 1:32 pm

Just thought I would let you know that your zip file will need to be re-uploaded. At some point it got corrupted. :(
PacoOtaktay
 
Posts: 18
Joined: Mon Sep 18, 2017 11:36 pm

Re: MIDI converter project for the CoCo

Postby nowhereman999 » Thu Nov 02, 2017 12:54 am

PacoOtaktay wrote:Just thought I would let you know that your zip file will need to be re-uploaded. At some point it got corrupted. :(


Hi David, I just updated the .zip so it should be a good version now.

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm


Return to Software Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron