cienicera / Koji

The First Onchain Generative Music Library. Deployed on Starknet
9 stars 12 forks source link

feat: Cairo to JSON #31

Open caseywescott opened 1 year ago

caseywescott commented 1 year ago

A suite of functions mapping Cairo Midi msgs to JSON object for web retrieval.

Functions that format the following messages to JSON:

NOTE_ON
NOTE_OFF
SET_TEMPO
TIME_SIGNATURE
CONTROL_CHANGE
PITCH_WHEEL
AFTER_TOUCH
POLY_TOUCH

These functions can then be used create a function 'midi_to_json' that iterates through Midi msgs and formats them to create the complete JSON object.

caseywescott commented 10 months ago

I'm cobbling together a rough cut of cairo-to-json Here. I have all of the necessary components for each message but need to serialize the values. Would a ByteArray be best? I took a quick look at the 'format!' macro and am hoping that could do the trick to simplify the code but I think it's unavailable in scarb/cairo 2.3.0. Have you used 'format!' for serializing?

vibenedict commented 8 months ago

Hi @caseywescott , I would like to try this out.

caseywescott commented 8 months ago

Go for it!!!

On Sat, Mar 23, 2024, 6:56 PM Victor Benedict @.***> wrote:

Hi @caseywescott https://github.com/caseywescott , I would like to try this out.

— Reply to this email directly, view it on GitHub https://github.com/cienicera/Koji/issues/31#issuecomment-2016401912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWPRSH3HJ66CJSSNM4KGNLYZUYSPAVCNFSM6AAAAAA7LGZQEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGQYDCOJRGI . You are receiving this because you were mentioned.Message ID: @.***>

caseywescott commented 8 months ago

I'll assign to you when when i get home in 30mins

On Sat, Mar 23, 2024, 10:08 PM Casey @.***> wrote:

Go for it!!!

On Sat, Mar 23, 2024, 6:56 PM Victor Benedict @.***> wrote:

Hi @caseywescott https://github.com/caseywescott , I would like to try this out.

— Reply to this email directly, view it on GitHub https://github.com/cienicera/Koji/issues/31#issuecomment-2016401912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWPRSH3HJ66CJSSNM4KGNLYZUYSPAVCNFSM6AAAAAA7LGZQEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGQYDCOJRGI . You are receiving this because you were mentioned.Message ID: @.***>

caseywescott commented 8 months ago

Just Assigned to you @vibenedict !!! Stoked! Let me know if you have any questions!!