|
Post by gredler on Feb 16, 2019 18:34:24 GMT
This is bad ass, thanks so much for sharing fragmare! I'm going to add this to the faq in the OP, if that's a problem or you want it removed please let me know! I hope to use this soon to do some tests for our project. Can you provide an example of the math you referred to? I am trying to learn about the sound side of things, slowly but surely, and will probably have more specific questions once I have some attempts completed. Thanks again dude, friggin sweet.
|
|
fragmare
Punkic Cyborg
Posts: 116
Homebrew skills: Graphics, Music, Level Design, Annoying Programmers
|
Post by fragmare on Feb 16, 2019 23:31:47 GMT
This is bad ass, thanks so much for sharing fragmare ! I'm going to add this to the faq in the OP, if that's a problem or you want it removed please let me know! I hope to use this soon to do some tests for our project. Can you provide an example of the math you referred to? I am trying to learn about the sound side of things, slowly but surely, and will probably have more specific questions once I have some attempts completed. Thanks again dude, friggin sweet. Thanks, and np! And, sure, that's fine. Sure, I'll explain it. The math equation needed is also in the readme too, if you need it again... 1.) Take a WAV file, any WAV file (like a trumpet sample or something) that you want to capture the waveform from and open it up in a good WAV editor app... like Audacity or Sound Forge. 2.) Next, zoom WAYYYYY in, until you can see each individual point sample and the repeating shape of the waveform, then CAREFULLY select one single, precise loop only. (For complex waveforms, this can be tricky. You've really got to stare at some of them for a while before you can see where it repeats. Also, many waveforms gradually change over the course of the entire sound, so if you want your waveform to change too, you'll need to sample multiple wavetables from varoious points in the WAV file.) Anyway, once you've got the tiny little waveform snippet of the WAV selected, count up how many POINT SAMPLES are used in it (you'll need this number later), then copy it to the clipboard. Sound Forge will tell you this information by right clicking down where it tells you time of the WAV file. Not sure about Audacity. 3.) Then, open up a new WAV file in your editor, and paste the WAV snippet you just copied. Go ahead and paste it 4 or 5 more times for good measure (I'll explain this later). Now save this new WAV in the same folder as Chipifier. We'll call it WHATEVER.WAV for now. 4.) Now, drag and drop WHATEVER.WAV onto Chipify.bat. Chipifier will ask you what sample rate you want to downsample to... here's where the math comes in. Take (32) divided by the number you previously got when you counted up all the point samples being used by the waveform snippet. For example, let's say the original snippet was 320 samples long; you would do "32 / 320 = 0.1". Then take the answer to that equation and multiply it by the Hz rate of the WAV file itself (usually 44100 or 48000). So you would do "0.1 x 44100 = 4410". The answer to this equation is the Hz rate you want to input into Chipifier, in this case. (4410 Hz) 5.) Once you punch in the Hz rate Chipifier is asking for, hit enter and Chipifier should spit out 4 or 5 (depending on how many times you pasted the waveform snippet) .DMW files for use in Deflemask and also .TXT files containing equivalent decimal values for the wavetables you just made. 6.) Open up Deflemask and browse through the DMW files you just made. The very first and very last DMW file generated will usually be a litle weird looking compared to the others (why we pasted the snippet several times), but the ones in the middle *should* all look identical or nearly the same. That's how you know it worked properly... if the middle set of DMW files all look about the same. Pick any one of these for your wavetable, they're going to sound the closest to the original sound. Keep in mind, when downsampling waveforms into 32 byte wavetables like this, it's a bit like taking a full size image and downsizing to a thumbnail image. There's always going to be obvious and severe loss of fidelity and detail, but it should capture the timbre of the original sound quite nicely.
|
|
fragmare
Punkic Cyborg
Posts: 116
Homebrew skills: Graphics, Music, Level Design, Annoying Programmers
|
Post by fragmare on Feb 17, 2019 16:35:33 GMT
You will also need to download Sox.exe and stick it in the same directory as Chipifier, which is what the app uses to convert the actual WAV file itself... forgot to mention that.
|
|
|
Post by gredler on Feb 17, 2019 18:11:47 GMT
Dope, thanks dude. I can't wait to have some free time to mess with this.
I was not considering this for sampled instruments, but rather for sfx (cat meowing, etc).
Like I mention earlier in the thread, our little game is basically silent and lacking most sound it requires.
Thanks again sir
|
|
fragmare
Punkic Cyborg
Posts: 116
Homebrew skills: Graphics, Music, Level Design, Annoying Programmers
|
Post by fragmare on Feb 17, 2019 18:20:43 GMT
Dope, thanks dude. I can't wait to have some free time to mess with this. I was not considering this for sampled instruments, but rather for sfx (cat meowing, etc). Like I mention earlier in the thread, our little game is basically silent and lacking most sound it requires. Thanks again sir Not sure how well it would work at recreating something like a cat meow (or other speech-ish type stuff). I once tried to recreate the "Doot!" sample from Daytona USA's arcade soundtrack with it, and it turned out... interesting. lol Hell, if all you are wanting to do is a cat meowing, you could examine how Konami does it in stage 1 of Parodius. I remember that meow sound effect being pretty legit
|
|
|
Post by Arkhan on Feb 17, 2019 19:02:54 GMT
He's doing well! Drop by the channel sometime, we don't bite people... unless they like it like that. I haven't seen Charles in literally years, man. Yeah, I forgot to setup that server's autojoin shit when I reinstalled MIRC lol. only the Rizon stuff is blastin up. I should pop back in and see who's up for fingerbanging. Yeah you gave it to me awhile ago when you duders were first doing it but I don't really use Deflemask/Trackers so I didn't do much with it except go "neat" *save*
|
|
|
Post by siudym on Dec 1, 2021 10:45:56 GMT
I apologize for the Noob questions right away, but I am totally new to PSG and nothing is clear to me right now Does Squirrel allow you to use its code libraries to use music in your own production? There are a lot of topics on the forum, but there is too much information for a beginner so can someone explain to me in a clear step-by-step how to load it all into ASM (pceasm) code and run music using Squirrel? What is the most convenient way to write MML music now? I found a simple "Macrotune" program - is it ok?
|
|
|
Post by elmer on Dec 2, 2021 5:47:34 GMT
I apologize for the Noob questions right away, but I am totally new to PSG and nothing is clear to me right now We were all new once ... questions are a good way to learn! Does Squirrel allow you to use its code libraries to use music in your own production? Yes it does. IIRC "Squirrel" is the actual MML compiler and toolchain that Arkhan wrote, but the code libraries that run on the PC Engine are reverse-engineered copies of the PSG player that is in the CD System Card. I believe that Arkhan still wants people to ask for his permission before actually using Squirrel in their projects. so can someone explain to me in a clear step-by-step how to load it all into ASM (pceasm) code and run music using Squirrel? I can't help you with that, because I don't use Squirrel. If you want to go that route, you'd probably be best off finding out where Arkhan hangs out these days, probably somewhere on Discord. What is the most convenient way to write MML music now? I found a simple "Macrotune" program - is it ok? The problem with Squirrel on the PCE is not so much the MML notes and patterns, but more about how you link up the stream of notes to the insturments and sound effects. Recent developers have chosen to use DefleMask for creating tunes for their projects, rather than Squirrel. I suspect that you are more likely to find people here to help you if you choose to explore using that for your music.
|
|
|
Post by siudym on Dec 2, 2021 12:17:45 GMT
|
|
|
Post by elmer on Dec 2, 2021 15:59:31 GMT
And what are the other simple methods for generating PSG sounds or music? If they are for ASM.... Attempts to write different values to the PSG registers rather poor results. Well, at the end-of-the-day, it really all does come down to "writing different values to the PSG registers", the tricky bit is how you decide what values to write, and when. Programmers generally leave that responsibility to a "sound driver" library written by someone who has experience in writing those sort of things. Squirrel, or rather its copy of the System Card's "sound driver" is one of those libraries, and turboxray and I have both written PCE "sound driver" libraries that work with DefleMask tunes, created by musicians such as michirin9801 ... Mime - Wish - PC Engine Cover www.youtube.com/watch?v=7o_QnfUr1rwYou may want to read this thread, and then read some of the linked threads, to find out about the current state of music production for games on the PCE ... pcengine.proboards.com/post/11539/threadAnyway, to answer your question ... DefleMask is (IMHO) currently the simplest way to create music for the PC Engine. www.deflemask.com/www.deflemask.com/forum/Congratulations, thats a really great start! It is really nice to see another assembly-language programmer here.
|
|
|
Post by turboxray on Dec 3, 2021 0:36:29 GMT
Mooz also was working on a deflemask tracker too. DamageX made tracker too (not based on deflemask tho). I actually have like 4 or 5 other sound engines for PCE (for PCEAS) from over the years. One of them is the Air Zonk sound engine. If you want the source to those, I can give them to you.
I use/made/work-with HuTrack which is a derivative of deflemask, for PCEAS. It has a pretty high compatibility rate with deflemask, but it requires a conversion from DMF files into its compatible format. The converter is written in python, so works with *nix/mac/win. The player isn't public yet simply because I haven't had time to tidy up the code and make it more presentable (I really wanted to make a public beta this year). There was a frantic pace there where I was adding support and fixing edge case (deflemask) behavior, so the code layout got a little sloppy in the absence of time - but interface wise it's easy to use with PCEAS. It has sound FX support too via "shadow" or channels (although that's currently limited samples at the moment). For the record, deflemask is not really a "good" tracker.. but it's basically the only via able tracker out there. It has some weird/buggy edge-case logic, arbitrary limitations, and is minimal for PCE flair. But has some really good songs have been made with it. I'm at a point with HuTrack that I've already added new support for FX and things that deflemask lacks, so I'm already diverging from deflemask. I just need a nice "what you hear is what you get" editor/tracker for it.
If you're into making your own sound engine, there's a few quirks you'll need to know about it. Nothing overly drastic or anything, but "good to know" stuff and good practices. If you're interested in talking about any of this stuff, PM me for a discord invite. It's just easier to talk and share things that way.
|
|
|
Post by siudym on Dec 3, 2021 9:12:59 GMT
Deflemask. Is it paid? I do not want to pay for anything, since whatever I write in PCEAS will be made available for free ...:/ What do I have to pay attention to when write to the PSG registers? I noticed that even when some sounds are generated, they only work on the Ootake emulator, not on others, and only incorrect sounds are made on the real hardware. EDIT: I noticed there is some kind of free version of Deflemask. I also found something like this: github.com/BlockoS/dmf-playerThe question is whether it will allow converting files from Defmask to ASM code, which can then be used as music in the code? (There is a VGM2ASM file, but not compiled. Are there binaries somewhere?) Attachments:PSGTEST2.pce (128 KB)
|
|
|
Post by spenoza on Dec 3, 2021 16:52:42 GMT
On the one hand, it's super awesome to have options so folks can pick the best engine for their purposes. On the other hand, I really wish there was a community default or standard engine that was broadly supported as a way for folks to get started with audio, before they have to start figuring out what kind of more advanced capabilities they need.
|
|
|
Post by gredler on Dec 3, 2021 17:47:16 GMT
I really wish there was a community default or standard engine that was broadly supported as a way for folks to get started with audio, before they have to start figuring out what kind of more advanced capabilities they need. There is, that's squirrel. As far as I am aware all of the deflemask and alternative tools are private/unreleased at the moment, and even those are so specifically made for their projects they are not something that can be plugged into the public release easily. The version of HuC we are on, for example, is significantly modified and branched from the latest public release and the sound driver is not entirely functional yet even there. Squirrel is the best public facing option unless someone releases or makes their own different sound driver otherwise.
|
|
|
Post by spenoza on Dec 3, 2021 18:59:32 GMT
My most critical issue with Squirrel in this role is the issue of it relying on copyrighted code without appropriate permissions. In a CD title that's fine, because the actual sound engine code is included in the system card. But for HuCards, the engine itself has to be included in the game code and it is not code that is legally permissible for that purpose. For homebrew developers who want to be completely above-board, Squirrel is unsuitable. So far, that hasn't been an issue for developers in this scene, but if the scene is to grow it could become an issue. I want someone, anyone, to finally release a perfectly legal, publicly available, community accessible sound engine which is thoroughly unencumbered by potential legal snafus. Not just one or two of those three conditions, but all three. Squirrel is a great 2 of 3, and I respect Arkhan's work on it and his points that the copyright holder (Konami) probably doesn't give a shit. But I could see someone being a stickler on that legal issue, and rightfully so. And for that reason alone, Squirrel is inappropriate in the role of default sound engine (outside of CD titles, at least). There is the ancillary issue that Squirrel seems mostly dependent upon a particular HuC release. HuC is still being developed and the self-designated lead on that and the lead on Squirrel are unable to be in the same online space peacefully. That could really be an issue in any dev community, however, and is likely unavoidable, so I don't consider that a show-stopper the same way I do the legal issue. That said, it does create complications for users who have to bounce between a couple different on-line spaces for help.
|
|