pd-else + libpd on iOS
Hi, I'm trying to use pd-else with libpd on ios.
I'm make
ing pd-else for PLATFORM=x86-64-apple-ios
, copying over the output (objectsdir
) to my bundle resources, building libpd with ADDITIONAL_LDFLAGS=-ldl
, adding with the output to search path PdBase.add(toSearchPath: Bundle.main.resourcePath)
When I'm trying to open a patch which uses pd-else
Some attempts to find files are successful:
2024-04-16 21:14:27.771002+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.pd and succeeded
2024-04-16 21:14:27.771098+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.pd and succeeded
But most fails
2024-04-16 21:14:27.751266+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.darwin-amd64-32.so and failed
2024-04-16 21:14:27.751597+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.darwin-amd64-0.so and failed
2024-04-16 21:14:27.751739+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.darwin-fat-32.so and failed
2024-04-16 21:14:27.751876+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.darwin-fat-0.so and failed
2024-04-16 21:14:27.752090+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.d_amd64 and failed
2024-04-16 21:14:27.752374+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.d_fat and failed
2024-04-16 21:14:27.752664+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.pd_darwin and failed
2024-04-16 21:14:27.752902+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.darwin-amd64-32.so and failed
2024-04-16 21:14:27.753208+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.darwin-amd64-0.so and failed
2024-04-16 21:14:27.753470+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.darwin-fat-32.so and failed
2024-04-16 21:14:27.770480+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.darwin-fat-0.so and failed
2024-04-16 21:14:27.770636+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.d_amd64 and failed
2024-04-16 21:14:27.770790+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.d_fat and failed
2024-04-16 21:14:27.770900+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~/out~.pd_darwin and failed
2024-04-16 21:14:27.771002+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.pd and succeeded
2024-04-16 21:14:27.771098+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/out~.pd and succeeded
2024-04-16 21:14:27.771192+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.771485+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.771726+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-32.so and failed
2024-04-16 21:14:27.771987+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-0.so and failed
2024-04-16 21:14:27.772286+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_amd64 and failed
2024-04-16 21:14:27.772645+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_fat and failed
2024-04-16 21:14:27.773142+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pd_darwin and failed
2024-04-16 21:14:27.773783+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.774359+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.774935+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-fat-32.so and failed
2024-04-16 21:14:27.775535+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-fat-0.so and failed
2024-04-16 21:14:27.776348+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.d_amd64 and failed
2024-04-16 21:14:27.776992+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.d_fat and failed
2024-04-16 21:14:27.777360+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.pd_darwin and failed
2024-04-16 21:14:27.777810+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pd and failed
2024-04-16 21:14:27.778584+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pat and failed
2024-04-16 21:14:27.779417+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/else/lb.pd and failed
2024-04-16 21:14:27.780202+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.781051+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.781778+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-32.so and failed
2024-04-16 21:14:27.782005+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-0.so and failed
2024-04-16 21:14:27.782436+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_amd64 and failed
2024-04-16 21:14:27.782651+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_fat and failed
2024-04-16 21:14:27.788387+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pd_darwin and failed
2024-04-16 21:14:27.788947+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.789356+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.789586+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-fat-32.so and failed
2024-04-16 21:14:27.789874+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-fat-0.so and failed
2024-04-16 21:14:27.790175+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.d_amd64 and failed
2024-04-16 21:14:27.790421+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.d_fat and failed
2024-04-16 21:14:27.790769+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.pd_darwin and failed
2024-04-16 21:14:27.791501+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pd and failed
2024-04-16 21:14:27.792396+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pat and failed
2024-04-16 21:14:27.793014+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/else/lb.pd and failed
2024-04-16 21:14:27.793494+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.795343+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.795655+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-32.so and failed
2024-04-16 21:14:27.796345+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.darwin-fat-0.so and failed
2024-04-16 21:14:27.797063+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_amd64 and failed
2024-04-16 21:14:27.797921+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.d_fat and failed
2024-04-16 21:14:27.798883+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb.pd_darwin and failed
2024-04-16 21:14:27.802219+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-32.so and failed
2024-04-16 21:14:27.802831+0300 YoganOme[72363:460962] Pd: verbose(4): tried /Users/anvlkv/Library/Developer/CoreSimulator/Devices/19822801-5565-453D-802D-5533CB03027B/data/Containers/Bundle/Application/B61B55C5-FEE9-4A99-964E-D45932D58CE1/YoganOme.app/else/else/lb/lb.darwin-amd64-0.so and failed
2024-04-16 21:14:27.803686+0300 YoganOme[72363:460962] Pd: verbose(0): else/lb
2024-04-16 21:14:27.804195+0300 YoganOme[72363:460962] Pd: error: ... couldn't create
And indeed there're no such files in the output, there're some with _darwin
but not with specific architecture. Also there's no else/else
subdirectory
Could anyone give a hint?
problem creating objects from external iemlib
hi everyone!
I'm trying to run the patch "Ambisonic_2d_example.pd" from the iem_ambi external. While trying to get it to run, I made some changes to the declare statement. You can find the code below..
I installed the externals needed for this patch through deken and I also set the "-lib iemlib" startup flag in PD.
Unfortunately I get the following errors. As you can see PD fails to create some objects (e.g. fadtodb, rbpq, mull~, dsp). These objects seem to all come from the iemlib which is loaded successfully. I have also checked the /externals/iemlib directory.. the four mentioned object-patches are there.
I am running PD on a VM running Debian 11.7 on a M1 MacBook Pro.
I have been trying to solve this for a couple of hours now.. Does anyone know why it's not working?
iemlib (1.22-1) library loaded! (c) Thomas Musil Jul 7 2023 : 18:09:42
musil@iem.at iem KUG Graz Austria
iem_ambi (1.21.1) library loaded! (c) Thomas Musil Jul 18 2023 : 11:42:00
musil@iem.at iem KUG Graz Austria
iemmatrix 0.3.3
objects for manipulating 2d-matrices
(c) 2001-2015 iem
IOhannes m zmölnig
Thomas Musil
Franz Zotter
compiled Jul 18 2023 : 22:25:45
iemlib (1.22-1) library loaded! (c) Thomas Musil Jul 7 2023 : 18:09:42
musil@iem.at iem KUG Graz Austria
♡♡♡
♡ the zexy external 2.4.2
♡ (c) 1999-2023 IOhannes m zmölnig
♡ forum::für::umläute
♡ iem @ kug
♡ compiled Jul 7 2023
♡ send me a 'help' message
♡♡♡
matchbox: OSC-pattern matching code (c) Matt Wright, CNMAT
iemgui (1.21-1) library loaded! (c) Thomas Musil Sep 13 2022 : 19:34:09
musil@iem.at iem KUG Graz Austria
dsp
... couldn't create
rbpq2~ 1000 2 100
... couldn't create
mull~ 1 100
... couldn't create
fadtodb
... couldn't create
matrix_inverse nonsingular
modified_Ambisonic_2d_example.pd:
#N canvas 1512 175 1512 1715 10;
#X declare -stdlib /home/amir/Documents/Pd/externals/iem_ambi -stdlib
/home/amir/Documents/Pd/externals/iemmatrix -stdlib /home/amir/Documents/Pd/externals/iemlib
-stdlib /home/amir/Documents/Pd/externals/zexy -stdlib /home/amir/Documents/Pd/externals/iemgui
;
#X obj 20 44 dsp;
#X obj 20 24 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1
;
#X floatatom 20 83 5 0 0 0 - - -;
#X floatatom 33 65 5 0 0 0 - - -;
#X obj 230 88 ambi_encode 2;
#X obj 469 102 mtx_*~ 5 1 100;
#X obj 509 11 noise~;
#X obj 509 32 rbpq2~ 1000 2 100;
#X obj 225 591 mtx_print;
#X obj 230 140 mtx 5 1;
#X msg 230 51 col 1 \$1;
#X obj 230 109 t b a;
#X obj 699 118 prvu~;
#X obj 700 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 719 118 prvu~;
#X obj 720 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 739 118 prvu~;
#X obj 740 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 759 118 prvu~;
#X obj 760 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 779 118 prvu~;
#X obj 780 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 1 0;
#X obj 115 222 loadbang;
#X obj 442 257 mtx_*~ 2 2 100;
#X obj 537 257 mtx_*~ 2 2 100;
#X obj 233 240 ambi_rot 2;
#X obj 699 273 prvu~;
#X obj 700 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 719 273 prvu~;
#X obj 720 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 739 273 prvu~;
#X obj 740 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 759 273 prvu~;
#X obj 760 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 779 273 prvu~;
#X obj 780 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 1 0;
#X obj 411 257 *~ 1;
#X obj 131 436 round_zero 1e-06;
#X msg 147 343 real_ls \$1 \$2;
#X msg 131 364 begin_pseudo_inverse;
#X msg 115 385 end_pseudo_inverse;
#X obj 115 245 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 131 414 ambi_decode3 2 2 8 0;
#X msg 147 322 1 0 \, 2 45 \, 3 90 \, 4 135 \, 5 180 \, 6 225 \, 7
270 \, 8 315;
#X obj 425 381 mtx_*~ 8 5 0 ________________;
#X obj 115 264 t b b b b;
#X obj 508 75 mull~ 1 100;
#X obj 678 27 fadtodb;
#X obj 551 55 dbtorms;
#X obj 618 58 - 100;
#X obj 618 82 vsl 15 121 0 120 0 1 empty empty empty 0 -8 0 8 -260818
-1 -1 24000 1;
#X floatatom 637 80 5 0 0 0 - - -;
#N canvas 0 0 462 312 __________________________ 0;
#X obj 25 66 rvu~;
#X obj 25 86 + 100;
#X obj 25 106 dbtorms;
#X obj 25 127 outlet;
#X obj 75 66 rvu~;
#X obj 75 86 + 100;
#X obj 75 106 dbtorms;
#X obj 75 127 outlet;
#X obj 125 66 rvu~;
#X obj 125 86 + 100;
#X obj 125 106 dbtorms;
#X obj 125 127 outlet;
#X obj 175 66 rvu~;
#X obj 175 86 + 100;
#X obj 175 106 dbtorms;
#X obj 175 127 outlet;
#X obj 225 66 rvu~;
#X obj 225 86 + 100;
#X obj 225 106 dbtorms;
#X obj 225 127 outlet;
#X obj 275 66 rvu~;
#X obj 275 86 + 100;
#X obj 275 106 dbtorms;
#X obj 275 127 outlet;
#X obj 325 66 rvu~;
#X obj 325 86 + 100;
#X obj 325 106 dbtorms;
#X obj 325 127 outlet;
#X obj 375 66 rvu~;
#X obj 375 86 + 100;
#X obj 375 106 dbtorms;
#X obj 375 127 outlet;
#X obj 25 45 inlet~;
#X obj 75 45 inlet~;
#X obj 125 45 inlet~;
#X obj 175 45 inlet~;
#X obj 225 45 inlet~;
#X obj 275 45 inlet~;
#X obj 325 45 inlet~;
#X obj 375 46 inlet~;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 24 0 25 0;
#X connect 25 0 26 0;
#X connect 26 0 27 0;
#X connect 28 0 29 0;
#X connect 29 0 30 0;
#X connect 30 0 31 0;
#X connect 32 0 0 0;
#X connect 33 0 4 0;
#X connect 34 0 8 0;
#X connect 35 0 12 0;
#X connect 36 0 16 0;
#X connect 37 0 20 0;
#X connect 38 0 24 0;
#X connect 39 0 28 0;
#X restore 425 406 pd __________________________;
#X obj 459 490 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 486 460 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 486 528 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 516 450 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 516 538 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 546 460 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 546 528 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 573 490 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X msg 310 58 ambi_weight 1 1 1;
#X msg 164 299 ambi_weight 1 1 0.3904;
#X msg 89 466 ambi_weight 1 1 1;
#X text 388 509 +90 degree;
#X text 601 506 -90 degree;
#X text 486 602 +-180 degree;
#X obj 234 220 cnv 12 30 12 empty empty empty 20 12 0 14 -260818 -66577
0;
#X obj 231 32 cnv 12 30 12 empty empty empty 20 12 0 14 -260818 -66577
0;
#X floatatom 230 31 5 -180 180 0 - - -;
#X text 232 14 phi;
#X floatatom 233 219 5 -180 180 0 - - -;
#X text 231 201 rho_z;
#X obj 264 213 cnv 8 8 8 empty empty empty 20 12 0 14 -262144 -66577
0;
#X obj 260 24 cnv 8 8 8 empty empty empty 20 12 0 14 -262144 -66577
0;
#X text 341 114 ENCODING;
#X text 309 378 DECODING;
#X text 323 257 ROTATING;
#X text 587 90 gain;
#X text 24 119 iemmatrix \, iem_ambi \, iemgui;
#X text 17 108 we need iemlib1 \, iemlib2 \,;
#X text 78 596 IEM KUG;
#X text 62 584 musil;
#X text 92 584 @;
#X text 98 584 iem.at;
#X text 61 606 Graz \, Austria;
#X text 13 573 (c) Thomas Musil 2000 - 2006;
#X obj 182 647 declare -stdlib /home/amir/Documents/Pd/externals/iem_ambi
-stdlib /home/amir/Documents/Pd/externals/iemmatrix -stdlib /home/amir/Documents/Pd/externals/iemlib
-stdlib /home/amir/Documents/Pd/externals/zexy -stdlib /home/amir/Documents/Pd/externals/iemgui
;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 1 0 0 0;
#X connect 4 0 11 0;
#X connect 5 0 12 0;
#X connect 5 0 36 0;
#X connect 5 1 14 0;
#X connect 5 1 23 1;
#X connect 5 2 16 0;
#X connect 5 2 23 2;
#X connect 5 3 18 0;
#X connect 5 3 24 1;
#X connect 5 4 20 0;
#X connect 5 4 24 2;
#X connect 6 0 7 0;
#X connect 7 0 46 0;
#X connect 9 0 5 0;
#X connect 10 0 4 0;
#X connect 11 0 9 0;
#X connect 11 1 9 0;
#X connect 12 0 13 0;
#X connect 14 0 15 0;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 20 0 21 0;
#X connect 22 0 41 0;
#X connect 23 0 28 0;
#X connect 23 0 44 2;
#X connect 23 1 30 0;
#X connect 23 1 44 3;
#X connect 24 0 32 0;
#X connect 24 0 44 4;
#X connect 24 1 34 0;
#X connect 24 1 44 5;
#X connect 25 0 23 0;
#X connect 25 1 24 0;
#X connect 26 0 27 0;
#X connect 28 0 29 0;
#X connect 30 0 31 0;
#X connect 32 0 33 0;
#X connect 34 0 35 0;
#X connect 36 0 26 0;
#X connect 36 0 44 1;
#X connect 37 0 44 0;
#X connect 38 0 42 0;
#X connect 39 0 42 0;
#X connect 40 0 42 0;
#X connect 41 0 45 0;
#X connect 42 0 37 0;
#X connect 43 0 38 0;
#X connect 44 0 52 0;
#X connect 44 1 52 1;
#X connect 44 2 52 2;
#X connect 44 3 52 3;
#X connect 44 4 52 4;
#X connect 44 5 52 5;
#X connect 44 6 52 6;
#X connect 44 7 52 7;
#X connect 45 0 40 0;
#X connect 45 1 39 0;
#X connect 45 2 43 0;
#X connect 45 3 62 0;
#X connect 46 0 5 1;
#X connect 47 0 48 0;
#X connect 47 0 49 0;
#X connect 48 0 46 1;
#X connect 49 0 51 0;
#X connect 50 0 47 0;
#X connect 52 0 56 0;
#X connect 52 1 54 0;
#X connect 52 2 53 0;
#X connect 52 3 55 0;
#X connect 52 4 57 0;
#X connect 52 5 59 0;
#X connect 52 6 60 0;
#X connect 52 7 58 0;
#X connect 61 0 4 0;
#X connect 62 0 42 0;
#X connect 63 0 42 0;
#X connect 69 0 10 0;
#X connect 71 0 25 0;
space in OSC node identifier?
@jameslo said:
I'd still like to know if spaces are legal and possible with [oscformat] though.
I'm a bit surprised to see this, but in fact, according to the OSC spec 1.0, spaces are not allowed in OSC command paths.
https://ccrma.stanford.edu/groups/osc/spec-1_0.html#osc-address-spaces-and-osc-addresses
Each OSC Method and each OSC Container other than the root of the tree has a symbolic name, an ASCII string consiting of printable characters other than the following:
-character- -name- -ASCII code (decimal)- ’ ’ space 32 # number sign 35 * asterisk 42 , comma 44 / forward slash 47 ? question mark 63 [ open bracket 91 ] close bracket 93 { open curly brace 123 } close curly brace 125
So Pd has no obligation to support spaces here.
I suppose it depends on the software's OSC handler. SuperCollider doesn't complain (contrary to the OSC spec):
n = NetAddr.localAddr; // send to myself
o = OSCFunc({ |msg|
msg.postln;
o.free;
}, '/test space');
n.sendMsg('/test space', 1);
prints: [ /test space, 1 ]
I did some other tests:
- "symbol patch 1" --> [list fromsymbol]: escape char 92 is not in the ASCII list.
- list "112 97 116 99 104 32 49" --> [list tosymbol]: resulting symbol prints with a backslash. I don't know if the backslash is stored internally, or if it's inserted only for the printed output. A quick look at the source code in x_list.c suggests that the backslash is not stored internally.
- list "112 97 116 99 104 32 49" --> [list tosymbol] --> [list prepend set] --> [list trim] --> [oscformat]: The printed bytes from oscformat do include char 92. But I couldn't see in the source code where the space is being escaped. (This long way around to build the "set" message is to be certain that there's no backslash in my input -- the backslash must be generated internally somewhere..)
So [oscformat] seems to be where the problem is happening -- but the OSC spec makes no promises that spaces will work, so there wouldn't be any justification to log a bug.
hjh
Trying to create Variable speed delay, but buffer clears when read index is same as write index.
No problem... here it is simplified, with some comments. Thanks!
#N canvas 678 92 1242 928 12;
#X msg 273 196 resize $1;
#X obj 527 71 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 1 256 0 0 1 0;
#X obj 273 221 array define sampler1;
#X obj 923 853 dac~;
#X obj 152 352 phasor~ 1;
#X obj 919 286 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0.7 256 0 0 1 0;
#X text 526 84 buffer size (s);
#X obj 978 636 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 922 814 *~;
#X obj 281 586 vsl 8 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 263 753 *~;
#X text 997 719 volume;
#X text 300 644 feedback;
#X obj 107 803 +~, f 4;
#X obj 410 39 loadbang;
#X obj 472 38 bng 26 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 1;
#X obj 106 22 adc~;
#X obj 920 327 phasor~ 1;
#X obj 517 451 edge~;
#X obj 517 482 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000 1;
#X obj 152 374 *~ 44099;
#X obj 545 267 - 1;
#X obj 920 369 *~ 44099;
#X obj 107 839 poke~ sampler1;
#X text 500 14 this part up here just calculates the buffer size as1
second , based on the sample rate;
#X text 575 226 sutracting 1 from buffer sizefor index range because
indexrange starts at 0 , not 1;
#X text 992 341 phasor forplayhead pointer;
#X text 226 356 phasor forwrite head pointer;
#X text 566 445 this is here to indicatewhen the read and write indexare
the same (diagnostic);
#X obj 970 557 s~ feedback;
#X obj 188 725 r~ feedback;
#X obj 20 63 s~ dry;
#X obj 516 420 expr~ (abs($v1-$v2)< 1);
#X obj 927 493 tabread~ sampler1;
#X text 976 282 playback speed (try 0.7);
#X obj 832 777 r~ dry;
#N canvas 0 0 450 300 buff 0;
#X obj 40 107 samplerate~;
#X obj 40 130 * 1;
#X msg 127 105 1;
#X obj 40 80 t b b;
#X obj 40 152 t f f;
#X obj 13 26 inlet;
#X obj 63 26 inlet;
#X obj 13 225 outlet;
#X obj 69 225 outlet;
#X obj 125 225 outlet;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 2 0 9 0;
#X connect 3 0 0 0;
#X connect 3 1 2 0;
#X connect 4 0 7 0;
#X connect 4 1 8 0;
#X connect 5 0 3 0;
#X connect 6 0 1 1;
#X restore 472 68 pd buff;
#X text 249 244 defines and sizes the buffer;
#N canvas 0 0 450 300 line 0;
#X obj 40 100 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 40 80 / 127;
#X obj 40 148 line~;
#X msg 40 118 $1 100;
#X obj 13 26 inlet;
#X obj 13 221 outlet~;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 2 0 5 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 281 725 pd line;
#N canvas 0 0 450 300 line 0;
#X obj 40 103 line~;
#X msg 40 80 $1 100;
#X obj 13 26 inlet;
#X obj 13 176 outlet~;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X restore 920 304 pd line;
#N canvas 0 0 450 300 line 0;
#X obj 40 100 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 40 80 / 127;
#X obj 40 148 line~;
#X msg 43 118 $1 100;
#X obj 13 26 inlet;
#X obj 13 221 outlet~;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 2 0 5 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 978 774 pd line;
#X connect 0 0 2 0;
#X connect 1 0 36 1;
#X connect 4 0 20 0;
#X connect 5 0 39 0;
#X connect 7 0 40 0;
#X connect 8 0 3 0;
#X connect 8 0 3 1;
#X connect 9 0 38 0;
#X connect 10 0 13 1;
#X connect 13 0 23 0;
#X connect 14 0 36 0;
#X connect 15 0 36 0;
#X connect 16 0 13 0;
#X connect 16 0 31 0;
#X connect 17 0 22 0;
#X connect 18 0 19 0;
#X connect 20 0 23 1;
#X connect 20 0 32 0;
#X connect 21 0 20 1;
#X connect 21 0 22 1;
#X connect 22 0 32 1;
#X connect 22 0 33 0;
#X connect 30 0 10 0;
#X connect 32 0 18 0;
#X connect 33 0 8 0;
#X connect 33 0 29 0;
#X connect 35 0 8 0;
#X connect 36 0 0 0;
#X connect 36 1 21 0;
#X connect 36 2 1 0;
#X connect 38 0 10 1;
#X connect 39 0 17 0;
#X connect 40 0 8 1;
Trying to create Variable speed delay, but buffer clears when read index is same as write index.
Trying to create Variable speed delay, but buffer clears when read index is same as write index. I have done some additional patching to try and avoid this, in the "pd equal-block" subpatch, however it still seems to be happening. All the echoes stop when the indexes pass each other.Can anyone give me any guidance? Patch is pasted below.
#N canvas 678 88 1242 928 12;
#X obj 269 89 samplerate~;
#X msg 170 138 resize $1;
#X obj 401 60 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 1 256 0 0 1 0;
#X obj 277 111 * 1;
#X msg 401 26 1;
#X obj 95 165 array define sampler1;
#X msg 517 139 set sampler1;
#X obj 901 732 dac~;
#X obj 519 387 *~ 44100;
#X obj 518 353 phasor~ 1;
#X obj 915 289 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 1 256 0 0 1 0;
#X text 462 55 buffer size (s);
#X text 937 141 playback speed;
#X obj 1005 456 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 1005 626 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0
10 #fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 1005 606 / 127;
#X obj 1005 674 line~;
#X obj 900 693 *~;
#X obj 921 66 vsl 15 128 0 512 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 9525 1 0 1;
#X obj 918 242 * 4;
#X obj 919 263 - 2;
#X obj 920 223 / 512;
#X msg 920 27 384;
#X obj 107 217 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 114 355 / 127;
#X obj 612 322 line~;
#X msg 923 319 $1 100;
#X obj 115 378 * 4410;
#X obj 686 464 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 686 620 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 686 600 / 127;
#X obj 686 668 line~;
#X obj 670 695 *~;
#X text 1024 539 volume;
#X text 131 282 osc freq;
#X text 705 522 feedback;
#X msg 867 263 set $1;
#X obj 50 400 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X msg 23 373 set $1;
#X obj 48 438 line~;
#X msg 48 418 $1 100;
#X msg 686 638 $1 100;
#X msg 1008 644 $1 100;
#X text 939 69 2x;
#X text 939 196 -2x;
#X obj 517 160 s smplr;
#X obj 420 809 r smplr;
#X obj 839 457 r smplr;
#X obj 475 694 +~, f 4;
#X obj 49 470 osc~ 441;
#X obj 498 830 poke~;
#X obj 316 9 loadbang;
#X obj 315 30 t b b b;
#X obj 289 12 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 1;
#X obj 58 720 adc~;
#X obj 111 593 vsl 8 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 111 763 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 111 743 / 127;
#X obj 111 811 line~;
#X obj 94 835 *~;
#X msg 114 781 $1 100;
#X text 130 676 dry sgnl;
#X obj 180 306 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000 0 1 0 1;
#X obj 180 476 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
#fcfcfc #000000 #000000 0 256 0 0 1 0;
#X obj 180 456 / 127;
#X obj 180 524 line~;
#X obj 75 543 *~;
#X text 199 389 volume;
#X msg 183 494 $1 100;
#X obj 621 387 *~ 44100;
#X obj 620 353 phasor~ 1;
#X obj 292 145 t b f f;
#X obj 901 484 tabread4~;
#X obj 371 487 edge~;
#X obj 371 518 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000 1;
#X obj 484 110 t b b;
#X obj 845 297 t f b;
#X obj 371 455 expr~ \$v1 == \$v2;
#N canvas 160 562 509 371 equal-block 0;
#X obj 231 34 inlet~;
#X obj 365 32 inlet~;
#X obj 240 306 outlet~;
#X obj 183 250 *~;
#X obj 316 250 *~ -1;
#X obj 135 175 edge~;
#X obj 135 201 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000 1;
#X obj 327 165 edge~;
#X obj 327 191 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000 1;
#X obj 178 88 -~;
#X obj 178 112 abs~;
#X obj 178 139 expr~ \$v1 >= \$v2;
#X obj 311 139 expr~ \$v1 < \$v2;
#X floatatom 383 72 5 0 0 0 - - - 0 0 1, f 5;
#X obj 383 99 sig~ 4;
#X obj 443 21 inlet;
#X msg 443 54 1;
#X connect 0 0 9 0;
#X connect 1 0 9 1;
#X connect 1 0 3 1;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 7 0 8 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 10 0 12 0;
#X connect 11 0 5 0;
#X connect 11 0 3 0;
#X connect 12 0 4 0;
#X connect 12 0 7 0;
#X connect 13 0 14 0;
#X connect 14 0 11 1;
#X connect 14 0 12 1;
#X connect 15 0 16 0;
#X connect 16 0 13 0;
#X restore 584 419 pd equal-block;
#X connect 0 0 3 0;
#X connect 1 0 5 0;
#X connect 2 0 3 1;
#X connect 3 0 71 0;
#X connect 4 0 2 0;
#X connect 6 0 45 0;
#X connect 8 0 78 0;
#X connect 8 0 50 1;
#X connect 8 0 77 0;
#X connect 9 0 8 0;
#X connect 10 0 26 0;
#X connect 10 0 76 0;
#X connect 13 0 15 0;
#X connect 14 0 42 0;
#X connect 15 0 14 0;
#X connect 16 0 17 1;
#X connect 17 0 7 0;
#X connect 17 0 7 1;
#X connect 18 0 21 0;
#X connect 19 0 20 0;
#X connect 20 0 36 0;
#X connect 20 0 26 0;
#X connect 20 0 76 0;
#X connect 21 0 19 0;
#X connect 22 0 18 0;
#X connect 23 0 24 0;
#X connect 24 0 27 0;
#X connect 25 0 70 0;
#X connect 26 0 25 0;
#X connect 27 0 38 0;
#X connect 27 0 40 0;
#X connect 28 0 30 0;
#X connect 29 0 41 0;
#X connect 30 0 29 0;
#X connect 31 0 32 1;
#X connect 32 0 48 1;
#X connect 36 0 10 0;
#X connect 37 0 40 0;
#X connect 38 0 37 0;
#X connect 39 0 49 0;
#X connect 40 0 39 0;
#X connect 41 0 31 0;
#X connect 42 0 16 0;
#X connect 46 0 50 0;
#X connect 47 0 72 0;
#X connect 48 0 50 0;
#X connect 49 0 66 0;
#X connect 51 0 52 0;
#X connect 52 0 75 0;
#X connect 52 1 0 0;
#X connect 52 2 4 0;
#X connect 52 2 78 2;
#X connect 53 0 52 0;
#X connect 54 0 48 0;
#X connect 54 0 59 0;
#X connect 55 0 57 0;
#X connect 56 0 60 0;
#X connect 57 0 56 0;
#X connect 58 0 59 1;
#X connect 59 0 17 0;
#X connect 60 0 58 0;
#X connect 62 0 64 0;
#X connect 63 0 68 0;
#X connect 64 0 63 0;
#X connect 65 0 66 1;
#X connect 66 0 59 0;
#X connect 66 0 48 0;
#X connect 68 0 65 0;
#X connect 69 0 78 1;
#X connect 70 0 69 0;
#X connect 71 1 1 0;
#X connect 71 2 8 1;
#X connect 71 2 69 1;
#X connect 71 2 70 1;
#X connect 72 0 17 0;
#X connect 72 0 32 0;
#X connect 73 0 74 0;
#X connect 75 0 22 0;
#X connect 75 1 6 0;
#X connect 77 0 73 0;
#X connect 78 0 72 0;
#X connect 78 0 77 1;
planifolia (0.1) [release]
Hello!
I have just released in github and deken the abstraction pack 'planifolia' (v.0.1).
Planifolia
(from the second name of the orchid 'Vanilla planifolia') is a set of Pure Data abstractions designed to work without any compiled externals.
The abstractions implement a series of useful operations like arbitrary unary and binary operations in lists and arrays, quicksort, logical operators to check equality of arbitrary datatypes, easy OSC formatting/routing, etc. It also comes with toggle-based matrix GUI (designed to work be compatible with iemmatrix
objects) and a matrix based step sequencer with some non usual features (independent tempo, beat and duration patterns, col/row/colrow modes, nice colors, etc).
Some bugs may still be there...
abstractions
abstraction | description |
---|---|
[any.==] |
compares datatypes |
[array.binop] |
binary operations in arrays |
[array.rand] |
random populates an arrays |
[array.unop] |
unary operations in arrays |
[ls.binop] |
binary operations in list |
[ls.butlast] |
list but the last element |
[ls.choose] |
random choose an element of the list |
[ls.getRotate] |
N rotated element of a list |
[ls.group] |
groups elements into a list |
[ls.iter] |
list iteration |
[ls.last] |
last element of the list |
[ls.max] |
greatest element of a list |
[ls.mean] |
mean of the floats in a list |
[ls.min] |
minimum element in a list |
[ls.mode] |
mode of a list |
[ls.quicksort] |
quicksort algorithm implemented as a vanilla abstraction |
[ls.removeAt] |
removes element at index |
[ls.rotate] |
N rotation of a list |
[ls.scramble] |
randomize elements in a list |
[ls.ser.arithm] |
build an artithmetic series list |
[ls.splice] |
replaces element in a list with anothe list |
[ls.unop] |
perform unary operation in elements of a list |
[mtxgui] |
vanilla matrix interface |
[mtxstep] |
vanilla step sequencer with some non usual features |
[slash.oscformat] |
tool to format OSC messages |
[slash.oscroute] |
tool to route OSC messages |
[symbol.==] |
test if two symbols are equal |
[symbol.split] |
splits a symbol according to a char |
Brazilian percussion samples were gently provided by Chico Correa youtube: /c/ChicoCorrea
Snail... a pure data patch for slow sounds
Hello there, this seemed an interesting patch, so i unzipped it on a folder and tried to open it but got an unusable display and a string of errors on console, something like this (its not all of it);
list fromsymbol
... couldn't create
list tosymbol: unknown function
list tosymbol
... couldn't create
pdcontrol
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
clone 1 0 3 0 (canvas->outlet) connection failed
clone 1 1 8 0 (canvas->list split) connection failed
else/receiver
... couldn't create
else/receiver
... couldn't create
text search $1
... couldn't create
text set $1
... couldn't create
text search $1
... couldn't create
text get $1
... couldn't create
text size $1
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
text delete $1
... couldn't create
text_replace.pd 31 0 6 0 (canvas->select) connection failed
text_replace.pd 31 1 34 0 (canvas->trigger) connection failed
text define $0-guithru
... couldn't create
text size
... couldn't create
text get
... couldn't create
else/loadbanger -init
... couldn't create
else/receiver
... couldn't create
else/dollsym 1
... couldn't create
else/dollsym 2
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/args
... couldn't create
else/break -
... couldn't create
list fromsymbol: unknown function
list fromsymbol
... couldn't create
list tosymbol: unknown function
list tosymbol
... couldn't create
pdcontrol
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
clone 1 0 3 0 (canvas->outlet) connection failed
clone 1 1 8 0 (canvas->list split) connection failed
else/receiver
... couldn't create
else/receiver
... couldn't create
text search $1
... couldn't create
text set $1
... couldn't create
text search $1
... couldn't create
text get $1
... couldn't create
text size $1
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
text delete $1
... couldn't create
text_replace.pd 31 0 6 0 (canvas->select) connection failed
text_replace.pd 31 1 34 0 (canvas->trigger) connection failed
text define $0-guithru
... couldn't create
text size
... couldn't create
text get
... couldn't create
else/loadbanger -init
... couldn't create
else/receiver
... couldn't create
else/dollsym 1
... couldn't create
else/dollsym 2
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/click
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
q 8 0 11 0 (canvas->outlet) connection failed
q 8 1 5 0 (canvas->+~) connection failed
q 8 2 12 1 (canvas->canvas) connection failed
else/args
... couldn't create
else/break -
... couldn't create
list fromsymbol: unknown function
list fromsymbol
... couldn't create
list tosymbol: unknown function
list tosymbol
... couldn't create
pdcontrol
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
clone 1 0 3 0 (canvas->outlet) connection failed
clone 1 1 8 0 (canvas->list split) connection failed
else/receiver
... couldn't create
else/receiver
... couldn't create
text search $1
... couldn't create
text set $1
... couldn't create
text search $1
... couldn't create
text get $1
... couldn't create
text size $1
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
text delete $1
... couldn't create
text_replace.pd 31 0 6 0 (canvas->select) connection failed
text_replace.pd 31 1 34 0 (canvas->trigger) connection failed
text define $0-guithru
... couldn't create
text size
... couldn't create
text get
... couldn't create
else/loadbanger -init
... couldn't create
else/receiver
... couldn't create
else/dollsym 1
... couldn't create
else/dollsym 2
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/click
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/args
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/args
... couldn't create
else/loadbanger -init
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
mode 14 0 3 0 (canvas->clip) connection failed
mode 14 1 4 0 (canvas->wrap) connection failed
mode 14 2 6 0 (canvas->abs) connection failed
mode 14 3 15 0 (canvas->moses) connection failed
else/args
... couldn't create
else/break -
... couldn't create
list fromsymbol: unknown function
list fromsymbol
... couldn't create
list tosymbol: unknown function
list tosymbol
... couldn't create
pdcontrol
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
clone 1 0 3 0 (canvas->outlet) connection failed
clone 1 1 8 0 (canvas->list split) connection failed
else/receiver
... couldn't create
else/receiver
... couldn't create
text search $1
... couldn't create
text set $1
... couldn't create
text search $1
... couldn't create
text get $1
... couldn't create
text size $1
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
text delete $1
... couldn't create
text_replace.pd 31 0 6 0 (canvas->select) connection failed
text_replace.pd 31 1 34 0 (canvas->trigger) connection failed
text define $0-guithru
... couldn't create
text size
... couldn't create
text get
... couldn't create
else/loadbanger -init
... couldn't create
else/receiver
... couldn't create
else/dollsym 1
... couldn't create
else/dollsym 2
... couldn't create
text define -k $0-controls
... couldn't create
array: no method for 'set'
else/click
... couldn't create
else/break -
... couldn't create
list fromsymbol: unknown function
list fromsymbol
... couldn't create
list tosymbol: unknown function
list tosymbol
... couldn't create
pdcontrol
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
clone 1 0 3 0 (canvas->outlet) connection failed
clone 1 1 8 0 (canvas->list split) connection failed
else/receiver
... couldn't create
else/receiver
... couldn't create
text search $1
... couldn't create
text set $1
... couldn't create
text search $1
... couldn't create
text get $1
... couldn't create
text size $1
... couldn't create
else/args
... couldn't create
else/loadbanger -init
... couldn't create
text delete $1
... couldn't create
text_replace.pd 31 0 6 0 (canvas->select) connection failed
text_replace.pd 31 1 34 0 (canvas->trigger) connection failed
text define $0-guithru
... couldn't create
text size
... couldn't create
text get
... couldn't create
else/loadbanger -init
... couldn't create
else/receiver
... couldn't create
else/dollsym 1
... couldn't create
else/dollsym 2
... couldn't create
count.pd 15 0 8 0 (canvas->+) connection failed
count.pd 15 1 14 0 (canvas->-) connection failed
else/args
... couldn't create
else/loadbanger -init
... couldn't create
display 60 0 29 0 (canvas->message) connection failed
display 60 1 31 0 (canvas->select) connection failed
display 60 2 32 0 (canvas->message) connection failed
display 60 3 31 0 (canvas->select) connection failed
Any ideas ? cheers
JASS, Just Another Synth...Sort-of, codename: Gemini (UPDATED: esp with midi fixes)
JASS, Just Another Synth...Sort-of, codename: Gemini (UPDATED TO V-1.0.1)
jass-v1.0.1( esp with midi fixes).zip
1.0.1-CHANGES:
- Fixed issues with midi routing, re the mode selector (mentioned below)
- Upgraded the midi mode "fetch" abstraction to be less granular
- Fix (for midi) so changing cc["14","15","16"] to "rnd" outputs a random wave (It has always done this for non-midi.)
- Added a midi-mode-tester.pd (connect PD's midi out to PD's midi in to use it)
- Upgrade: cc-56 and cc-58 can now change pbend-cc and mod-cc in all modes
- Update: the (this) readme
INFO: Values setting to 0 on initial cc changes is (given midi) to be expected.
JASS is a clone-based, three wavetable, 16 voice polyphonic, Dual-channel synth.
With...
- The initial, two wavetables combined in 1 of 5 possible ways per channel and then adding those two channels. Example: additive+frequency modulation, phase+pulse-modulation, pulse-modulation+amplitude modulation, fm+fm, etc
- The third wavetable is a ring modulator, embedded inside each mod type
- 8 wave types, including a random with a settable number of partials and a square with a settable dutycycle
- A vcf~ filter embedded inside each modulation type
- The attack-decay-release, cutoff, and resonance ranges settable so they immediately and globally recalculate all relevant values
- Four parameters /mod type: p1,p2, cutoff, and resonance
- State-saving, at both the global level (wavetables, env, etc.), as well as, multiple "substates" of for-each-mod-type settings.
- Distortion, reverb
- Midiin, paying special attention to the use of 8-knob, usb, midi controllers (see below for details)
- zexy-limiters, for each channel, after the distortion, and just before dac~
Instructions
Requires: zexy
for-entire-state
- O: Open preset. "default.txt" is loaded by...default
- S: Save preset (all values incl. the multiple substates) (Note: I have Not included any presets, besides the default with 5 substates.)
- SA: Save as
- TEST: A sample player
- symbol: The filename of the currently loaded preset
- CL: Clear, sets all but a few values to 0
- U: Undo CL
- distortion,reverb,MASTER: operate on the total out, just before the limiter.
- MIDI (Each selection corresponds to a pgmin, 123,124,125,126,127, respectively, see below for more information)
- X: Default midi config, cc[1,7,8-64] available
- M: Modulators;cc[10-17] routed to ch1&ch2: p1,p2,cutoff,q controls
- E: Envelopes; cc[10-17] routed to filter- and amp-env controls
- R: Ranges; cc[10-17] routed to adr-min/max,cut-off min/max, resonance min/max, distortion, and reverb
- O: Other; cc[10-17] routed to rngmod controls, 3 wavetypes, and crossfade
- symbol: you may enter 8 cc#'s here to replace the default [10-17] from above to suit your midi-controller's knob configuration; these settings are saved to file upon entry
- vu: for total out to dac~
for-all-mod-types
- /wavetable
- graph: of the chosen wavetype
- part: partials, # of partials to use for the "rn" wavetype; the resulting, random sinesum is saved with the preset
- duty: dutycycle for the "du" wavetype
- type: sin | square | triangle | saw | random | duty | pink (pink-noise: a random sinesum with 128 partials, it is not saved with the preset) | noise (a random sinesum with 2051 partials, also not saved)
- filter-env: (self-explanatory)
- amp-env: (self-explanatory)
- rngmod: self-explanatory, except "sign" is to the modulated signal just before going into the vcf~
- adr-range: min,max[0-10000]; changing these values immediately recalculates all values for the filter- and amp-env's scaled to the new range
- R: randomizes all for-all-mod-types values, but excludes wavetype "noise"; rem: you must S or SA the preset to save the results
- U: Undoes R
for-each-mod-type
- mod-type-1: (In all cases, wavetable1 is the carrier and wavetable2 is the modulator); additive | frequency | phase | pulse | amplitude modulation
- mod-type-2: Same as above; mod-type-2 May be the same type as mod-type-1
- crossfade: Between ch1 and ch2
- detune: Applied to the midi pitch going into ch2
- for-each-clone-type controls:
- p1,p2: (self-explanatory)
- cutoff, resonance: (self-explanatory)
- navigation: Cycles through the saved substates of for-each-mod-type settings (note: they are lines on the end of a [text])
- CP: Copy the current settings, ie. add a line to the end of the [text] identical to the current substate
- -: Delete the current substate
- R: Randomize all (but only a few) substate settings
- U: Undo R
- cut-rng: min,max[0-20000] As adr-range above, this immediately recalculates all cutoff values
- res-rng: min,max[0-100], same as previously but for q
- pbend: cc,rng: the pitchwheel may be assigned to a control by setting this to a value >7 (see midi table below for possibilities); rng is in midi pitches (+/- the value you enter)
- mod-cc: the mod-wheel may be assigned to a control [7..64] by setting this value
midi-implementation
name | --- | Description |
---|---|---|
sysex | not supported | |
pgmin | 123,124,125,126,127; They set midi mode | |
notein | 0-127 | |
bendin | pbend-cc=7>pitchbend; otherwise to the cc# from below | |
touch | not supported | |
polytouch | not supported |
cc - basic (for all midi-configs)
# | name | --- | desciption |
---|---|---|---|
1 | mod-wheel | (assignable) | |
7 | volume | Master |
cc - "X" mode/pgmin=123
cc | --- | parameter |
---|---|---|
8 | wavetype1 | |
9 | partials 1 | |
10 | duty 1 | |
11 | wavetype2 | |
12 | partials 2 | |
13 | duty 2 | |
14 | wavetype3 | |
15 | partials 3 | |
16 | duty 3 | |
17 | filter-att | |
18 | filter-dec | |
19 | filter-sus | |
20 | filter-rel | |
21 | amp-att | |
22 | amp-dec | |
23 | amp-sus | |
24 | amp-rel | |
25 | rngmod-freq | |
26 | rngmod-sig | |
27 | rngmod-filt | |
28 | rngmod-amp | |
29 | distortion | |
30 | reverb | |
31 | master | |
32 | mod-type 1 | |
33 | mod-type 2 | |
34 | crossfade | |
35 | detune | |
36 | p1-1 | |
37 | p2-1 | |
38 | cutoff-1 | |
39 | q-1 | |
40 | p1-2 | |
41 | p2-2 | |
42 | cutoff-2 | |
43 | q-2 | |
44 | p1-3 | |
45 | p2-3 | |
46 | cutoff-3 | |
47 | q-3 | |
48 | p1-4 | |
49 | p2-4 | |
50 | cutoff-4 | |
51 | q-4 | |
52 | p1-5 | |
53 | p2-5 | |
54 | cutoff-5 | |
55 | q-5 | |
56 | pbend-cc | |
57 | pbend-rng | |
58 | mod-cc | |
59 | adr-rng-min | |
60 | adr-rng-max | |
61 | cut-rng-min | |
62 | cut-rng-max | |
63 | res-rng-min | |
64 | res-rng-max |
cc - Modes M, E, R, O
Jass is designed so that single knobs may be used for multiple purposes without reentering the previous value when you turn the knob, esp. as it pertains to, 8-knob controllers.
Thus, for instance, when in Mode M(pgm=124) your cc send the signals as listed below. When you switch modes, that knob will then change the values for That mode.
In order to do this, you must turn the knob until it hits the previously stored value for that mode-knob.
After hitting that previous value, it will begin to change the current value.
cc - Modes M, E, R, O assignments
Where [10..17] may be the midi cc #'s you enter in the MIDI symbol field (as mentioned above) aligned to your particular midi controller.
cc# | --- | M/pgm=124 | --- | E/pgm=125 | --- | R/pgm=126 | --- | O/pgm=127 |
---|---|---|---|---|---|---|---|---|
10 | ch1:p1 | filter-env:att | adr-rng-min | rngmod:freq | ||||
11 | ch1:p2 | filter-env:dec | adr-rng-max | rngmod:sig | ||||
12 | ch1:cutoff | filter-env:sus | cut-rng-min | rngmod:filter | ||||
13 | ch1:q | filter-env:re | cut-rng-max | rngmod:amp | ||||
14 | ch2:p1 | amp-env:att | res-rng-min | wavetype1 | ||||
15 | ch2:p2 | amp-env:dec | res-rng-max | wavetype2 | ||||
16 | ch2:cutoff | amp-env:sus | distortion | wavetype3 | ||||
17 | ch2:q | amp-env:rel | reverb | crossfade |
In closing
If you have anywhere close to as much fun (using, experimenting with, trying out, etc.) this patch, as I had making it, I will consider it a success.
For while an arduous learning curve (the first synth I ever built), it has been an Enormous pleasure to listen to as I worked on it. Getting better and better sounding at each pass.
Rather, than say to much, I will say this:
Enjoy. May it bring a smile to your face.
Peace through love of creating and sharing.
Sincerely,
Scott
Smooth midi control change for yamaha reface DX (newbie level)
Hi guys,
I'm trying to assign a knob from my hardware controller to control the frequency of the operators on a tiny Yamaha Reface DX.
Only "problem" is that on the actual keyboard Data List parameters there is 2 different CC Number for each operator frequency level: a "coarse" and a "fine".
For example for the OSC1 of the Reface DX, the CC 89 (with value between 0-31) controls the Coarse frequency value (integer only), and the fine frequency is control by another CC (90) with value between 0 and 99 for decimal.
(gosh, i hope i'm clear enough!!).
I would like one single knob to smoothly operate the change of frequency because the audio rendering is quite bulky when only using integer value only and the charm of FM synthesis realtime morphing is then lost...
I've tried a a patch that isolates the decimal from the integer from the midi control value and send the two values to the target CC number (89 and 90) via a [ctlout] object but the result isn't perfect really. I've put some short delay for the decimal values to be send before the integer value...
Nothing very complicated for most of you i think, but i am an eternal newbie on PureData, and i could do with some help!
Thanks for any advice guys!
Regards,
Anthony
PS: here's my patch so far:
#N canvas 398 124 739 708 10;
#X floatatom 264 182 0 0 0 0 - - -;
#X floatatom 398 173 3 0 0 0 - - -;
#X floatatom 368 172 3 0 0 0 - - -;
#X obj 355 100 ctlin;
#X obj 222 287 line;
#X floatatom 210 347 5 0 0 0 - - -;
#X obj 208 382 float;
#X floatatom 269 415 5 0 0 0 - - -;
#X obj 273 376 int;
#X floatatom 211 416 5 0 0 0 - - -;
#X floatatom 208 503 5 0 0 0 - - -;
#X obj 210 450 -;
#X obj 475 491 ctlout $1;
#X obj 490 403 + 1;
#X floatatom 563 422 5 0 0 0 - - -;
#X obj 373 295 ctlout $1;
#X obj 317 498 * 99;
#X floatatom 359 503 5 0 0 0 - - -;
#X floatatom 325 314 5 0 0 0 - - -;
#X obj 300 278 int;
#X obj 366 141 / 4.09667;
#X msg 211 243 $1 400;
#X obj 328 228 delay 500;
#X connect 0 0 21 0;
#X connect 0 0 19 1;
#X connect 0 0 22 0;
#X connect 1 0 13 0;
#X connect 1 0 15 1;
#X connect 2 0 0 0;
#X connect 3 0 20 0;
#X connect 3 1 1 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 8 0;
#X connect 6 0 9 0;
#X connect 7 0 11 1;
#X connect 8 0 7 0;
#X connect 9 0 11 0;
#X connect 10 0 16 0;
#X connect 11 0 10 0;
#X connect 13 0 14 0;
#X connect 14 0 12 1;
#X connect 16 0 17 0;
#X connect 17 0 12 0;
#X connect 19 0 18 0;
#X connect 19 0 15 0;
#X connect 20 0 2 0;
#X connect 21 0 4 0;
#X connect 22 0 19 0;
lua markov generator
i build a lua markov generator inspired from this python code with the idea to use it with pure data / ofelia: https://eli.thegreenplace.net/2018/elegant-python-code-for-a-markov-chain-text-generator/
finally the code works fine with the eclipse lua ide or with this ide https://studio.zerobrane.com/, but somehow not yet with pure data / ofelia.
here is the (not yet working) patch: ofelia_markov.pd
and here the lua code: markov_pd.lua
math.randomseed(os.time()- os.clock() * 1000);
-- make dictionary;
function defaultdict(default_value_factory);
local t = {};
local metatable = {};
metatable.__index = function(t, key);
if not rawget(t, key) then;
rawset(t, key, default_value_factory(key));
end;
return rawget(t, key);
end;
return setmetatable(t, metatable);
end;
;
;
-- make markov matrix;
print('Learning model...')
;
STATE_LEN = 3;
print ("markov order: " , STATE_LEN)
model = defaultdict(function() return {} end)
data = "00001111010100700111101010000005000700111111177111111";
datasize = #data;
print("data: ", data);
print("datasize: ", #data);
data = data .. data:sub(1, STATE_LEN);
print("altered data: ", data);
print("altered datasize: ", #data);
for i = 1, (#data - STATE_LEN) do;
state = data:sub(i, i + STATE_LEN-1);
-- print("state: ", state)
local next = data:sub(i + STATE_LEN, i + STATE_LEN);
-- print("next: ", next);
model[state][next] = (model[state][next] or 0)+1;
end;
;
;
-- make markov chain;
print('Sampling...');
;
local keyTbl = {};
local nexTbl = {};
local prbTbl = {};
for key, value in pairs(model) do;
for k, v in pairs(value) do;
table.insert(keyTbl, key);
table.insert(nexTbl, k);
table.insert(prbTbl, v);
end;
end;
print ("keyTbl: ", table.unpack(keyTbl));
print ("nexTbl: ", table.unpack(nexTbl));
print ("prbTbl: ", table.unpack(prbTbl));
;
;
-- make random key;
local randomKey = keyTbl[math.random(#keyTbl)];
state = randomKey;
print("RandomKey: ", randomKey);
;
-- make table from random key;
local str = state;
local stateTable = {};
for i = 1, #str do;
stateTable[i] = str:sub(i, i);
end;
;
out = stateTable;
print ("random key as table: ", table.unpack(out));
;
-- make markov chain;
for i = 1, datasize do;
;
-- weighted random choices;
local choices = {};
local weights = {};
for j = 1, #keyTbl do;
if state == keyTbl[j] then;
table.insert(choices, nexTbl[j]);
table.insert(weights, prbTbl[j]);
end;
end;
-- print ("choices:",table.unpack(choices));
-- print ("weights:",table.unpack(weights));
;
local totalWeight = 0;
for _, weight in pairs(weights) do;
totalWeight = totalWeight + weight;
end;
rand = math.random() * totalWeight;
local choice = nil;
for i, weight in pairs(weights) do;
if rand < weight then;
choice = choices[i];
choice = choice:sub(1,1);
break;
else;
rand = rand - weight;
end;
end;
;
table.insert(out, choice);
state = string.sub(state, 2, #state) .. out[#out];
-- print("choice", choice);
-- print ("state", state);
end;
;
print("markov chain: ", table.concat(out));
somehow pure data / ofelia interprets the nexTbl values as a functions while they are strings?
this is part of what the pure data console prints: nexTbl: function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30 function: 0000000003B9BF30
ofelia: [string "package.preload['#d41b70'] = nil package.load..."]:93: attempt to index a function value (local 'choice')
and this ist the output from the lua ide:
Program 'lua.exe' started in 'C:\Users\Jonat\Downloads\ZeroBraneStudio\myprograms' (pid: 220).
Learning model...
markov order: 1
data: 00001111010100700111101010000005000700111111177111111
datasize: 53
altered data: 000011110101007001111010100000050007001111111771111110
altered datasize: 54
Sampling...
keyTbl: 5 7 7 7 1 1 1 0 0 0 0
nexTbl: 0 0 1 7 7 1 0 5 7 1 0
prbTbl: 1 2 1 1 1 17 7 1 2 7 13
RandomKey: 1
random key as table: 1
markov chain: 111111000077701111100070001100000001100017011171111117
Program completed in 0.06 seconds (pid: 220).