Hey everyone. I played around with Overtone and SC. I want to now actually use this. Do you have setup ideas? What would work best for me, for example, would be using the overtone instruments in a DAW. I will probably use MIDI through a DAW. Maybe even directly connecting USB instruments to Overtone.
is there some way of having casa.jack.midi, feed the java midi event system? because i found java midi to not work great, and casa.jack.midi in contrast worked great. This is on my hacky linux system so other people might of course have much better experiences with ajva midi
I'm fairly sure it's possible to have custom providers for java midi, it would probably make more sense to do that as a java lib though directly based on jni-jack
I'm currently using the casa.squid.jack library (the one mentioned by Joakim's thread). I think, in the future, it will be easier for me to have live sessions with real midi controllers than programatically creating patterns. I set up hydrogen with overtone for the moment, very basic setup. After I'll be able to comfortably control instruments, I'll have multiple channels with effects.
tnx
For reference • https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html • https://docs.oracle.com/javase/tutorial/sound/SPI-providing-MIDI.html
basically you create a subclass of MidiDeviceProvider, and then add some files on the classpath under META-INF/services that allow javax.midi to discover your provider
Depends what you want to get out of it, but I would start with just overtone and get comfortable with it before bringing in a DAW. it's already a lot, and you may find you don't really need the DAW. You can definitely connect midi instruments to overtone. It's actually gotten easier thanks to the new event handlers. I'll see if I can point you at an example.
Overtone has midi handling built-in. It's based on Java's midi support, which does have some limitations, but I would start with that, since using casa.squid.jack directly is quite low-level.
Here's an example of hooking up something like a midi keyboard that sends both note-on and note-off messages.
(require '[overtone.core :as o])
(defn midi-preview
([synth-key synth]
(midi-preview nil synth-key synth))
([ch synth-key synth]
(let [voices (atom {})]
(o/on-event [:midi :note-on]
(fn [{:keys [note channel]}]
(when (or (nil? ch) (= ch channel))
(swap! voices assoc note (synth :note note))))
[synth-key :on])
(o/on-event [:midi :note-off]
(fn [{:keys [note channel]}]
(when (or (nil? ch) (= ch channel))
(o/ctl (get @voices note) :gate 0)
(swap! voices dissoc note)))
[synth-key :off]))))
(defn midi-preview-off [synth-key]
(o/remove-event-handler [synth-key :on])
(o/remove-event-handler [synth-key :off]))
(definst foo ,,,,,,) (midi-preview foo foo)
to remove the event handlers: (midi-preview-off ::foo)
here's an alternative version that uses (event :note ,,,) instead of calling the synth directly
(defn keyboard-insts [& insts]
(on-event [:midi :note-on]
(fn [{:keys [note channel velocity] :as e}]
(when-let [inst (get (vec insts) channel)]
(event :note :instrument inst :midinote note
:overtone.studio.event/key note
:end-time nil
:amp (* 1.5 (/ velocity 128) @(:value (param inst "amp"))))))
::midi-on)
(on-event [:midi :note-off]
(fn [{:keys [note channel] :as e}]
(when-let [inst (get (vec insts) channel)]
(event :note-end :instrument inst :midinote note
:overtone.studio.event/key note
:end-time (now))))
::midi-off))this one works a bit differently, you pass it a bunch of synths, and it will bind them to separate midi-channels