^^ crow strategies: Just Friends

Yeah! Let me try that next. I have power cycled but not with the i2c unplugged.

I’ll report back.

Thanks!

Disconnecting i2c worked!

Is there a way to prevent this from happening? Would love to leave the jumpers permanently connected. Seems like JF gets hung up after speaking with crow

This is best fixed on the norns script side of things.

Just Friends waits to be told to enter synthesis mode and it will stay there until you tell it to leave. Norns scripts can run a function when they are closed, so authors need to add the ‘tell JF to exit synthesis mode’ to that part of their scripts. At this point there’s probably a number of scripts that need this change, so I’m not sure the best way to go about it.

For scripts with ‘JF’ as an option for the output parameter, it should require adding:

function cleanup()
  if params:get("output") == 5 then
    crow.ii.jf.mode(0)
  end
end
4 Likes

for debugging, you can enter crow commands in the norns repl in maiden. Just type:

crow.send("your_crow_command_in_quotes")

If you type something that causes crow to spit out standard out, it will show up in the repl output too

1 Like

Is this a concern when using Crow to put JF into synthesis mode?

@Galapagoose yeah that was what I expected would be your answer. It would be highly useful if it was easy for people to update JF output crow/Norns scripts. Maybe add the info to the docs. I’m sure I’m not the only user here who is using JF in standalone sometimes as well as with crow/Norns.

@jlmitch5 sorry, I’m not sure if I’m following. Are you saying I can potentially “reset” JF or stop it from listening to i2c messages using maiden?

I can potentially “reset” JF

yep! crow.send("crow.ii.jf.mode(0)") (I think, don’t have everything on right now to test). if it doesn’t respond, you might need to plug and unplug the usb from crow. You should see a “crow connected” line in the REPL after you plug it back in.

stop it from listening to i2c messages using maiden

that one, I’m not too sure about. Though I feel like that would be a bit fighting the symptom vs. fixing the cause (which it sounds like the idea of doing the auto-reset @Galapagoose mentions would be more of the actual fix)

Yeah the issue is not that JF is receiving i2c messages, it’s that it has been sent a crow.ii.jf.mode(1) message, then norns has gone off to do something else, but hasn’t told JF to return to normal operation.

re: maiden repl, you can just use crow.ii.jf.mode(0), no need for the crow.send workaround.

Is there a reason norns shouldn’t be updated to always run crow.ii.jf.mode(0) when scripts are closed (in a system level cleanup function)? Seems like maybe something script authors shouldn’t be relied on to implement?

This doesn’t make sense to me as norns isn’t always ‘the boss’ of Just Friends.

For example: It would break a setup with both Crow and Teletype where TT was controlling JF.

4 Likes

good point. I thought it would be nice to cut down on the amount of boilerplate code script authors must be aware of, but maybe this is unrealistic

To refine the question, I’m using the max for Live JF device through Crow to play JF as a polyphonic synth.

I’m when finishing up that patch I simply shut everything down. I’ve used JF in sound mode (without Crow) since and it seems to be behaving normally…

I never ran any script from m4l or anywhere else to take JF out of synth mode. Does that sound ok?

Thanks!

yep! you’re good. totally separate situation :slight_smile:

2 Likes
function cleanup()
  if params:get("output") == 5 then
    crow.ii.jf.mode(0)
  end
end

Perhaps this is nitpicky and an uncommon use case, but what if I switch to output 5, and then switch back to output 4 before exiting?

Seems maybe something like this should also be added:

params:set_action('output', function(val)
  if prev_output == 5 and val ~= prev_output then
    crow.ii.jf.mode(0)
  end
  prev_output = val
end)

This also makes me wonder if the 2nd param in the set_action callback should be the previous value, so you don’t have to store a reference to it elsewhere (this would’ve helped me in some other use cases as well). But maybe that’s a conversation for github or another thread…

Copying in @tehn here as I don’t know that much about the norns side of things - I’ve sadly not had much more of chance to use it with crow than to test things were working. Perhaps he’ll have some insights on the best way forward in this case.

I fear there is a lot of edge cases and agree that it’s not ideal for script authors to have to replicate this. For example, in your extension of set_action method above, what if JF is already in synth mode before norns interacts with it - then it would kill whatever else was using it before norns got involved.

1 Like

I tried to search the forum and google around, but could not figure out an answer to this really basic question:

Is it possible to play Just Friends via jf_synth so that the notes keep playing as long as I hold down the keys on my MIDI keyboard, kinda like the sustain portion of an ADSR envelope? I understand that Just Friends was designed to be used with triggers, so this might not be possible. Thank you.

hey! totally good question. this isn’t currently possible with the m4l device. my tests with sustain were all stable up to a point, but then modules would hang. same with targeting voices rather than round robin.

i’ll continue to explore implementation, but hope it helps to know that there’s a gap!

3 Likes

my apologies if it’s somewhere obvious and i missed it… is there a glossary somewhere of all the commands jf will accept over ii? there’s a bit of information in the reference section of scripting [crow] with norns, but i can’t help but feel like things are being left out.

even just descriptions of what some of the things do would be helpful… what’s god mode? how does jf accept pitch, hz? midi number? when is jf expecting a number, and when is it expecting a string? when it’s the latter, what are the acceptable strings?

there’s got to be a reference somewhere. i’m struggling to find it, though.

You can get the list of available crow functions by running ii.jf.help() in Druid or crow.ii.jf.help() in Norns. This page runs through the meaning of each command – it uses Teletype syntax rather than the names of the crow functions. The main ways that some crow functions are different are that they accept floating point numbers instead of 16-bit ints like Teletype commands.

The ii.jf.help() output gives some hints about the parameters accepted:

ii.jf.trigger( channel, state )
ii.jf.run_mode( mode )
ii.jf.run( volts )
ii.jf.transpose( pitch )
ii.jf.vtrigger( channel, level )
ii.jf.mode( mode )
ii.jf.tick( clock-or-bpm )
ii.jf.play_voice( channel, pitch/divs, level/repeats )
ii.jf.play_note( pitch/divs, level/repeats )
ii.jf.god_mode( state )
ii.jf.retune( channel, numerator, denominator )
ii.jf.quantize( divisions )

Pitch, level, and run all correspond to voltage parameters and are specified in volts, so pitch is specified V/oct relative to JF’s base pitch (set with transpose). I believe everything else is the same as Teletype. This is generally how this works for ii devices on crow, think I’ll trot over to here and add a remark to that effect.

5 Likes

6 posts were merged into an existing topic: ^^ crow: max + max for live (feb 3 2020)