element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi-Fest
  • Challenges & Projects
  • Design Challenges
  • Pi-Fest
  • More
  • Cancel
Pi-Fest
Blog e-tabla part #4: First Working Prototype
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Leaderboard
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: arjuna_dev
  • Date Created: 9 Aug 2022 1:33 PM Date Created
  • Views 648 views
  • Likes 5 likes
  • Comments 0 comments
Related
Recommended

e-tabla part #4: First Working Prototype

arjuna_dev
arjuna_dev
9 Aug 2022

Hi, all! This time I've been working on putting it all together and making it work. There is the audio part, the touch sensitive ink part and building of the drum.

I used white glue for the faux leather and a mix of Liquid Tape and powdered graphite to connect/glue the cables to the e-ink. I used double tape for the speaker and breadboard. Putting it all together:

image


Although at first I was aiming to replicate the sound of the tabla accurately for whatever area of the drum one would play while studying how tabla players play the different strokes I noticed that they use very particular areas for playing. I thought this could make the project somewhat easier but also I imagine as it serving an educational purpose: when using this project you get to see the areas where you should be playing to get a specific sound.


image


This last pictures shows the different areas where touch sensitivity can be recognized. Also, I upgraded the look of the drum by shaving off the extra faux leather to make it look more clean.  Here is how it looks on the tripod!:


image

As mentioned in a past blog post, the tripod is an important part of the project because the table player usually adjusts the angle of the drum.

I was happily surprised with the low resistance of the conductive paint. I applied only 2 layers of paint and didn't have any missing readings from the touch detection system that I could notice. Here you see it in action:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image


I managed to write a code that allows the user to play the three most important notes of this drum. Namely the Ghe, Ke and the pitch changing Ghe+Slide. For the Ghe note the hand rests on the part of the drum nearest to the player and the fingers strike on the opposite side of the drum. For the Ke sound the whole palm is used to generate a muted sound. And for the pitch-changing note a normal Ghe note is played and then the hand puts pressure and slides in the drum shortening the radius of the vibrating leather and thus generating a higher pitch. Naturally this last one was the trickiest to replicate. My solution was to detect if the hand is sliding after a Ghe stroke. If it is, the Ghe stroke sound file stops being played and in its place a recording of the last part of the Ghe+Slide stroke is played. In other words, for this last stroke we play half of one sound file and the second half of another sound file. It worked quite well:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image


Here you can checkout the algorithms to detect the different strokes:


import audiocore
import board
import audiobusio
import busio
import time
import adafruit_mpr121

# Configure touch sensor
i2c = busio.I2C(board.GP9, board.GP8)
i2c_touch_address = 0x5A
mpr121 = adafruit_mpr121.MPR121(i2c)

# Load .wav files
left_drum_strokes = {
    "Ghe":{
      
    }, 
    "Ga":{

    },
    "Ke":{

    }, 
    "Slide":{

    }
}

wave_objects = []
for note in left_drum_strokes:
    left_drum_strokes[note]["wave_object"] = audiocore.WaveFile(open("tabla_samples/" + note + ".wav", "rb"))

# Configure I2S output
audio = audiobusio.I2SOut(board.GP0, board.GP1, board.GP2)

main_stroke_area_ready = True
central_circle_ready = True
first_4_pads_ready = True

while True:
    touched_pins = mpr121.touched_pins
    first_3_pads = touched_pins[9:12]
    first_4_pads = touched_pins[8:12]
    central_circle = touched_pins[7]
    main_stroke_area = touched_pins[1]

    if not main_stroke_area:
        main_stroke_area_ready = True

    if not central_circle:
        central_circle_ready = True
 
    if not any(first_4_pads):
        first_4_pads_ready = True

    if main_stroke_area and any(first_3_pads) and main_stroke_area_ready and not central_circle:
        audio.play(left_drum_strokes["Ghe"]["wave_object"])
        main_stroke_area_ready = False
        time.sleep(0.2)
        new_touched_pins = mpr121.touched_pins
        new_first_4_pads = new_touched_pins[8:12]
        print("new_touched_pins", new_touched_pins)
        print("new_first_4_pads", new_first_4_pads)
        if new_first_4_pads == (1, 1, 0, 0) or new_first_4_pads == (0, 1, 1, 0):
            audio.play(left_drum_strokes["Slide"]["wave_object"])
            main_stroke_area_ready = False

    if main_stroke_area and any(first_4_pads) and central_circle_ready and central_circle:
        audio.play(left_drum_strokes["Ke"]["wave_object"])
        central_circle_ready = False



Still reading? Thanks! Stay tuned for the last blog post!

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube