Pages: [1]   Go Down
Author Topic: Is it possible to send MIDI while note is on?  (Read 313 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 1
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have not used the Arduinos for a year and have not looked into the new Arduino 1.01.
In the past I have used MIDI send for various projects. I have written the code so that after I send note on I use delay() to set the length of the note. This however causes Arduino to wait while on delay so not other commands could be sent.
I wonder if there is a better way to send note on/note off so while  we wait for the note off other notes could be sent?
Like I play note on Channel 1 duration - delay(100) - and I could send a note on channel 2; then note off on channel 1 and so on.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look for blink without delay tutorial.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34207
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
after I send note on I use delay() to set the length of the note.
That is where you are going wrong. Using delay() in effect stops you from doing anything else.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18806
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.gammon.com.au/blink
Logged


0
Offline Offline
Full Member
***
Karma: 1
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. Specially Nick's link is great.
Logged

Pages: [1]   Go Up
Jump to: