MIDI->OSC-> Pulsar editor line evaluation

Hello, I have a MIDI footswitch I'm trying to get use to evaluate the currently selected line in the Pulsar editor.

I'm following the docs here GitHub - tidalcycles/pulsar-tidalcycles: Pulsar plugin for TidalCycles but I'm very very new to both Tidal and Haskell so I may be overlooking something obvious:

My SuperCollider code looks like this:

~osc = NetAddr("127.0.01", 6010);

MIDIFunc.cc({arg src, chan, num, val;
    if (src == 127, {
         ~osc.sendMsg("/pulsar/eval", \type, "line");
    });
);

When I trigger the footswitch I see an error message in Pulsar (which is very encouraging!):

Unhandled OSC: Message {messageAddress = "/pulsar/eval", messageDatum = [AsciiString {d_ascii_string = "type"},AsciiString {d_ascii_string = "line"}]}

I've used ChatGPT and am not getting such great info, looking at the source and Issue history of the Pulsar Tidal packages is helpful but I'm missing something still. Thanks for your advice!

i think you are sending to the wrong osc port,
you are currently sending to the tidal stream, which cannot handle editor things.

default port of the pulsar plugin seems to be 3333 :slight_smile:

Ahh this makes perfect sense as it was in the docs but I don't actually see any response whatsoever when changing my code to this port...

I have updated the following startup code:

		~osc = NetAddr("127.0.0.1", 3333);

		MIDIFunc.cc({arg src, chan, num, val;
			if (src == 127, {
				"hello midi".postln;
				~osc.sendMsg("/pulsar/eval", \type, "line");
			});
		});

I definitely see "hello midi" messages printed but pulsar shows no reaction.

hmm ok, i don't know too much about the pulsar plugin so i will just tag @ndr_brt and hope he can help you out :slight_smile:

1 Like

Have you enabled the "osc eval" in the plugin configuration?
You should see a log line like "Listening for external osc messages on ..." In the pulsar tidalcycles console when you start the plugin, otherwise that feature is not enabled.

1 Like

@ndr_brt thanks that was it!!!!