Waveform Drawing and playback?

Game Editor comments and discussion.

Waveform Drawing and playback?

Postby kyensoftware » Sat May 12, 2007 7:21 am

I didnt know weather to put this in Feature Requests or not.
I don't know if there is a C command/script for this.
I want to make it for a synth tracker.
I also want to record to wav (or use an array to playback with a game)
This does sound a little n00bish, sorry.
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Sat May 12, 2007 11:53 pm

GE doesn't have any C command that can output a double (-1 to +1) to the sound card,
To display the Waveform, you would need to open the wave file as a binary text, which is whit the fopen.
When it is loaded, it would read the header for the hz, stereo/mono and the Bits size and convert it to be shown on a canvas which could be like
Code: Select all
putpixel(pos,fq[pos]*height/2+height/2);
something similar at least.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

err.

Postby kyensoftware » Mon May 14, 2007 9:27 am

Erm...so you could make an equlizer?
Can you please give me a code for that please??
THX in advance...
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Mon May 14, 2007 11:11 pm

sorry, i do not know how to make an equalyzer, i do not know how it stretch or shrinks the wave forms ex: let say we would have a 64hz (Almost the first hearable sound wave, my fav :P) and let say we would make the 64Khz (64000Hz) louder, it would not affect the 64hz would it? nope, since there is no trace of a 64Khz and i am not able of doing that, sorry :3
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

hmm.

Postby kyensoftware » Tue May 15, 2007 6:35 am

Hmm...how do you use that code?
The one you posted?
I don't know how to use that code, and btw, the code to read the header should work as an equilizer, just read different sections!
I am handling 8-bit only
Using chiptune is a rule for me!
if the sample is not under 120 samples (tiny, tiny sections of a sample) and is not a midi instrument or drum, then don't use it.
Also, if the song has no portamento or arpreggio, it is unusable!
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Tue May 15, 2007 11:13 pm

Well, you would need to go at some kind of site to see how the bytes are, i think that each byte (A letter in notepad) correspond to a digit, not sure.
I will show you an GED example, i can't really explain it.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

OK

Postby kyensoftware » Tue May 15, 2007 11:46 pm

OK, that is what I wanted...
I just cant talk, see, cause I'm dumb...
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Wed May 16, 2007 1:07 am

Might take a little longer then i would of tough, since about hte wave compression.

Should have it someday!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Cygnus Hex editor Free Editon

Postby kyensoftware » Thu May 17, 2007 5:23 am

Cygnus Hex editor Free Edition is good for all things 8-bit :shock: No, I dont ROM hack (yet :wink: ) :shock:
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Thu May 17, 2007 11:08 pm

I started doing ROM hacking, but i stopped, it was useless.

Well, i guess i won't be able, i know how the wave file format is made and stuff, but i do not know how to read properly external files in GE, i tried it, but whit no success...
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

You started ROM hacking!?!?

Postby kyensoftware » Fri May 18, 2007 3:19 am

You started ROM hacking!?!?
Whoa! Ive heard it's real hard.
I know how to use machine code, so im capable, But havnt tried.
I think Commodore 64 hacking is OK, coz it is a computer, just like the ones you make GE progs wit, just slower...
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Fri May 18, 2007 11:24 pm

yeah, it is really hard to learn ASM, i actually don't really know a thing in it xD, its also were i have learned about the hexadecimal.

BTW, I am making a program to write Wave files, which will be easyer to make it
formats will be 8Bit, and will have a sample space of 4800000, so it can store 10seconds of data for a sample rate of 48000. the sample rate will be set by the user.

Here is what i have made so far.
Attachments
WaveWrite.zip
WaveWrite
(77.17 KiB) Downloaded 126 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Cool.

Postby kyensoftware » Sat May 19, 2007 11:35 pm

Cool.
WaveWrite isn't an appropriate name yet, but when it does write, it should work...
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby Game A Gogo » Sat May 19, 2007 11:40 pm

Check My post in the Game Development, it nows write!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron