project screenshot 1
project screenshot 2
project screenshot 3

On-Chain Music Doodle Board for Communities

Creating sound waves *fully* on-chain and allowing NFT holders to paint music samples on a digital soundboard (grid) β€” allowing communities to enter into a collaborative experiment to create a soundtrack of all samples painted in each location.

On-Chain Music Doodle Board for Communities

Created At

ETHGlobal Paris

Winner of

πŸ₯ˆ ApeCoin DAO β€” Best Integration

Project Description

In the likes of the BAYC Private BathroomΒ  where ape holders were allowed to paint a pixel on the bathroom wall (grid) every fifteen minutes β€”

β€” we developed On-Chain Music Doodle Board (MDB), a fully on-chain Musical Doodle Board that allows NFT holders of a collection such as BAYC and Nouns to "paint" individual music samples into a digital soundboard (6x1500 grid) every 15 minutes; thus allowing the community to enter into a collaborative experiment to create a soundtrack that combines all the music samples that were painted in each grid location.

In short MDB is a member's only music canvas for crypto twitter.

But, the catch is that EVERYTHING is ON-CHAIN, including the creation of the sound wave sample which are also generated on-chain (more details below), as well as the front-end client.

https://www.canva.com/design/DAFpcPqJkRk/4ueleFqX42z71CvIAANqcA/edit

How it's Made

CONTRACTS

Contracts on Linea:

https://goerli.lineascan.build/tx/0xc47162f4e873b303481c6cf91a3d72d3b37d55da0ba0eccefd14ebe8fd05c656

There are 3 sets of contracts:

  • The first set of contracts manages the doodle board.
  • The second set, generates the base sounds (sound waves)
  • The third set of contracts, is an on-chain implementation of a JavaScript / HTML front end client which interacts with the user’s wallets and reads from the first two sets of contracts to generate and play the sounds, as well as allow owners of the tokens to update and contribute to the doodle board.

Since the frontend client on-chain, it’s fully decentralized and accessible to anyone with a connection to the blockchain.

ON-CHAIN SOUNDWAVES

Sound waves (music) can be represented / decomposed using a pulse-code modulation technique. An analog sound wave is represented digitally in a PCM audio file. The goal is to recreate the qualities of an analog audio signal as precisely as possible. The output is essentially a series of bytes (number) that can be placed across a histogram for "t" time.

Hence, we can derive a type of mathematical equation that attempts to reproduce particular properties of a soundwave, or even generate new sounds that manipulate a particular value over time.

image

This is where ByteBeat comes into play.

We implemented ByteBeat in a smart contract to allow the generation of soundwaves based on simple mathematical formulas. Bytebeat is the name of type of music made from math. You provide a function who's only input is time t and from that write some code to generate a sound.

https://stellartux.github.io/websynth/guide.html

ON-CHAIN FRONTEND
By implementing the frontend contracts using an HTML/JavaScript generator contract libraries (implemented in Solidity), we can greatly reduce the storage footprint of storing the frontend client on-chain.

NFT communities are assigned a track on the Doodle Board, a track is represented a grid.

image

USER FLOW
Each token holder can update a single grid item (sample location) at a time. Similar to the BAYC bathroom, each token holder can only perform an update once every 15 minutes.

The track finalizes after a given amount of time β€” a snapshot of all the sample recorded at each grid location is taken and a full music track is generated out of all the samples. The generation of the full soundtrack also happens on-chain.

background image mobile

Join the mailing list

Get the latest news and updates