Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - New music tool for SMS/GG

Reply to topic
Author Message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
New music tool for SMS/GG
Post Posted: Sat Feb 25, 2012 8:29 pm
I have been working on my own sound tools for SMS past month, in order to have music in my entry for the coding competition and I thought I'd reveal it.
I hope to finish the tracker this month or maybe early next month and write SMS side code to do music and SFX but when things drag I will only have music to present to the competition rather than game with music.

The main feature of the tracker is that you can have PSG and FM sound at the same time. It is MS-DOS based so you will need a machine with sound card that has OPL3 (SB16 for example) or use DOSbox instead. System requirements should be very low and a low end 486 should be enough for smooth pattern view scrolling (and you don't need a beefy machine for DOSbox emulation either).

YM2413 is simulated on OPL3 aswell as PSG. Only problem right now is PSG white noise which I won't be able to accurately simulate on the OPL3 but rest would be spot on.

I am currently working on instrument editor side and it is nearing completion, when its done I will work on pattern/order editor.

I attached some screenshots to the post for your pleasure. There's no work done yet on the pattern editor but it gives an idea how it looks.
FileScreen.png (26.13 KB)
Music module settings
FileScreen.png
InstrumentEditor.png (25.58 KB)
Most awesome thing for the moment
InstrumentEditor.png
UnfinishedPatternEditor.png (15.21 KB)
Very unfinished but shows the future
UnfinishedPatternEditor.png

  View user's profile Send private message Visit poster's website
  • Joined: 19 Aug 2011
  • Posts: 115
  • Location: Australia
Reply with quote
Post Posted: Sun Feb 26, 2012 2:35 am
This looks fantastic!

Rough eta?
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sun Feb 26, 2012 2:18 pm
I told it would hopefully be finished this month, PC side stuff, but currently it seems that won't happen and I get the tracker finished early next month. That won't leave me much time to work on my game for the competition so I may only take part in music side.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Mon Feb 27, 2012 6:13 am
TmEE wrote
That won't leave me much time to work on my game for the competition so I may only take part in music side.


Nooooooo! I'd really love to see your game. It doesn't care if it is without music.

P.s. Looks good.
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Mon Feb 27, 2012 11:46 am
I require good sound in a game (of mine), so no sound will mean no game...

I got instrument editor fully operational now with both PSG and FM sounds and I will start working on pattern editor today after work :D
I wrote some code to do basic FM handling on SMS side, I already got PSG envelope generator and basic chip handling functions worked out already.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Mon Feb 27, 2012 1:38 pm
TmEE wrote
I require good sound in a game (of mine), so no sound will mean no game...

I got instrument editor fully operational now with both PSG and FM sounds and I will start working on pattern editor today after work :D
I wrote some code to do basic FM handling on SMS side, I already got PSG envelope generator and basic chip handling functions worked out already.


If you want I could share my music(FM)+sfx(PSG) re-player code. The PSG still has some noise issues (but not unsolvable).

The FM replayer plays Moonblaster music (MSX computer tracker). Not the best tracker but it can produce good music (better than average SMS FM music on commercial games).
There is also a wide range of music available. Composers would probably be happy to let you use their music in your game.

PM me if you want to have a look or listen.
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Mon Feb 27, 2012 3:44 pm
I am very picky about sound tools which is why I am writing my own tracker etc. in the first place, plus I don't like code made by other people in my stuff...
Thanks for the offer though ^^
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Mon Feb 27, 2012 4:27 pm
TmEE wrote
I am very picky about sound tools which is why I am writing my own tracker etc. in the first place, plus I don't like code made by other people in my stuff...
Thanks for the offer though ^^


No prob. If I had the time I'd write my own tracker too (which is on hold till end march ;) )
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Mon Feb 27, 2012 10:29 pm
That sounds fun ^^

Anyway I have been making good progress on the tracker's main side. Few tens of more lines and it will be able to show all the note and effects data :D

...And then there will be a giant keyboard handler getting worked on which I'm not looking forward to haha
PatternsProgress.png (13.78 KB)
Shaping up !
PatternsProgress.png

  View user's profile Send private message Visit poster's website
  • Joined: 15 Sep 2009
  • Posts: 377
Reply with quote
Post Posted: Sat Mar 03, 2012 9:46 am
I'm not a fan of trackers, but the very fact that you use the OPL3 chip to simulate the OPLL and PSG chips makes it cool.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sat Mar 03, 2012 11:06 am
I find trackers only way to make music, as long as each channel has its own order table, which almost no tracker does :(

Anyway I can now enter notes :D
I have to limit PSG note range though, right now it allows you to do good bass notes which PSG cannot do (in accurate manner).

Right now I am sticking to EGA colors but I think I will want to add a color scheme creator, because you need VGA anyway for 80x50 res and it allows for fine palette adjustments :P
GreatProgress.png (18.53 KB)
Note inputting !!!
GreatProgress.png

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14744
  • Location: London
Reply with quote
Post Posted: Sat Mar 03, 2012 11:38 am
It seems kind of archaic to use this kind of DOS framework, but I guess whatever works for you is fine.
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1356
  • Location: italy
Reply with quote
Post Posted: Sat Mar 03, 2012 11:46 am
MS-DOS is still the best way to get direct hardware access. Sure, win32 programming has its advantages, but I admit I miss the MS-DOS days.
Nice work on the tracker, by the way.
Maybe I can help you to implement a rudimental XM importer? Of course the instruments will be ignored, but...
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 731
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Sat Mar 03, 2012 1:17 pm
Tom wrote
MS-DOS is still the best way to get direct hardware access. Sure, win32 programming has its advantages, but I admit I miss the MS-DOS days.


So long as you have legacy hardware and a bios that still supports interrupts or are happy to run your programs in a dosbox simulated environment. :)

I agree it was a nice environment to code in but those days are long gone.

Trackers hold a nostalgic charm to me but I always found their use of segmented patterns too restrictive.
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sat Mar 03, 2012 2:06 pm
I never became friends with windows... I tried few times but lack of interrupts and giant WinAPI made me less and less interested in it...

For folks without "ancient" hardware there's always DOSbox, Pier Solar people used my MD tools through DOSbox and apart from few nuances it worked fine.
My main machine which I use to make this on is not really so ancient, its a 3.2GHz P4 machine from 2005ish times, with industrial mobo that has ISA slot :3

I made some more lovely progress and attached a screenshot.
HexInputIsWorking.png (19.21 KB)
Hex input is working :D
HexInputIsWorking.png
PCsideAndDesk(old).jpg (705.16 KB)
Development environment
PCsideAndDesk(old).jpg

  View user's profile Send private message Visit poster's website
  • Joined: 25 Jun 2005
  • Posts: 50
  • Location: Paris, France
Reply with quote
Post Posted: Sat Mar 03, 2012 4:43 pm
Your stereo speakers kick some serious ass :)
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Sat Mar 03, 2012 10:59 pm
I hope you don't code like you keep your desk ;P
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sun Mar 11, 2012 8:09 pm
My code is very neat and structured, until I optimize it, then even the desk pales in comparison :P

I will definitely not have time to have a game for the compo, and music side is going to be tight aswell...
  View user's profile Send private message Visit poster's website
  • Joined: 27 May 2008
  • Posts: 161
Reply with quote
Post Posted: Mon Mar 12, 2012 6:30 am
Quote
I never became friends with windows... I tried few times but lack of interrupts and giant WinAPI made me less and less interested in it...


If you don't want to use the WinAPI, and really just want a framebuffer you can draw into, some way of playing audio, and getting input from the user, then I suggest using SDL.
It's really quite easy to learn, and doesn't require a lot of extra code. And another positive thing about it is that, besides Windows, it would be fairly easy to also get your tracker to run natively in Linux and Mac OSX.
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Tue May 08, 2012 8:37 am
I've been working on this again after doing hardware for a while.

I created some nice periodic noise and made some not so good progress on white noise. That one is probably never going to sound like real stuff...

I attached a photo of some nice FM square waves.

Next stop is probably going to be writing the actual playback code
O-ScopeFun.jpg (95.01 KB)
oscilloscoping is awesome
O-ScopeFun.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Tue May 08, 2012 12:10 pm
TmEE wrote
I require good sound in a game (of mine), so no sound will mean no game...

.

I completely agree with you. Bonne Chance!
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sat May 12, 2012 9:56 pm
I did selections instead, and copy/paste/block delete/cut will follow shortly

You use shift to do a selection. First press only select notes or one effect field, second press will select whole channel.
I attached pair of screenshots to illustrate, it should be quite useful ^^
IgotSelections0.png (20.32 KB)
Partial Selection
IgotSelections0.png
IgotSelections1.png (19.79 KB)
Full Selection
IgotSelections1.png

  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Sun May 13, 2012 7:14 am
Could you explain the use of each track column? What are they used for?
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Sun May 13, 2012 7:46 am
First column is for your notes, last 3 are for effect data such as Volume, Detune, Vibrato, Freq and Volume slides etc. etc. etc.
I plan to put there some "pseudo" effects that alter UI and other interface parts aswell.

EDIT: Block operations are done :D
CopyPasteDone.png (28.35 KB)
I got block operations !
CopyPasteDone.png

  View user's profile Send private message Visit poster's website
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Tue Jul 31, 2012 9:47 am
My focus has shifted on supporting SMSDMA sound capability, which means no more vanilla SMS anymore... at least vanilla SMS is no longer a priority.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Tue Dec 04, 2012 11:42 am
Slight update...

(Still waiting for some parts)
smsdmapcb.jpg (255.49 KB)
Naiss stuff
smsdmapcb.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Fri Apr 05, 2013 7:54 am
Quote from SMSDMA! on the internet:

When I get the final part and do a bit of more soldering and programming I will have something that makes SMS completely kill NES on all aspects !

80% more animation because Z80 cannotpush data fast enough, AVR can !
8x squarewave channels with 0.4% duty cycle adjustment
2x logarithmic PCM channels that play 16 built in percussion sounds


How is the sound output managed? IIRC there is no sound pin on the cartridge connector.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14744
  • Location: London
Reply with quote
Post Posted: Fri Apr 05, 2013 9:25 am
You can DMA the PSG to make it work as a PCM device. (Too many TLAs?)
  View user's profile Send private message Visit poster's website
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Fri Apr 05, 2013 12:23 pm
Maxim is correct, I use PSG as a crude DAC. The sample rate is fairly low (25600Hz) so it does not cause much loss for Z80.
The 80% figure is from VDP standpoint, Z80 only reaches 20% of VDP can do, SMSDMA can reach near 100%, all comes down to hitting all the VDP access slots, and I think there will be some missed due to no synchronity to the VDP.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!