This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Sonic => Your Projects
United-TI Archives -> Sonic
 
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Author Message
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 02 Feb 2005 11:07:19 pm    Post subject:

I was having a conversation with shadowing a while ago and it got me to thinking about having some sound or even music in the game. I know talk of music in calc games usually conjures replys like "when pigs fly" and "...cold day in hell," but I'd definately like to see this work.

In-game sound is out the window because it would ruin the game speed, but basic sound effects and menu music might be doable.

I'm going to try a brief unrelated project to see if poly-phonic MIDI-type of sound can be done. This kind of thing has been beaten to death on HP-49G, but I want to test it with a TI.

Anyway, what do you guys think about sound or music? Would it help the gaming experience in Sonic?
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 02 Feb 2005 11:15:40 pm    Post subject:

Yup. Sound and music is what made everyone want to got FAST!! AND BUMP INTO EVERYTHING!!

It's all about the music.
Back to top
leofox
INF student


Super Elite (Last Title)


Joined: 11 Apr 2004
Posts: 3562

Posted: 03 Feb 2005 11:22:45 am    Post subject:

Music would be awesome. Though most people aren't able to use it... I can, fortunately, cuz i have a converter cable and a 2.5mm headset.
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 03 Feb 2005 12:13:48 pm    Post subject:

I guess I'll give it a try then. I talked to some DS guys and it looks like it can achieve ~almost 4 octives (up to 768hz) if you use the 83+ interrupts right. I was hoping for 2 octives, so that's great news. All the (genesis) Sonic songs I know had at least 2 or 3 melodies going at once so I'm gonna try to see if it is possible to mix the audio melodies.
Back to top
Mike_k


Newbie


Joined: 16 Sep 2004
Posts: 45

Posted: 03 Feb 2005 04:34:07 pm    Post subject:

If you happen to get an engine working, try setting up an interrupt that plays a note every few seconds and see how much it taxs the processor.

-Mike
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 03 Feb 2005 05:08:57 pm    Post subject:

I guess I'll try both approches eventually. It would be awesome if we could have in-game music, but I think we'd have to settle for title screen/menu songs to get the best quality. The big problem is mixing. Today, I'm going test this strategy called "1.5"-bit sound, which I'm hoping will allow us to mix 2 or more melodies. Also, I'll look for a MIDI program that can convert the sound to sheet music so I won't have to "compose" the song all over again.
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 03 Feb 2005 05:40:33 pm    Post subject:

Now we just need to convert it. Too bad i have no clue how sound and music actually works.
Back to top
Brazucs
I have no idea what my avatar is.


Super Elite (Last Title)


Joined: 31 Mar 2004
Posts: 3349

Posted: 03 Feb 2005 07:17:38 pm    Post subject:

I think they have a tutorial somewhere on ticalc.org. I'm gonna try to make the Mario song, I think it would sound awesome!!
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 03 Feb 2005 07:28:24 pm    Post subject:

Digitan, make the fast theme of the sonic song. It's always the song!! Smile
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 04 Feb 2005 02:55:04 pm    Post subject:

Okay. Last night, I hopped in my time machine and found this TI-85 MIDI program from 1996. It can play any tone just as long aas you send values for the tone and duration to the HL and DE registers. With some creativity, you can use strings to run it in a loop and play an entire song.

The code works great but there are a few limits. First, it's not stereo, it's mono. Second, you can't do anything else while a tone is in progress--you can't even do interrupts or text. And third, the duration is based on wave cycles and not real time, so your low tones will play way longer than the high ones.

But there's good news too. The code is very lean, so we can probably get up to 8 sound octives and still have time to do other processor stuff. I don't know how many octives a piano has, but I'd guess it's really close to eight. A 83+ SE version would have even better capabilities.

Anyway, I'll keep this code (it's cool) and try to find some way to split the processing time between sound and the main program. Also, I'll try to find some way to mix the tones without a ton of distortion.

[edit]

Also, I'm in the process of converting some Sonic 1 MIDIs to sheet music. Starting with the Green Hill Zone. Any other requests?


Last edited by Guest on 04 Feb 2005 03:49:41 pm; edited 1 time in total
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 04 Feb 2005 05:04:30 pm    Post subject:

Every song there is. I'd say that. Smile
Back to top
MissingIntellect


Member


Joined: 01 Jun 2004
Posts: 227

Posted: 04 Feb 2005 07:37:03 pm    Post subject:

Just want to note that you don't need a converter for headphones to listen to sound...Just set your radio to a blank channel and hold you calculator close to it. Smile
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Feb 2005 07:58:18 pm    Post subject:

You wouldn't NEED 8 octaves either, most likely.
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 04 Feb 2005 08:00:55 pm    Post subject:

ha ha, yes the very simple and cheaper way! Very Happy Provided you have a radio at with you. When I bought my cell phone, they threw in a 2.5mm ear piece. I remember when I went to radioshack and bought all the parts needed to make a sorta speaker type thing...with the buzzer and such...I think I still have it! Razz I remember listening to some star wars song.

Anyhow, sound is a real cool idea. Very Happy
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 04 Feb 2005 11:10:15 pm    Post subject:

Okay, I made a tiny prog called "tone.asm" that can play basic sound. I'm going to try and come up with a version that can divide processor time between the sound and the game without using interrupts (they're too slow). So far, I'm using the R register as a timing source. So instead to using a continious loop, you just switch the sound port, do the game code, re-check R periodically, and switch the sound back when R rolls over to zero.

With this strategy, you can play any vocal note in the vocal range with well over 99% accuracy, but there are still some problems...

* VTI's sound is not 100% true-to-life
* Sometimes R double-increments
* You have to check R every 54 instructions, on average (hardly time for 1 sprite)
* If you don't check R often enough, the note will "crack"

Also, I was going to try controlling the volume the same way they do grayscale graphics (pulse width method), but it looks like that strategy doesn't apply well to sound. Anyway, I'll try to do a basic song string this week and record it as a .wav.

[edit]

Does anybody know a good website for PC speaker music?

:| What?


Last edited by Guest on 04 Feb 2005 11:33:13 pm; edited 1 time in total
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 05 Feb 2005 01:42:19 am    Post subject:

What program do you use to edit MIDI files, or at least to write sheet music? I can't find a free one. If you want help with the Mario songs, I've figured some of them out on the piano. No chords, though, just two voices. Since I don't actually have the games, the harmony or bass part isn't exactly the same as in the games. Let's see, I've got the Mario theme and some other songs from Super Mario, along with the songs from the castle and the first world for Super Mario 64. Yay, I'm so cool!

If you need fast music for Sonic, I have transcribed the first chorus of the Coltrane solo on Giant Steps. That would be cool, or at least funny.


Last edited by Guest on 05 Feb 2005 01:45:02 am; edited 1 time in total
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 05 Feb 2005 08:25:13 pm    Post subject:

Right now, I'm trying MidiNotate Musician 1.0 from notation.com. I haven't installed it yet, but it fits the description for what I'm looking for and it came in a 30-day trial. Basically, I want to look at these midis and come up with frequencies for the melody and counter melody (maybe percussion too).

Today, I updated tone.asm to divide processor time using the R register and so far it works...sort of. The tones are way lower than expected so that throws off my earlier calculations. The tones aren't consistant, and also most ROM calls will cause sound errors and produce an ugly growling sound. I'm looking to see if I can use CPU cycles instead of R.
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 09 Feb 2005 11:30:25 pm    Post subject:

Alright, the ditched the whole tones thing and had a new idea. I'm going to try and record MIDI instruments one at a time, and try to play them back on the calc with playwav. After that, I want to make a program that can immitate those instruments and play them back like CalcMOD does for tones. Basically, it would be a cross between playwav and CalcMOD. So far electric guitars and low notes in general have to best quality.
Back to top
the_unknown_one


Advanced Newbie


Joined: 18 Jun 2004
Posts: 79

Posted: 10 Feb 2005 04:23:02 am    Post subject:

Why cant you just search the Sonic source, take the songs out of it, convert them to calc type and then use a routine to play them? Razz Joking Wink
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 10 Feb 2005 05:41:52 pm    Post subject:

Heh Heh. Actually, I sort of did that exact thing about 14 hours ago. Laughing Basically, I recorded a few Genesis songs straight from an emulator. Then I used Windows Sound Recorder and wav2db.exe to convert it to calc data! I was able to record up to 27 seconds of any one song.

Here are the recordings. I filtered out signals above 2000Hz, because my prog will only have a range of 1064Hz when it's done, and VTI was producing lots of noise well above that range. I'll explain why the second wav is quiet below...

* Sonic the Hedgehog 3 : Competition Menu
- Original Audio [last 27 seconds of song]
- Calc Audio [micro-pulsed (very quiet)]

The second file was volume-controlled by the calc. Basically, instead of using normal square waves that are long (and hurt your ears) like playwav and CalcMOD, I used small audio pulses. The pulses are too sort for the speaker to reach full effectiveness, so you don't get full volume. Their shortness also puts them out of the human hearing range--so you hear the groups of pulses, and not the individuals. If my guess is right, you can widen the pulses to get 27 different levels of volume without making the mini-pulses audible to the people.


Last edited by Guest on 10 Feb 2005 06:19:10 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are UTC - 5 Hours

 

Advertisement