TFM Music Maker

Talk about development tools here

Moderator: BigEvilCorporation

zinger
Very interested
Posts: 60
Joined: Thu Apr 19, 2007 12:39 am
Location: sweden
Contact:

Post by zinger » Fri Apr 20, 2007 8:02 am

Shiru wrote:Which keys I must assign for this operations (Ctrl+..)?

Transpose operations also available in pattern menu (press right mouse button on selected block). In future versions I also plan to add full shortcut redefine support.
I know, but there seems to be some kind of bug, often when I right-click on a block, it "deselects" that block and marks the row where I clicked, nothing happens. In Mod Plug Tracker, Ctrl + A is semitone down, Ctrl + Q is semitone up. Ctrl + Shift + A/Q is octave up/down. It works well I think.

Here are some other standard tracker effects:
Position Jump This command will cause the player to jump to the pattern position xy (hex). Ie: B00 will restart the song from the start. If used together with a pattern break, you can also specify the starting row (by default, it will play from the start of the pattern). Note that most players (Including Modplug Player) disable backward jumps in the song if looping mode isn't enabled, so that it is not possible to loop a song forever (pretty annoying in a playlist).
Pattern Break
This command will stop playing the current pattern and will jump to the next one in the order list (pattern sequence). You can also select the row where to start the next pattern. Note that the specified row xx is in Hex (Ie D20 will jump to the 32nd row of the next pattern).
Tremor
This effect will turn on and off the current channel every frame: T[ontime][offtime].
x=ontime, y=offtime: the volume will stay unchanged for x frames, and then muted for y frames.
Note: The exact duration of the ontime/offtime is different for MOD, XM and S3M/IT.
Set Channel Volume
This effect sets the master volume of the current channel. It will affect the volume of all notes being played on this channel.
Pattern delay for x frames
This will delay the playback of the current row by x ticks (beats).
Pattern Loop
SB0 will set the loop start row
SBx will repeat x times the loop, by jumping to the loopstart row
Note Cut I know TFM has a Key Off command, but it's very useful to have a command that cuts the note regardless of the envelope of the instrument (release).
Note cut after x frames
The current note will be cut (volume set to zero) after x ticks
Note delay
The specified note will be delayed by x frames (ticks) before starting
TmEE co.(TM) wrote:For DAC, you could use mine, or Stef's driver, these are VERY optimized !!! Sampling rate on my latest version could be up to 65KHz (lot more than you'll ever use) and Stef made a 100KHz thing (I've not seen the source yet, only core part). Check "How can you do music on MegaDrive" topic on Mega Drive / Genesis forum.
I appreciate the offer, but I don't know a thing about coding, and I'm not sure how I would implent samples in my music for easy access. It would have to be implented in the tracker. Thanks though.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Apr 20, 2007 11:16 am

TmEE co.(TM) wrote:For DAC, you could use mine, or Stef's driver, these are VERY optimized !!! Sampling rate on my latest version could be up to 65KHz (lot more than you'll ever use) and Stef made a 100KHz thing (I've not seen the source yet, only core part). Check "How can you do music on MegaDrive" topic on Mega Drive / Genesis forum.
I guess the goal is to have a general player which can also handle DAC play at same time than YM stuff. Doing DAC play alone isn't difficult, the difficult part is to minimise Z80 use for YM and PSG play or it will affect slightly the DAC output quality...

nim
Newbie
Posts: 4
Joined: Fri Apr 20, 2007 10:02 am
Location: Sweden
Contact:

Post by nim » Fri Apr 20, 2007 12:33 pm

I'm also in it for the YM2612 interest and for that this is something western FM enthusiasts (should) have been waiting for for a loooong time! (time to make that damn opl3 jealous! :D)
About the suggestions for commands and effects... it seems you've started with the fast tracker effect standard in mind while suggestions have come in impulse tracker standard...

I'm hoping you'll integrate full keyboard controllability and effects as I'm a keyboard person and hate using the mouse but I guess you have a choice to make if you want to make FT-people happy (ft2, milky, renoise...) or IT-people happy (it, mpt, chibi, revisit...) I think a SMD-tracker will attract an equal amount of the two :/
(not saying everything should be hotkeyed though.. tabbing through GUI-items to some extent is very fine :)

...I think it would be better to stick with one standard and not mix two... or make your own.
I can only propagate for IT standard (which I use) with the fact that it has a more complete set of effects (I've never found anything I wanted to add while FT2 lacks half of it) and full keyboard controllability...
But then again neither the TFM or MD format will use all of ITs effects (like panning effects etc)...
(a suggestion though: implement a Set panning position effect that only takes effect in the player so you don't have to specify panning outside of the file :)

I for myself vote for IT standard.
Here is a list of IT-effects: http://everything2.com/index.pl?node_id=1147574
Here is a copy of the commands-list:
http://nim.pansarvagn.net/it214commands.txt

Then making this a FT2/IT issue might still be partial as other FM trackers in general don't follow either of their standards much (at2 slightly IT-style).

About note delay and note cut, I love these effects so I second the request!

I think the idea to split the tracker to a TFM device tracker and a MD tracker sounds like a good idea! I vote for that!

And about all talks about features, effects and FT2/IT-standard and all that.. maybe you could consolidate the core of the tracker as a static library and allow for several tracker-interfaces to utilize it... but that is if you feel revealing your headers publicly is ok.. maybe you want it closed source..
As an example the newly born Chibi Tracker is an opensource IT-clone and I'd love to make a MD-version interface of that tracker based on TFM's engine! :)
Maybe that'd be nice if you feel like using your time for more technical things than pleasing users wishes for GUI-related things etc..

Otherwise I could voulenteer to try (never coded a tracker) to write an IT-style (commands/effects) version of TFM.
(if the author of chibi or some other tracker coder got hooked on this tracker he'd be much better for both of that though ofcourse.. -`:))

You are hero! \:U/

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Fri Apr 20, 2007 9:04 pm

I think I shall tell some info about myself, to make you know about my knowledge areas and level, and save some your and my time (in part of giving information which I already know, for example).

VG and game programming is my hobby for many years. I wrote my first games 12 years ago. I know Z80 assembler for 10 years, and still use it in hobbyist ZX and console projects. My current hobby is VG history, emulation (including writing emulators) and retro systems programming. I can write code for ZX, MSX, SMS/GG, Coleco, SMD and some other retro systems (not count for many modern systems). I also worked in game company for some years, where I did, besides other, sound system (software mixer, etc) which used in many games, and midi softsynth.

I also like VG music, and I wrote it for 10 years (as hobby, but I also made music/sfx for some small commercical games). I used very many trackers, sequencers, and other musical software. For example: Sound Tracker/Pro (ZX), Pro Tracker (ZX), Vortex Tracker II (win32 for ZX), RADlib (MS-DOS/OPL2), FT2, Sk@le, Milky Tracker, Mod2PSG (win32 for SMS), FamiTracker (win32 for NES), and many others.

From all sample-based trackers I personally prefer FT2/Sk@le and XM format (not only as composer, but also as game programmer for platforms with slow CPU's) and don't like IT and MPT (interfaces of these trackers itself, not IT format).


TmEE co.(TM) wrote:For DAC, you could use mine, or Stef's driver, these are VERY optimized !!! Sampling rate on my latest version could be up to 65KHz (lot more than you'll ever use) and Stef made a 100KHz thing (I've not seen the source yet, only core part). Check "How can you do music on MegaDrive" topic on Mega Drive / Genesis forum.
Like Stef said, playing sample alone (or even 2-4 samples with realtime resampling at once - there is many MOD-like trackers and players for ZX Spectrum, with Z80 @3.5MHz) is not a big deal. Main problem is to combine sample player with YM2612 data depacker/player. FM/PSG player can take various time, up to 10-20K ticks per 1/50 sec, and it has non-linear code. So interleaving of code of YM player with sample player code and getting acceptable jitter and samplerate will be a difficult task (also note that all player code must fit into Z80 RAM to avoid slowdown from wait-states).



Some words about general editor conceptions.

At start, I don't planned to make tracker. This project starts as simple OPN instrument editor, for testing purposes. So there was no general conception. Later, simple pattern editor was added, and was plans to make very simple tracker. At that time I don't had any ideas about adding effects, editor usability, and how music will be played on real device (I assumed that it will be module format, like MOD). When I already began to add some effects to editor, we (I and Alone Coder) decide to use registers data compression instead of module format, because it easy to play (and very fast, it's important for ZX, which has only one Z80 for all), gives good compression, and gives total independency from any editor features.

In design of tracker itself (layout, shortcuts, etc) I used some ideas from Vortex Tracker II (AY-3-8910 win32 crosstracker, don't forget that TFM Music Maker designed for TFM, which is device for ZX Spectrum), FT2/Sk@le (just because I prefer this interface type in sample-based trackers), MPT (because many multiplatform composers use this tracker), Mod2PSG2 (expand/shrink block functions, I found it very useful), and MOD effects (to make studying of effects easier).

Because of method of playing, current conceptions are: maximum usability of editor, maximum time-saving features (which allow to make music faster), no space-saving features (which make music module smaller, because now it doesn't matter). Also, I don't want to add useless features (or rarely used, or features which duplicate some functionality), in order to keep editor code simple and keep interface easy to understand.

From current point of view, general design flaws of editor is: one effect per note (I think about extending this to 4 or more effects per note, like in FamiTracker) and pattern-based order-list (channels-based order can be good time-saving feature). Also usability of editor is not very good, but it can be improved in next versions.


Now back to your comments.

zinger wrote:I know, but there seems to be some kind of bug, often when I right-click on a block, it "deselects" that block and marks the row where I clicked, nothing happens. In Mod Plug Tracker, Ctrl + A is semitone down, Ctrl + Q is semitone up. Ctrl + Shift + A/Q is octave up/down. It works well I think.
When you right-click on non-selected part of pattern, you begin to select new block (bad idea, I know). To call pattern menu you must right-click exactly within selected block. If it's work in another way, it's possible a bug.

'Ctrl+A' already used for 'Select All'. Also, in current version of editor 'Shift' key used exclusively for block selection, so if I use it for shortcut, it reset selected block (I know I must change whole block selection system, but it planned for not close future versions). Maybe you can suggest another shortcuts (which I can add right in next version)?
zinger wrote:Here are some other standard tracker effects:
Position Jump
Pattern Break
Is these effects really can be useful? It was more like space-saving features which allow to reduce modules size, which is not required for TFM-MM. I see that these effects can be used mainly for upcoming MOD import function (because many MOD modules use it).
zinger wrote:Set Channel Volume
You have a whole dedicated volume column (like XM/IT), why you also need effect for volume change?
nim wrote:I'm hoping you'll integrate full keyboard controllability and effects as I'm a keyboard person and hate using the mouse
Just say which operations must be hotkey'ed, and suggest key combinations for it.
nim wrote:And about all talks about features, effects and FT2/IT-standard and all that.. maybe you could consolidate the core of the tracker as a static library and allow for several tracker-interfaces to utilize it...
Maybe later. However, I think that anybody who can make own tracker (even based on open-source GUI) can also make 'core'. When you already have FM synth (like YM2612 emulator), making of FM-based tracker is easier than making of sample-based tracker.
nim wrote:but that is if you feel revealing your headers publicly is ok.. maybe you want it closed source..
Sources will be closed until stable version (with clear todo and bug lists) will be released (or until I decide to drop this project by some reasons). However, if you want to make your own tracker and want to look/reuse some of my code before source code release, you can ask me for it. Note that it's a not portable C++/win32/VCL code (and it's not planned to be portable), also without any comments and clear structure.



Thanks for feedback, and sorry for short answers. It's because it difficult for me to write in english (I spend some hours for writing this answer).

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Apr 21, 2007 9:25 am

Stef wrote:I guess the goal is to have a general player which can also handle DAC play at same time than YM stuff. Doing DAC play alone isn't difficult, the difficult part is to minimise Z80 use for YM and PSG play or it will affect slightly the DAC output quality...
One idea I had recently, would allow very simply to play DAC and FM, and if you like, PSG, at the same time. But Shiru's music fromat apparently doesn't allow it :(
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun Apr 22, 2007 11:37 am

Shiru wrote:I think I shall tell some info about myself, to make you know about my knowledge areas and level, and save some your and my time (in part of giving information which I already know, for example).

VG and game programming is my hobby for many years. I wrote my first games 12 years ago. I know Z80 assembler for 10 years, and still use it in hobbyist ZX and console projects. My current hobby is VG history, emulation (including writing emulators) and retro systems programming. I can write code for ZX, MSX, SMS/GG, Coleco, SMD and some other retro systems (not count for many modern systems). I also worked in game company for some years, where I did, besides other, sound system (software mixer, etc) which used in many games, and midi softsynth.

I also like VG music, and I wrote it for 10 years (as hobby, but I also made music/sfx for some small commercical games). I used very many trackers, sequencers, and other musical software. For example: Sound Tracker/Pro (ZX), Pro Tracker (ZX), Vortex Tracker II (win32 for ZX), RADlib (MS-DOS/OPL2), FT2, Sk@le, Milky Tracker, Mod2PSG (win32 for SMS), FamiTracker (win32 for NES), and many others.

From all sample-based trackers I personally prefer FT2/Sk@le and XM format (not only as composer, but also as game programmer for platforms with slow CPU's) and don't like IT and MPT (interfaces of these trackers itself, not IT format).
very nice experience :)
I myself only do programming... I wrote Gens, a sega genesis emulator which bring me some experience in the retrogaming system architecture and programming. I started sometime ago to write a development library for the sega genesis. It would be cool to see in future a complete sega genesis devkit with a good editor and some nice tools as music editor and graphics editors :)
Like Stef said, playing sample alone (or even 2-4 samples with realtime resampling at once - there is many MOD-like trackers and players for ZX Spectrum, with Z80 @3.5MHz) is not a big deal.
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 :)
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...

Main problem is to combine sample player with YM2612 data depacker/player. FM/PSG player can take various time, up to 10-20K ticks per 1/50 sec, and it has non-linear code. So interleaving of code of YM player with sample player code and getting acceptable jitter and samplerate will be a difficult task (also note that all player code must fit into Z80 RAM to avoid slowdown from wait-states).
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 ?

nim
Newbie
Posts: 4
Joined: Fri Apr 20, 2007 10:02 am
Location: Sweden
Contact:

Post by nim » Sun Apr 22, 2007 1:49 pm

Shiru: I see! then you need no advice but only requests for tracker features :)
Short list of features I absolutely think would be suiting to add:
(I would vote for using IT effect names as 16 effects is too few.)
Jump to order XX (for making looping tune that has intro and then looping part)
Glissando (slide to note)
(Sample/Instrument) Offset (IT Oxx) (if possible I really would use it alot for FM even though it seems only for samples :))
Retrigger note XY or XX? (X vol slide & retrig each Y ticks or only retrig?)
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 a big fan of creating loads of instruments just for small impulsive variations and would use the last three effects alot :)..)
And ofcourse as Zinger suggested:
Note delay X ticks
Note cut after X ticks

Would-really-appreciate commands:
I would like IT's keyboard layout for note keys (but that might be a greedy request)
Reason is that I would really like ie. ',' for setting remember column value (IT) and '.' for blanking column data (if used in note column, blank all columns set to remember by ','). If you will add multiple effect columns this feature would be even more useful!
And if you do use IT's note key layout '4' for play note under marker and '8' for play all notes on current row would also be nice but not necessary!
But if you like FT2's or some other keyboard layout for note keys I guess you wouldn't want that.
And space key for enter last value in specific column like in IT.

Set all instrument data in block to current instrument (like IT's alt+s).

And really using mouse for transpose block doesn't feel good at all so please implement something like alt+a and alt+q.

And please use numpad '-' and '+' for previous/next pattern (pattern number.. not prev/next order item).
And since you use numpad 0-8 for set octave please use numpad '/' and '*' for change instrument previous/next.

And also important command for me is mute/unmute channel X like alt+F1-F6 (if you add psg and/or pcm later F7+ would be good)
(and ctrl+F1-F6 could be solo channel 1-6 etc)

It's much to ask for but a "table" or macro editor would be very nice! (assignable through TXX or MXX?) like tables in LSDj would be great.
Without that you just can't make really great percussive/complex sounds (unless your tempo/speed is insane).
Please look at LSDj's tables, they're very simple but very vital!
If you want it really simple you can just use song speed 1 in tables.

And I would really like IT's template (clipboard) function (alt+i)...

And why is there no tempo? Do you have a reason why you don't want it? I feel it's vital :)

PSG support in future would as much as PCM support be great!

And as you say I realise it's not so hard to write an OPN(2)-tracker but I think there are still few people who would really get down and make one (I myself must use most of my time for things not music nor programming) so many probably will appreciate development of this tracker greatly :) (even more if/when it goes opensource :))

I tried to keep this as short as possible :) Cheers.

zinger
Very interested
Posts: 60
Joined: Thu Apr 19, 2007 12:39 am
Location: sweden
Contact:

Post by zinger » Sun Apr 22, 2007 2:48 pm

Good points nim, and thanks for sharing a bit of your background Shiru, very interesting!

I would like to suggest the following commands:
Ctrl + I = switch instrument of notes in block to the current selected instrument.

Ctrl + L = select whole channel

Making use of the Alt-keys for block transpose, as nim said, might be a good idea. Alt Q/A for semitone and Alt W/S for octave, perhaps. Block selection with mouse would also be a good feature.

Also, Position Jump, Pattern Break and Set Channel Volume might not be that necessary, sorry, but Pattern loop commands are very good for the purpose nim mentioned.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun Apr 22, 2007 5:15 pm

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.

nim
Newbie
Posts: 4
Joined: Fri Apr 20, 2007 10:02 am
Location: Sweden
Contact:

Post by nim » Sun Apr 22, 2007 5:55 pm

Yes I meant portamento, thought it was glissando as it's GXX in IT, sorry :)

About Loop parameter in order-list. Well either way is fine as long as you can make subsongs within the same module :) if you can set several Loop-points and leave blank order-places between subsongs the Loop parameter is better! :)

About Tables/Macros: well locally changing speed and using expand/shrink. wouldn't that have the same load on hardware performance as using an LSDJ-type table would? (also it would get messy if you had a fairly complex percussive rythm and changed speed alot..)
And if you plan to allow note delays and note cuts, won't it mean the same kind of sub-row activity?

If you choose to leave it at expand/shrink and Fxx command, maybe a way to expand/shrink by multiplication/division of 3, 5 or 6 would be needed too when song speed is not a power of 2.
And if so, also maybe a GUI feature to "expand" or "collapse" a speed-changed section of the pattern so if you collapse it it hides the inbetween-song-speed rows. that would maybe be even greater than tables/macros!

About Tempo, any kind of crude tempo feature would be great. one could combine with changing speed to get close to the tempo you want. and I usually don't need any tempo effects.. just to set close to the song tempo the melody is most suited in :)

Sorry for stupid sample-tracker suggestions :) And thanks for the explainations!

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Apr 23, 2007 1:02 pm

Shiru wrote:
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.

...
Thanks for the list ! I will keep them for later purposes, it's a good source of information for an eventual futur Z80 genesis player ;)
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).
I tried to use that method but imo the sound quality isn't good enough :-/
Covox is a covox - 8-bit DAC on a parallel port. Middle sound quality.
I guess these ones would be the most usefull for us ;)
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).
Yep, it's what i mentionned later in my post... bank switch and wait state for RAM access. I don't know exactly about the YM2612 access, i though the DAC access were (hopefully) always without any wait-state !
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.
...
The important in sample play is to maintain a regulary output rate.
Filling a small buffer in RAM will take sometime.

What about something like that :

1) bank switch to sample data
2) play one cached byte of sample (7)
3) fill 8 bytes of sample in a very small RAM cache
4) play one cached byte of sample (0)
5) bank switch to music
6) play one cached byte of sample (1)

7-..) handle one YM2612 or PSG command | x5
8-..) play one cached byte of sample (2...6) |

Each step should take almost the same number of cycles to get a good sample playback. But this method need a special music format for the YM2612 and PSG command and introduce some delay in the execution of them. Also the sample need to be 8 bytes boundary...
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).
Hehe, i'm not surprised, in fact (5 * 1024 / 50) already gives only ~100 which is very small :p
I will study my prelemenary idea :)

elan
Interested
Posts: 42
Joined: Mon Apr 23, 2007 1:40 pm

Post by elan » Mon Apr 23, 2007 1:55 pm

2 Shiru: Thanx for great FM music tool!!!

1./ FULLSCREEN
When I click to icon for wholescreen-window it can not be fullscreen window.Up is still little horizontal space.I can see another window there.I use TransparentBar utility so I can not say for sure that is bug on other computers too.Can U fix that or make Fullscreen-icon mode like in Mozzila or skaletracker?

Oh it is that stupid transparent bar utility... But fullscreen mode is not bad idea...

2./ 3 plus 3 as STEREO
What about left 3 channels for left audiochannel and right 3 channels for right audiochannel.I love stereo.I dont need to have each/stereo channel.But what about 3+3 channels.When will it be slow what about instrument editor as standalone application and 3left plus 3right channels emulation in tracker.

3./PCM??
In not near future ?
What about 2 channels /maybe PCM/ for samples something like FamiTracker has...It can be 8bit samples 22khz is enought for drums...
You know FM songs sometimes needs real drums for real arcade feeling...

You are right lot of people out still have old PCs so keep it smart... Not slow...I have 400mhz oldschool PC with OPL3 inside and I dont want to change it...
I think You can be not interested in Turbosound ONLY... Your tool will have a lot FM fans! ZX,Sega,OPL...You will see.


PS: Please Please ENGLISH help... too.For international support...
Last edited by elan on Mon Apr 23, 2007 2:05 pm, edited 1 time in total.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Apr 23, 2007 2:02 pm

nim wrote:About Loop parameter in order-list. Well either way is fine as long as you can make subsongs within the same module :)
Sub-tracks is a space-saving feature, and they just don't planned for this editor. For better output data compression purposes, it's possible to merge some tracks together in compiler tool (not implemented by now).
nim wrote:About Tables/Macros: well locally changing speed and using expand/shrink. wouldn't that have the same load on hardware performance as using an LSDJ-type table would?
And if you plan to allow note delays and note cuts, won't it mean the same kind of sub-row activity?
Of course, in any case, more frequently notes/parameters changes adds more registers change data, and more CPU load. So if you want to make music which can be used on real hardware, better to not fill every single field of patterns at speed 1;)


Stef wrote:I tried to use that method but imo the sound quality isn't good enough :-/
Yes, 4 bit DAC isn't enough for good quality (until you not use PWM, which will require a lot of CPU power).

But also don't forget, with 8-bit DAC and mixing of 4 channels, you can get effective resolution only 6 bit per channel.
Stef wrote:Yep, it's what i mentionned later in my post... bank switch and wait state for RAM access. I don't know exactly about the YM2612 access, i though the DAC access were (hopefully) always without any wait-state !
Wait in RAM? Afaik, wait state occurs only in ROM (because Z80 and M68K share one bus in that case), and don't occurs in Z80 RAM. I don't know exactly about YM2612 too. I think that DAC output (not register select) can work without busy-wait with speed 1/11000..1/22000 (samplerate), but I don't sure about DAC register select. Our experiments with YM2203 shows that it has separate busy flag for each register, and for better performance it's needed to wait for busy both for register select and data write.
Stef wrote:The important in sample play is to maintain a regulary output rate.
Filling a small buffer in RAM will take sometime.
Did you read post with my background?:)

Maybe I explain it not very understandable (however, you get idea anyway). When you fill buffer, you must continue to play buffer which prepared in previous frame.

I.e.:

- output to DAC from buffer0
- read some bytes to buffer1
- some dummy operations to get exact execution time between two DAC outputs

Repeat this some times. Because buffer1 will be filled faster than buffer0 ends, there is will be time for other operations, like music player. At end of frame we exchange pointers to buffer0/buffer1, so we fill buffer0 and play buffer1, and so on.
Stef wrote:Each step should take almost the same number of cycles to get a good sample playback.
I mentionied that many times in previous posts. It's that I call 'jitter' - sound distortion which comes from floating speed of sample output (which not always possible to avoid because complexity of code).
Stef wrote:But this method need a special music format for the YM2612 and PSG command and introduce some delay in the execution of them.
Not necessary special music format, but definitely special player code - with minimal count of conditional jumps and special code to make execution time same in any case.
Stef wrote:Also the sample need to be 8 bytes boundary...
If you want to get really good speed when you work with streamed data Z80 (like digital sound), you definitely MUST align stream data (i.e., samples and buffers) on 256-bytes boundary.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Apr 23, 2007 2:53 pm

Shiru wrote:
Stef wrote:I tried to use that method but imo the sound quality isn't good enough :-/
Yes, 4 bit DAC isn't enough for good quality (until you not use PWM, which will require a lot of CPU power).

But also don't forget, with 8-bit DAC and mixing of 4 channels, you can get effective resolution only 6 bit per channel.
Yep, but the 4 bits PSG volume stuff is more like a 3 bits DAC as the volume is expressed in db. This makes things even worse :-/
So the 6 bits DAC still sounds a lot better :p
Stef wrote:Yep, it's what i mentionned later in my post... bank switch and wait state for RAM access. I don't know exactly about the YM2612 access, i though the DAC access were (hopefully) always without any wait-state !
Wait in RAM? Afaik, wait state occurs only in ROM (because Z80 and M68K share one bus in that case), and don't occurs in Z80 RAM.
I do mean *ROM* sorry :p
more exactly i was speaking of the banked area access...
I don't know exactly about YM2612 too. I think that DAC output (not register select) can work without busy-wait with speed 1/11000..1/22000 (samplerate), but I don't sure about DAC register select. Our experiments with YM2203 shows that it has separate busy flag for each register, and for better performance it's needed to wait for busy both for register select and data write.
Separate busy register ??? you mean if the address register is modified, the busy state can be different ?

Did you read post with my background?:)

Maybe I explain it not very understandable (however, you get idea anyway). When you fill buffer, you must continue to play buffer which prepared in previous frame.

I.e.:

- output to DAC from buffer0
- read some bytes to buffer1
- some dummy operations to get exact execution time between two DAC outputs

Repeat this some times. Because buffer1 will be filled faster than buffer0 ends, there is will be time for other operations, like music player. At end of frame we exchange pointers to buffer0/buffer1, so we fill buffer0 and play buffer1, and so on.

I mentionied that many times in previous posts. It's that I call 'jitter' - sound distortion which comes from floating speed of sample output (which not always possible to avoid because complexity of code).
Ok sorry i wasn't sure about what you wrote, my english isn't good :p
So it's basically the same idea ;)
Not necessary special music format, but definitely special player code - with minimal count of conditional jumps and special code to make execution time same in any case.
Yep, but we can simplify the player by making a simple music format.
Having something has :
- number of value to write (N)
- (address where write & value to write) * N
If you want to get really good speed when you work with streamed data Z80 (like digital sound), you definitely MUST align stream data (i.e., samples and buffers) on 256-bytes boundary.
Minimize "H" register index use i guess ;)
Last edited by Stef on Mon Apr 23, 2007 2:55 pm, edited 3 times in total.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Apr 23, 2007 2:54 pm

elan wrote:But fullscreen mode is not bad idea...
I don't think it can give any additional usability. I even can't remember any tracker with Windows-based interface, which has fullscreen mode. Can you explain which advantage can give fullscreen in comparison with maximized window?
elan wrote:What about left 3 channels for left audiochannel and right 3 channels for right audiochannel.
Like I said above, TurboSound FM does not have stereo separation for FM part (both YM2203 outputs mixed in mono). There already produced enough devices with such mixing scheme, and hardware design uses surface-mounted components, so there is even no way for most of hobbyist to make stereo output 'hack'. Also, if you place 3 channels to left and 3 channels to right, you'll be not able to make sound in center (to be exactly, you will forced to use 2 of 6 channels for it).

And like I said above, I may add stereo support (Left/Right/Center) in possible SMD-exclusively version of tracker (with option for sound output in mono/stereo).
elan wrote:When will it be slow what about instrument editor as standalone application
I want to improve usability of tracker, not to reduce it:)
elan wrote:What about 2 channels /maybe PCM/ for samples something like FamiTracker has...It can be 8bit samples 22khz is enought for drums...
Please don't forget that it's a specific-hardware oriented tool (TFM/SMD), not just a 'virtual' music editor. I hope that I'll be able to implement 11025hz single digital channel (as I said above, it's not easy to implement such Z80 player for SMD).
elan wrote:Please Please ENGLISH help... too.For international support...
I plan to include short english help in next version (updated information from first post of this thread and some more).

Post Reply