Author Topic: How to create digidrums?  (Read 10267 times)

0 Members and 1 Guest are viewing this topic.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.135
  • Country: fr
  • Liked: 1068
  • Likes Given: 154
Re: How to create digidrums?
« Reply #25 on: 23:42, 26 May 10 »
That's really a crappy code :). The sample code takes 28 cycles, to which you add NOPS. For 8 khz sample, a sample must be played every 128 nops. For 16khz, every scanline (64 nops). The calculation is up to you :)
I however decreased these number because of the STarKos player, which takes about 35 scanlines.
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #26 on: 23:56, 26 May 10 »
That's really a crappy code :)

Er, what is? Your example code, or my estimate?

Please understand, that I have no idea what a NOPS is or the likes. I compose music. I can't code assembler.

Just now I tried compiling your code with pasmo, resulting in having to insert ; everywhere to comment out the....comments. I'm using the DAM variant (instead of MXM), since pasmo seemed to like that one most. (I have no clue what DAM or MXM is either).

I'm only interested in one thing: Experiment to see what kind of quality I can squeeze out of digidrums. So I'll see if I can edit that source code now to contain only 1 sample, and then take it from there.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.135
  • Country: fr
  • Liked: 1068
  • Likes Given: 154
Re: How to create digidrums?
« Reply #27 on: 00:17, 27 May 10 »
Oh, don't worry, I was talking about my code :).
You should use the .asm that you can find on the STarKos website, I think it's cleaner.
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #28 on: 00:58, 27 May 10 »
Oh, don't worry, I was talking about my code :) .
You should use the .asm that you can find on the STarKos website, I think it's cleaner.

I took a look at the source that's on the website, but trying to compile that with passmo gives me other problems, like it complains that the label "nolist" has already been defined...tsk.

I've had somewhat success with the DAM source. But both the sample and tune is playing way too slow. I suspect it's because the track I'm using is a 100hz one, and the default playback is 50hz? But I can't find anywhere in the player source where I set this.

Anyway, time to call it a day. G'nite.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.135
  • Country: fr
  • Liked: 1068
  • Likes Given: 154
Re: How to create digidrums?
« Reply #29 on: 01:05, 27 May 10 »
Remove the "list"/"nolist", they're just Maxam mnemonics to start/stop the listing display.
About the frequency, yes, only 50hz. If you want 100 hz, the most simple way to do this is to remove the VSync loop and play twice less samples ! This way, your song will be "almost" at 100hz.
Trg.Als
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #30 on: 22:21, 27 May 10 »
Nevermind.

I was using the PLAYASM9.BIN from a previous version of STarKos, and that seemed to be the cause.
Generating a new player with GP solved it at least.

Now to find out why my samples are just noise....   ::)

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #31 on: 07:40, 28 May 10 »
Been experimenting quite a bit now. My thought was that I could put a chord into the digidrum, instead of a drum.
So I've tested with a simple square sample now, and find that it's not precisely playing back at 8khz.

Is there any way of knowing precisely what the playback frequency is, when we use 160 samples per VBL and waiting 80 nops?

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.135
  • Country: fr
  • Liked: 1068
  • Likes Given: 154
Re: How to create digidrums?
« Reply #32 on: 12:45, 28 May 10 »
Yes. Count the cycles. In theory : (64*312) / time of the replay routine (=28 cycles for the replay + the nops) * 50. So if you're playing every scanline (every 64 nops), you'll get a 15600hz replay frequency.
However, with this code, it will be lower, as we lose some time playing the STarKos player. To play a musical instrument, 8Khz is not a lot. And like I said earlier, it will sound bad because while the STarkos player is called, no sample is played. That's why this code is only useful for digidrums. For example, for the "landscape" part of the Demoizart, you can hear both digi+FM. But the players I did were micro coded to allow me to play the samples EVERY scanline. You may not be able to do what you want with the current player. Switching to Arkos Player tracker may improve the result as it is faster, but...


Oh by the way, did you make sure that you were increasing/decreasing the "ld c,120" just above the PTSPL label ? It's how many sample you're reading per VBL. It has to be as high as possible ! (the raster must fill the screen)
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #33 on: 14:38, 28 May 10 »
Iit will sound bad because while the STarkos player is called, no sample is played. That's why this code is only useful for digidrums. For example, for the "landscape" part of the Demoizart, you can hear both digi+FM. But the players I did were micro coded to allow me to play the samples EVERY scanline. You may not be able to do what you want with the current player.

So code me another player you lazy geek.  :)

I hear what you mean. It's quite easy to hear that the sample-playback is constantly interrupted. But besides that, there's also way too much noise. I did expect noise, but not this much.
I was thinking, that if the sample was simple, like e.g. a square synth, then we'd be "safe". So I tried making a chord of square synths, giving roughly 5 different positions of the wav.
So I changed the CONVTAB so that there only was 5 volumes.
Everything from 0 to 48 = 0
Everything from 49 to 80 = 6
Everything from 81 to 144 = 9
Everything from 145 to 176 = 12
Everything from 177 to 255 = 15

I thought I could get a cleaner square sound this way, but no. I'm drowning in noise.

So I see what you mean about the digidrum feature mostly being useful for actual drums, and not much else.

Oh by the way, did you make sure that you were increasing/decreasing the "ld c,120" just above the PTSPL label ? It's how many sample you're reading per VBL. It has to be as high as possible ! (the raster must fill the screen)

Yup

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.135
  • Country: fr
  • Liked: 1068
  • Likes Given: 154
Re: How to create digidrums?
« Reply #34 on: 15:46, 28 May 10 »
My advice is :
- You code another player by yourself :).
- You could also use a very fast player like madram's AYC player. It's more stable and takes about 10 scanlines (you'll have trigger the digidrums by yourself though).
- You ditch the StarKos player and do samples only. Prodatron manages to get a "decent" quality in the Digital orgasm thanks to that (though the music is cut by the 6 interruptions code, fortunately they're tiny, except for the scroller).
Trg.Aks
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #35 on: 17:47, 28 May 10 »
I wouldn't know how to code my own player.

I'm in the process of getting myself a Digiblaster, and then I will experiment with Digitracker. Till then I just wanted to see what STarKos could do. Now I know.

Thanks for the help.

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 133
  • Likes Given: 67
Re: How to create digidrums?
« Reply #36 on: 18:21, 28 May 10 »
Maybe you should PLOT your samples on the screen and see if the wave-form you get is as you expect it to be. For example, the small program below will load a sample and display the first 640 values (enough to do the check).
Code: [Select]
10 MODE 2:MEMORY &3FFF:LOAD"bassdrum.spl",&4000
20 FOR x=0 to 640:DRAW x,PEEK(&4000+x):NEXT

With drums, the waveform usually is clearly recognizable. So, if you don't see it, call Houston.

Also, do not waste your time trying to produce a normalized sample for the AY. The logarithmic DAC outputs will mutilate it anyway. Do not hesitate to boost heavily (read: saturate) the volume of your sample.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.090
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1253
  • Likes Given: 2502
Re: How to create digidrums?
« Reply #37 on: 20:07, 28 May 10 »
Maybe you should PLOT your samples on the screen and see if the wave-form you get is as you expect it to be.

That was a good idea. I expanded that program, so that it poked new values in order to get a more clean synth, and then saved the file again. There's still way too much noise though, and I don't think it improved anything, because the converter-table in the source should take care of that part already...
But the plot showed me that the file was as it was supposed to be.

Also, do not waste your time trying to produce a normalized sample for the AY. The logarithmic DAC outputs will mutilate it anyway. Do not hesitate to boost heavily (read: saturate) the volume of your sample.

mkay thanks. I'll test this.


Targhan, can we have some specs for the SKI format? I want to experiment creating instruments externally.