cienicera / Koji

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

feat: Implement Multitrack Midi Functionality #41

Open caseywescott opened 8 months ago

caseywescott commented 8 months ago

Feature Request

Multi-track MIDI support to enable the creation and manipulation of MIDI containing multiple tracks.

Key Features:

Track Management: Include functionality to create, delete, and modify multiple tracks within a MIDI file. Users should be able to specify the name and properties of each track, such as instrument assignment, channel, and MIDI channel messages.

Event Sequencing: Each track should support the sequential arrangement of MIDI Messages, allowing users to define the timing and order of events within the track. This includes note-on/off messages, tempo changes, time signature changes, control changes, pitch wheel movements, aftertouch messages, and polyphonic aftertouch messages.

Instrumentation: Users should have the ability to assign different MIDI instruments to each track, specifying the instrument's bank and program change messages. This enables users to create multi-instrument compositions and orchestral arrangements.

Integration with Cairo Transpilers: The feature should seamlessly integrate with Cairo transpilers, allowing users to convert Cairo code or data structures into multi-track MIDI.

Xaxxoo commented 8 months ago

Please assign this to me.

Xaxxoo commented 8 months ago

Hi @caseywescott could you please elaborate on this?

Xaxxoo commented 8 months ago

Screenshot 2024-03-22 at 13 19 33

Are we looking something like this?

caseywescott commented 8 months ago

Hey @Xaxxoo This is more for the react MIDI player issue: https://github.com/cienicera/Koji/issues/40

This would be great! If it's too complex then you could choose a much simpler pattern to fork and that would be all good.

It would be great to be able to do any of these:

Be able to upload a midi file to a cairo contract. Read a Cairo contract and get the MIDI, potentially via the transpiler:

https://github.com/cienicera/Koji/pull/38

Let me know what you think you think.

Xaxxoo commented 8 months ago

I thought for #40 what is needed is a simple react page that gives input field to upload a midi file and have it played like this. Screenshot 2024-03-22 at 16 25 11

caseywescott commented 8 months ago

@Xaxxoo That looks great for number 40 - pasting a cairo contract address into that 'Add a midi file address to play it' to play the song would be great.

For this issue I was initially thinking about Multitrack functionality of the MidiTrait itself. But now thinking about it, if you could make that multitrack player so that you could have a similar behavior to feature 40, where a user could paste a cairo contract address into that and 'Add a midi file address to play it' to load the song into the UI and play the song would be great!