Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

how to decode a MIDI file?

Status
Not open for further replies.

vinodstanur

Advanced Member level 3
Joined
Oct 31, 2009
Messages
750
Helped
114
Reputation
234
Reaction score
114
Trophy points
1,333
Location
Kerala (INDIA)
Activity points
7,049
i would like to play a midi file stored in a MMC using a PIC microcontroller.
But what is actually a midi file? How it could be decoded ? Is it simple or much complicated ?
 

keith1200rs

Super Moderator
Staff member
Joined
Oct 9, 2009
Messages
10,877
Helped
2,064
Reputation
4,128
Reaction score
1,597
Trophy points
1,403
Location
Yorkshire, UK
Activity points
57,276
See here MIDI File Format - The Sonic Spot or other web links. The problem with playing it is that the information contains note, duration and instrument type, for example, but not the actual sound. So, if the sound is a piano, you need a piano sound stored in the PIC to reproduce it. Normally it is done with a DSP rather than a microcontroller - I think the processing and memory requirements are a bit much for a simple PIC - maybe the bigger ones or dspic would be OK. If you search for midi and PIC you will mostly find PICs being used for creating the midi information rather than decoding it which is quite different.

Keith.
 

vinodstanur

Advanced Member level 3
Joined
Oct 31, 2009
Messages
750
Helped
114
Reputation
234
Reaction score
114
Trophy points
1,333
Location
Kerala (INDIA)
Activity points
7,049
then what about AMR? What about its decoding? Is that also really tough like MP3 decoding? And dedicated decoder chips are required?
 

keith1200rs

Super Moderator
Staff member
Joined
Oct 9, 2009
Messages
10,877
Helped
2,064
Reputation
4,128
Reaction score
1,597
Trophy points
1,403
Location
Yorkshire, UK
Activity points
57,276
That is another complex one I think. MP3 can be done with some of the PICs I think - there is a Microchip development board which will play MP3s but it may use a Wolfson MP3 decoder, I cannot remember.

Keith.
 

kak111

Advanced Member level 4
Joined
Mar 30, 2011
Messages
1,366
Helped
933
Reputation
1,868
Reaction score
907
Trophy points
1,413
Location
Finland
Activity points
10,942
If you like to read more.....

Description: The VS1103b is a single-chip MIDI/ADPCM/WAV audio decoder and ADPCM encoder that can handle up to three simultaneous audio streams. It can also act as a MIDI synthesizer. General MIDI and SP-MIDI format files are played, with a maximum simultaneous polyphony of 40!

Breakout Board for VS1103 MIDI Decoder - SparkFun - BOB-08953 - Proto-PIC.co.uk - UK Suppliers of Electonics - Robotics - SparkFun - LilyPad - Arduino

As Keith wrote midi signal is only codes how to play and what instruments.
Instruments and sounds are not included.

Decoding MIDI can be done with PIC,
but creating voice for every needed instrument is another thing.

( Then becomes synthesizers and samplers , with PC there is software VSTi instruments
etc. for helping that part of problem )

All these instrument can be controlled with midi signal
( serial line (8 data bits, 1 start bit, 1 stop bit) 31250 bps )

Musical Instrument Digital Interface - Wikipedia, the free encyclopedia

Tech Specs & Info

Regards KAK
 

vinodstanur

Advanced Member level 3
Joined
Oct 31, 2009
Messages
750
Helped
114
Reputation
234
Reaction score
114
Trophy points
1,333
Location
Kerala (INDIA)
Activity points
7,049
DPCM

if i am saving the recorded audio as a DPCM in a memory card, then i think it will be like a compressed audio and saves 8 times memory. I think i could compress the 8bit sample to a single bit.

So what is your opinion in this case? If this is good then no need for me to go behind any AMR MP3 etc.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top