ADAFRUIT-AUDIO-FX-declenchement

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Déclenchements avancés

Même si la carte est est vraiment simple et facile à utiliser, vous pouvez réaliser des trucs vraiment cool avec elle si vous voulez être créatif

Ordre des déclencheurs

Qu'arrive t'il si vous avez plus d'une broche connecté à la masse? Quel broche est alors déclenchée? Comment la carte sait-elle ce qu'elle doit jouer?

C'est une excellent question!

Il y a 11 broches numérotées de #0 jusqu'à #10. La carte son vérifie chaque broche dans l'ordre en commençant par la broche #0. Si elle est branchée à la masse alors la carte vérifiée si elle peut trouver un fichier Tnn à jouer.

Cela signifie que si vous avez la broche #10 branchée sur la masse PUIS ENSUITE la broche #0 branchée à la masse, ALORS la boucle de vérification suivante détectera d'abord la broche #0 et jouera le fichier correspondant PUIS le fichier de la broche #10

Vous pouvez utiliser cette caractéristique pour créer des effet/son de premier plan avec les premières broches et des effets/son d'arrière plan avec les dernières broches.

Arrière et premier plan

For this example, we'll be using this set of WAV files that have some Darth Vader effects. Unzip and load these onto your sound board

Download-icon.pngTéléchargez darthvaderSFX.zip

Ok now that you're done, you can see we have one file called T10HOLDL.WAV - this is a file that will play on loop as long as pin #10 is held down. There's also a couple T00RANDx.WAV files, these are files that will be played in random order when pin #0 is held down

Power the sound board and connect a wire from pin #10 to ground (not a switch!) you'll notice that the Darth Vader breathing sound is now playing on loop. If you then have a button between pin #0 and ground and press it, a voice clip will play on the next loop cycle (once the breathing has ended)

If you have a very short background sound loop, say one that loops evey 1-2 seconds, then this is probably good enough. If you have a long loop like this one, where it takes 3 seconds to loop it can be annoying because you have to wait until the sound is done to have the foreground noise.

Arrière et premier plan (avancé)

The problem here is that you can't release the looping sound since its tied to ground. You could have one button held down all the time or try a latching loop but it's a lot easier if you just use a switch that has NC (normally closed) and NO (normally open) contacts - sometimes called a DPST (double pole single throw) switch

Most low cost switches and buttons do not have a normally-closed output, so make sure to check the specifications. This switch is a good example of one with both, and it even has nice markings!

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

In this case, we connect the COM (common) pin to ground, then the normally-closed to pin #10 and the normally open to pin #0

With this setup, pin #10 is triggered normally, and when the lever is pressed, #10 is released and #0 is pressed. That way the #10 background loop stops immediately, and the #0 foreground sound starts immediately. When the lever is released, it goes back to having pin #10 connected

Voici une liste de quelques interrupteur/switch proposant des contacts Normalement Ouvert (NO) et Normalement Fermé (NC)

Nous proposons également des boutons poussoirs et switch NON momentanés, ils fonctionnement sous le mode marche/arrêt.



Source: Adafruit Audio FX Sound board Crédit: AdaFruit Industries

Créé par Ladyada pour AdaFruit Industries.
Traduit par Meurisse D. pour MCHobby.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com