Sound
- Ngôn ngữ chính
- Haskell
- Star
- 1.3k
- Fork
- 201
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
We could support programmatic generation of sound by using a function Number -> Number (time to amplitude sample). The sampling frequency would need to be FAR higher than the animation frequency, so we'd batch it and use a buffer.
Problems:
- The [JavaScript audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) doesn't work with Internet Explorer (possibly other browsers).
- Performance would be a challenge, and we need to make sure this can be done efficiently to avoid stuttering, even on slow computers.
- It's not clear how to merge this into games. The obvious way would be
audibleInteractionOf(initial, step, event, draw, sound)
But this ties the audio sample rate to the frame rate, which is bad. Another way would be to maintain a different World type for sound, but this is too complicated. Definitely could use some thought.
- We'd need a reasonable kind of abstraction that doesn't involve new ADTs with complicated behaviors. Working directly with wave forms might be an educational experience for a bit, but it shouldn't be unreasonably hard to just choose a timbre and play a melody.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét mô hình dạng sóng Number -> Number được đề xuất, ý tưởng audibleInteractionOf(initial, step, event, draw, sound) và tài liệu API âm thanh JavaScript được liên kết. Công việc hoàn tất khi dự án có một abstraction đã được thống nhất cho việc lấy mẫu âm thanh độc lập, buffering hiệu quả, hỗ trợ trình duyệt và tích hợp với game mà không bị giật.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- haskell, javascript
- Lĩnh vực
- audio-video-rtc
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 18/100