Tezz Posted March 6, 2004 Share Posted March 6, 2004 emkay... You would need only one "pure" Software Channel......... POKEY has the ability of 2 Channels that can sound like Sid by Hardware That's even better, so basically on the stock 4 channel Pokey hardware, we could have: One software driven "emulated Sid" channel, One channel of Sid programmed sound using two Pokey channels (or we could just utilise the two channels with with individual Pokey tracks) and the one remaining channel for the more traditional Pokey "wave" sounds. If that were possible or even better if a tracker were released with this capability it would be a true revolution. Even if such a routine would leave little or no CPU time to do much else, you would only use such a track on a title screen not in-game. I'm sure the demo coders would be able to push these limitations to the max. With SID emulation to one side, if it is possible to emulate all the ADSR and the multitude of commands from the SID with software routines, then I guess it would be possible to emulate others also. What an amazing oportunity it is to create something unique. like 21st century Pokey music!. Imagine a tracker with software routines that were modular... Ah well we can dream.. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 6, 2004 Share Posted March 6, 2004 emkay... You would need only one "pure" Software Channel......... POKEY has the ability of 2 Channels that can sound like Sid by Hardware That's even better, so basically on the stock 4 channel Pokey hardware, we could have: One software driven "emulated Sid" channel, One channel of Sid programmed sound using two Pokey channels (or we could just utilise the two channels with with individual Pokey tracks) and the one remaining channel for the more traditional Pokey "wave" sounds. Just don't forget that when two channels are combined, you can set the "not used" Channel to Volume only and use this for the SID emulation. After those two channels(16Bit or filter) plus one PCM , you still have two pokey channels available. You can try to use them as standard 8-Bit channels, or you can redo the techniques ....: 16 bit or Filter plus PCM. At the end you have two 16Bit or Filtered Voices plus two pcm Channels. Only when using 16Bit filtering, you would have only three channels available. 16 Bit Filtering plus one PCM channel plus one 8-bit channel (or PCM) .... A Soundeditor should have the ability to set POKEYs features and which channels are free for using them with PCM. like 21st century Pokey music!. Imagine a tracker with software routines that were modular... Ah well we can dream.. Quote Link to comment Share on other sites More sharing options...
analmux Posted March 6, 2004 Share Posted March 6, 2004 Just don't forget that when two channels are combined, you can set the "not used" Channel to Volume only and use this for the SID emulation.After those two channels(16Bit or filter) plus one PCM , you still have two pokey channels available. You can try to use them as standard 8-Bit channels, or you can redo the techniques ....: 16 bit or Filter plus PCM. At the end you have two 16Bit or Filtered Voices plus two pcm Channels. Wait a minute For PCM isn't there a pokey-timer-irq needed? That eats away one (or two) voice(s). Off course it is possible to have 2 audf timers to play PCM and use the volume-only bits of the same two channels to make the sound. Then have another two 'standard' pokey voices, but when the other two are combined with the first two (by 16bit pitch resolution or filtering) then the pitches are 'corelated' (to use one of your terms) and the PCM update frequencies are now depending on the pitches of the 16bit/filter channel. ...or do we use another way to trigger PCM updatings??? Quote Link to comment Share on other sites More sharing options...
Tezz Posted March 6, 2004 Share Posted March 6, 2004 emkay wrote.. Just don't forget that when two channels are combined, you can set the "not used" channel to volume only and use this for the SID emulation. After those two channels (16Bit or filter) plus one PCM , you still have two pokey channels available. That makes sense if this is software driven. analmux wrote. ...when the other two are combined with the first two (by 16bit pitch resolution or filtering) then the pitches are 'corelated' the PCM update frequencies are now depending on the pitches of the 16bit/filter channel. That's a good point. Maybe even if this is software driven that might be an issue Perhaps Saint (Swiety) could shed some light on this. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 6, 2004 Share Posted March 6, 2004 Wait a minute For PCM isn't there a pokey-timer-irq needed? That eats away one (or two) voice(s). Ask Swiety, how he putted 4 PCM channels around for playing the AMIGA Mod. Off course it is possible to have 2 audf timers to play PCM and use the volume-only bits of the same two channels to make the sound. Then have another two 'standard' pokey voices, but when the other two are combined with the first two (by 16bit pitch resolution or filtering) then the pitches are 'corelated' (to use one of your terms) and the PCM update frequencies are now depending on the pitches of the 16bit/filter channel. ...or do we use another way to trigger PCM updatings??? ??? Ofcourse you can set pitch and volume in different registers....(and I think you know that). When using joining of two channels, all you just have to do is to use the main Voice for POKEYS generator Output. The "passive" Voice you can set to "Volume only" and play around with the voltage bit for PCM... and you can set the pitch of the passive channel to modify the main Voice.... where is the problem ? When Antic DMA Display is "on" just use the vcounter and DLI for playing music. To create proper sounding instruments, you only have to built them using the same techniques Heck.... with this techniques you can play SID songs and show G2F Pictures at on time. Quote Link to comment Share on other sites More sharing options...
tebe Posted March 6, 2004 Author Share Posted March 6, 2004 ;------------------------------------ ;- PROCEDURKA PLAYER-a DLA 4 KANALOW ;------------------------------------ org $0010 player equ * ;- kanal #1 clc del0 lda #0 del0m adc #0 sta del0+1 adr0 lda #0 del0h adc #0 andmod0 and #$1f sta adr0+1 tay adres0 ldx $ff00,y ; adres 1-ego sampla vol0 lda volume,x ; adres tablicy glosnosci dla 1-ego sampla ch0 sta audc1 ;- kanal #2 clc del1 lda #0 del1m adc #0 sta del1+1 adr1 lda #0 del1h adc #0 andmod1 and #$1f sta adr1+1 tay adres1 ldx $ff00,y ; adres 2-ego sampla vol1 lda volume,x ; adres tablicy glosnosci dla 2-ego sampla ch1 sta audc2 ;- kanal #3 clc del2 lda #0 del2m adc #0 sta del2+1 adr2 lda #0 del2h adc #0 andmod2 and #$1f sta adr2+1 tay adres2 ldx $ff00,y ; adres 3-ego sampla vol2 lda volume,x ; adres tablicy glosnosci dla 3-ego sampla ch2 sta audc3 ;- kanal #4 clc del3 lda #0 del3m adc #0 sta del3+1 adr3 lda #0 del3h adc #0 andmod3 and #$1f sta adr3+1 tay adres3 ldx $ff00,y ; adres 4-ego sampla vol3 lda volume,x ; adres tablicy glosnosci dla 4-ego sampla ch3 sta audc4 bne player beq player ; to sie nie zdarza ! (dla pewnosci jest) Quote Link to comment Share on other sites More sharing options...
analmux Posted March 6, 2004 Share Posted March 6, 2004 ??? Ofcourse you can set pitch and volume in different registers....(and I think you know that). When using joining of two channels, all you just have to do is to use the main Voice for POKEYS generator Output. The "passive" Voice you can set to "Volume only" and play around with the voltage bit for PCM... and you can set the pitch of the passive channel to modify the main Voice.... where is the problem ? When Antic DMA Display is "on" just use the vcounter and DLI for playing music. To create proper sounding instruments, you only have to built them using the same techniques Heck.... with this techniques you can play SID songs and show G2F Pictures at on time. Yes I KNOW that. But if you want to generate PCM with timer IRQs THEN you'll have the issue with the corelated pitches like I described above. If there's another way of generating then it's no problem at all. I've know of the 4 PCM channel MOD-players for a few years, and another way is off course synchronizing with Wsyncs or a long (maybe unrolled) kernel routine (like a display kernel) as main process instead of interrupt, but syncing PCM with the display will surely give alias noises and others, but in most cases it could work as far as I can see. Would be worth to try. By the way, on the prototype of the SID-extension-board I've built for the A8bit two years ago I mounted a 6510 to play samples from it's own board-RAM. I generated PCM just with a simple wait loop in machinecode: return ldx #delay dex bne return lda #nextsampledata sta volume_only jmp return That was because I didn't even have IRQ line connected on the 6510. Then the samplewidth (instead of samplerate) is related to #delay. Quote Link to comment Share on other sites More sharing options...
analmux Posted March 6, 2004 Share Posted March 6, 2004 In PAL we have 50 frames per second, and 312 display lines per frame (or 312 wsyncs). So that gives 15600 wsyncs per second, equivalent to a samplerate of 15600. This should be far enough to kill most alias noises. Another problem we have with fixed samplerate is this: For every note/pitch we have to recalculate (stretch/skew) the waveform. That is NO problem if we have a wavetable for every note and every type of sound. Remember, on such a small time-basis we do not have room for sound processing logic like filtering or whatever. Everything should already be in one huge wavetable. But off course this is nothing new, just my comment on the discussion. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 6, 2004 Share Posted March 6, 2004 In PAL we have 50 frames per second, and 312 display lines per frame (or 312 wsyncs). So that gives 15600 wsyncs per second, equivalent to a samplerate of 15600. This should be far enough to kill most alias noises. Another problem we have with fixed samplerate is this: For every note/pitch we have to recalculate (stretch/skew) the waveform. That is NO problem if we have a wavetable for every note and every type of sound. Remember, on such a small time-basis we do not have room for sound processing logic like filtering or whatever. Everything should already be in one huge wavetable. But off course this is nothing new, just my comment on the discussion. Wsync in ... DMA out.... I would even appreciate if only a full working hybrid Soundplayer would exist Quote Link to comment Share on other sites More sharing options...
analmux Posted March 6, 2004 Share Posted March 6, 2004 There's even a backup plan of combining PCM and G2F: Reduce samplerate to 7800 (every even scanline wsyncing the sound updates) -Just use graphics 7 (or antic 5 charmode for 5th color) instead of 15: -even scanlines: DLI with GTIA register changes -odd scanlines inbetween should be used to play digital sound -Use graphics 15 or antic 4 charmode and just do no GTIA changes on odd lines, but we can keep the higher resolution. -again: odd scanlines for PCM. In this configuration we don't have the Badline-conflict with PCM So we reduce samplerate and colorcell/band resolution, but we can combine them now in an elegant way. The main problem is (again ) memory. With enough memory (like a flashcart) we can have many wavetables. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 6, 2004 Share Posted March 6, 2004 There's even a backup plan of combining PCM and G2F: Reduce samplerate to 7800 (every even scanline wsyncing the sound updates) -Just use graphics 7 (or antic 5 charmode for 5th color) instead of 15: -even scanlines: DLI with GTIA register changes -odd scanlines inbetween should be used to play digital sound -Use graphics 15 or antic 4 charmode and just do no GTIA changes on odd lines, but we can keep the higher resolution. -again: odd scanlines for PCM. In this configuration we don't have the Badline-conflict with PCM So we reduce samplerate and colorcell/band resolution, but we can combine them now in an elegant way. The main problem is (again ) memory. With enough memory (like a flashcart) we can have many wavetables. For real good POKEY Music, you don't need to "sample" in such high rates. With 4000 Hz sampling, you have the possibility to playback 2000Hz very clear. For percussions/Bass-lines and oscillating POKEYs voices, it is really more than enough! When building an LFO for the POKEY'S Voices, you will get clearer and more tuned notes though... Quote Link to comment Share on other sites More sharing options...
analmux Posted March 7, 2004 Share Posted March 7, 2004 For real good POKEY Music, you don't need to "sample" in such high rates. With 4000 Hz sampling, you have the possibility to playback 2000Hz very clear. For percussions/Bass-lines and oscillating POKEYs voices, it is really more than enough! When building an LFO for the POKEY'S Voices, you will get clearer and more tuned notes though... I'm sorry to disagree with you completely. When we use 4000 Hz samplerate, indeed the highest producable pitch is 2000 Hz, but at these pitches: -you're limited to squarewaves as now waveform detail is destroyed. -when we need a slightly lower pitch (f.e. half a note under 2000 Hz => 1887 Hz will give very heavy aliasing distortion) I think 7800 Hz is a quite reasonable playback samplerate. Remember that normal sampling is far easier with variable (note-dependent) samplerate as there's no aliasing and we don't need a wavetable for EVERY note. If you want to synchronize samples and G2F you're limited to fixed samplerates. And another point: 7800 Hz gives definitely higher sound quality than 4000 Hz (which is clearly not a divisor of 7800 and will not be a useful samplerate) and it's achievable, so your arguments seem to fail. If you want to push the machine's limits (I think it was you always complaining about classic programmers not pushing the limits ), then you should go further than 4000 Hz, let's say: a nice 7800 Hz. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 7, 2004 Share Posted March 7, 2004 And another point: 7800 Hz gives definitely higher sound quality than 4000 Hz (which is clearly not a divisor of 7800 and will not be a useful samplerate) and it's achievable, so your arguments seem to fail. If you want to push the machine's limits (I think it was you always complaining about classic programmers not pushing the limits ), then you should go further than 4000 Hz, let's say: a nice 7800 Hz. There is no "fail" in my argues .-) Some questions(not to answer.... just to think about): How deep POKEY can play a note? Without getting some squarewave noise only? How is it possible to build soundmanipulations? How much steps must be generated to gain a full octave? Your 7800Hz can be set to a max of 3900Hz ... if you want My intentions are at around 600Hz and to build variations for PCM from 50Hz up to 600 Hz. In theory (belonging to the timing) it must be possible to use the POKEYs interrupts at this low frequency plus DLI, when using MCS (not G2f)... while in a puzzle game.... All that was to do, was to "tune" software- and hardwaresound together and you would have more "Sid" as you ever thought of. Quote Link to comment Share on other sites More sharing options...
analmux Posted March 7, 2004 Share Posted March 7, 2004 There is no "fail" in my argues .-) Well, let me show you where they fail, though I think I've been clear enough: You claim we wouldn't need a S.R.(=samplerate) of 7800 1st argument: you say: With 4000 Hz sampling, you have the possibility to playback 2000Hz very clear -Which is clearly NOT the case because you are restricted to SQUAREWAVES, so the high end of the pitch spectrum is not that flexible at all, then you can use a Pokey voice as well to generate the 2000 Hz -Aliasing. Try to generate 1999 Hz with 4000 Hz S.R. 2nd argument: you say: For percussions/Bass-lines and oscillating POKEYs voices, it is really more than enough! -Percussions sound like shit at such low samplerates. As bit depth is already low (4bits) we surely need the highest possible samplerate to regain quality. CD quality is 44100 Hz and I've heard there are some people who think that 44100 Hz is still too low. Your 7800Hz can be set to a max of 3900Hz ... if you want So, this is NOT what I want. My intentions are at around 600Hz and to build variations for PCM from 50Hz up to 600 Hz. How much experience do you have with this? Do you have any example code? Still, if you want 600 Hz waves, you have a waveform of 6 or 7 steps in 3900 Hz S.R., then I'd definitely go for 7800 Hz as it'll allow far more detail in waveform (with 12/13 steps). In theory (belonging to the timing) it must be possible to use the POKEYs interrupts at this low frequency plus DLI, when using MCS (not G2f)... while in a puzzle game.... You may remember the Asymmetric square-wave topic where we discussed timer IRQs and DLI. DLI blocks IRQ, so we have a serious issue there, that's why we need a fixed samplerate (synced with wsync) which must be a divisor of 15600 ...by the way: remember Dynakillers for A8bit (Bomberman clone), it plays a lot of samples. Conclusion: You must go your own way, and I will go my own way. I think we should take more care of soundquality, at least I find sound quality far more important. In the end it's possible to do 7800 Hz sampling, because we have every odd rasterline reserved for updating two voices (remember graphics 7: no DMA on every 2nd rasterline) in the configuration I described above. So why not do it, when it IS possible?? ...but wasn't this thread about Softsynth 2? No SPAMming.... Quote Link to comment Share on other sites More sharing options...
emkay Posted March 7, 2004 Share Posted March 7, 2004 Conclusion: You must go your own way, and I will go my own way. Well... It's a long way to Timberary Perhaps my english isn't good enough to explain what my intentions are, so it makes no sense to go further with this...But, "my way" was/is the way with colorfull graphics and cool sounding music as it CAN be done. And maybe... once there will be a Soundeditor, that uses my "ideas", my explanations will get more "understandable".... I tried to explain by words and I tried to explain by using some songs with "special" soundings on an available Soundeditor and it's possibilities .... without the result of any positive feedback... (and i think that it will never get recognized as I hoped it should have been) This time another guy did a great job with this SID Emulation.... my next explanation will follow when an "advanced M.T." is done... Quote Link to comment Share on other sites More sharing options...
analmux Posted March 7, 2004 Share Posted March 7, 2004 Well, Emkay, One simple question: Do you think 'my way' is not possible? Samples of percussion can take a lot of memory but when using sampling for synth-purposes, we can use relatively small wavetables, as the looped waveforms are rather short. We CAN have a huge amount of waveforms and notes in memory. The purpose of MY WAY of PCM is wavetable synthesis, and percussion samples in the second place. Then combining your idea we could have two 16bit/filtered voices and two PCM voices at 7800 Hz. I won't wait for a Music Tracker to proof my idea. I think I should show my concept in a little demo, though my time is quite full at the moment. maybe even some scrolling MCS and PCM. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 7, 2004 Share Posted March 7, 2004 Well, Emkay, One simple question: Do you think 'my way' is not possible? Referring to most Games and Demos ....it cannot be possible. Especially when using DLI's. I won't wait for a Music Tracker to proof my idea. I think I should show my concept in a little demo, though my time is quite full at the moment. "Your" Idea may be available when Swiety has enhanced his development on his SID-Player. Referring to "my Idea" approximately zero coders are working on a similar software. maybe even some scrolling MCS and PCM. Well .... there is no Font Size available to show how big my doubts are Quote Link to comment Share on other sites More sharing options...
analmux Posted March 8, 2004 Share Posted March 8, 2004 Well .... there is no Font Size available to show how big my doubts are Now, come on.....didn't Sheddy's Space-Harrier have samples in it? That's graphics 7 too. I wonder how high his Samplerate is. I hope he reads this topic. Quote Link to comment Share on other sites More sharing options...
tebe Posted March 8, 2004 Author Share Posted March 8, 2004 new version of Player, works with Atari DOS player_atari_dos.zip Quote Link to comment Share on other sites More sharing options...
Tezz Posted March 8, 2004 Share Posted March 8, 2004 Hey Emkay, Analmux. That's some heated debate going on there!! Do you need someone to ring a bell in between rounds!! No, seriously, You've both brought some valid arguments into this subject, It's debates and proving yourself correct with examples of working code that will show what is possible and advance others knowledge. Keep up the good work, We all look forward to seeing what each other can acheive. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 8, 2004 Share Posted March 8, 2004 Well .... there is no Font Size available to show how big my doubts are Now, come on.....didn't Sheddy's Space-Harrier have samples in it? That's graphics 7 too. I wonder how high his Samplerate is. I hope he reads this topic. MY doubts are belonging to "MCS and PCM". GR.7 is another drawer . Quote Link to comment Share on other sites More sharing options...
analmux Posted March 8, 2004 Share Posted March 8, 2004 Emkay, where's the problem? Then you'll probably say: MCS needs charmode. But charmode is no problem at all. Though we have the extra badlines, but we can avoid them easily: make badlines transparant for PCM (PCM always on odd scanline). Maybe you're right and my idea won't work in antic 4...but what the heck: antic 5 is charmode too, so technically we can have MCS kind of screen in gr.7 resolution ---> As a backup plan we should: -use antic 5 charmode as it's a similar resolution and DMA scheme as gr.7 -restrict ourselves to horizontal scrolling (for a constant badline scheme) vertical scrolling MCS and PCM will indeed far more difficult and we can have our doubts. The main purpose of MY WAY is, by the way, just titlescreens (or static puzzle-game screens). Adding scrolling MCS is just for fun (if it is after all possible). --------------- [Off-topic=OFF] I'll try the new player on the real atari tonight. I hope it'll work. Quote Link to comment Share on other sites More sharing options...
Sheddy Posted March 8, 2004 Share Posted March 8, 2004 Well .... there is no Font Size available to show how big my doubts are Now, come on.....didn't Sheddy's Space-Harrier have samples in it? That's graphics 7 too. I wonder how high his Samplerate is. I hope he reads this topic. MY doubts are belonging to "MCS and PCM". GR.7 is another drawer . only 3900Hz guys. think there'd be problems with 7800Hz with DLI's on as well, not that I've experimented much with sound. Quote Link to comment Share on other sites More sharing options...
analmux Posted March 9, 2004 Share Posted March 9, 2004 For those who can't play the last version of the player on a real machine or have crappy emulators: Here's an mp3 (though just 22.050 kHz in 64kbps mode) http://www.phys.uu.nl/~bpos/mp3/play_dos.mp3 It's my real a8bit at work. -------- @ Sheddy: How did you generate the samples? synced with DLI or wsyncs (kernels maybe??), or a pokey-timer?? In the above context we already discarded the pokey-timer option for two reasons: -frequency byte is already used for normal channels (16bit and filter) so we can't have an independent audf samplerate. -pokey-timer IRQs conflict with DLIs That's why it would need to be implemented inside the DLI itself and synchronized with Wsync. Then I think it must be possible (I only think that ). And it should run at 7800 Hz (50% cpu time = maybe overkill) instead of 3900 Hz (25% cpu time = maybe best balance for ingame music). Quote Link to comment Share on other sites More sharing options...
Saint (Swiety) Posted March 9, 2004 Share Posted March 9, 2004 I have another idea fo playing samples when screen is turn on. For up and down border i can play my routine on normal POKEY IRQ. POKEY IRQ triggering on 1.79 MHz Channlel - every 2 raster lines. Why 1.79 - because if most simply for cycling routine. I calculated - at line i have 114 cycles , by two lines 228 cycles , 9 for refreshing memory when screen is turn off. 8 cycles for starting IRQ. When the graphics starting i think that IRQ rutine must finish by STA $d40a and IRQ counter running at fastest speed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.