Skip to content

MIDI files from the browser: onto the track dropped on, onto the piano roll, previews play once - #97

Open
marcin-koziol wants to merge 2 commits into
BurningTreeC:mainfrom
marcin-koziol:browser-midi
Open

marcin-koziol wants to merge 2 commits into
BurningTreeC:mainfrom
marcin-koziol:browser-midi

Conversation

@marcin-koziol

Copy link
Copy Markdown

Three things that made MIDI files in the media browser awkward:

  • A MIDI preview looped every time. It now loops only when the file is a whole number of bars long (the same test audio loops get), and selecting a file that is still being heard no longer starts it again from the top. A drum pattern clicked once plays once.
  • A MIDI file could not be dropped on an existing instrument or MIDI track. The arranger only took drops on audio tracks, so dropping on an instrument track did nothing, while dropping on an audio track made a new track. Now the first part of the file lands on the instrument/MIDI track it was dropped on (any further parts go on new tracks right below it). Audio files still go on audio tracks.
  • The piano roll took no drops. A MIDI file dropped on the notes, from the browser or from outside, becomes a clip on the edited track at the drop point (snapped to the grid), and the editor shows that clip.

Tests: beats_loop cases in the browser unit tests, a_file_dropped_on_an_instrument_track_lands_on_it (session), a_midi_file_dropped_on_the_notes_becomes_a_clip_shown_here (piano roll).

🤖 Generated with Claude Code

outi and others added 2 commits November 23, 2026 22:46
…s loops

A MIDI file dropped on an instrument or MIDI track (from the media browser
or from outside) goes onto that track instead of a new one; dropped
elsewhere it gets new tracks as before. Sounds still land on audio tracks
only.

A MIDI file's preview goes round only when it is a loop (its last event
on an even number of beats, as audio loops are told), so a groove with a
tail plays once. A click on the file still being heard (to drag it, say)
no longer starts its preview again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rack

Files dropped on the piano roll's notes (from the media browser or from
outside) are placed on the shown clip's track at the time under the
pointer, as if dropped on that track in the arranger: a MIDI file
becomes a clip there, and the editor shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants