Started by BSC, 14:35, 05 November 13
0 Members and 1 Guest are viewing this topic.
Quote from: BSC on 14:35, 05 November 13So, what I came up with about 1 year ago (and which literally came to a halt since) is a 1 channel waveplayer engine that is capable of playing arbitrary small wave forms at around 13.8 khz. I picked square, triangle, sine and square with variable duty cycle for no obvious reason ;-)
Quote from: BSC on 14:35, 05 November 13I have a couple of docs / drawings / ideas / concepts as to how to solve the upcoming tasks and one big part of it is probably generative programming, i.e. the tightly timed play routine should be generated at startup-time instead of hard-coded. If anyone is interested in helping me on this project, I could post it on github and we could see how it evolves.
Quote from: redbox on 21:40, 05 November 13And what makes this approach more interesting is the CTC-AY which has 2 x 2Mhz YM chips, a full timer AND direct (no PPI) access to the soundchips - imagine an "adapted" routine that works with this
Quote from: redbox on 21:40, 05 November 13This is very interesting and I've been working on a SID player too.
Quote from: redbox on 21:40, 05 November 13This sounds in principal very much like the "Sinus-SID" effect on the Atari ST, but it was only used by Tao I think. What made you take this approach? It's different to the other ways of doing it I've seen so far on the CPC - which are just altering the volume every 64us line (like a lot of Atari ST routines do, albeit at a higher frequency rate) and it's why it's easy to do with the Plus DMA. However, on a CPC this would mean a frequency of 15.625hz where as you've got your waveforms at 13.8khz so I assume you're doing the standard AY routine/calcs first then playing your sample (much in the same way as a digidrum) rather than interleaving the routine so it runs every line...?
Quote from: redbox on 21:40, 05 November 13I'd be interested in seeing the source code and working out the approach you've taken so far.My approach was to take the standard Atari ST timers and then divide them into the nearest multiple that works on the CPC. I know that Offset has already done this for the Plus using DMA but there's no reason it can't be done on a normal CPC (but it will take a lot of CPU time).
Quote from: arnoldemu on 11:47, 06 November 13Yes, or a routine for kc compact (for the 3 of us that have one ). This too has timers
Quote from: BSC on 12:51, 06 November 13Do you have some previews that I could see, I am really curious to see/hear your player
Quote from: BSC on 12:51, 06 November 13After tinkering with this for a while, I came up with a new approach where I play a sample (i.e. write one value from my waveform to a volume register) every 64us (as you suggested in your post) and instead of controlling pitch by changing the delay between 2 samples, I use a 256 bytes (page aligned) wavetable which I cycle by using the hi byte of a 16 bit offset which is increased by another 16 bit offset depending on the target frequency of the tone I want to play. That enabled me to play any 256 byte waveform at arbitrary frequencies.
Quote from: BSC on 12:51, 06 November 13Ah, and about the interweaving: I basically have a loop which just plays a sample every 72us that is preluded by a block of code where I write all the other AY registers depending on AY music that I want to play (just as in the legendary soundtrakker play routine :-D). So I read the current value of register 0, select and write it, select the sample register (which is configurable from the current SID instrument at play) and write the current sample value. Then register 1 and so on until register 11 currently.
Quote from: redbox on 14:52, 06 November 13Well my progress has been a lot of theory and work "in principle" - I managed to get SID voices playing via DMA using a YM dump from the Atari ST but have yet to adapt it for the normal CPC.I think I understand your approach now and essentially you are achieving is what the Atari ST can do, but in reverse. From my understanding, on the ST, they use the master clock (21492Hz) and divide it into multiples which then alter the volume register via interrupt. This is done every frame and also means that you can achieve a lot of different Hz rates. But essentially what they are doing by changing the clock multiple is creating a different waveform over several frames (sine, square, triangle etc) which "overlaps" the main YM sound.Where as your routine takes these waveforms and instead of using the clock to determine them (because the CPC doesn't have one except at 300hz) you are storing them as "samples" which means you can keep all the timings to one frequency rate (13.8Hz), yet still achieve the desired waveforms.Your approach is a good one when you consider you want to make a tracker because selecting the waveform (instead of worrying about clocks etc) would be a lot simpler. Have you seen the SID voices in the maxYMiser tracker? This reminds me quite a lot of your approach.Well this then should be quite easily adaptable for other hardware such as the Plus and CTC-AY. Would be nice to have a player that makes use of all the available hardware
Quote from: BSC on 23:53, 07 November 13It might be the reverse but I think comparing it the any of the (technical) approaches on the Atari ST does not make a lot of sense because the CPC just does not have any timers andso you have no choice but do it in "realtime", just as you do when you make split-rasters or play sampled sounds or whatever takes as much time as it takes.
Quote from: BSC on 23:53, 07 November 13And as some guys (on the pushnpop forum for example) already said: The SID effect itself is not very hard to achieve. What's hard (or painful) is to make it live alongside a player that provides AY generated soundon the other channels
Quote from: BSC on 23:53, 07 November 13A SID voice on it's own sounds nice but is also pretty boring. And, as I said before, I think you don't have to toggle the volume register of your target voice between0 and the current value to achieve a SID sound effect, this is just one approach - mainly the most known one because that's how it was done on the Atari in the first place (and because theAtari has those timers..). And if I stuck to that approach, I would not be able to also play sine, triangle, sawtooth and have full control over the pulse width.
Quote from: BSC on 23:53, 07 November 13Just have a look at the snapshot I provided and all the different instruments there. There's a couple of SID sounds that have a wavelist that sweeps over a set of square waves of different pulse width. You might argue that it's a waste of memory to have so many different square samples, but I think it's worth because you have full control over the effect.
Quote from: redbox on 12:04, 08 November 13I'd love to also have DMA/CTC-AY functionality and it should be relatively easy - are you able to share the source code for it?
Quote from: BSC on 12:53, 06 November 13Currently I am not interested in any hardware stuff. The whole idea of this project is about playing SID effects using software routines on a standard CPC. I might change my mind in the future, but ... the future is yet to come ;-)
Quote from: BSC on 23:34, 07 November 13I am curious to hear what you ppl think (or should I say you one guy that took part in the discussion so far?) about it.
Quote from: McKlain on 16:20, 15 November 13Is anyone else having problems with the downloaded .zip? It seems that it's corrupted, whatever the browser I use to download it.
Quote from: BSC on 00:12, 16 November 13Can't I upload it here on the forum?
Quote from: Gryzor on 10:55, 16 November 13@BSC: Sure mate, go ahead and attach it here, filesize limit is high enough!
Page created in 0.200 seconds with 52 queries.