Jump to content

Photo

POKEY remix contest


22 replies to this topic

#1 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 6:27 AM

Hi...

 

thanks to Wratchchild here is the Rob Hubbard music driver Rob used on the POKEY.

 

attachted in MADS format but should be able to be adapted to other assemblers.

 

What about a small fun contest...

 

try to alter the patterns etc to start a new tune? so we can see what's possible?

 

example tune is International Karate.

 

 

Attached Files



#2 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 6:56 AM

and here is David Wittaker's driver with Storm example.

 

same... MADS format but this time Mark setup some macros so you can set notes directly instead of numbers...

 

DW.ASM is the main driver simply assemble that one... storm.asm is the song data.

 

assembling should be easy:

 

MADS ik.asm -:oik.xex

 

or 

 

MADS dw.asm -:odw.xex

 

http://mads.atari8.info/mads_eng.html

Attached Files


Edited by Heaven/TQA, Mon Feb 12, 2018 7:19 AM.


#3 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 7:40 AM

re: storm

 

song speed is first byte in storm.asm...



#4 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Mon Feb 12, 2018 7:46 AM

Ok, so the makefile that suggests CC65 should be ignored, just use MADS or some other cross assembler as appropriate? No need for additional libs beyond what the assembler source contains?


Edited by carlsson, Mon Feb 12, 2018 7:46 AM.


#5 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 7:56 AM

nah... forget everything... no cc65 etc

 

assembling should be easy:

 

MADS ik.asm -:oik.xex

 

or 

 

MADS dw.asm -:odw.xex



#6 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Mon Feb 12, 2018 8:00 AM

Ok. I am a DASM guy by heart so I'll see if I can adapt the syntax before downloading yet another cross assembler. :)



#7 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 8:09 AM

IK should be no problem except of RUN directive which translates to

ORG $2e0
.word startadress

storm is more tricky

as it uses macros.

 

but macro should be in dasm

.macro
.endmacro

as far as I remember :1 = first parameter


Edited by Heaven/TQA, Mon Feb 12, 2018 8:11 AM.


#8 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Mon Feb 12, 2018 3:01 PM

Step #1 finished: adapting the code to DASM format. I only slowed down the demo tune a little to verify that everything works. It generates a PRG file that has the same format as the XEX file. While I don't understand the contents of the format, it works in Altirra which is my primary goal. :)

 

Attached File  dw-dasm.zip   4.27KB   14 downloads



#9 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 3:44 PM

cool. :)



#10 emkay OFFLINE  

emkay

    Quadrunner

  • 9,313 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Mon Feb 12, 2018 3:47 PM

Ok, but why using old and unfinished sounddrivers?

#11 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 4:51 PM

Because we can and its fun... why not? Mainly my idea was guys could play around and we dont abuse RMT all the time.

Other drivers could be the ones Jakub used and the German Chaotics.

#12 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Mon Feb 12, 2018 4:57 PM

I'm not sure how envelopes are addressed in this routine. I realize that envelope 1 is silence (Env0) but the demo song seems to use envelopes 1-7 and 11-13 while the code has labels for Env0 to Env9. Is the macro syntax in MADS some kind of octal form so 11 equals 8+1 = 9 and 13 equals 8+3 = 11? Besides I think tbe Env6 label is wrong by one line, shouldn't it begin with BYTE $A? I believe the first byte in each envelope sets the tone, the following bytes set the volume.

 

I also rearranged the note macros so it starts at E1 (lowest note) and ends at C6 (highest note). I understand that many sound chips work the other way around, so the highest possible value equals the lowest frequency and vice versa, but musically it doesn't make sense to address octaves backwards.

 

(I'm not taking this too seriously, just trying to see if I understand it)



#13 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Feb 12, 2018 5:01 PM

Havent looked myself into detail. Maybe Mark can help.

I was tied up today with other stuff but gave that a go.

#14 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Mon Feb 12, 2018 5:09 PM

Aha, ENVELOPE points to the EffectsTab list which sets an actual envelope, distortion, trill (arpeggio) and an effect byte (glissando etc?). That makes far more sense.



#15 Wrathchild ONLINE  

Wrathchild

    Stargunner

  • 1,948 posts
  • Location:Reading, UK.

Posted Mon Feb 12, 2018 5:43 PM

Glad you worked that out.

 

This code does date back to 2004 and even then referred to the disassembly I looked at in the early 90's :)

 

The attachment shows the approach (in C) that I took to generate the song data from the original, I took that further to look at the Speedball tunes, but adapting / remapping the C64 waveforms settings to the closest EffectsTab entry in the Whittaker player needs care.

 

As I mentioned on that thread, the namings I used probably don't match the real work names they should so can be change appropriately, 'SET_INSTRUMENT' may work better than 'ENVELOPE' in the tune file.

 

Regards,

Mark

 

 

Attached Files



#16 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Tue Feb 13, 2018 3:27 AM

So for a POKEY newbie, are these the distortion values as used in David Whittaker's routine?

 

; Descriptions grabbed from "Mapping the Atari"

; $00   five bit, then 17 bit, polys
; $20   five bit poly only
; $40   five bit, then four bit, polys
; $60   five bit poly only
; $80   17 bit poly only
; $a0   no poly counters (pure tone)
; $c0   four bit poly only
; $e0   no poly counters (pure tone)
 
I'm also trying to figure out the EffectsTab. So far these are wild guesses from my side, anyone who has the answer is welcome to correct me.
 
EffectsTab:

.BYTE 0, $A0, 0, 0 ; ENVELOPE  1 = Silence
.BYTE 9, $C0, 0, 0 ; ENVELOPE  2 = Bass
.BYTE 3, $80, 0, 0 ; ENVELOPE  3 = Snare w/ tone
.BYTE 1, $80, 0, 0 ; ENVELOPE  4 = Snare toneless
.BYTE 4, $A0, 0, 1 ; ENVELOPE  5 = Long vibrato? Medium fade
.BYTE 5, $A0, 0, 1 ; ENVELOPE  6 = Short vibrato? Partial fade
.BYTE 4, $A0, 3, 0 ; ENVELOPE  7 = Arpeggio minor
.BYTE 4, $A0, 4, 0 ; ENVELOPE  8 = Arpeggio major
.BYTE 7, $C0, 0, 0 ; ENVELOPE  9 = Melody no vib?
.BYTE 7, $A0, 0, 1 ; ENVELOPE 10 = Melody vibrato?
.BYTE 5, $A0, 0, 1 ; ENVELOPE 11 = Short vibrato? Partial fade
.BYTE 5, $C0, 0, 0 ; ENVELOPE 12 = Short no vib? Partial fade
.BYTE 8, $A0, $C, 0 ; ENVELOPE 13 = Octave, full fade
.BYTE 5, $A0, $C, 0 ; ENVELOPE 14 = Octave, partial fade
.BYTE 5, $A0, 3, 0 ; ENVELOPE 15 = Arpeggio minor, partial fade
.BYTE 6, $C0, 0, 0 ; ENVELOPE 16 = Staccato no vib?

Edited by carlsson, Tue Feb 13, 2018 3:51 AM.


#17 Wrathchild ONLINE  

Wrathchild

    Stargunner

  • 1,948 posts
  • Location:Reading, UK.

Posted Tue Feb 13, 2018 4:31 AM

Yes, second byte in the effects table is giving the AUDC distortion value. (https://www.atariarc...ere/chapt07.php)

So he's mostly using $A0, pure tone, then some $C0, distortion, and a couple of $80, white noise.
The third byte is toggling the played note by the number of intervals stated, so as you point out minor=3, major=4 and octave=12.

The final byte controls the effect, not used in this tune is a 'rising' note effect if the high bit is set (so $80).

The value of 1 here selects the vibrato but the replay routine, despite having two tables, only uses the shallower Wave1Mod.

 

Other player routines cater for better arpeggio support, e.g. allowing for a chain of notes to be applied.

 

Bear in mind that the RMT tracker is a culmination of being able to support different types of effects. When the resulting executable is made, the program sets flags based upon what has been used and so code is only included if required to keep processing time down to a minimum.

 

[Edit] The Storm tune also appears to be only using envelopes/instruments 2&3, 7, 11&13.
Envelope 1 is silence, as its a pure tone with no effect but the volume pattern it is associated with is set to zero.
 


Edited by Wrathchild, Tue Feb 13, 2018 4:46 AM.


#18 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Tue Feb 13, 2018 5:11 PM

After a couple of hours where I thought I was going insane, it struck me that the default configuration in Whittaker's driver is that voices 1 & 2 are merged into a 16-bit voice. It appears that arpeggio (trill) and vibratio effects don't work at all in that one, and I'm not even sure if the different types of distortion yield the intended effects. Once I used logic channels 2 and 3 (mapped onto POKEY voices 3 and 4), I got all the effects to work as advertised. Perhaps there is a way to get at least vibratos to work on the 16-bit channel too, but at the moment I'll move onto my newfound knowledge and use sounds and effects according to that.



#19 Wrathchild ONLINE  

Wrathchild

    Stargunner

  • 1,948 posts
  • Location:Reading, UK.

Posted Tue Feb 13, 2018 7:37 PM

That's a good topic for discussion in relation to player routines as actions like vibrato are going to act differently across the frequency range of 16 bits as compared with the 8 bit frequencies. As it is applied after the current Note has been translated into a frequency, even in the 8-bit range we see that at one end of the scales, the intervals between the frequency values of adjacent notes are close but widen at the opposite end. So using the same vibrato  (e.g. 0, 1, 2, 1, 0, -1, -2, -1, repeat) has differing effect across the range and hence should it be the job of the player to scale that dynamically, or the composer to maybe use a set of instruments that differ in the vibrato pattern they use? With a 16-bit channel a vibrato pattern would need bigger values to produce the same effect. 

 

Equally with tremelo, should that be the player modifying a channel's volume or built into the envelope?

 

In the DW player (and looking at the Draconus which is pretty much the same thing!) it would seem the the 'limited' use of the 16-bit channel for bass and snare avoids having to facilitate the effects on that channel/voice.

 

Looking at the note table sizes, these have < 64 entries and so a different approach for the vibrato maybe to expand this to quarter values and then the vibrato effects the note which then looks up the frequency?


Edited by Wrathchild, Tue Feb 13, 2018 7:48 PM.


#20 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Wed Feb 14, 2018 1:46 AM

Once when I implemented vibrato in my own player, I would look ahead for the frequencies of the semitones right above and below the desired one, take the difference and divide in 2 and use those for maximum and minimum actual frequency to oscillate between. It takes a bit more work (raster time) but would work equally well over the entire range.

 

Anyway, I thought that the POKEY "runs out" of 8-bit frequencies in the upper end of the scale so I primarily thought the 16-bit one would be desirable for melody lines on the top but yes a least a 16-bit vibrato then would be useful. Now I understand that we're mostly digging for fun here, as there are much newer music tools on the Atari 8-bit for anyone seriously looking to do music so I won't put much more thought in trying to fix or improve this particular player.



#21 Wrathchild ONLINE  

Wrathchild

    Stargunner

  • 1,948 posts
  • Location:Reading, UK.

Posted Wed Feb 14, 2018 7:23 AM

Agreed, I accept the sentient of this thread might be to appreciate how these guys did it 'back in the day', i.e. without trackers  :thumbsup:



#22 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,738 posts
  • Location:Baden-Württemberg, Germany

Posted Wed Feb 14, 2018 9:30 AM

i am still looking forward to have at least one new track or musical example... maybe we got a "new" kind of driver which ppl can use and not that RMT thing... 



#23 carlsson ONLINE  

carlsson

    Metagalactic Mule

  • 6,656 posts
  • Location:Västerås, Sweden

Posted Wed Feb 14, 2018 9:53 AM

Eventually I will produce something lame out of this, now that I've spent some time trying to understand it.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users