Music with my own player

Talk about programming CreatiVision (except games programming). Projects of homebrew hardware are also welcome.
Post Reply
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Music with my own player

Post by carlsson » Tue Feb 05, 2013 12:19 am

As you might know, in the past decade I've developed my own VIC-20 interrupt driven music player used in a few demos and own productions. It is nothing fancy, just rather tight and has a music data structure that I kind of like. So the question was how much work would it be to adopt it to the SN76489 PSG?
acplay.zip
To begin with, I have ignored the noise channel as it seems to be a little bit different. That is not to say I don't understand it, but I need another night to figure it out. Also, studying Kurt's code in the Titanic demo gave me valuable hints. He also included a three octave frequency table. However due to my existing music is arranged around the rather unusual channel structure of the VIC chip, where each channel overlaps the other by one octave, I needed to quickly define another two octaves of notes to get the same relative sounds. Those notes currently sound quite out of tune, but it will be a matter of adjusting.

Actually this is an older version of my player routine. In more recent versions I have implemented vibrato and arpeggio for additional coolness.
You do not have the required permissions to view the files attached to this post.
User avatar
MADrigal
Site Admin
Posts: 1267
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Music with my own player

Post by MADrigal » Wed Feb 06, 2013 3:50 pm

I just tried the music player and hey it works great, and I also LOVE the music! :-)
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Music with my own player

Post by carlsson » Mon Feb 25, 2013 11:39 pm

Now I have implemented the LFSR duty cycle bass on the noise channel. It took me a little work to figure out how the frequences relate to eachother. My note table is based on lowest note 1019 unlike 1023 which Kurt used in his demo. I don't know if the total effect will be any better though. Good thing is that I got silence properly implemented, as it struck me that the SN76489 doesn't have a frequency setting for silence, it needs to be implemented by changing volume of that channel.
acplay-v2.zip
I have included two demo songs: Invention XIII which is the same as before, and Tetris music (Gameboy edition) which might not be 100% correct but gives a preview of what a Tetris game on the Creativision might sound like. Both tunes were originally arranged for VIC-20 with overlapping channels, and in particular in the Bach tune , the bass function will be split between channel 0 (regular tone) and channel 2/3 (LFSR superbass). Ideally for future songs, all the bass will be in the same channel. I will also look into combining it with some kind of drum feature, like you can hear on SID music using arpeggio tables to kick a drum followed by a bass or other note. I think it'd be rather OK.
You do not have the required permissions to view the files attached to this post.
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Music with my own player

Post by carlsson » Mon Mar 04, 2013 10:45 pm

One more update, to make it possible to have many songs in the same file using the same player. This demo contains three songs: Tetris, Penny Lane and Höstvisa by Erna Tauro. Toggle song with fire or move the joystick.
acplay-v3.zip
You do not have the required permissions to view the files attached to this post.
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Music with my own player

Post by carlsson » Wed Mar 06, 2013 3:48 pm

Although I didn't post any more download links, yesterday I realized my player has a built-in function to end individual tracks instead of having them repeat over and over. I fixed the function so the last note plays to the end and then silences the channel when an track is set to end. This will make it easier for me to include jingles that are only meant to be played once. 8-)
User avatar
MADrigal
Site Admin
Posts: 1267
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Music with my own player

Post by MADrigal » Wed Mar 06, 2013 4:18 pm

This is great news. I assume you're soon including music and jingles in the Othello game :-)
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Music with my own player

Post by carlsson » Tue Mar 26, 2013 10:52 pm

I think I'm done with updates to the music player for now being. I have added the noise function, so one can combine bass and drums. It needs to be done with care, and I'm not sure that the middle noise frequency is that much different from the lowest one, but it gives an additional spice to the music. Of course one could set noise frequencies through channel 2, but in the case I combine bass with drum I'd rather not spoil channel 2 with a noise frequency and then reset it. I save some code by using the three preset noise frequencies.
acplay-v4.zip
Vibrato will be a challenge to add, as I'm working with 10-bit frequencies AND they're arranged 8+4 bits in the frequency table. I might add arpeggios later, as those are easier to do and quite typical for chip music.
You do not have the required permissions to view the files attached to this post.
User avatar
Kurt_Woloch
Posts: 16
Joined: Thu Jun 12, 2008 8:00 pm
Location: Wien
Contact:

Re: Music with my own player

Post by Kurt_Woloch » Wed Mar 27, 2013 10:21 am

This is great development! I guess Penny Lane is a bit of a freeform adaption, right? The original song does sound a bit differently...
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Music with my own player

Post by carlsson » Wed Mar 27, 2013 1:38 pm

Well, it originally is a VIC-20 arrangement by Unknown Artist. I found it as a Basic listing in a magazine, supposedly nicked from another magazine, and have made small adjustments to it.
Post Reply