electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
  host / artist show at your time
today> Twyndyllyngs - not cancelled tonight Chez Mosc
poster
 Forum index » DIY Hardware and Software » Developers' Corner
USB MIDI
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [2 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
egasimus



Joined: Feb 11, 2011
Posts: 113
Location: Bulgaria

PostPosted: Thu Jul 14, 2011 10:00 am    Post subject: USB MIDI Reply with quote  Mark this post and the followings unread

I want to implement a USB MIDI controller on an Atmel AVR microcontroller. The USB part is clear - there are numerous software USB stacks for AVRs. However, how should I make it a MIDI device? I could probably patch up a dedicated piece of software to poll the controller and sends MIDI messages over MIDIYoke, but what if I want the controller to appear as a MIDI device? Has someone done this and shared their code?

Also, since this is a percussive controller, when do you suggest that I transmit the Note Off message?
Back to top
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Sat Jul 16, 2011 12:09 am    Post subject: Reply with quote  Mark this post and the followings unread

For the Note Off, you can do one of the following:

1.) Send no Note off (many percussive sounds don't respond to sustain or release).

2.) Use your own generated Gate time (for example: send Note off 1/16 note after the Note on was sent).

3.) Electrically, just like the threshold for the Note trigger detection, use a similar threshold for Note release. (use this with sounds that respond to a note release). This might work, depending on what type of trigger you're building (piezo, FSR, etc). FSR would be good, piezo might work).

For making a MIDI device, look into USB enumeration. There's a standard set of fields for a deviceto be detected as MIDI. Or, look into this USB stack for Atmel:
http://www.fourwalledcubicle.com/LUFA.php
It already has a MIDI mode, and is detected as a MIDI Device by the host Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [2 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use