{"action":"created","issue":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/639","labels_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/639/labels{/name}","comments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/639/comments","events_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/639/events","html_url":"https://github.com/chocolate-doom/chocolate-doom/issues/639","id":116123247,"number":639,"title":"MIDI sound support.","user":{"login":"khokh2001","id":914409,"avatar_url":"https://avatars.githubusercontent.com/u/914409?v=3","gravatar_id":"","url":"https://api.github.com/users/khokh2001","html_url":"https://github.com/khokh2001","followers_url":"https://api.github.com/users/khokh2001/followers","following_url":"https://api.github.com/users/khokh2001/following{/other_user}","gists_url":"https://api.github.com/users/khokh2001/gists{/gist_id}","starred_url":"https://api.github.com/users/khokh2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khokh2001/subscriptions","organizations_url":"https://api.github.com/users/khokh2001/orgs","repos_url":"https://api.github.com/users/khokh2001/repos","events_url":"https://api.github.com/users/khokh2001/events{/privacy}","received_events_url":"https://api.github.com/users/khokh2001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-11-10T15:00:32Z","updated_at":"2015-11-11T17:06:16Z","closed_at":null,"body":"DMX library supports midi for sound playback(internally named GSS, likely refers Roland GS sound).\r\n\r\nExample wad (DSPISTOL, DSWPNUP): https://drive.google.com/file/d/0B4n8cpbZ9qicU2kxRlRuYmQxZDA/view?usp=sharing\r\n\r\nRoland demo:\r\nhttps://www.youtube.com/watch?v=N-m0Is3kxK8\r\n\r\nOPL3 demo:\r\nhttps://www.youtube.com/watch?v=UKNCBazvOe4\r\n\r\nThere are 2 formats for midi sound:\r\n\r\nFormat 1 (WPNUP)  (similiar to pc speaker):\r\n    +0(unsigned LE 16-bit int) format, always equals to 1\r\n    +2(unsigned LE 16-bit int) sample length\r\n    +4(unsigned LE 16-bit int) midi bank\r\n    +6(unsigned LE 16-bit int) midi patch\r\n    +8(array of bytes) samples\r\n    \r\n    1)sample rate is 140hz.\r\n    2)sample controls the note key and pitch\r\n    3)sample to note table:\r\n  \r\n   value   note   pitchbend\r\n   0         note off\r\n   1         29       127\r\n   2         29       159\r\n   3         30       127\r\n   4         30       159\r\n   5         31       127\r\n   ....\r\n   197     127     127\r\n   198     127     159\r\n\r\nFormat 2 (PISTOL):\r\n    Simply plays one note.\r\n    \r\n    +0(unsigned LE 16-bit int) format, always equals to 2\r\n    +2(unsigned LE 16-bit int) midi bank\r\n    +4(unsigned LE 16-bit int) midi patch\r\n    +6(unsigned LE 16-bit int) note\r\n    +8(unsigned LE 16-bit int) length\r\n   "},"comment":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/comments/155848084","html_url":"https://github.com/chocolate-doom/chocolate-doom/issues/639#issuecomment-155848084","issue_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/639","id":155848084,"user":{"login":"khokh2001","id":914409,"avatar_url":"https://avatars.githubusercontent.com/u/914409?v=3","gravatar_id":"","url":"https://api.github.com/users/khokh2001","html_url":"https://github.com/khokh2001","followers_url":"https://api.github.com/users/khokh2001/followers","following_url":"https://api.github.com/users/khokh2001/following{/other_user}","gists_url":"https://api.github.com/users/khokh2001/gists{/gist_id}","starred_url":"https://api.github.com/users/khokh2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khokh2001/subscriptions","organizations_url":"https://api.github.com/users/khokh2001/orgs","repos_url":"https://api.github.com/users/khokh2001/repos","events_url":"https://api.github.com/users/khokh2001/events{/privacy}","received_events_url":"https://api.github.com/users/khokh2001/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T17:06:16Z","updated_at":"2015-11-11T17:06:16Z","body":"It's possible. For asm code you should use tasm. I've already compiled heretic with Apogee Sound System throw simple dmx wrapper."}}