It is currently Sat Aug 17, 2019 4:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Thu Feb 28, 2019 10:11 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
Hello,
I'm reading the tutorial to creating my own Sound Engine ( http://nintendoage.com/forum/messagevie ... adid=23452 ), the problem is that link above to download the source code zip doesn't work anymore. Anyone have a working link o the source code to implement that part of the tutorial? I'm trying to figure out how to create the simplest sound engine to play a loop song and some audio fx.

Thanks!


Last edited by kikutano on Fri Mar 01, 2019 1:00 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 11:00 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2548
Location: DIGDUG
My advice for making a sound engine from scratch...

Don't.

Use an existing one.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 11:07 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
dougeff wrote:
My advice for making a sound engine from scratch...

Don't.

Use an existing one.


Can you link me one? :D


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 11:08 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2548
Location: DIGDUG
I think this is it, by the way.

https://bitbucket.org/ddribin/nerdy-nig ... at=default

I suggest everyone make a copy of this, for posterity sake.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 11:59 am 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 2024
Location: Gothenburg, Sweden
Elaborating a bit on dougeff:s answer, i think it can be good to at least make something that does a simple BEEP, just to get in touch with the area. But writing a music and sfx engine from scratch will take a lot of time. I think it's well worth exploring a couple of the already available drivers.

https://wiki.nesdev.com/w/index.php/Audio_drivers

Once you have tried a few of them out, you'll have a fairly good picture of what the rest of them can do just looking at the specs. Then, if you happen to find yourself in the position where none of these drivers provide some feature that you'd like to have, then that's a good time to either make a fork or roll your own.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 12:07 pm 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
I can sound some beep on NES, but if there are some pre cooked code or sound engine i'm really intetionate to Use it! :D


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 12:35 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2548
Location: DIGDUG
I made a poll, it looks like most people here use famitracker to famitone2.

viewtopic.php?f=6&t=17812

which you can get from Shiru's website

https://shiru.untergrund.net/code.shtml

http://famitracker.com/downloads.php

The nesmaker people are using ggSound (they don't visit this forum). That is another option.

https://github.com/gradualgames/ggsound

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 12:53 pm 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
Thanks!


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 12:57 pm 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 2024
Location: Gothenburg, Sweden
Famitone2 and GGsound are relatively easy to swap out for each other.

Differences are:
-Famitone2 restricts you to keep any DPCM samples in instrument 0. Not a big difference, really.
-Famitone2 restricts you to 17 songs per project file
-Famitone2 restricts you to a note range of C-1 to D-6, which is often within margins of what you need, though not always.
-Famitone2 can't have loop portions in envelopes - this makes vibratos and glissandos a bit trickier to do, but you can still have them.
-Famitone2 can't do quick duty changes, since the duty envelope is restricted to 1
-GGsound restricts you to select 2 channels for SFX. I think Famitone can use any channel for effects at any time, though i might be wrong.
-GGsound requires you to keep the Bxx effect happening in all channels simultaneously - meaning that the pattern from where you wish to loop needs to be a unique instance on every channel.
-Famitone2 has the pattern cut effect, meaning patterns can be of different lenght. GGsound requires patterns to be of equal lenght.
-GGsound can have up to 256 instruments per project file, but it's hard to harness this capability since famitracker can only let you use 64 per project.
There are probably some audible differences in how both engines cut music to make place for SFX; i haven't compared that carefully.

So you need to balance what features you absolutely want/need just a little bit. With a little planning, you can make your famitracker project fairly agnostic towards what sound driver you'll end up using.

Pently is quite different from a user perspective, so take a good look at what style you prefer the most: pently or ggsound/famiton2-style.
One thing that is nice with pently in is the linear vibrato, meaning vibratos don't get as extremely present just because you're in a high pitch.
In the others, you might want to create different instrument copies for the same type of sound every other octave to compensate for this where needed.

Penguin is for being able to do raster effects without a scanline counter, since it is cycle-consistent.

Muse is for using musetracker instead of famitracker, which i haven't tried and can't say anything useful about.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 4:17 pm 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 1180
Location: Hokkaido, Japan
dougeff wrote:
My advice for making a sound engine from scratch...

Don't.

Use an existing one.
My advice is to follow that tutorial if you are interested. It's an excellent tutorial and I didn't only learn how to make my own sound engine, but I learned a lot other things and how to become a better programmer in general. Especially as I was totally clueless how these kinds of things even worked.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 6:08 pm 
Offline
User avatar

Joined: Mon Mar 13, 2017 5:21 pm
Posts: 60
I can see it from both sides. On one hand, getting an audio engine working correctly can be an incredibly difficult, time consuming, and frustrating chore. I wouldn't blame anybody for deciding to use an existing tool to deal with this task.

On the other hand, there were assembly programming skills that I developed from doing it myself that I don't think I would have gotten anywhere else. The nerdy nights audio tutorials are just great programming tutorials generally. and as an professional musician as well as a programmer, I really wanted understand it well enough to make my own.

I do my own because I get a lot of satisfaction out of making it work. That's pretty much why I program anything. I love putting the pieces together and watching it go. but if you're more into the game design aspect and less the software engineering aspect, then by all means use an existing driver.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2019 9:39 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 8:57 pm
Posts: 112
the first thing i did for the NES was build a sound engine that could play back sounds from an array of data. next i took the time to code a VST that i could use to compose music using Ableton Live.

however it was overly cumbersome to use and when it came time to actually make a game, i ended up using the combination of famitracker and famitone. i strongly strongly suggest you do the same.

it's fantastic practice to write an engine, and it's what i used to teach myself 6502 assembly and get more familiar with the hardware and basics of programming. but there are already mature solutions to this problem, and making an NES game is a fairly complex task already. it might be better practice to work on a scrolling engine or something.


Top
 Profile  
 
PostPosted: Fri Mar 01, 2019 12:59 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
The programming part to me is the easiest, I already coded all game engine and game code. I've covered almost all part of Nes Dev ( except for Bank Switching ), so I think I can write my own Sound Engine. BUT, I can't play music, I have no idea how music works, so I decided, for now, to use an engine to speed up a little bit my work. Nerdy Nights tutorial are amazing, I learned a lot from there, but the Music part is really really hard to make working. So I will try some pre cooked code for now! :)


Top
 Profile  
 
PostPosted: Fri Mar 01, 2019 1:52 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 2309
Location: Fukuoka, Japan
As for making your own engine, I would say no and it a wise choice to use an existing one. To make a proper sound engine, you need to understand how to make music and how it works so it will waste more time than anything else ^^;;; You can do for educational purpose but there is good chance that you won't use it.

The only reason to want to make a custom sound engine now would be because you game have some needs that other sound engine doesn't support, which I think would be very uncommon put possible.


Top
 Profile  
 
PostPosted: Fri Mar 01, 2019 1:56 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 90
Location: Italy
Banshaku wrote:
To make a proper sound engine, you need to understand how to make music and how it works so it will waste more time than anything else ^^;;;


This.

Btw I just downloaded GGSound, I will try it as soon as I can. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group