Forums

Topic: Petit Computer

Posts 2,381 to 2,400 of 9,620

VincentFaraday

hairmanban19 wrote:

randomouscrap98 wrote:

Even though I'm pretty sure nobody is going to listen to it (I know you're all busy), I made the Super Mario Bros 2 overworld music in MML. I tried to get it as faithful as it could be, but some of the sounds are a little off. Whatever, I tried my best. This is one of the songs that are going to be included in my Village game as part of unlockable songs to listen to while you're walking around. You can listen to the song just by running the program below, however you'll need to load it from the "console" instead of just viewing it under programs, since it makes no attempts to wait for the song to finish. For instance:

LOAD "SMB2SONG"
RUN

UntitledUntitled

Edit: Composed by Koji Kondo. I did not compose this song, I merely translated it into PC BASIC. Sheet music obtained from www.ninsheetm.us.

You did a great job on this music!

I was looking at your code and I noticed that you programed the music using the "DATA" command. I'm curious to how you did this and how it works. In my ocarina program I stored the mml into a variable and then I would use the "BGMPLAY" command. Also, I would have to use a new variable if the code for the song was too long and if I was writing code for a different channel. Currently, I am up to using AG$. Your way looks a lot easier.

I wish I was on the Enterprise.

3DS Friend Code: 1048-8460-1195

Pixelrobin

@petithead If you needed help, why didn't you just ask? First, try out youtube.com/petitprofessor, then ask around, look in the sample program code [start with sample1] If you need further help a.k.a you don't understand something, Feel free to ask us. There is no need to be embarrassed. We were all once like you. I am willing to help with any programs I can.
@Morphtorok, Your right, I guess I got carried away there. How is the puzzle program coming?

Also if anyone deserves banning, it should be me. I started the whole mess and it was all my fault.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

@hairmanban19 Thanks! I appreciate your praise! I actually listened to it again and realized that the percussion (that static noise in the background lol) is a little loud, so I turned it down.

@VincentFaraday If you look at the top of the code for this song, you'll see the BGMSETD command. It looks like:

BGMSETD 128,@SONG1

The @SONG1 is the beginning of the MML data section, much like when you use @RESTORE to jump to a regular data section and read data. Just like using DATA and READ commands, the various breaks between DATA commands has no effect on the resulting music. If you look at the first DATA line, it describes how all the following DATA lines should be interpreted. In this case, it is the first channel (:0), instrument 153 (@153), tempo 190 (T190), and octave 5 (O5). Now, all the rest of the data commands will just be the notes to fill in channel 0. That is, until we reach a data segment with a different channel. If you look at the first break (around line 23), you'll see another DATA section that describes a channel. Now, instead of the following notes being part of channel 0, they are part of channel 1. I've never used MML with variables, so I can't really compare the two. All it basically boils down to is: Use a data line to describe a channel, fill that section with notes and crap, then continue on with other sections by placing another data line that describes a different channel. Sorry if it's not really clear.

randomous

randomous

@Discostew You mentioned that there are tools in regards to MML, what are some of these? I just took the sheet music and transferred it note-by-note into MML as a piano first, then when it was done I changed the piano to the "old-school beeps" and added the percussion line as the general "noise" sound bumped up to the 7th octave. I guess I did it the hard way if there are tools at my disposal lol.

Edited on by randomous

randomous

Eel

bluerobin2 wrote:

@Morphtorok, Your right, I guess I got carried away there. How is the puzzle program coming?

Also if anyone deserves banning, it should be me. I started the whole mess and it was all my fault.

Seems like someone already got banned and it wasn't you.

About the puzzle, I'd like to think it's already finished.... Though I kind of had a non-game idea earlier today that I might start programming soon. We'll see how that goes!

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Discostew

randomouscrap98 wrote:

@Discostew You mentioned that there are tools in regards to MML, what are some of these? I just took the sheet music and transferred it note-by-note into MML as a piano first, then when it was done I changed the piano to the "old-school beeps" and added the percussion line as the general "noise" sound bumped up to the 7th octave. I guess I did it the hard way if there are tools at my disposal lol.

Well, I meant tools in the general sense of having things to make the creation faster. Not necessarily automated. For instance, with making the Megaman 2 audio, I used a modified version of Famitracker that allowed importing of NFS files, grabbed the MM2 NFS, adjusted the pattern length based on what fit each song, and then transferred each note manually. It was the transcribing that took most of the time, with making adjustments and optimizing for a smaller footprint per track being the next longest portion. I had to make some custom soundwaves, like the triangle wave and the secondary noise wave (Quickman's stage with the electricity sounds), but those were relatively easy. It's a good thing the game doesn't use the DPCM channel, or I'd have to improvise with that.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Pixelrobin

I feel bad that petithead got banned. Please don't remind me even more.
How do you copy the text on the bottom screen and save it as a grp? I know I have asked this before, but I still did not get it very much. I just don't know what to say. Can someone please give me a short, simple and detailed explanation?

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

@Discostew That's one thing I really want to learn about: how to make custom soundwaves. I've tried the wave editor that comes with Petit Computer, but I just can't seem to figure out how to get a specific tone out of it. I know what waves are of course, but there's no way I can listen to a sound and go "Yep, that's definitely a combination of these 40 sinusoidal waves. Let me just combine all these and get the result". Is there a method to it?

randomous

Discostew

@randomouscrap98

Not really. I'd say it is for very simple soundwaves, like the triangle wave demonstrated in the manual. I had to be creative with my approach to replicate the 2nd mode of the NES noise by using Famitracker, set a note with that mode on, record that sound with Audacity, find a suitable section of the recording that shows a consistent loop, crop it, and then reduce the quality (aka, samples) enough to where I could fit it into the small 128-byte allowable string with some modifications. Outside of that, I could not make a usable soundwave if my life depended on it that wasn't simple. You could make other sounds like a sawtooth wave, but don't expect to be able to make SNES-quality instruments, let alone anything resembling them. I know they were limited by the input of 256 character strings (128 samples), but they could have taken an approach like what they did with BGMSET/BGMPLAY (Expert), allowing you up to 9-10 strings "strung" together. That would have allowed soundwaves up to 1152 samples each. Heck, allowing an array for a parameter would have helped also, increasing the relative size.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

randomous

@Discostew Ahhh, I see how you did now. That... is quite an incredible amount of work to recreate a sound. And yeah, I didn't expect the sounds to be amazingly precise. Thanks for your in-depth explanations!

In regards to the limitations set on user sounds, I guess I don't know enough about how Petit Computer is implemented to form an analysis on their design decisions. Why do you think they chose to only allow a 64 or 128 sample rate?

Edited on by randomous

randomous

SwerdMurd

Discostew wrote:

I had to be creative with my approach to replicate the 2nd mode of the NES noise by using Famitracker, set a note with that mode on, record that sound with Audacity, find a suitable section of the recording that shows a consistent loop, crop it, and then reduce the quality (aka, samples) enough to where I could fit it into the small 128-byte allowable string with some modifications.

Get a 4 cycle sound generator - way cleaner, lower bitrate way to replicate 50, 25, and 12.5 duty cycle square waves, and the 16 step triangle. You'll still have to loop it yourself, but that's cake with a good source

http://woolyss.com/chipmusic-generators.php has a decent enough free one

-Swerd Murd

(check my tunes out at www.soundcloud.com/swerdmurd)

Discostew

@randomouscrap98 I don't know the exact reason, but I can only speculate that it is limited on usable memory. Programs only have about 1MB to work with, though it uses DSi mode, which has 16MB of main RAM. The interpreter and default instruments are some of the things that are part of the main 15MB, but I don't know how much the program actually uses. The other speculation is what I mentioned before. Strings can only hold up to 256 bytes, which would allow a 128 sample soundwave. Perhaps they didn't expect many people to use them so they didn't feel the need to "extend" them. As it is right now, one of the reasons why projects with PTC are becoming rather big is because development isn't limited to PTC itself. Programs like PTCUtilities are offering a wide variety of accessibility and time-saving features that is just not possible with only the built-in programs. I probably would have stopped my project if I hadn't learned the format of PTC files and made my own PC programs to construct my data into GRPs.

The developers were simply thinking on a small scale for people who only had access to PTC, and not all these other custom applications.

@SwerdMurd

I don't have to worry about making any square/triangle waves. PTC uses the DS/i's audio hardware, which contains the appropriate PSGs, as described here, and also mentioned in the PTC manual, having 8 separate wave duties, each as a separate instrument. Triangle wave is already described in the manual, and is easy to create. It was only the noise which I had to deal with, to which I had to make an estimate with the 2nd mode, and simply use the "white noise" that was part of hte audio hardware. There's really nothing I could do to improve it, as the actual length of the NES noise (which is just a square wave with a pseudo-random 1-bit generator, nothing like the DSi's white noise) is around 32Kbits, with mode 2 being 90bits, but can vary as it is based on where it began in the 32Kbit sequence

Edited on by Discostew

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Anonymous_Ninja

@MrSirr you can just check to see how close the man sprite is to the car sprite like this,
(youve already loaded the two sprites,0 is the man, 1 is the car)
SPREAD(0),x1,y1
SPREAD(1),x2,y2
if BUTTON(1)==16 then if x1<x2+10 and x1>x2-10 and y1<y2+10 and y1>y2-10 then GOSUB @enter_car
that will probably need to be spread out between 2 lines, not sure, and if you dont know how one of those commands works or i was confusing (turns out im good at being confusing xD) then just just say so and ill try to help.

Edited on by Anonymous_Ninja

nope, no signature here...
I lied, here's my friend code: 2406-5448-5608

Sgt_Cola

To celebrate, I will give everybody the final installment to JART! & just so you know, Its bad... I ran out of music & I don't know how to load MML programs into a program... could somebody give me an explanation on how this works?

Sgt_Cola

MrSirr

Anonymous_Ninja wrote:

@MrSirr you can just check to see how close the man sprite is to the car sprite like this,
(youve already loaded the two sprites,0 is the man, 1 is the car)
SPREAD(0),x1,y1
SPREAD(1),x2,y2
if BUTTON(1)==16 then if x1<x2+10 and x1>x2-10 and y1<y2+10 and y1>y2-10 then GOSUB @enter_car
that will probably need to be spread out between 2 lines, not sure, and if you dont know how one of those commands works or i was confusing (turns out im good at being confusing xD) then just just say so and ill try to help.

Would that really work? Will it let you put x1 and x2? I thought it was just X. lol, and I don't think you're confusing (well, a little)

MrSirr

randomous

@MrSirr the variables can be anything you like. You could have called them CARX and MANX and it would still work:

SPREAD(0),CARX,CARY
SPREAD(1),MANX,MANY

Or something to that effect.

randomous

randomous

I don't know why, but I'm currently very interested in remaking music using MML. Here's the Pokemon Red/Blue/Yellow bike theme:

Untitled

This one was much simpler, not only because it's a shorter song but also because there's not a lot of articulation (in fact, it's pretty much flat). It's the same deal as before: load it on the "black screen" instead of through "View Programs" and then just run it if you want to hear it. This is also going in Village.

Edit: Just as before, I did not write this song. Song composed by Junichi Masuda.

Edited on by randomous

randomous

Pixelrobin

@petithead, great to have you back! Are we cool? Did you see my previous post fot you on where to start learning programming?
Also @ramstrong there is an error in your code. I believe it is at line 218. You used 2 equal signs when you only needed one. You should also add an if statement to take care of negetive numbers.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Sgt_Cola

bluerobin2 wrote:

@petithead, great to have you back! Are we cool? Did you see my previous post fot you on where to start learning programming?
Also @ramstrong there is an error in your code. I believe it is at line 218. You used 2 equal signs when you only needed one. You should also add an if statement to take care of negetive numbers.

Yeah. Thanks for the tip. I REALLY NEED IT. so, can somebody try out JART trilogy? Its sort of like an art gallery made with the symbols. I use it to test my skills with the LOCATE command. My next one Is going to be SPART (SPrite art).
EDIT: actually, change in request. http://www.legendofdrew.com/sheet-music/Dedede.gif Its "King DeDeDe's theme". Not his masked one.
so, can somebody make Kirby vs masked DeDeDe? Actually, all I need is sheet music & I'm done. well, sort of.

Edited on by Sgt_Cola

Sgt_Cola

Please login or sign up to reply to this topic