Stef wrote:I searched for that type of player on ZX spectrum ! do you know where we can find them (and the sources :p) ? i'm very interested by them
Here is some of them. All for TR-DOS disk system, so you must use emulator with TR-DOS support. For example,
Unreal Speccy.
Chip Tracker 1.3 - 4ch, for AY/Covox/SD, sample rate respectively 12/17/15 KHz. Very few effects, no volume command. It's latest of digital trackers, 2002 (by Alone Coder, so it's possible to get sourcecode).
Digital Music Maker - 3ch, for AY. Don't know much about this editor (SS+D to load menu, CS+1 to play music). Many effects. 1995.
Digital Studio 2.5 - 3ch, this version for AY (samplerate 10KHz). I also remember about version for Covox. It was one of first (or ever first one) and most popular digital editor. No effects. This version from 1998, first version was released something in 1993-1994.
Extreme Tracker 2.1 - 4ch, for SD/Covox (samplerate about 11KHz). MOD-compatible (volume, effects). Looks like most advanced digital tracker for ZX (not counting for GS/DMA USC trackers), although I don't remember any music written in it. 1999.
SQ Tracker 1.0 - 4ch, for SD, and only for ZS Scorpion 256 (one of most common ZX russian clones). Volume and two effects. Samplerate only 10KHz. Looks like unfinished project. 1997.
UltraSonic 2.11/2.12 - 4ch, for SD/Covox. Samplerate 7..20KHz (differs for tracker and stand-alone player). Volume, effects. Another most advanced digital tracker. 1999.
Flash Tracker 2.0 (on disk image with misc software) - 4ch, for SD. Samplerate ~11KHz. No volume and effects. It was first tracker for SD device (also from
creators of this device). 1996.
AY means that tracker uses volume registers of AY-3-8910 as three 4-bit DAC. Low quality, but does not require additional devices (because AY is a standart device for ZX128 and above). Covox is a covox - 8-bit DAC on a parallel port. Middle sound quality. SounDrive (SD) - 4-channel covox, i.e. four independent 8-bit DAC's. GS and DMA USC is an active soundboards, first uses additional Z80 at 10Mhz, second uses DMA controller, so I not included information about they trackers.
Because most of this trackers old enough, there is no way to get source code. Although, they players usually not very big and complicated, so it's possible to disassembly and understand them.
I think it's possible to adapt to SMD some solutions from Covox and AY digital trackers. However, ZX has advantage above SMD Z80, because it does not have wait states in whole RAM (in most of russian clones, not on original ZX), has much faster bankswitching, and DAC access also faster (just one or few OUT's, with no 'busy' like YM2612).
Stef wrote:The sound part of sega genesis hardware is really tricky, because of this bank register which should be write bit per bit :-/ You have to spent more than 100 cycles to set this register...
Yeah, looks like Z80 part of SMD very underpowered (incredibly slow bankswitch and no interrupt from YM2612). Anyway, we have that we have.
I now think about this idea: play sample by blocks. Something like it:
- Copy part of sample into RAM (at maximum speed, with POP-reading), into looped buffer. It's requires only two bankswitch per block copy (to current sample page, and back to music page). Part must be big enough, to cover one 'frame' (1/50sec).
- While copying and music frame we play sample from RAM buffer (with interleaved code).
- At end of each frame we fill already played part of buffer with new data.
We used method like this into ATM (ZX-clone with 16 col per pixel videomode) video player (from CD device) - one Z80 at 7MHz did all job: reading data from CD (without any DMA, byte-by-byte), drawing frame (all by software, there is no any videoaccelerator), and playing digital sound at ~17KHz (unfortunately, with noticeable jitter, but acceptable enough). For music player it will be more difficult task, because all these 'wait-busy' loops and non-linear code.
Stef wrote:10-20K ticks is a lot ! i guess we will have to interleave the DAC play code... Is it possible to store all the music data (except samples of course) in the Z80 ram (that would minimise the bank register change) ?
I was thinking about something like that : having a player which takes about 3 KB at max with variables and having 5 KB for the music. Is it something realist ?
10-20K is a middle-peak value (and also not highest), which happens when instrument change on many channels happens at once. It very depends from number of registers, which we output for current frame. Also it measured on TFM device with YM2203 (not memory-mapped ports, and slightly more code than for SMD). In real tracks time of player can vary from 1K to peak value.
You very optimistic about 5KB of music data:) Yes, you can get such size, but music must be very simple (both for module-type and packed-registers-data formats). Even on ZX, in AY music players (not digital - PSG, which slightly complicated than SN76489), size of music module can be up to 16KB, and it's an packed module (not like MOD format, where all pattern data stored in unpacked form).
nim wrote:Jump to order XX (for making looping tune that has intro and then looping part)
Why you need effect 'jump to order' for looping order-list, when you already have looping into order-list itself (at any position, see 'L' mark)? If you want to loop order-list with effect, you need one additional pattern with this effect at end of pattern.
nim wrote:Glissando (slide to note)
If you mean 'portamento' (smooth slide to note), it's already here (3xx). Or you need 'glissando' itself (slide to note by semi-tone steps)?
nim wrote:(Sample/Instrument) Offset (IT Oxx) (if possible I really would use it alot for FM even though it seems only for samples :))
It's not possible for FM because there is no samples and no control for current envelopes positions.
nim wrote:Turn off/on operator envelope - just skip to and stay on first envelope node (after fade in) (XY? 0Y off/Y0 on? or 0Y off/1Y on?)
I'm not clearly understand what you mean. Envelope in FM is not like envelope in sample-based trackers (IT/XM), because it's a hardware feature. There is no any control for envelope (except KeyOn/KeyOff events and ADSR parameters which can't be changed while channel playing).
nim wrote:(I'm not a big fan of creating loads of instruments just for small impulsive variations and would use the last three effects alot :)..)
You can use TL/MUL/Feedback modification effects, they gives a lot of variations for instruments.
nim wrote:I would like IT's keyboard layout for note keys (but that might be a greedy request)
Just wait until I implement keyboard customize, then you'll be able to change whole layout.
nim wrote:Without that you just can't make really great percussive/complex sounds (unless your tempo/speed is insane).
I usually use speed 3 or 2, and not found it insane (as speed 1;). Also, you can use fast speed only for some rows, with block expand/shrink operations and Fxx effect.
There is some problems with very fast speeds in form of unneeded 'clicks' in sound. I don't know why it happens, and if it possible to eliminate these clicks. Also, very fast speed means more registers changes per frame, which means larger output data size and bigger time, which Z80 player takes.
nim wrote:And why is there no tempo? Do you have a reason why you don't want it? I feel it's vital :)
It's typical for any specific-hardware oriented trackers. On most of systems with PSG/FM synths (like SMD) player code works in real-time and calls on VBLANK (update every 1/50 or 1/60 seconds, depends from PAL/NTSC, and this period is fixed). With such fixed update period there is just not enough granularity to make any tempo. And because processing power of such systems is limited and they usually does not have timer-powered interrupts, there is no way to make update period short or flexible enough. Sample-based trackers works on another basis (non-realtime), they generate mixed sample-stream, and can have any update period, up to samplerate (so they just change update period depending from BPM).
It's possible to slightly change update period on SMD (because Z80 is used exclusively for sound processing), although more to slower rate (BPM<125), with higher rates Z80 (and YM2612 which it's slow response) may not have enough power to process all register writes. And it's not possible to change update period on ZX/TFM, because there is only one interrupt (VBLANK, 1/50 sec) and Z80 also must did all other job besides music.
zinger wrote:Making use of the Alt-keys for block transpose, as nim said, might be a good idea.
Because of Windows-based interface nature of TFM-MM, there is some problems with using Alt key - this key used by system to access to window menu (press it and see what happens). So I try to avoid using it, as well as of Shift/Ctrl keys splitting (left/right for different operations).
zinger wrote:Block selection with mouse would also be a good feature.
It's already implemented in version which you have (press and hold right button, move mouse, release right button), although it works not very comfortable.