Custom Seed Targets in oopsy v4

Hi Im looking to implement the new JSON config files in the new v4 build.

Two questions -

  1. How in terminal do I update to this new version. When I perform this in the terminal I get the following:
hello@192-168-1-000 Packages % git clone https://github.com/electro-smith/oopsy.git

fatal: destination path 'oopsy' already exists and is not an empty directory.
  1. I worked around this and downloaded it to another directory and manually replaced the current one, however I dont think this is working as Im getting compile errors when flashing the card. I tried all the examples on the Wiki site but to no avail. It leads me to think it is still in the old version. How can I tell what version oopsy Max8 is seeing?

Thanks,
Adrian

  1. It’s complaining because you already had a folder called “oopsy” there. Delete that existing folder (or move it out of Max 8/Packages to somewhere Max won’t see it) and try running the git clone command again.

  2. If (1) doesn’t work, let me know what are the errors you see in (2).

Thanks!

1 Like

Thanks Graham,
I moved the original oopsy folder and was able to correctly install the new version.

Using the /packages/oopsy/examples/reverb.maxpat as a test base.
Compiling with the standard ‘Petal’ selected works fine and as expected.

I am pasting and saving the json examples in BBEdit and they are being saved as “Unix LF” with UTF8 Encoding. The last example used below appears to give the most info in the compile errors.

If I use the first example on the wiki page I get the error.

gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.json
param: Param damping has no minimum; default to using min=0.
param: Param damping has no maximum; default to using max=1.
param: Param decay has no minimum; default to using min=0.
param: Param decay has no maximum; default to using max=1.
param: Param ctrl1_wet has no minimum; default to using min=0.
param: Param ctrl1_wet has no maximum; default to using max=1.
gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp
oopsy-verbose: script start /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json 48kHz block48 /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp boost
oopsy-verbose: stop success dictionary u823002044
oopsy-verbose: start success dictionary u060002045
oopsy-verbose: using build tools found in /opt/homebrew/bin
node.script: Cannot read property 'OOPSY_IO_COUNT' of undefined
oopsy-verbose: Target daisy.test configured in path /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json

The second example “POD” I get the error.

gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.json
param: Param damping has no minimum; default to using min=0.
param: Param damping has no maximum; default to using max=1.
param: Param decay has no minimum; default to using min=0.
param: Param decay has no maximum; default to using max=1.
param: Param ctrl1_wet has no minimum; default to using min=0.
param: Param ctrl1_wet has no maximum; default to using max=1.
gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp
oopsy-verbose: script start /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json 48kHz block48 /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp boost
oopsy-verbose: stop success dictionary u102002174
oopsy-verbose: start success dictionary u165002175
oopsy-verbose: using build tools found in /opt/homebrew/bin
oopsy-verbose: Target daisy.test configured in path /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json
oopsy-verbose: Building to /Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test
oopsy-verbose: Will upload from /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp by writing to:
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/reverb_daisy.test.cpp
node.script: Cannot convert undefined or null to object
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/Makefile
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/build/reverb.bin

The “Noise engineering Versio” returns

gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.json
param: Param damping has no minimum; default to using min=0.
param: Param damping has no maximum; default to using max=1.
param: Param decay has no minimum; default to using min=0.
param: Param decay has no maximum; default to using max=1.
param: Param ctrl1_wet has no minimum; default to using min=0.
param: Param ctrl1_wet has no maximum; default to using max=1.
gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp
oopsy-verbose: script start /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json 48kHz block48 /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp boost
oopsy-verbose: stop success dictionary u781002360
oopsy-verbose: start success dictionary u509002361
oopsy-verbose: using build tools found in /opt/homebrew/bin
oopsy-verbose: Target daisy.test configured in path /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json
oopsy-verbose: Building to /Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test
oopsy-verbose: Will upload from /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp by writing to:
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/reverb_daisy.test.cpp
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/Makefile
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/build/reverb.bin
node.script: Cannot convert undefined or null to object

The user example further down the page returns

gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.json
param: Param knob2_damping has no minimum; default to using min=0.
param: Param knob2_damping has no maximum; default to using max=1.
param: Param decay has no minimum; default to using min=0.
param: Param decay has no maximum; default to using max=1.
param: Param ctrl1_wet has no minimum; default to using min=0.
param: Param ctrl1_wet has no maximum; default to using max=1.
gen~: exported: Macintosh HD:/Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp
oopsy-verbose: script start /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json 48kHz block48 /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp boost
oopsy-verbose: stop success dictionary u461002772
oopsy-verbose: start success dictionary u037002773
oopsy-verbose: using build tools found in /opt/homebrew/bin
oopsy-verbose: Target daisy.test configured in path /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json
oopsy-verbose: Building to /Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test
oopsy-verbose: Will upload from /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp by writing to:
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/reverb_daisy.test.cpp
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/Makefile
oopsy-verbose: 	/Users/colorone/Documents/Max 8/Packages/oopsy1/source/build_reverb_daisy.test/build/reverb.bin
oopsy-verbose: oopsy generated code
oopsy-verbose: generated code
oopsy-verbose: oopsy compiling...
oopsy-verbose: compiling...
oopsy-verbose: oopsy compiler error
oopsy-verbose: compiler error
oopsy-verbose: Error: Command failed: export PATH=$PATH:/opt/homebrew/bin && make clean && make
oopsy-verbose: reverb_daisy.test.cpp: In function 'int main()':
oopsy-verbose: reverb_daisy.test.cpp:170:30: error: no matching function for call to 'Daisy::Init(int)'
oopsy-verbose:   170 |  oopsy::daisy.hardware.Init(1);
oopsy-verbose:       |                              ^
oopsy-verbose: In file included from reverb_daisy.test.cpp:20:
oopsy-verbose: ../genlib_daisy.h:29:8: note: candidate: 'void Daisy::Init()'
oopsy-verbose:    29 |   void Init() {
oopsy-verbose:       |        ^~~~
oopsy-verbose: ../genlib_daisy.h:29:8: note:   candidate expects 0 arguments, 1 provided
oopsy-verbose: make: *** [build/reverb_daisy.test.o] Error 1
oopsy-verbose: 
oopsy-verbose:     at ChildProcess.exithandler (child_process.js:295:12)
oopsy-verbose:     at ChildProcess.emit (events.js:223:5)
oopsy-verbose:     at maybeClose (internal/child_process.js:1021:16)
oopsy-verbose:     at Socket.<anonymous> (internal/child_process.js:430:11)
oopsy-verbose:     at Socket.emit (events.js:223:5)
oopsy-verbose:     at Pipe.<anonymous> (net.js:664:12) {
oopsy-verbose:   killed: false,
oopsy-verbose:   code: 2,
oopsy-verbose:   signal: null,
oopsy-verbose:   cmd: 'export PATH=$PATH:/opt/homebrew/bin && make clean && make'
oopsy-verbose: }
oopsy-verbose: reverb_daisy.test.cpp: In function 'int main()':
oopsy-verbose: reverb_daisy.test.cpp:170:30: error: no matching function for call to 'Daisy::Init(int)'
oopsy-verbose:   170 |  oopsy::daisy.hardware.Init(1);
oopsy-verbose:       |                              ^
oopsy-verbose: In file included from reverb_daisy.test.cpp:20:
oopsy-verbose: ../genlib_daisy.h:29:8: note: candidate: 'void Daisy::Init()'
oopsy-verbose:    29 |   void Init() {
oopsy-verbose:       |        ^~~~
oopsy-verbose: ../genlib_daisy.h:29:8: note:   candidate expects 0 arguments, 1 provided
oopsy-verbose: make: *** [build/reverb_daisy.test.o] Error 1
oopsy-verbose:

Many thanks,
Adrian

Looking into it.

Hmm, I can run the simple/pod/versio examples with no problems here.

Tried with both a fresh checkout of v0.4.0-beta and with the current git version of oopsy.

simple:

  • no “Cannot read property ‘OOPSY_IO_COUNT’ of undefined” here.

pod / versio:

  • no “Cannot convert undefined or null to object”

(The user example further down the page is the older, now deprecated JSON format. It looks like changes elsewhere needed for the newer JSON structure have made the old one no longer work. I have updated the wiki page accordingly to mark it clearly as no longer supported.)

I wonder if something didn’t quite work with the install?

Another thing you can try is running the node script directly from a command line. (This will require installing Node.js – you can brew install node if you don’t have it.)

E.g., inside /packages/oopsy/source, run:

node oopsy.js /Users/colorone/Documents/Pedal_Enclosurea/001_digital/oopsy/json/daisy.test.json 48kHz block48 /Users/colorone/Documents/Max 8/Packages/oopsy/examples/reverb.cpp

Should look something like this:

grrr:source grrrwaaa$ node oopsy.js seed.versio.json ../examples/reverb.cpp boost 48kHz block48
using build tools found in /usr/local/bin
Target seed_versio configured in path seed.versio.json
Building to /Users/grrrwaaa/Documents/Max 8/Packages/oopsy/source/build_reverb_seed_versio
Will upload from ../examples/reverb.cpp by writing to:
        /Users/grrrwaaa/Documents/Max 8/Packages/oopsy/source/build_reverb_seed_versio/reverb_seed_versio.cpp
        /Users/grrrwaaa/Documents/Max 8/Packages/oopsy/source/build_reverb_seed_versio/Makefile
        /Users/grrrwaaa/Documents/Max 8/Packages/oopsy/source/build_reverb_seed_versio/build/reverb.bin
oopsy generated code
oopsy compiling...
oopsy created binary 51KB
oopsy flashing...
...
...etc.
1 Like

Thanks for the quick response Graham,

I think the problem was I had only renamed the old /Packages/oopsy folder and the link to the prior version was somehow retained.
A quick test at home this morning (actually moving the old version to another location) caused the build to work successfully.
Ill report the results when I get into work and flash my seed with a custom mapping.

Adrian

Hi Graham,
The new custom targets are flashing on the seed perfectly. YOU GUYS ROCK!!
It took me a little while to work out the “pins” actually relate to the GPIO number not the physical Header Pin number :slight_smile:

I was a little confused with the numbering of ‘pins’ listed in the examples.
Looking at the POD example it lists knob1 as:


"knob1": {
			"component": "AnalogControl",
			"pin": 21
		},

however looking at the POD reference schematic knob1 is physically mapped to pin28 (GPIO22), not “pin”:21.

After mapping to the GPIO numbers everything worked:)

Thanks again for your brilliance and making this relatively easy for us all,
Adrian

1 Like

Yikes, is that right?

I went off the definitions given in libdaisy’s daisy_pod.cpp which has KNOB1 as #define KNOB_1_PIN 21 (https://github.com/electro-smith/libDaisy/blob/master/src/daisy_pod.cpp)

That should be the right value to be sent through.

The seed-pod generator generates:

AdcChannelConfig cfg[ANALOG_COUNT]; cfg[0].InitSingle(seed.GetPin(21));

Which I thought should be equivalent to what daisy_pod.cpp has:

#define KNOB_1_PIN 21 AdcChannelConfig knob_init[KNOB_LAST]; knob_init[KNOB_1].InitSingle(seed.GetPin(KNOB_1_PIN));

Any ideas about implementing the kxmx_bluemchen screen? I think I could whack-and-hack the scripting to access the I/O+Knobs (not encoder) but that’s my limit.
@recursinging has a great thingie with that unit.