Make It Sound. Created by Mike Barela. Last updated on :10:45 PM UTC

Similar documents
New Year Countdown Clock with Circuit Playground Express

Infrared Receive and Transmit with Circuit Playground Express

y POWER USER MUSIC PRODUCTION and PERFORMANCE With the MOTIF ES Mastering the Sample SLICE function

S I N E V I B E S FRACTION AUDIO SLICING WORKSTATION

Circuit Playground Hot Potato

application software

application software

1. Arduino Board and Breadboard set up from Project 2 (8 LED lights) 2. Piezo Speaker

Assignment #3: Piezo Cake

Tebis application software

Experiment 9A: Magnetism/The Oscilloscope

Fraction by Sinevibes audio slicing workstation

Lesson My Bonnie. Lesson time - across several 20 minute sessions

The Instant Sequence

B. The specified product shall be manufactured by a firm whose quality system is in compliance with the I.S./ISO 9001/EN 29001, QUALITY SYSTEM.

Therefore we need the help of sound editing software to convert the sound source captured from CD into the required format.

La Salle University. I. Listening Answer the following questions about the various works we have listened to in the course so far.

Automatic Transfer Switch Control PLC Operator s Manual

Instructions for DataMark PDF Temperature Logger

COMP2611: Computer Organization Building Sequential Logics with Logisim

16 Stage Bi-Directional LED Sequencer

Fox-Bus (FxB) Protocol Timing (Version 4) 9/1/2011

HS-509 VIBRATION TRIP MODULE

Resources. Composition as a Vehicle for Learning Music

Diamond Cut Productions / Application Notes AN-2

******************************************************************************** Optical disk-based digital recording/editing/playback system.

There are three categories of unique transitions to choose from, all of which can be found on the Transitions tab:

Inputs and outputs. Connecting leads. Buzzer

10 Zone RGB-W LED Controller

Writing Programs INTRODUCING THE BASIC STAMP EDITOR 2 SCRIBBLER HARDWARE PROGRAMMING CONNECTIONS 8 BLINKING THE LIGHTS WITH PROGRAM LOOPS 9

ipads in Music Education Session 2

The DataView PowerPad III Control Panel

sonic pi / Jungle Doctor Who

Reason Overview3. Reason Overview

Digital Circuits 4: Sequential Circuits

PRELIMINARY INFORMATION. Professional Signal Generation and Monitoring Options for RIFEforLIFE Research Equipment

Experiment 0: Hello, micro:bit!

Mission. Lab Project B

VNS2210 Amplifier & Controller Installation Guide

KBR-M -WARNING- -SPECIFICATIONS-

Follow the Light Pre-Quiz

Contents. Welcome to LCAST. System Requirements. Compatibility. Installation and Authorization. Loudness Metering. True-Peak Metering

Student resource files

TECHNOLOGY FOR USE IN THE LESSON ROOM AND REHEARSAL ROOM. Dr. Brad Meyer Director of Percussion Studies Stephen F. Austin State University

MAutoPitch. Presets button. Left arrow button. Right arrow button. Randomize button. Save button. Panic button. Settings button

SC26 Magnetic Field Cancelling System

Igaluk To Scare the Moon with its own Shadow Technical requirements

Data Acquisition Instructions

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Tebis application software

S I N E V I B E S ROBOTIZER RHYTHMIC AUDIO GRANULATOR

ipads in Music Education Session 2

Neuratron AudioScore. Quick Start Guide

VNS2200 Amplifier & Controller Installation Guide

The computer speakers can be loud. So, you may want to adjust the volume. For example, on the Mac keyboard you can use the F11 and F12 keys.

Classroom. Chapter 1: Lesson 6

Hip Hop Activity Box. Instruction Manual. Hip Hop Activity Box 22875, October 2018 Copyright ROMPA Ltd

8/16/16. Clear Targets: Sound. Chapter 1: Elements. Sound: Pitch, Dynamics, and Tone Color

LESSON 1 PITCH NOTATION AND INTERVALS

Solutions to Embedded System Design Challenges Part II

BME 3512 Biomedical Laboratory Equipment List

CHAPTER 3 AUDIO MIXER DIGITAL AUDIO PRODUCTION [IP3038PA]

Model 1421 Distribution Amplifier

Character LCDs. Created by lady ada. Last updated on :47:43 AM UTC

Logo Music Tools by Michael Tempel

Classroom Setup... 2 PC... 2 Document Camera... 3 DVD... 4 Auxiliary... 5

User s Manual. Network Board. Model No. WJ-HDB502

MULTI CHANNEL VOICE LOGGER MODEL: DVR MK I

ORM0022 EHPC210 Universal Controller Operation Manual Revision 1. EHPC210 Universal Controller. Operation Manual

XYNTHESIZR User Guide 1.5

FS1-X. Quick Start Guide. Overview. Frame Rate Conversion Option. Two Video Processors. Two Operating Modes

Revision History. SDG2000X Firmware Revision History and Update Instructions

FS3. Quick Start Guide. Overview. FS3 Control

Atlas Drop In Decoder

2nd Grade Music Music

The NXT Big Thing #14

(Skip to step 11 if you are already familiar with connecting to the Tribot)

The Basics of Reading Music by Kevin Meixner

AUDIO RECORDING. Rewind - to move back to a specific point in the recording (usually the beginning)

OLD WORLD AUDIO U33A VARI-MU STEREO COMPRESSOR INSTALLATION AND OPERATING NOTES

I. LISTENING. For most people, sound is background only. To the sound designer/producer, sound is everything.!tc 243 2

Introduction. Overview. Organization

MULTI CHANNEL VOICE LOGGER MODEL PCVL - 4/8/10/16/32/64. ORIGINAL EQUIPMENT MANUFACTURER OF VOICE LOGGING SYSTEMS Radio and CTI Expert Organisation

G-Stomper Timing & Measure V Timing & Measure... 2

L+R: When engaged the side-chain signals are summed to mono before hitting the threshold detectors meaning that the compressor will be 6dB more sensit

LEVEL CROSSING MODULE FOR LED SIGNALS LCS2

Natural Radio. News, Comments and Letters About Natural Radio January 2003 Copyright 2003 by Mark S. Karney

SOFTWARE INSTRUCTIONS REAL-TIME STEERING ARRAY MICROPHONES AM-1B AM-1W

Software Quick Manual

Building the ChronoDot Calendar Reminder

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

Modular Analog Synthesizer

System Troubleshooting for

Patchmaster. Elektronik. The Pulse generator. February 2013

User Guide Version 1.1.0

3rd Grade Music Music

Dissolve Control Programming : Projector/Dissolve Control Hook-Up

BooBox Flex. OPERATING MANUAL V1.1 (Feb 24, 2010) 6 Oakside Court Barrie, Ontario L4N 5V5 Tel: Fax:

AG 500SC. Owners Manual. Manual Version 1.7

DVB-T Box, USB Monheim/Germany Tel. +49 (0)9091/ Fax +49 (0)9091/ Hama GmbH & Co KG.

Transcription:

Make It Sound Created by Mike Barela Last updated on 2018-08-22 04:10:45 PM UTC

Guide Contents Guide Contents Overview Part List Circuit Playground Express To Go Further Adafruit CRICKIT for Circuit Playground Express Mini Metal Speaker w/ Wires - 8 ohm 0.5W Music and Sound in MakeCode Predefined Sounds Music Music and Sound in CircuitPython Simple Tones Continuous Tones Wave Files 2 3 3 3 3 4 4 5 6 7 8 8 9 9 Adafruit Industries https://learn.adafruit.com/make-it-sound Page 2 of 10

Overview Making and reacting to sound is fundamental to daily life. Your next project can use sound quickly and easily to provide indications something is happening or as the perfect accompaniment to your projects use. Using either Microsoft MakeCode or CircuitPython, you can use sound in your project. The code will use the Adafruit Circuit Playground Express board. If you have a project that is robotic, you can add the Adafruit Crickit robotics board to Circuit Playground Express which provides the benefit of an amplifier for much better sounds than that provided on the Circuit Playground Express on-board speaker. Part List Your browser does not support the video tag. Circuit Playground Express $24.95 IN STOCK ADD TO CART To Go Further Adafruit Industries https://learn.adafruit.com/make-it-sound Page 3 of 10

Adafruit CRICKIT for Circuit Playground Express $29.95 OUT OF STOCK OUT OF STOCK Mini Metal Speaker w/ Wires - 8 ohm 0.5W $1.95 IN STOCK ADD TO CART Adafruit Industries https://learn.adafruit.com/make-it-sound Page 4 of 10

Music and Sound in MakeCode If you are new to Microsoft MakeCode, you can learn the basics of MakeCode here (https://adafru.it/wwd). Currently MakeCode has a whole block group, MUSIC, devoted to making sounds: The main groups of blocks provide the following: Setting the volume (loudness) of your tones Play sounds at startup or stop playing all sounds Play any frequency tone Play a musical note Play music faster or slower Note duration (beat) and pause between notes (rest) The following code will play a 220 Hz tone when you press the A button and a 440 Hz tone when you press the B button. Within the INPUT group are the loops used for button presses. Select two on button blocks and add to each a play tone at block from the MUSIC group. Change the value of the button A play tone at to 220 and it will replace the number with the value Low A. Replace the value of the Button B play tone to 440 and MakeCode will change the number to Middle A. MakeCode recognizes certain sound frequencies as musical notes and will change those accordingly. Alternatively MakeCode will put up a small keyboard when you work with the play tone at block's value to help you select musical notes if you like. Adafruit Industries https://learn.adafruit.com/make-it-sound Page 5 of 10

https://adafru.it/bvy https://adafru.it/bvy Pull up this example and press the Download button to save it to your Circuit Playground Express. Press the A and B buttons. You get two different sounds! Feel free to change them up. Predefined Sounds MakeCode comes with several predefined sounds that have several musical notes. Change the Button A and Button B contents both to use the play sound until done block. Change them so each button plays a different sound: https://adafru.it/bvz Adafruit Industries https://learn.adafruit.com/make-it-sound Page 6 of 10

https://adafru.it/bvz Push the buttons and you get two melodies. Feel free to use the predefined sounds in your code. Music Typing in your own musical melody is possible but you need to know a bit about musical notation. I have found that some Internet sites are good at providing the notes, some are not. You can look to someone who knows how to read music to help if all you find is sheet music. The following program plays a well known tune. See how many notes it takes to do the short portion? The code also uses the A and B buttons to change how fast or slow the music plays. https://adafru.it/bv- https://adafru.it/bv- Using MakeCode, it is a bit tedious to put in lots of custom sounds. On the next page, CircuitPython will be used which also allows use of pre-recorded sound files which MakeCode cannot use at present. Adafruit Industries https://learn.adafruit.com/make-it-sound Page 7 of 10

Music and Sound in CircuitPython CircuitPython has similar capabilities to MakeCode for playing tones. CircuitPython, though, doesn't understand music so you would have to provide your own understanding of which musical notes correspond to which sound frequencies. You can look up which musical notes correspond to which frequencies on a number of websites including this chart on Wikipedia (https://adafru.it/bw0). Simple Tones Adafruit provides the adafruit_circuitplayground library to provide high level access to the various parts of the board in CircuitPython. The functions CircuitPython provides for using the speaker: cpx.play_tone(frequency, duration) cpx.start_tone(frequency) cpx.stop_tone() cpx.play_file("laugh.wav") Most often for tones, it is known how long you might want to play the tone, for a second or so or perhaps until you manually turn it off (tones that play a long time are annoying unless you are doing it on purpose like for an alarm). The two tone program using buttons A and B for two versions of the musical note A is: from adafruit_circuitplayground.express import cpx while True: if cpx.button_a: cpx.play_tone(220, 0.5) elif cpx.button_b: cpx.play_tone(440, 0.5) In this case we play the frequencies 220 Hz and 440Hz each for 1/2 second. Adafruit Industries https://learn.adafruit.com/make-it-sound Page 8 of 10

Continuous Tones For an alarm, say your soil is too dry and you need to water or your family member tripped your alarm. We'll use a capacitive touch on Circuit Playground Express pad A1 to trigger an alarm. The Circuit Playground Express slide switch will silence and reset the alarm: from adafruit_circuitplayground.express import cpx cpx.adjust_touch_threshold(100) # pretty sensitive while True: if cpx.switch and cpx.touch_a1: cpx.start_tone(2000) if not cpx.switch: cpx.stop_tone() Wave Files The strength of CircuitPython lies with its ability to play sound files in the wave or WAV format. Not 100% of wave files on the Internet are compatible though. The parameters for CircuitPython playable files are: A sample rate less than or equal to 22,050 hertz 16-bit mono / single channel Adafruit has a guide to help you with your audio files here (https://adafru.it/s8f). Using wave files for your project is wonderful! You have nearly unlimited sounds to sample and play on whatever command you set. Here is a simple program that will play one wave file when button A is pressed and another if button B is pressed. Here's the two files we're going to play: https://adafru.it/zfk https://adafru.it/zfk https://adafru.it/zfl https://adafru.it/zfl Click to download, and save them onto your CIRCUITPY drive, alongside your code.py program file. Adafruit Industries https://learn.adafruit.com/make-it-sound Page 9 of 10

from adafruit_circuitplayground.express import cpx while True: if cpx.button_a: cpx.play_file("rimshot.wav") if cpx.button_b: cpx.play_file("laugh.wav") It is that easy! If you want to try out some projects which use wave files, here are some good ones in the Adafruit Learning System: FruitBox Sequencer: Musically Delicious Step Pattern Generator (https://adafru.it/bw1) Sparky the Blue Smoke Monster Automaton (https://adafru.it/bnl) Adafruit Industries Last Updated: 2018-08-22 04:10:39 PM UTC Page 10 of 10