Music

hu, cd, scd, acd, supergrafx discussions.
Post Reply
User avatar
Arkhan
Posts: 9
Joined: Fri Aug 29, 2008 3:28 am
Location: Ohio (USA)
Contact:

Music

Post by Arkhan »

Aside from the .mod player HuC is implementing, and the Sound Generator, ........and tomathieo's explained hex editor mini tracker.........

What musical development tools are there for the PCE? I've gotten some sound fx out of the Sound generator, but that program cant be used to make full tunes, obviously.

I've poked at doing it in asm, and it is a daunting task of course ......

are there any other secret examples I've been missing?

I'm new to doing it on the PCE, but I have some years of tracking experience, so if anyone (*cough* tom!*coughcough*) has examples, I'd like to dive in head first and start messing with all of it...... :)

although I suppose with the .mod player, we could all just sample our favorite PSG sounds from games and feed them into a tracker, make a .mod, and play it back in HuC!...... I'd just be worried that it hogs the CPU if you make a really fancy song.
HOW I MINE 4 FISH!?1/1
User avatar
MooZ
Site Admin
Posts: 407
Joined: Sun Jun 22, 2008 3:19 pm
Location: Lvl 3
Contact:

Re: Music

Post by MooZ »

There's a mml/mck compiler called HuSic. Back in the days, the only available source code was the asm produced by HuC.
I spent some time trying to clean up and understand the source. I finally gave and started my own researches :)
tomaitheous
Posts: 88
Joined: Mon Jun 23, 2008 1:58 pm

Re: Music

Post by tomaitheous »

The MOD player won't be done for a while (mainly because I'm working on other projects), but you have some options. One option is to write a 4 channel MOD parser, but you treat all the samples as 32byte 8bit PCM (either convert on the fly or before hand). Reserved one instrument # for noise, so the parser knows to put one or two channels into noise mode, etc. You could get even fancier and detect certain instrument #'s as long samples for DAC output. Doing a 7khz DAC for any channel in HuC is pretty easy. If you do that method, you already have a tracker freely available to hear your work before hand.

The other method was just to use a simple 32bit format that's hex editor friendly. Like this:

0001111 22223333 44445555 66667777

0000 = note to play. C=C, A=A, B=B, E=E, F=F, etc. Use numbers for some other notes that have a corresponding hex charactor and for sharps.
1111 = octave. Self explanatory. In a little ASM demo I did, I used a lookup table for both octave and note. Simple and fast.

Note: you could also squeeze in a few 'instructions' into 0000/1111 - like key off, note length, and such. It wouldn't be on the same line/entry though.

2222 = Left channel volume
3333 = right channel volume

4444 = instrument #. Reserved one instrument # for noise mode *if* used on channel 4/5.

5555 = FX. Stuff like vibrato, tremolo, etc. I'd probably just mirror exactly what MOD format has.

66667777. Treated as one whole parameter or two separate 4bit parameter depending on the FX # used.

The reason it's hex editor friendly is that all parameters are either 4 or 8 bit. Easy to read and write in a hexeditor.

Doing the MOD method is a little more coding, but the payoff is higher - being that you can hear and editor the music in a real editor/tracker. With the mini format though, you can easily add volume, pan, and frequency envelope assignment in the FX section. Something you have to manually simulate in a series FX parameters entries in the MOD format.


Oh, I forgot. I was planning on doing the MOD method (but with XM files), so I made a BMP to PCM converter. So how's that work? You setup a 32x32 pixel BMP and draw the sample. Simple. The converter just reads from the BMP and creates 32byte pcm instrument. Perfect .
User avatar
Arkhan
Posts: 9
Joined: Fri Aug 29, 2008 3:28 am
Location: Ohio (USA)
Contact:

Re: Music

Post by Arkhan »

Im not sure I have the skills to write a mod parser. heh. That bmp to pcm converter sounds interesting though..


In regard to the hex editor.... what exactly do you do with the hex-edited file to make it produce noise?
HOW I MINE 4 FISH!?1/1
Post Reply