FM7 (Norns)

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

It looks like the pmap files are not in the right location for the script, looks like

/home/we/dust/data/fm7/fm7.pmap should be /home/we/dust/code/fm7/fm7.pmap

after copying the files the error doesn’t appear but encoder one still doesn’t change pages, based on what I’ve seen of the script it should let you select the presets from the DX7.

Based on the video of the display at the top of the topic, the presets don’t look to be loaded properly and that’s why it’s not working. There is no presets loaded so the encoder can’t change between them.

This must be something with differences between the filesystem layout. Any ideas?

1 Like

I am on fates. I am not sure that’s the only problem as also Enc 2 does not do anything.

I am new to norns, but perhaps is something related to the block of code between 486 and 500 in fm7.lua?

@rossominerale so I don’t think it is related to that part. I think the issue is that the script is not properly loading the .pset files that are in /home/we/dust/code/fm7/data on the Shield, but even with moving the files to the seemingly right path the script still does not look like it is loading properly. The expected behaviour is at https://youtu.be/HI9B-vuWF4A?t=42 where you can see that on the right hand side of the norns screen there are a bunch of ‘pages’ with the presets that are loaded. On mine there is only one, the current page.

I’m not much help in debugging this as I’m just getting started with the platform. I’m still trying to figure out what part of the code is attempting to load the presets :slight_smile: I’m sure that @lazzarello would know how to fix this instantly.

2 Likes

Interesting. The contribution system was recently given a complete redesign. Are you using the Maiden library feature to install?

Yes I updated the system from within Norns, and then installed the script through Maiden. Is there another way to install the script that I can try?

so FWIW i can reproduce both issues:

  1. the default .pset files are indeed not seen by the norns system because they need to be in the ~/dust/data/fm7. i guess i would have the script look for them there at launch, and copy the files if needed. (and maybe we should provide a system utility for this behavior: scripts wanting to provide default parameter sets and mappings.) at minimum should mention something in script README.

([ed. or other solutions, like: system looks for .pset files in code + data, or script always populates some preset slots with lib/.psets, i dunno)

  1. encoders aren’t working for me. i could be misunderstanding something (is a grid required for basic functionality), or enc_mapping isn’t being initialized as expected. but i’ll know more in a moment.

ok, actually encoders are fine but page switching isn’t happening. looking at the code, that makes sense; the pages object is not being initialized usefully, nor used anywhere, the dx7_algos module isn’t included, &c.

i see some things in the commit history, which indicate that:

  • the “algos” page isnt intended to be shown any more,
  • enc1 is now for coarse tuning and enc2 for fine tuning, &c.

so i guess the intended behavior has changed, in which case the video is just misleading and the script could use a lot of cleanup for dead code &c.

4 Likes

i need to revisit the mechanism for default pset copying… that may have broken recently

I think it is broken @tehn. for my recent script I tried it. I saw how playfair did it (pset file in ash/data/playfair.pset), but that didn’t work (I tried m18s/data/m18s.pset). I went into github and saw you changed the paramset default comment to mention -01, so I tried changing it to m18s/data/m18s-01.pset and that didn’t work either.

For my case (wanting to package the script with different default values), I just copied we/lib/polysub.lua and edited the default values

made an issue

2 Likes

Hi. Do any of you know how I get my midi keyboard(keystep) to work with this? Can’t seem to get it to work :frowning: