Author Topic: Digitracker sample format  (Read 3775 times)

0 Members and 1 Guest are viewing this topic.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
    • Awards
Digitracker sample format
« on: 15:31, 31 May 10 »
Can someone help me regarding information about the Digitracker sample format?

I'm curious what it looks like, how big is the header and what must it contain etc.?

I've tried opening a sample in a hex editor of course, but I can't be sure exactly where header-data ends and sample-data starts.

I've also tried opening the sample as ASCII with BASIC and plotting it. But here I stumble across a problem. For some reason I'm told EOF is met only after about 297 bytes, even though it is a 3200 bytes file. Looking at the graph part that does gets plotted + the byte at offset 297 in a hex editor, it looks like this occurs just as the value becomes zero. Don't know if this is a coincident though.

When I try loading my Digitracker sample in Milkytracker, it's like there's part of another sample included in the end of the sample. What's even more weird about this is that this sample is signed. So the Digitracker sample at first are located in the upper half of the spectrum only, while that weird other sample uses both the upper part and lower part.

I'd like to be able to manipulate my sample from BASIC, e.g. to reduce noise and such, or maybe even create samples with code. So I need to know about the Digitracker sample format.

Any help appreciated.

Attached is the sample I'm using for testing. It's a bassdrum, so I've renamed the file to "BASSDRUM.SMP".
(It was saved from Digitracker as "--------.SMP" which can be seen in the header).
like
0
No reactions

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Digitracker sample format
« Reply #1 on: 17:54, 31 May 10 »
Ascii file aren't that easy to read, because Basic will think the byte &1a means "eof"... In asm we can read as long as an error doesn't occur, but in Basic I don't know how to do this.


Trg.Aks
like
0
No reactions
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Digitracker sample format
« Reply #2 on: 17:55, 31 May 10 »
... And maybe asking Prodatron himself would be quicker :).
like
0
No reactions
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
    • Awards
Re: Digitracker sample format
« Reply #3 on: 18:59, 31 May 10 »
Ah well, that explains it then.

But I suppose it would still be possible to write a sample file from basic at least then.

Thanks
like
0
No reactions

norecess

  • Guest
Re: Digitracker sample format
« Reply #4 on: 22:20, 31 May 10 »
I don't know if this can be any help, but Prodatron also did a PC version of Digitrakker (DOS version).


Warning : both version are not maintened anymore so I personnaly would avoid using these tools...
like
0
No reactions

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Digitracker sample format
« Reply #5 on: 22:43, 31 May 10 »
I used Digitrakker a lot on PC, but trust me, they have nothing in common. Digitrakker samples are packed, contrary to the CPC version.
like
0
No reactions
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
    • Awards
Re: Digitracker sample format
« Reply #6 on: 15:48, 01 June 10 »
Alright. I've heard from Prodatron. He says:

Quote
The Digitracker sample format is quite simple: 

8 bytes: "DT-SAMP1" 
1 word: sample length 
1 word: repeat start 
1 word: repeat length (<=2 means no repeat) 
[sample length] bytes: sample data 
 
The sample data is 7bit unsigned (so #40 is the zero-level, #00 minimum,   #7f maximum). 
 
Generating SMPs in Basic should be quite simple, you can write the data   with OPENOUT"..." and PRINT CHR$(code); statements. 

The sample "BASSDRUM.SMP" I posted in this thread has apparently been   modified by ManageDsk at some point, so we can't use that one for much in regards of studying the format. Digitracker doesn't write any   Amsdos-Headers, but "BASSDRUM.SMP" does have one, which is not valid for the   SMP format.
like
0
No reactions

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Digitracker sample format
« Reply #7 on: 16:58, 01 June 10 »
Warning ! Do not make any misunderstanding.
A file can have an "Amsdos" header or not (in which case it it considered as "Ascii" file). But the data of the file itself may be consisting of a header (the 13 bytes given by PDT). When manipulating a file with managedsk, make sure that no header is added when importing to a DSK, or when exporting from a DSK (the option is just below the main window). It's exactly like manipulating a SKS file, as I use ASCII file too.
like
0
No reactions
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
    • Awards
Re: Digitracker sample format
« Reply #8 on: 17:56, 02 June 10 »
Small addition to the info about Digitracker samples.

Quote
There will probably be a problem with small samples of e.g. 127 bytes.
The reason is the following: The core-mixer-routine, which is rendering   the output-stream out of the three channel-samples, doesn't test, if the   end of a sample is reached, as this would require too much CPU time and   would lower the frequency and so the quality a lot. So only every 1/50   second the player tests, if the end of a sample has been reached or   passed. Depending on the frequency much more than 127 bytes of a sample   have been processed, until the player checks for the end. I guess a   sample should be at least 1000 bytes or so. 
like
0
No reactions

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
    • Awards
Re: Digitracker sample format
« Reply #9 on: 18:32, 02 June 10 »
Small addition to the info about Digitracker samples.
Do you mind if I add this info to the Digitracker wiki page?
like
0
No reactions
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.206
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
    • Awards
Re: Digitracker sample format
« Reply #10 on: 18:41, 02 June 10 »
Of course not.
like
0
No reactions