Multichannel Wavetable Music Player
Rayman
Posts: 14,597
Here's a little music player that I ported from this page:
http://elm-chan.org/works/mxb/report.html
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
http://elm-chan.org/works/mxb/report.html
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
Comments
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
What is fullduplexserial doing?
How do you define what you want to play?
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...
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
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?
'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 !!!!!!!!!!!!!!
Can I set both left and right to the same pin? ( I have only one speaker )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
just comment out this line:
OR DIRA, DMaskL
to just use the right pin...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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