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

{{{text}}}

Order des déclencheurs

What happens if you have more than one pin connected to ground/triggered? How does the Sound Board know what to play? Great question!

There are 11 pins, #0 thru #10, the sound board looks at each pin, in order starting with #0 and if it sees that pin connected to ground checks if it can find a Tnn file to play

That means, if you have pin #10 held down and then pin #0 held down, on the next loop #0 will always get played first, then #10

You can use this quirk to create background effects and foreground effects

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

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!

 
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

Here's a list of some of the switches we have at Adafruit that have a NC and NO output

  • Micro Switch with Lever (momentary)
  • Micro Switch with Wire (momentary)
  • Micro Switch (momentary)
  • Weatherproof Pushbuttons (momentary)

We also have some buttons/switches that are not momentary, they latch on or off.

  • Weatherproof Pushbuttons (on/off)
  • Slide switch (on/off)



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