On Thursday 23 December 2004 05:24, Karri Kaksonen wrote: > abcmusic(channel, > ":A2GEcde>dcABGAGE/F/GA2GEcde>dcABGA3z::eae>deae>dcdefgf/g/ageae>deae>dcABGA3z:"); > > The whole tune almost fits on a line. uhm that looks more like a few seconds loop and one voice than a real tune to me :=P what about a tune that uses 3 voices and is about 2 minutes long? > > > and as for speed, "modern" c64 player typically run at about $18 rasterlines per frame, > > which means 63*$18=1512 cycles per player call. can you give a simelar figure for yours? > > I only call the code once/frame during the vertical blank interrupt. thats exactly what i mean > But I have not calculated how many cycles it will use. you can get a rough estimate by figuring out the amounts of rasterlines used by each player call....read rastercounter before player call, read rastercounter after player call...calc cycles/rasterline from your amount of rasterlines per frame, frames per second and your cpu speed. > Basically it decrements a counter and if it is zero it fetches the next > note from the tune, makes a table lookup to see what the new sound > oscillator setting is and transfers it to a timer. mmmh...doesnt that abc format involve some kind of "generic instruments" which need to be "emulated" by the driver? i would think that this is the part where things might get complicated and slow. > But this will of course > be a hardware dependent thing that is different on every platform. ofcourse :) > > oh, and we shouldnt forget about sound effects. ie the driver should provide funtions > > to play predefined sounds independently from each other, and with- or without the > > music playing at the same time. > > That is simple in case you have separate sound channels available. But if > you need to interrupt your music, play an effect, continue with music, > then it gets more complicated. i would assume that most, if not all targets, want to use all available channels for music and use an "intelligent" soundroutine that plays soundeffects dynamically on unused or least needed channels > The Lynx has 4 channels with identical properties. You can use any channel > for samples or generate patterns of 0's and 1's from a polynomial counter. > The pattern can be fed to a clipping integrator for producing complex > waveforms. thats probably already superior to most if not all targets. the c64 has 3 "chip" voices for example, samples need to be played using some trickery and terribly high cpu usuage (no dma but manual writes basically). the same is true for the vic20, although its soundchip as much less capable. i _think_ the situation is simelar for the atari. the lower end would be the pet-computers, which can only beep in different pitches much like the original ibm pc could. (however pets can play high quality samples with a 3rd party addon, but that wasnt very common at all) gpz ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Fri Dec 24 01:46:42 2004
This archive was generated by hypermail 2.1.8 : 2004-12-24 01:46:53 CET