View unanswered posts | View active topics It is currently Wed Sep 23, 2020 3:40 pm






Reply to topic  [ 9 posts ] 
Music 
Author Message
Rookie

Joined: Fri Dec 19, 2008 10:40 pm
Posts: 3
Post Music
How can I get a music file to play, and how can I get it to multitask while playing?


Fri Jan 30, 2009 12:04 pm
Profile
Rookie

Joined: Wed Jan 14, 2009 3:14 am
Posts: 16
Post Re: Music
I think the PlaySoundFile(sFileName) command is what you need. As for multitasking, there is a good thread on that here:

viewtopic.php?f=1&t=805


Sat Jan 31, 2009 8:53 pm
Profile
Rookie

Joined: Fri Dec 19, 2008 10:40 pm
Posts: 3
Post Re: Music
How do I load the music file into robotc? I assume you don't use a normal sound file


Mon Feb 02, 2009 11:37 am
Profile
Rookie

Joined: Sun Aug 12, 2007 3:18 pm
Posts: 38
Post Re: Music
You can convert *.wav files to *.rso files (compatible with NXT) using "Wav 2 RSO". Yopu can find it in BricxCC(tools > Convert music).

_________________
Image http://lrobotikas.net English version


Thu Feb 05, 2009 1:35 pm
Profile WWW
Rookie
User avatar

Joined: Mon Oct 19, 2009 7:16 pm
Posts: 21
Location: Texas YeeHa!
Post Re: Music
Does anyone know how to convert a midi file to play on the nxt?


Wed Feb 17, 2010 10:00 pm
Profile WWW
Novice

Joined: Fri Jan 18, 2008 11:07 pm
Posts: 51
Location: Ohio
Post Re: Music
I have posted one way of doing it over on my blog. Copy the info, save it to a RobotC file and run it to play "Ode to Joy"

http://tinkernology.blogspot.com/2010/0 ... eebie.html


Sat Feb 20, 2010 4:57 pm
Profile
Rookie
User avatar

Joined: Mon Oct 19, 2009 7:16 pm
Posts: 21
Location: Texas YeeHa!
Post Re: Music
Neat, Can I get a hint on how to do it too?

Thank You.


Sat Feb 20, 2010 9:46 pm
Profile WWW
Novice

Joined: Fri Jan 18, 2008 11:07 pm
Posts: 51
Location: Ohio
Post Re: Music
Absolutely. I am working on an Excel spreadsheet and some RobotC code to simplify converting sheet music to RobotC code. If things go my way, it should be pretty easy.

Check out http://www.tinkernology.blogspot.com soon and I hope to throw some hints up.

Here's a start..

OCTAVE NOTE Frequency
1 A 440
1 A# 466
1 B 496
1 C 261
1 C# 275
1 D 293
1 D# 310
1 E 329
1 F 348
1 F# 370
1 G 392
1 G# 412
2 A 877
2 A# 929
2 B 987
2 C 524
2 C# 555
2 D 590
2 D# 621
2 E 656
2 F 695
2 F# 738
2 G 788
2 G# 830
3 A 1770
3 A# 1841
3 B 1995
3 C 1054
3 C# 1104
3 D 1188
3 D# 1251
3 E 1322
3 F 1401
3 F# 1488
3 G 1590
3 G# 1646
Note that the notes are not in order, I had to do that in Excel to get my program to work
(sorry, I can't figure out how to put a chart up on the forum)

Shep


Sun Feb 21, 2010 12:51 am
Profile
Novice

Joined: Fri Jan 18, 2008 11:07 pm
Posts: 51
Location: Ohio
Post Re: Music
I have created a primer and added a sample program of how to play music with "PlayTone" over at Tinkernology. I hope this is useful to you...

http://tinkernology.blogspot.com/2010/0 ... ogram.html


Sun Feb 21, 2010 12:59 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.