Shop OBEX P1 Docs P2 Docs Learn Events
Midi music player (alpha) — Parallax Forums

Midi music player (alpha)

RaymanRayman Posts: 14,243
edited 2009-01-06 03:11 in Propeller 1
Here's a very preliminary version of a MIDI player for the Prop!

Right, now it only plays level-0 MIDI's (with all notes in one track).
Most new files are not in this format, so probably need to be converted by a midi file editing tool.


Actually, I've only tested it with the single midi file included.· It may or may not play other files...

Update:· Wow, that first version was so riddled with bugs, I'm surprised it worked at all...· I'm attaching a version that can actually play two different songs...


Post Edited (Rayman) : 12/13/2008 1:54:37 AM GMT

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-12-12 15:40
    @Ray

    Looks like I'm not the only one who has been bitten by the Propeller sound bug lately. [noparse]:)[/noparse]

    Nice job! Looking forward to seeing this develop!

    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
  • RaymanRayman Posts: 14,243
    edited 2008-12-13 02:00
    I've fixed some bugs and added a new midi file (see top post)...
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-12-13 02:18
    Rayman said...
    Midi music player

    Great idea. I'll try it over Xmas when I have time.
    jumpin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob

    Post Edited (Bob Lawrence (VE1RLL)) : 12/16/2008 12:40:49 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-12-13 03:16
    Here's a couple non-Christmas tunes that seem to work well,
    (tick rate of around 1000 recommended)
    They are some SIDs I converted to midi a while back.

    @Ray: Any chance you could incorporate the ability to use .wav samples for instruments, like
    I did with the wavetable/mellotron project? How are you generating the tones?


    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
  • RaymanRayman Posts: 14,243
    edited 2008-12-13 13:42
    The notes are created the same way as the player in this link:
    http://forums.parallax.com/showthread.php?p=769676

    Basically, there is a wavetable for the attack phase, the beginning of the note.·

    The end of the note is just a decaying sine wave created from an envelope table and a sine table.

    Both are scaled in time to give the proper frequency.

    I would be nice to find wavetables for different instruments, but I can't find any.
    I suppose I could digitize my yamaha keyboard output and get it that way, but I don't really have any more time to spend on this project...
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-12-13 16:51
    Ray don't give up yet. You can follow this example for a lowly PIC LOL

    Overview:

    This project was featured in the July 2008 issue of Everyday Practical Electronics magazine.
    It was an off-shoot of the Easy-Chord which uses the same wave-table sound synthesis circuitry to produce instrument sounds controlled by a MIDI (Musical Instrument Digital Interface) input.
    It can be used with MIDI keyboards, computers or just about any MIDI controller so is suitable for many DIY musical projects.

    At the moment there are 18 instrument sounds, the same as on the Easy-Chord.

    Nylon Guitar, Piano 1 , Organ 1
    Steel Guitar, Piano 2, Organ 2
    Electric Guitar, Elec.Piano 1, Organ 3
    Fuzz Guitar, Elec.Piano 2, Strings
    Synth Guitar, Harpsichord, Synth Strings
    Banjo, Vibraphone, Trumpet


    Website:
    www.rainbowelectronics.co.uk/midi%20wsg.htm


    Examples Wavefile:
    www.rainbowelectronics.co.uk/instr-11-16-m.wav

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob

    Post Edited (Bob Lawrence (VE1RLL)) : 12/13/2008 4:58:00 PM GMT
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-12-14 20:58
    A few more ideas for add-ons so that if someone wanted to program it with some MIDI rhythm tracks .Add tempo and key-change capability .That way you could change the key easily with a button click.


    For an example see - Roland MT 90U
    www.roland.com/products/en/MT-90U/index.html

    cool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2009-01-04 21:21
    I had a little fun over XMAS. I purchased a wireless Multimedia Recliner from walmart.ca ($200 CDN) and hooked the proto board to the wireless transmitter to feed Ray's Midi music player. It was a little bit of fun for my neighbors that visited to hear jungle bells pumped through it. Although it's not the most comfortable(maybe take a few months to soften it up) recliner that I've ever owned the sound is great. jumpin.gif

    Xrocker Info:
    home.nestor.minsk.by/game/news/2008/01/2804.html

    Thanks! Ray. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • WurlitzerWurlitzer Posts: 237
    edited 2009-01-05 18:07
    I love MIDI! If you have not played with MIDI do yourself a favor and give it a whirl.
    I am 85% complete with converting my 1928 Wurlitzer Theater Organ console to MIDI. (see attached image I hope!!!!! EDIT: ATTACHMENT DID NOT WORK I will try a 2nd time. Nope 2nd time did not work)
    The Prop scans 485 inputs (keyboards, pedal board each with 1st and 2nd touch, stop tabs (above the keyboards) and also outputs control for·2 solenoids per stop tab (166). Inputs are read via a pair of 32 bit S/R with open collector output ICs and brought into the Prop 8 bits at a time. The entire console is scanned approx 100 x per second. The stop tab magnets are controlled by the same type ICs (8 of them, 4 for on and 4 for off)
    The Prop sends out 2 sets of MIDI messages: 1 to a PC running a Virtual Theater Organ program (MidiTzer) and a 2nd to the pipe chamber where a second·Prop outputs to ~~ 1200 pipes and percussion discrete outputs. The same 32 S/R ICs are use to drive the pipe solenoids.
    I will also be able to take a MIDI file and run the console from it and drive both the pipes and the virtual organ.
    Once done I will be able to practice using just the PC program and also fire up the pipes and run both with the PC being able to add voices that I don't physically have in pipes.
    I have also included a 25 level memory for the stop tabs which gives 25 complete settings for each piston (little white buttons under the keyboard).
    The code is running well but needs clean up before it is ready for prime time.








    Post Edited (Wurlitzer) : 1/5/2009 6:20:32 PM GMT
  • mparkmpark Posts: 1,305
    edited 2009-01-06 03:11
    Wurlitzer, keep trying to post the picture!

    What is "32-bit S/R"?

    I'm using a prop to interface two manuals and a pedalboard to a Mac running Hauptwerk.

    If you like MIDI, check out my "sick day synthesizer" thread.
Sign In or Register to comment.