helio-fm / helio-sequencer

Libre music sequencer for desktop and mobile platforms
https://helio.fm
GNU General Public License v3.0
3.09k stars 115 forks source link

Midi Out #139

Open jiDOK opened 4 years ago

jiDOK commented 4 years ago

Hi, awesome project! I really would like to use Helio as a way to sequence external synths. Is it possible to send the note and velocity data out a normal midi jack of an external sound card? I found the "MIDI Output" in the settings of a loaded VST plugin, but no way to configure the port etc. Thank you! J

falkTX commented 4 years ago

There are a few plugins out there that allow you to send MIDI from the host to physical or virtual devices. So it is already possible to do this, it is just not integrated directly into helio.

adadu commented 3 years ago

Agreed, the project seems great, but I've also been puzzled as to why this wouldn't be integrated into the app. I will search out plugins to handle this as you suggest.

io7m commented 3 years ago

What are these mysterious plugins?

tinkerlevu commented 3 years ago

The only thing I've found so far is https://github.com/RomanKubiak/ctrlr

But both helio and carla don't seem to recognise it on my system.

tinkerlevu commented 3 years ago

OMG OMG..! I FINALLY Found Something That Works!!!

https://github.com/falkTX/JackAss

(its only for Jack Audio soo...) ¯\_(ツ)_\/¯

Cris-- commented 3 years ago

Native MIDI out of Helio would be great!

stbernhard commented 3 years ago

How can midi out be obtained on iPad and MacOS? MIDI in is found by usb but out not. It would allow me to use my Synth, Helio would then be perfekt for me

d01010101 commented 2 years ago

After I finally found out a microtonal piano roll, it turned out that is has no MIDI out. But it's there where the microtonality is implemented in my case. This app looks great but useless for me because of such a trivial detail.

d01010101 commented 2 years ago

There is a VST called Ctrlr but Helio refuses to recognize it under Ubuntu.

d01010101 commented 2 years ago

I guess that the built-in instrument could be a good base for a new one which would simply forward to a system port the MIDI ON/OFF messages.

There are two source files BuiltInSynthAudioPlugin.cpp and BuiltInSynth.cpp which look like an interface and an implementation, respectively. The first one calls renderNextBlock(AudioSampleBuffer&, MidiBuffer&, int, int). The called method is a part of JUCE/Synthesizer. The built-in instrument does not override it, but instead renderNextBlock(AudioBuffer& outputBuffer, int startSample, int numSamples), possibly called via the first mentioned method in order to obtain audio samples.

Maybe, it would be enough to override renderNextBlock(AudioSampleBuffer&, MidiBuffer&, int, int) instead and make it write to a hardware port. Which in turn seems easy enough: JUCE/handling midi events.

peterrudenko commented 2 years ago

Please check the development build, I've added this option in the audio settings section:

send-midi

If you want to forward MIDI messages to the device without using any audio plugins inside the app, you'll need to set up an instrument, which acts as a proxy: first, create an instrument from any available plugin (e.g. the "Helio Default" one), go to routing page, remove the central node and connect the "Mini In" node directly to "Midi Out" node. Then assign this instrument to your track(s).

midi-in-midi-out

Not super convenient (hopefully I'll come up with some simpler approach someday), but this way you'll be able to map the MIDI keyboard in any way you want, or create several instruments with different MIDI mappings to be used in different tracks.

If I'm missing anything here, let me know.

d01010101 commented 2 years ago

I had problems compiling on Ubuntu 20.04.

Apart from the dependencies listed in Basic build instructions, also the packages juce-modules-source and libtsl-hopscotch-map-dev are required. This still produces ../../Source/Common.h:56:10: fatal error: ../../ThirdParty/HopscotchMap/include/tsl/hopscotch_set.h: No such file or directory so the respective include statements should be changed to #include <tsl/hopscotch*.h>. But then, a lot errors which looked like version mismatches were produced, for example

Compiling UnityBuild.cpp
In file included from ../Projucer/JuceLibraryCode/UnityBuild.cpp:11:
../../Source/Core/../../Source/Core/Audio/BuiltIn/BuiltInSynthAudioPlugin.cpp: In member function ‘virtual void BuiltInSynthAudioPlugin::fillInPluginDescription(juce::PluginDescription&) const’:
../../Source/Core/../../Source/Core/Audio/BuiltIn/BuiltInSynthAudioPlugin.cpp:36:17: error: ‘class juce::PluginDescription’ has no member named ‘uniqueId’
   36 |     description.uniqueId = description.name.hashCode();
      |                 ^~~~~~~~

So for now, I cannot check if the upgrade works in Ubuntu, but I guess it does and as of me, it probably solves the problem.

peterrudenko commented 2 years ago

@d01010101, the repo has a couple of submodules, which you need to initialize/update first (or just clone it with --recursive flag). Also fwiw, here are pre-built binaries of the development branch: https://ci.helio.fm/helio-dev-x64.AppImage https://ci.helio.fm/helio-dev-x64.tar.gz