Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors using lv2 plugins spacial audio plugin #2013

Open
Russsgithub opened this issue Oct 11, 2021 · 10 comments
Open

Errors using lv2 plugins spacial audio plugin #2013

Russsgithub opened this issue Oct 11, 2021 · 10 comments

Comments

@Russsgithub
Copy link

Describe the bug
Hello,
I was going to put this in discussions but got a type error on add() so thought I'd put it here.
Hello,

I just added zamheadx2 lv2 plugin to a script , it give an

options feature missing, cannot continue!

I'm not sure if this is a liq error or the plugin, but if i use another lv2 plugin , which later goes through an add() function

Error 5: this value has type
  _
  .{
    id : _
    .{
      is_ready : _
      .{
        on_metadata : _
        .{
          on_shutdown : _
          .{
            on_leave : _
            .{
              on_track : _
              .{
                remaining : _
                .{
                  elapsed : _
                  .{
                    duration : _
                    .{
                      self_sync : _
                      .{
                        log : _
                        .{
                          is_up : _
                          .{
                            is_active : _
                            .{
                              seek : _
                              .{
                                skip : _
                                .{
                                  fallible : _
                                  .{
                                    shutdown : _
                                    .{time : source(audio=pcm(stereo),...)
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  } (inferred at millicent.liq, line 464, char 5-45)
but it should be a subtype of the type of the value at millicent.liq, line 491, char 42-65
  _
  .{
    id : _
    .{
      is_ready : _
      .{
        on_metadata : _
        .{
          on_shutdown : _
          .{
            on_leave : _
            .{
              on_track : _
              .{
                remaining : _
                .{
                  elapsed : _
                  .{
                    duration : _
                    .{
                      self_sync : _
                      .{
                        log : _
                        .{
                          is_up : _
                          .{
                            is_active : _
                            .{
                              seek : _
                              .{
                                skip : _
                                .{
                                  fallible : _
                                  .{
                                    shutdown : _
                                    .{time : source(audio=pcm(mono),...)
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

this happens, the error making line is add(source1, source2, source3, source4) - one of the sources has gxdetune lv2 plugin in it.


liblv is installed ,

I thought it may have to do with the amount of channels (zamheadx2 outputs spacial audio) , but i think it outputs binaural stereo so should be fine ?

To Reproduce
install zam plugins

s = source
s = lv2.zamheadx2(source)

output.dummy(s)

gives options feature missing, cannot continue!

s = source
s2 = another source

s = lv2.zamheadx2(source)

mix = add(track_sensitivity=false, [s,s2])

output.dummy(mix)

give the type error

Version details

  • OS - arch
  • Version - 2.1 (main) github

Install method
opam

Thanks

@smimram
Copy link
Member

smimram commented Oct 11, 2021

I'll have a look. For info, I have already observed strange types with plugins: #1556.

@smimram
Copy link
Member

smimram commented Oct 11, 2021

With

s = sine()
s = lv2.zamheadx2(s)
output.dummy(s)

I get a segv after the message:

#0  0x000055555657fc82 in ctypes_read_pointer ()
#1  0x000055555633c167 in camlCtypes_memory__fun_2028 ()
#2  0x0000555556330e2d in camlLilv__activate_1072 ()
#3  0x000055555650346b in camlCamlinternalOO__iter_f_948 ()
#4  0x00005555565034db in camlCamlinternalOO__run_initializers_opt_958 ()
#5  0x0000555556059b77 in camlLang__f_2017 ()
#6  0x000055555605dd0e in camlEvaluation__apply_342 ()
#7  0x000055555605ef3a in camlEvaluation__eval_toplevel_inner_2777 ()
#8  0x0000555555f3eb3e in camlRuntime__fun_2564 ()
#9  0x00005555560c2e64 in camlTutils__finalize_159 ()
#10 0x0000555555f3f911 in camlRuntime__report_650 ()
#11 0x0000555555f3fc22 in camlRuntime__from_lexbuf_inner_2688 ()
#12 0x0000555555f3fe8d in camlRuntime__from_file_784 ()
#13 0x0000555555e0b4ed in camlMain__force_297 ()
#14 0x00005555564789ab in camlDtools__Dtools_impl__exec_768 ()
#15 0x00005555564b6841 in camlStdlib__list__iter_258 ()
#16 0x00005555564789e8 in camlDtools__Dtools_impl__exec_768 ()
#17 0x0000555555e0b1e3 in camlRunner__entry ()
#18 0x0000555555e00ee9 in caml_program ()
#19 0x0000555556601af4 in caml_start_program ()
#20 0x00005555565e276c in caml_startup_common ()
#21 0x00005555565e27bb in caml_startup ()
#22 0x0000555555dfd5bc in main ()

@smimram
Copy link
Member

smimram commented Oct 11, 2021

However, I don't get any type error with

s1 = lv2.zamheadx2(sine())
s2 = sine()
s = add([s1,s2])
output.dummy(s)

@Russsgithub
Copy link
Author

Russsgithub commented Oct 11, 2021 via email

@Russsgithub
Copy link
Author

I check my end for reasons for the type error.

I swapped zamheadx2 for bs2b which gave no errors.

I can raise it on zamplugins github to see what they say.

Thanks Samuel

@smimram
Copy link
Member

smimram commented Oct 12, 2021

I'd say the segmentation fault comes from zam. However, the type error doesn't look right. I'd be quite interested if you'd manage to reproduce it...

@Russsgithub
Copy link
Author

OK, I'll raise it at zam, and look at reproducing.

@Russsgithub
Copy link
Author

@smimram

I've had a bit of a dig around, it seems to me that the type error was caused by the lv2 plugin gxdetune outputting mono and the add function expecting stereo. If i add audio_to_stereo the type error goes. Though i do get another error Missing feature work:schedule, but that's a different thing.

The zamheadx2 seems, possibly, to be the framework it uses DPF framework

I've added an issue over there ,but there isn't much activity on there git hub for the last year. I did however find a post where the author asks if all the zam plug fail and if other dpf framework plugs also fail.

I've tried all the zam plugins , which all give similar errors, which leads me to think the dpf framework is adding or not adding something that liq is needing or not needing.

..............

In my case i think bs2b lv2 plugin will accomplish what i need ? So it's not causing me any problems.

Thanks

@Russsgithub
Copy link
Author

I'm going to reopen this.

I have an issue open on zamaudio github page #84

The zamheadx2 plugin has been updated, but still gives

options feature missing, cannot continue! error when used in liquidsoap. I presume liquidsoap has support for lv2 options features ?

Thanks

@zamaudio
Copy link

zamaudio commented Nov 6, 2023

This is not a bug in zam-plugins. It is caused by liquidsoap host not supporting lv2 options feature, therefore liquidsoap should not allow loading plugins that require the feature, (or add support for the lv2 options feature).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants