google / google/codeworld

Sound

Ouverte
#47 19 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
discussion
Langage dominant
Haskell
Étoiles
1.3k
Forks
201
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par examiner le modèle de forme d’onde Number -> Number proposé, l’idée audibleInteractionOf(initial, step, event, draw, sound) et la documentation liée de l’API audio JavaScript. Le travail est terminé lorsque le projet dispose d’une abstraction validée pour l’échantillonnage audio indépendant, la mise en mémoire tampon efficace, la prise en charge des navigateurs et l’intégration aux jeux sans saccades.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
haskell, javascript
Domaine
audio-video-rtc
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
18/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.