Pages: [1]   Go Down
Author Topic: MIDI Polyphony  (Read 1495 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I recently bought an Arduino Mega. I want to build a MIDI sequencer (looper). My question is: Can I send or receive more than one MIDI note simultaneously over a standard MIDI connector?

I want to record and play back chords and rhythms. Any help would be very appreciated!

Cheers!

Rafael :-)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It can't be 'simultaneous' because it's a serial communication line.  Everything is sent one byte at a time.  Fortunately it is a FAST serial communication line so sequential Note On command sound simultaneous.  You can turn on any number of notes before you turn them off but most MIDI output devices have a limit to how many simultaneous notes they can produce.  Turn on more then that and the earliest notes will turn off to make room for the new notes.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you so much John!

I always wanted to know that :-)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't forget you have 16 channels you can use.........
Logged

Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Even an Uno can do a decent job with sequencing beatbox kind of stuff.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working on a MIDI-to-Light project and I've noticed that MIDI going into the Arduino definitely doesn't like quantized chords.  However, a simple randomizer type function in Cubase which moves all notes a few ticks seems to do the trick just fine. 

What alternatives are there to the serial connection?  Just curious.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
MIDI going into the Arduino definitely doesn't like quantized chords
That is down to your software not to the arduino. You are probbly getting notes in the running status mode which your software is not coping with.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to add that I have built a step sequencer based on the Arduino and the MIDI library and am currently facing a problem with sending multiple notes-on. Basically, I figured that I could set it up so that at any given step, I could send all my note-on instructions based on whatever my grid was set up as. And then when it was time to move to the next step, send all my note-offs for the previous step, then send my note-on messages for the current step ("next step" relative to the previous one). But what I am finding, and I don't know if this is just how MIDI is or if this is something in the MIDI library....but what I am finding is that when I send a "note-on" message, then I send another "note-on" message before sending a "note-off" message for the previous note, the MIDI messages are glitching and it is not operating correctly. My fix for this, at the moment, is to only ever have only "one note on at any given moment". I haven't yet implemented my idea. I'm going to write something up and test it out. But I wanted to make you aware of this issue that I'm having so if you were thinking of something that is going to be playing. But, you know, maybe that is just how MIDI works, I still have a lot to learn about it and it's totally possible that I'm just doing it wrong but I wanted to at least add my $.02. smiley

Also, since I found this thread through a google search, I hope this helps anyone else who is suffering the same problem.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to report that changing Running Status from 1 to 0 within the MIDI.h file did the trick. It sends the correct messages at the correct times in the correct order and everything seems to work OK. However, it is also sending an additional random MIDI message that is totally unrelated to the MIDI Notes I am using. But since this extra message is a note-on with velocity 0, I guess I'll just live with it.  smiley-mad
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Note on with a velocity of zero is a valid MIDI way of sending a note off message.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No I know. But the buggy MIDI message is "Note 3, Velocity 0" and now it happens every time I send a "note on" message or groups of message. But what I was trying to say was, I'm neither using Note 3, nor too concerned with a constant "note off" message being sent at every step event. It is what it was at this point. If I was really going get serious about it and enable an option for customizable note assignment, I would worry about it. But for my purposes, I can just stick to the fixed assigned notes and none of them are note 3 so I will just let it be. Very strange though. I wonder why it happens.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you are best starting your own thread, describing your setup, code and exact problem.
Logged

Pages: [1]   Go Up
Jump to: