muse-sequencer / muse

MusE is a digital audio workstation with support for both Audio and MIDI
https://muse-sequencer.github.io/
Other
657 stars 70 forks source link

Export single MIDI track. #1116

Closed onefang closed 1 year ago

onefang commented 1 year ago

I'm using OddVoices for synthesized singing. It can use a MIDI file that has MIDI Lyric type events. I can add those using MusE's "Insert meta event" button in the Events list.

The problem is that there are other MIDI tracks, and exporting MIDI files exports the entire set of MIDI tracks, not just the one I want to export, and OddVoices can't deal with that. On a big project that also wastes time and storage.

So I would like to select a single MIDI track and only export that track. Then I don't have to keep separate .med files for each vocal part, but keep the entire piece together on one project.

I did look at the MIDI scripting, but it doesn't look like it can deal with MIDI Lyric event types, so I can't just write a script to turn one track into singing audio. So even if I could export just one MIDI track, I still need to do several extra steps - feed the .mid track into OddVoices, insert the resulting audio track back into MusE.

onefang commented 1 year ago

Actually I should have said "MIDI part", so I can have several parts on one track, verses, chorus, intro, outro, etc. but treat them separately for the singing.

terminator356 commented 1 year ago

Hi. In the master branch I have pushed two new menu items in the 'File' menu: "Export Selected Visible Tracks To Midi File..." As the name implies, the tracks have to be visible (the 'visible tracks' toolbar) as well as selected. "Export Selected Parts On Visible Tracks To Midi File..." As the name implies, the tracks have to be visible (the 'visible tracks' toolbar) as well as the parts selected.

Give them a try.

We'll likely want to add a right-click Arranger context popup item when clicking on a part, which does the same thing as the main menu item. Something like that...

onefang commented 1 year ago

Good timing, as I just started my weekend (I live in the future, er I mean Australia) and it's time to make some music.

Alas it segfaults after "-> 12:08:06.881 Scan plugins..." I even tried ./muse4 -N -S -I -2 -p -C -d

onefang commented 1 year ago

I deleted everything in my "Cache path for plugin scan", and it got a little further before falling over -

./muse4 -N -S -I -2 -p -C -d -D

...

checkPluginCacheFiles: readAllPluginCacheFiles() failed -> 12:11:46.207 Init audio... Muse: using unoptimized non-SSE dsp routines ./muse4: symbol lookup error: ./muse4: undefined symbol: _ZN8MusECore13MidiPlayEventC1Ev

Note that I'm running it from the src/build directory, I haven't installed it yet.

onefang commented 1 year ago

OK, actually installed it and now it works fine. Sorry for the noise.

Now to actually test this new feature that I requested, then spend the rest of the day finding out what "Spring 2023 large fixes and features" are. Though here in Australia it's autumn.

onefang commented 1 year ago

Sooo, I tried both new options on my big project. Exported three MIDI files, using both new menu options, one was with two parts on different tracks selected. Tried to load the parts without closing my big project, which crashed as usual.

Started MusE again, loaded the first test MIDI, looked at the event list, all my lyrics and notes where in there, all good.

Tried to load the second test MIDI file, my entire Muse directory has been DELETED! Insert lots of extreme swearing here!!!@#$%^&*(){}|~!!!

onefang commented 1 year ago

Oh phew, it's just the Muse symlink bug got worse. My Muse directory is still in /media/Muse, complete with all my hard work, just no more symlink into my home directory.

/me backs it up. lol

onefang commented 1 year ago

Actual results now that I can find the exported MIDI files again are OK.

"We'll likely want to add a right-click Arranger context popup item when clicking on a part, which does the same thing as the main menu item. Something like that..."

That suggestion works for me.

Thanks for adding this feature.