SynthMaker

Tickless MIDI for Reaper (Experimental)

Archive · 2011 8 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

trogluddite ·

Following nix's experiments using an external trigger generator to generate extra fast ticks, I wondered whether Reaper's JS plugin language could be used for something similar. (For those who have never heard of it, Reaper is a very cool - and very cheap - sequencer/DAW, I highly recommend it)

My take on this actually works the opposite way to nix's - I've made an SM module that encodes MIDI into a mono stream that can be sent to a VST plugin's audio output. A JS plugin is then inserted after the SM one in the Reaper track, and converts the audio back to MIDI, which can then be routed wherever you like in the Reaper project.

The JS plugin will give precisely one buffer of latency (same as your soundcard setting), but the latency will be constant (i.e. no jitter), and in principle the 'stream MIDI' could send one MIDI message per sample.

Very experimental at the moment, but I will try to make a little sequencer and an example Reaper project later as a proper demonstration. For now, here is an .osm with the raw components. The source code for the JS plugin is in a text box in the schematic, along with instructions how to create the Reaper effect from the code (simple cutting and pasting).

PS: DO NOT connect the 'MIDI to Audio' encoder to an audio output that you can hear - the encoded MIDI stream consists of short pulses of 'audio' at over 130dB above clipping!!. The JS plugin will mute the audio output when it is in series within a Reaper track.

nix ·

That's an interesting idea trog. Thanks for the lead 🙂

DigitalWhiteByte ·

mmmm ... so This idea makes me think that you could use the same technique to build a generator LTC to MTC and vice versa. Reaper can create an item with a LTC audio time code, (Insert -> SMPTE LTC / MTC Timecode Generator). Possible?

trogluddite ·

DigitalWhiteByte wrote: This idea makes me think that you could use the same technique to build a generator LTC to MTC and vice versa

He he, when I wrote the little warning about not playing the signal through speakers, it instantly reminded me of the sound of accidentally patching a tape sync signal into the monitors - the ultimate 'glitch' music!!

So yes, I guess LTC should be possible (it's a long time now since I had to sync a sequencer to tape, I don't remember how the coding works, some sort of DTMF I guess.) I need to spend a little more time exploring the JS script - this was my first JS plugin, but it seems very powerful (even has built in FFT functions etc.)

The idea for using streams partly came about from messing with an old Korg MS10 with its mini patch bay - it struck me that the audio channels in a DAW are just 'patch leads' carrying numbers; they're not actually sounds until you send them to your speakers. As long as gain is 0dB, all the audio paths in a DAW pass numbers perfectly unchanged. So I figured, why not pass 'control voltages' using the audio routing, just like on an analogue modular synth. I've also been experimenting at using it for sychronising multiple looping plugins by sending a clock 'ramp' between them - none of the DAWs I've used have good enough real-time control over tempo for what I want to do. It's the main reason I changed to using Reaper - the routing of audio and MIDI is massively versatile, reminds me of the days when I had a rack full of 1/4inch patchbays.

trogluddite ·

OK, here's my first demo plugin using the 'Stream-to-MIDI' converter for Reaper - it's not flashy, but it demonstrates that the concept works reliably.

It's a very simple MIDI Looper. When you start playing notes on your keyboard it starts recording into a 10sec buffer - press the play button to start the buffer playing back (buttons have MIDI CC control too). There's no attempt at tempo synchronisation or anything else fancy yet - but now that the data is in stream form, I'm hoping I can adapt my audio looper project to add a host of useful functions quite quickly.

To use it, export the VST to your usual folder (and create the JS plugin if you didn't try my previous example), then open Reaper and create a new track. Insert the Looper plugin into the first FX insert. Insert the JS 'Stream-to-MIDI' into the second slot (source code and instruction are in the .osm if you need it). Then just add your favourite synth plugin to the third slot (make sure it responds to MIDI channel 1).

The buffer is eight note polyphonic, so it will record and loop chords OK - you can also transpose the notes, and scale the velocity during playback. No pitch bend or controller recording yet - that's next on my list.

DigitalWhiteByte ·

interesting experiment, maybe this tool can be useful in the development.

On-Line Demo

http://forum.cockos.com/showthread.php?t=46286

trogluddite ·

Many thanks DWB 😀 - that's an excellent tool - not just a cool way to make JS plugins, but an excellent tool for learning the language too!

DigitalWhiteByte ·

is always a pleasure 😉

His old name was axonlib now holos.

this is a library that allows you to convert your js plugin in vst, I still have not experimented, honest, but I saw some interesting projects, unfortunately only in windows and linux VST formats

Here are some examples http://cernthskei.wordpress.com/

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.