![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ChibiSound PRO / ChibiTracks / ChibiTracker PRO!ChibiSound PRO, ChibiTracks,
ChibiTracker PRO - The Unholy Trinity!
With
the huge number of platforms and CPU's I cover, I had a bit of a
problem! In the past I had done simple sounds with my
multiplatform 'Chibisound' driver, and music with the AY based
'Arkostracker'... but while I had managed to write AY wrappers to
allow it to play on some extra Z80 systems, it was too complex for
me to realistically port to more platforms.
The
solution I came up with was to develop my own music software from
scratch!
ChibiSound PRO is the platform specific
sound driver, it handles making consistent pitched tones and noise
effects on the hardware.
ChibiTracks is the player, it works
currently on Z80, GBZ80, 6502 and 68000, however it is simple
enough to be ported to other systems, and such ports are likely!
ChibiTracks is designed for simple music and provides a multiplatform solution to play a single compiled music binary file on multiple platforms. ChibiTracks is NOT designed to provide advanced features comparable to solutions like ArkosTracker To understand how ChibiTracks works, lets look at all the components: ChibiSound PRO ChibiSound is the sound driver that handles the particularities of a system, there is typically one driver per system, though the CPC and MSX drivers are essentially identical except for the AY register setting routines. The original 'ChibiSound' gave us one channel, one Volume bit, six pitch bits, and the ability to turn noise on. Pitches were not matched across systems, so sound 32 won't sound the same on all systems. The updated 'ChibiSound Pro' gives us all the channels provided by the hardware, 8 volume bits, 16 pitch bits, and the ability to turn noise on. Pitches were not matched across systems, however the 'ChibiOctave' lookup table provides values which ARE matched across all systems. ChibiSound PRO is essentially a reduced subset of AY functionality, and was designed on the Z80 - it's 'PRO' suffix is a parody of the 'SoundBlaster PRO' - which could only do 8 bit sound so wasn't up to professional standards! (neither is ChibiSound PRO) ChibiSound PRO provides a standard interface to the underlying hardware, it allows the following features to be set for each channel on the underlying hardware:
Chibisound PRO does not offer features like Envelope, LFE etc, as providing consistent functionality across different platforms would not be realistic. ChibiTracks ChibiTracks is the player for music files. A Song contains multiple Channels (Currently tested for 3) A Channel takes it's commands from a Sequence of Patterns Patterns contains a set of lines. Each of the lines contain a sequence of one or more commands, and a delay to wait until the next line. Channels also play instruments (usually started by the pattern). These are also a sequence of commands and delays, and are used to set ChibiSound settings for the playing sound. A channel will stop making a sound when an instrument ends (unless it loops) It is important to note that functionally Patterns and Instrument command lines are identical - they are literally processed by the same code in ChibiTracks, however it would not make sense to ChibiTracker PRO can output two kinds of file - a binary file (.CBT)
which can be used with any player, or an ASM file - the default format
used to save and reload files (.ASM) - This is a VASM/MAXAM compatible
Z80 ASM file which contains all the binary data in DB/DW lines, and all
extra data for the player in rem statements (Starting with a semicolon).
There are two optional functions which can be enabled (but make the player larger)
ChibiTracks_AllowRelocation - This allows a song to be played from a different address than it was built, For example if a CBT binary was a save address of &4000, it can be loaded and played from address &8000 provided this function is enabled. This function is mandatory on 68000, as only 16 bit addresses are specified in the binary files. ChibiTracks_AllowSpeedChange - This allows the speed of songs to be changed via the 'SongSpeed' function - allowing songs to be sped up or slowed down on playback at the cost of a slightly slower and bigger player - Alternatively you can save with the 'PreMultiply Song Speed' option - in which case it's not needed.
ChibiTracks - A song file! Lets take a look at the ASM file to see how ChibiTracks works.
ChibiTracks - Byte commands There are two types of command in ChibiTracks. One Byte commands have the command number in the high nibble, and the 4 bit parameter in the bottom nibble, For Example &F1: &F_ = Shift volume &_1= Volume up 1 Two Byte commands have a second byte parameter, their top nibble is always Zero, For Example &0E,&FF: &0E = Set Volume &FF= New Volume
ChibiTracker PRO ChibiTracker PRO is a DotNet 3.5 application. It requires SlimDX (SlimDX Runtime .NET 2.0 (January 2012).msi or SlimDX SDK (January 2012).msi), which is used for the sound buffer. ChibiTracker supports a variety of MIDI controllers where available.
State Memory, symbols, and the silent instrument
Song INIT
The Update routine
The Script processor
Tone Lookup
0-15 fractional Tweener
|
Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() Buy my Assembly programming book on Amazon in Print or Kindle! ![]() ![]() Available worldwide! Search 'ChibiAkumas' on your local Amazon website! Click here for more info! ![]() ![]() |