Dear STEEM community,

I am new around here, but since I started to know more about the community I understood that this was the place I wanted to be. Then later I saw DTube being announced and my head was going around in waves about this mix of technologies that made it possible… I met @heimindanger and chatted about his project and absorbed some of the details and ideology, of which I share the same vision. And it got my engine running, so I dived in and started implementing my own vision of what I wanted as a platform for publishing music and sounds in general. And now I am proud to introduce you all to...

What is DSound?

DSound is a web application that I developed in Javascript, that allows us to upload, listen and discover music and other sounds stored on top of the IPFS Network. It uses STEEM blockchain as a decentralized database, which allows authors to earn rewards in STEEM Dollars cryptocurrency, which can be exchanged directly to US Dollars or any other currency, when other users like or repost our content, in the same way as Steemit.com for blog posts.

I decided to follow the same approach as @heimindanger and develop first and talk after. And I worked almost non-stop until I have this first alpha version to share with you! It is only a minimum viable product of what can become the platform of reference for musicians to publish their songs, promos and recordings and be rewarded for their work immediately, without any publishing and/or distribution involved.

As a musician and DJ as well I deeply understand the music industry and my only aim is to create a platform where I would love to publish my own works, to receive the feedback from the community and earn few bucks with it… And if you also are in the industry, you know how difficult it is to make any money with our creations in the music business these days!

There are some platforms that allow it, if you are signed with a big label, like SoundCloud, YouTube, Apple Music or Spotify, but if you are an indie like myself, you get lucky if you can publish any of your own creations on these channels without being taken down! I had my own creations (without any sampled materials) being taken down for copyright infringement, just because they can.

Even worse for other kinds of creations, which constitute fair use of the copyrighted materials, like remixes, mashups or DJ sets. If you want to share any of these with your fans, nowadays you can’t! If you upload these works to YouTube or SoundCloud in a matter of seconds they are taken down for copyright infringement. This is not acceptable. These are derivative works of the original ones, which serve to promote the authors or give them a different use, like a remix makes people dance to an undanceable song, or a DJ set which mixes and blends together several tracks to produce a completely different sound vibe. These creations deserve to be published and their authors deserve to earn their bucks if people like it!

So, the copyright law is broken and needs fixing. But in these last cases, besides being fair use, the industry is abusing the small creators with their super-powers making it impossible for them to survive without working other jobs to put food to their tables, instead of focusing on creating and spreading love! But this is about to change with DSound!!! :)

How to use DSound

Logging in

Create a STEEM account on Steemit.com, if you don’t have one already, then enter your STEEM username:

Enter your Private Posting Key, you can find it here:



Multi-user login

If you are an artist as well, it is common to have your artistic names, which leads to having multiple accounts on the social networks and usually makes it a real pain to always being logging-out and logging-in to use your different pseudonyms. Youtube and Facebook have this feature allowing you to switch between them easily. So, I followed the same idea as @heimindanger and implemented it on DSound as well, letting users log in with as many accounts as they want, and switch between them.

IPFS Settings

DSound manages all IPFS settings for you right now. Maybe in the future it will have a way to fine tune them, but for now it is all taken care. It shows if you are running a local IPFS node or not, and if you do DSound will happily use it, otherwise it will connect to other IPFS nodes on the network to upload and store your content.

Uploading

First, you need to be logged-in to be able to access the upload page.

Then just simply upload the audio file, the cover art (not required but much appreciated by your listeners, like a part of your sound that fills the eyes), and finally fill the texts for the blockchain and publish!

If all goes well, you should be taken to the new sounds feed where your sound should be sitting, waiting to be played by your fans. The process can take between 0 and 30 seconds, depending on the IPFS network status and your connection speed. This is where having a local IPFS node installed helps a lot, and if you upload regularly you should definitely think about it.

I will be developing a desktop app, together with @heimindanger from DTube, to allow non tech users to install the IPFS and configure it correctly for use with both DTube and DSound, but until then you can always try it out with the instructions found on the IPFS website (not very easy for non tech savvy people…)

Browsing and Discovering Sounds

Here I tried to replicate the way Steemit.com works, with the exception of the home page where you view the feed of sounds that had any recent interactions, like comments or upvotes. Then you have the regular Trending, Hot and New main sections. They work the same as in Steemit.

If you click on a sound (title or cover) you will get to the sound page:

If you click on a ‘#tag’ on any page, you can discover sounds only on that category, even if you select the new, hot or trending sections you will be seeing that category on the chosen section. By clicking on the logo to go to your feed or exiting the browsing to any other page you will exit the category mode. When browsing in category mode you’ll see the category ‘#tag’ at the top:

Anywhere on the application you can click on an ‘@user’ to view that user’s publications alone at the user page:

Yes, you can see the new profile cover picture of Steemit at the cover of DSound user profile page! :)

And anywhere you see a track player with the play button and a waveform of the sound, you can play that sound and navigate in it by clicking on the waveform as you do on SoundCloud.

Also, throughout the app you see the player at the lower part of your screen and that player plays music even when you navigate through the application, knowing your last feed selection of songs and playing them in sequence or shuffle them for you!

This is all based on STEEM blockchain, so naturally you can like sounds by clicking on the ‘heart’ icon, republish them on the ‘repost’ icon, download the sounds on the Download button (if enabled by the author) or otherwise the author may activate a Buy button with a link directly to that sound on any music store of his choice or even his website.

By disabling the download link, the author is only not giving his permission for you to download the sound directly on DSound, but through IPFS network, everything in it is naturally available to download, so don’t think your content will not be downloadable if you disable the download button when uploading! As with SoundCloud, YouTube, Spotify or any other content sharing, if you can stream it you can download it, one way or the other…

The following parts of this article are mostly technical and maybe not so interesting to some people not on the tech side, but if you are curious about the internals of DSound you can continue, as I’ll try to explain how it works with simple common words, when possible... ;)

How DSound works

STEEM Blockchain as database

What makes DSound so special is its decentralized nature. Using a blockchain for it was my idea for ages. STEEM has many advantages over other blockchains. It is fast (3 sec blocks). It is free, anyone can use it without having to deposit some form of currency, and transactions have no fees.

Other projects are already there that implement some kind of Music Currency, that you can use to buy access to music content, like Musicoin or Resonate. I wanted to build something that works the other way around, and to reward music creation by the community, in the same way that STEEM blockchain already implements its reward-earning mechanism for blog posts.

Similar to DTube, any sound uploaded on DSound becomes a STEEM content, that can earn rewards for 7 days. DSound doesn't use either the title or the body of the STEEM post to store information, therefore if you don't want your sound to appear in your Steemit feed, you can edit or delete it. The sound will stay intact on DSound while it will be invisible on other applications like steemit.com or busy.org. I believe the current behavior to be correct and that it contributes to platform growth and users rewards increase.

IPFS as static file storage

This was actually the final ingredient that I got from DTube and @heimindanger… When I saw the initial DTube post I was thrilled! I had found the missing piece that I needed to finally build DSound!

In his article @heimindanger describes perfectly the IPFS protocol at a high level, so I include the following paragraph from his post that generically describes it all:

“IPFS is a protocol that enables decentralized file storage. The principle behind it is called Distributed Hash Tables (DHT). The same principle also powers the BitTorrent network. Just like how cryptocurrency uses asymmetric cryptography, DHT networks will hash contents in order to be able to identify a file. The hash becomes the identifier of a file, and it's as easy as re-hashing a file and making sure the hashes match to ensure the file that was sent to us is the original.”

IPFS is young, open-source, and actively being developed, with many bright minds working on the project. I believe it has a great future ahead. Using it as the main means of storage for this project was incredibly easy, even with such a young project.

IPFS Storage Cost

Here I faced the same difficulties as DTube. There is no magic, someone needs to seed the files, and the browser is unable to permanently store large files (local storage is limited to 50MB on most browsers), so in-browser seeding is not a solution.

My first idea was to require users to run their IPFS node locally in their computer, but it became clear after a few chats and brainstormings that this wouldn’t be a solution, as IPFS is still not easy to set up for a regular user, and there are a few open source apps that attempt to provide an easier path but they are too unstable even for testing purposes…

I still believe this solution to be the right one for DSound, and possibly DTube as well, but I would clearly need to build a desktop application, for Windows, OSX and Linux, to ease this setup process to the point that even my grandma would do it, so that it will be a plausible solution to the storage part of the equation.

But for now I needed a way for DSound to store the contents without a local IPFS node, a requirement that will not disappear and possibly will even grow as many users don’t like installing stuff, so I asked @heimindanger of DTube about it and got to chat with the owner of IPFS Store as well, which as been a great help even in trying out DSound and bug reporting. Great guy this @nannal (steem, twitter/etc), recommended!

So I ended up with the same approach as DTube, created a @dsound account and this account will be used to collect 25% of the DSound author rewards. The rates of storage are the same, but historically in STEEM video content more than doubles the rewards on music content, so I think it is fair to go with the same percentage of the author rewards, basically due to the probability that the storage / reward ratio will be probably identical.

Also part of these rewards will be used to finance the continuation of the project development, if the community finds it useful, and hire a project team if it all turns out really well.

Should one day the project is done and it may survive on it’s own without much effort in development and maintenance, and a large user base have their own IPFS nodes, then my contribution to the project will not be needed so often and the project will be open sourced and the reward sharing percentage removed.

Design and User Experience

Here I decided to have a simpler but equally intuitive approach, inspired by the leading sound sharing platform SoundCloud, as the potential users are already used to it.

I tried to have the design as clean as possible without distractions, but still showing what users care about and facilitate the usages that they require, like waveform navigation, commenting, republish and like content. Another main requirement was to make it easy to discover new music, as that is really important for DJs like myself, thus the browsing by tags and merging with top sections. I think I did fine on this for this first version, but still a lot to improve and new features to implement, as described in the roadmap below.

Browser stored data

DSound will use your browser local storage to store your user accounts and posting keys encrypted, so that you don't have to login every time. If you clean your browser stored data, you will have to login again in all accounts on DSound.

Why can't I log in with my master password or active key?

Because you simply shouldn’t do it! Steemit.com allows it solely because they also have a wallet in the application, but you shouldn’t login on Steemit.com with your password anyway, it is a bad practice. I think the worse thing a developer can deal with is sentiment of guilt cause by their users losing their money and accounts due to a security breach in his application or on a specific browser. Instead, it is much safer to only allow the use of the private posting key and limit the risks.

If you want to manage your STEEM rewards, I invite you to use Vessel. And start using only the posting key on any online platform such as Steemit.com, Busy.org, etc.

Sound processing on upload

DSound already do some needed sound processing on upload. This is required to be able to display the waveforms of sounds before downloading them from IPFS network. A typical good quality song file is around 10MB, so it could take as much as 30 seconds to display a sound waveform on the screen. This multiplied by 6 sounds per page would be insane due to the time it took and the bandwidth required for just displaying files that the user didn’t necessarily want to play anyway.

So on DSound I implemented it the other way around: at upload time DSound reads the contents of the sound file and processes it to generate the peak values for that file that will feed the waveform display. That peak data is then uploaded to the IPFS network, alongside with the original media, thus generating 2 files uploaded per sound published, not counting the cover art image.

Then downloading a 15KB peaks file is almost instantaneous, and it will only download the media file if the user wants to play it! Cool isn’t it?

Integration with other platforms

Any other STEEM based platform can easily integrate sounds posted on DSound. The sound and cover IPFS hashes are stored inside the json_metadata of the post. Then it is as easy as doing:

<video src=”https://ipfs.io/ipfs/soundhash” poster=”https://ipfs.io/ipfs/coverhash” controls></video>

or

<audio src=”https://ipfs.io/ipfs/soundhash”></audio>

Known Issues

Problematic behavior in iPad

Some weird event race on drag over the sound upload area

Found another? Please get to me on steemit.chat

Roadmap (missing features)

Search (in a decentralized way - not possible now)

Playlist sharing and playback

Playback goodies like cross-fade

Mobile app for iOS and Android

Custom Player for Social Networks integration

Sharing to Facebook, Twitter, and others

I believe the current state of the DSound is viable, even without these missing features. I will add them, slowly. Please let me know what you want to be implemented first, or other feature suggestions in the comments...

App Dependencies

DSound is built with React, and uses many open-source packages from NPM. DSound wouldn't exist without them, so they deserve some credits:

js-ipfs-api - Communication with the IPFS Network

SteemJS - Communicating with the STEEM Blockchain

autolinker - Adding links to descriptions / comments

moment - Displaying times

XSS - For displaying untrusted texts and preventing XSS attacks

Last words

The same way as @heimindanger, I am a true believer that decentralization is the future and I am trying to contribute with my share to change the world.

But I know that I will have a hard time here because competing with SoundCloud will not be an easy task! DSound will be decentralized the most I can, in order to get the project out of my direct control leaving only the domain as single centralized dependency for now.

Also I expect to have even more pressure from the Labels due to copyright infringement, although you didn’t read a single word from me about building DSound to circumvent or facilitate sharing of copyrighted materials illegally, as I am a musician and DJ myself and I comply with all copyright laws all the time.

On the other hand, I defend that the copyright laws are being misinterpreted by labels in their favor, allowing them to use their huge economic power to impoverishing 99% of the music creators, while monopolizing the 1% that they enslave with their 100 pages contracts and 360º deals and making huge profits out of those, in times that publishing is MP3 and distribution is Internet. So, labels are now marketing companies that sell their brands, and fight all others that attempt to bring something new to the world, that is not own by them!

I will never encourage the use of music without any kind of contribution to the actual guy that put in the time and creativity to turn that into a music that we enjoy! Authors also need to buy stuff on supermarkets, they don’t survive out of nothing and without them the world would be so less interesting…

What I don’t agree with is the abuse of the same laws that had in their true heart the need to defend the rights of those who make our world more entertaining, to enforce the enrichment of few and prevent us from hearing all the music created that we possibly can and enjoy it all!

For example, do you that the music of this century is based on electronic instruments and sampling? All music in the tops contains some kind of sample or sampled instrument! And the labels go after remixers and take down their content while they publish and make fortunes with other sampled songs as well?!

Also go after the small DJs and take down their work, because they are using music that they bought legally to make their sets, prohibiting them of having their work shared and get noticed by what they do best… How the heck should a DJ make a set to share without any copyrighted material in it? Does this sound sane at all?!

So DSound is NOT about facilitating the sharing of copyrighted material, but it is all about freeing the authors of the pressures of the major labels and giving them a tool that enables them to make decent living out of their creations without having to be signed to a label and enslaved their lives.

If I can help to make this happen, I will be the happiest man on this planet, because…

“Music is what feelings sound like”

@prc - 2017