electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Musical Performance Games
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Wed Jun 11, 2008 1:11 am    Post subject: Musical Performance Games
Subject description: You play your instrument to control the gameplay
Reply with quote  Mark this post and the followings unread

Inspired by the great fun I've had creating Guitar Zero, I've decided to get into one of my near and dear beloved genres: gaming! The idea is the you use your voice, a guitar, a harmonica, or whatever instrument you have and the ChucK game detects that sound from the microphone and gameplay follows the music.

One example would be an FFT spectrum game where your spectrum is controlled by your instrument(s) and displayed on a MAUI LED bar graph in, say, green. Then red enemies descend upon you and annihilate your spectral content. At first you can just strum a guitar to keep the few enemies at bay, but as they proliferate and increase in speed and size, you need to play actual notes to concentrate your spectrum into beams of repulsive energy.

Another example might be a spaceship or fleet of spaceships all controlled by the instruments. To move left, you play lower notes, right, higher notes - something like that.

I think this morning I will create a giant LED spectral viewer just to see what my guitar spectrum looks like under various conditions, and work from there. Thoughts, ideas?

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Wed Jun 11, 2008 3:34 am    Post subject: Reply with quote  Mark this post and the followings unread

After a few hours of coding, I have come up with a quick little FFT viewer, as shown in the post below. I found that the key to getting a decent frame rate was to only light up the LEDs that are at the peaks of the spectrum, not the full bars.

This forms the basis of a music game in which one uses voice and/or instrument(s) to drive the spectral content. I found that when playing my guitar, I would get sort of hill-shaped peaks near the fundamental of the note, and I chose the screen resolution, the FFT size, and the left FFT offset to fit the guitar's spectrum. This way I can play an open low E string to place a peak on the left of the screen, on up to a short high e string to place one on the right. In this way I can pick out notes that control the spectral content.

Next I need some enemies, I figure they will be inspired by Tempest and Missile Command, starting at the top and descending on the player until they are pushed back up by the spectral content. If the enemy of a particular column descends all the way to the bottom of the screen, then that column is destroyed and perhaps lit up in blue. Then, as the game progresses the player gradually loses columns to defend until most or all of them are gone, then Game Over Man!

Or something like that, I'll see what is easiest to code up and what makes for good gameplay. I imagine such a game being played by one or more people, perhaps with music playing in the background. The collective sound forms the defending spectrum. That way people can work together and either use instruments or not or a combination. What fun, plus you learn to pick out notes of the guitar that create a desired spectrum. This is shaping up nicely. Comments?


Eliminator1.jpg
 Description:
Partial Spectrum of music song
 Filesize:  102.28 KB
 Viewed:  307 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Eliminator1.jpg



_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Wed Jun 11, 2008 6:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Well after about six hours of coding I have completed the first shot at the Eliminator game. It is fun to play music and watch the song try to win the game; see how long it can last. It needs some sort of volume normalization because I found that either cranking up the volume or strumming constantly will keep the game alive indefinitely or so it seems.

At the beginning of the game a line of red enemies are in the upper row of the LED matrix and they slowly descend. At the same time the music spectrum bounces up and down in green. When a red dot encounters a green dot, the green dot pushes it up again. But the red dots get exponentially faster, so eventually they begin to overtake the green dots. When a red dot reaches the bottom, that column lights up all in blue and is no longer active. So as the game progresses, more and more columns become blue and then it ends when all columns are blue.

It still needs a little work, but not bad for an early morning's caffeine-fueled compulsive programming effort, eh? Cheers!


Eliminator4.ck
 Description:
The first release of the Eliminator Game source code

Download
 Filename:  Eliminator4.ck
 Filesize:  9.5 KB
 Downloaded:  343 Time(s)


_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use