Is there a way to print and save/load files through p5?

edited March 2017 in JavaScript Mode

I am beginning a project for my guitar/drum teacher where I intend to create a program in p5 which I can put on to a website where my client can create, view, or edit simplified guitar and drum patterns. To do this properly however there are a few functions which I am not sure about. I need to be able to print out a physical copy of the pattern and I also need to be able to save and load patterns while this whole program is on a website. So would I be able to do it and would I be able to do it, and how would I go about doing it?

Answers

  • edited March 2017 Answer ✓

    Are you familiar with the data format "JSON"? I might suggest coming up with a way of encoding the guitar patterns in JSON format. This is easy to load with loadJSON(). There is also saveJSON() but that just downloads direct to a client computer. You may need to investigate server side programming if you want to have a site with accounts and data saving.

  • Answer ✓

    Maybe you want to explore existing APIs. For example, I found this one: http://www.guitarparty.com/developers/ and then go to "start hacking".

    Are you familiar with web APIs? Check @shiffman's fantastic videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6a-SQiI4RtIwuOrLJGnel0r

    There must be another series that could be more relevant, specially on the server side. I am sure @shiffman could recommend any of his other series as I am not familiar with all his repertoire.

    Kf

Sign In or Register to comment.