Skip to content

Allow easy adding and removing of instruments #128

@estellecomment

Description

@estellecomment

Problem : I want to use ror-player with my band. For that I need to add some instruments to RoR player, and to remove others that we don't use. Currently this is not very easy to do, it is mostly coded in config.js I think, so requires editing code.

Possible Solution : move all the information about instruments into a data file, out of code files. That way the data file can be replaced and customized easily. See example below. The audio files would stay where they are I think.

Downsides :

  • This requires moving a lot of code around in config.ts, and probably add/change validation. I don't know if this is interesting to ror-player, since it's mostly useful for other bands, not the RoR community.
  • default tunes (defined in rawTunes in defaultTunes.js) use instruments, so changing instruments can break default tunes. (In this case I would vote for crashing the app when validating defaultTunes, rather than display tunes with missing instruments) I think it would also be useful to move defaultTunes to a data file, to make it easier to check : Move rawTunes to a separate data file #127

--
Example (it can be discussed, it's a general idea) :
In assets/instruments.json :

{
  "ls": {
    "name": {
      "en": "Low Surdo", // should this live in assets/i18n/en.json instead ? Depends what you prioritize...
      "fr": "Surdo grave",
      // etc.
    },
    "strokes": {
      "sil":{
        "key": "s", // could swap "sil" and "s" if it's better
        "audio": "assets/audio/ls_73.mp3",
        "description": {
          "en": "Silent stroke", // same here : in assets/i18n/en.json instead ?
          "fr": "Coup silencieux",
          // etc
        },
      },
      "rim":{}, // etc.
    },
    "volumePresets": {
      "default": 0.7,
      "Shitty speakers": 1
    },
  },
  "ms": {}, // etc.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions