Skip to content

Add Json #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 120 commits into
base: main
Choose a base branch
from
Open

Add Json #110

wants to merge 120 commits into from

Conversation

woodenplastic
Copy link

Hi,

I was very happy finding your repo. I use the data in my app so import as a json was easier and had a smaller file size.

I wrote a parser that runs in the github actions so the json file is automatically generated.

As i use your database for my app im looking forward to commit all devices i research to your repo.

Please let me know what you think about that, i happily commit changes.

Best
Woodenplastic

@benjaminfox
Copy link
Collaborator

Thanks for contributing back! This is a huge contribution. I like your JSON solution too, very tidy. Want to share the name of the app you're building? I'll link to it if you like.

@woodenplastic
Copy link
Author

Im glad you like it. Here and there the data is for sure not perfect. But for the moment it is a start.

Thanks a lot for the shoutout dude, but im still so deep in development that i dont want to show... would love it at a later point in time if i could come back to it.

@woodenplastic
Copy link
Author

woodenplastic commented Mar 29, 2025

If Its alright for you you could merge. I will not work for the next month on the devices i guess. i have some data to sort out but i have a list having around 600 devices from 150 brands. The gzipped Json has around 400kb. I think it would be a good idea for you to think about changing to Json as we could make it much easier this way.
I also found some devices being incomplete (especially the elektron devices should be as good as we can make them). My PR should solve that.
Let me know if the new Json format ist suitable for you.

@benjaminfox
Copy link
Collaborator

Sorry for the delay, it'll take me a while to go through it all!

I think it would be a good idea for you to think about changing to Json as we could make it much easier this way.

JSON is definitely a better format for consumption by apps/APIs. A major goal of the project is to allow non-programmer musicians & synth tinkerers to contribute with the software and knowledge they already have. CSV is great for this since most people have Excel / Numbers and already have some idea about how to use them.

I really like your solution of a github action that automatically produces JSON, since it lets the project preserve the goal of accessibility to non-programmers while improving accessibility to programmers.

I also found some devices being incomplete (especially the elektron devices should be as good as we can make them)

Definitely :) Feels like the elektron definitions are never finished.... 🥲

@woodenplastic
Copy link
Author

Hi, yes i understand the community part. Youre right there. Im playing with also generating a complete .csv for all devices so you can just drop it into a database.
I will try to make the reverse happen also, so a big json can be split into the .csvs
For that to work we need to harmonize your .csv template to my json, so a reformat has to be done.
Are you comfortable with me requesting These things? I dont want to hijack your repo...

@dr-schlange
Copy link

Hey, I'm just popping in the conversation, but definitely the JSON format is nice to have here, and even in non web-application it can be usefull. I'm working on this project which is a library/platform in Python to let you access in a simple way to your MIDI device, and map them in various way (and more). The way to describe the interfaces is currently really simple, but remains programmatic at the moment. Thanks to your repository, I can take the JSON files and generate the interface for almost all the devices that you have in your repository!

Additionally to the JSON format, I was thinking about providing a CSV (or JSON?) to YAML converter: YAML is less verbose than JSON, and easier to write. I will probably use YAML configuration in my project also to generate in memory or on disk configuration/API for new devices, perhaps it might be helpful to have also YAML files here?

@woodenplastic
Copy link
Author

woodenplastic commented Apr 4, 2025

There is another project that uses yaml for the devices. At the moment im parsing it all up in one big file. The differences in spelling driving me nuts. From that point it can translate from every form to all others and all commits of every project would be updating everywhere.
To prevent feedback loops i see two options: i build a central parser/database or we make this project the star. This project had contributes before so i dont want to make something new but push this. For that a plan would be cool to make it transparent and define goals.

https://github.com/woodenplastic/Midi-Device-Database

Lets get this midi mess fixed, im tired of reading wrong info in forums.

@dr-schlange
Copy link

dr-schlange commented Apr 5, 2025

Nice! All in one file is a little bit too much for my project though :D. I guess a good organization of the files as it's done here + render on a github.io domain with all the pages as it's done right now + possibility on the same path to access the json/yaml file should be enough no? I mean, people will look for a device they know, probably starting by the brand, I'm not sure it makes sense to have a DB. A parser as you did wrapped in a github action that triggers on PR merge and detects if a CSV, a JSON or a YAML file have been proposed as PR.
However, it means that to contribute, you need to have a github account, which is perhaps not ideal.

EDIT> I wrote a quick YAML converter and Python code generator which targets my lib/platform. There is some convertion in the names generated for the YAML so it fits well with Python though, but that's a first PoC.

@woodenplastic
Copy link
Author

Ok. So lets make a plan:

  1. Complete files with all devices and brands in json, yaml and csv.
  2. File per device in brand folders in all 3 data types.
  3. Auto update from open sources
  4. Community commits come in from different open source projects in their beloved data format, get parsed and the rest of the projects get auto updated.
  5. Id like to combine all and then commit to all projects the same data points.
  6. My repo just does parsing and updating.

Good?

@dr-schlange
Copy link

It does sound good, but just to be sure I understood everything, what's the terminology here? By open source projects, you refer to any project that would propose a midi device description/configuration in form of csv, json or yaml?

What would be your recommendation or opinion @benjaminfox? I'm basically jumping in the conversation, so I don't want to modify or interfer with what was going on or what you guys had in mind already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants