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

Unable to save array content (Win) #240

Closed
Omar-Misa opened this issue Feb 14, 2021 · 4 comments
Closed

Unable to save array content (Win) #240

Omar-Misa opened this issue Feb 14, 2021 · 4 comments

Comments

@Omar-Misa
Copy link

ENVIRONMENT

  • OS: Windows 10
  • DAW: FL Studio v 20.8.1 - 64bits
  • Plugin: VST3 - v1.0.8_beta4
  • Audio: na

Hi,
i'm unable to have persistent array content across loads of DAW project.
i've attempted to save using the methods described in the manual. One method following the instructions for arrays. Another method of using [text define]. i am able to do a work-around, using the latter to write array contents to a text file. Unfortunately, this allows maintenance of only one text file. Therefore, am unable to use array data unique to numerous DAW projects.

i've attempted saving the DAW project and saving the plugin state in the DAW's format (.fst). Exporting to VST preset format (.fxp) isn't available, i suspect because of the VST3 architecture, but can't say for sure.

Attached is the complete folder contents of my Camomile plugin.
It is a MIDI filter. Supply a note and the output is a randomly selected note which deviates from the input note.

  • The two bang atoms call the two arrays in the patch.
    • The PROBABILITIES array define probability distribution.
    • The NOTES array define deviation from input note (centre y-axis).
  • The arrays' sizes are defined by the choices number atom.
  • The range of random note selection is ±n, set with the RANGE number atom.
    • Parameter values for choices and RANGE are reliably recalled with loading of DAW project or plugin preset.

000B_randNotes.zip

Thanks, in advance, for your time.

@pierreguillot
Copy link
Owner

Hello,

The arrays of your patch are always filled with zero. I don't see in your patch where the content of the arrays is modified. If I add a [print] object after [receive load], all the zeros appear in the console (same thing if I add a [print] object before [send camomile]). Are you sure the patch works as expected in Pd?

@Omar-Misa
Copy link
Author

Omar-Misa commented Feb 16, 2021

Hello again,

Yea, the 2 arrays start of with zeroes, ready for the user to fill. With this state the input note is output without modification.
Here's a typical usage sequence:

1. Add randNotes (my Camomile plugin) to DAW project.
2. Add a synth, such that it receives MIDI from randNotes MIDI output.
2. Define choices and RANGE (number atoms, parameters 1 & 2).
- choices sets array size for both arrays.
3. Click the PROBABILITIES bang and edit array values.
4. Click the NOTES bang and edit array values.
- Both arrays will now be filled with user-defined values.
5. Input some notes in series to randNotes.
- The input note will be modified.
- The note number offset will be randomly selected from the NOTES array.
- The index referenced will be randomly selected according to the probability defined in the PROBABILITIES array.
- Everything works as expected up to this point.
6. Save DAW project or randNotes plugin preset.
7. Reload DAW project or randNotes plugin preset.
- The arrays are now all zeroed again. The save action(s) in step 6 has no effect.

i tried adding the -k flag to the 2 [array define]s -- yielding no fix to the issue.
i also tried disconnecting choices, so that arrays weren't resized -- also yielding no fix to the issue.
i've used $0 to localise the arrays. This may be problematic as the ID is unique with each load, after saving the DAW project or plugin preset.

What happens when [receive save] ---> [array get] ---> [list prepend save n] ---> [list trim] ---> [send camomile]; where n is array identifier?
Is n a Camomile parameter? Or is it a separate mechanism which the DAW handles? Can a Camomile parameter contain a list?

Thanks again for your time.
i shall try a simple experiment where a Camomile plugin only contains one array and a bang on the GUI. This should allow testing of saving array contents, without any other evaluations. i'll return here and attach that basic plugin and patch.

@Omar-Misa
Copy link
Author

OOPS!!!

Not sure what i did wrong previously but my plugin is now fixed.
i think my inclusion of program management was the issue. i deleted the equivalent of [program.get] and [program.manager].
Another edit i made was to change the symbolic save array identifier to a numeric value.
The plugin now works as expected.

Sorry to have wasted your time 😧

@pierreguillot
Copy link
Owner

No problem ;)

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

2 participants