I’ve been curious about using the Espeak command line tool or maybe flite (and maybe this goes along with using other dsp tools aside from SC)

So… a question for @zebra - if I wanted to get some audio from “outside of norns” and route it out to the norns outputs - what is the best approach? Do I need to create a Jack client that connects to the running Jack instance?

If so, any pointers on how to do that? Thx!

2 Likes

Do I need to create a Jack client that connects to the running Jack instance?

Yes. U can connect arbitrary jack client to system outputs, crone engine inputs, can one softcut inputs, and/or supercollider

any pointers

man jack_connect For hooking up clients

If you have a make a new jack client (wrapping a lib or something) you need to build it in c/c++. You could look at crone client sources for example

3 Likes

In searching around on JACK info, etc, I found what looks like a handy command line tool - jack-matchmaker. Wanted to post this here in case it might be helpful to anyone else.

1 Like

This might be stupid/super obvious, but is there a way to expose jack stuff on a script level? So that you could in theory have parameters that would let you route signals.

yes, can execute jack commands from lua. but i don’t see great utility in this; we don’t have tons of jack clients; the mixer client handles most routing internally (with fancy smoothed matrix mixing.)

i guess you could do weird stuff like making feedback loops from softcut->supercollider.

You can also look at this small JACK client program that I built for the norns. This is more or less the JACK boilerplate I dig up whenever I need to start a new project:

3 Likes

It’s more about repurposing ins/outs as fx buses if you are running a mono-setup.

can you give an example of how altering the jack connection graph would help achieve that goal?

my feeling is that you probably want to make changes to the mixer client and its interface, or just use something completely different.

Just an idea. But from your response it looks like it not doable(?)

altering the jack connection graph from lua is totally doable.

os.execute("jack_connect blablabla")

what do you want blablabla to accomplish? my guess is that it likely has something to do with the functions of crone mixer client, and can either be accomplished within the mixer API, or can’t. but i don’t know.

jack client ports in norns:

system:capture_1
system:capture_2
system:playback_1
system:playback_2
crone:input_1
crone:input_2
crone:input_3
crone:input_4
crone:input_5
crone:input_6
crone:output_1
crone:output_2
crone:output_3
crone:output_4
crone:output_5
crone:output_6
softcut:input_1
softcut:input_2
softcut:output_1
softcut:output_2
SuperCollider:in_1
SuperCollider:in_2
SuperCollider:out_1

mixer API assumes following mapping for crone I/O pairs:
1, 2 -> ADC/DAC
3, 4 -> softcut
5, 6 -> supercollider

but if you want to “monoize” everything, or whatever, just go for it

-- helpers
connect = function(src, dst)
  os.execute("jack_connect " .. src .. " " .. dst)
end

disconnect = function(src, dst) 
  os.execute("jack_disconnect ".. src .. " " .. dst)
end

monoize = function() 
  disconnect("system:capture_1", "crone:input_1")
  disconnect("crone:output_1", "system:playback_1")
  connect("crone:output_1", "system:playback_2")
end

that will make all of norns processing mono, ignoring input 1 and summing any stereo processing (from supercollider etc) to output 2. input 1 and output 1 will do nothing unless you launch some other process that connects to them.

but again - it’s quite possible that existing mixer API and routing structure will handle your needs. i often use norns in an effect loop, monitor in stereo mode with dry passthrough from 2->2 for example.

2 Likes

Great idea!

At some point, I’ve worked with both of these. From what I remember, I think the flite API was sane enough to be usable. It is supposed to be a lightweight little sister to Festival. Espeak sounds better. I think I remember at some point trying to hack something with the espeak API, but I don’t think I got far. One of these programs actually uses an embedded dialect of scheme under the hood for scripting, but I can’t remember which one.

In a similar vein is the LPC10 codec via openlpc. I imagine it will run just fine on the norns. I have a wrapper for it in Soundpipe here, which you are free to use or reverse engineer into something better:

1 Like

what I want is to have on in/out on my norns function as an fx loop. it will probably end with just a nasty feedback loop instead of an fx loop with pedals etc. within my system(I was hoping to avoid getting a mixer, but it might be unavoidable). I curse my hope for minimalism :wink:

1 Like

So yeah, that seems entirely dependent on changing routes within the mixer process.

Maybe very small changes that could be easily executed!

1 Like

How can you call norns.script.load(...) from ssh exactly? I just set up intellij with the lua package addon. Its soooooo nice, but it would be nice to load the transfered project durring (er… after) the deployment of my project to norns too.

maiden speaks to the lua process (matron) via websocket, not via ssh.

matron simply present its REPL on stdin/stdout, and is piped to websockets through a small nanomsg-based tool (ws-wrapper).

i’m not aware of a way to interface IDEA lua plugin with a remote repl but you can roll your own ws-wrapper replacement if you have a plan for that.

(note that matron REPL is simple, doesn’t have readline or command history, so is well suited to programmatic control.)

1 Like

proto-maiden (before the web-based maiden) is in the norns repo… @zebra made it based on ipc-sockets and not ws, so it needs (minor) updating if it’s going to work. i’ve been wanting to use it occasionally but it’s a backburner priority: https://github.com/monome/norns/tree/master/maiden

1 Like

If we are using an included .lua file that is in the same directory as the main script is there a way to have it not displayed to the user?

Sorry if this has been asked before tried to find related questions but maybe im using the wrong term.

put it in a lib folder and include it from there. your_project/lib/blah.lua wont show up in the select menu.

2 Likes

Well that makes sense. Thanks!

2 Likes

so i didn’t mean to blow off this use case, i seriously meant - that description could still go different ways as far as what it means exactly. the use case itself is important to me and isn’t currently served in an ideal manner.

my question is, what alterations or extensions to the mixer API would be best? (you can of course do this with JACK and customization but why not support it directly.)

in other words, where are channels summed / split / sent / &c?

one proposal:

  • in mono+fx mode:
    • ADC channel 1 would be split to inputs 1,2 of supercollider, softcut, fx.
    • outputs 1,2 of supercollider, softuct, fx would sum to DAC 1.
    • ADC 2 and DAC 2 would be summed/sent at some point in the chain = let’s say, sent before FX and summed after FX.

open questions:
would the send/return levels require additional mix parameter(s)? is there some parameter(s) that could be thusly reporpoised? hm.

a sort of random thought: maybe this mode could be accessed by a third setting of the “monitor mode” parameter, which is already kind of a set of arbitrary routings involving the ADC and DAC?

2 Likes