Giter Site home page Giter Site logo

0xpetra / eru Goto Github PK

View Code? Open in Web Editor NEW

This project forked from latticexyz/mudbasics

0.0 1.0 0.0 10.4 MB

Basic mud reference implementation (contracts + phaser client)

License: MIT License

Shell 0.76% JavaScript 0.29% TypeScript 79.91% HTML 0.49% EJS 1.79% Solidity 14.56% CSS 2.20%

eru's Introduction

๐ŸŽ› Eru

Eru is a music layer to enable devs to create tools, and help melomaniacs and fans compose, remix and share music in an open and interoperable way.

eru-readme

Entity Component System

Entities

  • Sound
  • Track
  • Sample

Component Details

  • EruMetadataComponent is Component
    • Name and authors
  • SoundUriComponent is StringComponent
    • URI of music binary (IPFS, etc)
  • TrackConfigComponent
    • entityId of the sound
    • unordered array of positive integer values representing the number of miliseconds after the beginning of the track to play the Sound
  • SampleTracksComponent is Uint256Component
    • Track entity IDs that are part of the sample

Systems

  • struct EruMetadata
    • name: string
    • authors: string[]
  • setSoundEntitySystem(soundEntity, uri, eruMetadata)
    • soundEntity.SoundUriComponent = uri
    • entity.EruMetadataComponent = eruMetadata
  • struct Tracks
  • setSampleEntitySystem(soundEntity,
  • setSampleEntity(sampleEntityId, tracks
  • SetSoundForTrack(trackEntity, soundEntity)
    • trackEntity.TrackSoundComponent = soundEntity
  • SchedulePlayForTrack(trackEntity, msAfterStart)
    • trackEntity.TrackTimingComponent.append(msAfterStart)
  • AddTrackToSample(sampleEntity, trackEntity)
    • sampleEntity.SampleTracksComponent.append(trackEntity)
  • RemoveTrackFromSample(sampleEntity, trackEntity)
    • sampleEntity.SampleTracksComponent.remove(trackEntity)

Deploy contracts

From the contracts folder run:

yarn mud deploy --deployerPrivateKey <PRIVATE KEY> --deployClient --netlifySlug <SLUG> --netlifyPersonalToken <PERSONAL TOKEN>

Test serverless functions locally

Run netlify functions:serve from the client directory.

eru's People

Contributors

0xpetra avatar alvrs avatar davidkol avatar kooshaba avatar lucasgleba avatar ludns avatar marvinmarnold avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.