Tag Archives: MIDI

Controlling a Meeblip from Reaper with a JS effect

I recently purchased a Meeblip because I wanted a project to work on with my maker friends that I get together with every week. I decided to buy the full build-it-yourself kit, which meant I was in for a fair amount of soldering and so forth. Anyway, that all finally came together and I plugged it into my computer to see if I could control it with a MIDI track in Reaper. Yup! You sure can!

However, what you can’t do is create an envelope for any old MIDI CC message. You can put CC messages into the MIDI clips themselves, but that’s not very conducive to doing the kind of automation I’m used to doing with bass synth VSTs. It turns out that Reaper comes with a JS effect called MIDI_CCRider, which allows you to put an LFO on any CC message you want. I was able to look up which CC message was filter cutoff for the Meeblip and automate it using that effect. But this was not great because it meant that I’d need an instance of the effect for every parameter I wanted to control and that I’d have to constantly remind myself which CC messages controlled which parameters of the synth. So, instead, I decided to use that effect as the basis for a new JS effect that would have all that information baked into it and simply give me a bunch of sliders and combo boxes labeled the same as on the Meeblip. And voila:

The effect only sends a CC message when the value of a slider changes. This means that you can use it to set some initial values and then play with the knobs on the Meeblip while you loop a bassline. Only parameters of the effect that you choose to automate with an envelope will be constantly overridden. If you’d like to try it out with your Meeblip, you can grab it from Github: https://gist.github.com/3606021

Java Sequencer Quirk

I’m working on a music app that involves using Midi to trigger audio. Yesterday I wound up in a situation where after adding a new Track to my Sequence, I wasn’t receiving any of the MidiEvents that I added to the track. The problem, it turns out, is that the default Java Sequencer appears to cache all of the Tracks in a Sequence when you initially set the Sequence on the Sequencer using the setSequence method. If you modify the Sequence itself, as opposed to modifying the contents of the Tracks in the Sequence, the Sequencer won’t know about it until you call setSequence again. Just thought I’d throw this little tidbit out there, in case someone else runs into the same problem. Here’s some code to illustrate my point:

[snip java]
// make a sequence
Sequence s = new Sequence(Sequence.PPQ, 4);

// make a track in the sequence
Track t = s.createTrack();

// add midi events to the track
// …

// make a sequencer
Sequencer seq = MidiSystem.getSequencer();

// at this point, we can modify the Track
// and the Sequencer will pick up those new notes
// but if we do this:
Track t2 = s.createTrack();
// and then add notes to this track
// the Sequencer will NOT play these notes
// because it doesn’t know about the track we just created
// now the sequencer will play the notes in the track we just created.