enthusi Posted April 8, 2013 Share Posted April 8, 2013 Ok, I can try to write a little player for it. Without BB. Will keep you posted. Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 8, 2013 Author Share Posted April 8, 2013 You mean a Player that could play Bas Datas? Quote Link to comment Share on other sites More sharing options...
enthusi Posted April 8, 2013 Share Posted April 8, 2013 (edited) Done Very crude though. Coming from Germany as well I figured you'd want a PAL player? http://enthusi.de/player.bin Dont mind the overly flashy colors. It can _almost_ read in Bas Datas. As this is normal assembler, instead of 12,0,4 0 I use/need .byte 12,0,4 .byte 0 But this might differ for other coders using different assemblers. And seriously, the BB music format is VERY simple. Any coder can utilize it if he sees it. Take me, I was not aware at all of the way BB handles it and it took like 5 Minutes in total. Nice one btw. Do you compose for PAL or ntsc? Cheers, Martin PS: one drawback of the BB format is that you can only play with ONE duration for both channels. That's quite a no-go imho. There is really no need for that limitation though. You can basically write two chans with its own duration per note. Not sure if BB can handle it. Doesnt seem so. But for an independant player its really not much extra work. Edited April 8, 2013 by enthusi Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 8, 2013 Author Share Posted April 8, 2013 Thanks ^^ Quote Link to comment Share on other sites More sharing options...
enthusi Posted April 8, 2013 Share Posted April 8, 2013 When space it tight it will be a good idea to combine volume and control since each is only 4 bits wide. Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted April 8, 2013 Share Posted April 8, 2013 K, over 150 Views, I think most of the Coders know this Topic now. Because of this, to all A2600 Coders: Do you need me here, to compose some Tunes for your Games or will you handle it by yourself? No problem if you wanna compose by yourself, then I will concentrate on the Lynx Coders and don't need to look here anymore Or as "the Clash" would say: "Should I stay or should I go" Definitely stay! It would be fantastic if you could write a catchy tune for the ASDK demo's: http://atariage.com/...b-and-the-asdk/ The next chapter is going to be on editing the music table, I will translate your bB example and integrate it into the chapter. I also have a game I'm working on that needs a cool background tune that I will PM you about Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 8, 2013 Author Share Posted April 8, 2013 ok... Now it has begun Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 8, 2013 Author Share Posted April 8, 2013 Can someone test/listen to this Rom on a Emulatir and on a Harmony Cart and tell me, if you hear some "glitches" too? Thanks! music.bin Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 9, 2013 Author Share Posted April 9, 2013 No one? Quote Link to comment Share on other sites More sharing options...
iesposta Posted April 9, 2013 Share Posted April 9, 2013 No "glitches" in emulator. Will try flash cart later today... Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 9, 2013 Author Share Posted April 9, 2013 Very well, then everything is fine. It's just a prob. with the emulator on my pc, but I don't care ^^ Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 9, 2013 Author Share Posted April 9, 2013 Now we can talk about "making Music" on the A2600 Sorry for the bad Quality and the "Glitches" Check it out: 896 Bytes of pure A2600 Music ^^ http://www.atari-lynx.de/a2600/a2600groove.mp3 Quote Link to comment Share on other sites More sharing options...
enthusi Posted April 9, 2013 Share Posted April 9, 2013 For inspiration you may wanna check some of these: TomJones is among my absolute favorites (not just audio-wise). Quote Link to comment Share on other sites More sharing options...
Cebus Capucinis Posted April 9, 2013 Share Posted April 9, 2013 There's not really anything out there that sounds very ragtime piano.....I always wondered if the system could do something like that. Sort of jangly little piano tune. Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 9, 2013 Author Share Posted April 9, 2013 (edited) What I don't understand is, how can the A2600 "emulate" 3,4,5 Instruments at the same time, when the A2600 only got 2 Channels? Is that something like: this music works only on the Emulator, but not on real hardware? Edited April 9, 2013 by Der Luchs Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 10, 2013 Share Posted April 10, 2013 (edited) What I don't understand is, how can the A2600 "emulate" 3,4,5 Instruments at the same time, when the A2600 only got 2 Channels? Is that something like: this music works only on the Emulator, but not on real hardware? It's the same as a pair of speakers that can "emulate" an entire orchestra performing in stereophonic sound, or even a one-speaker monophonic system playing back a musical recording. The sound waves for the sounds are added together to create a complex wave. To do this on the Atari 2600 you use the "always on" wave, then vary the volume (amplitude) to create complex waves. The catch is that each of the 2600's audio channels can play only 4-bit sound waves, or amplitudes from 0 to 15. So if you want a single channel to play multiple notes at the same time, the sum of their amplitudes can't exceed 15. For example, you can have three sounds, each with an amplitude of 5 (0 to 5), so their sum will never exceeed 15 (0 to 15). The other catch is that it takes a lot of processor time to compute the next value for a complex wave. The Harmony "cheats" by letting the ARM co-processor do the calculations in the background. Edited April 10, 2013 by SeaGtGruff Quote Link to comment Share on other sites More sharing options...
abraXXious Posted April 10, 2013 Share Posted April 10, 2013 Considering how primitive the 2600 sound hardware is that's pretty impressive. Is it possible to the harmony notes quickly up and down an octave at 30 times a second? This would give the illusion of a third sound channel, give more bass/depth and does not have the overheads of mixing. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 10, 2013 Share Posted April 10, 2013 Even without a Harmony cart-- i.e., using just the built-in waveforms and frequencies-- you can play different notes as fast as you can change them, or several times per scan line. However, that obviously has practical limitations, since a given note may have a frequency that requires the wave to play for at least several scan lines in order for a single cycle of the note's wave to play. So yes, you can certainly alternate between different notes at 30Hz. However, the result is a series of notes that rapidly alternate between each other, as opposed to a true chord sound. On the other hand, you can create some chords using harmonics, by defining a waveform that combines multiple harmonics. The resulting notes will be slightly "out of tune" as judged by equal temperament tuning, but they'll actually be more pleasing because of the harmonic resonance or consonance. For example, a major chord consists of P1, M3, and P5-- perfect unity or the base note of the chord, the note that's up a major third from the base note, and the note that's up a perfect fifth from the base note. The just intervals for those are 1:1 (P1), 5:4 (M3), and 3:2 (P5). If you go up a couple of octaves and start with the P5 note-- equivalent to playing G4-C5-E5 instead of C4-E4-G4-- the harmonics are 3, 4, and 5. So if you pre-define a waveform that combines the 3rd, 4th, and 5th harmonics, and play it at the frequency of C3, you'll get a chord that sounds like G4-C5-E5. Or if you play the wave at the frequency of D4, you'll get the chord A5-D6-F#6. Then you don't need to compute the next value of a complex wave, you just have to play the pre-defined wave at whatever frequency is needed to get a particular major chord-- or rather, the second inversion of that major chord. The catch is that you don't get the equal temperament notes, and more importantly you're limited to a specific type of chord for each pre-defined waveform. But you could define a set of waves that mix certain harmonics together at different amplitudes to emulate the drawbars of an organ, or something like that. Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 10, 2013 Author Share Posted April 10, 2013 For inspiration you may wanna check some of these: TomJones is among my absolute favorites (not just audio-wise). Oh, ok, no prob... you have to tell me that you want Stuff like this: http://www.atari-lynx.de/a2600/a2600song7.mp3 I was just thinking of games like Moon Patrol as I wrote the other songs ^^ Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 10, 2013 Author Share Posted April 10, 2013 @SeaGtGruff: thanks to for the Infos !!! Quote Link to comment Share on other sites More sharing options...
enthusi Posted April 10, 2013 Share Posted April 10, 2013 (edited) Well volume-adjustments to mimic (in principle) any instrument (aka sampling) is not at all feasable for games though since this requires multiple updates per frame. A 60Hz sample just doesnt sound right Well, afaik Boulderdash does this during the Title-screen Edited April 10, 2013 by enthusi Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 10, 2013 Share Posted April 10, 2013 Well volume-adjustments to mimic (in principle) any instrument (aka sampling) is not at all feasable for games though since this requires multiple updates per frame. A 60Hz sample just doesnt sound right Well, afaik Boulderdash does this during the Title-screen The TIA updates the audio output twice each scan line-- well, in theory at least, since each of the two audio clocks are generated twice during each scan line, although the selected frequency setting lets through only certain clock pulses (i.e., every pulse, or every other pulse, or every third pulse, or every fourth pulse, etc.). If you're controlling the audio by varying the volume-- whether doing the wave or frequency computations yourself or letting the ARM co-processor do them for you-- then it's best to update the volume at least once per scan line, otherwise you can't produce the higher notes. The NTSC TIA's line rate is about 15699.89Hz, so updating the volume once per line will let you produce frequencies up to about 7849.945Hz (approximately B8, higher than the highest note on a piano, but less than the full range of MIDI notes). If you update the volume twice per line you can go up to 15699.89Hz (approximately B9, a little more than the highest MIDI note-- assuming the MIDI note values haven't been transposed up an octave or more). Many games probably don't have enough free time during each scan line to allow for updating the volume even once per scan line, at least not during game play. But most title screens probably do have enough free time for this, especially if the ARM co-processor or the DPC chip is being used. If you're doing the frequency computations yourself, there's barely enough time left for updating the VBLANK and VSYNC registers during each frame, let alone drawing a screen display. Quote Link to comment Share on other sites More sharing options...
enthusi Posted April 10, 2013 Share Posted April 10, 2013 8 kHz is enough to sample human voice though Im rather familiar with that on the C64. I just wanted to make clear (i.e. to Lynx) that THIS is NOT the way people generate nice tunes in demos etc. Quote Link to comment Share on other sites More sharing options...
Der Luchs Posted April 10, 2013 Author Share Posted April 10, 2013 Come on Guys, don't argue Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 10, 2013 Share Posted April 10, 2013 THIS is NOT the way people generate nice tunes in demos etc. How do they do it in demos? Obviously not with the ARM co-processor (unless it's a Harmony demo). The TIA can make some decent music by itself-- maybe not "in tune" in terms of equal temperament and A4=440Hz, but certainly "in tune" in terms of just intonation. As for PWM-- how would you do that if not by changing the volume manually? 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.