Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > Multichannel Wavetable Music Player  Forum Quick Jump
 
New Topic Post Reply Printable Version
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Rayman
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2007
Total Posts : 3127
 
   Posted 12/11/2008 9:44 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Here's a little music player that I ported from this page:
 
It was not exactly easy to convert the code...
 
Anyway this plays his demo song with 4-channels of wavetable sound.
 
Actually, only the attack phase is wavetable, the rest is just decaying sine...
 
It sounds pretty good... Give it a try!
 
Update:  Here's a new version (xmasmusic7a.spin) that adds the other two demo songs from the above website...

Post Edited (Rayman) : 12/12/2008 2:23:04 AM GMT



File Attachment :
MusicPlayer.zip   14KB (application/x-zip-compressed)
This file has been downloaded 148 time(s).

File Attachment :
XmasMusic7a.spin   34KB (application/octet-stream)
This file has been downloaded 136 time(s).
Back to Top
 

Oldbitcollector
Propeller Powered



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 4328
 
   Posted 12/11/2008 11:34 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Made my day.. :)

OBC


New to the Propeller?

Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS

Back to Top
 

Jetfire
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 34
 
   Posted 12/11/2008 11:56 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
This looks cool. Two questions though.

What is fullduplexserial doing?

How do you define what you want to play?
Back to Top
 

Rayman
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2007
Total Posts : 3127
 
   Posted 12/11/2008 12:37 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
You can delete the fullduplexserial... That was just for early stage debugging...

The song is defined in the "melody" byte table. Just a cut and paste job from the code found on the page from the link in my first post.
It's just a simple series of word time stamps followed by bytes of notes with a bit to indicate the last note of the current time stamp...
Back to Top
 

Rayman
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2007
Total Posts : 3127
 
   Posted 12/11/2008 7:21 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
I've just added a newer version to the first post that adds 2 new songs (and removes fullduplexserial dependence).
Back to Top
 

Oldbitcollector
Propeller Powered



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 4328
 
   Posted 12/11/2008 7:26 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hey Ray, Now you just need to add the midi object from OBEX and have it read .mid files from SD. :)

Neat player!

OBC


New to the Propeller?

Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS

Back to Top
 

mpark
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined May 2007
Total Posts : 948
 
   Posted 12/12/2008 11:34 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Anyone get this to work on the HYDRA yet? I changed

CON _clkmode = xtal1 + pll8x
_xinfreq = 10_000_000 '80 MHz

and in Main I changed the pins

Player(7,17)

but I'm hearing nothing. What am I missing?
Back to Top
 

Rayman
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2007
Total Posts : 3127
 
   Posted 12/13/2008 4:36 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
I think I have the output pins hardcoded in this section:

'setup parameters
DMaskR long 0 'right output mask
OPinR long 10 'right channel output pin # ' <--------- Change Right pin# here !!!!!!!!!!!!!!
DMaskL long 0 'left output mask
OPinL long 11 'left channel output pin # ' <--------- Change Left pin# here !!!!!!!!!!!!!!
Back to Top
 

william chan
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 914
 
   Posted 12/13/2008 6:46 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Is this player supposed to sound like piano or some other instruments?

Can I set both left and right to the same pin? ( I have only one speaker )


www.fd.com.my
www.mercedes.com.my

Back to Top
 

Rayman
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2007
Total Posts : 3127
 
   Posted 12/13/2008 7:41 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
I think it was meant to sound like a music box...

just comment out this line:

OR DIRA, DMaskL

to just use the right pin...
Back to Top
 

mpark
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined May 2007
Total Posts : 948
 
   Posted 12/13/2008 9:11 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Thanks Ray, it's working now.
Back to Top
 

tpw_man
Pixel Man!



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jan 2008
Total Posts : 274
 
   Posted 12/14/2008 9:21 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Cool! I've wanted to make one, but never really figured out how to change the pitch without changing the playback time.


I am 1011, so be surprised!


Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com

Back to Top
 

Oldbitcollector
Propeller Powered



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 4328
 
   Posted 12/14/2008 9:52 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
@tpw_man:
Yup, thats is exactly the problem I ran into with waveplayer too...

OBC


New to the Propeller?

Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS

Back to Top
 

tpw_man
Pixel Man!



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jan 2008
Total Posts : 274
 
   Posted 12/14/2008 9:58 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
I am thinking of averaging, but I'm not sure how to magically average it just right. Averaging is easy, but figuring out how to recursively average to achieve the desired result is the hard part.


I am 1011, so be surprised!


Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com

Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
 
Forum Information
Currently it is Thursday, July 29, 2010 5:18 PM (GMT -7)
There are a total of 462,440 posts in 62,066 threads.
In the last 3 days there were 90 new threads and 803 reply posts. View Active Threads
Who's Online
This forum has 20143 registered members. Please welcome our newest member, ME01.
60 Guest(s), 10 Registered Member(s) are currently online.  Details
John Abshier, Rayman, Kevin Wood, BradC, prof_braino, Sapieha, Gene Bonin, laser-vector, localroger, Nick McClick