24 ธันวาคม 2552

กลองอิเล็กทรอนิกส์

กลองอิเล็กทรอนิกส์

ใช้ sensor แบบ Peizo หรือเรียกว่า บัสเซอร์ เพื่อตรวจสอบการสั่นของกลอง
ดูวีดีที่นี่อธิบายง่ายกว่าครับ http://todbot.com/blog/2006/10/29/spooky-arduino-projects-4-and-musical-arduino/
หลังจากนั้น เราจะส่ง code MIDI ออกไป
วิธีการต่อ MIDI port กับ Arduino http://arduino.cc/en/Tutorial/Midi


เราจะต่อผ่าน serial แต่จะใช้ Board rate ที่ 31250
วิธีการทำสำคัญคือการทำ debounce เพื่อให้เราไม่ส่งสัญญาณออกไปหลายครั้ง
จะได้เสียง MIDI ที่ไม่สมบูรณ์
วิธีการ Debounce http://www.arduino.cc/en/Tutorial/Switch

แต่ใน Sample เป็นเสียงเปียโน เราต้องเปลี่ยน Channel เป็น Channel 9 คือ 0x99
ที่มาจาก http://www.harmony-central.com/MIDI/Doc/tutorial.html#messages
The General MIDI system utilizes MIDI Channels 1-9 and 11-16 for
chromatic instrument sounds, while Channel number 10 is utilized for
"key-based" percussion sounds. These instrument sounds are grouped into
"sets" of related sounds. For example, program numbers 1-8 are piano
sounds, 9-16 are chromatic percussion sounds, 17-24 are organ sounds,
25-32 are guitar sounds, etc.

อื่นๆที่เกี่ยวข้อง

สำหรับผู้สนใจศึุกษาเพิ่มเติม
library MIDI ของ Arduino http://timothytwillman.com/itp_blog/?page_id=240

ยูเอสบี MIDI สำหรับ Arduino
http://delacrew.net/www2/dev/arduino-usb-midi-interface/





ไม่มีความคิดเห็น: