ABCplayerCodea - play music in your project

I think if you implemented access to the notes directly before the rand num change then he would switch to direct access.

Good point. That scenario is more likely, too.

10 points for @Ipda41001 ! :slight_smile: Yes, if you implement direct pitch control of the sound, e.g. in Hertz, I would convert it in an instant. That would make the music sound much better, as the current random seed method is only approximate.

New version at http://fredbogg.posterous.com/abcplayercodea-v017
Plays ‘Still Alive’ by Jonathan Coulton from the Portal soundtrack, arranged by Meldowen of Silverlode from http://www.TheFatLute.com

`
– 0.1.7
– Added flats
– Implemented key signatures
– Improved parsing of rendered MIDI files

Fred: I can’t believe you included the third movement of Moonlight Sonata. Still Alive sounds great too.

It’s like you “tuned” Codea through its random number generator. We’ll have to get proper sound effect control implemented for you.

Heh heh, Beethoven would roll in his grave if he heard the tuning… :slight_smile: But yes, if we could specify the frequency of the tones that would fix a few dud notes in there!

Where does one find music in the right format? I found this but it doesn’t seem all that close.

http://abcnotation.com/tunePage?a=www.thesession.org/tunes/display/8426.no-ext/0000

Hi @Ipda41001, yes this is the right format and it should play, barring bugs. I tried this song before but it didn’t sound very good due to the current tuning. Another site I have found useful is www.thefatlute.com.

I’ll post another update tonight that fixes some bugs.

For those who haven’t upgraded yet: http://fredbogg.posterous.com/abcplayercodea-v019-89980

P.S. @Ipda41001, fixed a bug that prevented that last tune from playing. It’s in this version.

Can you post the flat files somewhere for those of us who have upgraded?

I will post my .codea exploder, or a web utility that does the same, later today, so people who have a .codea file and can’t import it directly aren’t stuck.

Here you go, @Andrew_Stacey:

Main: https://gist.github.com/1560744
ABCMusicData: https://gist.github.com/1560736
ABCMusic: https://gist.github.com/1560732

@Bortels, bring on the wizardry, I don’t know how long I can last with the copy and paste method! :slight_smile:

New version that takes advantage of new sound() API : http://fredbogg.posterous.com/abcplayercodea-v021

Separate link to follow for individual tabs…

ABCMusicData: https://gist.github.com/1686328
Main: https://gist.github.com/1686325
ABCMusic: https://gist.github.com/1686322

Wow Fred. It sounds incredible now that you have full control over SFXR.

Your Fawlty Towers track makes me want to make a Tiny Tower style game where you slap the guests and force them to leave.

Heh, thanks @Simeon!

I’m only using StartFrequency and SustainTime here, there is a lot more we can do to shape the sounds into different instrument sounds.

The old way was like playing a honky tonk piano held together with string and sticky tape. :slight_smile:

I’ll release some more tools soon to assist people get the ABC file ready for Codea. Basically a few find and replaces that have to be done.

Ha ha @Simeon… “Basil!”

Also will post some links soon to a good MIDI to ABC converter.

Speaking about MIDI, slightly different subject, there isn’t a way to get a MIDI keyboard input, is there? By the way, it’s awesome.
Thanks!

Thanks! Here’s a bug fix to get the pitches in concert pitch. https://gist.github.com/1686322 is an update of the ABCMusic class.