Chiptune editor

Libraries, utilities, bootloaders...

Chiptune editor

Postby Schteve » Fri Jan 03, 2014 7:32 am

Hey there to the creator of Gamebuino, and to anyone else cropping up in the fledgeling community!

As this is the first post on the forum, a hello seems to be relevant, but I'd also like to inquire specifically about the music editor software planned out in the software section. I love the idea of an onboard composing application. I know the state of the wiki is in a beginning era here, but as details are released, this would be a facet to Gamebuino I would be excited to hear about!

Other than that specific note piece, I like the idea and the schematics given so far a whole ton, and encourage the development of Gamebuino to be done with as much care as it seems to have had through today. Really cool project. I look forward to a Kickstarter, and hope to see the forum grow!

Schteve
Schteve
 
Posts: 4
Joined: Fri Jan 03, 2014 6:44 am

Re: Chiptune editor

Postby rodot » Sat Jan 04, 2014 5:41 pm

Hey Schteve,

For now the composition tool is a excel sheet with some scripts... it's pretty dirty but allowed me to test and optimize my code quickly. The next step may be to implement a program to convert from a variety of chiptune formats (MOD, SID, NSF, XM...). This way we could use any chiptune tracker to compose.

Concerning an on-board composition tool, nothing is planned, but that would be pretty straightforward to program, so... why not ! And the programs and games made by the community will of course integrate the main project.

For now, the website/forum/wiki are available online even if not really finished, so I didn't started to spread this project online. But I hope that the forum will grow :)

Thank you very much for your encouragements, I appreciate !

Rodot.

PS: Sadly, the fledgeling community is mainly composed of spam bots for now, I'm working on it.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Chiptune editor

Postby Schteve » Sun Jan 05, 2014 12:18 am

Thanks for the reply!

While I would be extremely enthused with an "onboard" editor and I really thank you for your willingness to implement it, your idea with trackers is awesome too! Having the both of them would be really cool, and I personally would find great utilities in tracker supports because I create a lot of .xm chiptune stuff. You're welcome for the encouragement, you have earned it! As for the spambots, no problem for me. While they are very annoying, they provided some attention that was nice to see in the forum! Jokes aside, I hope you can find some good software for protection from bots, and thanks for taking the time to read my comment so as not to delete a human topic! I will drop by often to see updates and look forward to a kickstarter if that is the route you choose to go. Keep it up!
Schteve
 
Posts: 4
Joined: Fri Jan 03, 2014 6:44 am

Re: Chiptune editor

Postby rodot » Sun Jan 05, 2014 12:52 am

For now the chiptune library I wrote is only able to play 4 channels of square waves or white noise at different volumes... no samples, no triangle or sin wave... so I don't know if a .xm converter will be possible, or it would have to transform everything to square waves... because implementing more complex sound stuff on the Gamebuino's atmega328 would take too much memory and processing time (it has a lot of stuff to do at the same time: graphics, controls, collisions, AI...). Some assembly genius may find a solution, but I'm not even sure it would be enough.

I burnt my last prototype (hem...) and wait for the next batch of PCBs to be delivered. Then I'll be able to get back on programming, and I'll make some demo videos. I also already programmed a pretty bad-ass game, it's too bad I didn't made a video when it was still working.

Thanks for passing by !
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Chiptune editor

Postby Schteve » Sun Jan 05, 2014 1:14 am

Yeah, space is really tight I bet, don't kill the whole ATMEGA in order to add a few waves like sine or triangle. Square waves are pretty nice on their own too. I would be excited to watch some videos, sorry about frying the prototype! If you get a video of development even if not a complete redo, I'd enjoy seeing your game too. 4 channels isn't bad, either!
Schteve
 
Posts: 4
Joined: Fri Jan 03, 2014 6:44 am

Re: Chiptune editor

Postby rodot » Sun Jan 05, 2014 10:50 pm

I could have used more channels, but all the tracks would have taken to much program memory. But it's fairly enough, it lets you 1 channel for game sounds, and 3 for the music (main instrument, second instrument and beats for example).

I'll try to assemble a new prototype during this week (I don't have my tools here so I have to make it at work...). But for the video I would prefer to directly make a complete, well made trailer instead. That would avoid having too much people coming before the website is ready. I wanted to wait for the Kickstarter fundraising to release more videos. But as it's the first time I try to fund-raise a project, you're welcome if you have any suggestion.

You said that you are used to compose chiptunes... I'm not very good at it, so for the first game I simply play Tetris music. Not very interesting... would you like to compose some music for Gamebuino ? You could compose it on your tracker using square waves on 3 channels, then you send it to me and I'll play it on my Gamebuino and send you a video back. If it works well, it could be included on the released version and tutorials (with the credits of course). If you're interested, contact me at rodot (at) gamebuino (dot) com for more details
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Chiptune editor

Postby Schteve » Mon Jan 06, 2014 2:43 am

Email sent!
Schteve
 
Posts: 4
Joined: Fri Jan 03, 2014 6:44 am

Re: Chiptune editor

Postby albertinjo » Mon Mar 31, 2014 3:22 pm

I really liked gamebuino playing the tetris theme song in the release trailer, so I was wondering can someone explain to me how to use the gb.sound.play() function of gamebuino library.
Thanks!
User avatar
albertinjo
 
Posts: 98
Joined: Wed Mar 26, 2014 2:26 pm

Re: Chiptune editor

Postby rodot » Mon Mar 31, 2014 8:53 pm

I didn't had time to add an example about playing music yet, I'll do it soon.

The quick version:

Use the excel sheet I posted on GitHub to compose your music. The output (in the second tab) should look like that (don't forget to allow macros to run):
Code: Select all
PROGMEM uint16_t tetris_main1[] = {0x708E,0x5C4E,0x604E,0x684E,0x702E,0x682E,0x604E,0x5C4E,0x547E,0x5418,0x544E,0x604E,0x708E,0x684E,0x604E,0x5CCE,0x604E,0x688E,0x708E,0x608E,0x547E,0x5414,0x550E,0x40,0x688E,0x744E,0x848E,0x7C4E,0x744E,0x70CE,0x604E,0x708E,0x684E,0x604E,0x5C7E,0x10,0x5C4E,0x604E,0x688E,0x708E,0x608E,0x547E,0x1014,0x548E,0x541C,0x541A,0x5418,0x5416,0x5414,0x5412,0x20,0x410E,0x310E,0x390E,0x2D0E,0x310E,0x250E,0x20FE,0x2018,0x2C8E,0x2C1C,0x2C1A,0x2C18,0x2C16,0x2C14,0x2C12,0x20,0x410E,0x310E,0x390E,0x2D0E,0x307E,0x301E,0x407E,0x401E,0x550E,0x510E,0x502C,0x502A,0x5028,0x5026,0x5024,0x5022,0x5040,0x0000};
PROGMEM uint16_t tetris_main2[] = {0x5C8E,0x504E,0x544E,0x5C8E,0x544E,0x504E,0x407E,0x4018,0x404E,0x544E,0x608E,0x5C4E,0x544E,0x504E,0x404E,0x504E,0x544E,0x5C8E,0x608E,0x548E,0x407E,0x4014,0x410E,0x40,0x448E,0x544E,0x603E,0x10,0x601E,0x10,0x601E,0x10,0x5C4E,0x544E,0x30CE,0x104E,0x304E,0x542E,0x302E,0x144E,0x104E,0x504E,0x104E,0x504E,0x544E,0x5C4E,0x504E,0x604E,0x504E,0x544E,0x104E,0x107E,0x1014,0x108E,0x101C,0x101A,0x1018,0x1016,0x1014,0x1012,0x20,0x30FE,0x3014,0x250E,0x2CFE,0x2C14,0x210E,0x24FE,0x2414,0x10FE,0x1014,0x110E,0x208E,0x201C,0x201A,0x2018,0x2016,0x2014,0x2012,0x20,0x310E,0x250E,0x2CFE,0x2C1E,0x210E,0x248E,0x308E,0x410E,0x390E,0x382C,0x382A,0x3828,0x3826,0x3824,0x3822,0x3840,0x0000};
PROGMEM uint16_t tetris_drum[] = {0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x2C4E,0x304E,0x384E,0x40,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0x60,0x702F,0xE0,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x504E,0x104E,0x504E,0x104E,0x504E,0x104E,0x504E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x504E,0x104E,0x504E,0x104E,0x100,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x504E,0x104E,0x504E,0x104E,0x504E,0x104E,0x504E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x544E,0x104E,0x204E,0x104E,0x204E,0x104E,0x100,0x0000};

You add all this code to your program. It creates variables which store notes information.

Then, you can call
Code: Select all
while(1){
  if(gb.update()){ //refresh display, music and everything
    if(gb.buttons.pressed(BTN_A){
      gb.sound.play(tetris_main1, 0); //start to play tetris on the first channel
      gb.sound.play(tetris_main2, 1); //start to play tetris on the second channel
      gb.sound.play(tetris_drum, 2);  //start to play tetris on the third channel
    }
    //your game here
  }
}


Don't forget to set the right number of channels in the file settings.c (in the library). The default value is 1 channel.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Chiptune editor

Postby Ginocolby » Tue Apr 22, 2014 1:15 pm

Nice stuff..!! This code is very helpful to compose the music and play the channels. This code was very helpful for me.
Ginocolby
 
Posts: 1
Joined: Tue Apr 22, 2014 1:06 pm


Return to Software Development

Who is online

Users browsing this forum: No registered users and 24 guests

cron