Modifications

Sauter à la navigation Sauter à la recherche
4 560 octets ajoutés ,  1 janvier 2016 à 10:21
Ligne 18 : Ligne 18 :     
Remember, you don't have to use a mechanical button or switch - you can use conductive thread, tilt switches, two pieces of tinfoil, the output from some other electronic thingy, just anything that will send a ground signal to the pin.
 
Remember, you don't have to use a mechanical button or switch - you can use conductive thread, tilt switches, two pieces of tinfoil, the output from some other electronic thingy, just anything that will send a ground signal to the pin.
 +
 +
== Combien de temps faut-il pour commencer la lecture? ==
 +
 +
Good question! It matters whether you are using WAV or OGG. Compressed audio takes a little more time to get going.
 +
 +
From the moment the SFX board sees a ground level on the pin, it takes ~120ms to play a WAV file and ~200ms to play an OGG file. These are within 'instant feedback' expectation
 +
 +
If 'repeating' a file by keeping the button hend down, or doing a latching trigger type, theres a ~20ms delay (imperceptable) between WAV replays and ~120ms between OGG replays (noticable if the audio is meant to perfectly loop)
 +
 +
== Type de déclencheur ==
 +
There's a lot of different ways you may want to play your sound effects. Normally a microcontroller would be required to get exactly what you want, but the Sound Board is pretty smart and has the '''ability to play audio a couple different ways depending on the file name'''.
 +
 +
There's no code or firmware involved, only the file name of the audio file!
 +
 +
{{ADFImage|ADAFRUIT-AUDIO-FX-trigger-01.png}}
 +
 +
Let's understand this by going through the five types:
 +
 +
Les déclencheurs ou "effets de déclenchement" ("trigger effects" en anglais) permettent de déterminer la façon dont l'audio est joué. En effet, suivant la nature de votre projet, les fichiers audios devraient êtres joués de tel ou tel façon. Adafruit à identifié 5 besoins différents (les plus communs) qui son inclus dans la carte son. Vous avez juste besoin de renommer votre fichier pour obtenir l'effet désiré.
 +
===  Déclenchement élémentaire (Basic Trigger) ===
 +
The first type is the 'basic trigger' - when the button is pressed, audio plays. The entire file is played from beginning to end once.
 +
 +
To enable this trigger, name the file {{fname|Tnn.WAV}} or {{fname|Tnn.OGG}} where nn is the trigger #. For example, if you want to use pin #0, the file could be called {{fname|T00.WAV}} (that's two zeros after the T), if you want to use pin #6, {{fname|T06.OGG}} - all the way up to {{fname|T11.WAV}}
 +
 +
=== Déclenchement avec maintient - en boucle continue (Hold Looping Trigger) ===
 +
This is a more complex trigger. Instead of pressing once the button to play, it plays ONLY when the button is held down. Great for "hold the button down to play the ray gun blaster sound effect" Call the file {{fname|T02HOLDL.WAV}} for example
 +
 +
As long as the trigger pin is connected to ground, it will continue to play the same track on repeat. If you want a perfectly smooth transition between the end and beginning, we suggest WAV files, as OGG decompression takes a few milliseconds and has a noticable delay.
 +
 +
=== Déclenchement on/off - en boucle continue (Latching Loop Trigger) ===
 +
This is a little like the Hold Looping trigger but you do not need to keep the button held down. Instead, press the button once to start the looping effect, then press it again to stop.
 +
 +
This is maybe good for if you want a continuous effect without having to keep the pin held down. Call the audio file {{fname|T08LATCH.OGG}} for example
 +
 +
If you want a perfectly smooth transition between the end and beginning, we suggest WAV files, as OGG decompression takes a few milliseconds and has a noticable delay.
 +
 +
=== Déclenchement fichier suivant (Play Next Trigger) ===
 +
Lets say you want to have one button but many different sound effects. For example, a stuffed animal that has a squeeze sensor trigger. It would say different things each time it is squeezed. For this kind of effect, use the Play Next Trigger.
 +
 +
This trigger is basically like the basic trigger, one button press per play, but you can have multiple effects on one pin
 +
 +
You can have up to 10 audio files triggered on one pin, they will play in order. For example, if you're using pin #3, the files would be named {{fname|T03NEXT0.WAV}}, {{fname|T03NEXT1.WAV}}, {{fname|T03NEXT2.OGG}} etc. up to {{fname|T03NEXT9.WAV}}
 +
 +
Just make sure it starts with #0, and put as many as you like up to #9. You do not need to use all 10 '# slots' up. If a number is missing, like {{fname|T03NEXT3.WAV}} doesn't exist, it will automatically play #0 again.
 +
 +
=== Déclenchement aléatoire (Play Random Trigger) ===
 +
OK so you like the Play Next mode but you don't want to have it always in the same order? Use Play Random mode. You can have up to 10 audio effects, from say {{fname|T07RAND0.OGG}} uo to {{fname|T07RAND9.OGG}}
 +
 +
When the button is pressed, a 'random' track will be played.
 +
 +
Please note, this is not 'cryptographic quality' randomness :) In fact, itwill play through all of the tracks at least once (but in any order) before repeating.
 +
    
{{ADAFRUIT-AUDIO-FX-TRAILER}}
 
{{ADAFRUIT-AUDIO-FX-TRAILER}}
29 836

modifications

Menu de navigation