News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_BSC

SID tracker / player on CPC (non plus)

Started by BSC, 13:35, 05 November 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gryzor

Lovely, very cute. Waiting for the full tune! :)

BSC

Quote from: redbox on 08:14, 10 January 14
That sounds really good, excellent resolution on the sounds.

What type of waveforms are you using on each channel?


It is plain AY sounds on all channels and, additionally, on channel B a SID voice
which plays the same notes as AY channel B in unison, using a sinus waveform.
This is in effect very similar to your demo tracks, except for the Sinus waveform.

** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

arnoldemu

Is there asm code for the player itself available, and is there a way to export/compile the songs to a form that can be used.
The reason I ask is that I would like to use SID like sound in a future demo/game I have planned.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

BSC

Quote from: arnoldemu on 10:31, 13 January 14
Is there asm code for the player itself available, and is there a way to export/compile the songs to a form that can be used.
The reason I ask is that I would like to use SID like sound in a future demo/game I have planned.

A way to export/compile is actually planned, but currently not there. You could, theoretically, branch the tracker and build
a quick hack that does only the playing. Or you could help with the project and take care of the compiler ;-)

Since I made the last changes, avalanches of ideas have been rumbling my head and I think if I was to implement all of
them by myself, the tracker would not be finished before 2020 (given my current pace)..

I am still planning to put the whole project on github for collaborative work. If you like, I will inform you when I am done with that.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

redbox

Quote from: BSC on 09:21, 13 January 14
It is plain AY sounds on all channels and, additionally, on channel B a SID voice
which plays the same notes as AY channel B in unison, using a sinus waveform.

I had a look on the scope and you do have some waveforms approximating a sinus form which sound very nice.  Why did you play the square AY at the same time (on a different channel) - did it sound better that way...?

Here is my sinus waveform table for the AY:


d_wavetable_sin:
db &0d,&0d,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e
db &0e,&0e,&0e,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
db &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
db &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
db &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
db &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
db &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0e,&0e
db &0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0e,&0d
db &0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0c,&0c,&0c,&0c
db &0c,&0c,&0c,&0c,&0c,&0b,&0b,&0b,&0b,&0b,&0b,&0b,&0a,&0a,&0a,&0a
db &0a,&0a,&0a,&09,&09,&09,&09,&08,&08,&08,&08,&08,&08,&07,&07,&06
db &05,&05,&04,&03,&03,&02,&01,&01,&01,&01,&01,&01,&01,&01,&01,&01
db &01,&01,&01,&01,&01,&01,&01,&01,&01,&01,&01,&02,&03,&03,&04,&05
db &05,&06,&07,&07,&08,&08,&08,&08,&08,&08,&09,&09,&09,&09,&0a,&0a
db &0a,&0a,&0a,&0a,&0a,&0b,&0b,&0b,&0b,&0b,&0b,&0b,&0c,&0c,&0c,&0c
db &0c,&0c,&0c,&0c,&0c,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d,&0d


Is this similar to yours?

BSC

Quote from: redbox on 17:11, 13 January 14
I had a look on the scope and you do have some waveforms approximating a sinus form which sound very nice.  Why did you play the square AY at the same time (on a different channel) - did it sound better that way...?

I don't know if I understand your question..
I played AY squares on all the channels to demonstrate that the track editor (which allows you to create/edit AY and wave tracks) is working
and that you can combine tracks (i.e. voices) freely. A song consists of 4 tracks per step, 3 tracks are mapped to AY voices A,B,C and one track
is mapped to to the wave table player. This demo is about AY music on all 3 channels + a wave (sinus) voice that modulates one of the AY channels.
Similar to the sinus sid effect on the Atari. The other demos I posted were basically about the wave player itself, without modulating an
existing AY voice (because that was not really possible at that time)

I don't have the layout of my sinus waveform in my head ;) I'll have a look when I can and will post the table.
The main difference that I can see is that the values in my table are between 8 and 15 (instead of 0 to 15).
This is so I can subtract a value deduced from the volume table to have basic volume envelope support.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

redbox

Quote from: BSC on 10:07, 14 January 14
This demo is about AY music on all 3 channels + a wave (sinus) voice that modulates one of the AY channels.
Similar to the sinus sid effect on the Atari. The other demos I posted were basically about the wave player itself, without modulating an
existing AY voice (because that was not really possible at that time)

This is why I asked - I'm trying to understand how you modulated a square AY tone into a sinus tone (this from my experience is not easy!).

Previously you said you were just using the wavetable alone to produce the tone and now you're modulating.  Why the change, did it sound better?

BSC

Quote from: redbox on 12:10, 14 January 14
This is why I asked - I'm trying to understand how you modulated a square AY tone into a sinus tone (this from my experience is not easy!).

Previously you said you were just using the wavetable alone to produce the tone and now you're modulating.  Why the change, did it sound better?


I just wanted to try it out.. finally.. as I said: before my latest extensions it was not really (easily) possible to create a modulation
on an AY voice using the editor. I had to hard-code everything in the source code. And generally I like to experiment with all the
different possibilities. Modulation was one such thing. And plain wave sounds (like in my first soundcloud examples) were another.
And I was indeed surprised by the sinus-sid effect.


The modulation is in effect achieved by playing the same track on AY voice B and on the wave voice which targets the voice B volume register.

** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

BSC

Quote from: redbox on 17:11, 13 January 14
I had a look on the scope and you do have some waveforms approximating a sinus form which sound very nice.


Can you provide some screenshots? I'd like to see how it looks like.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

redbox

Quote from: BSC on 15:54, 14 January 14
Can you provide some screenshots? I'd like to see how it looks like.

Can you provide a demo with just the AY and Waveform isolated (i.e. channel B)...?

I could the provide you with clearer screenshots from the scope.

BSC

Quote from: redbox on 21:52, 15 January 14
Can you provide a demo with just the AY and Waveform isolated (i.e. channel B)...?

I could the provide you with clearer screenshots from the scope.


Sure I could, but I could also have recorded the audio (with only channel B) myself and had a look in Audacity :D


Anyway, I am currently preparing to put the source on github - that includes collecting ideas / todos and converting them into issue descriptions (for myself at least but hopefully for anyone who wants to contribute), so that there will hopefully be a bit more progress soon.


Thus, stay tuned..! :)
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

arnoldemu

I don't have time to contribute now. I plan that when I will use a SID sound i will contribute then.
So if the export etc is not written when i want to use it, I can write that then.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

BSC

Quote from: redbox on 12:10, 14 January 14
This is why I asked - I'm trying to understand how you modulated a square AY tone into a sinus tone (this from my experience is not easy!).


What part did you experience to be not easy? I thought that if you have a square wave of e.g. 400hz that you modulate with a sine wave of 400hz you should (depending on the sine waveform you are using) get a quite sinus-ish wave form in the end.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

ralferoo

Quote from: BSC on 12:22, 14 January 14
The modulation is in effect achieved by playing the same track on AY voice B and on the wave voice which targets the voice B volume register.
Sorry, I'm a bit thick and don't really understand what you're doing here. I understand the AY registers, but I've never managed to get a pleasant sounding noise out of them myself... ;)

The "wave voice" is just the CPU changing the volume of channel B, right? And then you're playing normal notes on channel B with modulated volumes? And these modulated volumes is just a sine wave?

Whatever it is, it sounds awesome, but I'd love to understand how this works! :)

BSC

Quote from: ralferoo on 00:29, 22 January 14
The "wave voice" is just the CPU changing the volume of channel B, right? And then you're playing normal notes on channel B with modulated volumes? And these modulated volumes is just a sine wave?


Given your thickness you pretty much nailed it! ;-)
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

redbox

Quote from: BSC on 23:40, 21 January 14
What part did you experience to be not easy? I thought that if you have a square wave of e.g. 400hz that you modulate with a sine wave of 400hz you should (depending on the sine waveform you are using) get a quite sinus-ish wave form in the end.

I have managed to create a sinus wave sound myself by just playing the wavetable (like your original demo) and it sounds nice - although the resolution was a little 'bitty'.  My attempts at sinus with modulation didn't sound too good though, which is why I was interested in your demo.

In your second demo you're playing the AY and modulating as well - so you're starting with a square wave and then modulating it.  I suspect that this method is introducing a slight alteration of the duty cycle so in effect you're creating some timbre (like with the SID chip) and that's why it sounds good.  Maybe it's because you are altering at ~13khz (mine is with DMA at ~15khz) and this is changing things - I need to look on a scope though with just channel B to see what's actually going on though.

Quote from: ralferoo on 00:29, 22 January 14
The "wave voice" is just the CPU changing the volume of channel B, right? And then you're playing normal notes on channel B with modulated volumes? And these modulated volumes is just a sine wave?

Yes, this is what a waveform voice is, using the same method of playing a sample on the CPC.

BSC First demo - he 'bypassed' the AY and stepped through these samples at different rates to create different tones.  He also had different types (square, triangle, buzzsaw etc).

My First demo - I bypassed the AY and stepped through a sample of the square wave, in effect replicating the AY.  Then I delayed this sample and played the AY tone at the same time which lengthens or shortens the duty cycle of the soundwave, introducing timbre.  This is what the Commando demo did and the most common effect on the ST.

BSC Second demo - this time he played a AY tone and a sinus sample at the same time (but with no delay I think) and created that sound.

BSC is of course using a classic CPC and I am using the Plus DMA so we get slightly different effects :)

BSC

#66
Quote from: redbox on 10:08, 22 January 14
I have managed to create a sinus wave sound myself by just playing the wavetable (like your original demo) and it sounds nice - although the resolution was a little 'bitty'.  My attempts at sinus with modulation didn't sound too good though, which is why I was interested in your demo.

Could this be due to the fact that you had no proper interpolation? My demos are all based on the 256 bytes wavetable which is interpolated.

Quote from: redbox on 10:08, 22 January 14
In your second demo you're playing the AY and modulating as well - so you're starting with a square wave and then modulating it.  I suspect that this method is introducing a slight alteration of the duty cycle so in effect you're creating some timbre (like with the SID chip) and that's why it sounds good.  Maybe it's because you are altering at ~13khz (mine is with DMA at ~15khz) and this is changing things - I need to look on a scope though with just channel B to see what's actually going on though.

No, no.. In the second demo.. wait a minute (and scroll down)..

Quote from: redbox on 10:08, 22 January 14
BSC First demo - he 'bypassed' the AY and stepped through these samples at different rates to create different tones.  He also had different types (square, triangle, buzzsaw etc).

My First demo - I bypassed the AY and stepped through a sample of the square wave, in effect replicating the AY.  Then I delayed this sample and played the AY tone at the same time which lengthens or shortens the duty cycle of the soundwave, introducing timbre.  This is what the Commando demo did and the most common effect on the ST.

BSC Second demo - this time he played a AY tone and a sinus sample at the same time (but with no delay I think) and created that sound.

BSC is of course using a classic CPC and I am using the Plus DMA so we get slightly different effects :)

Just to set the record straight concerning my 3 demos on soundcloud:

demo 1 - CPCSid by Carl Carbunckel on SoundCloud - Hear the world's sounds - was just the wave engine (demonstrating many different instruments / wave forms), no AY voices, as redbox said
demo 2 - CPCSid next try by Carl Carbunckel on SoundCloud - Hear the world's sounds - contains 2 AY voices (A and C) and 1 wave voice (on voice B, using different wave instruments, i.e. waveforms, arpeggio etc.) with no modulation of an AY voice!
demo 3 - Sid3 by Carl Carbunckel on SoundCloud - Hear the world's sounds - contains 3 AY voices + 1 wave voice (using a sine wave) which modulates AY voice B. The melody which is played on voice B and the wave voice is exactly the same (it's actually the same track).

As far as the "sid3" demo goes, there was no explicit delay (i.e. difference in the resulting frequency values), but there's still different amounts of beating (which I called sweeping all the time, which was the wrong term btw) between any of 2 tones, depending on the pitch, because many of the AY period to frequency transformations result in a relatively high error, especially when compared to wave engine, which does not do integer division to deduce the frequency and seems to be a bit more precise.. These small, unintentional differences could be considered to add to the richness of the sounds ;-)
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

sigh

The third demo is incredibly rich in sound!
If the 3rd demo was done in the non-sid way, it would be interesting to see what the difference in ram consumption.

Which leads to my next question...

Could this be used in any of the following:

1) Game while actually playing
2) Title screen with animation
3) CPC Demo

TFM

Well, the way I understand it, the SID emulation is pretty time consuming. So I would rather say no. But BSC can surely give you details.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: sigh on 22:54, 22 January 14
The third demo is incredibly rich in sound!
If the 3rd demo was done in the non-sid way, it would be interesting to see what the difference in ram consumption.

Which leads to my next question...

Could this be used in any of the following:

1) Game while actually playing
2) Title screen with animation
3) CPC Demo
No on 1 and 2.
Yes on 3.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

redbox

Classic CPC routines take the whole frame, so no room left for anything else.

Using the Plus and DMA it could be used like normal music.

sigh

Quote from: arnoldemu on 10:28, 23 January 14
No on 1 and 2.
Yes on 3.


So with 3 it would have to be an extremely limited demo, with maybe a static picture or some text?


Quote from: redbox on 12:24, 23 January 14
Classic CPC routines take the whole frame, so no room left for anything else.

Using the Plus and DMA it could be used like normal music.



Very interesting. It shows how big the leap from the CPC to the PLUS in the sound department is.

BSC

#72
Quote from: sigh on 22:54, 22 January 14
The third demo is incredibly rich in sound!
If the 3rd demo was done in the non-sid way, it would be interesting to see what the difference in ram consumption.

The ram consumption is actually not so different with/without the wave engine. Probably a couple of kb for the 3rd demo (which does only use one wave form)

Quote from: sigh on 22:54, 22 January 14
Could this be used in any of the following:

1) Game while actually playing
2) Title screen with animation
3) CPC Demo

I would say it depends. Theoretically it could be used in all kinds of programs. A title screen with animation (especially things like color cycling or fullscreen hardware scrolling) is definitely possible. A game or demo would both suffer from the limited access to the CPU. Everything would have to be integrated with the player engine, which takes approx. 30 of 72 nops per loop iteration on most iterations (which could or rather should be unrolled to support code being weaved into it). So if you had a really simple game like snake and not too much game logic, that should be possible. The same is true for a demo. I have a couple of ideas which all revolve around color cycling and fullscreen hardware scroll (i.e. no splits) that I would like to try out. One limitation which affects all scenarios is register assignment: The player pre-loads almost all CPU registers (except for those that carry live data e.g. to send to the PSG) so you either had to put most of your game data in memory, or resort to ix/iy indexed access or take away some of the registers at the price of more nops per wave player loop.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

BSC

Quote from: redbox on 12:24, 23 January 14
Classic CPC routines take the whole frame, so no room left for anything else.


Nope.. See my other response.
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

BSC

Quote from: sigh on 12:57, 23 January 14

So with 3 it would have to be an extremely limited demo, with maybe a static picture or some text?

Very interesting. It shows how big the leap from the CPC to the PLUS in the sound department is.


The leap is indeed big, but not so much. See my other response. Maybe I know the engine better than anyone else.. but really.. just maybe ;-)
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

Powered by SMFPacks Menu Editor Mod