Tried updating this but after loading the update into Norns it seems to break everything. It won’t let me load any scripts. I tried doing a system restart and that didn’t help. After deleting fm7 Im able to access scripts. No idea why

Double check that you don’t still have the fm7 Engine installed in the we folder in dust

2 Likes

Looks like fm7.lua is in there as well as Engine_FM7.sc

Should I remove both of those or just one?

the .sc file is the cause of the problem, but go ahead and kill both :wink:

2 Likes

I’m wondering if this could be purposed to make a Machinedrum / Akemies Taiko style drum machine? Would the engine need to be modified to have say 6 tracks of monophonic voices with individual FM7 params & envelopes etc?

12 Likes

The engine is polyphonic and has 6 operators with a 6x6 modulation matrix. This matrix will get much larger if you want to break this into 6 independent voices each with a 6x6 matrix. That alone is 216 parameters. But yeah, it’s possible.

1 Like

hi there, I was wondering if its possible to run a sequencer script using the FM7 engine? Is it fairly easy to run say Loom with this engine loaded? thanks!

I can’t speak to the ease since I don’t know your level of expertise working with the Lua environment on Norns. IIRC I took the basic param names and note on/off code from one of the first polyphonic synth scripts in the we collection (before the library system was in place). There isn’t a standard for defining an interface to “a polyphonic synth” in norns so each engine may work differently for things like note on/off, velocity, etc.

thanks, sorry yeah should have said I’m a noob with the scripting. I’ve tried replacing these lines below on the Loom script, for example:

engine.name = ‘fm7’

local R = require ‘fm7/lib/fm7’

but I get ### SCRIPT ERROR: missing fm7

I imagine there is much more to it than what I tried!

You’ll have to do more than to replace the engine. There is no protocol for now musical event (pitch, velocity, note on/off) messages are transmitted in Norns so each sequencer script may need to be modified to work with the engine.

I am having an issue with the script. I have the FM7 library loaded on my Shield, and everything seems to work, except for Encoder 1 doesn’t seem to do anything, I can’t get the additional pages and settings to show up. Any ideas?

I haven’t updated the script in over a year so it’s not a change in the source code. I’ll check it out. That’ll be easy since I can’t really leave my house much.

Oh great - yeah. I know the encoder works because I can use other scripts that use it. Do you have a shield to test with? Is there someway for me to test and see if the encoder is actually doing anything in the script?

Thanks!

I don’t have a shield.

You can test the encoder like any other one if you have a Maiden session running to the device. Print the value inside the enc() {} function.

Sorry super beginner here - so while the script is running from the Norns Shield I can debug from the Maiden interface. What commands in the console will show the state of the encoders?

I know that the encoder is working because in other scripts (e.g. drumroom) using encoder 1 changes the pages successfully.

Thanks again.

AFAIK there aren’t any commands that show encoder state because the encoders just fire off the enc(n,d) function everytime they are touched.

If the value being changed by the calls to enc(1,d) (specifically the first encoder with any delta value) is global you could ask for it’s value at the REPL! Here’s an example of what I’m talking about:

my_var = 0
[...]
function enc(n,d)
  if n == 1 then
    my_var = my_var + d
  end
end

Then you could type my_var at the REPL and it would print 0… unless you turned the knob down, in which case you’d get something negative. Or if you turned it up you would get something positive.

Does this help?

1 Like

That does make sense to me. So in the FM7 script specifically, what/where is the code that changes the page based on the changes to encoder 1?

Does anyone else have a Norns Shield that can help figure this out?

Thanks again.

just updating mine now – I assume you have also updated?

Also are you getting any errors in the REPL when you use the script?

Checked for an update, and now applying the 200323 update.

Now updated, when running the script it shows the following:

script run

loading engine: FM7

reading PMAP /home/we/dust/data/fm7/fm7.pmap
m.read: /home/we/dust/data/fm7/fm7.pmap not read.
Engine.register_commands; count: 96
___ engine commands ___
amp f
amp1 f
amp2 f
amp3 f
amp4 f
amp5 f
amp6 f
amplag f
carrier1 f
carrier2 f
carrier3 f
carrier4 f
carrier5 f
carrier6 f
hz1 f
hz1_to_hz1 f
hz1_to_hz2 f
hz1_to_hz3 f
hz1_to_hz4 f
hz1_to_hz5 f
hz1_to_hz6 f
hz2 f
hz2_to_hz1 f
hz2_to_hz2 f
hz2_to_hz3 f
hz2_to_hz4 f
hz2_to_hz5 f
hz2_to_hz6 f
hz3 f
hz3_to_hz1 f
hz3_to_hz2 f
hz3_to_hz3 f
hz3_to_hz4 f
hz3_to_hz5 f
hz3_to_hz6 f
hz4 f
hz4_to_hz1 f
hz4_to_hz2 f
hz4_to_hz3 f
hz4_to_hz4 f
hz4_to_hz5 f
hz4_to_hz6 f
hz5 f
hz5_to_hz1 f
hz5_to_hz2 f
hz5_to_hz3 f
hz5_to_hz4 f
hz5_to_hz5 f
hz5_to_hz6 f
hz6 f
hz6_to_hz1 f
hz6_to_hz2 f
hz6_to_hz3 f
hz6_to_hz4 f
hz6_to_hz5 f
hz6_to_hz6 f
opAmpA1 f
opAmpA2 f
opAmpA3 f
opAmpA4 f
opAmpA5 f
opAmpA6 f
opAmpCurve1 f
opAmpCurve2 f
opAmpCurve3 f
opAmpCurve4 f
opAmpCurve5 f
opAmpCurve6 f
opAmpD1 f
opAmpD2 f
opAmpD3 f
opAmpD4 f
opAmpD5 f
opAmpD6 f
opAmpR1 f
opAmpR2 f
opAmpR3 f
opAmpR4 f
opAmpR5 f
opAmpR6 f
opAmpS1 f
opAmpS2 f
opAmpS3 f
opAmpS4 f
opAmpS5 f
opAmpS6 f
phase1 f
phase2 f
phase3 f
phase4 f
phase5 f
phase6 f
solo i
start if
stop i
stopAll
___ polls ___
amp_in_l
amp_in_r
amp_out_l
amp_out_r
cpu_avg
cpu_peak
pitch_in_l
pitch_in_r

script init

ERROR (i2c/hp) failed to write

Okay cool, we get the same thing. Here are my two thoughts:

  1. What encoder 1 behavior are you trying to check? Just skimmed the docs and not sure what you mean. A pointer would help me help you a lot :slight_smile:

  2. my gut instinct is that the i2c error is a red herring for what we are talking about here, but I’m just now looking at the code