今日は誕生日であり、0x22歳となった。つまり34歳。はてなブログのプロフィールも修正したし完璧!というわけで今年は頑張りたいところだけど、作曲はいきなり微妙な雰囲気になっている。まぁ、胃潰瘍があったからねぇ…去年は腰椎椎間板ヘルニアやったし、これからは健康的に生きていきたいものだ…
Windows SDK使ってMIDIシーケンサ編 その2 雑に画面描画
GDI+とやらで雑に描画。ついでにスクロールバーも作ってみたけど機能せず
お題スロット: 今日の出来事
はてなブログのお題スロットを回してでてきたテーマです。特に今日は何もなかった!これからギター教室のレッスンがあるよ!それぐらい…なんかいつも通りだなー。平和でいいことだ…
さて、作曲活動も再開しないとな…
全然手をつけてなかったけど、再開していきます
新曲2曲と過去の曲のアレンジ1曲
新曲の片方はすでに完成していて、もう片方は2番まで出来ています
適当に作ろう
JavaでもやってるけどCreateWindowな環境でもやってたりします
#include "MidiOut.h" #include <assert.h> void MidiOut::open(){ midiOutOpen(&hMidiOut, MIDI_MAPPER, 0, 0, 0); } void MidiOut::noteOn(int32_t channel, int32_t note, int32_t velocity) { assert(0 <= velocity && velocity <= 127); assert(0 <= channel && channel <= 15); assert(0 <= note && note <= 127); int32_t outData = NOTE_ON | channel; outData |= (note << 8); outData |= (velocity << 16); midiOutShortMsg(hMidiOut, outData); } void MidiOut::noteOff(int32_t channel, int32_t note, int32_t velocity) { assert(0 <= velocity && velocity <= 127); assert(0 <= channel && channel <= 15); assert(0 <= note && note <= 127); int32_t outData = NOTE_OFF | channel; outData |= (note << 8); outData |= (velocity << 16); midiOutShortMsg(hMidiOut, outData); } void MidiOut::reset() { midiOutReset(hMidiOut); } void MidiOut::close() { midiOutClose(hMidiOut); }