here: crow

this just outputs cv on crow outputs 1 and 2. Like @nonverbalpoetry said, to get the 301 working you’ll need to add another output mode, similar to the crow ii jf option.

to check out the er-301 i2c commands in crow ,issue ii.er301.help() in druid.

Screen Shot 2022-06-04 at 9.23.20 AM

here’s a quick untested gist that adds a 301 output option to awake. on the 301 use sc.cv 1 for pitch cv and sc.tr 1 for triggers:

just drop that file in your awake folder, and it should show up as awake_301 in your select menu.

edit: this functionality has been added to awake. it’s no longer necessary to use the above gist

7 Likes

I won’t say that it’s tested, but this is working for me :grinning:. Will need to go update my favorite scripts

1 Like

Thank you so much! Guess I need to dig in the Crow studies, now… If someone is willing to make some Crow/ER-301 scripting tutorials with inspirations of how to take advantage of this combo, it would be wonderful. Maybe a “Crow Talk” episode @EqualTemperament ? :grinning: :upside_down_face:

2 Likes

fwiw, i went ahead and made a PR for this output mode :cowboy_hat_face:

edit: this has now been merged into awake!

11 Likes

Is finding a crow pretty much impossible now? Any updates on the horizon?

There’s this post in another thread that illustrates a little of what’s going on with crow.

4 Likes

hello! I could likely have posted this in any number of threads but hopefully this is the most appropriate one because I think crow is likely the common denominator to what I’m trying to solve. I’ve been enjoying the teletype just type studies and was wondering if there was a way to manually launch functions in lua scripts with minimal delay, like you can trigger scripts in teletype via the trigger inputs or function keys, but without a teletype. Ideally this would be via midi notes.

edit: after some studying, realized that norns can do all this and much more. :hugs:

1 Like

Has anyone ever tried to use crow as a cv monitor? Since we can read the input voltages it’s probably not too hard to build a basic “oscilloscope”. I don’t have any oscilloscope or any dedicated module so I thought about trying to accomplish this with crow.

3 Likes

I’m curious to hear what others say about what the host-side (eg druid) mechanism for this would / could be. In my bit of experience tinkering with it, it’s relatively straightforward to reuse bits of druid to send things to crow (for instance), but I think to receive things from crow you’d have to modify druid to (optionally) send the value to whatever’s doing the visualizing over OSC or something.

(That’s not considering any dedicated hardware which might get the values over I2C…)

1 Like

20 chars of ASCII oscilloscope?

1 Like

Yes, that is what I was thinking as well. You’d have to fiddle around with druid to get it to work.

Regarding the ASCII oscilloscope. Sure you can do it, but I was rather thinking about using a dedicated plotting library to obtain something more visually pleasing - although, for what I want to use it a very rudimentary one might work as well.

1 Like

Hello. I’m getting stuck with a crow script and I’d be very appreciative of some help. Apologies if I’m doing something really silly or if this is the wrong thread for this.

The purpose of the script is to control settings on a Mutable Instruments Plaits to change drum models and other parameters based on gates received from a Mutable Instruments Marbles (switching between kick and snare sounds based on which gate arrives from Marbles).

  • Input 1: Receives a gate from the t1 output of Marbles.
  • Input 2: Receives a gate from the t3 output of Marbles.
  • Output 1: Sends CV to the Model input of Plaits to set the synthesis model.
  • Output 2: Sends CV to the V/Oct input of Plaits to set the pitch.
  • Output 3: Sends CV to the Timbre input of Plaits to change tone.
  • Output 4: I want to use this to send a trigger to the Trig input in Plaits.

BTW, I’m using crow to trigger the Plaits drums for timing reasons, rather than direct from Marbles.

Everything is working, except sending the trigger from output 4 to the Trig input of Plaits, which is probably me getting the command wrong for that.

Weirdly, when I connect a cable from crow’s output 4 to the Plaits Trig input, Plaits seems to “freeze” until I unplug the cable from the Plaits Trig input. druid doesn’t show any error messages or anything during this “freezing”, and the script resumes fine when I unplug that cable from Plaits. If I use the t2 output from Marbles as the trigger Plaits doesn’t “freeze”.

Here’s my code.

function init()
    input[1].mode('peak')
    input[2].mode('peak')
end

input[1].peak = function()
    output[1].volts = 4.0 -- analog bass drum model
    output[2].volts = 1.8
    output[3].volts = 8.0
    output[4].action = "{to(8,0.15),to(0,1)}"
end

input[2].peak = function()
    output[1].volts = 4.33 -- analog snare drum model
    output[2].volts = 3.5
    output[3].volts = 4.0
    output[4].action = "{to(8,0.15),to(0,1)}"
end

I tried using output[4].action = "pulse()" to send a trigger from output 4 but that didn’t seem to work. Again sorry if the fix is obvious!

1 Like

looks like you may have been reading some norns-related docs & some wires got crossed (re: ASL being wrapped as strings).

the trigger line should be:

output[4]( pulse() )

note that pulse() is not a string, but a function call. this is the easiest way, but in case you want the pulse for both to be configurable in one place you can do the following:

function init()
  -- other stuff here
  -- ...
  output[4].action = pulse() -- this assigns the pulse action to out4
end

-- now you can just call the output to trigger the action
output[4]() -- goes buzz

also, i note you’re using the peak mode. that’s fine and probably works ok, but it is treating the input as an audio signal & following the amplitude. if you are sending in a trigger (or even an envelope) it’s better to use the change mode which makes the input act like a gate. big change is it should reduce latency by a substantial amount.

4 Likes

Thank you very much! I learnt a lot there. All working now. I’ll be more careful reading the docs from now on. :blush: Here’s the working code. Thanks again. This opens up lots of possibilities for more interesting things! :slight_smile:

function init()
    input[1].mode('change',1,0.1,'rising')
    input[2].mode('change',1,0.1,'rising')
    output[4].action = pulse()
end

input[1].change = function()
    print "bass drum"
    output[1].volts = 4.0 -- analog bass drum model
    output[2].volts = 1.8
    output[3].volts = 8.0
    output[4]()
end

input[2].change = function()
    print "snare drum"
    output[1].volts = 4.33 -- analog snare drum model
    output[2].volts = 3.5
    output[3].volts = 4.0
    output[4]()
end
3 Likes

I have a question regarding input modes. Do I need to (or can I) change modes within a function call? Like this:

function init()
  input[1].mode('peak',0.3,0.1)
end

input[1].change = function()
  output[1].(pulse()) 
-- When signal is detected in input 1, a trigger send out

  input[1].mode('volume') 
-- This part puzzled me, I want to track when the input signal stop, 
-- so I change the mode from 'peak' to 'volume'
    if input[1].stream <= 0.3 then 
-- btw 0.3 is for noise floor avoidance, not sure if it's necessary
    output[4].(pulse()) 
-- Send out a trigger again when no input signal is heard from input 1
    end
end

crow is not by my side so above is not tested yet.

1 Like

yes, you can change input-mode inside a function. the issue here is that after changing modes, you have to wait for the event with the new mode to be called. so in your example you’d need 2 separate functions – one for handling peak (or change?) and the other volume.

if what you’re trying to do is track the amplitude of an audio signal, you can just use the 'volume' mode. that mode provides you with an argument to the event handler of the current volume:

input[1].volume = function(v)
  -- do something with v (ie volume) here
end

you’ll probably want to create a global variable to track whether v is above or below a threshold, so you can trigger output[4] on the transitions. it’s very likely you don’t actually want to switch input modes.

final note, in your script you use output[4].(pulse()) which has an extra period. it should read output[4]( pulse() ), i added some spaces for clarity.

2 Likes

Thank you!
This is my crow script, I wonder if while and for are better suit for my purpose than if.


function init() 
        input[1].mode('volume', 0.01) 
        input[2].mode('change', 1.0, 0.1, 'rising') 
        output[1].volts = 8.0 
        output[2].action = pulse(0.1, 5.0, 1) 
end 
 
input[1].volume = function(v) 
        if output[2].volts == 0.0 and v > 0.1 then 
                output[1].slew = 0.0 
                output[1].volts = 0.0 
                output[2]() 
 
        else if output[1].volts == 0.0 and output[2].volts == 0.0 and v <= 0.1 then 
                        output[1].slew = 0.1 
                        output[1].volts = 8.0 
                        delay( 
                                function() 
                                        output[2]( pulse(0.09, 5.0, 1) ) 
                                end, 
                                0.01 
                                ) 
 
        end 
        end 
end 

What I wanted is when signal is heard from input 1, output 1 change from 8v to 0v, and send a trigger from output 2 instantly, and when signal is gone (from input 1), output 1 rise to 8v and send a trigger from output 2 again (end of signal’s trigger).

I have to apply a delay for avoid the ‘overlapping’ of two trigger. This script is working but not perfect, I am still thinking for a better approach.

can you describe what is not perfect about this solution?
what kind of signal do you have attached to input[1]?
what signals / inputs confuse the script and make it break?

curious, does this now allow the er-301 to output cv? via crow?

no, the er301 can only receive commands. that post was/is about adding a mode to the awake norns scipt that sends note and trigger messages from awake through crow to the 301.

1 Like